Jetpack by WordPress.com - Version 10.9-a.7

Version Description

Download this release

Release Info

Developer wpkaren
Plugin Icon 128x128 Jetpack by WordPress.com
Version 10.9-a.7
Comparing to
See all releases

Code changes from version 10.9-a.5 to 10.9-a.7

CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ## 10.9-a.5 - 2022-04-14
6
  ### Bug fixes
7
  - Comments: Checking that Jetpack comments are supported before requiring nonce verification.
2
 
3
  ### This is a list detailing changes for all Jetpack releases.
4
 
5
+ ## 10.9-a.7 - 2022-04-19
6
+ ### Enhancements
7
+ - Connection: Preventing other Jeptpack-connected plugins from disconnecting when deactivating Jetpack from the plugins screen.
8
+ - Recommendations: Add recommendation for anti-spam.
9
+
10
+ ### Improved compatibility
11
+ - WordAds: Remove the suggestion to use the ad widget from the dashboard.
12
+ - WordAds: Change Jetpack Ads wording to be WordAds.
13
+
14
+ ### Bug fixes
15
+ - Publicize: Ensure bulk publishing posts won’t publicize those posts.
16
+ - Random Redirect: Fixes 'set author name' functionality on author archives.
17
+ - VideoPress: Fixes issue adding video descriptions and metadata via the WordPress.com dashboard.
18
+
19
+ ### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
20
+ - Added TypeScript support.
21
+ - Dashboard: Update copy to reflect new WordPress.com Pro plan.
22
+ - Jetpack Connection: Remove any remaining in-place flows.
23
+ - Moved licensing endpoints from the Jetpack plugin to the Licensing package.
24
+ - Moved enhanced-open-graph.php out of the Publicize module.
25
+ - Moved gutenberg-base-styles.scss file to js-packages/base-styles and updated its imports in the Jetpack plugin directory.
26
+ - Moved images that are used for licensing components to licensing package to minimize external dependencies.
27
+ - Refactor Jetpack class to move some functions into Modules and File packages.
28
+ - Security Settings: convert plan checks to be feature checks.
29
+ - Stats: Add individual filters for JS and AMP stat footer data.
30
+ - Updated jetpack-waf package version.
31
+ - Updated package dependencies.
32
+ - Updated Sync tests.
33
+ - Various PHPCS changes.
34
+
35
  ## 10.9-a.5 - 2022-04-14
36
  ### Bug fixes
37
  - Comments: Checking that Jetpack comments are supported before requiring nonce verification.
_inc/blocks/donations/view.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-dom-ready', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => '80fd7bf5cff9cd5060325bbf1fd115ff');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-dom-ready', 'wp-keycodes', 'wp-polyfill', 'wp-url'), 'version' => '5b51e8e6ef14d34179edd302a670c47e');
_inc/blocks/donations/view.js CHANGED
@@ -1,2 +1,2 @@
1
  /*! For license information please see view.js.LICENSE.txt */
2
- !function(){var t={8172:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(31354),i=n(64803);function o(t){var e=(0,r.Z)(t);return function(t){return(0,i.Z)(e,t)}}},64803:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function i(t,e){var n,i,o,s,c,u,a=[];for(n=0;n<t.length;n++){if(c=t[n],s=r[c]){for(i=s.length,o=Array(i);i--;)o[i]=a.pop();try{u=s.apply(null,o)}catch(t){return t}}else u=e.hasOwnProperty(c)?e[c]:+c;a.push(u)}return a[0]}},7478:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(8172);function i(t){var e=(0,r.Z)(t);return function(t){return+e({n:t})}}},31354:function(t,e,n){"use strict";var r,i,o,s;function c(t){for(var e,n,c,u,a=[],l=[];e=t.match(s);){for(n=e[0],(c=t.substr(0,e.index).trim())&&a.push(c);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]<r[n]){l.push(u);break}a.push(u)}o[n]||l.push(n),t=t.substr(e.index+n.length)}return(t=t.trim())&&a.push(t),a.concat(l.reverse())}n.d(e,{Z:function(){return c}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function i(t,e){var n;if(!Array.isArray(e))for(e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n=1,t.replace(r,(function(){var t,r,i,o,s;return t=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=e[n-1],n++),void 0!==r?e[0]&&"object"==typeof e[0]&&e[0].hasOwnProperty(r)&&(s=e[0][r]):(void 0===t&&(t=n),n++,s=e[t-1]),"f"===o?s=parseFloat(s)||0:"d"===o&&(s=parseInt(s)||0),void 0!==i&&("f"===o?s=s.toFixed(i):"s"===o&&(s=s.substr(0,i))),null!=s?s:"")}))}},2571:function(t){"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var a=u.length,l=d(u,a);for(n=0;n<a;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return a(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return a(this,t,e,!0)},o.prototype.once=function(t,e){return c(e),this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},95949:function(t,e,n){"use strict";var r=n(53566),i=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},69016:function(t,e,n){"use strict";var r=n(53566),i=n(95949),o=n(47574),s=r.rotl32,c=r.sum32,u=r.sum32_5,a=o.ft_1,l=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=u(s(i,5),a(d,o,l,f),m,n[r],p[d]);m=f,f=l,l=s(o,30),o=i,i=g}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],l),this.h[3]=c(this.h[3],f),this.h[4]=c(this.h[4],m)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(t,e,n){"use strict";var r=n(53566).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},53566:function(t,e,n){"use strict";var r=n(48282),i=n(59503);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function c(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=c(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=c,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),c=0,u=e;c<s.length;c++,u+=4){var a;a="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[c]=a>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,c){var u=0,a=e;return u+=(a=a+r>>>0)<e?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,c){return e+r+o+c>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,c,u,a){var l=0,p=e;return l+=(p=p+r>>>0)<e?1:0,l+=(p=p+o>>>0)<o?1:0,l+=(p=p+c>>>0)<c?1:0,t+n+i+s+u+(l+=(p=p+a>>>0)<a?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,c,u,a){return e+r+o+c+a>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},88617:function(t,e,n){"use strict";var r=n(97997),i=n(79497),o=n(57513),s=n.n(o),c=n(40101),u=n(88090),a=n(75565),l=n.n(a),p=n(69016),f=n.n(p),m=n(2571),d=n(702),g=n(92846),h=s()("i18n-calypso"),y="number_format_decimals",b="number_format_thousands_sep",v="messages",w=[function(t){return t}],C={};function _(){L.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function S(t){return Array.prototype.slice.call(t)}function F(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&_("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",S(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&_("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",S(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function O(t,e){return t.dcnpgettext(v,e.context,e.original,e.plural,e.count)}function A(t,e){for(var n=w.length-1;n>=0;n--){var r=w[n](Object.assign({},e)),i=r.context?r.context+""+r.original:r.original;if(t.state.locale[i])return O(t.state.tannin,r)}return null}function L(){if(!(this instanceof L))return new L;this.defaultLocaleSlug="en",this.defaultPluralForms=function(t){return 1===t?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:l()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}L.throwErrors=!1,L.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},L.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},L.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},L.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,g.Z)(t,n,r,i)},L.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},L.prototype.setLocale=function(t){var e,n,r;if(t&&t[""]&&t[""]["key-hash"]){var o=t[""]["key-hash"],s=function(t,e){var n=!1===e?"":String(e);if(void 0!==C[n+t])return C[n+t];var r=f()().update(t).digest("hex");return C[n+t]=e?r.substr(0,e):r},c=function(t){return function(e){return e.context?(e.original=s(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=s(e.original,t),e}};if("sha1"===o.substr(0,4))if(4===o.length)w.push(c(!1));else{var a=o.substr(5).indexOf("-");if(a<0){var l=Number(o.substr(5));w.push(c(l))}else for(var p=Number(o.substr(5,a)),m=Number(o.substr(6+a)),d=p;d<=m;d++)w.push(c(d))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(e=this.state.locale["text directionltr"])||void 0===e?void 0:e[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new u.Z((0,i.Z)({},v,this.state.locale)),this.state.numberFormatSettings.decimal_point=O(this.state.tannin,F([y])),this.state.numberFormatSettings.thousands_sep=O(this.state.tannin,F([b])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===b&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},L.prototype.getLocale=function(){return this.state.locale},L.prototype.getLocaleSlug=function(){return this.state.localeSlug},L.prototype.isRtl=function(){return"rtl"===this.state.textDirection},L.prototype.addTranslations=function(t){for(var e in t)""!==e&&(this.state.tannin.data.messages[e]=t[e]);this.stateObserver.emit("change")},L.prototype.hasTranslation=function(){return!!A(this,F(arguments))},L.prototype.translate=function(){var t=F(arguments),e=A(this,t);if(e||(e=O(this.state.tannin,t)),t.args){var n=Array.isArray(t.args)?t.args.slice(0):[t.args];n.unshift(e);try{e=d.Z.apply(void 0,(0,r.Z)(n))}catch(t){if(!window||!window.console)return;var i=this.throwErrors?"error":"warn";"string"!=typeof t?window.console[i](t):window.console[i]("i18n sprintf error:",n)}}return t.components&&(e=(0,c.Z)({mixedString:e,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){e=n(e,t)})),e},L.prototype.reRenderTranslations=function(){h("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},L.prototype.registerComponentUpdateHook=function(t){this.componentUpdateHooks.push(t)},L.prototype.registerTranslateHook=function(t){this.translateHooks.push(t)},e.Z=L},63807:function(t,e,n){"use strict";n.d(e,{Y4:function(){return u}});var r=n(88617),i=n(42928),o=n(80975),s=n(24531),c=new r.Z,u=c.numberFormat.bind(c),a=(c.translate.bind(c),c.configure.bind(c),c.setLocale.bind(c),c.getLocale.bind(c),c.getLocaleSlug.bind(c),c.addTranslations.bind(c),c.reRenderTranslations.bind(c),c.registerComponentUpdateHook.bind(c),c.registerTranslateHook.bind(c),c.state,c.stateObserver,c.on.bind(c),c.off.bind(c),c.emit.bind(c),(0,i.Z)(c),(0,o.Z)(c),(0,s.Z)(c));a.useRtl,a.withRtl},42928:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(42385),i=n(97469),o=n(92201),s=n(31551),c=n(29991),u=n(56245),a=n(79497),l=n(99196),p=n.n(l);function f(t){var e={numberFormat:t.numberFormat.bind(t),translate:t.translate.bind(t)};return function(n){var l,f,m=n.displayName||n.name||"";return f=l=function(l){(0,c.Z)(m,l);var f=(0,u.Z)(m);function m(){var t;(0,i.Z)(this,m);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=f.call.apply(f,[this].concat(n)),(0,a.Z)((0,s.Z)(t),"boundForceUpdate",t.forceUpdate.bind((0,s.Z)(t))),t}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){t.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){t.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var i=(0,r.Z)({locale:t.getLocaleSlug()},this.props,{},e);return p().createElement(n,i)}}]),m}(p().Component),(0,a.Z)(l,"displayName","Localized("+m+")"),f}}},92846:function(t,e,n){"use strict";function r(t,e,n,r){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+t)?+t:0,o=isFinite(+e)?Math.abs(e):0,s=void 0===r?",":r,c=void 0===n?".":n,u="";return u=(o?function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."),u[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(u[1]||"").length<o&&(u[1]=u[1]||"",u[1]+=new Array(o-u[1].length+1).join("0")),u.join(c)}n.d(e,{Z:function(){return r}})},24531:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(37665),i=n(99196),o=n.n(i),s=n(20036),c=n(94333);function u(t){var e={getCurrentValue:function(){return t.isRtl()},subscribe:function(e){return t.on("change",e),function(){return t.off("change",e)}}};function n(){return(0,s.useSubscription)(e)}var u=(0,c.createHigherOrderComponent)((function(t){return(0,i.forwardRef)((function(e,i){var s=n();return o().createElement(t,(0,r.Z)({},e,{isRtl:s,ref:i}))}))}),"WithRTL");return{useRtl:n,withRtl:u}}},80975:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(27101),i=n(99196),o=n.n(i);function s(t){function e(){var e=t.translate.bind(t);return Object.defineProperty(e,"localeSlug",{get:t.getLocaleSlug.bind(t)}),e}return function(){var n=o().useState(e),i=(0,r.Z)(n,2),s=i[0],c=i[1];return o().useEffect((function(){var n=function(){return c(e)};return t.on("change",n),function(){return t.off("change",n)}}),[]),s}}},59503:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},75565:function(t,e,n){var r=n(2571),i=n(59503);function o(t){if(!(this instanceof o))return new o(t);"number"==typeof t&&(t={max:t}),t||(t={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=t.max||1e3,this.maxAge=t.maxAge||0}t.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];return delete this.cache[t],this._unlink(t,e.prev,e.next),e.value}},o.prototype._unlink=function(t,e,n){this.length--,0===this.length?this.head=this.tail=null:this.head===t?(this.head=e,this.cache[this.head].next=null):this.tail===t?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[e].next=n,this.cache[n].prev=e)},o.prototype.peek=function(t){if(this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return e.value}},o.prototype.set=function(t,e){var n;if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){if((n=this.cache[t]).value=e,this.maxAge&&(n.modified=Date.now()),t===this.head)return e;this._unlink(t,n.prev,n.next)}else n={value:e,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[t]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=t),this.head=t,this.tail||(this.tail=t),e},o.prototype._checkAge=function(t,e){return!(this.maxAge&&Date.now()-e.modified>this.maxAge)||(this.remove(t),this.emit("evict",{key:t,value:e.value}),!1)},o.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},o.prototype.evict=function(){if(this.tail){var t=this.tail,e=this.remove(this.tail);this.emit("evict",{key:t,value:e})}}},48282:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},32002:function(t){var e=1e3,n=60*e,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,u){u=u||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===a&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return c(t,o,i,"day");if(o>=r)return c(t,o,r,"hour");if(o>=n)return c(t,o,n,"minute");if(o>=e)return c(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1625:function(t){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var s,c,u=i(t),a=1;a<arguments.length;a++){for(var l in s=Object(arguments[a]))n.call(s,l)&&(u[l]=s[l]);if(e){c=e(s);for(var p=0;p<c.length;p++)r.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u}},88090:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(7478),i={contextDelimiter:"",onMissingKey:null};function o(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},i)this.options[n]=void 0!==e&&n in e?e[n]:i[n]}o.prototype.getPluralForm=function(t,e){var n,i,o,s=this.pluralForms[t];return s||("function"!=typeof(o=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(i)),s=this.pluralForms[t]=o),s(e)},o.prototype.dcnpgettext=function(t,e,n,r,i){var o,s,c;return o=void 0===i?0:this.getPluralForm(t,i),s=n,e&&(s=e+this.options.contextDelimiter+n),(c=this.data[t][s])&&c[o]?c[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)}},76369:function(t,e,n){"use strict";n.d(e,{hj:function(){return s},Vm:function(){return c}});var r=n(27184),i=n(92819);const o={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(o).map((t=>{const{symbol:e}=(0,r.X)(t);return{value:t,label:e===t?t:`${t} ${(0,i.trimEnd)(e,".")}`}}));function s(t){return o[t]}function c(t,e){return t?"number"==typeof t?t:(t=parseFloat(t.replace(new RegExp("\\"+r.M[e].grouping,"g"),"").replace(new RegExp("\\"+r.M[e].decimal,"g"),".")),isNaN(t)?null:t):null}},51331:function(t,e,n){"use strict";function r(t){if("https://subscribe.wordpress.com"===t.origin&&t.data){const e=JSON.parse(t.data);e&&"close"===e.action&&(window.removeEventListener("message",r),tb_remove())}}n.d(e,{f:function(){return i}});const i=t=>{Array.prototype.slice.call(document.querySelectorAll(t)).forEach((t=>{if("true"!==t.getAttribute("data-jetpack-memberships-button-initialized")){try{!function(t){t.addEventListener("click",(e=>{e.preventDefault();const n=t.getAttribute("href");window.scrollTo(0,0),tb_show(null,n+"&display=alternate&TB_iframe=true",null),window.addEventListener("message",r,!1),document.querySelector("#TB_window").classList.add("jetpack-memberships-modal"),window.scrollTo(0,0)}))}(t)}catch(t){console.error("Problem setting up Thickbox",t)}t.setAttribute("data-jetpack-memberships-button-initialized","true")}}))}},82049:function(t,e,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},27184:function(t,e,n){"use strict";n.d(e,{M:function(){return r},X:function(){return i}});var r={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function i(t){return r[t]||{symbol:"$",grouping:",",decimal:".",precision:2}}},1532:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var r=n(66521),i=n(63807),o=n(27184);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,o.X)(e);if(!s||isNaN(t))return null;var c=(0,r.Z)({},s,n),u=c.decimal,a=c.grouping,l=c.precision,p=c.symbol,f=t<0?"-":"",m=(0,i.Y4)(Math.abs(t),{decimals:l,thousandsSep:a,decPoint:u});return"".concat(f).concat(p).concat(m)}},40101:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(99196),i=n(72511);function o(t,e){let n,i,s=[];for(let r=0;r<t.length;r++){const o=t[r];if("string"!==o.type){if(void 0===e[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof e[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=e[o.value],i=r;break}s.push(e[o.value])}else s.push(o.value)}if(n){const c=function(t,e){const n=e[t];let r=0;for(let i=t+1;i<e.length;i++){const t=e[i];if(t.value===n.value){if("componentOpen"===t.type){r++;continue}if("componentClose"===t.type){if(0===r)return i;r--}}}throw new Error("Missing closing component token `"+n.value+"`")}(i,t),u=o(t.slice(i+1,c),e),a=(0,r.cloneElement)(n,{},u);if(s.push(a),c<t.length-1){const n=o(t.slice(c+1),e);s=s.concat(n)}}return s=s.filter(Boolean),0===s.length?null:1===s.length?s[0]:(0,r.createElement)(r.Fragment,null,...s)}function s(t){const{mixedString:e,components:n,throwErrors:r}=t;if(!n)return e;if("object"!=typeof n){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because components is not an object`);return e}const s=(0,i.Z)(e);try{return o(s,n)}catch(t){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because of error \`${t.message}\``);return e}}},72511:function(t,e,n){"use strict";function r(t){return t.startsWith("{{/")?{type:"componentClose",value:t.replace(/\W/g,"")}:t.endsWith("/}}")?{type:"componentSelfClosing",value:t.replace(/\W/g,"")}:t.startsWith("{{")?{type:"componentOpen",value:t.replace(/\W/g,"")}:{type:"string",value:t}}function i(t){return t.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}n.d(e,{Z:function(){return i}})},57513:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(77821)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},77821:function(t,e,n){t.exports=function(t){function e(t){let n,i,o,s=null;function c(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!c.enabled)return;const o=c,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";a++;const i=e.formatters[n];if("function"==typeof i){const e=r[a];t=i.call(o,e),r.splice(a,1),a--}return t})),e.formatArgs.call(o,r);const l=o.log||e.log;l.apply(o,r)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=r,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(c),c}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(32002),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},11043:function(t,e,n){"use strict";var r=n(1625),i=n(99196);e.useSubscription=function(t){var e=t.getCurrentValue,n=t.subscribe,o=i.useState((function(){return{getCurrentValue:e,subscribe:n,value:e()}}));t=o[0];var s=o[1];return o=t.value,t.getCurrentValue===e&&t.subscribe===n||(o=e(),s({getCurrentValue:e,subscribe:n,value:o})),i.useDebugValue(o),i.useEffect((function(){function t(){if(!i){var t=e();s((function(i){return i.getCurrentValue!==e||i.subscribe!==n||i.value===t?i:r({},i,{value:t})}))}}var i=!1,o=n(t);return t(),function(){i=!0,o()}}),[e,n]),o}},20036:function(t,e,n){"use strict";t.exports=n(11043)},99196:function(t){"use strict";t.exports=window.React},92819:function(t){"use strict";t.exports=window.lodash},94333:function(t){"use strict";t.exports=window.wp.compose},47701:function(t){"use strict";t.exports=window.wp.domReady},39630:function(t){"use strict";t.exports=window.wp.keycodes},96483:function(t){"use strict";t.exports=window.wp.url},1613:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{Z:function(){return r}})},11800:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{Z:function(){return r}})},53886:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(1613);function i(t){if(Array.isArray(t))return(0,r.Z)(t)}},31551:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:function(){return r}})},97469:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},92201:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:function(){return i}})},56245:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(39528),i=n(11818),o=n(31834);function s(t){var e=(0,i.Z)();return function(){var n,i=(0,r.Z)(t);if(e){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return(0,o.Z)(this,n)}}},79497:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},37665:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:function(){return r}})},39528:function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{Z:function(){return r}})},29991:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(2506);function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,r.Z)(t,e)}},11818:function(t,e,n){"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}n.d(e,{Z:function(){return r}})},92021:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{Z:function(){return r}})},70672:function(t,e,n){"use strict";function r(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(t);!(_n=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{_n||null==n.return||n.return()}finally{if(s)throw i}}return o}}n.d(e,{Z:function(){return r}})},81306:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},35227:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},66521:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(79497);function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?Object(arguments[e]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach((function(e){(0,r.Z)(t,e,n[e])}))}return t}},42385:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(79497);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},31834:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(83916),i=n(31551);function o(t,e){if(e&&("object"===(0,r.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},2506:function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:function(){return r}})},27101:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(11800),i=n(70672),o=n(74983),s=n(81306);function c(t,e){return(0,r.Z)(t)||(0,i.Z)(t,e)||(0,o.Z)(t,e)||(0,s.Z)()}},97997:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(53886),i=n(92021),o=n(74983),s=n(35227);function c(t){return(0,r.Z)(t)||(0,i.Z)(t)||(0,o.Z)(t)||(0,s.Z)()}},83916:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{Z:function(){return r}})},74983:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(1613);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"}(),function(){"use strict";n(82049)}(),function(){"use strict";var t=n(1532),e=n(47701),r=n.n(e),i=n(39630),o=n(96483),s=n(76369),c=n(51331);class u{constructor(t){this.block=t,this.amount=null,this.isCustomAmount=!1,this.interval="one-time",this.initNavigation(),this.handleCustomAmount(),this.handleChosenAmount(),this.block.querySelector(".donations__container").classList.add("loaded")}getNavItem(t){return this.block.querySelector(`.donations__nav-item[data-interval="${t}"]`)}resetSelectedAmount(){const t=this.block.querySelector(".donations__amount.is-selected");t&&t.classList.remove("is-selected")}getDonateButton(){return this.block.querySelector(`.donations__donate-button.${{"one-time":"donations__one-time-item","1 month":"donations__monthly-item","1 year":"donations__annual-item"}[this.interval]}`)}toggleDonateButton(t){const e=this.getDonateButton();t?e.classList.remove("is-disabled"):e.classList.add("is-disabled")}updateUrl(){const t=this.getDonateButton(),e=t.getAttribute("href");this.amount?t.setAttribute("href",(0,o.addQueryArgs)(e,{amount:this.amount,...this.isCustomAmount&&{customAmount:!0}})):t.setAttribute("href",(0,o.removeQueryArgs)(e,"amount","customAmount"))}updateAmountFromCustomAmountInput(){const t=this.block.querySelector(".donations__custom-amount .donations__amount-value"),e=this.block.querySelector(".donations__custom-amount"),n=t.innerHTML;if(!n)return this.amount=null,void this.toggleDonateButton(!1);const r=t.dataset.currency,i=(0,s.Vm)(n,r);i&&i>=(0,s.hj)(r)?(e.classList.remove("has-error"),this.amount=i,this.toggleDonateButton(!0)):(e.classList.add("has-error"),this.amount=null,this.toggleDonateButton(!1)),this.updateUrl()}initNavigation(){const t=this.block.querySelectorAll(".donations__nav-item"),e=this.block.querySelector(".donations__tab"),n={"one-time":"is-one-time","1 month":"is-monthly","1 year":"is-annual"},r=t=>{const r=this.interval,i=t.target.dataset.interval;this.interval=i;const o=this.getNavItem(r);o&&o.classList.remove("is-active");const s=this.getNavItem(i);s&&s.classList.add("is-active"),e.classList.remove(n[r]),e.classList.add(n[i]),this.amount=null,this.isCustomAmount=!1,this.resetSelectedAmount(),this.updateUrl(),this.toggleDonateButton(!1)};t.forEach((t=>{t.addEventListener("click",r),t.addEventListener("keydown",r)}));const i=this.getNavItem(this.interval);i&&i.classList.add("is-active"),e.classList.add(n[this.interval])}handleCustomAmount(){const e=this.block.querySelector(".donations__custom-amount .donations__amount-value");if(!e)return;const n=this.block.querySelector(".donations__custom-amount");e.setAttribute("contenteditable",""),e.addEventListener("keydown",(t=>{t.keyCode===i.ENTER&&t.preventDefault()})),e.addEventListener("focus",(()=>{this.resetSelectedAmount(),n.classList.add("is-selected"),this.isCustomAmount||(this.isCustomAmount=!0,this.updateAmountFromCustomAmountInput())})),e.addEventListener("blur",(()=>{this.isCustomAmount&&this.amount&&(e.innerHTML=(0,t.ZP)(this.amount,e.dataset.currency,{symbol:""}))})),e.addEventListener("input",(()=>this.updateAmountFromCustomAmountInput()))}handleChosenAmount(){this.block.querySelectorAll(".donations__amount:not( .donations__custom-amount )").forEach((t=>{t.addEventListener("click",(t=>{this.resetSelectedAmount(),t.target.classList.add("is-selected"),this.amount=t.target.dataset.amount,this.isCustomAmount=!1;const e=this.block.querySelector(".donations__custom-amount");e&&e.classList.remove("has-error"),this.updateUrl();this.getDonateButton().classList.remove("is-disabled")}))})),this.block.querySelectorAll(".donations__donate-button").forEach((t=>t.classList.add("is-disabled")))}}r()((()=>{document.querySelectorAll(".wp-block-jetpack-donations").forEach((t=>new u(t))),(0,c.f)(".donations__donate-button")}))}()}();
1
  /*! For license information please see view.js.LICENSE.txt */
2
+ !function(){var t={8172:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(31354),i=n(64803);function o(t){var e=(0,r.Z)(t);return function(t){return(0,i.Z)(e,t)}}},64803:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function i(t,e){var n,i,o,s,c,u,a=[];for(n=0;n<t.length;n++){if(c=t[n],s=r[c]){for(i=s.length,o=Array(i);i--;)o[i]=a.pop();try{u=s.apply(null,o)}catch(t){return t}}else u=e.hasOwnProperty(c)?e[c]:+c;a.push(u)}return a[0]}},7478:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(8172);function i(t){var e=(0,r.Z)(t);return function(t){return+e({n:t})}}},31354:function(t,e,n){"use strict";var r,i,o,s;function c(t){for(var e,n,c,u,a=[],l=[];e=t.match(s);){for(n=e[0],(c=t.substr(0,e.index).trim())&&a.push(c);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]<r[n]){l.push(u);break}a.push(u)}o[n]||l.push(n),t=t.substr(e.index+n.length)}return(t=t.trim())&&a.push(t),a.concat(l.reverse())}n.d(e,{Z:function(){return c}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function i(t,e){var n;if(!Array.isArray(e))for(e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return n=1,t.replace(r,(function(){var t,r,i,o,s;return t=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(i=arguments[7])&&(i=e[n-1],n++),void 0!==r?e[0]&&"object"==typeof e[0]&&e[0].hasOwnProperty(r)&&(s=e[0][r]):(void 0===t&&(t=n),n++,s=e[t-1]),"f"===o?s=parseFloat(s)||0:"d"===o&&(s=parseInt(s)||0),void 0!==i&&("f"===o?s=s.toFixed(i):"s"===o&&(s=s.substr(0,i))),null!=s?s:"")}))}},2571:function(t){"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&g(t,"error",e,n)}(t,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,n,r){var i,o,s,a;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):d(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function g(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){r.once&&t.removeEventListener(e,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var a=u.length,l=d(u,a);for(n=0;n<a;++n)r(l[n],this,e)}return!0},o.prototype.addListener=function(t,e){return a(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return a(this,t,e,!0)},o.prototype.once=function(t,e){return c(e),this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,i,o,s;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},95949:function(t,e,n){"use strict";var r=n(53566),i=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},69016:function(t,e,n){"use strict";var r=n(53566),i=n(95949),o=n(47574),s=r.rotl32,c=r.sum32,u=r.sum32_5,a=o.ft_1,l=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var d=~~(r/20),g=u(s(i,5),a(d,o,l,f),m,n[r],p[d]);m=f,f=l,l=s(o,30),o=i,i=g}this.h[0]=c(this.h[0],i),this.h[1]=c(this.h[1],o),this.h[2]=c(this.h[2],l),this.h[3]=c(this.h[3],f),this.h[4]=c(this.h[4],m)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(t,e,n){"use strict";var r=n(53566).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},53566:function(t,e,n){"use strict";var r=n(48282),i=n(59503);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function c(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=c(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=c,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),c=0,u=e;c<s.length;c++,u+=4){var a;a="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[c]=a>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,c){var u=0,a=e;return u+=(a=a+r>>>0)<e?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+c>>>0)<c?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,c){return e+r+o+c>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,c,u,a){var l=0,p=e;return l+=(p=p+r>>>0)<e?1:0,l+=(p=p+o>>>0)<o?1:0,l+=(p=p+c>>>0)<c?1:0,t+n+i+s+u+(l+=(p=p+a>>>0)<a?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,c,u,a){return e+r+o+c+a>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},72918:function(t,e,n){"use strict";var r=n(97997),i=n(79497),o=n(57513),s=n.n(o),c=n(83039),u=n(88090),a=n(75565),l=n.n(a),p=n(69016),f=n.n(p),m=n(2571),d=n(702),g=n(16044),h=s()("i18n-calypso"),y="number_format_decimals",b="number_format_thousands_sep",v="messages",w=[function(t){return t}],C={};function _(){L.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function S(t){return Array.prototype.slice.call(t)}function F(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&_("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",S(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&_("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",S(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function O(t,e){return t.dcnpgettext(v,e.context,e.original,e.plural,e.count)}function A(t,e){for(var n=w.length-1;n>=0;n--){var r=w[n](Object.assign({},e)),i=r.context?r.context+""+r.original:r.original;if(t.state.locale[i])return O(t.state.tannin,r)}return null}function L(){if(!(this instanceof L))return new L;this.defaultLocaleSlug="en",this.defaultPluralForms=function(t){return 1===t?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:l()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}L.throwErrors=!1,L.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},L.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},L.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},L.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,g.Z)(t,n,r,i)},L.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},L.prototype.setLocale=function(t){var e,n,r;if(t&&t[""]&&t[""]["key-hash"]){var o=t[""]["key-hash"],s=function(t,e){var n=!1===e?"":String(e);if(void 0!==C[n+t])return C[n+t];var r=f()().update(t).digest("hex");return C[n+t]=e?r.substr(0,e):r},c=function(t){return function(e){return e.context?(e.original=s(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=s(e.original,t),e}};if("sha1"===o.substr(0,4))if(4===o.length)w.push(c(!1));else{var a=o.substr(5).indexOf("-");if(a<0){var l=Number(o.substr(5));w.push(c(l))}else for(var p=Number(o.substr(5,a)),m=Number(o.substr(6+a)),d=p;d<=m;d++)w.push(c(d))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(e=this.state.locale["text directionltr"])||void 0===e?void 0:e[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new u.Z((0,i.Z)({},v,this.state.locale)),this.state.numberFormatSettings.decimal_point=O(this.state.tannin,F([y])),this.state.numberFormatSettings.thousands_sep=O(this.state.tannin,F([b])),this.state.numberFormatSettings.decimal_point===y&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===b&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},L.prototype.getLocale=function(){return this.state.locale},L.prototype.getLocaleSlug=function(){return this.state.localeSlug},L.prototype.isRtl=function(){return"rtl"===this.state.textDirection},L.prototype.addTranslations=function(t){for(var e in t)""!==e&&(this.state.tannin.data.messages[e]=t[e]);this.stateObserver.emit("change")},L.prototype.hasTranslation=function(){return!!A(this,F(arguments))},L.prototype.translate=function(){var t=F(arguments),e=A(this,t);if(e||(e=O(this.state.tannin,t)),t.args){var n=Array.isArray(t.args)?t.args.slice(0):[t.args];n.unshift(e);try{e=d.Z.apply(void 0,(0,r.Z)(n))}catch(t){if(!window||!window.console)return;var i=this.throwErrors?"error":"warn";"string"!=typeof t?window.console[i](t):window.console[i]("i18n sprintf error:",n)}}return t.components&&(e=(0,c.Z)({mixedString:e,components:t.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){e=n(e,t)})),e},L.prototype.reRenderTranslations=function(){h("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},L.prototype.registerComponentUpdateHook=function(t){this.componentUpdateHooks.push(t)},L.prototype.registerTranslateHook=function(t){this.translateHooks.push(t)},e.Z=L},52059:function(t,e,n){"use strict";n.d(e,{Y4:function(){return u}});var r=n(72918),i=n(24575),o=n(53198),s=n(90717),c=new r.Z,u=c.numberFormat.bind(c),a=(c.translate.bind(c),c.configure.bind(c),c.setLocale.bind(c),c.getLocale.bind(c),c.getLocaleSlug.bind(c),c.addTranslations.bind(c),c.reRenderTranslations.bind(c),c.registerComponentUpdateHook.bind(c),c.registerTranslateHook.bind(c),c.state,c.stateObserver,c.on.bind(c),c.off.bind(c),c.emit.bind(c),(0,i.Z)(c),(0,o.Z)(c),(0,s.Z)(c));a.useRtl,a.withRtl},24575:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(42385),i=n(97469),o=n(92201),s=n(31551),c=n(29991),u=n(56245),a=n(79497),l=n(99196),p=n.n(l);function f(t){var e={numberFormat:t.numberFormat.bind(t),translate:t.translate.bind(t)};return function(n){var l,f,m=n.displayName||n.name||"";return f=l=function(l){(0,c.Z)(m,l);var f=(0,u.Z)(m);function m(){var t;(0,i.Z)(this,m);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t=f.call.apply(f,[this].concat(n)),(0,a.Z)((0,s.Z)(t),"boundForceUpdate",t.forceUpdate.bind((0,s.Z)(t))),t}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){t.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){t.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var i=(0,r.Z)({locale:t.getLocaleSlug()},this.props,{},e);return p().createElement(n,i)}}]),m}(p().Component),(0,a.Z)(l,"displayName","Localized("+m+")"),f}}},16044:function(t,e,n){"use strict";function r(t,e,n,r){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+t)?+t:0,o=isFinite(+e)?Math.abs(e):0,s=void 0===r?",":r,c=void 0===n?".":n,u="";return u=(o?function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."),u[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(u[1]||"").length<o&&(u[1]=u[1]||"",u[1]+=new Array(o-u[1].length+1).join("0")),u.join(c)}n.d(e,{Z:function(){return r}})},90717:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(37665),i=n(99196),o=n.n(i),s=n(20036),c=n(94333);function u(t){var e={getCurrentValue:function(){return t.isRtl()},subscribe:function(e){return t.on("change",e),function(){return t.off("change",e)}}};function n(){return(0,s.useSubscription)(e)}var u=(0,c.createHigherOrderComponent)((function(t){return(0,i.forwardRef)((function(e,i){var s=n();return o().createElement(t,(0,r.Z)({},e,{isRtl:s,ref:i}))}))}),"WithRTL");return{useRtl:n,withRtl:u}}},53198:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(27101),i=n(99196),o=n.n(i);function s(t){function e(){var e=t.translate.bind(t);return Object.defineProperty(e,"localeSlug",{get:t.getLocaleSlug.bind(t)}),e}return function(){var n=o().useState(e),i=(0,r.Z)(n,2),s=i[0],c=i[1];return o().useEffect((function(){var n=function(){return c(e)};return t.on("change",n),function(){return t.off("change",n)}}),[]),s}}},59503:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},75565:function(t,e,n){var r=n(2571),i=n(59503);function o(t){if(!(this instanceof o))return new o(t);"number"==typeof t&&(t={max:t}),t||(t={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=t.max||1e3,this.maxAge=t.maxAge||0}t.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];return delete this.cache[t],this._unlink(t,e.prev,e.next),e.value}},o.prototype._unlink=function(t,e,n){this.length--,0===this.length?this.head=this.tail=null:this.head===t?(this.head=e,this.cache[this.head].next=null):this.tail===t?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[e].next=n,this.cache[n].prev=e)},o.prototype.peek=function(t){if(this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return e.value}},o.prototype.set=function(t,e){var n;if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){if((n=this.cache[t]).value=e,this.maxAge&&(n.modified=Date.now()),t===this.head)return e;this._unlink(t,n.prev,n.next)}else n={value:e,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[t]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=t),this.head=t,this.tail||(this.tail=t),e},o.prototype._checkAge=function(t,e){return!(this.maxAge&&Date.now()-e.modified>this.maxAge)||(this.remove(t),this.emit("evict",{key:t,value:e.value}),!1)},o.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},o.prototype.evict=function(){if(this.tail){var t=this.tail,e=this.remove(this.tail);this.emit("evict",{key:t,value:e})}}},48282:function(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},32002:function(t){var e=1e3,n=60*e,r=60*n,i=24*r,o=7*i,s=365.25*i;function c(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,u){u=u||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===a&&isFinite(t))return u.long?function(t){var o=Math.abs(t);if(o>=i)return c(t,o,i,"day");if(o>=r)return c(t,o,r,"hour");if(o>=n)return c(t,o,n,"minute");if(o>=e)return c(t,o,e,"second");return t+" ms"}(t):function(t){var o=Math.abs(t);if(o>=i)return Math.round(t/i)+"d";if(o>=r)return Math.round(t/r)+"h";if(o>=n)return Math.round(t/n)+"m";if(o>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1625:function(t){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var s,c,u=i(t),a=1;a<arguments.length;a++){for(var l in s=Object(arguments[a]))n.call(s,l)&&(u[l]=s[l]);if(e){c=e(s);for(var p=0;p<c.length;p++)r.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u}},88090:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(7478),i={contextDelimiter:"",onMissingKey:null};function o(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},i)this.options[n]=void 0!==e&&n in e?e[n]:i[n]}o.prototype.getPluralForm=function(t,e){var n,i,o,s=this.pluralForms[t];return s||("function"!=typeof(o=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(i)),s=this.pluralForms[t]=o),s(e)},o.prototype.dcnpgettext=function(t,e,n,r,i){var o,s,c;return o=void 0===i?0:this.getPluralForm(t,i),s=n,e&&(s=e+this.options.contextDelimiter+n),(c=this.data[t][s])&&c[o]?c[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)}},76369:function(t,e,n){"use strict";n.d(e,{hj:function(){return s},Vm:function(){return c}});var r=n(56038),i=n(92819);const o={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(o).map((t=>{const{symbol:e}=(0,r.X)(t);return{value:t,label:e===t?t:`${t} ${(0,i.trimEnd)(e,".")}`}}));function s(t){return o[t]}function c(t,e){return t?"number"==typeof t?t:(t=parseFloat(t.replace(new RegExp("\\"+r.M[e].grouping,"g"),"").replace(new RegExp("\\"+r.M[e].decimal,"g"),".")),isNaN(t)?null:t):null}},51331:function(t,e,n){"use strict";function r(t){if("https://subscribe.wordpress.com"===t.origin&&t.data){const e=JSON.parse(t.data);e&&"close"===e.action&&(window.removeEventListener("message",r),tb_remove())}}n.d(e,{f:function(){return i}});const i=t=>{Array.prototype.slice.call(document.querySelectorAll(t)).forEach((t=>{if("true"!==t.getAttribute("data-jetpack-memberships-button-initialized")){try{!function(t){t.addEventListener("click",(e=>{e.preventDefault();const n=t.getAttribute("href");window.scrollTo(0,0),tb_show(null,n+"&display=alternate&TB_iframe=true",null),window.addEventListener("message",r,!1),document.querySelector("#TB_window").classList.add("jetpack-memberships-modal"),window.scrollTo(0,0)}))}(t)}catch(t){console.error("Problem setting up Thickbox",t)}t.setAttribute("data-jetpack-memberships-button-initialized","true")}}))}},82049:function(t,e,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},56038:function(t,e,n){"use strict";n.d(e,{M:function(){return r},X:function(){return i}});var r={AED:{symbol:"د.إ.‏",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.‏",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.‏",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.‏",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.‏",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.‏",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.‏",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.‏",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.‏",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.‏",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£‏",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.‏",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function i(t){return r[t]||{symbol:"$",grouping:",",decimal:".",precision:2}}},33511:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s}});var r=n(66521),i=n(52059),o=n(56038);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(0,o.X)(e);if(!s||isNaN(t))return null;var c=(0,r.Z)({},s,n),u=c.decimal,a=c.grouping,l=c.precision,p=c.symbol,f=t<0?"-":"",m=(0,i.Y4)(Math.abs(t),{decimals:l,thousandsSep:a,decPoint:u});return"".concat(f).concat(p).concat(m)}},83039:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(99196),i=n(14623);function o(t,e){let n,i,s=[];for(let r=0;r<t.length;r++){const o=t[r];if("string"!==o.type){if(void 0===e[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof e[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=e[o.value],i=r;break}s.push(e[o.value])}else s.push(o.value)}if(n){const c=function(t,e){const n=e[t];let r=0;for(let i=t+1;i<e.length;i++){const t=e[i];if(t.value===n.value){if("componentOpen"===t.type){r++;continue}if("componentClose"===t.type){if(0===r)return i;r--}}}throw new Error("Missing closing component token `"+n.value+"`")}(i,t),u=o(t.slice(i+1,c),e),a=(0,r.cloneElement)(n,{},u);if(s.push(a),c<t.length-1){const n=o(t.slice(c+1),e);s=s.concat(n)}}return s=s.filter(Boolean),0===s.length?null:1===s.length?s[0]:(0,r.createElement)(r.Fragment,null,...s)}function s(t){const{mixedString:e,components:n,throwErrors:r}=t;if(!n)return e;if("object"!=typeof n){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because components is not an object`);return e}const s=(0,i.Z)(e);try{return o(s,n)}catch(t){if(r)throw new Error(`Interpolation Error: unable to process \`${e}\` because of error \`${t.message}\``);return e}}},14623:function(t,e,n){"use strict";function r(t){return t.startsWith("{{/")?{type:"componentClose",value:t.replace(/\W/g,"")}:t.endsWith("/}}")?{type:"componentSelfClosing",value:t.replace(/\W/g,"")}:t.startsWith("{{")?{type:"componentOpen",value:t.replace(/\W/g,"")}:{type:"string",value:t}}function i(t){return t.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}n.d(e,{Z:function(){return i}})},57513:function(t,e,n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(77821)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},77821:function(t,e,n){t.exports=function(t){function e(t){let n,i,o,s=null;function c(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!c.enabled)return;const o=c,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,r[0]=e.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let a=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";a++;const i=e.formatters[n];if("function"==typeof i){const e=r[a];t=i.call(o,e),r.splice(a,1),a--}return t})),e.formatArgs.call(o,r);const l=o.log||e.log;l.apply(o,r)}return c.namespace=t,c.useColors=e.useColors(),c.color=e.selectColor(t),c.extend=r,c.destroy=e.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(c),c}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.slice(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(32002),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},11043:function(t,e,n){"use strict";var r=n(1625),i=n(99196);e.useSubscription=function(t){var e=t.getCurrentValue,n=t.subscribe,o=i.useState((function(){return{getCurrentValue:e,subscribe:n,value:e()}}));t=o[0];var s=o[1];return o=t.value,t.getCurrentValue===e&&t.subscribe===n||(o=e(),s({getCurrentValue:e,subscribe:n,value:o})),i.useDebugValue(o),i.useEffect((function(){function t(){if(!i){var t=e();s((function(i){return i.getCurrentValue!==e||i.subscribe!==n||i.value===t?i:r({},i,{value:t})}))}}var i=!1,o=n(t);return t(),function(){i=!0,o()}}),[e,n]),o}},20036:function(t,e,n){"use strict";t.exports=n(11043)},99196:function(t){"use strict";t.exports=window.React},92819:function(t){"use strict";t.exports=window.lodash},94333:function(t){"use strict";t.exports=window.wp.compose},47701:function(t){"use strict";t.exports=window.wp.domReady},39630:function(t){"use strict";t.exports=window.wp.keycodes},96483:function(t){"use strict";t.exports=window.wp.url},1613:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{Z:function(){return r}})},11800:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{Z:function(){return r}})},53886:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(1613);function i(t){if(Array.isArray(t))return(0,r.Z)(t)}},31551:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:function(){return r}})},97469:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},92201:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:function(){return i}})},56245:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(39528),i=n(11818),o=n(31834);function s(t){var e=(0,i.Z)();return function(){var n,i=(0,r.Z)(t);if(e){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return(0,o.Z)(this,n)}}},79497:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},37665:function(t,e,n){"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:function(){return r}})},39528:function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{Z:function(){return r}})},29991:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(2506);function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,r.Z)(t,e)}},11818:function(t,e,n){"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}n.d(e,{Z:function(){return r}})},92021:function(t,e,n){"use strict";function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.d(e,{Z:function(){return r}})},70672:function(t,e,n){"use strict";function r(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],_n=!0,s=!1;try{for(n=n.call(t);!(_n=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);_n=!0);}catch(t){s=!0,i=t}finally{try{_n||null==n.return||n.return()}finally{if(s)throw i}}return o}}n.d(e,{Z:function(){return r}})},81306:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},35227:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},66521:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(79497);function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?Object(arguments[e]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach((function(e){(0,r.Z)(t,e,n[e])}))}return t}},42385:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(79497);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},31834:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(83916),i=n(31551);function o(t,e){if(e&&("object"===(0,r.Z)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(t)}},2506:function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:function(){return r}})},27101:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(11800),i=n(70672),o=n(74983),s=n(81306);function c(t,e){return(0,r.Z)(t)||(0,i.Z)(t,e)||(0,o.Z)(t,e)||(0,s.Z)()}},97997:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(53886),i=n(92021),o=n(74983),s=n(35227);function c(t){return(0,r.Z)(t)||(0,i.Z)(t)||(0,o.Z)(t)||(0,s.Z)()}},83916:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{Z:function(){return r}})},74983:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(1613);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"}(),function(){"use strict";n(82049)}(),function(){"use strict";var t=n(33511),e=n(47701),r=n.n(e),i=n(39630),o=n(96483),s=n(76369),c=n(51331);class u{constructor(t){this.block=t,this.amount=null,this.isCustomAmount=!1,this.interval="one-time",this.initNavigation(),this.handleCustomAmount(),this.handleChosenAmount(),this.block.querySelector(".donations__container").classList.add("loaded")}getNavItem(t){return this.block.querySelector(`.donations__nav-item[data-interval="${t}"]`)}resetSelectedAmount(){const t=this.block.querySelector(".donations__amount.is-selected");t&&t.classList.remove("is-selected")}getDonateButton(){return this.block.querySelector(`.donations__donate-button.${{"one-time":"donations__one-time-item","1 month":"donations__monthly-item","1 year":"donations__annual-item"}[this.interval]}`)}toggleDonateButton(t){const e=this.getDonateButton();t?e.classList.remove("is-disabled"):e.classList.add("is-disabled")}updateUrl(){const t=this.getDonateButton(),e=t.getAttribute("href");this.amount?t.setAttribute("href",(0,o.addQueryArgs)(e,{amount:this.amount,...this.isCustomAmount&&{customAmount:!0}})):t.setAttribute("href",(0,o.removeQueryArgs)(e,"amount","customAmount"))}updateAmountFromCustomAmountInput(){const t=this.block.querySelector(".donations__custom-amount .donations__amount-value"),e=this.block.querySelector(".donations__custom-amount"),n=t.innerHTML;if(!n)return this.amount=null,void this.toggleDonateButton(!1);const r=t.dataset.currency,i=(0,s.Vm)(n,r);i&&i>=(0,s.hj)(r)?(e.classList.remove("has-error"),this.amount=i,this.toggleDonateButton(!0)):(e.classList.add("has-error"),this.amount=null,this.toggleDonateButton(!1)),this.updateUrl()}initNavigation(){const t=this.block.querySelectorAll(".donations__nav-item"),e=this.block.querySelector(".donations__tab"),n={"one-time":"is-one-time","1 month":"is-monthly","1 year":"is-annual"},r=t=>{const r=this.interval,i=t.target.dataset.interval;this.interval=i;const o=this.getNavItem(r);o&&o.classList.remove("is-active");const s=this.getNavItem(i);s&&s.classList.add("is-active"),e.classList.remove(n[r]),e.classList.add(n[i]),this.amount=null,this.isCustomAmount=!1,this.resetSelectedAmount(),this.updateUrl(),this.toggleDonateButton(!1)};t.forEach((t=>{t.addEventListener("click",r),t.addEventListener("keydown",r)}));const i=this.getNavItem(this.interval);i&&i.classList.add("is-active"),e.classList.add(n[this.interval])}handleCustomAmount(){const e=this.block.querySelector(".donations__custom-amount .donations__amount-value");if(!e)return;const n=this.block.querySelector(".donations__custom-amount");e.setAttribute("contenteditable",""),e.addEventListener("keydown",(t=>{t.keyCode===i.ENTER&&t.preventDefault()})),e.addEventListener("focus",(()=>{this.resetSelectedAmount(),n.classList.add("is-selected"),this.isCustomAmount||(this.isCustomAmount=!0,this.updateAmountFromCustomAmountInput())})),e.addEventListener("blur",(()=>{this.isCustomAmount&&this.amount&&(e.innerHTML=(0,t.ZP)(this.amount,e.dataset.currency,{symbol:""}))})),e.addEventListener("input",(()=>this.updateAmountFromCustomAmountInput()))}handleChosenAmount(){this.block.querySelectorAll(".donations__amount:not( .donations__custom-amount )").forEach((t=>{t.addEventListener("click",(t=>{this.resetSelectedAmount(),t.target.classList.add("is-selected"),this.amount=t.target.dataset.amount,this.isCustomAmount=!1;const e=this.block.querySelector(".donations__custom-amount");e&&e.classList.remove("has-error"),this.updateUrl();this.getDonateButton().classList.remove("is-disabled")}))})),this.block.querySelectorAll(".donations__donate-button").forEach((t=>t.classList.add("is-disabled")))}}r()((()=>{document.querySelectorAll(".wp-block-jetpack-donations").forEach((t=>new u(t))),(0,c.f)(".donations__donate-button")}))}()}();
_inc/blocks/editor-beta.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '224b7683fc0257d2453dec896e33b7c1');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wp-a11y', 'wp-annotations', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '22f7379559da09f67dabe899a3acc8bd');
_inc/blocks/editor-beta.js CHANGED
@@ -1,5 +1,5 @@
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
- !function(){var e,t,n,r,a,o,i={64140:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3779:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},77423:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},43445:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},84375:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=o},85812:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}));t.Z=o},2427:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},63425:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));t.Z=o},33802:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},50128:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},59758:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},62859:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},25957:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},96342:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function a(a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,g=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,p=void 0!==j.locale?j.locale:"",d=j.localeOptions||{},y=void 0!==j.separator?j.separator:"",E=void 0!==j.spacer?j.spacer:k?"":" ",_=j.symbols||{},w=2===i?j.standard||"iec":"jedec",f=j.output||"string",c=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],o=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(a))<0,l=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(l)))<0&&(o=0),o>8&&(S>0&&(S+=8-o),o=8),"exponent"===f)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[w][s?"bits":"bytes"][o];else{P=h/(2===i?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(P*=8)>=l&&o<8&&(P/=l,o++);var T=Math.pow(10,o>0?b:0);x[0]=C(P*T)/T,x[0]===l&&o<8&&void 0===j.exponent&&(x[0]=1,o++),v=x[1]=10===i&&1===o?s?"kbit":"kB":t[w][s?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===p?x[0]=x[0].toLocaleString():p.length>0?x[0]=x[0].toLocaleString(p,d):y.length>0&&(x[0]=x[0].toString().replace(".",y)),g&&!1===Number.isInteger(x[0])&&b>0){var A=y||".",N=x[0].toString().split(A),I=N[1]||"",B=I.length,M=b-B;x[0]="".concat(N[0]).concat(A).concat(I.padEnd(B+M,"0"))}return c&&(x[1]=u[o]?u[o]:n[w][o]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===f?x:"object"===f?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(E)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},88617:function(e,t,n){"use strict";var r=n(97997),a=n(79497),o=n(57513),i=n.n(o),s=n(40101),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(92846),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function S(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function j(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return S(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=S(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=S(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!j(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=j(this,e);if(t||(t=S(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},63807:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(88617),a=n(42928),o=n(80975),i=n(24531),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},42928:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(42385),a=n(97469),o=n(92201),i=n(31551),s=n(29991),l=n(56245),c=n(79497),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},92846:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},24531:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(37665),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},80975:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(27101),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},35166:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var a,o=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?g(f(e)):f(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var o=e[r],i=e[r+1],l=e[r+2],c=o<<16|i<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==i?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[c(r>>>16),c(r>>>8&255),c(255&r)];return a.length-=[0,0,2,1][n],a.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return w(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:P,toBase64:b,utob:d,encode:b,encodeURI:v,btou:w,decode:P,noConflict:T,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return b(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},95319:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(74108),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S=e.lineMax,j=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(j++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,j++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=j>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=j-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((j=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(j++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[d]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,j++;u=j>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=j-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(95319),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x,P,T,A,N,I,B,M=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(M=!0),(P=o(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(A,P-1)),M&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(M&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(B=e.push("ordered_list_open","ol",1),1!==v&&(B.attrs=[["start",v]])):B=e.push("bullet_list_open","ul",1),B.map=f=[t,0],B.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(B=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),B.map=m=[t,0],d&&(B.info=e.src.slice(A,P-1)),j=e.tight,S=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=C,e.tight=j,(B=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){N=!0;break}if(N)break;if(d){if((P=o(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(B=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(j=t.md.options.quotes[2],x=t.md.options.quotes[3]):(j=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,j),p+=x.length-1,h.token===n&&(p+=j.length-1),d=(c=i.content).length,S.length=_;continue e}E?S.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var S="",j=0,x=C.length;j<x;j++)C.charCodeAt(j)>127?S+="x":S+=C[j];if(!S.match(c)){var P=_.slice(0,r),T=_.slice(r+1),A=C.match(u);A&&(P.push(A[1]),T.unshift(A[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=f.indexOf("#");-1!==N&&(this.hash=f.substr(N),f=f.slice(0,N));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},26372:function(){},99943:function(){},24018:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(57513),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},52504:function(e,t,n){"use strict";var r=n(62265);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},23698:function(e,t,n){e.exports=n(52504)()},62265:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},31027:function(e,t,n){var r=n(89403);function a(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}a.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=a},50771:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},652:function(e){e.exports={L:1,M:0,Q:3,H:2}},97044:function(e,t,n){var r=n(27280);function a(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}a.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(o)));return new a(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=r.gexp(r.glog(e.get(o))+t);return new a(n,0).mod(e)}},e.exports=a},1596:function(e,t,n){var r=n(31027),a=n(88487),o=n(50771),i=n(83186),s=n(97044);function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=a.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),i.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var a=0;a<this.modules.length;a++)for(var o=1*a,i=0;i<this.modules[a].length;i++){var s=1*i;this.modules[a][i]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=i.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],a=e[n];if(null==this.modules[r][a])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][a+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(e){for(var t=i.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=i.getBCHTypeInfo(n),a=0;a<15;a++){var o=!e&&1==(r>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o}for(a=0;a<15;a++){o=!e&&1==(r>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,a=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>a&1)),i.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--a&&(o++,a=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=a.getRSBlocks(e,t),s=new o,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),i.getLengthInBits(u.mode,e)),u.write(s)}var p=0;for(c=0;c<r.length;c++)p+=r[c].dataCount;if(s.getLengthInBits()>8*p)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*p+")");for(s.getLengthInBits()+4<=8*p&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*p||(s.put(l.PAD0,8),s.getLengthInBits()>=8*p));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,a=0,o=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,p=t[c].totalCount-u;r=Math.max(r,u),a=Math.max(a,p),o[c]=new Array(u);for(var d=0;d<o[c].length;d++)o[c][d]=255&e.buffer[d+n];n+=u;var m=i.getErrorCorrectPolynomial(p),h=new s(o[c],m.getLength()-1).mod(m);l[c]=new Array(m.getLength()-1);for(d=0;d<l[c].length;d++){var f=d+h.getLength()-l[c].length;l[c][d]=f>=0?h.get(f):0}}var g=0;for(d=0;d<t.length;d++)g+=t[d].totalCount;var b=new Array(g),v=0;for(d=0;d<r;d++)for(c=0;c<t.length;c++)d<o[c].length&&(b[v++]=o[c][d]);for(d=0;d<a;d++)for(c=0;c<t.length;c++)d<l[c].length&&(b[v++]=l[c][d]);return b},e.exports=l},88487:function(e,t,n){var r=n(652);function a(e,t){this.totalCount=e,this.dataCount=t}a.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],a.getRSBlocks=function(e,t){var n=a.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,i=0;i<r;i++)for(var s=n[3*i+0],l=n[3*i+1],c=n[3*i+2],u=0;u<s;u++)o.push(new a(l,c));return o},a.getRsBlockTable=function(e,t){switch(t){case r.L:return a.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return a.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return a.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return a.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=a},27280:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},89403:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},83186:function(e,t,n){var r=n(89403),a=n(97044),o=n(27280),i=0,s=1,l=2,c=3,u=4,p=5,d=6,m=7,h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;h.getBCHDigit(t)-h.getBCHDigit(h.G15)>=0;)t^=h.G15<<h.getBCHDigit(t)-h.getBCHDigit(h.G15);return(e<<10|t)^h.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;h.getBCHDigit(t)-h.getBCHDigit(h.G18)>=0;)t^=h.G18<<h.getBCHDigit(t)-h.getBCHDigit(h.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return h.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case i:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case m:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new a([1],0),n=0;n<e;n++)t=t.multiply(new a([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var a=0;a<t;a++){for(var o=0,i=e.isDark(r,a),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)a+l<0||t<=a+l||0==s&&0==l||i==e.isDark(r+s,a+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(a=0;a<t-1;a++){var c=0;e.isDark(r,a)&&c++,e.isDark(r+1,a)&&c++,e.isDark(r,a+1)&&c++,e.isDark(r+1,a+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(a=0;a<t-6;a++)e.isDark(r,a)&&!e.isDark(r,a+1)&&e.isDark(r,a+2)&&e.isDark(r,a+3)&&e.isDark(r,a+4)&&!e.isDark(r,a+5)&&e.isDark(r,a+6)&&(n+=40);for(a=0;a<t;a++)for(r=0;r<t-6;r++)e.isDark(r,a)&&!e.isDark(r+1,a)&&e.isDark(r+2,a)&&e.isDark(r+3,a)&&e.isDark(r+4,a)&&!e.isDark(r+5,a)&&e.isDark(r+6,a)&&(n+=40);var u=0;for(a=0;a<t;a++)for(r=0;r<t;r++)e.isDark(r,a)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=h},93527:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var a=["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"],o=["value","size","level","bgColor","fgColor","includeMargin","imageSettings"],i=["renderAs"];function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var a=k(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=n(99196),w=(n(23698),n(1596)),_=n(652);function C(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var S={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var a=null;e.forEach((function(o,i){if(!o&&null!==a)return n.push("M".concat(a+t," ").concat(r+t,"h").concat(i-a,"v1H").concat(a+t,"z")),void(a=null);if(i!==e.length-1)o&&null===a&&(a=i);else{if(!o)return;null===a?n.push("M".concat(i+t,",").concat(r+t," h1v1H").concat(i+t,"z")):n.push("M".concat(a+t,",").concat(r+t," h").concat(i+1-a,"v1H").concat(a+t,"z"))}}))})),n.join("")}function x(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function P(e,t){var n=e.imageSettings,r=e.size,a=e.includeMargin;if(null==n)return null;var o=a?4:0,i=t.length+2*o,s=Math.floor(.1*r),l=i/r,c=(n.width||s)*l,u=(n.height||s)*l,p=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,m=null;if(n.excavate){var h=Math.floor(p),f=Math.floor(d);m={x:h,y:f,w:Math.ceil(c+p-h),h:Math.ceil(u+d-f)}}return{x:p,y:d,h:u,w:c,excavation:m}}var T=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),A=function(e){h(n,e);var t=g(n);function n(){var e;p(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return y(v(e=t.call.apply(t,[this].concat(a))),"_canvas",void 0),y(v(e),"_image",void 0),y(v(e),"state",{imgLoaded:!1}),y(v(e),"handleImageLoad",(function(){e.setState({imgLoaded:!0})})),e}return m(n,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,o=e.fgColor,i=e.includeMargin,s=e.imageSettings,l=new w(-1,_[r]);if(l.addData(C(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var p=l.modules;if(null===p)return;var d=i?4:0,m=p.length+2*d,h=P(this.props,p);null!=s&&null!=h&&null!=h.excavation&&(p=x(p,h.excavation));var f=window.devicePixelRatio||1;c.height=c.width=n*f;var g=n/m*f;u.scale(g,g),u.fillStyle=a,u.fillRect(0,0,m,m),u.fillStyle=o,T?u.fill(new Path2D(j(p,d))):p.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=h&&u.drawImage(this._image,h.x+d,h.y+d,h.w,h.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),o=(t.includeMargin,t.imageSettings),i=u(t,a),l=c({height:n,width:n},r),p=null,d=o&&o.src;return null!=o&&null!=d&&(p=E.createElement("img",{src:d,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),E.createElement(E.Fragment,null,E.createElement("canvas",s({style:l,height:n,width:n,ref:function(t){return e._canvas=t}},i)),p)}}]),n}(E.PureComponent);y(A,"defaultProps",S);var N=function(e){h(n,e);var t=g(n);function n(){return p(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,i=e.fgColor,l=e.includeMargin,c=e.imageSettings,p=u(e,o),d=new w(-1,_[r]);d.addData(C(t)),d.make();var m=d.modules;if(null===m)return null;var h=l?4:0,f=m.length+2*h,g=P(this.props,m),b=null;null!=c&&null!=g&&(null!=g.excavation&&(m=x(m,g.excavation)),b=E.createElement("image",{xlinkHref:c.src,height:g.h,width:g.w,x:g.x+h,y:g.y+h,preserveAspectRatio:"none"}));var v=j(m,h);return E.createElement("svg",s({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},p),E.createElement("path",{fill:a,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),E.createElement("path",{fill:i,d:v}),b)}}]),n}(E.PureComponent);y(N,"defaultProps",S);var I=function(e){var t=e.renderAs,n=u(e,i),r="svg"===t?N:A;return E.createElement(r,n)};I.defaultProps=c({renderAs:"canvas"},S),e.exports=I},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},24700:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=a(o),r=a(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},2723:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),j=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},44780:function(e,t,n){"use strict";var r=n(74579),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=(0,o.assign)(s,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},62309:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),i=n.n(o),s=n(23698),l=n.n(s),c=n(99196),u=n.n(c),p=n(89105),d=n.n(p),m=n(65736);const __=m.__;class h extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,o=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(c.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}i()(h,"propTypes",{className:l().string,width:l().number,height:l().number,showText:l().bool,logoColor:l().string}),i()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=h},3190:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(99196),a=n.n(r),o=n(93527),i=n.n(o);function s(e){let{value:t="https://jetpack.com",bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c="canvas",size:u=248}=e;return a().createElement(i(),{value:t,size:u,bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c})}},52104:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;var a;"undefined"!=typeof window&&(r=null===(a=window.Initial_State)||void 0===a?void 0:a.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return r}})},62369:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Ug:function(){return o.Ug},aQ:function(){return o.aQ},M6:function(){return o.M6},Wp:function(){return o.Wp},OZ:function(){return i.Z},o_:function(){return s.Z},T:function(){return l.Z},Qq:function(){return c.Qq},X1:function(){return c.X1},_D:function(){return c._D},Rl:function(){return c.Rl},FK:function(){return c.FK},HD:function(){return c.HD},m3:function(){return c.m3}});var r=n(77873),a=n(95803),o=n(73063),i=n(68347),s=n(29320),l=n(81408),c=n(53325)},77873:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},68347:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(77873);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},95803:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},53325:function(e,t,n){"use strict";n.d(t,{Qq:function(){return u},X1:function(){return p},_D:function(){return d},Rl:function(){return m},FK:function(){return f},HD:function(){return g},m3:function(){return b}});var r=n(92819),a=n(96483),o=n(65736),i=n(73063),s=n(77873),l=n(68347),c=n(95803);const __=o.__;function u(e){let{planSlug:t,plan:n,postId:o,postType:s}=e;const l=(0,r.startsWith)(t,"jetpack_")?t:(0,r.get)(n,["path_slug"]),u=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/admin.php`,{page:"gutenberg-edit-site",postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,i.Wp)()?(0,a.addQueryArgs)("/"+(0,r.compact)([e,s,(0,c.Z)(),o]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:o,plan_upgraded:1})})();return(0,i.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):l&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${l}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,l.Z)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,l.Z)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function f(){return(0,r.get)((0,s.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,r.map)(h,"name").includes(e),b=e=>(0,r.head)((0,r.filter)(h,(t=>{let{name:n}=t;return n===e})))},29320:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(68347);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},73063:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s},aQ:function(){return l}});var r=n(77873);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}function l(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_coming_soon)&&void 0!==e&&e}},81408:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(94333);t.Z=e=>(0,o.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},97662:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},97334:function(e,t,n){"use strict";var r=n(97662),a=n(44780);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},45260:function(e,t,n){"use strict";var r=n(76750);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},10143:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},5305:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(82641),p=n(10143);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,S=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{variant:"secondary",type:"submit"},__("Preview","jetpack")))),j=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},j,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,variant:"primary",className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():S)}))},82641:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},82450:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(45260),o=n(5305),i=n(82641),s=n(35338);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},34810:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(35338),s=n(69755);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},67986:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},51421:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},84388:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(67986),g=n(51421),b=n(78833);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},78833:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(84388),s=n(5160),l=n(35338);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},33323:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},11920:function(e,t,n){"use strict";var r=n(76750);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},81632:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(92373);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},86028:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},75518:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},92373:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},52982:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(81632),o=n(86028),i=n(75518);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},21906:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(33323),d=n(52982),m=n(92373),h=n(18983);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),S=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),j={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:S,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:j,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},45504:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},37563:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(11920),o=n(21906),i=n(45504),s=n(57361),l=n(61365);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},57361:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92373);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),S={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g}))}},18983:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},92921:function(e,t,n){"use strict";var r=n(76750);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},66266:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(62474);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},68855:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(76750);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},65495:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(12116),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(49971),h=n(92921),f=n(32684),g=n(92541),b=n(4673),v=n(90117),k=n(66266);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:P,style:T,url:A}=C,[N,I]=(0,o.useState)(A),[B,M]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{A&&b.lR!==A&&"link"!==T&&(0,v.Z)(A,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(N);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),M(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:N||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:P});return`${A}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),H=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let V=n;return A&&!B&&(V+=` calendly-style-${T}`),(0,o.createElement)("div",{className:V},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:N,isEditingUrl:B,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:M})),A&&!B?"inline"===T?$:H:U)}))},49971:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},4673:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(92921),i=n(68855),s=n(65495),l=n(49971),c=n(60035),u=n(92541),p=n(35338);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},60035:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},92541:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},40465:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},9095:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},62731:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(9095);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{variant:"secondary",onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},92039:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(62731),c=n(68363);const __=s.__,u=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM plugin is installed but has an invalid version.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Please update to the latest version of the Jetpack CRM plugin to integrate your contact form with your CRM.","jetpack")),m=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(i.Button,{variant:"secondary",icon:(0,r.createElement)(i.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},h=e=>{let{installAndActivateCRMPlugin:t,isInstalling:n}=e,a=(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Install Jetpack CRM","jetpack"));return n&&(a=(0,r.createElement)(m,null)),(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("You can save contacts from Jetpack contact forms in Jetpack CRM.","jetpack"),(0,r.createElement)("br",null),a))},f=e=>{let{activateCRMPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("You already have the Jetpack CRM plugin installed, but it’s not activated.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(m,{isActivating:!0}),!n&&(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Activate the Jetpack CRM plugin","jetpack")))},g=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i,onCRMPluginClick:s,isInstalling:l}=e;const m=o().coerce(t.crm_version);if(t.crm_installed&&!m)return(0,r.createElement)(p,null);if(t.crm_installed&&o().lt(m,"4.9.1"))return(0,r.createElement)(d,null);let b=u.NOT_INSTALLED;return t.crm_active?b=u.ACTIVE:t.crm_installed&&(b=u.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},u.ACTIVE===b&&(0,r.createElement)(g,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),u.INSTALLED===b&&(0,r.createElement)(f,{activateCRMPlugin:()=>s(c.bu,"zero-bs-crm/ZeroBSCRM"),isInstalling:l}),u.NOT_INSTALLED===b&&(0,r.createElement)(h,{installAndActivateCRMPlugin:()=>s(c.yX,"zero-bs-crm"),isInstalling:l}))}},79168:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(92039);const __=s.__,c=(e,t,n)=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((n=>{if(n.error)throw n.message;e(!1),t(n)})).catch((()=>e(!0))).finally((()=>n(!1)))},u=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,o]=(0,r.useState)(!0),[s,l]=(0,r.useState)(!1),[p,d]=(0,r.useState)(),[m,h]=(0,r.useState)(!1),f=(0,r.useCallback)(((e,t)=>{h(!0),e(t).catch((()=>{l(!0)})).finally((()=>{h(!1),o(!0),c(l,d,o)}))}),[h,l,o]);return(0,r.useEffect)((()=>{c(l,d,o)}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(u,{isFetchingCRMData:a,hasCRMDataError:s,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n,isInstalling:m,onCRMPluginClick:f})))}},60618:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(68919),c=n(65249);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},78530:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(68919),c=n(13003),u=n(70041);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
  __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},65249:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(5160),l=n(13003),c=n(70041);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},70041:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},68919:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},11898:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(68919),l=n(77744),c=n(65249);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},70627:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(68919),s=n(65249);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},13003:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>t({width:e})},e,"%")))))}},52653:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3779),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(68919),p=n(65249);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},12710:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},15521:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(92819),i=n(68363),s=n(12414),l=n(80587);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},12414:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},80587:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(62369),o=n(55609),i=n(65736),s=n(68363),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{variant:"secondary",icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},91483:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(12710),s=n(15521);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},77744:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},76450:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(40465);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],u={attributes:{...l.Z},supports:{html:!1},save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)},p={attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)};t.Z=[u,p]},23876:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(62369),g=n(39403),b=n(65842),v=n(79168),k=n(91483);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c,canUser:u}=e("core"),p=i(t.clientId),d=s("author"),m=d&&c(d)&&c(d).email,h=s("title"),f=u("create","plugins");return{blockType:n&&n(t.name),canUserInstallPlugins:f,defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:p,hasInnerBlocks:p.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:h,postAuthorEmail:m}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:S,className:j,blockType:x,variations:P,defaultVariation:T,canUserInstallPlugins:A}=e;const{to:N,subject:I,customThankyou:B,customThankyouHeading:M,customThankyouMessage:R,customThankyouRedirect:L,jetpackCRM:Z}=t,[D,F]=(0,r.useState)(!1),O=i()(j,"jetpack-contact-form"),z=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,z(r))})),U=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,z(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||U(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===I&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,I,o,c,n]);const $=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),H=e=>{if(0===e.target.value.length)return F(!1),void n({to:p});const t=e.target.value.split(",").map($).filter(Boolean);t&&t.length&&F(t)},V=e=>{F(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==I?I:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${S}-email-${D&&D.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:H,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${S}-email-error`},(()=>{if(D){if(1===D.length)return D[0]&&D[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
@@ -7,7 +7,7 @@ __("%s is not a valid email address.","jetpack"),D[0].email):D[0];if(2===D.lengt
7
  /* translators: placeholders are email addresses. */
8
  __("%1$s and %2$s are not a valid email address.","jetpack"),D[0].email,D[1].email);const e=D.map((e=>e.email));return(0,l.sprintf)(
9
  /* translators: placeholder is a list of email addresses. */
10
- __("%s are not a valid email address.","jetpack"),e.join(", "))}return null})()),(0,r.createElement)(h.TextControl,{label:__("Email subject line","jetpack"),value:t,placeholder:__("Enter a subject","jetpack"),onChange:e=>n({subject:e}),help:__("Choose a subject line that you recognize as an email from your website.","jetpack")}),(0,r.createElement)(h.SelectControl,{label:__("On Submission","jetpack"),value:B,options:[{label:__("Show a summary of submitted fields","jetpack"),value:""},{label:__("Show a custom text message","jetpack"),value:"message"},{label:__("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:e=>n({customThankyou:e})}),"redirect"!==B&&(0,r.createElement)(h.TextControl,{label:__("Message Heading","jetpack"),value:M,placeholder:__("Message Sent","jetpack"),onChange:e=>n({customThankyouHeading:e})}),"message"===B&&(0,r.createElement)(h.TextareaControl,{label:__("Message Text","jetpack"),value:R,placeholder:__("Thank you for your submission!","jetpack"),onChange:e=>n({customThankyouMessage:e})}),"redirect"===B&&(0,r.createElement)(h.BaseControl,{label:__("Redirect Address","jetpack"),id:`contact-form-${S}-thankyou-url`},(0,r.createElement)(m.URLInput,{id:`contact-form-${S}-thankyou-url`,value:L,className:"jetpack-contact-form__thankyou-redirect-url",onChange:e=>n({customThankyouRedirect:e})})))};return!E&&u.registerBlockVariation?(0,r.createElement)("div",{className:O},(0,r.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,a.get)(x,["icon","src"]),label:(0,a.get)(x,["title"]),instructions:__("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:P,allowSkip:!0,onSelect:function(){U(arguments.length>0&&void 0!==arguments[0]?arguments[0]:T)}})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m.BlockControls,null,(0,r.createElement)(h.ToolbarGroup,null,(0,r.createElement)(h.ToolbarItem,null,(()=>(0,r.createElement)(h.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(h.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("Edit Form Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==d.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,r.createElement)(h.Icon,{icon:"edit"})}))(t,n)},renderContent:()=>G()}))))),(0,r.createElement)(m.InspectorControls,null,(0,r.createElement)(h.PanelBody,{title:__("Form Settings","jetpack")},G()),!(0,f.Wp)()&&(0,r.createElement)(r.Fragment,null,A&&(0,r.createElement)(v.Z,{jetpackCRM:Z,setAttributes:n}),(0,r.createElement)(k.Z,null))),(0,r.createElement)("div",{className:O},(0,r.createElement)(m.InnerBlocks,{allowedBlocks:y,templateInsertUpdatesSelection:!1})))}))},35849:function(e,t,n){"use strict";n.d(t,{u2:function(){return y},Xd:function(){return w},Nk:function(){return x}});var r=n(69307),a=n(65736),o=n(4981),i=n(55609),s=n(52175),l=n(23876),c=n(40465),u=n(65842),p=n(76450),d=n(62391),m=n(52653),h=n(70627),f=n(60618),g=n(11898),b=n(5160),v=n(35338),k=n(78530);const __=a.__,_x=a._x,y="contact-form",E=(0,b.Z)((0,r.createElement)(i.Path,{d:"M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"})),w={title:__("Form","jetpack"),description:__("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:E,foreground:(0,v.m)()},keywords:[_x("email","block search term","jetpack"),_x("feedback","block search term","jetpack"),_x("contact form","block search term","jetpack")],supports:{color:{link:!0,gradients:!0},html:!1,spacing:{padding:!0,margin:!0}},attributes:c.Z,edit:l.Z,save:()=>{const e=s.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(s.InnerBlocks.Content,null))},variations:u.Z,category:"grow",transforms:d.Z,deprecated:p.Z},_={category:"grow",parent:["jetpack/contact-form"],supports:{reusable:!1,html:!1},attributes:{label:{type:"string",default:null},required:{type:"boolean",default:!1},options:{type:"array",default:[]},defaultValue:{type:"string",default:""},placeholder:{type:"string",default:""},id:{type:"string",default:""},width:{type:"number",default:100}},transforms:{to:[{type:"block",blocks:["jetpack/field-text"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-text",e)},{type:"block",blocks:["jetpack/field-name"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-name",e)},{type:"block",blocks:["jetpack/field-email"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-email",e)},{type:"block",blocks:["jetpack/field-url"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-url",e)},{type:"block",blocks:["jetpack/field-date"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-date",e)},{type:"block",blocks:["jetpack/field-telephone"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-telephone",e)},{type:"block",blocks:["jetpack/field-textarea"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-textarea",e)},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-checkbox-multiple",e)},{type:"block",blocks:["jetpack/field-radio"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-radio",e)},{type:"block",blocks:["jetpack/field-select"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-select",e)},{type:"block",blocks:["jetpack/field-consent"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-consent",e)}]},save:()=>null,example:{}},C=e=>{let{attributes:t,name:n}=e;return null===t.label?(0,o.getBlockType)(n).title:t.label},S=e=>t=>(0,r.createElement)(m.Z,{type:e,label:C(t),required:t.attributes.required,setAttributes:t.setAttributes,isSelected:t.isSelected,defaultValue:t.attributes.defaultValue,placeholder:t.attributes.placeholder,id:t.attributes.id,width:t.attributes.width}),j=e=>t=>(0,r.createElement)(g.Z,{label:C(t),required:t.attributes.required,options:t.attributes.options,setAttributes:t.setAttributes,type:e,isSelected:t.isSelected,id:t.attributes.id,width:t.attributes.width}),x=[{name:"field-text",settings:{..._,title:__("Text","jetpack"),description:__("When you need just a small amount of text, add a text input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:S("text")}},{name:"field-name",settings:{..._,title:__("Name","jetpack"),description:__("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),edit:S("text")}},{name:"field-email",settings:{..._,title:__("Email","jetpack"),keywords:[__("e-mail","jetpack"),__("mail","jetpack"),"email"],description:__("Want to reply to folks? Add an email address input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),edit:S("email")}},{name:"field-url",settings:{..._,title:__("Website","jetpack"),keywords:["url",__("internet page","jetpack"),"link"],description:__("Add an address input for a website.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"})),edit:S("url")}},{name:"field-date",settings:{..._,title:__("Date Picker","jetpack"),keywords:[__("Calendar","jetpack"),_x("day month year","block search term","jetpack")],description:__("The best way to set a date. Add a date picker.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zm0-12H5V5h14v2zM7 11h5v5H7z"})),edit:S("text")}},{name:"field-telephone",settings:{..._,title:__("Phone Number","jetpack"),keywords:[__("Phone","jetpack"),__("Cellular phone","jetpack"),__("Mobile","jetpack")],description:__("Add a phone number input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),edit:S("tel")}},{name:"field-textarea",settings:{..._,title:__("Message","jetpack"),keywords:[__("Textarea","jetpack"),"textarea",__("Multiline text","jetpack")],description:__("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:e=>(0,r.createElement)(h.Z,{label:C(e),required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,placeholder:e.attributes.placeholder,id:e.attributes.id,width:e.attributes.width})}},{name:"field-checkbox",settings:{..._,title:__("Checkbox","jetpack"),keywords:[__("Confirm","jetpack"),__("Accept","jetpack")],description:__("Add a single checkbox.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"})),edit:e=>(0,r.createElement)(f.Z,{label:e.attributes.label,required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,id:e.attributes.id,width:e.attributes.width}),attributes:{..._.attributes,label:{type:"string",default:""}}}},{name:"field-consent",settings:{..._,title:__("Consent","jetpack"),keywords:[__("Consent","jetpack")],description:__("Ask for consent","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"m81 370h142v40h-142zm0-39h142v-40h-142zm0-79h245v-40h-245zm378 260h-40c0-40.253906-32.746094-73-73-73s-73 32.746094-73 73h-40c0-42.085938 23.128906-78.867188 57.34375-98.3125-11.40625-13.023438-18.34375-30.054688-18.34375-48.6875 0-40.804688 33.195312-74 74-74s74 33.195312 74 74c0 18.632812-6.9375 35.664062-18.34375 48.6875 34.214844 19.445312 57.34375 56.226562 57.34375 98.3125zm-113-113c18.746094 0 34-15.253906 34-34s-15.253906-34-34-34-34 15.253906-34 34 15.253906 34 34 34zm-286 73h138.316406c-3.460937 12.757812-5.316406 26.164062-5.316406 40h-133c-33.085938 0-60-26.914062-60-60v-392c0-33.085938 26.914062-60 60-60h203.757812l142.132813 142.855469v125.210937c-12.042969-7.476562-25.453125-12.765625-39.890625-15.324218v-81.632813h-71.109375c-33.085937 0-60-26.914063-60-60v-71.109375h-174.890625c-11.027344 0-20 8.972656-20 20v392c0 11.027344 8.972656 20 20 20zm234.890625-340.890625h42.972656l-62.972656-63.234375v43.234375c0 11.03125 8.96875 20 20 20zm0 0"}),24,25,"-26 0 512 512"),attributes:{..._.attributes,label:{type:"string",default:__("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:__("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:__("Can we send you an email from time to time?","jetpack")}},edit:e=>{let{attributes:t,isSelected:n,setAttributes:a}=e;const{id:o,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c}=t;return(0,r.createElement)(k.Z,{id:o,isSelected:n,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c,setAttributes:a})}}},{name:"field-checkbox-multiple",settings:{..._,title:__("Checkbox Group","jetpack"),keywords:[__("Choose Multiple","jetpack"),__("Option","jetpack")],description:__("People love options. Add several checkbox items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"})),edit:j("checkbox"),attributes:{..._.attributes,label:{type:"string",default:"Choose several"}}}},{name:"field-radio",settings:{..._,title:__("Radio","jetpack"),keywords:[__("Choose","jetpack"),__("Select","jetpack"),__("Option","jetpack")],description:__("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,r.createElement)(i.Circle,{cx:"12",cy:"12",r:"5"}))),edit:j("radio"),attributes:{..._.attributes,label:{type:"string",default:"Choose one"}}}},{name:"field-select",settings:{..._,title:__("Select","jetpack"),keywords:[__("Choose","jetpack"),__("Dropdown","jetpack"),__("Option","jetpack")],description:__("Compact, but powerful. Add a select box with several items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:j("select"),attributes:{..._.attributes,label:{type:"string",default:"Select one"}}}}]},62391:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=(e,t,n)=>{const r=n.match(new RegExp(`\\[${e}[^\\]]* ${t}="([^"]*)"`,"im"));if(r&&r.length)return r[1];const a=n.match(new RegExp(`\\[${e}[^\\]]* ${t}='([^']*)'`,"im"));if(a&&a.length)return a[1];const o=n.match(new RegExp(`\\[${e}[^\\]]* ${t}=([^\\s]*)\\s`,"im"));return!(!o||!o.length)&&o[1]},s={root:{},innerBlocks:[]};t.Z={from:[{type:"raw",priority:1,isMatch:e=>!("P"!==e.nodeName||!(/\[contact-form(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[contact-field(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[\/contact-form]/g.test(e.textContent))),transform:e=>{const t=e.textContent.replace("<br>","");if(t.includes("[contact-form")&&(s.root={},s.innerBlocks=[],s.root=(e=>{const t={to:i("contact-form","to",e),subject:i("contact-form","subject",e),submitButtonText:i("contact-form","submit_button_text",e)};return{blockName:"jetpack/contact-form",attrs:(0,r.pickBy)(t,r.identity)}})(t)),t.includes("[contact-field")){const e=t.match(/(\[contact-field[\s\S]*?\/?])/g);e&&e.length>0&&e.forEach((e=>{s.innerBlocks.push((e=>{const t={label:i("contact-field","label",e),placeholder:i("contact-field","placeholder",e),required:i("contact-field","required",e),options:i("contact-field","options",e)},n=(e=>{const t={text:"jetpack/field-text",url:"jetpack/field-text",textarea:"jetpack/field-textarea",radio:"jetpack/field-radio",checkbox:"jetpack/field-checkbox","checkbox-multiple":"jetpack/field-checkbox-multiple",select:"jetpack/field-select",email:"jetpack/field-email",name:"jetpack/field-name",default:"jetpack/field-text"};return t[e]?t[e]:t.default})(i("contact-field","type",e));return t.options&&(t.options=t.options.split(",")),(0,a.createBlock)(n,(0,r.pickBy)(t,r.identity))})(e))}))}if(t.includes("[/contact-form]")){s.innerBlocks.push((0,a.createBlock)("jetpack/button",{element:"button",text:s.root.attrs.submitButtonText||__("Contact Us","jetpack")}));return(0,a.createBlock)(s.root.blockName,s.root.attrs,s.innerBlocks)}return!1}}]}},65842:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(62369),i=n(65736),s=n(55609),l=n(5160),c=n(35338);const __=i.__,u=(0,a.compact)([{name:"contact-form",title:__("Contact Form","jetpack"),description:__("Add a contact form to your page.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M21.99 8c0-.72-.37-1.35-.94-1.7l-8.04-4.71c-.62-.37-1.4-.37-2.02 0L2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-11.05 4.34l-7.2-4.5 7.25-4.25c.62-.37 1.4-.37 2.02 0l7.25 4.25-7.2 4.5c-.65.4-1.47.4-2.12 0z"}),48,48,"-4 -4 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-textarea",{}],["jetpack/button",{text:__("Contact Us","jetpack"),element:"button"}]]},!(0,o.Wp)()&&{name:"newsletter-form",title:__("Newsletter Sign-up","jetpack"),description:__("A simple way to collect information from folks visiting your site.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M37.9999 7.59998C49.3999 7.59998 68.3999 26.6 68.3999 26.6V68.4H7.59985V26.6C7.59985 26.6 26.5999 7.59998 37.9999 7.59998ZM64.5999 63.536L50.4259 52.44L64.5999 41.8L62.9659 40.394L54.3779 45.334L55.2899 28.956L21.9639 26.98L20.2159 44.232L12.6539 40.622L11.3999 41.8L25.5739 52.44L12.5019 63.27L14.0219 64.904L37.9999 49.4L62.8139 65.17L64.5999 63.536Z"}),48,48,"-6 -6 92 92"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-consent",{}],["jetpack/button",{text:__("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:__("RSVP Form","jetpack"),description:__("Add an RSVP form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M10 9V7.41c0-.89-1.08-1.34-1.71-.71L3.7 11.29c-.39.39-.39 1.02 0 1.41l4.59 4.59c.63.63 1.71.19 1.71-.7V14.9c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Attending?","jetpack"),required:!0,options:[__("Yes","jetpack"),__("No","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:__("A new RSVP from your website","jetpack")}},{name:"registration-form",title:__("Registration Form","jetpack"),description:__("Add a Registration form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.34 15.02c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95zm2.12-10.61L17 7.95l-4.95 4.95-3.54-3.54 4.95-4.95zm6.95 11l-2.12-2.12c-.18-.18-.44-.29-.7-.29h-.27l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2h-.42c-.27 0-.52.11-.71.29l-2.12 2.12c-.37.38-.58.89-.58 1.42V20c0 1.1.9 2 2 2h14c1.1 0 2-.89 2-2v-3.17c0-.53-.21-1.04-.59-1.42z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{label:__("Phone Number","jetpack")}],["jetpack/field-select",{label:__("How did you hear about us?","jetpack"),options:[__("Search Engine","jetpack"),__("Social Media","jetpack"),__("TV","jetpack"),__("Radio","jetpack"),__("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send","jetpack"),element:"button"}]],attributes:{subject:__("A new registration from your website","jetpack")}},{name:"appointment-form",title:__("Appointment Form","jetpack"),description:__("Add an Appointment booking form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{required:!0}],["jetpack/field-date",{label:__("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:__("Time","jetpack"),required:!0,options:[__("Morning","jetpack"),__("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:__("Notes","jetpack")}],["jetpack/button",{text:__("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:__("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:__("Feedback Form","jetpack"),description:__("Add a Feedback form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.03 0 3.8-1.11 4.75-2.75.19-.33-.05-.75-.44-.75H7.69c-.38 0-.63.42-.44.75.95 1.64 2.72 2.75 4.75 2.75z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Please rate our website","jetpack"),required:!0,options:[__("1 - Very Bad","jetpack"),__("2 - Poor","jetpack"),__("3 - Average","jetpack"),__("4 - Good","jetpack"),__("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:__("How could we improve?","jetpack")}],["jetpack/button",{text:__("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:__("New feedback received from your website","jetpack")}}]);t.Z=u},46699:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(25961);const __=i.__;class u extends r.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:a,region:i,postal:u,country:p,linkToGoogleMaps:d},isSelected:m,setAttributes:h}=this.props,f=[e,t,n,a,i,u,p].some((e=>""!==e)),g=o()({"jetpack-address-block":!0,"is-selected":m}),b=(0,r.createElement)(l.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:d,onChange:e=>h({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:g},!m&&f&&(0,c.Z)(this.props),(m||!f)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>h({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>h({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>h({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:a,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>h({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:i,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>h({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:u,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>h({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>h({country:e}),onKeyDown:this.preventEnterKey}),b))}}t.Z=u},40874:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(46699),s=n(25961),l=n(5160);const __=a.__,_x=a._x,c="address",u={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,l.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(o.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:i.Z,save:s.Z}},25961:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:o,region:i,postal:s,country:l}}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),o&&!(i||s)&&(0,r.createElement)("div",{className:"jetpack-address__city"},o),o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__city"},o),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),!o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l))},i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}}=e;let l=o?`+${o},`:"";l=i?`${l}+${i}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${a?`+${a},`:""}${l}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}=e;return[t,n,r,a,o,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(o,e))},28045:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(89105),i=n.n(o);const s=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l}))}},87098:function(e,t,n){"use strict";var r=n(76162),a=n(31747),o=n(65736);const __=o.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),r.Z,(e=>t({email:e})))}},87220:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(87098),s=n(5160),l=n(76162);const __=a.__,_x=a._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.Z,save:l.Z,parent:["jetpack/contact-info"]}},76162:function(e,t,n){"use strict";var r=n(69307),a=n(89453);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(r.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(r.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(r.Fragment,{key:t},e)})))}},38535:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return g},Nk:function(){return b}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(4981),l=n(28045),c=n(5160),u=n(40874),p=n(87220),d=n(41971),m=n(35338);const __=a.__,_x=a._x,h="contact-info",f=(0,c.Z)((0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z"})),g={title:__("Contact Info","jetpack"),description:__("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:f,foreground:(0,m.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,s.createBlock)("core/heading",{content:t.raw.title}),(0,s.createBlock)("jetpack/email",{email:t.raw.email}),(0,s.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,s.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,s.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,s.createBlock)("jetpack/map",{address:t.raw.address})]),(0,s.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:l.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:d.u,settings:d.X}]},32680:function(e,t,n){"use strict";var r=n(65736),a=n(17393),o=n(31747);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},41971:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(32680),s=n(5160),l=n(17393);const __=a.__,_x=a._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.Z,save:l.Z}},17393:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let a=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(i="+"+i)):a=a.substring(1),[o.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},a)]}(t))}},71313:function(e,t){"use strict";t.Z={participants:{type:"array"},showTimestamps:{type:"boolean",default:!1},skipUpload:{type:"boolean",default:!1}}},7086:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.createContext)()},35892:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(69307),a=n(55609),o=n(65736),i=n(4346);const __=o.__,_x=o._x;function s(e){let{className:t,participants:n,onDelete:o}=e;return(0,r.createElement)("div",{className:`${t}__participant-control`},n.map((e=>{let{label:n,slug:s}=e;return(0,r.createElement)("div",{key:`${s}-key`,className:`${t}__participant`},(0,r.createElement)("div",{className:`${t}__participant-label`},(0,i.iT)(n)),(0,r.createElement)(a.Button,{className:`${t}__remove-participant`,label:__("Remove participant","jetpack"),onClick:()=>o(s),variant:"tertiary",isSmall:!0},_x("Remove","verb: remove item from a list","jetpack")))})))}function l(e){let{participants:t,className:n,onChange:a,onDelete:o}=e;return(0,r.createElement)(s,{className:n,participants:t,onChange:a,onDelete:o})}},97343:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(9818),l=n(35892),c=n(7086),u=n(36129),p=n(69755),d=n(4346);const __=a.__,m=[["jetpack/dialogue"]];t.Z=(0,i.withNotices)((function(e){let{className:t,attributes:n,setAttributes:a,noticeUI:h,clientId:f,noticeOperations:g}=e;const{participants:b=[],showTimestamps:v,skipUpload:k}=n,[y,E]=(0,r.useState)(""),{insertBlocks:w}=(0,s.useDispatch)("core/block-editor"),_=(0,r.useCallback)((e=>{a({participants:b.map((t=>t.slug!==e.slug?t:{...t,...e}))})}),[a,b]),C=(0,r.useCallback)((function(e){let{label:t,slug:n}=e;if(!t)return;const r=t.trim();if(null==r||!r.length)return;const o=(0,d.tQ)(b,r);if(o)return o;const i={slug:n||"speaker-"+ +new Date,label:r};return a({participants:[...b,i]}),i}),[b,a]),S=(0,r.useCallback)(a,[a]),j=(0,r.useMemo)((()=>({setAttributes:S,updateParticipants:_,addNewParticipant:C,attributes:{showTimestamps:v}})),[C,S,v,_]);function x(e){g.removeAllNotices(),g.createErrorNotice(e),E(!1)}const P="wp-block-jetpack-conversation";return null!=b&&b.length||k?(0,r.createElement)(c.Z.Provider,{value:j},(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.Panel,null,(0,r.createElement)(i.PanelBody,{title:__("Speakers","jetpack"),className:`${P}__participants`},(0,r.createElement)(l.C,{className:P,participants:b,onDelete:function(e){a({participants:b.filter((t=>{let{slug:n}=t;return n!==e}))})}})))),(0,r.createElement)(o.InnerBlocks,{template:m}))):(0,r.createElement)(i.Placeholder,{label:__("Conversation","jetpack"),instructions:(0,r.createElement)(r.Fragment,null,__("Upload a transcript file or create a conversation with blank content.","jetpack"),(0,r.createElement)("div",null,(0,r.createElement)("em",null,__("Accepted file formats:","jetpack"),(0,r.createElement)("strong",null," ",d.bZ),"."))),icon:(0,r.createElement)(o.BlockIcon,{icon:u.Xu}),notices:h},(0,r.createElement)("div",{className:`${P}__placeholder`},(0,r.createElement)(i.FormFileUpload,{multiple:!1,className:"wp-block-jetpack-slideshow__add-item-button",onChange:function(e){var t,n;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return x(__("Transcript file not found.","jetpack"));if(null!=r&&r.size&&r.size<=0||null==r||!r.size||r.size>d.$n)return x(__("Invalid transcript file size.","jetpack"));if(null!=r&&null!==(n=r.type)&&void 0!==n&&n.length&&"text/plain"!==r.type)return x(__("Invalid transcript file type.","jetpack"));const o=(0,d.Y7)(null==r?void 0:r.name);if(!(0,d.P8)(o))return x(__("Invalid transcript file extension.","jetpack"));E(!0),(0,d.Bt)(r,(function(e,t){let{conversation:n,dialogues:r}=e;if(t)return x(t);a({participants:n.speakers,skipUpload:!(null!=n&&n.length)});const o=r.map((e=>e.slug||e.timestamp?["jetpack/dialogue",e]:["core/paragraph",e])),i=(0,p.Z)(o);w(i,0,f),E(!1)}))},accept:d.bZ,variant:"primary",title:`${__("Accepted file formats:","jetpack")} ${d.bZ}`,disabled:y},__("Upload transcript","jetpack")),(0,r.createElement)(i.Button,{variant:"tertiary",disabled:y,onClick:()=>a({skipUpload:!0})},__("Skip upload","jetpack"))))}))},96464:function(e,t,n){"use strict";var r=n(65736);const __=r.__,a=[{slug:"participant-0",label:"Rosalind"},{slug:"participant-1",label:"Orlando"}],o=[{name:"core/heading",attributes:{content:__("Shakespeare text","jetpack"),level:4}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("O, my dear Orlando, how it grieves me to see thee wear thy heart in a scarf!","jetpack"),timestamp:"00:10"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("It is my arm.","jetpack"),timestamp:"00:15"}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("I thought thy heart had been wounded with the claws of a lion.","jetpack"),timestamp:"00:32"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("Wounded it is, but with the eyes of a lady.","jetpack"),timestamp:"00:37"}}];t.Z={attributes:{participants:a,showTimestamps:!0,className:"is-style-row"},innerBlocks:o}},45452:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(4981),o=n(36129),i=n(69755),s=n(71313),l=n(97343),c=n(28761),u=n(96464);const __=r.__,_x=r._x,p="conversation",d={title:__("Conversation","jetpack"),description:__("Create a transcription of a speech or conversation, with any number of participants, using dialogue blocks.","jetpack"),icon:o.Xu,category:"layout",keywords:[_x("conversation","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("dialogue","block search term","jetpack"),_x("speaker","block search term","jetpack")],supports:{align:!0},attributes:s.Z,example:u.Z,styles:[{name:"row",label:__("Row","jetpack"),isDefault:!0},{name:"column",label:__("Column","jetpack")}],edit:l.Z,save:c.Z,providesContext:{"jetpack/conversation-participants":"participants","jetpack/conversation-showTimestamps":"showTimestamps"},transforms:{from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>{const t=e.map((e=>{let{content:t}=e;return["jetpack/dialogue",{content:t}]}));return(0,a.createBlock)("jetpack/conversation",{},(0,i.Z)(t))}}]}}},28761:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175);function s(e){let{attributes:t}=e;return(0,r.createElement)("div",{className:o()("wp-block-jetpack-conversation",{"show-timestamps":null==t?void 0:t.showTimestamp})},(0,r.createElement)(i.InnerBlocks.Content,null))}},4346:function(e,t,n){"use strict";n.d(t,{ly:function(){return i},tQ:function(){return s},iT:function(){return l},Y7:function(){return c},bZ:function(){return m},$n:function(){return h},P8:function(){return k},Bt:function(){return y}});var r=n(72629),a=n(81975),o=n(65736);const __=o.__;function i(e,t){const n=e.filter((e=>{let{slug:n}=e;return n===t}));return null!=n&&n.length?n[0]:null}function s(e,t){const n=e.filter((e=>{let{label:n}=e;return(null==n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())}));return null!=n&&n.length?n[0]:null}function l(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=null===(t=(0,r.getTextContent)((0,r.create)({html:e})))||void 0===t?void 0:t.trim();return n?(0,a.escapeHTML)(o):o}function c(e){return`.${e.substr(e.lastIndexOf(".")+1)}`}const u=".srt",p=".txt",d=[u,p,".vtt",".sbv"],m=d.join(", "),h=1e5,f=/(.*[^\s])\s{1,}(\d{1,2}(?::\d{1,2}?)+)\s+\n([\s\S]*?(?=\n{2}|$))/,g=/(?:(.*[^\s]):\s+)?(?:\[(\d+(?::\d+)*?(?:\.\d*)?)])?(?:[\s])*?([^\s].+?(?:\n+|$))/,b=[{name:"otter",re:new RegExp(f,"gm"),testRE:new RegExp(f,"g")},{name:"sonix",re:new RegExp(g,"gm"),testRE:new RegExp(g,"g")}],v=/(\d+)\n([\d:,]+)\s+-{2}>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;function k(e){return d.indexOf(e)>=0}function y(e,t){const n=c(null==e?void 0:e.name),r=new FileReader;r.addEventListener("load",(e=>{var r;const a=e.target.result?e.target.result.replace(/\r\n|\r|\n/g,"\n"):null;if(null==a||!a.length)return t({},__("Transcript content is empty","jetpack"));let o={};if(n&&n!==p&&n===u&&(o=function(e){const t={conversation:{speakers:[]},dialogues:[]};let n;for(;null!==(n=v.exec(e));)t.dialogues.push({timestamp:n[2],content:n[4]});return t}(a)),n===p&&(o=function(e){const t={dialogues:[],conversation:{speakers:[]}},n=b.filter((t=>{let{testRE:n}=t;return n.test(e)}));if(null==n||!n.length)return t;const r=n[0];let a;for(;null!=(a=r.re.exec(e));){var o,i,s;const e=a[(null==r||null===(o=r.indexes)||void 0===o?void 0:o.speaker)||1]||"";null!=e&&e.length&&t.conversation.speakers.indexOf(e)<0&&t.conversation.speakers.push(e);const n={content:a[(null==r||null===(i=r.indexes)||void 0===i?void 0:i.content)||3],timestamp:a[(null==r||null===(s=r.indexes)||void 0===s?void 0:s.timestamp)||2],showTimestamp:!0};null!=e&&e.length&&(n.label=e,n.slug=`speaker-${t.conversation.speakers.indexOf(e)}`),t.dialogues.push(n)}return t.conversation.speakers=t.conversation.speakers.map(((e,t)=>({label:e,slug:`speaker-${t}`}))),t}(a)),null===(r=o.dialogues)||void 0===r||!r.length)return t({},__("Transcript format not supported","jetpack"));t(o)})),r.readAsText(e)}},40762:function(e,t){"use strict";t.Z={label:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__participant"},slug:{type:"string"},timestamp:{type:"string",default:"00:00"},showTimestamp:{type:"boolean",default:!1},placeholder:{type:"string"},content:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__content"}}},71353:function(e,t,n){"use strict";n.d(t,{Ev:function(){return m},v$:function(){return g}});n(3779);var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736),l=n(52175),c=n(4346);const __=s.__,u="is-participant-adding",p="is-participant-selecting",d="was-participant-selected";function m(e){let{participants:t,slug:n,onSelect:a}=e;return(0,r.createElement)(i.SelectControl,{label:__("Speaker name","jetpack"),value:n,options:t.map((e=>{let{slug:t,label:n}=e;return{label:(0,c.iT)(n),value:t}})),onChange:e=>a((0,c.ly)(t,e))})}const h=(0,i.withFocusOutside)(class extends r.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return(0,r.createElement)("div",{className:this.props.className},this.props.children)}});function f(e){return{name:"jetpack/conversation-participants",triggerPrefix:"",options:e,getOptionLabel:e=>{let{label:t}=e;return(0,r.createElement)("span",null,(0,c.iT)(t))},getOptionKeywords:e=>{let{label:t}=e;return[t]},getOptionCompletion:e=>({action:"replace",value:e}),popoverProps:{position:"bottom"}}}function g(e){let{className:t,label:n,participant:a,participants:i,transcriptRef:s,onParticipantChange:m,onUpdate:g=(()=>{}),onSelect:b,onAdd:v,onClean:k}=e;const[y,E]=(0,r.useState)("is-participant-ready");function w(){if(!n)return;const e=(0,c.tQ)(i,n);return a&&a.label!==n?e&&e.slug!==a.slug?(E(d),b(e)):(E("was-participant-edited"),g({...a,label:(0,c.iT)(n,!0)})):e?(E(d),b(e)):(v((0,c.iT)(n,!0)),E("was-participant-added"))}const _=(0,r.useMemo)((()=>y?y!==u&&y!==p?[]:[f(i)]:[]),[i,y]);return(0,r.createElement)(h,{className:o()(t,{"has-bold-style":null==n?void 0:n.length,[y]:y}),onFocusOutside:w},(0,r.createElement)(l.RichText,{tagName:"div",value:n,allowedFormats:[],withoutInteractiveFormatting:!0,onChange:function(e){if(null==e||!e.length)return E(u),k();m(e);const t=(0,c.tQ)(i,e);a?a.label===e?E(p):E("is-participant-editing"):E(t?p:u)},placeholder:__("Speaker","jetpack"),keepPlaceholderOnFocus:!0,onSplit:()=>{},onReplace:e=>{setTimeout((()=>{var e;return null==s||null===(e=s.current)||void 0===e?void 0:e.focus()}),10);const t=null==e?void 0:e[0];if(t){const{label:e}=t;return m(e),E(d),b(t)}return w()},autocompleters:_}))}},89996:function(e,t,n){"use strict";n.d(t,{dG:function(){return d},S6:function(){return f}});var r=n(69307),a=n(92819),o=n(55609),i=n(65736),s=n(94978),l=n(98618);const __=i.__,_x=i._x;const c=["hour","min","sec"];function u(e,t){var n,r,a;const o=null===(n=Object.keys(e))||void 0===n?void 0:n[0];if(!o)return t.join(":");let i=String((s=e[o],l="hour"===o?23:59,Math.max(0,Math.min(s,l))));var s,l;return 1===(null===(r=i)||void 0===r?void 0:r.length)?i=`0${i}`:0===(null===(a=i)||void 0===a?void 0:a.length)&&(i="00"),t[c.indexOf(o)]=i,3===t.length&&"00"===t[0]&&t.shift(),t.join(":")}const p=(0,a.debounce)((function(e,t){t((0,l.H)(e))}),250);function d(e){let{value:t,className:n,onChange:a,shortLabel:i=!1,isDisabled:c=!1,duration:d}=e;const[m,h]=(0,r.useState)((0,l.i)(t)),f=t.split(":");return f.length<=2&&f.unshift("00"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${n}__timestamp-controls`},(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__hour`,label:i?_x("Hour","hour (short form)","jetpack"):_x("Hour","hour (long form)","jetpack",0),value:f[0],min:0,max:23,onChange:e=>!c&&a(u({hour:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__minute`,label:i?_x("Min","Short for Minute","jetpack"):__("Minute","jetpack"),value:f[1],min:0,max:59,onChange:e=>!c&&a(u({min:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__second`,label:i?_x("Sec","Short for Second","jetpack"):__("Second","jetpack"),value:f[2],min:0,max:59,onChange:e=>!c&&a(u({sec:e},f)),disabled:c})),(0,r.createElement)(o.RangeControl,{disabled:void 0===d,value:m,className:`${n}__timestamp-range-control`,min:0,max:d,onChange:e=>{h(e),p(e,a)},withInputField:!1,renderTooltipContent:e=>(0,l.H)(e)}))}function m(e){let{className:t,onPlayback:n,value:a}=e;return(0,r.createElement)(o.Button,{className:t,variant:"tertiary",onClick:()=>n((0,l.i)(a))},a)}function h(e){let{className:t,currentTime:n,isTimestampButtonVisible:a,children:i,onChange:s,onToggle:c}=e;return(0,r.createElement)(o.Button,{className:t,isSmall:!0,variant:"tertiary",onClick:()=>{c(!a),a||s((0,l.H)(n),s)}},i)}function f(e){let{className:t,isSelected:n,show:a,value:o,mediaCurrentTime:i=0,onChange:s,onToggle:l,onPlayback:c}=e;return n?a?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}),(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Remove","jetpack"))):(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Add timestamp","jetpack")):a?(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}):null}},48699:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(4981),c=n(9818),u=n(55609),p=n(71353),d=n(89996),m=n(87175),h=n(7086),f=n(57979),g=n(84504),b=n(98618),v=n(4346);const __=i.__,k="core/paragraph";function y(e){let{className:t,attributes:n,setAttributes:a,context:i,onReplace:y,mergeBlocks:E,isSelected:w}=e;const{content:_,label:C,slug:S,placeholder:j,showTimestamp:x,timestamp:P}=n,{mediaSource:T,mediaCurrentTime:A,mediaDuration:N,mediaDomReference:I,isMultipleSelection:B}=(0,c.useSelect)((e=>{const{getDefaultMediaSource:t,getMediaSourceCurrentTime:n,getMediaSourceDuration:r,getMediaSourceDomReference:a}=e(f.tT);return{mediaSource:t(),mediaCurrentTime:n(),mediaDuration:r(),mediaDomReference:a(),isMultipleSelection:e("core/block-editor").getMultiSelectedBlocks().length>0}}),[]),{playMediaSource:M,setMediaSourceCurrentTime:R}=(0,c.useDispatch)(f.tT),L=(0,r.useRef)(),Z=i["jetpack/conversation-participants"],D=null!=Z&&Z.length?Z:[],F=(0,v.ly)(D,S),O=(0,r.useContext)(h.Z);function z(e){a({timestamp:e})}return(0,r.useEffect)((()=>{B||w||F&&F.slug===S&&F.label!==C&&a({label:F.label})}),[F,C,S,B,w,a]),(0,r.createElement)("div",{className:t},(0,r.createElement)(s.BlockControls,null,T&&(0,r.createElement)(g.m,{onTimestampClick:e=>{a({showTimestamp:!0}),z((0,b.H)(e))}})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.Panel,null,(0,r.createElement)(u.PanelBody,{title:__("Speaker","jetpack")},(0,r.createElement)(p.Ev,{className:m.P,participants:D,slug:S||"",onSelect:a})),!(null==T||!T.title)&&(0,r.createElement)(u.PanelBody,{title:__("Podcast episode","jetpack")},(0,r.createElement)("p",null,T.title)),T&&x&&(0,r.createElement)(u.PanelBody,{title:__("Timestamp","jetpack")},(0,r.createElement)(d.dG,{className:m.P,value:P,onChange:z,mediaSource:T,duration:N})))),(0,r.createElement)("div",{className:o()(`${m.P}__meta`,{"has-not-media-source":!T})},(0,r.createElement)(p.v$,{className:`${m.P}__participant`,label:C,participant:F,participants:D,transcriptRef:L,onParticipantChange:e=>{a({label:e})},onSelect:e=>{B||a(e)},onClean:()=>{a({slug:null,label:""})},onAdd:e=>{const t=O.addNewParticipant({label:e,slug:S});a(t)},onUpdate:e=>{O.updateParticipants(e)}}),T&&(0,r.createElement)(d.S6,{className:m.P,show:x,isSelected:w,value:P,mediaCurrentTime:A,onChange:z,onToggle:e=>a({showTimestamp:e}),onPlayback:function(e){I&&(I.currentTime=e),R(e),M()}})),(0,r.createElement)(s.RichText,{ref:L,identifier:"content",tagName:"p",className:`${m.P}__content`,value:_,onChange:e=>a({content:e}),onMerge:E,onSplit:e=>{if(null==_||!_.length)return(0,l.createBlock)(k);const t=null!=e&&e.length?n:{};return(0,l.createBlock)("jetpack/dialogue",{...t,content:e})},onReplace:function(e){for(var t,n,r,a,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return O?(null===(t=e[0])||void 0===t?void 0:t.name)!==k||(null===(n=e[1])||void 0===n?void 0:n.name)!==k||null!==(r=e[0])&&void 0!==r&&r.attributes.content||null!==(a=e[1])&&void 0!==a&&a.attributes.content?void y(e,...i):((0,c.dispatch)("core/block-editor").selectBlock(e[0].clientId),y([e[0]],...i)):y(e,...i)},onRemove:y?()=>y([]):void 0,placeholder:j||__("Write dialogue…","jetpack"),keepPlaceholderOnFocus:!0}))}},43894:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(4981),o=n(40762),i=n(48699),s=n(34114),l=n(36129),c=n(90059),u=n(45452);const __=r.__,_x=r._x,p=c.p,d="dialogue",m={title:__("Dialogue","jetpack"),description:__("Create a dialogue paragraph, setting the participant with an optional timestamp.","jetpack"),parent:[`jetpack/${u.u2}`],icon:l.VV,category:"layout",edit:i.Z,save:s.Z,attributes:o.Z,usesContext:["jetpack/conversation-participants","jetpack/conversation-showTimestamps"],keywords:[_x("dialogue","block search term","jetpack"),_x("participant","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("speaker","block search term","jetpack")],transforms:{to:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t,label:n}=e;return(0,a.createBlock)("core/paragraph",{content:(null!=n&&n.length?`<strong>${n}</strong>: `:"")+t})}))}],from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t}=e;return(0,a.createBlock)("jetpack/dialogue",{participant:p[0],content:t})}))}]}}},34114:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(52175),o=n(87175),i=n(98618);function s(e){let{attributes:t}=e;const{content:n,label:s,showTimestamp:l,timestamp:c}=t;return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:`${o.P}__meta`},(0,r.createElement)(a.RichText.Content,{className:`${o.P}__participant has-bold-style`,tagName:"div",value:s}),l&&(0,r.createElement)("div",{className:`${o.P}__timestamp-label`},(0,r.createElement)("a",{className:`${o.P}__timestamp_link`,href:`#${(0,i.i)(c)}`},c))),(0,r.createElement)(a.RichText.Content,{className:`${o.P}__content`,tagName:"p",value:n}))}},87175:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r="wp-block-jetpack-dialogue"},84676:function(e,t,n){"use strict";var r=n(69307),a=n(1532),o=n(27184),i=n(89105),s=n.n(i),l=n(52175),c=n(76369);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:i=null,disabled:u=!1,label:p="",onChange:d=null,value:m=""}=e;const[h,f]=(0,r.useState)((0,a.ZP)(m,n,{symbol:""})),[g,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),y=(0,r.useRef)(null),E=(0,r.useCallback)((e=>{if(f(e),!d)return;const t=(0,c.Vm)(e,n);t&&t>=(0,c.hj)(n)?(d(t),k(!1)):e&&k(!0)}),[n,d]),w=()=>{y.current&&(y.current.focus(),b(!0))};return(0,r.useEffect)((()=>{y.current&&y.current.addEventListener("blur",(()=>b(!1)))}),[y]),(0,r.useEffect)((()=>{g||h||E((0,a.ZP)(i,n,{symbol:""}))}),[n,i,h,g,E]),(0,r.useEffect)((()=>{g||v||f((0,a.ZP)(m,n,{symbol:""}))}),[n,g,v,E,m]),(0,r.createElement)("div",{className:s()("donations__amount",t,{"has-focus":g,"has-error":v}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},o.M[n].symbol,u?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(m||i,n,{symbol:""})):(0,r.createElement)(l.RichText,{allowedFormats:[],"aria-label":p,keepPlaceholderOnFocus:!0,multiline:!1,onChange:e=>E(e),placeholder:(0,a.ZP)(i,n,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},17850:function(e,t,n){"use strict";var r=n(69307),a=n(27184),o=n(62369),i=n(52175),s=n(55609),l=n(65736),c=n(39630),u=n(76369);const __=l.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,monthlyDonation:p,annualDonation:d,showCustomAmount:m}=t,h=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n({[a]:{...o,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+a.M[l].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===l,onClick:()=>{n({currency:e}),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:p.show,onChange:e=>h("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>h("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,o.lQ)()}`},__("View donation earnings","jetpack")))))}},17560:function(e,t,n){"use strict";var r=n(69307),a=n(1532),o=n(27184),i=n(52175),s=n(65736),l=n(76369);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:c,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},o.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},76430:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(9818),s=n(65736),l=n(45135),c=n(6516),u=n(68598),p=n(5177);const __=s.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:s}=t,[d,m]=(0,o.useState)(""),[h,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[v,k]=(0,o.useState)([]),y=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]);(0,o.useEffect)((()=>{r({fallbackLinkUrl:y.link})}),[y.link,r]);const E=e=>{m(e)},w=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:a,interval:o}=t;return r===s&&"donation"===a&&(e[o]=n),e}),{}),_=e=>{if(!e&&"object"!=typeof e||e.errors)return void m(__("Could not load data from WordPress.com.","jetpack"));f(e.should_upgrade_to_access_memberships),b(e.connect_url);const t=w(e.products);(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(t)?k(t):e.should_upgrade_to_access_memberships||e.connect_url?k({"one-time":-1,"1 month":-1,"1 year":-1}):(0,u.Z)(s).then((e=>k(w(e))),E)};return(0,o.useEffect)((()=>{(0,p.Z)("donation").then(_,E)}),[s]),d?(0,o.createElement)(c.Z,{className:n,error:d}):(0,o.createElement)(l.Z,a()({},e,{products:v,shouldUpgrade:h,stripeConnectUrl:g}))}},68598:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e}})}catch(e){return Promise.reject(e.message)}}},5177:function(e,t,n){"use strict";var r=n(82827),a=n(86989),o=n.n(a),i=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{query:t}=(0,r.Qc)(window.location.href,!0),n=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.origin?"gutenberg-wpcom":"gutenberg",...e&&{type:e}});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},68768:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return c}});var r=n(65736),a=n(76430),o=n(77928),i=n(17560),s=n(36129);const __=r.__,_x=r._x,l="donations",c={title:__("Donations Form","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:s.K9,category:"earn",keywords:[_x("charity","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("fundraising","block search term","jetpack"),_x("fundraiser","block search term","jetpack"),"gofundme",_x("money","block search term","jetpack"),_x("nonprofit","block search term","jetpack"),_x("non-profit","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("recurring","block search term","jetpack"),"stripe",_x("sponsor","block search term","jetpack"),"square",_x("tipping","block search term","jetpack"),"venmo"],supports:{html:!1},edit:a.Z,save:o.Z,example:{},deprecated:[i.Z]}},6516:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},77928:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:s}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,r.createElement)("div",null,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},94121:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(9818),i=n(65736),s=n(84676),l=n(76369);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:c}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const a=b[t],o=n[a];c({[a]:{...o,[e]:r}})},[y,E]=(0,r.useState)(u),w=(0,l.hj)(u),_=(0,r.useMemo)((()=>[10*w,30*w,200*w]),[w]);(0,r.useEffect)((()=>{y!==u&&(E(u),c({oneTimeDonation:{...p,amounts:_},monthlyDonation:{...d,amounts:_},annualDonation:{...m,amounts:_}}))}),[u,y,_,p,d,m,c]);const C=v("amounts"),S=(0,o.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},C.map(((e,t)=>(0,r.createElement)(s.Z,{currency:u,defaultValue:_[t],label:(0,i.sprintf)(// translators: %d: Tier level e.g: "1", "2", "3"
11
  __("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...C];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({customAmountText:e})}),(0,r.createElement)(s.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,l.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:S})))}},45135:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(65736),l=n(17850),c=n(94121),u=n(53970);const __=s.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:s,shouldUpgrade:p,stripeConnectUrl:d}=e,{oneTimeDonation:m,monthlyDonation:h,annualDonation:f}=t,[g,b]=(0,r.useState)("one-time"),v=(0,i.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),k=(0,r.useCallback)((e=>g===e),[g]),y={"one-time":{title:__("One-Time","jetpack")},...h.show&&{"1 month":{title:__("Monthly","jetpack")}},...f.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)((()=>{m.planId===a["one-time"]&&h.planId===a["1 month"]&&f.planId===a["1 year"]||s({...a["one-time"]&&{oneTimeDonation:{...m,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...h,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...f,planId:a["1 year"]}}})}),[m,h,f,s,a]),(0,r.useEffect)((()=>{!h.show&&k("1 month")&&b("one-time"),!f.show&&k("1 year")&&b("one-time")}),[h,f,b,k]),(0,r.createElement)("div",{className:n},!p&&d&&(0,r.createElement)(u.Z,{blockName:"donations",postId:v,stripeConnectUrl:d}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(y).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(y).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:o()("donations__nav-item",{"is-active":k(t)}),onClick:()=>b(t),onKeyDown:()=>b(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(c.Z,{activeTab:g,attributes:t,setAttributes:s}))),(0,r.createElement)(l.Z,e))}},77412:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},51459:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},50215:function(e,t,n){"use strict";var r=n(16770);t.Z=[r.Z]},16770:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92819),l=n(4981),c=n(65736);const _x=c._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const a={...(0,s.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},o=(0,s.pick)(e,u);return[a,[(0,l.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:s,style:l}=t;if(n)return a||"modal"===l?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:s,eventId:l,text:c,textColor:u,url:p}=e,d=(0,i.getColorClassName)("color",u),m=(0,i.getColorClassName)("background-color",t),h=o()("wp-block-button__link",{"has-text-color":u||s,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:s,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${l}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:c}))}(t):s&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,s.isEmpty)(t)||(0,s.some)((0,s.pick)(e,u),Boolean))}},57745:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(62369),u=n(77825),p=n(77412),d=n(22719),m=n(32684),h=n(8964),f=n(62474),g=n(90117),b=n(51459);const __=i.__,_x=i._x;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),a()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:n,setAttributes:r}=this.props,{style:a}=t;if(!e||u.Q7===e||"modal"===a)return;const o=(0,d.Ve)(e);if(o){const t={eventId:o,url:e};(0,g.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,m.S)(p.Z,{...t,url:e});r(a),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()})),a()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),a()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),a()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,o.createElement)(o.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,o.createElement)(s.Button,{variant:"link",onClick:()=>(0,d.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))})),a()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl((0,d.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})})),a()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!u.Wh.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(s.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:r}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,o.createElement)("div",{className:"block-editor-block-preview__container"},(0,o.createElement)("img",{src:h,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,o.createElement)(f.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:r,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,r=(0,c.Wp)()||(0,c.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u.qv,notices:t},(0,o.createElement)("form",{onSubmit:this.submitForm},(0,o.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,o.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,o.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.createElement)(s.ExternalLink,{href:r},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,r=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.SandBox,{html:r}),(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:r,isResolvingUrl:a}=this.state;return a?this.renderLoading():r||!t||this.cannotEmbed()?this.renderEditEmbed():(0,o.createElement)(o.Fragment,null,this.renderInspectorControls(),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(b.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,o.createElement)(l.InnerBlocks,{template:[[u.Ss.name,u.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,s.withNotices)(v)},77825:function(e,t,n){"use strict";n.d(t,{Ss:function(){return d},Wh:function(){return m},Q7:function(){return f},u2:function(){return g},qv:function(){return v},Xd:function(){return k}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(77412),l=n(50215),c=n(57745),u=n(26527),p=n(35338);const __=a.__,_x=a._x,d={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,f="https://www.eventbrite.com/e/test-event-tickets-123456789",g="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,{id:"eventbrite-icon"},(0,r.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,p.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,i.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:f,eventId:123456789,style:"modal"},innerBlocks:[d]},deprecated:l.Z}},26527:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{eventId:n,style:o,url:i}=t;if(n)return"modal"===o?(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},22719:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},Ve:function(){return i},qq:function(){return s}});var r=n(69307),a=n(4981);function o(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,r.renderToString)(n)}))}function i(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},99725:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(4981),u=n(9818);const __=s.__;function p(e){let{onReplace:t}=e;const[n,a]=(0,i.useState)(!1),s=(0,u.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:n,unleashStorm:(e,n)=>{if((0,r.isEmpty)(e))return;const i=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,r.isEmpty)(i))return;const p=i[1];n.removeAllNotices(),a(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(a(!1),!(0,r.isArray)(e))return void n.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,r.isEmpty)(e))return void n.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,c.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,c.createBlock)("core/gallery",{images:e.images});case"image":return(0,c.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,c.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,c.createBlock)("core/embed",{url:e.url})}})));(0,r.some)(s,(e=>"twitter"===e.service_name&&`@${p}`===e.display_name))||(0,u.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,u.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{a(!1),n.createErrorNotice(e.message)}))}}}},7696:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=(0,r.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit"},__("Search","jetpack")))}))},40805:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},1747:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(52175);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(a.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},35286:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(39377),u=n(80835),p=n(7696),d=n(1747),m=n(85132);const __=i.__;t.Z=function(e){let{attributes:t,setAttributes:n,className:a,isSelected:i}=e;const{align:h,caption:f,giphyUrl:g,searchText:b,paddingTop:v}=t,k=o()(a,`align${h}`),[y,E]=(0,r.useState)(!1),w=(0,r.createRef)(),{isFetching:_,giphyData:C,fetchGiphyData:S}=(0,m.Z)(),j=()=>{w.current.focus(),E(!1)};(0,r.useEffect)((()=>{C&&C[0]&&n((0,u.ix)(C[0]))}),[C,n]);const x=e=>{e.preventDefault(),t.searchText&&!_&&S((0,u.Gr)(t.searchText))},P=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:k},(0,r.createElement)(d.Z,null),g?(0,r.createElement)("figure",null,i&&(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w}),i&&C&&C.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},C.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,u.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:j,onKeyDown:j,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:g,title:b})),(!l.RichText.isEmpty(f)||i)&&!!g&&(0,r.createElement)(l.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,unstableOnFocus:()=>E(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:f})):(0,r.createElement)(s.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:c.qv,label:c.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w})))}},85132:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&o(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:a,fetchGiphyData:s}}},39377:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},TN:function(){return c},qv:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(35286),s=n(35338);const __=a.__,_x=a._x,l="gif",c=__("GIF","jetpack"),u=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),p={title:c,icon:{src:u,foreground:(0,s.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:i.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80835:function(e,t,n){"use strict";n.d(t,{Gr:function(){return s},ix:function(){return u}});var r=n(40805);const a=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`,o=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(r.U)}`,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n=e.split(t);return n[n.length-1]},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,r=e.match(n);return r&&r[3]&&(t=i(r[3],"-")),t?o(t):a(e)},l=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,c=e=>null==e?void 0:e.embed_url,u=e=>({giphyUrl:c(e),paddingTop:l(e)})},23966:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__,_x=o._x;t.Z=e=>{const{className:t,embedValue:n,onChange:o,onSubmit:i}=e;return(0,r.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,r.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},71759:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(52175),l=n(90162),c=n(4981),u=n(62369),p=n(23966),d=n(99599),m=n(99077);const __=a.__,_x=a._x;t.Z=(0,i.compose)(o.withNotices,(0,l.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:a,isMobile:i,isSelected:l,name:h,noticeOperations:f,noticeUI:g,setAttributes:b}=e,[v,k]=(0,r.useState)(t||""),[y,E]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1);(0,r.useEffect)((()=>{!l&&w&&_(!1)}),[l,w]);const C=()=>{_(!0)},S=e=>{e&&e.preventDefault();const t=(0,m.L7)(v.trim());if(!m.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));b(t),E(!1),f.removeAllNotices()},j=(0,c.getBlockDefaultClassName)(h),x=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${i?"300":n}"></iframe>`,P=(0,r.createElement)(o.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),T=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.Z,{className:`${j}-embed-form-sidebar`,embedValue:v,onChange:e=>k(e.target.value),onSubmit:S}));if(y||!t){const e=(0,u.Wp)()||(0,u.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:a},T,(0,r.createElement)(o.Placeholder,{className:a,label:__("Google Calendar","jetpack"),icon:d.Z,instructions:(0,r.createElement)("ol",{className:`${j}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:g},(A=`${j}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:S,className:A},(0,r.createElement)("textarea",{type:"text",value:v,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>k(e.target.value)}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${j}-placeholder-links`},(0,r.createElement)(o.ExternalLink,{href:e},__("Learn more","jetpack")))))}var A;return(0,r.createElement)("div",{className:a},T,(0,r.createElement)("div",null,(0,r.createElement)(o.SandBox,{html:x,onFocus:C}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:C})))}))},99599:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},47196:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(4981),i=n(71759),s=n(99077),l=n(99599),c=n(35338);const __=a.__,_x=a._x,u="google-calendar",p={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:l.Z,foreground:(0,c.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:i.Z,save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.Wh.test(e.textContent),transform:e=>(0,o.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&s.E6.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,s.jj)(e.innerHTML.trim());return(0,o.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},99077:function(e,t,n){"use strict";n.d(t,{Wh:function(){return a},E6:function(){return o},jj:function(){return c},L7:function(){return u}});const r="s*https?://calendar.google.com/calendar",a=new RegExp(`^${r}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(a.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return o.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},88315:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{attributes:t,setAttributes:n}=e;const{orientation:o}=t;return(0,r.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,r.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>n({orientation:e})}))}},20931:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(94333),s=n(65736),l=n(852),c=n(88315),u=n(83013),p=n(64715);n(67060);const __=s.__;t.Z=e=>{let{attributes:t,className:n,clientId:s,isSelected:d,setAttributes:m}=e;const{align:h,imageBefore:f,imageAfter:g,caption:b,orientation:v}=t;let k=null,y=null;const E=(0,r.useRef)();i.useResizeObserver&&([k,y]=(0,i.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===s&&t.optimizeWrapper(e)}))}),200,y.width));const w=f&&f.url&&g&&g.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,r.useLayoutEffect)((()=>{f.url&&g.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(null==E?void 0:E.current)}),[h,f,g,v]),(0,r.createElement)("figure",{className:n,id:s},k,(0,r.createElement)(a.InspectorControls,{key:"controls"},(0,r.createElement)(c.Z,{attributes:t,setAttributes:m})),(0,r.createElement)("div",{ref:E,className:w,"data-mode":v||"horizontal"},(0,r.createElement)(o.Placeholder,{label:null},(0,r.createElement)("div",{className:"image-compare__image-before"},(0,r.createElement)(u.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageBefore:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})),(0,r.createElement)("div",{className:"image-compare__image-after"},(0,r.createElement)(u.Z,{image:{id:g.id,url:g.url,alt:g.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageAfter:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})))),(!a.RichText.isEmpty(b)||d&&f.url&&g.url)&&(0,r.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:b,onChange:e=>m({caption:e}),inlineToolbar:!0}))}},27237:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},83013:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(55609);t.Z=(0,a.compose)([i.withNotices])((e=>{const{image:t,noticeOperations:n,noticeUI:a,onChange:i,placeHolderLabel:s}=e,l=(0,r.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),c=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MediaPlaceholder,{labels:{title:s},accept:"image/*",allowedTypes:["image"],onSelect:i,onError:e=>n.createErrorNotice(e),notices:a}));return t&&t.url?l:c}))},59554:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(65736),a=n(20931),o=n(27237),i=n(57164),s=n(90767),l=n(58632),c=n(61365),u=n(35338);const __=r.__,_x=r._x,p="image-compare",d={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:o.Z,foreground:(0,u.m)()},category:(0,c.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:l,alt:__("Before","jetpack")},imageAfter:{id:2,url:s,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:a.Z,save:i.Z}},57164:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{imageBefore:o,imageAfter:i,caption:s,orientation:l}=t;return(0,r.createElement)("figure",{className:n},(0,r.createElement)("div",{className:"juxtapose","data-mode":l||"horizontal"},(0,r.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,r.createElement)("img",{id:i.id,src:i.url,alt:i.alt,width:i.width,height:i.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}},64715:function(e,t,n){"use strict";var r=n(69307);t.Z=(e,t,n)=>{(0,r.useEffect)((()=>{const r=setTimeout((()=>e(n)),t);return()=>clearTimeout(r)}),[n])}},67060:function(e,t,n){"use strict";var r=n(47701);n.n(r)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const n=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){n.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function n(e,t){e&&e.classList.add(t)}function r(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const r=e.getBoundingClientRect(),a={top:r.top+document.body.scrollTop+document.documentElement.scrollTop,left:r.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;n=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return n}function i(e,t,n){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+n.body.scrollTop+n.documentElement.scrollTop,left:a.left+n.body.scrollLeft+n.documentElement.scrollLeft},i=e.offsetHeight;r=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/i*100}return r}const s={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,n,r){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in r&&(this.options[a]=a in s?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);var o;2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}l.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?i(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const s=parseFloat(a),l=100-s+"%";s>0&&s<100&&(r(this.handle,"transition"),r(this.rightImage,"transition"),r(this.leftImage,"transition"),this.options.animate&&t&&(n(this.handle,"transition"),n(this.leftImage,"transition"),n(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=l):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=l),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const n=document.createElement("div");n.className="jx-label",n.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(n,t),e.appendChild(n)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const n=(r=this.imgBefore.image,{width:r.naturalWidth,height:r.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var r;return e?t=e/n:t&&(e=t*n),{width:e,height:t,ratio:n}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let n=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n)),this.wrapper.style.height=parseInt(n.height)+"px",this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(t){let n=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",n=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),n},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){var e;if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;n(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&n(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",(null===(e=window.imageCompareHandle)||void 0===e?void 0:e.msg)||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let n=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),n&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),n=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;let r=parseFloat(this.style.left);if(37===n){r-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,r){void 0===r&&(r=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));return n(t,"juxtapose-"+r),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],i)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},11949:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},93255:function(e,t,n){"use strict";n.d(t,{u:function(){return r},D:function(){return a}});const r=30,a="jetpack-new-instagram-connection"},17404:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(93255);const __=o.__,_n=o._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isDestructive:!0,variant:"link",onClick:()=>l(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,o.sprintf)(
12
  /* translators: placeholder is a number. */
13
  _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},20174:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(52175),l=n(55609),c=n(65736),u=n(11949),p=n(93255),d=n(32684),m=n(42803),h=n(66082),f=n(38594),g=n(46917),b=n(29482),v=n(17404);const __=c.__;t.Z=(0,l.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,noticeOperations:c,noticeUI:k,setAttributes:y}=e,{accessToken:E,align:w,columns:_,count:C,isStackedOnMobile:S,spacing:j}=t;(0,r.useEffect)((()=>{const e=(0,d.S)(u.Z,t);(0,i.isEqual)(e,t)||y(e)}),[t,y]);const[x,P]=(0,r.useState)(E),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:A}=(0,h.Z)(),{images:N,isLoadingGallery:I,setImages:B}=(0,f.Z)({accessToken:E,noticeOperations:c,setAttributes:y,setSelectedAccount:P}),{connectToService:M,disconnectFromService:R,isConnecting:L,isRequestingUserConnections:Z,userConnections:D}=(0,m.Z)({accessToken:E,noticeOperations:c,selectedAccount:x,setAttributes:y,setImages:B,setSelectedAccount:P}),F=(0,b.Z)(),O=C>N.length?N.length:C,z=!I&&(!E||(0,i.isEmpty)(N)),U=!z,$=E&&I&&(0,i.isEmpty)(N),H=!z&&!$,V=o()(n,{[`align${w}`]:w}),G=o()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${_}`,{"is-stacked-on-mobile":S}),q={gridGap:j,"--latest-instagram-posts-spacing":j?`${j}px`:void 0},W={padding:j},K=()=>{x&&p.D!==x?y({accessToken:x,instagramUser:(0,i.find)(D,{token:x}).username}):M()};return(0,r.createElement)("div",{className:V},z&&(0,r.createElement)(l.Placeholder,{icon:"instagram",instructions:F?Z||D.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k},F?(()=>{const e=D.length>0,t=[...(0,i.map)(D,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:p.D}],n=L||Z||e&&!x;return(0,r.createElement)("div",null,e&&(0,r.createElement)(l.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:x}),p.D===x&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(l.Button,{disabled:n,variant:"primary",onClick:K},L&&__("Connecting…","jetpack"),Z&&__("Loading your connections…","jetpack"),!L&&!Z&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(l.Button,{disabled:T||!A,href:A,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),$&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(l.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),H&&(0,r.createElement)("div",{className:G,style:q},(0,i.times)(a?C:O,(e=>(0,r.createElement)("span",{className:o()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:W},(e=>{if(N[e]){const n=N[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:j})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),U&&(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.Z,{accountImageTotal:N.length,attributes:t,currentUserConnected:F,disconnectFromService:R,shouldRenderSidebarNotice:U&&!$&&N.length<C,setAttributes:y})))}))},46917:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{src:t,alt:n,spacing:a}=e;const[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)("auto"),u=(0,r.useRef)(),p=()=>{s(!0),c("auto")};(0,r.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}u.current&&c(u.current.parentNode.getBoundingClientRect().width)}),[t]);const d=-1*a,m=o()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),h=i?{margin:d}:{margin:d,height:l},f=o()({"is-loaded":i});return(0,r.createElement)("span",{style:h,className:m},(0,r.createElement)("img",{alt:n,className:f,ref:u,src:t}))}},33420:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(4981),i=n(11949),s=n(20174),l=n(35338);const __=a.__,_x=a._x,c="instagram-gallery",u={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:(0,l.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:i.Z,edit:s.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},42803:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(70120),a=n(92819),o=n(86989),i=n.n(o),s=n(69307),l=n(65736),c=n(93255),u=n(29482);const __=l.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:o,setAttributes:l,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,u.Z)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),v(e)})).catch((()=>{g(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{c.D===o||(0,a.find)(b,{token:o})||d(void 0)}),[o,d,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new r.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:b}}},66082:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(86989),a=n.n(r),o=n(9818),i=n(69307),s=n(96483),l=n(29482);function c(){const{isAutoDraft:e}=(0,o.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,o.useDispatch)("core/editor"),[n,r]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),p=(0,l.Z)();return(0,i.useEffect)((()=>{p||n||c||(e?t():(u(!0),a()({path:(0,s.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{r(e),u(!1)}))))}),[p,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},38594:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(93255);const __=s.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:a,setSelectedAccount:s}=e;const[u,p]=(0,i.useState)([]),[d,m]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,r.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),a({accessToken:void 0,instagramUser:void 0}),void s(void 0);(0,r.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),a({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),a({accessToken:void 0,instagramUser:void 0}),s(void 0)})))}),[t,a,s]),{images:u,isLoadingGallery:d,setImages:p}}},92007:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(93);const a="likes",o={render:r.Z}},93:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(12238),l=n(9818),c=n(42103);const __=a.__,u=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),p=(0,l.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}}));t.Z=(0,i.compose)([u,p])((e=>{let{areLikesEnabled:t,editPost:n}=e;return(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(c.Z,null,(0,r.createElement)(o.CheckboxControl,{label:__("Show likes.","jetpack"),checked:t,onChange:e=>{n({jetpack_likes_enabled:e})}})))}))},55771:function(e,t,n){"use strict";n.d(t,{N3:function(){return r},sf:function(){return a},Cw:function(){return o}});const r="processing",a="success",o="error"},85608:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(90139),s=n(55771);const __=a.__;function l(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{a({processingLabel:e}),t(s.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(s.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(s.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(i.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},18670:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,r.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,a.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,i),Boolean),save:()=>null}},26910:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(89105),c=n.n(l),u=n(65736),p=n(96483),d=n(55609),m=n(52175),h=n(5046),f=n(85608),g=n(29482),b=n(55771);const __=u.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e=(0,g.Z)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};s()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else s()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))})),a()(this,"auditionNotification",(e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)})),a()(this,"clearAudition",(()=>{this.setState({audition:null})})),a()(this,"labelForAuditionType",(e=>{const{attributes:t}=this.props,{processingLabel:n,successLabel:r,errorLabel:a}=t;return e===b.N3?n:e===b.sf?r:e===b.Cw?a:null})),a()(this,"roleForAuditionType",(e=>e===b.Cw?"alert":"status")),a()(this,"render",(()=>{const{attributes:e,className:t,notices:n,noticeUI:r,setAttributes:a}=this.props,{audition:i,connected:s,connectURL:l,currentUserConnected:u}=this.state,{emailPlaceholder:p,consentText:g,interests:b,processingLabel:v,successLabel:k,errorLabel:y,preview:E,signupFieldTag:w,signupFieldValue:_}=e,C="wp-block-jetpack-mailchimp",S=(0,o.createElement)(d.Placeholder,{icon:h.qv,notices:n},(0,o.createElement)(d.Spinner,null)),j=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,o.createElement)(d.Button,{variant:"secondary",href:l,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,o.createElement)("div",{className:`${C}-recheck`},(0,o.createElement)(d.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),x=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,o.createElement)(d.Button,{variant:"secondary",href:l},__("Connect to WordPress.com","jetpack"))),P=(0,o.createElement)(m.InspectorControls,null,(0,o.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:p,processingLabel:v,successLabel:k,errorLabel:y,interests:b,setAttributes:this.props.setAttributes,signupFieldTag:w,signupFieldValue:_,connectURL:l})),T=c()(t,{[`${C}_notication-audition`]:i}),A=(0,o.createElement)("div",{className:T},(0,o.createElement)(d.TextControl,{"aria-label":p,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:p,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,o.createElement)(m.InnerBlocks,{template:[[h.Ss.name,h.Ss.attributes]],templateLock:"all"}),(0,o.createElement)(m.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:g,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,o.createElement)("div",{className:`${C}_notification ${C}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),N=A;return(0,o.createElement)(o.Fragment,null,r,E&&N,!E&&0===s&&S,!E&&2===s&&u&&j,!E&&2===s&&!u&&x,!E&&1===s&&P,!E&&1===s&&A)})),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}}t.Z=(0,d.withNotices)(v)},5046:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Ss:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(18670),l=n(26910),c=n(35338);const __=a.__,_x=a._x,u="mailchimp",p=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(i.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(i.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(i.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(i.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(i.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(i.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(i.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(i.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(i.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),d={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},m={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,c.m)()},description:__("A form enabling readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],supports:{align:["wide","full"],color:{gradients:!0},spacing:{padding:!0,margin:!0}},attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:l.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[d]},deprecated:[s.Z]}},90139:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(55609);class c extends o.Component{constructor(){super(...arguments),a()(this,"state",{interest_categories:[]}),a()(this,"retrieveGroups",(()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))})),a()(this,"render",(()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,o.createElement)(o.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,o.createElement)(l.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}))}componentDidMount(){this.retrieveGroups()}}t.Z=c,c.defaultProps={interests:[],onChange:()=>null}},30330:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(57115);const __=a.__;class s extends r.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(i.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n})))}}s.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{}},t.Z=s},46951:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(55609),c=n(63435),u=n(65799),p=n(70207),d=n(18914),m=n(45388);const __=i.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"onMarkerClick",(e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()})),a()(this,"onMapClick",(()=>{this.setState({activeMarker:null})})),a()(this,"clearCurrentMarker",(()=>{this.setState({activeMarker:null})})),a()(this,"updateActiveMarker",(e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,a=t.slice(0);(0,s.assign)(a[r],e),this.props.onSetPoints(a)})),a()(this,"deleteActiveMarker",(()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})})),a()(this,"sizeMap",(()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;if(e)n.style.height=e+"px";else{const e=n.offsetWidth,t=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(e*(3/4),t);n.style.height=r+"px"}t.resize(),this.setBoundsByMarkers()})),a()(this,"updateZoom",(()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e),t.updateZoom(e)})),a()(this,"setBoundsByMarkers",(()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:a}=this.props,{map:o,activeMarker:i,mapboxgl:s,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const u=new s.LngLatBounds;if(r.forEach((e=>{u.extend([e.coordinates.longitude,e.coordinates.latitude])})),t(u.getCenter()),r.length>1){o.fitBounds(u,{padding:{top:80,bottom:80,left:40,right:40}}),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch(e){}}else{if(o.setCenter(u.getCenter()),c){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(a,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}})),a()(this,"scriptsLoaded",(()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)})),a()(this,"googlePoint2Mapbox",(e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0})),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:r}=this.props,{map:a,activeMarker:i,mapboxgl:p}=this.state,{onMarkerClick:d,deleteActiveMarker:m,updateActiveMarker:h}=this,f=(0,s.get)(i,"props.point")||{},{title:g,caption:b}=f,v=o.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),k=a&&p&&e.map(((e,t)=>(0,o.createElement)(c.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:a,mapboxgl:p,markerColor:r,onClick:d}))),y=p&&(0,o.createElement)(u.Z,{activeMarker:i,map:a,mapboxgl:p,unsetActiveMarker:()=>this.setState({activeMarker:null})},i&&t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.TextControl,{label:__("Marker Title","jetpack"),value:g,onChange:e=>h({title:e})}),(0,o.createElement)(l.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>h({caption:e})}),(0,o.createElement)(l.Button,{onClick:m,className:"wp-block-jetpack-map__delete-btn"},(0,o.createElement)(l.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),i&&!t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h3",null,g),(0,o.createElement)("p",null,b)));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},k),y,v)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:a,mapStyle:o,mapDetails:i,scrollToZoom:s,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,p.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,d.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,d.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,d.Pp)(m,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:a,scrollToZoom:o,showFullscreenButton:i,admin:s}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:this.googlePoint2Mapbox(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{a("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),i&&(l.addControl(c),s&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}h.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{}},t.Z=h},86622:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(50594),l=n(28875);const __=a.__;t.Z=e=>{let{attributes:t,setAttributes:n,state:a,setState:c,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g}=e;const b=e=>{n({align:e}),setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockAlignmentToolbar,{value:t.align,onChange:b,controls:["center","wide","full"]}),(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:l.X.markerIcon,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let a=parseInt(e.target.value,10);isNaN(a)?a=null:null==r?a=p.current.mapRef.current.offsetHeight:a<m&&(a=m),n({mapHeight:a}),setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:t.zoom,onChange:e=>{n({zoom:e}),setTimeout(p.current.updateZoom,0)},min:0,max:22}),(0,r.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})})),t.points.length?(0,r.createElement)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,(0,r.createElement)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{help:"wpcom"===a.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:a.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,r.createElement)(o.ButtonGroup,null,(0,r.createElement)(o.Button,{type:"button",onClick:f,disabled:!a.apiKeyControl||a.apiKeyControl===a.apiKey},__("Update Token","jetpack")),(0,r.createElement)(o.Button,{type:"button",onClick:h,disabled:"wpcom"===a.apiKeySource,variant:"secondary"},__("Remove Token","jetpack")))))}},40055:function(e,t,n){"use strict";var r=n(53533);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},53533:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},o.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},54041:function(e,t,n){"use strict";var r=n(3743);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:r.Z}},3743:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},o.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},27171:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(65736),c=n(55609),u=n(52175),p=n(30330),d=n(46951),m=n(86622),h=n(28875),f=n(96406),g=n(94333),b=n(9818),v=n(18187),k=n(94823);const __=l.__,y={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class E extends o.Component{constructor(){super(...arguments),a()(this,"geoCodeAddress",((e,t)=>{t&&(0,k.P)(e,t).then((e=>{var t;if(null!==(t=e.features)&&void 0!==t&&t.length){const t=e.features[0],n=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:n})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))})),a()(this,"componentDidUpdate",(e=>{var t,n;const r=null===(t=this.props.attributes)||void 0===t?void 0:t.address,a=null===(n=e.attributes)||void 0===n?void 0:n.address;r&&a!==r&&this.geoCodeAddress(r,this.state.apiKey)})),a()(this,"addPoint",(e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,a=r.slice(0);let o=!1;r.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),n({points:a}),this.setState({addPointVisibility:!1}))})),a()(this,"setPointVisibility",(()=>{this.setState({addPointVisibility:!0})})),a()(this,"updateAPIKeyControl",(e=>{this.setState({apiKeyControl:e.target.value})})),a()(this,"updateAPIKey",(()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")})),a()(this,"removeAPIKey",(()=>{this.apiCall(null,"DELETE")})),a()(this,"onError",((e,t)=>{const{noticeOperations:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)})),a()(this,"onMapResize",((e,t,n,r)=>{const{onResizeStop:a,setAttributes:o}=this.props;a();o({mapHeight:parseInt(this.mapRef.current.mapRef.current.offsetHeight+r.height,10)}),setTimeout(this.mapRef.current.sizeMap,0)})),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,o.createRef)()}apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:a}=this.props,o="/wpcom/v2/service-api-keys/mapbox",i=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};this.setState({apiRequestOutstanding:!0},(()=>{s()(i).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;a.removeAllNotices();const o=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:o,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}componentDidMount(){this.apiCall().then((()=>{var e,t;null!==(e=this.props.attributes)&&void 0!==e&&e.address&&this.geoCodeAddress(null===(t=this.props.attributes)||void 0===t?void 0:t.address,this.state.apiKey)}))}render(){const{className:e,setAttributes:t,attributes:n,noticeUI:r,notices:a,isSelected:i,instanceId:s,onResizeStart:l}=this.props,{mapDetails:g,points:b,zoom:k,mapCenter:E,markerColor:w,preview:_,mapHeight:C,showFullscreenButton:S}=n,{addPointVisibility:j,apiKey:x,apiKeyControl:P,apiState:T,apiRequestOutstanding:A}=this.state,N=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.BlockControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef})),(0,o.createElement)(u.InspectorControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:s,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey}))),I=(0,o.createElement)(c.Placeholder,{icon:h.X.icon},(0,o.createElement)(c.Spinner,null)),B=(0,o.createElement)(o.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,o.createElement)("br",null),(0,o.createElement)(c.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,o.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),M=(0,o.createElement)(c.Placeholder,{icon:h.X.icon,label:__("Map","jetpack"),notices:a,instructions:B},(0,o.createElement)(o.Fragment,null,(0,o.createElement)("form",null,(0,o.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:A,placeholder:__("Paste Token Here","jetpack"),value:P,onChange:this.updateAPIKeyControl}),(0,o.createElement)(c.Button,{variant:"secondary",disabled:A||!P||P.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),R=i&&b.length<=1,L=(0,v.t)(h.X.styles,n.className),Z=(0,o.createElement)(o.Fragment,null,N,(0,o.createElement)("div",{className:e},(0,o.createElement)(c.ResizableBox,{size:{height:C||"auto",width:"100%"},grid:[10,10],showHandle:i,minHeight:400,enable:y,onResizeStart:l,onResizeStop:this.onMapResize},(0,o.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,o.createElement)(d.Z,{ref:this.mapRef,scrollToZoom:R,showFullscreenButton:S,mapStyle:L||"default",mapDetails:g,mapHeight:C,points:b,zoom:k,mapCenter:E,markerColor:w,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:x,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!b.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError},i&&j&&(0,o.createElement)(p.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:x,onError:this.onError,tagName:"AddPoint"})))))),D=h.X.styles.find((e=>e.name===L)),F=(0,o.createElement)("div",null,(0,o.createElement)("img",{alt:__("Map Preview","jetpack"),src:D?D.preview:f}));return(0,o.createElement)(o.Fragment,null,r,_&&F,!_&&0===T&&I,!_&&1===T&&M,!_&&2===T&&Z)}}t.Z=(0,g.compose)([c.withNotices,(0,b.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(E)},94823:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},88155:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(28875),a=n(27171),o=n(607),i=n(40055),s=n(54041),l=n(35338);const{name:c}=r.X,u={title:r.X.title,icon:{src:r.X.icon,foreground:(0,l.m)()},category:r.X.category,keywords:r.X.keywords,description:r.X.description,attributes:r.X.attributes,supports:r.X.supports,styles:r.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==r.X.validAlignments.indexOf(t))return{"data-align":t}},edit:a.Z,save:o.Z,example:r.X.example,deprecated:[s.Z,i.Z]}},65799:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307);class i extends o.Component{constructor(){super(...arguments),a()(this,"closeClick",(()=>{this.props.unsetActiveMarker()}))}componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}}),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,o.createPortal)(this.props.children,this.el):null}openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}i.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=i},57115:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(30725);const c=(0,i.__)("Add a marker…","jetpack");class u extends o.Component{constructor(){super(...arguments),a()(this,"getOptionCompletion",(e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text})),a()(this,"search",(e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const a=new XMLHttpRequest;a.open("GET",r),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))})),a()(this,"onReset",(()=>{this.textRef.current.value=null})),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,o.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}render(){const{label:e}=this.props;return(0,o.createElement)("div",{ref:this.containerRef},(0,o.createElement)(s.BaseControl,{label:e,className:"components-location-search"},(0,o.createElement)(l.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:r,onChange:a,onKeyDown:i}=e;return(0,o.createElement)(s.TextControl,{placeholder:c,ref:this.textRef,onChange:a,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":r,onKeyDown:i})}))))}}u.defaultProps={onError:()=>{}},t.Z=u},50594:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(55609);class s extends o.Component{constructor(){super(...arguments),a()(this,"onDeletePoint",(e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,a=n.slice(0);a.splice(t,1),r(a)})),this.state={selectedCell:null}}setMarkerField(e,t,n){const{points:r,onChange:a}=this.props,o=r.slice(0);o[n][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,o.createElement)(i.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,o.createElement)(i.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,o.createElement)(i.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,o.createElement)(i.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,o.createElement)(i.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,o.createElement)("div",{className:"component__locations"},(0,o.createElement)(i.Panel,{className:"component__locations__panel"},t))}}s.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=s},30725:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819),p=n(39630),d=n(94333);const __=l.__,_n=l._n;function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const a=e[r];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),n.push(a),n.length===t)break}return n}class h extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),a()(this,"select",(e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()})),a()(this,"reset",(()=>{this.setState(this.constructor.getInitialState())})),a()(this,"onChange",(e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?m(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})})),a()(this,"onKeyDown",(e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let a;switch(e.keyCode){case p.UP:a=(0===n?r.length:n)-1,this.setState({selectedIndex:a});break;case p.DOWN:a=(n+1)%r.length,this.setState({selectedIndex:a});break;case p.ENTER:this.select(r[n]);break;case p.LEFT:case p.RIGHT:case p.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()})),this.debouncedLoadOptions=(0,u.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),a=m(n),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,l.sprintf)(
@@ -35,19 +35,19 @@ _n("This block will only appear to people who have visited this page more than %
35
  /* translators: placeholder is a number. */
36
  _n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,o.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,o.createElement)(s.Placeholder,{icon:m.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,o.createElement)(s.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,o.createElement)(s.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,o.createElement)(s.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,o.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,o.createElement)(l.InnerBlocks,null)))}}t.Z=(0,c.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(f)},47515:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},66117:function(e,t,n){"use strict";n.d(t,{FV:function(){return r},Am:function(){return a},Kv:function(){return o}});const r="after-visits",a="before-visits",o=3},22198:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},qv:function(){return h},Xd:function(){return f}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(5160),l=n(89323),c=n(47515),u=n(66117),p=n(35338);const __=a.__,_x=a._x,d={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(i.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,s.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),f={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,p.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:l.Z,save:c.Z,example:{attributes:{criteria:u.FV,threshold:u.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[d]}},71151:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={revueUsername:{type:"string"},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0}}},8138:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4981),i=n(65736);const _x=i._x,__=i.__,s=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius","gradient","customGradient"];t.Z={attributes:{revueUsername:{type:"string"},text:{type:"string",default:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,s),n=(0,a.pick)(e,s);return[t,[(0,o.createBlock)("jetpack/button",{element:"button",text:n.text||"Subscribe",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,s),Boolean),save:e=>{let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)("a",{href:n},n))}}},48517:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(92819),o=n(62369),i=n(52175),s=n(55609),l=n(65736),c=n(8491),u=n(71151),p=n(68919),d=n(41448),m=n(32684);const __=l.__;function h(e){let{attributes:t,className:n,setAttributes:l}=e;(0,r.useEffect)((()=>{const e=(0,m.S)(u.Z,t);(0,a.isEqual)(e,t)||l(e)}),[t,l]);const{revueUsername:h,emailLabel:f,emailPlaceholder:g,firstNameLabel:b,firstNamePlaceholder:v,firstNameShow:k,lastNameLabel:y,lastNamePlaceholder:E,lastNameShow:w}=t,[_,C]=(0,r.useState)("");(0,r.useEffect)((()=>{!_&&h&&C(h)}),[]);const S=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/revue-block/":"https://jetpack.com/support/jetpack-blocks/revue-block/";return(0,r.createElement)("div",{className:n},!h&&(0,r.createElement)(s.Placeholder,{icon:d.Z,instructions:__("Enter your Revue username.","jetpack"),label:__("Revue","jetpack")},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),l({revueUsername:_.trim()})}},(0,r.createElement)("input",{className:"components-placeholder__input",onChange:e=>C(e.target.value.trim()),placeholder:__("Enter your Revue username here…","jetpack"),type:"text",value:_}),(0,r.createElement)("div",null,(0,r.createElement)(s.Button,{disabled:!_,variant:"secondary",type:"submit"},__("Add Form","jetpack")))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(s.ExternalLink,{href:S},__("Need help finding your Revue username?","jetpack")))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show first name field.","jetpack"),checked:k,onChange:()=>l({firstNameShow:!k})}),(0,r.createElement)(s.ToggleControl,{label:__("Show last name field.","jetpack"),checked:w,onChange:()=>l({lastNameShow:!w})}),(0,r.createElement)(s.TextControl,{label:__("Revue Username","jetpack"),onChange:e=>{C(e.trim()),l({revueUsername:e.trim()})},value:h}))),(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:f,labelFieldName:"emailLabel",required:!0,setAttributes:l}),onChange:e=>l({emailPlaceholder:e}),placeholder:g,value:g}),k&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:b,labelFieldName:"firstNameLabel",setAttributes:l}),onChange:e=>l({firstNamePlaceholder:e}),placeholder:v,value:v}),w&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:y,labelFieldName:"lastNameLabel",setAttributes:l}),onChange:e=>l({lastNamePlaceholder:e}),placeholder:E,value:E}),(0,r.createElement)(i.InnerBlocks,{template:[[c.Ss.name,c.Ss.attributes]],templateLock:"all"})))}},41448:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{fillRule:"nonzero"},(0,r.createElement)(a.Path,{d:"M16.8452322,23.2301186 C13.9471277,22.2565366 12.0226052,20.2188069 10.6188359,16.5961763 C10.2565728,15.6225943 9.87166831,14.4905223 9.80374399,14.1056178 C9.66789534,13.4037331 9.6452539,13.3810917 8.96601067,13.6075061 C7.8792215,13.9697691 7.76601429,14.1282592 7.35846835,15.758443 C6.724508,18.2490015 6.45281071,18.7244718 5.56979451,18.8829619 C5.09432424,18.9735276 4.5735711,18.9282447 4.27923236,18.7697547 C3.84904498,18.5433402 3.8037621,18.3848502 3.93961075,17.501834 C4.00753507,16.9584394 4.41508101,15.3056142 4.82262695,13.8339205 C5.8414918,10.2792143 6.11318909,8.98865211 6.29432062,7.1094125 C6.43016927,5.63771883 6.47545215,5.50187018 7.08677106,5.20753145 C7.92450438,4.79998551 8.80752058,5.09432424 9.19242508,5.88677468 C9.44148093,6.38488639 9.39619805,6.90563953 8.96601067,8.98865211 C8.67167193,10.3924215 8.51318185,11.5244935 8.62638905,11.5244935 C9.12450076,11.5244935 11.2754377,10.2565728 12.0452467,9.50940525 C13.8339205,7.83393861 14.2641079,5.77356748 13.2905259,3.82640354 C12.5886412,2.4226342 11.6150593,1.94716393 9.78110255,2.08301258 C6.97356385,2.28678555 4.43772245,4.25659092 3.01131166,7.35846835 C2.21886123,9.05657643 2.19621978,9.07921787 1.49433511,8.94336923 C-1.74339096,8.28676744 0.63396035,3.39621616 5.29809721,1.19999638 C8.39997464,-0.294338734 11.5018521,-0.362263057 14.0829764,0.950940525 C17.0716466,2.51319996 18.0225871,5.93205756 16.2791961,8.96601067 C15.5999529,10.1433656 14.2641079,11.3886449 12.9509043,12.0678881 C12.5433584,12.2716611 12.2037367,12.5207169 12.2037367,12.6339241 C12.2037367,12.9509043 13.2678845,15.9395745 13.6301475,16.6641006 C14.3093908,17.9773042 16.2339133,19.8112609 17.4565511,20.377297 C18.8829619,21.0112573 21.4640861,21.0791816 23.0263456,20.5131456 L23.9772861,20.1508826 L23.9772861,20.7169186 C23.9772861,21.5320105 23.3433258,22.3471023 22.3018195,22.8904969 C21.147106,23.4791744 18.1584357,23.6603059 16.8452322,23.2301186 Z"})))},8491:function(e,t,n){"use strict";n.d(t,{Ss:function(){return u},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(71151),o=n(8138),i=n(48517),s=n(41448),l=n(35338),c=n(93812);const __=r.__,_x=r._x,u={name:"jetpack/button",attributes:{element:"button",text:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")}},p="revue",d={title:__("Revue","jetpack"),description:__("Add a subscription form for your Revue newsletter.","jetpack"),icon:{src:s.Z,foreground:(0,l.m)()},category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("mailing list","block search term","jetpack")],supports:{html:!1},attributes:a.Z,edit:i.Z,save:c.Z,example:{attributes:{revueUsername:"example"},innerBlocks:[u]},deprecated:[o.Z]}},93812:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null),(0,r.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))}},52909:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},83086:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(52909),l=n(53067),c=n(5160),u=n(35338);const __=a.__,_x=a._x,p="send-a-message",d={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,c.Z)((0,r.createElement)(i.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,u.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:s.Z,save:e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(o.InnerBlocks.Content,null)),variations:l.Z,example:{}}},72120:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},53067:function(e,t,n){"use strict";var r=n(65736),a=n(54044),o=n(25906);const __=r.__,i=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,o.p)("send-a-message",a.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}];t.Z=i},5738:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"array",source:"children",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},1572:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(39630),l=n(72120),c=n(5160),u=n(39403);const __=a.__,_x=a._x,p="#25D366",d="#465B64";function m(e){let{attributes:t,setAttributes:n,context:a}=e;const{countryCode:m,phoneNumber:h,firstMessage:f,openInNewTab:g,backgroundColor:b}=t,[v,k]=(0,r.useState)(!0),y=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,r.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:m,onChange:e=>n({countryCode:e}),options:l.n,hideLabelFromVision:!0}),(0,r.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{n({phoneNumber:e}),0===e.length&&k(!0),e.length>2&&k((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(m.replace(/\D/g,"")+e)})(e))},value:h}),!v&&(0,r.createElement)(u.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:f,onChange:e=>n({firstMessage:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:g,onChange:e=>n({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===a?(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==s.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,c.Z)((0,r.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,n)},renderContent:y})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},y()),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:b,onChange:e=>(e=>{if(n({backgroundColor:e}),void 0===e||e===p||e===d)return n({colorClass:"dark"});n({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:d},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:"#F4F4F4"},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},42005:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(54005),l=n(5738);t.Z={attributes:l.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,colorClass:u,buttonText:p,backgroundColor:d,openInNewTab:m}=t,h=m?"_blank":"_self",f=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",g=o()(n,u?"is-color-"+u:void 0,p.length?void 0:"has-no-text");return(0,r.createElement)("div",{className:g},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+f;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:d},target:h,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:p})))}}},51510:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(52175),l=n(72120),c=n(1572);function u(e){let{attributes:t,setAttributes:n,className:a,clientId:u}=e;const{countryCode:p,buttonText:d,colorClass:m,backgroundColor:h}=t,{selectBlock:f}=(0,i.useDispatch)("core/block-editor"),g=(0,r.useCallback)((async()=>{n({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();l.n.forEach((e=>{e.code===t.country_short&&n({countryCode:e.value})}))}}),[n]);(0,r.useEffect)((()=>{void 0===p&&(g(),f(u))}),[u,p,g,f]);return(0,r.createElement)("div",{className:o()(a,m?"is-color-"+m:void 0)},(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(c.Z,{context:"toolbar",setAttributes:n,attributes:t})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(c.Z,{context:"inspector",setAttributes:n,attributes:t})),(0,r.createElement)(s.RichText,{placeholder:d.default,value:d,onChange:e=>n({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:h,color:"dark"===m?"#fff":"#465B64"}}))}},54044:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(35338);t.Z=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},54005:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},pf:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(35338),o=n(5738),i=n(51510),s=n(14895),l=n(42005),c=n(54044);const __=r.__,_x=r._x,u="whatsapp-button",p=__("WhatsApp Button","jetpack"),d="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:p,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:i.Z,save:s.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[l.Z]})},14895:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(54005);function l(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,buttonText:u,backgroundColor:p,colorClass:d,openInNewTab:m}=t,h=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",f=o()(n,d?"is-color-"+d:void 0,u.length?void 0:"has-no-text"),g=m?"_blank":"_self";return(0,r.createElement)("div",{className:f},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+h;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:p,color:"dark"===d?"#fff":"#465B64"},target:g,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:u})))}},69022:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(14040),l=n(14465);const __=a.__,c="seo",u={render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("SEO Description","jetpack")},(0,r.createElement)(l.Z,null))),(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,id:"seo-title",title:(0,r.createElement)("span",{id:"seo-defaults",key:"seo-title-span"},__("SEO Description","jetpack"))},(0,r.createElement)(l.Z,null)))}},14465:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(9818);const __=i.__,_n=i._n;class u extends o.Component{constructor(){super(...arguments),a()(this,"onMessageChange",(e=>{this.props.updateSeoDescription(e.target.value)}))}render(){const{seoDescription:e}=this.props;return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)("textarea",{value:e,onChange:this.onMessageChange,placeholder:__("Write a description…","jetpack"),rows:4}),(0,o.createElement)("div",{className:"jetpack-seo-character-count"},(0,i.sprintf)(
37
  /* translators: Placeholder is a number of characters in a sentence. */
38
- _n("%d character","%d characters",e.length,"jetpack"),e.length)))}}t.Z=(0,s.compose)([(0,c.withSelect)((e=>({seoDescription:(0,l.get)(e("core/editor").getEditedPostAttribute("meta"),["advanced_seo_description"],"")}))),(0,c.withDispatch)((e=>({updateSeoDescription(t){e("core/editor").editPost({meta:{advanced_seo_description:t}})}})))])(u)},62624:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(92819),i=n(55609),s=n(9818),l=n(35730),c=n(14040);const __=a.__,u="shortlinks",p={render:()=>(0,r.createElement)(m,null)};class d extends r.Component{render(){const{shortlink:e}=this.props;return e?(0,r.createElement)(c.Z,null,(0,r.createElement)(i.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},(0,r.createElement)(l.Z,{link:e}))):null}}const m=(0,s.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,o.get)(t,"jetpack_shortlink","")}}))(d)},61408:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},a7:function(){return a},Rh:function(){return o}});const r="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},39124:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(a.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},55882:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(r.RawHTML,null,`[simple-payment id="${n}"]`):null}}},25810:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(27184),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(39403),b=n(84970),v=n(49812),k=n(35405),y=n(61408);const __=p.__,_n=p._n;class E extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return y.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
39
  /* translators: Placeholder is a number of decimals in a number. */
40
  _n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?l.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(
41
  /* translators: placeholder is an email address. */
42
  __("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",y.Rh.map((e=>{const{symbol:t}=(0,u.X)(e);return{value:e,label:t===e?e:`${e} ${(0,c.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(f.InspectorControls,null,(0,o.createElement)(h.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,o.createElement)(h.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,o.createElement)(h.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))))))}componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r}=this.props,{productId:a}=e;!a&&t&&this.saveProduct();const o=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&r({...o&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a}=this.props;(0,c.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!n&&this.validateAttributes();const o=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&a({...o&&{postLinkUrl:r},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,c.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:u,multiple:p,price:d,title:m}=n;r({content:(0,c.get)(e,["content","raw"],a),currency:(0,c.get)(e,["meta","spay_currency"],o),email:(0,c.get)(e,["meta","spay_email"],i),featuredMediaId:(0,c.get)(e,["featured_media"],s),featuredMediaUrl:(0,c.get)(t,"url",l),featuredMediaTitle:(0,c.get)(t,"title",u),multiple:Boolean((0,c.get)(e,["meta","spay_multiple"],Boolean(p))),price:(0,c.get)(e,["meta","spay_price"],d||void 0),title:(0,c.get)(e,["title","raw"],m)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,m.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",y.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(
43
  /* translators: placeholder is an email address. */
44
- __("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:r,instanceId:a,isSelected:i,setAttributes:l,simplePayment:u}=this.props,{content:p,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:E,multiple:w,price:_,productId:C,title:S}=r,j=C&&(0,c.isEmpty)(u);if(!i&&j)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(b.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&S&&!e&&!t&&!n)return(0,o.createElement)(b.Z,{"aria-busy":"false",content:p,featuredMediaUrl:y,featuredMediaTitle:E,formattedPrice:(0,k.w)(_,d),multiple:w,title:S});const x=j?h.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(v.Z,{featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:E,setAttributes:l}),(0,o.createElement)("div",null,(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-title-error`,className:s()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,o.createElement)(g.Z,{id:`${a}-title-error`,isError:!0},n),(0,o.createElement)(h.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:p}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(h.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-price-error`,className:s()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,o.createElement)(g.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(h.ToggleControl,{checked:Boolean(w),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:s()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:m}),(0,o.createElement)(g.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(g.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(h.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const w=(0,m.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{isSavingPost:a,getCurrentPost:o}=e("core/editor"),{productId:i,featuredMediaId:s}=t.attributes,l=i?(0,c.pick)(n("postType",y.LC,i),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,u=o();return{hasPublishAction:!!(0,c.get)(u,["_links","wp:action-publish"]),isSaving:!!a(),simplePayment:l,featuredMedia:s?r(s):null,postLinkUrl:u.link}}));t.Z=(0,d.compose)(w,d.withInstanceId)(E)},31680:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(62369),s=n(61408),l=n(35338),c=n(25810),u=n(3595);const __=a.__,_x=a._x,p=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),d=(0,i.Wp)()||(0,i.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",m={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:d},__("Support reference","jetpack"))),icon:{src:p,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),_x("simple","block search term","jetpack"),_x("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:s.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:c.Z,save:u.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};t.Z=m},3595:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(35405);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,a.w)(u,o))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},78158:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(27184),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(6551),b=n(39403),v=n(84970),k=n(49812),y=n(35405),E=n(61408),w=n(39124);const __=p.__,_n=p._n;class _ extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return E.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,y.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
45
  /* translators: Placeholder is a number of decimals in a number. */
46
  _n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?l.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(
47
  /* translators: Placeholder is an email address. */
48
  __("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",E.Rh.map((e=>{const{symbol:t}=(0,u.X)(e);return{value:e,label:t===e?e:`${e} ${(0,c.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(f.InspectorControls,null,(0,o.createElement)(w.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}))))}componentDidMount(){var e,t;this.injectPaymentAttributes();const{attributes:n,hasPublishAction:r,postLinkUrl:a,setAttributes:o,isPostEditor:i}=this.props,{productId:s}=n;(!s&&r||!i)&&this.saveProduct();const l=a&&a!==this.props.attributes.postLinkUrl,c=!this.props.attributes.postLinkText;(l||c)&&o({...l&&{postLinkUrl:a},...c&&{postLinkText:__("Click here to purchase.","jetpack")}}),null===(e=window.wp)||void 0===e||null===(t=e.customize)||void 0===t||t.bind("change",(e=>{let t;const n=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(n){t=`${n[1]}-${parseInt(n[2],10)}`}else t=e.id;t===(0,g.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a,isPostEditor:o}=this.props;(0,c.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&o||!this.validateAttributes()?e.isSelected&&!n&&this.validateAttributes():this.saveProduct();const i=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&a({...i&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,c.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:u,multiple:p,price:d,title:m}=n;r({content:(0,c.get)(e,["content","raw"],a),currency:(0,c.get)(e,["meta","spay_currency"],o),email:(0,c.get)(e,["meta","spay_email"],i),featuredMediaId:(0,c.get)(e,["featured_media"],s),featuredMediaUrl:(0,c.get)(t,"url",l),featuredMediaTitle:(0,c.get)(t,"title",u),multiple:Boolean((0,c.get)(e,["meta","spay_multiple"],Boolean(p))),price:(0,c.get)(e,["meta","spay_price"],d||void 0),title:(0,c.get)(e,["title","raw"],m)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,m.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",E.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(
49
  /* translators: Placeholder is an email address. */
50
- __("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:r,instanceId:a,isSelected:i,setAttributes:l,simplePayment:u}=this.props,{content:p,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:E,multiple:w,price:_,productId:C,title:S}=r,j=C&&(0,c.isEmpty)(u);if(!i&&j)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&S&&!e&&!t&&!n)return(0,o.createElement)(v.Z,{"aria-busy":"false",content:p,featuredMediaUrl:g,featuredMediaTitle:E,formattedPrice:(0,y.T4)(_,d),multiple:w,title:S});const x=j?h.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(k.Z,{featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:E,setAttributes:l}),(0,o.createElement)("div",null,(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-title-error`,className:s()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,o.createElement)(b.Z,{id:`${a}-title-error`,isError:!0},n),(0,o.createElement)(h.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:p}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(h.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-price-error`,className:s()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,y.T4)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,o.createElement)(b.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(h.ToggleControl,{checked:Boolean(w),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:s()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:m}),(0,o.createElement)(b.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(b.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(h.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const C=(0,m.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{getCurrentPost:a}=e("core/editor"),{__experimentalGetDirtyEntityRecords:o,isSavingEntityRecord:i}=e("core"),s=o,{productId:l,featuredMediaId:u}=t.attributes,p=l?(0,c.pick)(n("postType",E.LC,l),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,d=a();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,c.get)(d,["_links","wp:action-publish"]),isSaving:s().some((e=>i(e.kind,e.name,e.key))),simplePayment:p,featuredMedia:u?r(u):null,postLinkUrl:null==d?void 0:d.link,isPostEditor:Object.keys(a()).length>0}}));t.Z=(0,d.compose)(C,d.withInstanceId)(_)},49812:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(92819),s=n(55609),l=n(89284);const __=a.__,c=e=>t=>e({featuredMediaId:(0,i.get)(t,"id",0),featuredMediaUrl:(0,i.get)(t,"url",null),featuredMediaTitle:(0,i.get)(t,"title",null)});t.Z=e=>{let{featuredMediaId:t,featuredMediaUrl:n,featuredMediaTitle:a,setAttributes:i}=e;return t?(0,r.createElement)("div",null,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:c(i),allowedTypes:["image"],value:t,render:e=>{let{open:t}=e;return(0,r.createElement)(l.Z,{label:__("Edit Image","jetpack"),onClick:t})}}))),(0,r.createElement)(s.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>i({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:n,alt:a})))):(0,r.createElement)(o.MediaPlaceholder,{icon:(0,r.createElement)(o.BlockIcon,{icon:"format-image"}),labels:{title:__("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:c(i)})}},28929:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return b}});var r=n(69307),a=n(65736),o=n(55609),i=n(62369),s=n(61408),l=n(35338),c=n(78158),u=n(11488),p=n(55882),d=n(31680),m=n(60206);const __=a.__,_x=a._x,h="simple-payments",f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),g=(0,i.Wp)()||(0,i.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",b={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:g},__("Support reference","jetpack"))),icon:{src:f,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"square",_x("payments","block search term","jetpack")],attributes:{currency:{type:"string",default:s.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:c.Z,save:u.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:m}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[p.Z,d.Z]}},84970:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(22323),i=n(23879);const __=a.__;t.Z=e=>{let{title:t="",content:n="",formattedPrice:a="",multiple:s=!1,featuredMediaUrl:l=null,featuredMediaTitle:c=null}=e;return(0,r.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},l&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,r.createElement)("img",{src:l,alt:c}))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},t&&(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,t)),n&&(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),a&&(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,a)),(0,r.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},s&&(0,r.createElement)("div",{className:"jetpack-simple-payments-items"},(0,r.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),(0,r.createElement)("div",{className:"jetpack-simple-payments-button"},(0,r.createElement)("img",{alt:__("Pay with PayPal","jetpack"),src:o,srcSet:`${i} 2x`}))))))}},11488:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(35405);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,a.T4)(u,o))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},35405:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},w:function(){return s},T4:function(){return l}});var r=n(27184),a=n(92819);n(61408);const o=e=>{const t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},i=function(){var e,t,n,r,a,o;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const s=null===(e=window)||void 0===e||null===(t=e.window)||void 0===t?void 0:t.navigator;return null!=s&&null!==(n=s.languages)&&void 0!==n&&n.length?s.languages[0]:null!==(r=null!==(a=null!==(o=null==s?void 0:s.userLanguage)&&void 0!==o?o:null==s?void 0:s.language)&&void 0!==a?a:null==s?void 0:s.browserLanguage)&&void 0!==r?r:i},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{precision:o,symbol:i}=(0,r.X)(t),s=e.toFixed(o);return n?`${s} ${(0,a.trimEnd)(i,".")}`:s},l=function(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1?arguments[1]:void 0,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return s(r,a,o);const l=null!==(e=null===(t=window)||void 0===t||null===(n=t.Jetpack_Editor_Initial_State)||void 0===n?void 0:n.siteLocale)&&void 0!==e?e:"en-US",c=[l,i(),"en-US"];let u,p={};for(u of(o&&(p={style:"currency",currency:a}),c))try{return Intl.NumberFormat(u,p).format(r)}catch{continue}return s(r,a,o)}},98568:function(e,t,n){"use strict";n.d(t,{G:function(){return c},J:function(){return u}});var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(92819),l=n(89284);const __=i.__,_x=i._x;function c(e){let{attributes:{autoplay:t,delay:n,effect:a,images:i,sizeSlug:l},imageSizeOptions:c,onChangeImageSize:u,setAttributes:p}=e;const d="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,m=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Autoplay","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{p({autoplay:e})}}),t&&(0,r.createElement)(o.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:n,onChange:e=>{p({delay:e})},min:1,max:5}),t&&d&&(0,r.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Effects","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Transition effect","jetpack"),value:a,onChange:e=>{p({effect:e})},options:m})),!(0,s.isEmpty)(i)&&!(0,s.isEmpty)(c)&&(0,r.createElement)(o.PanelBody,{title:__("Image Settings","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Image Size","jetpack"),value:l,options:c,onChange:e=>u(e)})))}function u(e){let{allowedMediaTypes:t,attributes:{images:n},onSelectImages:i}=e;return(0,r.createElement)(r.Fragment,null,!!n.length&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{onSelect:i,allowedTypes:t,multiple:!0,gallery:!0,value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(l.Z,{label:__("Edit Slideshow","jetpack"),onClick:t})}})))))}},36802:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(92819);async function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".swiper-container",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:(0,r.mapValues)(a,(e=>function(){e(this)}))},[{default:i}]=await Promise.all([Promise.all([n.e(263),n.e(390)]).then(n.t.bind(n,16402,23)),Promise.all([n.e(263),n.e(390)]).then(n.bind(n,21130))]);return new i(e,(0,r.merge)({},o,t))}},37128:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(11313),u=n(9818),p=n(52175),d=n(12238),m=n(55609),h=n(43118),f=n(98568),g=n(99813);const __=i.__,b=["image"],v=(e,t)=>{const n=(0,l.pick)(e,["alt","id","link","caption"]);return n.url=(0,l.get)(e,["sizes",t,"url"])||(0,l.get)(e,["media_details","sizes",t,"source_url"])||e.url,n};class k extends o.Component{constructor(){super(...arguments),a()(this,"onSelectImages",(e=>{const{sizeSlug:t}=this.props.attributes,n=e.map((e=>v(e,t)));this.setAttributes({images:n})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,l.filter)(this.props.attributes.images,((t,n)=>e!==n));this.setState({selectedImage:null}),this.setAttributes({images:t})})),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],n=this.props.attributes.sizeSlug,{lockPostSaving:r,unlockPostSaving:a,noticeOperations:o}=this.props,i="slideshowBlockLock";r(i),(0,d.mediaUpload)({allowedTypes:b,filesList:e,onFileChange:e=>{const r=e.map((e=>v(e,n)));this.setAttributes({images:[...t,...r]}),r.every((e=>(0,c.isBlobURL)(e.url)))||a(i)},onError:o.createErrorNotice})})),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files))),a()(this,"updateImagesSize",(e=>{const{images:t}=this.props.attributes,{resizedImages:n}=this.props,r=t.map((t=>{const r=n.find((e=>{let{id:n}=e;return parseInt(n,10)===parseInt(t.id,10)})),a=(0,l.get)(r,["sizes",e,"source_url"]);return{...t,...a&&{url:a}}}));this.setAttributes({images:r,sizeSlug:e})})),this.state={selectedImage:null}}componentDidMount(){const{ids:e,sizeSlug:t}=this.props.attributes;t||this.setAttributes({sizeSlug:e.length?"full":"large"})}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,l.map)(e,(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}render(){const{attributes:e,className:t,isSelected:n,noticeOperations:r,noticeUI:a}=this.props,{align:i,autoplay:s,delay:l,effect:c,images:u}=e,d=this.getImageSizeOptions(),v=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(p.InspectorControls,null,(0,o.createElement)(f.G,{attributes:e,imageSizeOptions:d,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,o.createElement)(p.BlockControls,null,(0,o.createElement)(f.J,{allowedMediaTypes:b,attributes:e,onSelectImages:this.onSelectImages})));return 0===u.length?(0,o.createElement)(o.Fragment,null,v,(0,o.createElement)(p.MediaPlaceholder,{icon:h.qv,className:t,labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:b,multiple:!0,notices:a,onError:r.createErrorNotice})):(0,o.createElement)(o.Fragment,null,v,a,(0,o.createElement)(g.Z,{align:i,autoplay:s,className:t,delay:l,effect:c,images:u,onError:r.createErrorNotice}),(0,o.createElement)(m.DropZone,{onFilesDrop:this.addFiles}),n&&(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,o.createElement)(m.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}t.ZP=(0,s.compose)((0,u.withSelect)(((e,t)=>({imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce(((t,n)=>{const r=e("core").getMedia(n);return[...t,{id:n,sizes:(0,l.get)(r,["media_details","sizes"])}]}),[])}))),(0,u.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:n}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:n}})),m.withNotices)(k)},43118:function(e,t,n){"use strict";n.d(t,{qv:function(){return h},u2:function(){return g},Xd:function(){return b}});var r=n(69307),a=n(65736),o=n(55609),i=n(37128),s=n(26153),l=n(37287),c=n(35338),u=n(61365),p=n(65784),d=n(6425),m=n(85983);const __=a.__,_x=a._x,h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(o.Path,{d:"M21 8V19C21 20.1046 20.1057 21 19.0011 21C15.8975 21 9.87435 21 6 21",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Rect,{x:"3.75",y:"3.75",width:"13.5",height:"13.5",rx:"0.875",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Path,{d:"M9 14L12 11L9 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})),f={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:p},{alt:"",caption:"",id:23,url:d},{alt:"",caption:"",id:23,url:m}],effect:"slide"},g="slideshow",b={title:__("Slideshow","jetpack"),category:(0,u.Z)("media","layout"),keywords:[_x("image","block search term","jetpack"),_x("gallery","block search term","jetpack"),_x("slider","block search term","jetpack")],description:__("Add an interactive slideshow.","jetpack"),attributes:{align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}},supports:{align:["center","wide","full"],html:!1},icon:{src:h,foreground:(0,c.m)()},edit:i.ZP,save:s.Z,transforms:l.Z,example:{attributes:f}}},26153:function(e,t,n){"use strict";var r=n(69307),a=n(99813);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:o,effect:i,images:s},className:l}=e;return(0,r.createElement)(a.Z,{align:t,autoplay:n,className:l,delay:o,effect:i,images:s})}},99813:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(54166),c=n(65736),u=n(11313),p=n(92819),d=n(52175),m=n(55609),h=n(36802),f=n(74609);const __=c.__;class g extends o.Component{constructor(e){var t;super(e),t=this,a()(this,"pendingRequestAnimationFrame",null),a()(this,"resizeObserver",null),a()(this,"initializeResizeObserver",(e=>{this.clearResizeObserver(),this.resizeObserver=new l.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,f.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)})),a()(this,"clearPendingRequestAnimationFrame",(()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)})),a()(this,"clearResizeObserver",(()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)})),a()(this,"prefersReducedMotion",(()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)),a()(this,"buildSwiper",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,h.Z)(t.slideshowRef.current,{autoplay:!(!t.props.autoplay||t.prefersReducedMotion())&&{delay:1e3*t.props.delay,disableOnInteraction:!1},effect:t.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:t.btnNextRef.current,prevEl:t.btnPrevRef.current},pagination:{clickable:!0,el:t.paginationRef.current,type:"bullets"}},{init:f.UA,imagesReady:f.$m,paginationRender:f.Wj,transitionEnd:f.HV})})),this.slideshowRef=(0,o.createRef)(),this.btnNextRef=(0,o.createRef)(),this.btnPrevRef=(0,o.createRef)(),this.paginationRef=(0,o.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:a,images:o,onError:i}=this.props;if(t===e.align&&(0,p.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}render(){var e,t;if(null===(e=this.props)||void 0===e||null===(t=e.images)||void 0===t||!t.length)return null;const{autoplay:n,className:r,delay:a,effect:i,images:l}=this.props;return(0,o.createElement)("div",{className:r,"data-autoplay":n||null,"data-delay":n?a:null,"data-effect":i},(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,o.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return(0,o.createElement)("li",{className:s()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,u.isBlobURL)(a)&&"is-transient"),key:r||a},(0,o.createElement)("figure",null,(0,o.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:a}),(0,u.isBlobURL)(a)&&(0,o.createElement)(m.Spinner,null),n&&(0,o.createElement)(d.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,o.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}}a()(g,"defaultProps",{effect:"slide"}),t.Z=g},74609:function(e,t,n){"use strict";n.d(t,{HV:function(){return l},UA:function(){return i},Wj:function(){return c},$m:function(){return s}});var r=n(81975),a=n(92819);const o="wp-block-jetpack-slideshow_autoplay-paused";function i(e){s(e),l(e);document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function s(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,1.7777777777777777),1),a="undefined"!=typeof window?.8*window.innerHeight:600,o=Math.min(e.width/r,a),i=`${Math.floor(o)}px`,s=`${Math.floor(o/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=i,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=s,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=s}function l(e){(0,a.forEach)(e.slides,((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],a=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(a.alt))}(e)}function c(e){(0,a.forEach)(e.pagination.bullets,(t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},37287:function(e,t,n){"use strict";var r=n(4981),a=n(92819);function o(e){return(0,a.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const i={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>o(e).length>0,transform:e=>{const t=o(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const n=o(t);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,r.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n}=e;return(0,r.createBlock)("core/gallery",{images:t,ids:n})}},{type:"block",blocks:["core/image"],transform:e=>{let{images:t}=e;return t.length>0?t.map((e=>{let{id:t,url:n,alt:a,caption:o}=e;return(0,r.createBlock)("core/image",{id:t,url:n,alt:a,caption:o})})):(0,r.createBlock)("core/image")}}]};t.Z=i},52605:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(3779),a=n.n(r),o=n(69307),i=n(65736),s=n(63396),l=n(69436),c=n(51661);const __=i.__,u=[{title:__("Google Search","jetpack"),icon:"google",name:"google",preview:s.Z},{title:__("Facebook","jetpack"),icon:"facebook",name:"facebook",preview:e=>(0,o.createElement)(l.Z,a()({type:"article"},e))},{title:__("Twitter","jetpack"),icon:"twitter",name:"twitter",preview:e=>(0,o.createElement)(c.Z,e)}]},27087:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p},w6:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(14040),l=n(81310),c=n(66258);const __=a.__,u="social-previews",p={render:()=>(0,r.createElement)(d,null)},d=function(e){let{showUpgradeNudge:t}=e;const[n,a]=(0,r.useState)(!1);return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(c.Z,{showUpgradeNudge:t,onClose:()=>a(!1)}),(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("Social Previews","jetpack")},(0,r.createElement)(l.Z,{openModal:()=>a(!0),showUpgradeNudge:t}))),(0,r.createElement)(i.PluginPrePublishPanel,{title:__("Social Previews","jetpack")},(0,r.createElement)(l.Z,{openModal:()=>a(!0),showUpgradeNudge:t})))}},66258:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(9818),s=n(60859),l=n(52605),c=n(36129),u=n(7739);const __=a.__;t.Z=(0,i.withSelect)(((e,t)=>{var n;if(t.showUpgradeNudge)return{};const{getMedia:r,getUser:a}=e("core"),{getCurrentPost:o,getEditedPostAttribute:i}=e("core/editor"),{getTweetTemplate:s,getTweetStorm:l,getShareMessage:c,isTweetStorm:p}=e("jetpack/publicize"),d=i("featured_media"),m=i("author"),h=m&&a(m),f={post:o(),title:i("title"),description:(null===(n=i("meta"))||void 0===n?void 0:n.advanced_seo_description)||i("excerpt")||i("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:i("link"),author:null==h?void 0:h.name,image:!!d&&(0,u.i)(r(d))};let g=[];return p()?g=l():g.push({...s(),text:c(),card:{...f,type:f.image?"summary_large_image":"summary"}}),{...f,tweets:g,isTweetStorm:p()}}))((function(e){let{onClose:t,showUpgradeNudge:n,image:a,title:i,description:u,url:p,author:d,isTweetStorm:m,tweets:h}=e;const f=l.z.map((e=>({...e,title:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.av,{serviceName:e.icon}),e.title)})));return(0,r.createElement)(o.Modal,{onRequestClose:t,title:__("Social Previews","jetpack"),className:"jetpack-social-previews__modal"},n?(0,r.createElement)(s.Z,null):(0,r.createElement)(o.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:f,initialTabName:m?"twitter":null,orientation:"vertical"},(e=>(0,r.createElement)("div",null,(0,r.createElement)(e.preview,{title:i,description:u,url:p,author:d,image:a,isTweetStorm:m,tweets:h})))))}))},81310:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52605),s=n(36129);const __=a.__;t.Z=function(e){let{openModal:t,showUpgradeNudge:n}=e;const a=n?__("Learn more","jetpack"):__("Preview","jetpack",0),l=n?__("Learn more about paid plans","jetpack"):__("Open Social Previews","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-social-previews__panel"},(0,r.createElement)("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),n&&(0,r.createElement)("p",null,__("Business or eCommerce plan required.","jetpack")),(0,r.createElement)("div",{className:"jetpack-gutenberg-social-icons"},i.z.map((e=>(0,r.createElement)(s.av,{key:e.icon,serviceName:e.icon,className:"jetpack-social-previews__icon"})))),(0,r.createElement)(o.Button,{variant:"secondary",onClick:t,label:l},a))}},60859:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(69307),a=n(55609),o=n(65736),i=n(62369),s=n(97334),l=n(37447),c=n(23281),u=n(27087);const __=o.__;function p(){var e,t;const n=null===(e=(0,i.OZ)(u.u2))||void 0===e||null===(t=e.details)||void 0===t?void 0:t.required_plan,[o,p,d]=(0,c.Z)(n,(()=>{s.Z.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:n,block:u.u2})})),m=d?__("Redirecting…","jetpack"):__("Upgrade","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-social-previews__modal-upgrade"},(0,r.createElement)("img",{className:"jetpack-social-previews__upgrade-illustration",src:l,width:"351",height:"264",alt:""}),(0,r.createElement)("div",{className:"jetpack-social-previews__upgrade-description"},(0,r.createElement)("h2",{className:"jetpack-social-previews__upgrade-heading"},__("Upgrade to a Business plan to unlock the power of our SEO tools","jetpack")),(0,r.createElement)("ul",{className:"jetpack-social-previews__upgrade-feature-list"},(0,r.createElement)("li",null,__("Preview your site’s content as it will appear on Facebook, Twitter, and the WordPress.com Reader.","jetpack")),(0,r.createElement)("li",null,__("Control how page titles will appear on Google search results and social networks.","jetpack")),(0,r.createElement)("li",null,__("Customize your front page metadata to change how your site appears to search engines.","jetpack"))),(0,r.createElement)(a.Button,{href:o,variant:"primary",label:__("Purchase a Business plan to access social previews","jetpack"),onClick:p,target:"_top",isBusy:d},m)))}},7739:function(e,t,n){"use strict";function r(e){var t,n,r;return e?(null===(t=e.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||e.source_url:null}n.d(t,{i:function(){return r}})},712:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(89284);const __=i.__;t.Z=e=>{let{allowedMediaTypes:t,attributes:{mediaFiles:n},onSelectMedia:i}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!!n.length&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{title:__("Edit Story","jetpack"),onSelect:i,allowedTypes:t,addToGallery:!0,multiple:"add",value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(s.Z,{label:__("Edit Story","jetpack"),onClick:t})}}))))))}},46115:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(65736),l=n(11313),c=n(9818),u=n(52175),p=n(55609),d=n(9275),m=n(712),h=n(29241);const __=s.__,f=["image","video"],g=e=>{var t,n,r;const a=(0,i.pick)(e,["alt","title","id","link","type","mime","caption","width","height"]);return a.url=(0,i.get)(e,["media_details","original","url"])||(0,i.get)(e,["media_details","videopress","original"])||(0,i.get)(e,["media_details","sizes","large","source_url"])||(0,i.get)(e,["sizes","large","url"])||e.url,a.type=e.media_type||e.type,a.mime=e.mime_type||e.mime,a.title=(null===(t=a.title)||void 0===t?void 0:t.rendered)||a.title,a.width=a.width||(null===(n=e.media_details)||void 0===n?void 0:n.width),a.height=a.height||(null===(r=e.media_details)||void 0===r?void 0:r.height),a};t.Z=(0,p.withNotices)((function(e){let{attributes:t,className:n,isSelected:a,noticeOperations:i,noticeUI:s,setAttributes:p}=e;const{mediaFiles:b}=t,{lockPostSaving:v,unlockPostSaving:k}=(0,c.useDispatch)("core/editor"),y="storyBlockLock",E=e=>{const t=e.map((e=>{if(!isNaN(e)){return b.find((t=>t.id===e))||{id:e}}return e})).map(g),n=t.filter((e=>!(0,l.isBlobURL)(e.url)));t.length!==n.length?v(y):k(y),p({mediaFiles:t})},w=(0,r.createElement)(m.Z,{allowedMediaTypes:f,attributes:t,onSelectMedia:E}),_=!!b.length,C=(0,r.createElement)(u.MediaPlaceholder,{addToGallery:_,isAppender:_,className:n,disableMediaButtons:_&&!a,icon:!_&&d.qv,labels:{title:!_&&__("Story","jetpack"),instructions:!_&&__("Drag images and videos, upload new ones, or select files from your library.","jetpack")},onSelect:E,accept:f.map((e=>e+"/*")).join(","),allowedTypes:f,multiple:"add",value:b,notices:_?void 0:s,onError:i.createErrorNotice});return _?(0,r.createElement)(r.Fragment,null,w,s,(0,r.createElement)("div",{className:o()("wp-block-jetpack-story","wp-story",n)},(0,r.createElement)(h.Z,{slides:b,disabled:!a,showSlideCount:a,shadowDOM:{enabled:!1},playInFullscreen:!1,tapToPlayPause:!1,playOnNextSlide:!1})),a&&C):(0,r.createElement)(r.Fragment,null,w,C)}))},27526:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,n(5160).Z)((0,r.createElement)(a.G,null,(0,r.createElement)(a.Path,{d:"M17 5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2h9z"}),(0,r.createElement)(a.Path,{d:"M13 4H5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"}),(0,r.createElement)(a.Path,{d:"M7 16h8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"})));t.Z=o},9275:function(e,t,n){"use strict";n.d(t,{qv:function(){return i.Z},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(46115),o=n(41803),i=n(27526),s=n(61365),l=n(35338),c=n(15915);const __=r.__,_x=r._x,u={mediaFiles:[{alt:"",caption:"",mime:"image/jpg",type:"image",id:22,url:c}]},p="story",d={title:__("Story","jetpack"),category:(0,s.Z)("media","layout"),keywords:[_x("story","block search term","jetpack"),_x("image","block search term","jetpack"),_x("video","block search term","jetpack"),_x("gallery","block search term","jetpack")],description:__("Add an interactive story.","jetpack"),attributes:{settings:{type:"object"},mediaFiles:{type:"array",default:[]}},supports:{html:!1},icon:{src:i.Z,foreground:(0,l.m)()},edit:a.Z,save:o.Z,example:{attributes:u}}},10395:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(55609);function o(e){let{currentMedia:t}=e;const n=t&&"image"===t.type?t.url:null;return(0,r.createElement)("div",{className:"wp-story-background"},(0,r.createElement)("div",{className:"wp-story-background-image",style:{backgroundImage:n?`url("${n}")`:"none"}}),(0,r.createElement)("div",{className:"wp-story-background-blur"}),(0,r.createElement)(a.SVG,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0"},(0,r.createElement)("filter",{id:"gaussian-blur-18"},(0,r.createElement)("feGaussianBlur",{stdDeviation:"18"}))))}},50111:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609);const __=i.__;function l(e){let{isEllipsis:t,disabled:n,index:a,isSelected:l,progress:c,onClick:u}=e;const p=n||t;let d=null;return t||(d=l?(0,i.sprintf)(
51
  /* translators: %d: Slide number. */
52
  __("Slide %d, currently selected","jetpack"),a+1):(0,i.sprintf)(
53
  /* translators: %d: Slide number. */
@@ -99,10 +99,10 @@ _n("%d character remaining","%d characters remaining",l,"jetpack"),l)})}},47657:
99
  /* translators: placeholder is the product name of the plan. */
100
  __("To re-share a post, you need to upgrade to the %s plan","jetpack"),_)),(0,r.createElement)(l.Button,{href:v?null:g,onClick:b,target:"_top",icon:c.Z,className:o()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!g}),isBusy:v},v?__("Redirecting…","jetpack"):x)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,S),(0,r.createElement)("br",null),(0,s.sprintf)(
101
  /* translators: placeholder is the product name of the plan. */
102
- __("This feature is for sites with a %s plan.","jetpack"),_),(0,r.createElement)("br",null),(0,r.createElement)(l.ExternalLink,{href:j},__("More information.","jetpack")))}},64519:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(12238),o=n(62369);const i="republicize";function s(){var e,t;const{togglePublicizeFeature:n}=(0,r.useDispatch)("jetpack/publicize"),{available:s}=(0,o.OZ)(i),l=(0,r.useSelect)((e=>e(a.store).isCurrentPostPublished()),[]),c=(0,r.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),u=!(null===(e=window)||void 0===e||null===(t=e.Jetpack_Editor_Initial_State.jetpack)||void 0===t||!t.republicize_enabled),p=(0,o.X1)(i);return{isPublicizeEnabledMeta:c,isRePublicizeFeatureEnabled:u,isPublicizeEnabled:l&&!(p&&u)||c,togglePublicizeFeature:n,isPublicizeDisabledBySitePlan:u&&l&&p,isRePublicizeFeatureAvailable:s,isRePublicizeUpgradableViaUpsell:p,hideRePublicizeFeature:l&&!s&&!p&&u}}},28056:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(94333),a=n(12238),o=n(9818),i=n(69307);function s(e,t){const n=(0,o.useSelect)((e=>e(a.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{s&&!n&&e()}),[n,s,e,t])}},6082:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(86989),a=n.n(r),o=n(9818),i=n(12238),s=n(69307),l=n(65736),c=n(49806),u=n(23438);const __=l.__;function p(e){var t;const n=null==e?void 0:e.code,r=null==e||null===(t=e.errors)||void 0===t?void 0:t.length;if(!n&&!r)return!1;let a="";return n&&(a=__("Unable to share the Post","jetpack")),r&&(a=__("Unable to share the Post","jetpack")),{message:a,result:e}}function d(e){const{message:t}=(0,c.Z)(),{skippedConnections:n}=(0,u.Z)(),r=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||r;const[l,d]=(0,s.useState)({data:[],error:{}}),m=(0,s.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!l.isFetching)return d({...r,isFetching:!0}),a()({path:`/wpcom/v2/posts/${e}/publicize`,method:"POST",data:{message:t,skipped_connections:n}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return d((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));d((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:null==e?void 0:e.results,error:{}})))})).catch((e=>{d((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){d(r)}}),[e,t,n,l.isFetching]);return{...l,doPublicize:m}}},23438:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)("jetpack/publicize"),n=(0,r.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=n.filter((e=>!e.enabled)).map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:n&&n.some((e=>e.enabled)),skippedConnections:a,toggleById:t,refresh:e}}},49806:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818),a=n(12238);function o(){const{editPost:e}=(0,r.useDispatch)(a.store),{message:t,maxLength:n}=(0,r.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:n,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},31172:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(72067),i=n(12238),s=(n(96434),n(94642)),l=n(14040),c=n(47657);const __=a.__,u="publicize",p={render:()=>(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(s.ZP,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(c.Z,null)),(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack"))},(0,r.createElement)(c.Z,{prePublish:!0})))}},70490:function(e,t,n){"use strict";n.r(t),n.d(t,{refreshConnectionTestResults:function(){return a},toggleConnectionById:function(){return o},togglePublicizeFeature:function(){return i},fetchFromAPI:function(){return s},refreshTweets:function(){return l},setTweets:function(){return c},getTwitterCards:function(){return u},setTwitterCards:function(){return p}});var r=n(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function i(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function s(e){return{type:"FETCH_FROM_API",path:e}}function l(){return{type:"REFRESH_TWEETS"}}function c(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,r.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function p(e){return{type:"SET_TWITTER_CARDS",cards:e}}},60770:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},10061:function(e,t,n){"use strict";var r=n(92819),a=n(86989),o=n.n(a),i=n(4981),s=n(9818),l=n(12238),c=n(94642);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,s.select)("jetpack/publicize");return(0,r.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:c.H8.includes(e.name)?u(e.innerBlocks):[]}))};const p=(0,r.throttle)((async function(){const e=(0,s.select)("core/editor").getBlocks(),t=u(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,i.serialize)(e),clientId:e.clientId})))},method:"POST"}),n=(0,r.flatMap)(e,(e=>e.urls));return(0,s.dispatch)("jetpack/publicize").getTwitterCards(n),(0,s.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0});t.ZP={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{const e=await o()({path:"/wpcom/v2/publicize/connection-test-results"}),t=(0,s.select)("jetpack/publicize").getConnections(),n=e,r=[],a={done:!1,enabled:!0,toggleable:!0};for(const e of n){const n=t.find((t=>t.id===e.id)),{done:o,enabled:i,toggleable:s}=null!=n?n:a,l={display_name:e.display_name,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:o,enabled:i,toggleable:s};r.push(l)}return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:r})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const n=(0,s.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:e.id===t?!e.enabled:e.enabled})));return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:n})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,s.select)("jetpack/publicize").getFeatureEnableState();return(0,s.dispatch)(l.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:p,GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,s.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,s.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},96434:function(e,t,n){"use strict";var r=n(9818),a=n(70490),o=n(6965),i=n(61734),s=n(60770),l=n(37815);const c=(0,r.registerStore)("jetpack/publicize",{actions:a,controls:s.Z,reducer:l.Z,selectors:o});(0,i.Z)(c)},61734:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(10061);function s(e){const t=[a()(i.ZP)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},37815:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const n={};return t.urls.forEach((e=>n[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...n}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},6965:function(e,t,n){"use strict";n.r(t),n.d(t,{getFailedConnections:function(){return u},getMustReauthConnections:function(){return p},getTweetTemplate:function(){return d},getTweetStorm:function(){return m},getFirstTweet:function(){return h},getLastTweet:function(){return f},getSupportedBlockType:function(){return g},getTweetsForBlock:function(){return b},getTwitterCardForURLs:function(){return v},twitterCardIsCached:function(){return k},getShareMessage:function(){return y},getShareMessageMaxLength:function(){return E},isTweetStorm:function(){return w},getBoundariesForBlock:function(){return _},getBoundaryStyleSelectors:function(){return S},checkForTagsInContentAttributes:function(){return j},getPopoverWarnings:function(){return x},isSelectedTweetBoundary:function(){return P},contentAttributesChanged:function(){return T},getConnections:function(){return A},getFeatureEnableState:function(){return N}});var r=n(92819),a=n(19551),o=n(9818),i=n(65736),s=n(12238),l=n(94642);const __=i.__,c="\n\n"+__("A thread ⬇️","jetpack");function u(){return A().filter((e=>!1===e.test_success))}function p(){return A().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function d(e){const t=e.connections||A(),n=null==t?void 0:t.find((e=>"twitter"===e.service_name));return{date:Date.now(),name:(null==n?void 0:n.profile_display_name)||__("Account Name","jetpack"),profileImage:(null==n?void 0:n.profile_picture)||"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:(null==n?void 0:n.display_name)||""}}function m(e){const t=d(e),n=[h(e),...e.tweets.slice(0,100).map((n=>({...t,text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,card:v(e,n.urls)})))];return n.length>1&&n.push(f(e)),n}function h(e){var t,n,r,a;if(!(0,o.select)("core"))return;const i=d(e),{getMedia:s}=(0,o.select)("core"),{getEditedPostAttribute:l}=(0,o.select)("core/editor"),c=l("featured_media"),u=l("link"),p=c&&s(c),m=(null==p||null===(t=p.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||(null==p?void 0:p.source_url);return{...i,text:y()+` ${u}`,urls:[u],card:{title:l("title"),description:(null===(a=l("meta"))||void 0===a?void 0:a.advanced_seo_description)||l("excerpt")||l("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:u,image:m,type:m?"summary_large_image":"summary"}}}function f(e){if(!(0,o.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,o.select)("core/editor"),n=t("link"),r=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...h(e),text:`${r} ${n}`}}function g(e,t){if(l.nE[t])return l.nE[t]}const b=(0,a.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function v(e,t){if(t)return t.reduce(((t,n)=>t||(e.twitterCards[n]&&!e.twitterCards[n].error?{url:n,...e.twitterCards[n]}:void 0)),void 0)}function k(e,t){return!!e.twitterCards[t]}function y(){const{getEditedPostAttribute:e}=(0,o.select)("core/editor"),t=e("meta"),n=e("title"),a=(0,r.get)(t,["jetpack_publicize_message"],"");return a?a.substr(0,E()):w()&&n?n.substr(0,E())+c:""}function E(){return w()?255-c.length:255}function w(){var e;return!(null===(e=(0,o.select)("core/editor").getEditedPostAttribute("meta"))||void 0===e||!e.jetpack_is_tweetstorm)}const _=(0,a.Z)(((e,t)=>{if(!w())return[];const n=b(e,t);return n&&0!==n.length?n.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function C(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const n=e.parentNode,r=Array.prototype.indexOf.call(n.children,e);return C(n,t)+` > :nth-child( ${r+1} )`}const S=(0,a.Z)(((e,t)=>{const n=_(e,t),r=document.getElementById(`block-${t}`);return n.filter((e=>"end-of-line"===e.type)).map((e=>{if(!r)return!1;const n=r.getElementsByTagName("li").item(e.line);return!!n&&C(n,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function j(e,t,n){var r;if(0===n.length)return!1;if(null===(r=g(0,t.name))||void 0===r||!r.contentAttributes)return!1;const a=new RegExp(`<(${n.join("|")})( |>|/>)`,"gi");return g(0,t.name).contentAttributes.reduce(((e,n)=>!!e||a.test(t.attributes[n])),!1)}const x=(0,a.Z)(((e,t)=>{const{isTyping:n,isDraggingBlocks:r,isMultiSelecting:a,hasMultiSelection:i,isCaretWithinFormattedText:s}=(0,o.select)("core/block-editor");if(!w())return[];if(n()||r()||a()||i()||s())return[];const c=[];return g(0,t.name)||l.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&c.push(__("Twitter displays the first four images.","jetpack")),j(0,t,["strong","bold","em","i","sup","sub","span","s"])&&c.push(__("Twitter removes all text formatting.","jetpack")),j(0,t,["a"])&&c.push(__("Links will be posted seperately.","jetpack"))):c.push(__("This block is not exportable to Twitter","jetpack")),c}),(e=>[e.tweets]));function P(e,t){const{isBlockSelected:n}=(0,o.select)("core/block-editor");if(!w())return!1;const r=g(0,t.name),a=b(e,t.clientId);if(!a||0===a.length)return!1;const i=a[a.length-1];return n(t.clientId)&&!r||i.blocks[i.blocks.length-1].clientId===t.clientId&&a.some((e=>e.blocks.some((e=>n(e.clientId)))))}function T(e,t,n){const a=g(0,n.name);if(!a)return!1;const o=a.contentAttributes;return!(0,r.isEqual)(o.map((e=>({attribute:e,content:t.attributes[e]}))),o.map((e=>({attribute:e,content:n.attributes[e]}))))}function A(){return(0,o.select)(s.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function N(){const{getEditedPostAttribute:e}=(0,o.select)(s.store),t=e("meta");return(0,r.get)(t,["jetpack_publicize_feature_enabled"],!0)}},21966:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(65736),i=n(12238),s=n(9818),l=n(42103);const __=o.__;function c(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(a.CheckboxControl,{label:__("Show sharing buttons.","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}function u(){const e=(0,s.useSelect)((e=>e(i.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,s.useDispatch)(i.store);return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,(0,r.createElement)(c,{checked:e,onChange:t})))}},45685:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(21966);const a="sharing",o={render:r.Z}},88608:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},90778:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(62369),s=n(36129);const __=o.__;(0,i.Wp)()||(0,i.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},18914:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}function o(e){try{var t;return!(null==e||null===(t=e.parent)||void 0===t||!t.location.href)}catch(e){return!1}}function i(e,t){var n;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=[];if(!t||!e&&!e.length||!a(t))return s;const{currentDoc:l,currentWindow:c}=r(t);if(!o(c))return s;const u=null==c||null===(n=c.parent)||void 0===n?void 0:n.document;return l&&u?(s=e.filter((e=>{const t=u.querySelector(e),n=!!l.querySelector(e);return!(!t||n)&&(l.head.appendChild(t.cloneNode()),i&&t.remove(),!0)})),s):void 0}function s(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return s();const l=o.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${n}-${e.version}.${r}`,l.onload=s,i.appendChild(l)}}))}function l(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{bL:function(){return r},DT:function(){return i},Pp:function(){return s},Dz:function(){return l}})},35338:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(62369);const a=n(27655).O["Jetpack Green 40"];function o(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},18187:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),a=n.n(r),o=n(92819);function i(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,o.find)(e,{name:t});if(r)return r}return(0,o.find)(e,"isDefault")}(e,t);return n?n.name:null}},35730:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609);const __=i.__,_x=i._x;class l extends o.Component{constructor(){super(...arguments),a()(this,"state",{hasCopied:!1}),a()(this,"onCopy",(()=>this.setState({hasCopied:!0}))),a()(this,"onFinishCopy",(()=>this.setState({hasCopied:!1}))),a()(this,"onFocus",(e=>e.target.select()))}render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,o.createElement)("div",{className:"jetpack-clipboard-input"},(0,o.createElement)(s.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,o.createElement)(s.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=l},76750:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},27196:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(25158),s=n(57979);const __=o.__,l="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function c(e,t,n){const r=document.createElement("div");r.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}t.Z=function(e){let{trackSource:t,onPlay:n,onPause:o,onError:u,onTimeChange:p,onSkipForward:d,onJumpBack:m,currentTime:h,playStatus:f=s._5,onMetadataLoaded:g,loadWhenReady:b=!1,preload:v="metadata"}=e;const k=(0,r.useRef)(),y=()=>{k.current.play().catch((()=>{}))},E=()=>{k.current.pause(),(0,i.speak)(__("Paused","jetpack"),"assertive")};return(0,r.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,r.useEffect)((()=>{const e=k.current;e.preload=v;const t=new MediaElementPlayer(e,{...l,success:()=>b&&(null==e?void 0:e.load())});if(m||d){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(m){const n=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(c(n,__("Jump Back","jetpack"),m),"jumpBackwardButton")}if(d){const n=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(c(n,__("Skip Forward","jetpack"),d),"skipForwardButton")}}return n&&e.addEventListener("play",n),o&&e.addEventListener("pause",o),u&&e.addEventListener("error",u),g&&e.addEventListener("loadedmetadata",g),()=>{t.remove(),n&&e.removeEventListener("play",n),o&&e.removeEventListener("pause",o),u&&e.removeEventListener("error",u),g&&e.removeEventListener("loadedmetadata",g)}}),[n,o,u,m,d,g,b,v]),(0,r.useEffect)((()=>{var e;const[t,n]=!1===(null===(e=k.current)||void 0===e?void 0:e.paused)?[s.Wp,E]:[s._5,y],r=(0,a.debounce)(n,100);return s.Vy!==f&&t!==f&&r(),()=>{r.cancel()}}),[k,f,t]),(0,r.useEffect)((()=>{if(!p)return;const e=k.current,t=(0,a.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),n=e=>t(e.target.currentTime);return p&&(null==e||e.addEventListener("timeupdate",n)),()=>{t.cancel(),null==e||e.removeEventListener("timeupdate",n)}}),[k,p]),(0,r.useEffect)((()=>{const e=k.current;h&&e&&Math.abs(Math.floor(h-e.currentTime))>1&&(e.currentTime=h)}),[k,h]),(0,r.createElement)("div",{className:"jetpack-audio-player"},(0,r.createElement)("audio",{src:t,ref:k}))}},28743:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(52175),l=n(94726);function c(e){let{blockName:t,buttonLabel:n,href:a,icon:c,onClick:u,subtitle:p,title:d,className:m}=e;const{autosaveAndRedirect:h}=(0,l.Z)(a);return(0,r.createElement)(s.Warning,{actions:a&&[(0,r.createElement)(i.Button,{href:a,onClick:e=>{e.preventDefault(),u(t),h(e)},target:"_top",variant:"secondary"},n)],className:o()(m,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},c,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},d),p&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},p))))}},62474:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(4981),l=n(52175),c=n(55609),u=n(9818),p=n(39630),d=n(65736);const __=d.__,m=e=>{let{attributes:t,styleOption:n,viewportWidth:a,blockName:o}=e;const i=(0,s.getBlockType)(o);return(0,r.createElement)(l.BlockPreview,{viewportWidth:a,blocks:(c=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:n.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},h=r.memo?(0,r.memo)(m,((e,t)=>(0,i.isEqual)(e,t))):m;function f(e){let t,{attributes:n,clientId:a,styleOptions:i,onSelectStyle:s,activeStyle:d,viewportWidth:m,title:f}=e;return u.useSelect&&(t=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:i.map((e=>({title:e.label,isActive:e.value===d,onClick:()=>s({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:f||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},i.map((e=>{const a={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:o()("block-editor-block-styles__item",{"is-active":e.value===d}),onClick:()=>{s({style:e.value})},onKeyDown:t=>{p.ENTER!==t.keyCode&&p.SPACE!==t.keyCode||(t.preventDefault(),s({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:u.useSelect&&t&&(0,r.createElement)(h,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},46660:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(62309);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"jetpack-inspector-notice"},(0,r.createElement)("span",null,t),(0,r.createElement)(a.Z,{height:16,logoColor:"#1a1a1a",showText:!1}))}},84504:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(9818),l=n(65736),c=n(36129),u=n(57979),p=n(98618);const __=l.__;function d(e){let{skipForwardTime:t=5,jumpBackTime:n=5,playIcon:a="controls-play",pauseIcon:l="controls-pause",jumpBackIcon:d=c.Qv,skipForwardIcon:m=c._z,currenTimeDisplay:h=!0,onTimestampClick:f}=e;const{playerState:g,mediaCurrentTime:b,defaultMediaSource:v,mediaDomReference:k}=(0,s.useSelect)((e=>{const{getMediaSourceCurrentTime:t,getMediaPlayerState:n,getDefaultMediaSource:r,getMediaSourceDuration:a,getMediaSourceDomReference:o}=e(u.tT);return{playerState:n(),mediaCurrentTime:t(),mediaDuration:a(),defaultMediaSource:r(),mediaDomReference:o()}}),[]),y=(0,p.H)(b),E=!v,{toggleMediaSource:w,setMediaSourceCurrentTime:_}=(0,s.useDispatch)(u.tT);function C(e){!function(e){k&&(k.currentTime=e),_(v.id,e)}(e),k&&(k.currentTime=e)}return(0,r.createElement)(r.Fragment,null,!1!==n&&(0,r.createElement)(i.ToolbarButton,{icon:d,isDisabled:E,onClick:()=>C(b-n),label:__("Jump back","jetpack")}),(0,r.createElement)(i.ToolbarButton,{icon:g===u._5?a:l,isDisabled:E,onClick:function(){w(v.id)},label:__("Play","jetpack")}),t&&(0,r.createElement)(i.ToolbarButton,{icon:m,isDisabled:E,onClick:()=>C(b+t),label:__("Skip forward","jetpack")}),h&&(0,r.createElement)(i.ToolbarButton,{className:o()("media-player-control__current-time",{"is-disabled":E}),label:__("Set timestamp","jetpack"),onClick:()=>f(b)},y))}function m(e){return(0,r.createElement)(i.ToolbarGroup,{className:"media-player-control__toolbar"},(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(d,e))))}},98618:function(e,t,n){"use strict";n.d(t,{H:function(){return r},i:function(){return a}});const r=mejs.Utils.secondsToTimeCode,a=mejs.Utils.timeCodeToSeconds},94978:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,o.createElement)(i.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.Z=s},12321:function(e,t,n){"use strict";n.d(t,{mj:function(){return r},DW:function(){return a},Bn:function(){return o},DM:function(){return i}});const r=0,a=1,o="payment-plan",i="subscription"},2372:function(e,t,n){"use strict";n.d(t,{a:function(){return o},Q:function(){return i}});var r=n(69307),a=n(12321);const o=(0,r.createContext)({blockName:void 0,clientId:void 0,products:[],productType:a.Bn,selectedProductId:0,setSelectedProductId:()=>{}}),i=()=>(0,r.useContext)(o)},94322:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(52175),o=n(9818),i=n(12321),s=n(2372),l=n(42004),c=n(98451),u=n(71817),p=n(53413),d=n(40975);function m(e){let{blockName:t,clientId:n,productType:m=i.Bn,selectedProductId:h=0,setSelectedProductId:f=(()=>{})}=e;const g=(0,o.useSelect)((e=>e(d.h).getProducts(m,h,f)),[]),{connectUrl:b,isApiConnected:v,isSelectedProductInvalid:k,shouldUpgrade:y}=(0,o.useSelect)((e=>{const{getConnectUrl:t,getShouldUpgrade:n,isApiStateConnected:r,isInvalidProduct:a}=e(d.h);return{connectUrl:t(),isApiConnected:r(),isSelectedProductInvalid:a(h),shouldUpgrade:n()}}));if(y)return null;const E={blockName:t,clientId:n,products:g,productType:m,selectedProductId:h,setSelectedProductId:f};return(0,r.createElement)(s.a.Provider,{value:E},!v&&!!b&&(0,r.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(p.Z,{blockName:t,connectUrl:b})),v&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,null)),v&&k&&(0,r.createElement)(u.Z,null))}},42004:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(52175),o=n(55609),i=n(9818),s=n(65736),l=n(63425),c=n(12321),u=n(2372),p=n(31082),d=n(76369),m=n(40975);const __=s.__;function h(){const{productType:e,setSelectedProductId:t}=(0,u.Q)(),n=(0,i.useSelect)((e=>e(m.h).getSiteSlug())),{saveProduct:s}=(0,i.useDispatch)(m.h),[h,f]=(0,r.useState)(c.mj),[g,b]=(0,r.useState)((0,p.l)("default new product title",e)),[v,k]=(0,r.useState)("USD"),[y,E]=(0,r.useState)(5),[w,_]=(0,r.useState)("1 month"),C=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}];return(0,r.createElement)(a.InspectorControls,null,n&&(0,r.createElement)(o.PanelBody,null,(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${n}`},(0,p.l)("manage your products",e))),(0,r.createElement)(o.PanelBody,{title:(0,p.l)("add a new product",e),initialOpen:!0,className:"product-management-control-inspector__add-plan"},h===c.DW&&(0,r.createElement)(o.Placeholder,{icon:l.Z,label:(0,p.l)("saving product",e)},(0,r.createElement)(o.Spinner,null)),h===c.mj&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,r.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>b(e),value:g})),(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,r.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>k(e),options:d.Xy,value:v}),(0,r.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>E(e),type:"number",value:y})),(0,r.createElement)(o.PanelRow,{className:"plan-interval"},(0,r.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>_(e),options:C,value:w})),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{onClick:n=>{n.preventDefault(),f(c.DW),s({title:g,currency:v,price:y,interval:w},e,t,(e=>{f(c.mj),e&&(E(5),b(""))}))},variant:"secondary"},(0,p.l)("add product",e))))))}},71817:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(52175),o=n(77423),i=n(25957),s=n(2372),l=n(31082);function c(){const{productType:e}=(0,s.Q)();return(0,r.createElement)(a.Warning,{className:"product-management-control-nudge"},(0,r.createElement)("span",{className:"product-management-control-nudge__info"},(0,r.createElement)(o.Z,{icon:i.Z}),(0,r.createElement)("span",{className:"product-management-control-nudge__text-container"},(0,r.createElement)("span",{className:"product-management-control-nudge__title"},(0,l.l)("invalid product configured for this block",e)),(0,r.createElement)("span",{className:"product-management-control-nudge__message"},(0,l.l)("the button will be hidden from your visitors until you select a valid product",e)))))}},98451:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(69307),a=n(1532),o=n(52175),i=n(55609),s=n(9818),l=n(65736),c=n(84375),u=n(59758),p=n(25957),d=n(2372),m=n(50335),h=n(31082),f=n(40975);const __=l.__;function g(e){const{currency:t,interval:n,price:r}=e,o=(0,a.ZP)(parseFloat(r),t);switch(n){case"1 month":return(0,l.sprintf)(// translators: %s: amount
1
  /*! For license information please see editor-beta.js.LICENSE.txt */
2
+ !function(){var e,t,n,r,a,o,i={64140:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3779:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},8172:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(31354),a=n(64803);function o(e){var t=(0,r.Z)(e);return function(e){return(0,a.Z)(t,e)}}},64803:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function a(e,t){var n,a,o,i,s,l,c=[];for(n=0;n<e.length;n++){if(s=e[n],i=r[s]){for(a=i.length,o=Array(a);a--;)o[a]=c.pop();try{l=i.apply(null,o)}catch(e){return e}}else l=t.hasOwnProperty(s)?t[s]:+s;c.push(l)}return c[0]}},7478:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8172);function a(e){var t=(0,r.Z)(e);return function(e){return+t({n:e})}}},31354:function(e,t,n){"use strict";var r,a,o,i;function s(e){for(var t,n,s,l,c=[],u=[];t=e.match(i);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);l=u.pop();){if(o[n]){if(o[n][0]===l){n=o[n][1]||n;break}}else if(a.indexOf(l)>=0||r[l]<r[n]){u.push(l);break}c.push(l)}o[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(u.reverse())}n.d(t,{Z:function(){return s}}),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],o={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/},702:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function a(e,t){var n;if(!Array.isArray(t))for(t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return n=1,e.replace(r,(function(){var e,r,a,o,i;return e=arguments[3],r=arguments[5],"%"===(o=arguments[9])?"%":("*"===(a=arguments[7])&&(a=t[n-1],n++),void 0!==r?t[0]&&"object"==typeof t[0]&&t[0].hasOwnProperty(r)&&(i=t[0][r]):(void 0===e&&(e=n),n++,i=t[e-1]),"f"===o?i=parseFloat(i)||0:"d"===o&&(i=parseInt(i)||0),void 0!==a&&("f"===o?i=i.toFixed(a):"s"===o&&(i=i.substr(0,a))),null!=i?i:"")}))}},77423:function(e,t,n){"use strict";var r=n(69307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},43445:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.Z=o},84375:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=o},85812:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}));t.Z=o},2427:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.Z=o},63425:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}));t.Z=o},33802:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.Z=o},50128:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.Z=o},59758:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"}));t.Z=o},62859:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=o},25957:function(e,t,n){"use strict";var r=n(69307),a=n(70444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(a.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=o},81326:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)a(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function a(e,a){if(a){var o=typeof a;"string"===o?function(e,t){for(var n=t.split(r),a=n.length,o=0;o<a;++o)e[n[o]]=!0}(e,a):Array.isArray(a)?t(e,a):"object"===o?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,a):"number"===o&&function(e,t){e[t]=!0}(e,a)}}return function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=new e;t(o,r);var i=[];for(var s in o)o[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},89105:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},92213:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,a,o,i=-1;for(t=0,a=e.length;t<a;t+=1){for(o=255&(i^e[t]),r=0;r<8;r+=1)1==(1&o)?o=o>>>1^n:o>>>=1;i=i>>>8^o}return-1^i}function a(e,n){var r,o,i;if(void 0!==a.crc&&n&&e||(a.crc=-1,e)){for(r=a.crc,o=0,i=e.length;o<i;o+=1)r=r>>>8^t[255&(r^e[o])];return a.crc=r,-1^r}}!function(){var e,r,a;for(r=0;r<256;r+=1){for(e=r,a=0;a<8;a+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):a(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=a}()},97115:function(e){"use strict";var t="%[a-f0-9]{2}",n=new RegExp(t,"gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(n),a(r))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=r.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var a=o(n[0]);a!==n[0]&&(t[n[0]]=a)}n=r.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),s=0;s<i.length;s++){var l=i[s];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},89453:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2571:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,a,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var a,o,i,c;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=l(e))>0&&i.length>a&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=u.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(o){r.once&&e.removeEventListener(t,a),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,a,o,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(a=o[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},o.prototype.listenerCount=m,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},96342:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function a(a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},x=[],P=0;if(isNaN(a))throw new TypeError("Invalid number");if(s=!0===j.bits,k=!0===j.unix,g=!0===j.pad,i=j.base||10,b=void 0!==j.round?j.round:k?1:2,p=void 0!==j.locale?j.locale:"",d=j.localeOptions||{},y=void 0!==j.separator?j.separator:"",E=void 0!==j.spacer?j.spacer:k?"":" ",_=j.symbols||{},w=2===i?j.standard||"iec":"jedec",f=j.output||"string",c=!0===j.fullform,u=j.fullforms instanceof Array?j.fullforms:[],o=void 0!==j.exponent?j.exponent:-1,C=r[j.roundingMethod]||Math.round,m=(h=Number(a))<0,l=i>2?1e3:1024,S=!1===isNaN(j.precision)?parseInt(j.precision,10):0,m&&(h=-h),(-1===o||isNaN(o))&&(o=Math.floor(Math.log(h)/Math.log(l)))<0&&(o=0),o>8&&(S>0&&(S+=8-o),o=8),"exponent"===f)return o;if(0===h)x[0]=0,v=x[1]=k?"":t[w][s?"bits":"bytes"][o];else{P=h/(2===i?Math.pow(2,10*o):Math.pow(1e3,o)),s&&(P*=8)>=l&&o<8&&(P/=l,o++);var T=Math.pow(10,o>0?b:0);x[0]=C(P*T)/T,x[0]===l&&o<8&&void 0===j.exponent&&(x[0]=1,o++),v=x[1]=10===i&&1===o?s?"kbit":"kB":t[w][s?"bits":"bytes"][o],k&&(x[1]=x[1].charAt(0),e.test(x[1])&&(x[0]=Math.floor(x[0]),x[1]=""))}if(m&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=_[x[1]]||x[1],!0===p?x[0]=x[0].toLocaleString():p.length>0?x[0]=x[0].toLocaleString(p,d):y.length>0&&(x[0]=x[0].toString().replace(".",y)),g&&!1===Number.isInteger(x[0])&&b>0){var A=y||".",N=x[0].toString().split(A),I=N[1]||"",B=I.length,M=b-B;x[0]="".concat(N[0]).concat(A).concat(I.padEnd(B+M,"0"))}return c&&(x[1]=u[o]?u[o]:n[w][o]+(s?"bit":"byte")+(1===x[0]?"":"s")),"array"===f?x:"object"===f?{value:x[0],symbol:x[1],exponent:o,unit:v}:x.join(E)}return a.partial=function(e){return function(t){return a(t,e)}},a}()},95946:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],s=e[i];(a?-1!==t.indexOf(i):t(i,s,e))&&(n[i]=s)}return n}},95949:function(e,t,n){"use strict";var r=n(53566),a=n(48282);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var a=0;a<e.length;a+=this._delta32)this._update(e,a,a+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var a=1;a<n;a++)r[a]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[a++]=0;r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=e>>>24&255,r[a++]=e>>>16&255,r[a++]=e>>>8&255,r[a++]=255&e}else for(r[a++]=255&e,r[a++]=e>>>8&255,r[a++]=e>>>16&255,r[a++]=e>>>24&255,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,o=8;o<this.padLength;o++)r[a++]=0;return r}},69016:function(e,t,n){"use strict";var r=n(53566),a=n(95949),o=n(47574),i=r.rotl32,s=r.sum32,l=r.sum32_5,c=o.ft_1,u=a.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var a=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],m=this.h[4];for(r=0;r<n.length;r++){var h=~~(r/20),f=l(i(a,5),c(h,o,u,d),m,n[r],p[h]);m=d,d=u,u=i(o,30),o=a,a=f}this.h[0]=s(this.h[0],a),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],m)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},47574:function(e,t,n){"use strict";var r=n(53566).rotr32;function a(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function i(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?a(t,n,r):1===e||3===e?i(t,n,r):2===e?o(t,n,r):void 0},t.ch32=a,t.maj32=o,t.p32=i,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},53566:function(e,t,n){"use strict";var r=n(48282),a=n(59503);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=a,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)n.push(parseInt(e[a]+e[a+1],16))}else for(var r=0,a=0;a<e.length;a++){var i=e.charCodeAt(a);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):o(e,a)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++a)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(a=0;a<e.length;a++)n[a]=0|e[a];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=s(e[n].toString(16));return t},t.htonl=i,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var a=e[r];"little"===t&&(a=i(a)),n+=l(a.toString(16))}return n},t.zero2=s,t.zero8=l,t.join32=function(e,t,n,a){var o=n-t;r(o%4==0);for(var i=new Array(o/4),s=0,l=t;s<i.length;s++,l+=4){var c;c="big"===a?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],i[s]=c>>>0}return i},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,a=0;r<e.length;r++,a+=4){var o=e[r];"big"===t?(n[a]=o>>>24,n[a+1]=o>>>16&255,n[a+2]=o>>>8&255,n[a+3]=255&o):(n[a+3]=o>>>24,n[a+2]=o>>>16&255,n[a+1]=o>>>8&255,n[a]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,a){return e+t+n+r+a>>>0},t.sum64=function(e,t,n,r){var a=e[t],o=r+e[t+1]>>>0,i=(o<r?1:0)+n+a;e[t]=i>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,a,o,i,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+o>>>0)<o?1:0,e+n+a+i+(l+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,a,o,i,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,a,o,i,s,l,c){var u=0,p=t;return u+=(p=p+r>>>0)<t?1:0,u+=(p=p+o>>>0)<o?1:0,u+=(p=p+s>>>0)<s?1:0,e+n+a+i+l+(u+=(p=p+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,a,o,i,s,l,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},72918:function(e,t,n){"use strict";var r=n(97997),a=n(79497),o=n(57513),i=n.n(o),s=n(83039),l=n(88090),c=n(75565),u=n.n(c),p=n(69016),d=n.n(p),m=n(2571),h=n(702),f=n(16044),g=i()("i18n-calypso"),b="number_format_decimals",v="number_format_thousands_sep",k="messages",y=[function(e){return e}],E={};function w(){x.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function _(e){return Array.prototype.slice.call(e)}function C(e){var t=e[0];("string"!=typeof t||e.length>3||e.length>2&&"object"==typeof e[1]&&"object"==typeof e[2])&&w("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",_(e),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===e.length&&"string"==typeof t&&"string"==typeof e[1]&&w("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",_(e));for(var n={},r=0;r<e.length;r++)"object"==typeof e[r]&&(n=e[r]);if("string"==typeof t?n.original=t:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof e[1]&&(n.plural=e[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function S(e,t){return e.dcnpgettext(k,t.context,t.original,t.plural,t.count)}function j(e,t){for(var n=y.length-1;n>=0;n--){var r=y[n](Object.assign({},t)),a=r.context?r.context+""+r.original:r.original;if(e.state.locale[a])return S(e.state.tannin,r)}return null}function x(){if(!(this instanceof x))return new x;this.defaultLocaleSlug="en",this.defaultPluralForms=function(e){return 1===e?0:1},this.state={numberFormatSettings:{},tannin:void 0,locale:void 0,localeSlug:void 0,textDirection:void 0,translations:u()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new m.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}x.throwErrors=!1,x.prototype.on=function(){var e;(e=this.stateObserver).on.apply(e,arguments)},x.prototype.off=function(){var e;(e=this.stateObserver).off.apply(e,arguments)},x.prototype.emit=function(){var e;(e=this.stateObserver).emit.apply(e,arguments)},x.prototype.numberFormat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof t?t:t.decimals||0,r=t.decPoint||this.state.numberFormatSettings.decimal_point||".",a=t.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return(0,f.Z)(e,n,r,a)},x.prototype.configure=function(e){Object.assign(this,e||{}),this.setLocale()},x.prototype.setLocale=function(e){var t,n,r;if(e&&e[""]&&e[""]["key-hash"]){var o=e[""]["key-hash"],i=function(e,t){var n=!1===t?"":String(t);if(void 0!==E[n+e])return E[n+e];var r=d()().update(e).digest("hex");return E[n+e]=t?r.substr(0,t):r},s=function(e){return function(t){return t.context?(t.original=i(t.context+String.fromCharCode(4)+t.original,e),delete t.context):t.original=i(t.original,e),t}};if("sha1"===o.substr(0,4))if(4===o.length)y.push(s(!1));else{var c=o.substr(5).indexOf("-");if(c<0){var u=Number(o.substr(5));y.push(s(u))}else for(var p=Number(o.substr(5,c)),m=Number(o.substr(6+c)),h=p;h<=m;h++)y.push(s(h))}}if(e&&e[""].localeSlug)if(e[""].localeSlug===this.state.localeSlug){if(e===this.state.locale)return;Object.assign(this.state.locale,e)}else this.state.locale=Object.assign({},e);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug,plural_forms:this.defaultPluralForms}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.textDirection=(null===(t=this.state.locale["text directionltr"])||void 0===t?void 0:t[0])||(null===(n=this.state.locale[""])||void 0===n||null===(r=n.momentjs_locale)||void 0===r?void 0:r.textDirection),this.state.tannin=new l.Z((0,a.Z)({},k,this.state.locale)),this.state.numberFormatSettings.decimal_point=S(this.state.tannin,C([b])),this.state.numberFormatSettings.thousands_sep=S(this.state.tannin,C([v])),this.state.numberFormatSettings.decimal_point===b&&(this.state.numberFormatSettings.decimal_point="."),this.state.numberFormatSettings.thousands_sep===v&&(this.state.numberFormatSettings.thousands_sep=","),this.stateObserver.emit("change")},x.prototype.getLocale=function(){return this.state.locale},x.prototype.getLocaleSlug=function(){return this.state.localeSlug},x.prototype.isRtl=function(){return"rtl"===this.state.textDirection},x.prototype.addTranslations=function(e){for(var t in e)""!==t&&(this.state.tannin.data.messages[t]=e[t]);this.stateObserver.emit("change")},x.prototype.hasTranslation=function(){return!!j(this,C(arguments))},x.prototype.translate=function(){var e=C(arguments),t=j(this,e);if(t||(t=S(this.state.tannin,e)),e.args){var n=Array.isArray(e.args)?e.args.slice(0):[e.args];n.unshift(t);try{t=h.Z.apply(void 0,(0,r.Z)(n))}catch(e){if(!window||!window.console)return;var a=this.throwErrors?"error":"warn";"string"!=typeof e?window.console[a](e):window.console[a]("i18n sprintf error:",n)}}return e.components&&(t=(0,s.Z)({mixedString:t,components:e.components,throwErrors:this.throwErrors})),this.translateHooks.forEach((function(n){t=n(t,e)})),t},x.prototype.reRenderTranslations=function(){g("Re-rendering all translations due to external request"),this.stateObserver.emit("change")},x.prototype.registerComponentUpdateHook=function(e){this.componentUpdateHooks.push(e)},x.prototype.registerTranslateHook=function(e){this.translateHooks.push(e)},t.Z=x},52059:function(e,t,n){"use strict";n.d(t,{Y4:function(){return l}});var r=n(72918),a=n(24575),o=n(53198),i=n(90717),s=new r.Z,l=s.numberFormat.bind(s),c=(s.translate.bind(s),s.configure.bind(s),s.setLocale.bind(s),s.getLocale.bind(s),s.getLocaleSlug.bind(s),s.addTranslations.bind(s),s.reRenderTranslations.bind(s),s.registerComponentUpdateHook.bind(s),s.registerTranslateHook.bind(s),s.state,s.stateObserver,s.on.bind(s),s.off.bind(s),s.emit.bind(s),(0,a.Z)(s),(0,o.Z)(s),(0,i.Z)(s));c.useRtl,c.withRtl},24575:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(42385),a=n(97469),o=n(92201),i=n(31551),s=n(29991),l=n(56245),c=n(79497),u=n(99196),p=n.n(u);function d(e){var t={numberFormat:e.numberFormat.bind(e),translate:e.translate.bind(e)};return function(n){var u,d,m=n.displayName||n.name||"";return d=u=function(u){(0,s.Z)(m,u);var d=(0,l.Z)(m);function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,c.Z)((0,i.Z)(e),"boundForceUpdate",e.forceUpdate.bind((0,i.Z)(e))),e}return(0,o.Z)(m,[{key:"componentDidMount",value:function(){e.on("change",this.boundForceUpdate)}},{key:"componentWillUnmount",value:function(){e.off("change",this.boundForceUpdate)}},{key:"render",value:function(){var a=(0,r.Z)({locale:e.getLocaleSlug()},this.props,{},t);return p().createElement(n,a)}}]),m}(p().Component),(0,c.Z)(u,"displayName","Localized("+m+")"),d}}},16044:function(e,t,n){"use strict";function r(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,o=isFinite(+t)?Math.abs(t):0,i=void 0===r?",":r,s=void 0===n?".":n,l="";return l=(o?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,o):""+Math.round(a)).split("."),l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(l[1]||"").length<o&&(l[1]=l[1]||"",l[1]+=new Array(o-l[1].length+1).join("0")),l.join(s)}n.d(t,{Z:function(){return r}})},90717:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(37665),a=n(99196),o=n.n(a),i=n(20036),s=n(94333);function l(e){var t={getCurrentValue:function(){return e.isRtl()},subscribe:function(t){return e.on("change",t),function(){return e.off("change",t)}}};function n(){return(0,i.useSubscription)(t)}var l=(0,s.createHigherOrderComponent)((function(e){return(0,a.forwardRef)((function(t,a){var i=n();return o().createElement(e,(0,r.Z)({},t,{isRtl:i,ref:a}))}))}),"WithRTL");return{useRtl:n,withRtl:l}}},53198:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(27101),a=n(99196),o=n.n(a);function i(e){function t(){var t=e.translate.bind(e);return Object.defineProperty(t,"localeSlug",{get:e.getLocaleSlug.bind(e)}),t}return function(){var n=o().useState(t),a=(0,r.Z)(n,2),i=a[0],s=a[1];return o().useEffect((function(){var n=function(){return s(t)};return e.on("change",n),function(){return e.off("change",n)}}),[]),i}}},59503:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},35166:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var a,o=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},b=function(e,t){return t?g(f(e)):f(e)},v=function(e){return b(e,!0)};r.Uint8Array&&(a=function(e,t){for(var n="",r=0,a=e.length;r<a;r+=3){var o=e[r],i=e[r+1],l=e[r+2],c=o<<16|i<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==i?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(y,E)},_=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),a=[c(r>>>16),c(r>>>8&255),c(255&r)];return a.length-=[0,0,2,1][n],a.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return w(C(e))},x=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},P=function(e){return j(x(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(x(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:P,toBase64:b,utob:d,encode:b,encodeURI:v,btou:w,decode:P,noConflict:T,fromUint8Array:a,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return P(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return b(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return b(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},30045:function(e,t,n){"use strict";function r(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===a(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(49872)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===a(n))return!function(e){return"[object RegExp]"===a(e)}(n.validate)?o(n.validate)?r.validate=n.validate:c(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===a(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,r=e.__last_index__,a=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=a,this.text=a,this.url=a}function d(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function m(e,t){if(!(this instanceof m))return new m(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},m.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,a,o,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(a=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+a;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=i)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},m.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(d(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(d(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},49872:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(26285).source,t.src_Cc=n(84080).source,t.src_Z=n(76202).source,t.src_P=n(87696).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+"[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},47595:function(e,t,n){"use strict";const r=n(22199),a=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),m=Symbol("updateAgeOnGet"),h=()=>1;const f=(e,t,n)=>{const r=e[d].get(t);if(r){const t=r.value;if(g(e,t)){if(v(e,r),!e[s])return}else n&&(e[m]&&(r.value.now=Date.now()),e[p].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},b=e=>{if(e[o]>e[a])for(let t=e[p].tail;e[o]>e[a]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[o]-=n.length,e[d].delete(n.key),e[p].removeNode(t)}};class k{constructor(e,t,n,r,a){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=a||0}}const y=(e,t,n,r)=>{let a=n.value;g(e,a)&&(v(e,n),e[s]||(a=void 0)),a&&t.call(r,a.value,a.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[a]=e.max||1/0;const t=e.length||h;if(this[i]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[m]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[a]=e||1/0,b(this)}get max(){return this[a]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,b(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[i]&&(this[i]=e,this[o]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),b(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const r=n.prev;y(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const r=n.next;y(this,e,n,t),n=r}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[p]=new r,this[o]=0}dump(){return this[p].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[i](t,e);if(this[d].has(e)){if(s>this[a])return v(this,this[d].get(e)),!1;const i=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[o]+=s-i.length,i.length=s,this.get(e),b(this),!0}const m=new k(e,t,s,r,n);return m.length>this[a]?(this[c]&&this[c](e,t),!1):(this[o]+=m.length,this[p].unshift(m),this[d].set(e,this[p].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return f(this,e,!0)}peek(e){return f(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{const e=a-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[d].forEach(((e,t)=>f(this,t,!1)))}}},75565:function(e,t,n){var r=n(2571),a=n(59503);function o(e){if(!(this instanceof o))return new o(e);"number"==typeof e&&(e={max:e}),e||(e={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}e.exports=o,a(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},o.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},o.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},o.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},o.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge)||(this.remove(e),this.emit("evict",{key:e,value:t.value}),!1)},o.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},o.prototype.evict=function(){if(this.tail){var e=this.tail,t=this.remove(this.tail);this.emit("evict",{key:e,value:t})}}},29337:function(e,t,n){"use strict";e.exports=n(46202)},99257:function(e,t,n){"use strict";e.exports=n(60231)},95319:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},95918:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=a},11825:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function a(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(99257);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(87696);t.lib={},t.lib.mdurl=n(36664),t.lib.ucmicro=n(39126),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=a,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return a(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},67649:function(e,t,n){"use strict";t.parseLinkLabel=n(34122),t.parseLinkDestination=n(39438),t.parseLinkTitle=n(43587)},39438:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(a=e.charCodeAt(t)))return s;if(60===a)return s;if(62===a)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===a&&t+1<n?t+=2:t++}return s}for(o=0;t<n&&32!==(a=e.charCodeAt(t))&&!(a<32||127===a);)if(92===a&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===a&&++o>32)return s;if(41===a){if(0===o)break;o--}t++}return i===t||0!==o||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},34122:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0===--r){a=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===o)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return a&&(s=e.pos),e.pos=c,s}},43587:function(e,t,n){"use strict";var r=n(11825).unescapeAll;e.exports=function(e,t,n){var a,o,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<n;){if((a=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===a&&41===o)return l;10===a?i++:92===a&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},46202:function(e,t,n){"use strict";var r=n(11825),a=n(67649),o=n(5210),i=n(22237),s=n(77711),l=n(85631),c=n(30045),u=n(36664),p=n(74108),d={default:n(62679),zero:n(20255),commonmark:n(2367)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new o,this.linkify=new c,this.validateLink=f,this.normalizeLink=b,this.normalizeLinkText=v,this.utils=r,this.helpers=r.assign({},a),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},77711:function(e,t,n){"use strict";var r=n(91479),a=[["table",n(69200),["paragraph","reference"]],["code",n(72348)],["fence",n(98779),["paragraph","reference","blockquote","list"]],["blockquote",n(84679),["paragraph","reference","blockquote","list"]],["hr",n(11227),["paragraph","reference","blockquote","list"]],["list",n(84871),["paragraph","reference","blockquote"]],["reference",n(10175)],["html_block",n(37186),["paragraph","reference","blockquote"]],["heading",n(7768),["paragraph","reference","blockquote"]],["lheading",n(27375)],["paragraph",n(29967)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,n){for(var r,a=this.ruler.getRules(""),o=a.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<o&&!a[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},o.prototype.parse=function(e,t,n,r){var a;e&&(a=new this.State(e,t,n,r),this.tokenize(a,a.line,a.lineMax))},o.prototype.State=n(52602),e.exports=o},22237:function(e,t,n){"use strict";var r=n(91479),a=[["normalize",n(8668)],["block",n(67082)],["inline",n(10631)],["linkify",n(29658)],["replacements",n(34803)],["smartquotes",n(74209)]];function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}o.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},o.prototype.State=n(73172),e.exports=o},85631:function(e,t,n){"use strict";var r=n(91479),a=[["text",n(13252)],["newline",n(30938)],["escape",n(4833)],["backticks",n(89362)],["strikethrough",n(24860).w],["emphasis",n(62693).w],["link",n(62947)],["image",n(4373)],["autolink",n(11360)],["html_inline",n(52987)],["entity",n(27843)]],o=[["balance_pairs",n(26961)],["strikethrough",n(24860).g],["emphasis",n(62693).g],["text_collapse",n(93831)]];function i(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,a=this.ruler.getRules(""),o=a.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<o&&(e.level++,t=a[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),a=r.length,o=e.posMax,i=e.md.options.maxNesting;e.pos<o;){if(e.level<i)for(n=0;n<a&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var a,o,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(o=this.ruler2.getRules("")).length,a=0;a<i;a++)o[a](s)},i.prototype.State=n(39247),e.exports=i},2367:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},62679:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},20255:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},5210:function(e,t,n){"use strict";var r=n(11825).assign,a=n(11825).unescapeAll,o=n(11825).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,a){var i=e[t];return"<code"+a.renderAttrs(i)+">"+o(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,a){var i=e[t];return"<pre"+a.renderAttrs(i)+"><code>"+o(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?a(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||o(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,a){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=a.renderInlineAsText(o.children,n,r),a.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return o(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,a="",o=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(a+="\n"),a+=(-1===i.nesting?"</":"<")+i.tag,a+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(a+=" /"),i.block&&(o=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(o=!1)),a+=o?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,a="",o=this.rules,i=0,s=e.length;i<s;i++)void 0!==o[r=e[i].type]?a+=o[r](e,i,t,n,this):a+=this.renderToken(e,i,t);return a},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",a=0,o=e.length;a<o;a++)"text"===e[a].type?r+=e[a].content:"image"===e[a].type?r+=this.renderInlineAsText(e[a].children,t,n):"softbreak"===e[a].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,a,o,i="",s=this.rules;for(r=0,a=e.length;r<a;r++)"inline"===(o=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[o]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},91479:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),a=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=a.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var a=this.__find__(e),o=r||{};if(-1===a)throw new Error("Parser rule not found: "+e);this.__rules__.splice(a+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},84679:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S=e.lineMax,j=e.bMarks[t]+e.tShift[t],x=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(j++))return!1;if(a)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[t]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[t]+(o?1:0))%4:m++,j++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=j>=x,v=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=j-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((j=e.bMarks[d]+e.tShift[d])>=(x=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(j++)||C){if(u)break;for(E=!1,s=0,c=w.length;s<c;s++)if(w[s](e,d,n,!0)){E=!0;break}if(E){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),v.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(j)?(j++,l++,m++,o=!1,y=!0):9===e.src.charCodeAt(j)?(y=!0,(e.bsCount[d]+m)%4==3?(j++,l++,m++,o=!1):o=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=j;j<x&&(i=e.src.charCodeAt(j),r(i));)9===i?m+=4-(m+e.bsCount[d]+(o?1:0))%4:m++,j++;u=j>=x,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),v.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=j-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=b,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=v[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},72348:function(e){"use strict";e.exports=function(e,t,n){var r,a,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(a=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;a=++r}return e.line=a,(o=e.push("code_block","code",0)).content=e.getLines(t,a,4+e.blkIndent,!1)+"\n",o.map=[t,e.line],!0}},98779:function(e){"use strict";e.exports=function(e,t,n,r){var a,o,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(a=e.src.charCodeAt(d))&&96!==a)return!1;if(l=d,(o=(d=e.skipChars(d,a))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===a&&i.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===a&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,a))-l<o||(d=e.skipSpaces(d))<m)){p=!0;break}return o=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},7768:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,o=e.src.charCodeAt(++c);35===o&&c<u&&i<=6;)i++,o=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(o))&&(a||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},11227:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t,n,a){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&i++}return!(i<3)&&(a||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)}},37186:function(e,t,n){"use strict";var r=n(95319),a=n(95918).q,o=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(a.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),a=0;a<o.length&&!o[a][0].test(l);a++);if(a===o.length)return!1;if(r)return o[a][2];if(i=t+1,!o[a][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),o[a][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},27375:function(e){"use strict";e.exports=function(e,t,n){var r,a,o,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(a=!1,o=0,i=h.length;o<i;o++)if(h[o](e,m,n,!0)){a=!0;break}if(a)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},84871:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n,a,o,i;return a=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(n=e.src.charCodeAt(a++))&&45!==n&&43!==n||a<o&&(i=e.src.charCodeAt(a),!r(i))?-1:a}function o(e,t){var n,a=e.bMarks[t]+e.tShift[t],o=a,i=e.eMarks[t];if(o+1>=i)return-1;if((n=e.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=i)return-1;if(!((n=e.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-a>=10)return-1}return o<i&&(n=e.src.charCodeAt(o),!r(n))?-1:o}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x,P,T,A,N,I,B,M=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(M=!0),(P=o(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],v=Number(e.src.slice(A,P-1)),M&&1!==v)return!1}else{if(!((P=a(e,t))>=0))return!1;d=!1}if(M&&e.skipSpaces(P)>=e.eMarks[t])return!1;if(b=e.src.charCodeAt(P-1),r)return!0;for(g=e.tokens.length,d?(B=e.push("ordered_list_open","ol",1),1!==v&&(B.attrs=[["start",v]])):B=e.push("bullet_list_open","ul",1),B.map=f=[t,0],B.markup=String.fromCharCode(b),y=t,T=!1,I=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(x=P,k=e.eMarks[y],p=E=e.sCount[y]+P-(e.bMarks[t]+e.tShift[t]);x<k;){if(9===(i=e.src.charCodeAt(x)))E+=4-(E+e.bsCount[y])%4;else{if(32!==i)break;E++}x++}if((u=(s=x)>=k?1:E-p)>4&&(u=1),c=p+u,(B=e.push("list_item_open","li",1)).markup=String.fromCharCode(b),B.map=m=[t,0],d&&(B.info=e.src.slice(A,P-1)),j=e.tight,S=e.tShift[t],C=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=E,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!T||(R=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=C,e.tight=j,(B=e.push("list_item_close","li",-1)).markup=String.fromCharCode(b),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(N=!1,l=0,h=I.length;l<h;l++)if(I[l](e,y,n,!0)){N=!0;break}if(N)break;if(d){if((P=o(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((P=a(e,y))<0)break;if(b!==e.src.charCodeAt(P-1))break}return(B=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(b),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,a=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===a&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},29967:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,a=0,o=c.length;a<o;a++)if(c[a](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},10175:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t,n,o){var i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(v=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=v.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===v.charCodeAt(_))&&w++}if(h<0||58!==v.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;if(!(g=e.md.helpers.parseLinkDestination(v,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=w+=g.lines,b=_;_<C;_++)if(10===(i=v.charCodeAt(_)))w++;else if(!a(i))break;for(g=e.md.helpers.parseLinkTitle(v,_,C),_<C&&b!==_&&g.ok?(E=g.str,_=g.pos,w+=g.lines):(E="",_=s,w=l);_<C&&(i=v.charCodeAt(_),a(i));)_++;if(_<C&&10!==v.charCodeAt(_)&&E)for(E="",_=s,w=l;_<C&&(i=v.charCodeAt(_),a(i));)_++;return!(_<C&&10!==v.charCodeAt(_))&&(!!(m=r(v.slice(1,h)))&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:E,href:u}),e.parentType=f,e.line=t+w+1),!0))}},52602:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isSpace;function o(e,t,n,r){var o,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(o=i.charCodeAt(l),!d){if(a(o)){u++,9===o?p+=4-p%4:p++;continue}d=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,n){var a=new r(e,t,n);return a.block=!0,n<0&&this.level--,a.level=this.level,n>0&&this.level++,this.tokens.push(a),a},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),a(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!a(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,r){var o,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),o=0;d<t;d++,o++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),a(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[o]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=r,e.exports=o},69200:function(e,t,n){"use strict";var r=n(11825).isSpace;function a(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function o(e){var t,n=[],r=0,a=e.length,o=!1,i=0,s="";for(t=e.charCodeAt(r);r<a;)124===t&&(o?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),o=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=a(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(b=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?g.push(58===b.charCodeAt(0)?"center":"right"):58===b.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=a(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=v=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(E=!1,u=0,p=w.length;u<p;u++)if(w[u](e,d,n,!0)){E=!0;break}if(E)break;if(!(l=a(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=o(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),v[1]=d,e.parentType=y,e.line=d,!0}},67082:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},10631:function(e){"use strict";e.exports=function(e){var t,n,r,a=e.tokens;for(n=0,r=a.length;n<r;n++)"inline"===(t=a[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},29658:function(e,t,n){"use strict";var r=n(11825).arrayReplaceAt;function a(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,o,i,s,l,c,u,p,d,m,h,f,g,b,v,k,y,E=e.tokens;if(e.md.options.linkify)for(n=0,o=E.length;n<o;n++)if("inline"===E[n].type&&e.md.linkify.pretest(E[n].content))for(f=0,t=(i=E[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,a(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,b=e.md.normalizeLink(g),e.md.validateLink(b)&&(v=k[u].text,v=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(v)?e.md.normalizeLinkText(v):e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",b]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=v,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),E[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},8668:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},34803:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,a={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return a[t.toLowerCase()]}function i(e){var t,n,a=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||a||(n.content=n.content.replace(r,o)),"link_open"===n.type&&"auto"===n.info&&a--,"link_close"===n.type&&"auto"===n.info&&a++}function s(e){var n,r,a=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||a||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&a--,"link_close"===r.type&&"auto"===r.info&&a++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},74209:function(e,t,n){"use strict";var r=n(11825).isWhiteSpace,a=n(11825).isPunctChar,o=n(11825).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,b,v,k,y,E,w,_,C,S,j,x;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(E=w=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(b=o(f)||a(String.fromCharCode(f)),v=o(g)||a(String.fromCharCode(g)),k=r(f),(y=r(g))?E=!1:v&&(k||b||(E=!1)),k?w=!1:b&&(y||v||(w=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(w=E=!1),E&&w&&(E=b,w=v),E||w){if(w)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(j=t.md.options.quotes[2],x=t.md.options.quotes[3]):(j=t.md.options.quotes[0],x=t.md.options.quotes[1]),i.content=l(i.content,u.index,x),e[h.token].content=l(e[h.token].content,h.pos,j),p+=x.length-1,h.token===n&&(p+=j.length-1),d=(c=i.content).length,S.length=_;continue e}E?S.push({token:n,pos:u.index,single:C,level:m}):w&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},73172:function(e,t,n){"use strict";var r=n(47950);function a(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}a.prototype.Token=r,e.exports=a},11360:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var a,o,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return a=e.src.slice(l+1,u),n.test(a)?(o=e.md.normalizeLink(a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0)):!!t.test(a)&&(o=e.md.normalizeLink("mailto:"+a),!!e.md.validateLink(o)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",o]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(a),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=a.length+2,!0))}},89362:function(e){"use strict";e.exports=function(e,t){var n,r,a,o,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(a=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=a),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((o=e.push("code_inline","code",0)).markup=a,o.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=l,!0}},26961:function(e){"use strict";function t(e,t){var n,r,a,o,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(a=t[n],h.push(0),t[d].marker===a.marker&&m===a.token-1||(d=n),m=a.token,a.length=a.length||0,a.close){for(u.hasOwnProperty(a.marker)||(u[a.marker]=[-1,-1,-1,-1,-1,-1]),i=u[a.marker][(a.open?3:0)+a.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((o=t[r]).marker===a.marker&&o.open&&o.end<0&&(l=!1,(o.close||a.open)&&(o.length+a.length)%3==0&&(o.length%3==0&&a.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,a.open=!1,o.end=n,o.close=!1,s=-1,m=-2;break}-1!==s&&(u[a.marker][(a.open?3:0)+(a.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},62693:function(e){"use strict";function t(e,t){var n,r,a,o,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(a=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===a.token+1,i=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?i+i:i,o.content="",(o=e.tokens[a.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?i+i:i,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,a=e.pos,o=e.src.charCodeAt(a);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},27843:function(e,t,n){"use strict";var r=n(99257),a=n(11825).has,o=n(11825).isValidEntityCode,i=n(11825).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&a(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},4833:function(e,t,n){"use strict";for(var r=n(11825).isSpace,a=[],o=0;o<256;o++)a.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){a[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==a[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),o++;o<i&&(n=e.src.charCodeAt(o),r(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},52987:function(e,t,n){"use strict";var r=n(95918).n;e.exports=function(e,t){var n,a,o,i=e.pos;return!!e.md.options.html&&(o=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=o)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(a=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+a[0].length)),e.pos+=a[0].length,!0))))}},4373:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d,m,h,f,g,b="",v=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(b=e.md.normalizeLink(d.str),e.md.validateLink(b)?u=d.pos:b=""),g=u;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(o=e.src.charCodeAt(u),a(o)||10===o);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=v,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=v,!1;b=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",b],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},62947:function(e,t,n){"use strict";var r=n(11825).normalizeReference,a=n(11825).isSpace;e.exports=function(e,t){var n,o,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,b=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(b=!1,c++;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(o=e.src.charCodeAt(c),a(o)||10===o);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},30938:function(e,t,n){"use strict";var r=n(11825).isSpace;e.exports=function(e,t){var n,a,o,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,a=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(o=n-1;o>=1&&32===e.pending.charCodeAt(o-1);)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<a&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},39247:function(e,t,n){"use strict";var r=n(47950),a=n(11825).isWhiteSpace,o=n(11825).isPunctChar,i=n(11825).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var a=new r(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),a.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(a),this.tokens_meta.push(o),a},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,b=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<b&&this.src.charCodeAt(h)===v;)h++;return s=h-e,r=h<b?this.src.charCodeAt(h):32,p=i(n)||o(String.fromCharCode(n)),m=i(r)||o(String.fromCharCode(r)),u=a(n),(d=a(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},24860:function(e){"use strict";function t(e,t){var n,r,a,o,i,s=[],l=t.length;for(n=0;n<l;n++)126===(a=t[n]).marker&&-1!==a.end&&(o=t[a.end],(i=e.tokens[a.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[o.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,a,o,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(a=(r=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),a<2)return!1;for(a%2&&(e.push("text","",0).content=o,a--),n=0;n<a;n+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,a=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<a;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},13252:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},93831:function(e){"use strict";e.exports=function(e){var t,n,r=0,a=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)a[t].nesting<0&&r--,a[t].level=r,a[t].nesting>0&&r++,"text"===a[t].type&&t+1<o&&"text"===a[t+1].type?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}},47950:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},62098:function(e){"use strict";var t={};function n(e,r){var a;return"string"!=typeof r&&(r=n.defaultChars),a=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),a.push(r);for(n=0;n<e.length;n++)a[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return a}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,o,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=a[r]:192==(224&r)&&t+3<n&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&i))?(c+=(l=r<<12&61440|o<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(o=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|o<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},9401:function(e){"use strict";var t={};function n(e,r,a){var o,i,s,l,c,u="";for("string"!=typeof r&&(a=r,r=n.defaultChars),void 0===a&&(a=!0),c=function(e){var n,r,a=t[e];if(a)return a;for(a=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?a.push(r):a.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=e[n];return a}(r),o=0,i=e.length;o<i;o++)if(s=e.charCodeAt(o),a&&37===s&&o+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<i&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},56558:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},36664:function(e,t,n){"use strict";e.exports.encode=n(9401),e.exports.decode=n(62098),e.exports.format=n(56558),e.exports.parse=n(5)},5:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(o),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,o,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=a.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(f);if(b&&(i=(b=b[0]).toLowerCase(),this.protocol=b,f=f.substr(b.length)),(t||b||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||b&&p[b]||(f=f.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!d[b])){var v,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(v=f.slice(0,k),f=f.slice(k+1),this.auth=v),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var E=f.slice(0,y);f=f.slice(y),this.parseHost(E),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var _=this.hostname.split(/\./);for(r=0,o=_.length;r<o;r++){var C=_[r];if(C&&!C.match(c)){for(var S="",j=0,x=C.length;j<x;j++)C.charCodeAt(j)>127?S+="x":S+=C[j];if(!S.match(c)){var P=_.slice(0,r),T=_.slice(r+1),A=C.match(u);A&&(P.push(A[1]),T.unshift(A[2])),T.length&&(f=T.join(".")+f),this.hostname=P.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var N=f.indexOf("#");-1!==N&&(this.hash=f.substr(N),f=f.slice(0,N));var I=f.indexOf("?");return-1!==I&&(this.search=f.substr(I),f=f.slice(0,I)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},97329:function(){},38103:function(){},46688:function(){},48282:function(e){function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},32002:function(e){var t=1e3,n=60*t,r=60*n,a=24*r,o=7*a,i=365.25*a;function s(e,t,n,r){var a=t>=1.5*n;return Math.round(e/n)+" "+r+(a?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=a)return s(e,o,a,"day");if(o>=r)return s(e,o,r,"hour");if(o>=n)return s(e,o,n,"minute");if(o>=t)return s(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=a)return Math.round(e/a)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1625:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))n.call(i,u)&&(l[u]=i[u]);if(t){s=t(i);for(var p=0;p<s.length;p++)r.call(i,s[p])&&(l[s[p]]=i[s[p]])}}return l}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(92213),a=n.n(r),o=n(68211),i=n.n(o),s=n(57513),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u);function d(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,o,s,d,m,h="https:"===n.protocol,f=new URL("https://i0.wp.com");if(m=n.host,/^i[0-2]\.wp\.com$/.test(m))f.pathname=n.pathname,f.hostname=n.hostname;else{if(n.search)return null;var g=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(g=n.pathname.replace("://","//")),n.hostname===u&&(g=n.pathname),f.pathname=g,f.hostname=(r=g,o=a()(r),s=i()(o),d="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',d,r),d+".wp.com"),h&&f.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?f.searchParams.set(c[b]||b,t[b]):f.protocol="http:":f.hostname=t[b];return l("generated Photon URL: %s",f.href),f.href}},9587:function(e,t,n){"use strict";var r=n(45843);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},11268:function(e,t,n){e.exports=n(9587)()},45843:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},52504:function(e,t,n){"use strict";var r=n(62265);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},23698:function(e,t,n){e.exports=n(52504)()},62265:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},31027:function(e,t,n){var r=n(89403);function a(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}a.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=a},50771:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},652:function(e){e.exports={L:1,M:0,Q:3,H:2}},97044:function(e,t,n){var r=n(27280);function a(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}a.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(o)));return new a(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=r.gexp(r.glog(e.get(o))+t);return new a(n,0).mod(e)}},e.exports=a},1596:function(e,t,n){var r=n(31027),a=n(88487),o=n(50771),i=n(83186),s=n(97044);function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=a.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),i.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var a=0;a<this.modules.length;a++)for(var o=1*a,i=0;i<this.modules[a].length;i++){var s=1*i;this.modules[a][i]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=i.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],a=e[n];if(null==this.modules[r][a])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][a+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(e){for(var t=i.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=i.getBCHTypeInfo(n),a=0;a<15;a++){var o=!e&&1==(r>>a&1);a<6?this.modules[a][8]=o:a<8?this.modules[a+1][8]=o:this.modules[this.moduleCount-15+a][8]=o}for(a=0;a<15;a++){o=!e&&1==(r>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=o:a<9?this.modules[8][15-a-1+1]=o:this.modules[8][15-a-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,a=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>a&1)),i.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--a&&(o++,a=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=a.getRSBlocks(e,t),s=new o,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),i.getLengthInBits(u.mode,e)),u.write(s)}var p=0;for(c=0;c<r.length;c++)p+=r[c].dataCount;if(s.getLengthInBits()>8*p)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*p+")");for(s.getLengthInBits()+4<=8*p&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*p||(s.put(l.PAD0,8),s.getLengthInBits()>=8*p));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,a=0,o=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,p=t[c].totalCount-u;r=Math.max(r,u),a=Math.max(a,p),o[c]=new Array(u);for(var d=0;d<o[c].length;d++)o[c][d]=255&e.buffer[d+n];n+=u;var m=i.getErrorCorrectPolynomial(p),h=new s(o[c],m.getLength()-1).mod(m);l[c]=new Array(m.getLength()-1);for(d=0;d<l[c].length;d++){var f=d+h.getLength()-l[c].length;l[c][d]=f>=0?h.get(f):0}}var g=0;for(d=0;d<t.length;d++)g+=t[d].totalCount;var b=new Array(g),v=0;for(d=0;d<r;d++)for(c=0;c<t.length;c++)d<o[c].length&&(b[v++]=o[c][d]);for(d=0;d<a;d++)for(c=0;c<t.length;c++)d<l[c].length&&(b[v++]=l[c][d]);return b},e.exports=l},88487:function(e,t,n){var r=n(652);function a(e,t){this.totalCount=e,this.dataCount=t}a.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],a.getRSBlocks=function(e,t){var n=a.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,i=0;i<r;i++)for(var s=n[3*i+0],l=n[3*i+1],c=n[3*i+2],u=0;u<s;u++)o.push(new a(l,c));return o},a.getRsBlockTable=function(e,t){switch(t){case r.L:return a.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return a.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return a.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return a.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=a},27280:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},89403:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},83186:function(e,t,n){var r=n(89403),a=n(97044),o=n(27280),i=0,s=1,l=2,c=3,u=4,p=5,d=6,m=7,h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;h.getBCHDigit(t)-h.getBCHDigit(h.G15)>=0;)t^=h.G15<<h.getBCHDigit(t)-h.getBCHDigit(h.G15);return(e<<10|t)^h.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;h.getBCHDigit(t)-h.getBCHDigit(h.G18)>=0;)t^=h.G18<<h.getBCHDigit(t)-h.getBCHDigit(h.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return h.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case i:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case p:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case m:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new a([1],0),n=0;n<e;n++)t=t.multiply(new a([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var a=0;a<t;a++){for(var o=0,i=e.isDark(r,a),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)a+l<0||t<=a+l||0==s&&0==l||i==e.isDark(r+s,a+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(a=0;a<t-1;a++){var c=0;e.isDark(r,a)&&c++,e.isDark(r+1,a)&&c++,e.isDark(r,a+1)&&c++,e.isDark(r+1,a+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(a=0;a<t-6;a++)e.isDark(r,a)&&!e.isDark(r,a+1)&&e.isDark(r,a+2)&&e.isDark(r,a+3)&&e.isDark(r,a+4)&&!e.isDark(r,a+5)&&e.isDark(r,a+6)&&(n+=40);for(a=0;a<t;a++)for(r=0;r<t-6;r++)e.isDark(r,a)&&!e.isDark(r+1,a)&&e.isDark(r+2,a)&&e.isDark(r+3,a)&&e.isDark(r+4,a)&&!e.isDark(r+5,a)&&e.isDark(r+6,a)&&(n+=40);var u=0;for(a=0;a<t;a++)for(r=0;r<t;r++)e.isDark(r,a)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=h},93527:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var a=["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"],o=["value","size","level","bgColor","fgColor","includeMargin","imageSettings"],i=["renderAs"];function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var a=k(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=n(99196),w=(n(23698),n(1596)),_=n(652);function C(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var S={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var a=null;e.forEach((function(o,i){if(!o&&null!==a)return n.push("M".concat(a+t," ").concat(r+t,"h").concat(i-a,"v1H").concat(a+t,"z")),void(a=null);if(i!==e.length-1)o&&null===a&&(a=i);else{if(!o)return;null===a?n.push("M".concat(i+t,",").concat(r+t," h1v1H").concat(i+t,"z")):n.push("M".concat(a+t,",").concat(r+t," h").concat(i+1-a,"v1H").concat(a+t,"z"))}}))})),n.join("")}function x(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function P(e,t){var n=e.imageSettings,r=e.size,a=e.includeMargin;if(null==n)return null;var o=a?4:0,i=t.length+2*o,s=Math.floor(.1*r),l=i/r,c=(n.width||s)*l,u=(n.height||s)*l,p=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,m=null;if(n.excavate){var h=Math.floor(p),f=Math.floor(d);m={x:h,y:f,w:Math.ceil(c+p-h),h:Math.ceil(u+d-f)}}return{x:p,y:d,h:u,w:c,excavation:m}}var T=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),A=function(e){h(n,e);var t=g(n);function n(){var e;p(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return y(v(e=t.call.apply(t,[this].concat(a))),"_canvas",void 0),y(v(e),"_image",void 0),y(v(e),"state",{imgLoaded:!1}),y(v(e),"handleImageLoad",(function(){e.setState({imgLoaded:!0})})),e}return m(n,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,o=e.fgColor,i=e.includeMargin,s=e.imageSettings,l=new w(-1,_[r]);if(l.addData(C(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var p=l.modules;if(null===p)return;var d=i?4:0,m=p.length+2*d,h=P(this.props,p);null!=s&&null!=h&&null!=h.excavation&&(p=x(p,h.excavation));var f=window.devicePixelRatio||1;c.height=c.width=n*f;var g=n/m*f;u.scale(g,g),u.fillStyle=a,u.fillRect(0,0,m,m),u.fillStyle=o,T?u.fill(new Path2D(j(p,d))):p.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=h&&u.drawImage(this._image,h.x+d,h.y+d,h.w,h.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),o=(t.includeMargin,t.imageSettings),i=u(t,a),l=c({height:n,width:n},r),p=null,d=o&&o.src;return null!=o&&null!=d&&(p=E.createElement("img",{src:d,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),E.createElement(E.Fragment,null,E.createElement("canvas",s({style:l,height:n,width:n,ref:function(t){return e._canvas=t}},i)),p)}}]),n}(E.PureComponent);y(A,"defaultProps",S);var N=function(e){h(n,e);var t=g(n);function n(){return p(this,n),t.apply(this,arguments)}return m(n,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,a=e.bgColor,i=e.fgColor,l=e.includeMargin,c=e.imageSettings,p=u(e,o),d=new w(-1,_[r]);d.addData(C(t)),d.make();var m=d.modules;if(null===m)return null;var h=l?4:0,f=m.length+2*h,g=P(this.props,m),b=null;null!=c&&null!=g&&(null!=g.excavation&&(m=x(m,g.excavation)),b=E.createElement("image",{xlinkHref:c.src,height:g.h,width:g.w,x:g.x+h,y:g.y+h,preserveAspectRatio:"none"}));var v=j(m,h);return E.createElement("svg",s({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},p),E.createElement("path",{fill:a,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),E.createElement("path",{fill:i,d:v}),b)}}]),n}(E.PureComponent);y(N,"defaultProps",S);var I=function(e){var t=e.renderAs,n=u(e,i),r="svg"===t?N:A;return E.createElement(r,n)};I.defaultProps=c({renderAs:"canvas"},S),e.exports=I},10753:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,a){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var u,p,d,m,h=e[c].replace(i,"%20"),f=h.indexOf(r);f>=0?(u=h.substr(0,f),p=h.substr(f+1)):(u=h,p=""),d=decodeURIComponent(u),m=decodeURIComponent(p),t(o,d)?Array.isArray(o[d])?o[d].push(m):o[d]=[o[d],m]:o[d]=m}return o}},68527:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,a){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var o=encodeURIComponent(t(a))+r;return Array.isArray(e[a])?e[a].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[a]))})).join(n):a?encodeURIComponent(t(a))+r+encodeURIComponent(t(e)):""}},76250:function(e,t,n){"use strict";t.decode=t.parse=n(10753),t.encode=t.stringify=n(68527)},24700:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=a(o),r=a(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,a={};t=n.exec(e);){var o=r(t[1]),i=r(t[2]);null===o||null===i||o in a||(a[o]=i)}return a}},97765:function(e,t,n){"use strict";var r=n(11268),a=n.n(r),o=n(99196),i=n.n(o),s=n(63130),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isSupported:s.Gb&&s.WD},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"componentDidMount",value:function(){this.state.isSupported&&(this.handleVisibilityChange=this.handleVisibilityChange.bind(this),document.addEventListener(s.WD.event,this.handleVisibilityChange))}},{key:"componentWillUnmount",value:function(){this.state.isSupported&&document.removeEventListener(s.WD.event,this.handleVisibilityChange)}},{key:"handleVisibilityChange",value:function(){var e;"function"==typeof this.props.onChange&&(e=this.props).onChange.apply(e,c((0,s.XO)()));"function"==typeof this.props.children&&this.forceUpdate()}},{key:"render",value:function(){return this.props.children?"function"==typeof this.props.children?this.state.isSupported?(e=this.props).children.apply(e,c((0,s.XO)())):this.props.children():i().Children.only(this.props.children):null;var e}}]),t}(i().Component);u.displayName="PageVisibility",u.propTypes={onChange:a().func,children:a().oneOfType([a().node,a().func])},t.Z=u},75031:function(e,t,n){"use strict";var r=n(97765);t.Z=r.Z},63130:function(e,t,n){"use strict";n.d(t,{Gb:function(){return o},WD:function(){return i},XO:function(){return s}});var r="undefined"!=typeof document,a=[{hidden:"hidden",event:"visibilitychange",state:"visibilityState"},{hidden:"webkitHidden",event:"webkitvisibilitychange",state:"webkitVisibilityState"},{hidden:"mozHidden",event:"mozvisibilitychange",state:"mozVisibilityState"},{hidden:"msHidden",event:"msvisibilitychange",state:"msVisibilityState"},{hidden:"oHidden",event:"ovisibilitychange",state:"oVisibilityState"}],o=r&&Boolean(document.addEventListener),i=function(){if(!o)return null;var e=!0,t=!1,n=void 0;try{for(var r,i=a[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var s=r.value;if(s.hidden in document)return s}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}return null}(),s=function(){if(!i)return[!0,"visible"];var e=i.hidden,t=i.state;return[!document[e],document[t]]}},2601:function(e){"use strict";function t(e,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)t(e,n[r]);else for(r in n)e[r]=(e[r]||[]).concat(n[r])}e.exports=function(e){var n,r={};return t(r,e),(n=function(e){return function(t){return function(n){var a,o,i=r[n.type],s=t(n);if(i)for(a=0;a<i.length;a++)(o=i[a](n,e))&&e.dispatch(o);return s}}}).effects=r,n}},19551:function(e,t,n){"use strict";var r,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function s(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function l(e,t){var n,l;function c(){n=a?new WeakMap:i()}function u(){var n,r,a,o,i,c=arguments.length;for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];for(i=t.apply(null,o),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!s(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(s(r.args,o,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,o)},o[0]=null,r.args=o,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=o),l=a?function(e){var t,a,o,s,l,c=n,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}c.has(a)?c=c.get(a):(o=new WeakMap,c.set(a,o),c=o)}return c.has(r)||((s=i()).isUniqueByDependants=u,c.set(r,s)),c.get(r)}:function(){return n},u.getDependants=t,u.clear=c,c(),u}n.d(t,{Z:function(){return l}}),r={},a="undefined"!=typeof WeakMap},2723:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},54166:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,a="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function s(){o(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},p=b(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],o=e["padding-"+a];t[a]=d(o)}return t}(r),o=a.left+a.right,i=a.top+a.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=m(r,"left","right")+o),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+o)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return b(a.left,a.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):p}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,a,o,i,s,l,u=(r=(n=t).x,a=n.y,o=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:a,width:o,height:i,top:a,right:r+o,bottom:i+a,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);E.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));var _=void 0!==a.ResizeObserver?a.ResizeObserver:w;t.Z=_},68211:function(e){"use strict";var t=256,n=[],r=window,a=Math.pow(t,6),o=Math.pow(2,52),i=2*o,s=255,l=Math.random;function c(e){var n,r=e.length,a=this,o=0,i=a.i=a.j=0,l=a.S=[];for(r||(e=[r++]);o<t;)l[o]=o++;for(o=0;o<t;o++)l[o]=l[i=s&i+e[o%r]+(n=l[o])],l[i]=n;(a.g=function(e){for(var n,r=0,o=a.i,i=a.j,l=a.S;e--;)n=l[o=s&o+1],r=r*t+l[s&(l[o]=l[i=s&i+n])+(l[i]=n)];return a.i=o,a.j=i,r})(t)}function u(e,t){var n,r=[],a=(typeof e)[0];if(t&&"o"==a)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==a?e:e+"\0"}function p(e,t){for(var n,r=e+"",a=0;a<r.length;)t[s&a]=s&(n^=19*t[s&a])+r.charCodeAt(a++);return m(t)}function d(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),m(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,m(n)]}}function m(e){return String.fromCharCode.apply(0,e)}e.exports=function(r,s){if(s&&!0===s.global)return s.global=!1,Math.random=e.exports(r,s),s.global=!0,Math.random;var l=s&&s.entropy||!1,h=[],f=(p(u(l?[r,m(n)]:0 in arguments?r:d(),3),h),new c(h));return p(m(f.S),n),function(){for(var e=f.g(6),n=a,r=0;e<o;)e=(e+r)*t,n*=t,r=f.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},45702:function(e,t,n){const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(e,t){if(t=o(t),e instanceof a){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?i[s.COMPARATORLOOSE]:i[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new u(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof a))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||o&&i||s||c}}e.exports=a;const o=n(75265),{re:i,t:s}=n(75698),l=n(48937),c=n(72840),u=n(88208),p=n(55062)},55062:function(e,t,n){class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=a.get(t);if(n)return n;const r=this.options.loose,o=r?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],p),s("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],m)).split(/\s+/).join(" ");const l=r?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],f=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>j(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new i(e,this.options))),g=(f.length,new Map);for(const e of f){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const a=new(n(47595))({max:1e3}),o=n(75265),i=n(45702),s=n(72840),l=n(88208),{re:c,t:u,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=n(75698),h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let a=r.pop();for(;n&&r.length;)n=r.every((e=>a.intersects(e,t))),a=r.pop();return n},b=(e,t)=>(s("comp",e,t),e=E(e,t),s("caret",e),e=k(e,t),s("tildes",e),e=_(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,k=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(n,((t,n,r,a,o)=>{let i;return s("tilde",e,t,n,r,a,o),v(n)?i="":v(r)?i=`>=${n}.0.0 <${+n+1}.0.0-0`:v(a)?i=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(s("replaceTilde pr",o),i=`>=${n}.${r}.${a}-${o} <${n}.${+r+1}.0-0`):i=`>=${n}.${r}.${a} <${n}.${+r+1}.0-0`,s("tilde return",i),i}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{s("caret",e,t);const n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,a,o,i)=>{let l;return s("caret",e,t,n,a,o,i),v(n)?l="":v(a)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(o)?l="0"===n?`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:i?(s("replaceCaret pr",i),l="0"===n?"0"===a?`>=${n}.${a}.${o}-${i} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}-${i} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o}-${i} <${+n+1}.0.0-0`):(s("no pr"),l="0"===n?"0"===a?`>=${n}.${a}.${o}${r} <${n}.${a}.${+o+1}-0`:`>=${n}.${a}.${o}${r} <${n}.${+a+1}.0-0`:`>=${n}.${a}.${o} <${+n+1}.0.0-0`),s("caret return",l),l}))},_=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,((n,r,a,o,i,l)=>{s("xRange",e,n,r,a,o,i,l);const c=v(a),u=c||v(o),p=u||v(i),d=p;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),i=0,">"===r?(r=">=",u?(a=+a+1,o=0,i=0):(o=+o+1,i=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+a}.${o}.${i}${l}`):u?n=`>=${a}.0.0${l} <${+a+1}.0.0-0`:p&&(n=`>=${a}.${o}.0${l} <${a}.${+o+1}.0-0`),s("xRange return",n),n}))},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),j=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),x=e=>(t,n,r,a,o,i,s,l,c,u,p,d,m)=>`${n=v(r)?"":v(a)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${a}.0${e?"-0":""}`:i?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(p)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${p}-${d}`:e?`<${c}.${u}.${+p+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},88208:function(e,t,n){const r=n(72840),{MAX_LENGTH:a,MAX_SAFE_INTEGER:o}=n(29609),{re:i,t:s}=n(75698),l=n(75265),{compareIdentifiers:c}=n(15322);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const n=this.build[t],a=e.build[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return c(n,a)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},52045:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},48937:function(e,t,n){const r=n(42969),a=n(74619),o=n(74765),i=n(71767),s=n(63590),l=n(94638);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return a(e,n,c);case">":return o(e,n,c);case">=":return i(e,n,c);case"<":return s(e,n,c);case"<=":return l(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},12977:function(e,t,n){const r=n(88208),a=n(38675),{re:o,t:i}=n(75698);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else n=e.match(o[i.COERCE]);return null===n?null:a(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},58230:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>{const a=new r(e,n),o=new r(t,n);return a.compare(o)||a.compareBuild(o)}},25112:function(e,t,n){const r=n(50192);e.exports=(e,t)=>r(e,t,!0)},50192:function(e,t,n){const r=n(88208);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},13751:function(e,t,n){const r=n(38675),a=n(42969);e.exports=(e,t)=>{if(a(e,t))return null;{const n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==a[e])return i+e;return s}}},42969:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0===r(e,t,n)},74765:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>0},71767:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)>=0},20177:function(e,t,n){const r=n(88208);e.exports=(e,t,n,a)=>{"string"==typeof n&&(a=n,n=void 0);try{return new r(e,n).inc(t,a).version}catch(e){return null}}},63590:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<0},94638:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(e,t,n)<=0},51847:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).major},87989:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).minor},74619:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>0!==r(e,t,n)},38675:function(e,t,n){const{MAX_LENGTH:r}=n(29609),{re:a,t:o}=n(75698),i=n(88208),s=n(75265);e.exports=(e,t)=>{if(t=s(t),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},8906:function(e,t,n){const r=n(88208);e.exports=(e,t)=>new r(e,t).patch},85676:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},82576:function(e,t,n){const r=n(50192);e.exports=(e,t,n)=>r(t,e,n)},25709:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},53907:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},21978:function(e,t,n){const r=n(58230);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},55641:function(e,t,n){const r=n(38675);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},53377:function(e,t,n){const r=n(75698);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(29609).SEMVER_SPEC_VERSION,SemVer:n(88208),compareIdentifiers:n(15322).compareIdentifiers,rcompareIdentifiers:n(15322).rcompareIdentifiers,parse:n(38675),valid:n(55641),clean:n(52045),inc:n(20177),diff:n(13751),major:n(51847),minor:n(87989),patch:n(8906),prerelease:n(85676),compare:n(50192),rcompare:n(82576),compareLoose:n(25112),compareBuild:n(58230),sort:n(21978),rsort:n(25709),gt:n(74765),lt:n(63590),eq:n(42969),neq:n(74619),gte:n(71767),lte:n(94638),cmp:n(48937),coerce:n(12977),Comparator:n(45702),Range:n(55062),satisfies:n(53907),toComparators:n(76055),maxSatisfying:n(33422),minSatisfying:n(17212),minVersion:n(9077),validRange:n(53140),outside:n(44494),gtr:n(2824),ltr:n(34370),intersects:n(30723),simplifyRange:n(23589),subset:n(34992)}},29609:function(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},72840:function(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},15322:function(e){const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),a=t.test(n);return r&&a&&(e=+e,n=+n),e===n?0:r&&!a?-1:a&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},75265:function(e){const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},75698:function(e,t,n){const{MAX_SAFE_COMPONENT_LENGTH:r}=n(29609),a=n(72840),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let l=0;const c=(e,t,n)=>{const r=l++;a(r,t),s[e]=r,i[r]=t,o[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},2824:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,">",n)},30723:function(e,t,n){const r=n(55062);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},34370:function(e,t,n){const r=n(44494);e.exports=(e,t,n)=>r(e,t,"<",n)},33422:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},17212:function(e,t,n){const r=n(88208),a=n(55062);e.exports=(e,t,n)=>{let o=null,i=null,s=null;try{s=new a(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new r(o,n)))})),o}},9077:function(e,t,n){const r=n(88208),a=n(55062),o=n(74765);e.exports=(e,t)=>{e=new a(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const a=e.set[t];let i=null;a.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!o(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!o(n,i)||(n=i)}return n&&e.test(n)?n:null}},44494:function(e,t,n){const r=n(88208),a=n(45702),{ANY:o}=a,i=n(55062),s=n(53907),l=n(74765),c=n(63590),u=n(94638),p=n(71767);e.exports=(e,t,n,d)=>{let m,h,f,g,b;switch(e=new r(e,d),t=new i(t,d),n){case">":m=l,h=u,f=c,g=">",b=">=";break;case"<":m=c,h=p,f=l,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let i=null,s=null;if(r.forEach((e=>{e.semver===o&&(e=new a(">=0.0.0")),i=i||e,s=s||e,m(e.semver,i.semver,d)?i=e:f(e.semver,s.semver,d)&&(s=e)})),i.operator===g||i.operator===b)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===b&&f(e,s.semver))return!1}return!0}},23589:function(e,t,n){const r=n(53907),a=n(50192);e.exports=(e,t,n)=>{const o=[];let i=null,s=null;const l=e.sort(((e,t)=>a(e,t,n)));for(const e of l){r(e,t,n)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length<p.length?u:t}},34992:function(e,t,n){const r=n(55062),a=n(45702),{ANY:o}=a,i=n(53907),s=n(50192),l=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=n.includePrerelease?[new a(">=0.0.0-0")]:[new a(">=0.0.0")]}if(1===t.length&&t[0].semver===o){if(n.includePrerelease)return!0;t=[new a(">=0.0.0")]}const r=new Set;let l,p,d,m,h,f,g;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,n):"<"===t.operator||"<="===t.operator?p=u(p,t,n):r.add(t.semver);if(r.size>1)return null;if(l&&p){if(d=s(l.semver,p.semver,n),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==p.operator))return null}for(const e of r){if(l&&!i(e,String(l),n))return null;if(p&&!i(e,String(p),n))return null;for(const r of t)if(!i(e,String(r),n))return!1;return!0}let b=!(!p||n.includePrerelease||!p.semver.prerelease.length)&&p.semver,v=!(!l||n.includePrerelease||!l.semver.prerelease.length)&&l.semver;b&&1===b.prerelease.length&&"<"===p.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,f=f||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(m=c(l,e,n),m===e&&m!==l)return!1}else if(">="===l.operator&&!i(l.semver,String(e),n))return!1;if(p)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(h=u(p,e,n),h===e&&h!==p)return!1}else if("<="===p.operator&&!i(p.semver,String(e),n))return!1;if(!e.operator&&(p||l)&&0!==d)return!1}return!(l&&f&&!p&&0!==d)&&(!(p&&g&&!l&&0!==d)&&(!v&&!b))},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let a=!1;e:for(const r of e.set){for(const e of t.set){const t=l(r,e,n);if(a=a||null!==t,t)continue e}if(a)return!1}return!0}},76055:function(e,t,n){const r=n(55062);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},53140:function(e,t,n){const r=n(55062);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},88090:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7478),a={contextDelimiter:"",onMissingKey:null};function o(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},a)this.options[n]=void 0!==t&&n in t?t[n]:a[n]}o.prototype.getPluralForm=function(e,t){var n,a,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(a=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),o=(0,r.Z)(a)),i=this.pluralForms[e]=o),i(t)},o.prototype.dcnpgettext=function(e,t,n,r,a){var o,i,s;return o=void 0===a?0:this.getPluralForm(e,a),i=n,t&&(i=t+this.options.contextDelimiter+n),(s=this.data[e][i])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)}},44780:function(e,t,n){"use strict";var r=n(74579),a=n.n(r),o=n(92819);const i=a()("dops:analytics");let s,l;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const c={initialize:function(e,t,n){c.setUser(e,t),c.setSuperProps(n),c.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){l={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=(0,o.assign)(s,e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);i("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),i('Built stat "%s" in group "%s"',t,e);return n}(e,t);c.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){c.tracks.recordPageView(e),c.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,a,o,i){c.ga.recordPurchase(e,t,n,r,a,o,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(s&&(i("- Super Props: %o",s),t=(0,o.assign)(t,s)),i('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):i('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};c.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){c.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){i("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};c.ga.initialized||(l&&(e={userId:"u-"+l.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),c.ga.initialized=!0)},recordPageView:function(e,t){c.ga.initialize(),i("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){c.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),i(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,a,o,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:a,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){l&&window._tkq.push(["identifyUser",l.ID,l.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=c},62309:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),i=n.n(o),s=n(23698),l=n.n(s),c=n(99196),u=n.n(c),p=n(89105),d=n.n(p),m=n(65736);const __=m.__;class h extends u().Component{render(){const{logoColor:e,showText:t,className:n,...r}=this.props,o=t?"0 0 118 32":"0 0 32 32";return u().createElement("svg",a()({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:o,className:d()("jetpack-logo",n),"aria-labelledby":"jetpack-logo-title"},r),u().createElement("title",{id:"jetpack-logo-title"},__("Jetpack Logo","jetpack")),u().createElement("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&u().createElement(c.Fragment,null,u().createElement("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),u().createElement("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),u().createElement("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),u().createElement("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),u().createElement("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),u().createElement("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),u().createElement("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})))}}i()(h,"propTypes",{className:l().string,width:l().number,height:l().number,showText:l().bool,logoColor:l().string}),i()(h,"defaultProps",{className:"",height:32,showText:!0,logoColor:"#069e08"}),t.Z=h},3190:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(99196),a=n.n(r),o=n(93527),i=n.n(o);function s(e){let{value:t="https://jetpack.com",bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c="canvas",size:u=248}=e;return a().createElement(i(),{value:t,size:u,bgColor:n,fgColor:r,level:o,includeMargin:s,imageSettings:l,renderAs:c})}},52104:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;var a;"undefined"!=typeof window&&(r=null===(a=window.Initial_State)||void 0===a?void 0:a.calypsoEnv);if(0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);Object.keys(t).map((e=>{n[e]=encodeURIComponent(t[e])})),!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);const o=Object.keys(n).map((e=>e+"="+n[e])).join("&");return"https://jetpack.com/redirect/?"+o}n.d(t,{Z:function(){return r}})},62369:function(e,t,n){"use strict";n.d(t,{Pb:function(){return r.Z},lQ:function(){return a.Z},Ug:function(){return o.Ug},aQ:function(){return o.aQ},M6:function(){return o.M6},Wp:function(){return o.Wp},OZ:function(){return i.Z},o_:function(){return s.Z},T:function(){return l.Z},Qq:function(){return c.Qq},X1:function(){return c.X1},_D:function(){return c._D},Rl:function(){return c.Rl},FK:function(){return c.FK},HD:function(){return c.HD},m3:function(){return c.m3}});var r=n(77873),a=n(95803),o=n(73063),i=n(68347),s=n(29320),l=n(81408),c=n(53325)},77873:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){var e,t;return"object"==typeof window&&null!==(e=null===(t=window)||void 0===t?void 0:t.Jetpack_Editor_Initial_State)&&void 0!==e?e:null}},68347:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(77873);function a(e){var t,n,a,o,i,s,l,c,u;const p=(0,r.Z)(),d=null!==(t=null==p||null===(n=p.available_blocks)||void 0===n||null===(a=n[e])||void 0===a?void 0:a.available)&&void 0!==t&&t,m=null!==(o=null==p||null===(i=p.available_blocks)||void 0===i||null===(s=i[e])||void 0===s?void 0:s.unavailable_reason)&&void 0!==o?o:"unknown",h=null!==(l=null==p||null===(c=p.available_blocks)||void 0===c||null===(u=c[e])||void 0===u?void 0:u.details)&&void 0!==l?l:[];return{available:d,...!d&&{details:h,unavailableReason:m}}}},95803:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},53325:function(e,t,n){"use strict";n.d(t,{Qq:function(){return u},X1:function(){return p},_D:function(){return d},Rl:function(){return m},FK:function(){return f},HD:function(){return g},m3:function(){return b}});var r=n(92819),a=n(96483),o=n(65736),i=n(73063),s=n(77873),l=n(68347),c=n(95803);const __=o.__;function u(e){let{planSlug:t,plan:n,postId:o,postType:s}=e;const l=(0,r.startsWith)(t,"jetpack_")?t:(0,r.get)(n,["path_slug"]),u=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/admin.php`,{page:"gutenberg-edit-site",postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,i.Wp)()?(0,a.addQueryArgs)("/"+(0,r.compact)([e,s,(0,c.Z)(),o]).join("/"),{plan_upgraded:1}):(0,a.addQueryArgs)(window.location.protocol+`//${(0,c.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:o,plan_upgraded:1})})();return(0,i.Ug)()?(0,a.addQueryArgs)(`https://wordpress.com/plans/${(0,c.Z)()}`,{redirect_to:u,customerType:"business"}):l&&(0,a.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.Z)()}/${l}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,l.Z)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,l.Z)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function f(){return(0,r.get)((0,s.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,r.map)(h,"name").includes(e),b=e=>(0,r.head)((0,r.filter)(h,(t=>{let{name:n}=t;return n===e})))},29320:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(98817),a=n(68347);function o(e,t){const{available:n,unavailableReason:o}=(0,a.Z)(e);return!!n&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},73063:function(e,t,n){"use strict";n.d(t,{Wp:function(){return o},Ug:function(){return i},M6:function(){return s},aQ:function(){return l}});var r=n(77873);function a(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function o(){return"simple"===a()}function i(){return"atomic"===a()}function s(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_private_site)&&void 0!==e&&e}function l(){var e,t;const n=(0,r.Z)();return null!==(e=null==n||null===(t=n.jetpack)||void 0===t?void 0:t.is_coming_soon)&&void 0!==e&&e}},81408:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(94333);t.Z=e=>(0,o.createHigherOrderComponent)((t=>n=>React.createElement(t,a()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},97662:function(e,t){"use strict";const n={i18n_default_locale_slug:"en",mc_analytics_enabled:!0,google_analytics_enabled:!1,google_analytics_key:null};t.Z=function(e){if(e in n)return n[e];throw new Error("config key `"+e+"` does not exist")}},97334:function(e,t,n){"use strict";var r=n(97662),a=n(44780);a.Z.setMcAnalyticsEnabled((0,r.Z)("mc_analytics_enabled")),a.Z.setGoogleAnalyticsEnabled((0,r.Z)("google_analytics_enabled"),(0,r.Z)("google_analytics_key")),t.Z=a.Z},45260:function(e,t,n){"use strict";var r=n(76750);t.Z={backgroundColor:{type:"string",validator:r.Z},textColor:{type:"string",validator:r.Z},buttonAndLinkColor:{type:"string",validator:r.Z},style:{type:"string",default:"small",validValues:["small","large"]},asin:{type:"string"},showImage:{default:!0,type:"boolean"},showTitle:{default:!0,type:"boolean"},showSeller:{default:!1,type:"boolean"},showPrice:{default:!0,type:"boolean"},showPurchaseButton:{default:!0,type:"boolean"}}},10143:function(e,t){"use strict";t.Z={products:[{title:"New York Biology Dead Sea Mud Mask for Face and Body - All Natural - Spa Quality Pore Reducer for Acne, Blackheads and Oily Skin - Tightens Skin for A Healthier Complexion - 8.8 oz",asin:"B01NCM25K7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"New York Biology",detailPageUrl:"https://www.amazon.com/New-York-Biology-Dead-Mask/dp/B01NCM25K7?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B01NCM25K7",listPrice:"$14.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:62,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:133,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51asbRHNuVL.jpg",imageHeightLarge:500,imageWidthLarge:415,authorshipInfo:"New York Biology"},{title:"Face/Off",asin:"B002PT1KH6",productGroup:"Movie",authors:[],artists:[],actors:["John Travolta","Nicolas Cage","Joan Allen","Alessandro Nivola","Gina Gershon"],detailPageUrl:"https://www.amazon.com/Face-Off-John-Travolta/dp/B002PT1KH6?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B002PT1KH6",listPrice:"$9.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:50,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:107,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51TyrHec4QL.jpg",imageHeightLarge:500,imageWidthLarge:333,authorshipInfo:"Starring John Travolta, Nicolas Cage, Joan Allen, Alessandro Nivola, Gina Gershon"},{title:"PIXNOR Facial Cleansing Brush [Newest 2020], Waterproof Face Spin Brush with 7 Brush Heads for Deep Cleansing, Gentle Exfoliating, Removing Blackhead, Massaging(Pink)",asin:"B077ZW5YQP",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"PIXNOR",detailPageUrl:"https://www.amazon.com/PIXNOR-Cleansing-Waterproof-Exfoliating-Blackhead/dp/B077ZW5YQP?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B077ZW5YQP",listPrice:"$39.99",salePrice:"$22.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41KQCaa1hjL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"PIXNOR"},{title:"BESTOPE Blackhead Remover Pimple Comedone Extractor Tool Best Acne Removal Kit - Treatment for Blemish, Whitehead Popping, Zit Removing for Risk Free Nose Face Skin with Metal Case",asin:"B019SVHLEY",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"Doctor PimplePopper",detailPageUrl:"https://www.amazon.com/BESTOPE-Blackhead-Remover-Comedone-Extractor/dp/B019SVHLEY?psc=1&SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B019SVHLEY",listPrice:"$7.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QHC5fDdfL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"Doctor PimplePopper"},{title:"Welcome to the Jungle",asin:"B004L3L9PM",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Welcome-to-the-Jungle/dp/B004L3L9PM?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B004L3L9PM",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51KBv1L7lJL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:""},{title:"Black Charcoal Mask - Face Peel Off Mask with Organic Bamboo and Vitamin C - Deep Cleansing Pore Blackhead Removal and Purifying Black Mask for Men and Women",asin:"B07V1MPG8N",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"O'linear",detailPageUrl:"https://www.amazon.com/Black-Charcoal-Mask-Cleansing-Blackhead/dp/B07V1MPG8N?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07V1MPG8N",listPrice:"$7.49",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51QkF1BReJL.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"O'linear"},{title:"Girl, Wash Your Face: Stop Believing the Lies about Who You Are So You Can Become Who You Were Meant to Be",asin:"1400201659",productGroup:"Book",authors:["Rachel Hollis"],artists:[],actors:[],manufacturer:"Thomas Nelson",detailPageUrl:"https://www.amazon.com/Girl-Wash-Your-Face-Believing/dp/1400201659?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1400201659",listPrice:"$11.88",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:49,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:104,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51uuwa-5OgL.jpg",imageHeightLarge:500,imageWidthLarge:326,authorshipInfo:"By Rachel Hollis"},{title:"Death Dealers",asin:"B07F75BN4W",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:[],detailPageUrl:"https://www.amazon.com/Death-Dealers/dp/B07F75BN4W?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07F75BN4W",listPrice:"$1.99",authorshipInfo:""},{title:"eDiva Natural Jade Roller- Gua Sha - Lymphatic Drainage Tool for Face, Neck, Body - Anti Aging Treatment - Reduces Wrinkles and Fine Lines",asin:"B07HHF37F7",productGroup:"Beauty",authors:[],artists:[],actors:[],manufacturer:"eDiva",detailPageUrl:"https://www.amazon.com/eDiva-Natural-Jade-Roller-Gua/dp/B07HHF37F7?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B07HHF37F7",listPrice:"$49.95",salePrice:"$22.95",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL75_.jpg",imageHeightSmall:75,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L._SL160_.jpg",imageHeightMedium:160,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/41DWi8-M92L.jpg",imageHeightLarge:500,imageWidthLarge:500,authorshipInfo:"eDiva"},{title:"Pack Leaders",asin:"B071GRS6R9",productGroup:"TV Series Episode Video on Demand",authors:[],artists:[],actors:["McKenzie Westmore","Ve Neill","Glenn Hetrick","Neville Page","Michael Westmore"],detailPageUrl:"https://www.amazon.com/Pack-Leaders/dp/B071GRS6R9?SubscriptionId=AKIAIA3UEVTLIG7AIKFA&tag=%5Bassociate-id-placeholder%5D&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B071GRS6R9",listPrice:"$2.99",imageUrlSmall:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL75_.jpg",imageHeightSmall:56,imageWidthSmall:75,imageUrlMedium:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL._SL160_.jpg",imageHeightMedium:120,imageWidthMedium:160,imageUrlLarge:"https://images-na.ssl-images-amazon.com/images/I/51rP3BM0oxL.jpg",imageHeightLarge:375,imageWidthLarge:500,authorshipInfo:"Starring McKenzie Westmore, Ve Neill, Glenn Hetrick, Neville Page, Michael Westmore"}]}},5305:function(e,t,n){"use strict";var r=n(69307),a=n(55066),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(4981),u=n(82641),p=n(10143);const __=i.__;t.Z=(0,l.withNotices)((function(e){let{attributes:{backgroundColor:t,textColor:n,buttonAndLinkColor:a,asin:i,showImage:d,showTitle:m,showSeller:h,showPrice:f,showPurchaseButton:g},className:b,name:v,noticeUI:k,setAttributes:y}=e;const E=(0,c.getBlockDefaultClassName)(v),[w,_]=(0,r.useState)([]),C=/^(\d+)$|\(ASIN:(.+)\)$/,S=(0,r.createElement)(l.Placeholder,{label:__("Amazon","jetpack"),instructions:__("Search by entering an Amazon product name or ID below.","jetpack"),icon:u.Z,notices:k},(0,r.createElement)("form",null,(0,r.createElement)(l.FormTokenField,{value:i,suggestions:w,onInputChange:()=>{_(p.Z.products.map((e=>`${e.title} (ASIN:${e.asin})`)))},maxSuggestions:10,label:__("Products","jetpack"),onChange:e=>{const t=e.map((e=>{const t=C.exec(e),n=t[1]||t[2];return p.Z.products.filter((e=>e.asin===n))}));y({asin:t[0][0].asin})}}),(0,r.createElement)(l.Button,{variant:"secondary",type:"submit"},__("Preview","jetpack")))),j=(0,r.createElement)(s.InspectorControls,null,i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PanelBody,{title:__("Promotion Settings","jetpack")},(0,r.createElement)(l.ToggleControl,{label:__("Show Image","jetpack"),checked:d,onChange:()=>y({showImage:!d})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Title","jetpack"),checked:m,onChange:()=>y({showTitle:!m})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Author/Seller","jetpack"),checked:h,onChange:()=>y({showSeller:!h})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Price","jetpack"),checked:f,onChange:()=>y({showPrice:!f})}),(0,r.createElement)(l.ToggleControl,{label:__("Show Purchase Button","jetpack"),checked:g,onChange:()=>y({showPurchaseButton:!g})})),(0,r.createElement)(s.PanelColorSettings,{title:__("Color Settings","jetpack"),colorSettings:[{value:t,onChange:e=>y({backgroundColor:e}),label:__("Background Color","jetpack")},{value:n,onChange:e=>y({textColor:e}),label:__("Text Color","jetpack")},{value:a,onChange:e=>y({buttonAndLinkColor:e}),label:__("Button & Link Color","jetpack")}]},(0,r.createElement)(s.ContrastChecker,{isLargeText:!1,textColor:n,backgroundColor:t}))));return(0,r.createElement)("div",{className:b},j,i?(()=>{const{title:e,detailPageUrl:s,listPrice:c,imageUrlMedium:b,imageWidthMedium:v,imageHeightMedium:k}=p.Z.products.filter((e=>e.asin===i))[0],y="TODO",w=b&&(0,r.createElement)("a",{target:"_blank",href:s,rel:"noopener noreferrer"},(0,r.createElement)("img",{alt:e,src:b,width:v,heigth:k})),_=o().mostReadable(a,["#ffffff"],{includeFallbackColors:!0,size:"small"}).toHexString();return i?(0,r.createElement)("div",{style:{backgroundColor:t,color:n,width:v}},d&&w,m&&(0,r.createElement)("div",{className:`${E}-title`},(0,r.createElement)(l.ExternalLink,{href:s,style:{color:a}},e)),h&&(0,r.createElement)("div",{className:`${E}-seller`},y),f&&(0,r.createElement)("div",{className:`${E}-list-price`},c),g&&(0,r.createElement)(l.Button,{href:s,icon:u.Z,variant:"primary",className:`${E}-button`,style:{color:_,backgroundColor:a,borderColor:a}},__("Shop Now","jetpack"))):null})():S)}))},82641:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{clipRule:"evenodd",d:"m13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277002-.202-.481003.154-.251003.416 2.925003 3.326 6.786003 5.326 11.076003 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",fillRule:"evenodd"}))},82450:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return u}});var r=n(65736),a=n(45260),o=n(5305),i=n(82641),s=n(35338);const __=r.__,l="amazon",c=__("Amazon","jetpack"),u={attributes:a.Z,title:c,description:__("Promote Amazon products and earn a commission from sales.","jetpack"),icon:{src:i.Z,foreground:(0,s.m)()},category:"earn",keywords:[__("amazon","jetpack"),__("affiliate","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:o.Z,save:()=>null,example:{attributes:{}}}},34810:function(e,t,n){"use strict";n.d(t,{J:function(){return p},F:function(){return d}});var r=n(4981),a=n(9818),o=n(65736),i=n(35338),s=n(69755);const _x=o._x,__=o.__;function l(e){let{spotifyShowUrl:t,spotifyImageUrl:n}=e;return[["core/image",{url:n,linkDestination:"none",href:t,align:"center",width:165,height:40,className:"is-spotify-podcast-badge"}]]}function c(e){let{episodeTrack:t,feedUrl:n}=e;const{guid:r}=t;return[["jetpack/podcast-player",{customPrimaryColor:(0,i.m)(),hexPrimaryColor:(0,i.m)(),url:n,selectedEpisodes:r?[{guid:r}]:[],showCoverArt:!1,showEpisodeTitle:!1,showEpisodeDescription:!1}]]}function u(e){let{spotifyShowUrl:t,spotifyImageUrl:n,episodeTrack:o={},feedUrl:i}=e;const s=[...c({episodeTrack:o,feedUrl:i})];return t&&n&&s.push(...l({spotifyShowUrl:t,spotifyImageUrl:n})),s.push(...function(e){let{episodeTrack:t}=e;const n=[["core/heading",{level:3,content:_x("Summary","noun: summary of a podcast episode","jetpack"),placeholder:__("Podcast episode title","jetpack")}]],a=(0,r.pasteHandler)({HTML:t.description_html,mode:"BLOCKS"});return a.length?n.push(...a):n.push(["core/paragraph",{placeholder:__("Podcast episode summary","jetpack")}]),n}({episodeTrack:o})),s.push(...function(){const e="jetpack/conversation";return(0,a.select)("core/blocks").getBlockType(e)?[[e,{participants:[{slug:"participant-0",label:__("Speaker 1","jetpack")},{slug:"participant-1",label:__("Speaker 2","jetpack")},{slug:"participant-2",label:__("Speaker 3","jetpack")}]},[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-0"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-1"}],["jetpack/dialogue",{placeholder:__("Podcast episode dialogue","jetpack"),slug:"participant-2"}]]]]:[["core/heading",{level:3,content:__("Transcription","jetpack"),placeholder:__("Podcast episode transcription","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}],["core/paragraph",{placeholder:__("Podcast episode dialogue","jetpack")}]]}()),s}function p(e){return(0,s.Z)(u(e))}function d(e){if(e.spotifyImageUrl&&e.spotifyShowUrl)return(0,s.Z)([...l(e)])}},67986:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819);const __=l.__,p="09:00",d="17:00";class m extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,{opening:r,closing:a}=e;return(0,o.createElement)(o.Fragment,{key:t},(0,o.createElement)("div",{className:"business-hours__row"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.TextControl,{type:"time",label:__("Opening","jetpack"),value:r,className:"business-hours__open",placeholder:p,onChange:e=>{this.setHour(e,"opening",t)}}),(0,o.createElement)(c.TextControl,{type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:d,onChange:e=>{this.setHour(e,"closing",t)}})),(0,o.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,o.createElement)(c.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,o.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,o.createElement)("div",{className:s()(n.name,"business-hours__day")}," "),(0,o.createElement)("div",{className:s()(n.name,"business-hours__hours")},(0,o.createElement)(c.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,o.createElement)("div",{className:"business-hours__remove"}," ")))})),a()(this,"setHour",((e,t,n)=>{const{day:r,attributes:a,setAttributes:o}=this.props,{days:i}=a;o({days:i.map((a=>a.name===r.name?{...a,hours:a.hours.map(((r,a)=>a===n?{...r,[t]:e}:r))}:a))})})),a()(this,"toggleClosed",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>{if(n.name===t.name){const t=e?[{opening:p,closing:d}]:[];return{...n,hours:t}}return n}))})})),a()(this,"addInterval",(()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})})),a()(this,"removeInterval",(e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:a}=n;r({days:a.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})}))}isClosed(){const{day:e}=this.props;return(0,u.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,o.createElement)(c.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,o.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,o.createElement)("div",{className:s()(e.name,"business-hours__day")},this.renderDayToggle()),(0,o.createElement)("div",{className:s()(e.name,"closed","business-hours__hours")}," "),(0,o.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=m},51421:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(69771),l=n(92819);const _x=i._x;class c extends o.Component{constructor(){super(...arguments),a()(this,"renderInterval",((e,t)=>{const{day:n}=this.props,r=n.hours;return(0,o.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,o.createElement)("span",null,", "))}))}formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,s.date)(t,a))}render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,o.createElement)("div",{className:"jetpack-business-hours__item"},(0,o.createElement)("dt",{className:e.name},t.days[e.name]),(0,o.createElement)("dd",null,(0,l.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,o.createElement)("br",null)))}}t.Z=c},84388:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(64140),i=n.n(o),s=n(69307),l=n(86989),c=n.n(l),u=n(89105),p=n.n(u),d=n(65736),m=n(69771),h=n(55609),f=n(67986),g=n(51421),b=n(78833);const __=d.__,v={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class k extends s.Component{constructor(){super(...arguments),i()(this,"state",{localization:v,hasFetched:!1})}componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:v},(()=>{c()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:v,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:o,hasFetched:i}=this.state,{startOfWeek:l}=o,c=r.concat(r.slice(0,l)).slice(l);if(!i)return(0,s.createElement)(h.Placeholder,{icon:b.qv,label:__("Loading business hours","jetpack")});if(!n){const e=(0,m.__experimentalGetSettings)(),{formats:{time:n}}=e;return(0,s.createElement)("dl",{className:p()(t,"jetpack-business-hours")},c.map(((e,t)=>(0,s.createElement)(g.Z,{key:t,day:e,localization:o,timeFormat:n}))))}return(0,s.createElement)("div",{className:p()(t,"is-edit")},c.map(((e,t)=>(0,s.createElement)(f.Z,a()({key:t,day:e,localization:o},this.props)))))}}t.Z=k},78833:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(84388),s=n(5160),l=n(35338);const __=a.__,_x=a._x,c=[{name:"Sun",hours:[]},{name:"Mon",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Tue",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Wed",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Thu",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Fri",hours:[{opening:"09:00",closing:"17:00"}]},{name:"Sat",hours:[]}],u="business-hours",p=(0,s.Z)((0,r.createElement)(o.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),d={title:__("Business Hours","jetpack"),description:__("Display opening hours for your business.","jetpack"),icon:{src:p,foreground:(0,l.m)()},category:"grow",supports:{html:!0,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0},align:["wide","full"]},keywords:[_x("opening hours","block search term","jetpack"),_x("closing time","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("working day","block search term","jetpack")],attributes:{days:{type:"array",default:c}},edit:e=>(0,r.createElement)(i.Z,e),save:()=>null,example:{attributes:{days:c}}}},33323:function(e,t,n){"use strict";var r=n(92819),a=n(55609);const o=(0,a.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:a}=t,o=(0,r.get)(n,"color"),i=!(0,r.get)(a,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:o||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:a||!i?void 0:getComputedStyle(i).color}}));t.Z=o},11920:function(e,t,n){"use strict";var r=n(76750);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},81632:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(92373);const __=o.__;function s(e){let{borderRadius:t="",setAttributes:n}=e;const o=(0,r.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(a.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(a.RangeControl,{allowReset:!0,initialPosition:i.pg,label:__("Border radius","jetpack"),max:i.Gp,min:i.G0,onChange:o,value:t}))}},86028:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(52175),o=n(65736);const __=o.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:o,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(a.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:o,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(a.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(a.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},75518:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},h:function(){return d}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736);const __=s.__,l=[{value:"px",label:"px",default:150},{value:"%",label:"%",default:100},{value:"em",label:"em",default:10}],c=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function p(e){return(0,r.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,r.createElement)(d,e))}function d(e){let{align:t,width:n,onChange:a}=e;const[s,p]=(0,r.useState)(null);(0,r.useEffect)((()=>{void 0===n&&p("px")}),[n]);const d="left"===t||"right"===t;return(0,r.createElement)(i.BaseControl,{label:__("Button width","jetpack")},(0,r.createElement)("div",{className:o()("jetpack-button__width-settings",{"is-aligned":d})},!d&&(0,r.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},u.map((e=>(0,r.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;p("%"),a(t)}(e)},e)))),(0,r.createElement)(i.__experimentalUnitControl,{className:"jetpack-button__custom-width",isResetValueOnUnitChange:!0,max:"%"===s||null!=n&&n.includes("%")?100:void 0,min:0,onChange:e=>a(e),onUnitChange:e=>p(e),size:"small",units:d?c:l,value:n,unit:s})))}},92373:function(e,t,n){"use strict";n.d(t,{DA:function(){return a},pg:function(){return o},Gp:function(){return i},G0:function(){return s}});var r=n(52175);const a=!!r.__experimentalUseGradient,o=5,i=50,s=0},52982:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(81632),o=n(86028),i=n(75518);function s(e){let{attributes:t,backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,setAttributes:c,setBackgroundColor:u,setTextColor:p,textColor:d,gradientValue:m,setGradient:h,isGradientAvailable:f}=e;const{align:g,borderRadius:b,width:v}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Z,{backgroundColor:n,fallbackBackgroundColor:s,fallbackTextColor:l,gradientValue:m,setBackgroundColor:u,setGradient:h,setTextColor:p,textColor:d,isGradientAvailable:f}),(0,r.createElement)(a.Z,{borderRadius:b,setAttributes:c}),(0,r.createElement)(i.Z,{align:g,width:v,onChange:e=>c({width:e})}))}},21906:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(52175),c=n(94333),u=n(65736),p=n(33323),d=n(52982),m=n(92373),h=n(18983);const __=u.__;t.Z=(0,c.compose)((0,l.withColors)({backgroundColor:"background-color"},{textColor:"color"}),p.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:i,setAttributes:c,textColor:u}=e,{align:p,borderRadius:f,element:g,placeholder:b,text:v,width:k}=t,y=(e=>{const t=(0,o.useRef)();return(0,o.useEffect)((()=>{t.current=e}),[e]),t.current})(p);(0,h.Z)({attributes:t,clientId:i,setAttributes:c}),(0,o.useEffect)((()=>{y!==p&&("left"===p||"right"===p)&&null!=k&&k.includes("%")&&c({width:void 0})}),[p,y,c,k]);const{gradientClass:E,gradientValue:w,setGradient:_}=m.DA?(0,l.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},C=s()("wp-block-button",r),S=s()("wp-block-button__link",{"has-background":n.color||w,[n.class]:!w&&n.class,"has-text-color":u.color,[u.class]:u.class,[E]:E,"no-border-radius":0===f,"has-custom-width":!!k}),j={...!n.color&&w?{background:w}:{backgroundColor:n.color},color:u.color,borderRadius:f?f+"px":void 0,width:k};return(0,o.createElement)("div",{className:C},(0,o.createElement)(l.RichText,{allowedFormats:"input"===g?[]:void 0,className:S,disableLineBreaks:"input"===g,onChange:e=>{const t="input"===g?e.replace(/<br>/gim," "):e;c({text:t})},placeholder:b||__("Add text…","jetpack"),style:j,value:v,withoutInteractiveFormatting:!0}),(0,o.createElement)(l.InspectorControls,null,(0,o.createElement)(d.Z,a()({gradientValue:w,setGradient:_,isGradientAvailable:m.DA},e))))}))},45504:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},37563:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(65736),a=n(11920),o=n(21906),i=n(45504),s=n(57361),l=n(61365);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:i.Z,category:(0,l.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"]},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:o.Z,save:s.Z}},57361:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92373);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:b,url:v,width:k}=t;if(!f)return null;const y=(0,i.getColorClassName)("background-color",l),E=s.DA?(0,i.__experimentalGetGradientClass)(h):void 0,w=(0,i.getColorClassName)("color",b),_=o()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),C=o()("wp-block-button__link",{"has-text-color":b||m,[w]:w,"has-background":l||h||p||d,[y]:y,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k}),S={background:d||void 0,backgroundColor:y||d||h?void 0:p,color:w?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:_},(0,r.createElement)(i.RichText.Content,{className:C,"data-id-attr":a||"placeholder",href:v,id:a,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g}))}},18983:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(92819),a=n(9818),o=n(69307);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,a.useSelect)((e=>{const{getBlockAttributes:a,getBlockRootClientId:o}=e("core/block-editor"),i=a(o(n))||{},l=(0,r.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,r.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,r.isEmpty)(l)||i(l)}),[l,i])}},92921:function(e,t,n){"use strict";var r=n(76750);t.Z={backgroundColor:{type:"string",default:"ffffff",validator:r.Z},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:r.Z},textColor:{type:"string",default:"4D5055",validator:r.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")}}},66266:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(62474);const __=i.__,_x=i._x,l=e=>{let{onEditClick:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},c=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:i,parseEmbedCode:s,setAttributes:l,setEmbedCode:c}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:s,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>c(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(o.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>l({hideEventTypeDetails:!t})})),n&&(0,r.createElement)(o.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(o.ExternalLink,{href:"https://help.calendly.com/hc/en-us/community/posts/360033166114-Embed-Widget-Color-Customization-Available-Now-"},__("Follow these instructions to change the colors in this block.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:u}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(l,{onEditClick:u})),d&&(0,r.createElement)(s.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c,e)))}},68855:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(76750);const __=o.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:o,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,a.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},65495:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=(n(86841),n(92819)),s=n(12116),l=n(52175),c=n(55609),u=n(65736),p=n(4981),d=n(9818),m=n(49971),h=n(92921),f=n(32684),g=n(92541),b=n(4673),v=n(90117),k=n(66266);const __=u.__,_x=u._x;t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:u,noticeOperations:y,noticeUI:E,setAttributes:w}=e,_=(0,p.getBlockDefaultClassName)(u),C=(0,f.S)(h.Z,t);(0,i.isEqual)(C,t)||w(C);const{backgroundColor:S,hideEventTypeDetails:j,primaryColor:x,textColor:P,style:T,url:A}=C,[N,I]=(0,o.useState)(A),[B,M]=(0,o.useState)(!1),[R,L]=(0,o.useState)(!1),[Z,D]=(0,o.useState)({}),F=()=>{y.removeAllNotices(),y.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,o.useEffect)((()=>{A&&b.lR!==A&&"link"!==T&&(0,v.Z)(A,L).catch((()=>{w({url:void 0}),F()}))}),[]);const O=e=>{if(!e)return void F();e.preventDefault();const t=(0,g.CC)(N);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,d.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,d.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),D(t.buttonAttributes)}(0,v.Z)(t.url,L).then((()=>{const e=(0,f.S)(h.Z,t);w(e),M(!1),y.removeAllNotices()})).catch((()=>{w({url:void 0}),F()}))}else F()},z=(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(c.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack"))),U=(0,o.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:m.Z,notices:E},(0,o.createElement)("form",{onSubmit:O},(0,o.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:N||"",className:"components-placeholder__input"}),(0,o.createElement)("div",null,(0,o.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,o.createElement)("div",{className:`${_}-learn-more`},(0,o.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),$=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:`${_}-overlay`}),(0,o.createElement)("iframe",{src:(()=>{const e=s.stringify({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:j?1:0,background_color:S,primary_color:x,text_color:P});return`${A}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),H=(0,o.createElement)(l.InnerBlocks,{template:[[b.Ss.name,{...b.Ss.attributes,...Z,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(R)return z;let V=n;return A&&!B&&(V+=` calendly-style-${T}`),(0,o.createElement)("div",{className:V},(0,o.createElement)(k.ZP,a()({},e,{defaultClassName:_,embedCode:N,isEditingUrl:B,parseEmbedCode:O,setEmbedCode:I,setIsEditingUrl:M})),A&&!B?"inline"===T?$:H:U)}))},49971:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"24",viewBox:"0 0 23 24",width:"23",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z"}))},4673:function(e,t,n){"use strict";n.d(t,{lR:function(){return d},Ss:function(){return m},u2:function(){return h},Xd:function(){return f}});var r=n(65736),a=n(4981),o=n(92921),i=n(68855),s=n(65495),l=n(49971),c=n(60035),u=n(92541),p=n(35338);const __=r.__,_x=r._x,d="https://calendly.com/wpcom/jetpack-block-example",m={name:"jetpack/button",attributes:{element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:d}},h="calendly",f={title:__("Calendly","jetpack"),description:__("Embed a calendar for customers to schedule appointments","jetpack"),icon:{src:l.Z,foreground:(0,p.m)()},category:"grow",keywords:[_x("calendar","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack"),_x("events","block search term","jetpack"),_x("dates","block search term","jetpack")],supports:{align:!0,alignWide:!1,html:!1},edit:s.Z,save:c.Z,attributes:o.Z,example:{attributes:{hideEventTypeDetails:!1,style:"inline",url:d},innerBlocks:[m]},transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&u.mL.test(e.textContent),transform:e=>{const t=(0,u.CC)(e.textContent);return(0,a.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]}},60035:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(){return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null))}},92541:function(e,t,n){"use strict";n.d(t,{mL:function(){return r},CC:function(){return a}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,a=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),a=r.get("background_color"),o=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),a&&a.match(s)&&(t.backgroundColor=a),o&&o.match(s)&&(t.primaryColor=o),i&&i.match(s)&&(t.textColor=i),t})(t),a=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(a&&(n.style=a),"link"===a){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const a=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);a&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=a)}return n}},40465:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={subject:{type:"string"},to:{type:"string"},customThankyou:{type:"string",default:""},customThankyouHeading:{type:"string",default:__("Message Sent","jetpack")},customThankyouMessage:{type:"string",default:""},customThankyouRedirect:{type:"string",default:""},jetpackCRM:{type:"boolean",default:!0}}},9095:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__('The CRM Jetpack Form extension failed to activate. The error message was "<error />".',"jetpack"),{error:(0,r.createElement)("span",null,t)}))}},62731:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(9095);const __=s.__,c=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:s,crmData:c,setCRMData:u}=e;const p=((e,t,n,r)=>()=>{t(void 0),e(!0),o()({path:"/jetpack/v4/jetpack_crm",method:"POST",data:{extension:"jetpackforms"}}).then((e=>{if("success"!==e.code)throw new Error(e.code);const t=Object.assign({},n);t.jp_form_ext_enabled=!0,r(t)})).catch((e=>{t(e.message)})).finally((()=>{e(!1)}))})(n,s,c,u);return t?(0,r.createElement)(i.Spinner,null):a?(0,r.createElement)(l.Z,{error:a}):(0,r.createElement)(i.Button,{variant:"secondary",onClick:p},__("Enable Jetpack Forms Extension","jetpack"))},u=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("A site administrator must enable the CRM Jetpack Forms extension.","jetpack")),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("You can integrate this contact form with Jetpack CRM by enabling Jetpack CRM's Jetpack Forms extension.","jetpack"));t.Z=e=>{let{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s}=e;return i.can_activate_extension?(0,r.createElement)("div",null,(0,r.createElement)(p,null),(0,r.createElement)("br",null),(0,r.createElement)(c,{isActivatingExt:t,setIsActivatingExt:n,extActivationError:a,setExtActivationError:o,crmData:i,setCRMData:s})):(0,r.createElement)(u,null)}},92039:function(e,t,n){"use strict";var r=n(69307),a=n(53377),o=n.n(a),i=n(55609),s=n(65736),l=n(62731),c=n(68363);const __=s.__,u=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),p=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("The Jetpack CRM plugin is installed but has an invalid version.","jetpack")),d=()=>(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Please update to the latest version of the Jetpack CRM plugin to integrate your contact form with your CRM.","jetpack")),m=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(i.Button,{variant:"secondary",icon:(0,r.createElement)(i.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},h=e=>{let{installAndActivateCRMPlugin:t,isInstalling:n}=e,a=(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Install Jetpack CRM","jetpack"));return n&&(a=(0,r.createElement)(m,null)),(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("You can save contacts from Jetpack contact forms in Jetpack CRM.","jetpack"),(0,r.createElement)("br",null),a))},f=e=>{let{activateCRMPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("You already have the Jetpack CRM plugin installed, but it’s not activated.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(m,{isActivating:!0}),!n&&(0,r.createElement)(i.Button,{variant:"secondary",onClick:t},__("Activate the Jetpack CRM plugin","jetpack")))},g=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:s}=e;const[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(!1);return t.jp_form_ext_enabled?o().satisfies(o().coerce(t.crm_version),"3.0.19 - 4.0.0")?(0,r.createElement)("p",{className:"jetpack-contact-form__crm_text"},__("Contacts from this form will be stored in Jetpack CRM.","jetpack")):(0,r.createElement)(i.ToggleControl,{className:"jetpack-contact-form__crm_toggle",label:__("Jetpack CRM","jetpack"),checked:a,onChange:e=>s({jetpackCRM:e}),help:__("Store contact form submissions in your CRM.","jetpack")}):(0,r.createElement)(l.Z,{isActivatingExt:c,setIsActivatingExt:u,extActivationError:p,setExtActivationError:d,crmData:t,setCRMData:n})};t.Z=e=>{let{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i,onCRMPluginClick:s,isInstalling:l}=e;const m=o().coerce(t.crm_version);if(t.crm_installed&&!m)return(0,r.createElement)(p,null);if(t.crm_installed&&o().lt(m,"4.9.1"))return(0,r.createElement)(d,null);let b=u.NOT_INSTALLED;return t.crm_active?b=u.ACTIVE:t.crm_installed&&(b=u.INSTALLED),(0,r.createElement)("div",{"aria-live":"polite"},u.ACTIVE===b&&(0,r.createElement)(g,{crmData:t,setCRMData:n,jetpackCRM:a,setAttributes:i}),u.INSTALLED===b&&(0,r.createElement)(f,{activateCRMPlugin:()=>s(c.bu,"zero-bs-crm/ZeroBSCRM"),isInstalling:l}),u.NOT_INSTALLED===b&&(0,r.createElement)(h,{installAndActivateCRMPlugin:()=>s(c.yX,"zero-bs-crm"),isInstalling:l}))}},79168:function(e,t,n){"use strict";var r=n(69307),a=n(86989),o=n.n(a),i=n(55609),s=n(65736),l=n(92039);const __=s.__,c=(e,t,n)=>{o()({path:"/jetpack/v4/jetpack_crm"}).then((n=>{if(n.error)throw n.message;e(!1),t(n)})).catch((()=>e(!0))).finally((()=>n(!1)))},u=e=>{let{isFetchingCRMData:t,hasCRMDataError:n,crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p}=e;return t?(0,r.createElement)(i.Spinner,null):n?null:(0,r.createElement)(l.Z,{crmData:a,setCRMData:o,jetpackCRM:s,setAttributes:c,onCRMPluginClick:u,isInstalling:p})};t.Z=e=>{let{jetpackCRM:t,setAttributes:n}=e;const[a,o]=(0,r.useState)(!0),[s,l]=(0,r.useState)(!1),[p,d]=(0,r.useState)(),[m,h]=(0,r.useState)(!1),f=(0,r.useCallback)(((e,t)=>{h(!0),e(t).catch((()=>{l(!0)})).finally((()=>{h(!1),o(!0),c(l,d,o)}))}),[h,l,o]);return(0,r.useEffect)((()=>{c(l,d,o)}),[]),(0,r.createElement)(i.PanelBody,{title:__("CRM Integration","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,null,(0,r.createElement)(u,{isFetchingCRMData:a,hasCRMDataError:s,crmData:p,setCRMData:d,jetpackCRM:t,setAttributes:n,isInstalling:m,onCRMPluginClick:f})))}},60618:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(68919),c=n(65249);const __=a.__;t.Z=(0,s.withInstanceId)((function(e){const{id:t,instanceId:n,required:a,label:s,setAttributes:u,width:p,defaultValue:d}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-checkbox-${n}`,className:"jetpack-field jetpack-field-checkbox",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("input",{className:"jetpack-field-checkbox__checkbox",type:"checkbox",disabled:!0,checked:d}),(0,r.createElement)(l.Z,{required:a,label:s,setAttributes:u}),(0,r.createElement)(c.Z,{id:t,required:a,width:p,setAttributes:u}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Checkbox Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Checked by default","jetpack"),checked:d,onChange:e=>u({defaultValue:e?"true":""})}))))})}))},78530:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(94333),l=n(68919),c=n(13003),u=n(70041);const __=a.__;t.Z=(0,s.withInstanceId)((e=>{var t;let{id:n,instanceId:s,width:p,consentType:d,implicitConsentMessage:m,explicitConsentMessage:h,setAttributes:f}=e;return(0,r.createElement)(o.BaseControl,{id:`jetpack-field-consent-${s}`,className:"jetpack-field jetpack-field-consent",label:(0,r.createElement)(r.Fragment,null,"explicit"===d&&(0,r.createElement)("input",{className:"jetpack-field-consent__checkbox",type:"checkbox",disabled:!0}),(0,r.createElement)(l.Z,{required:!1,label:null!==(t={implicit:m,explicit:h}[d])&&void 0!==t?t:"",setAttributes:f,labelFieldName:`${d}ConsentMessage`,placeholder:(0,a.sprintf)(
3
  /* translators: placeholder is a type of consent: implicit or explicit */
4
  __("Add %s consent message…","jetpack"),d)}),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(c.Z,{setAttributes:f,width:p}))),(0,r.createElement)(i.InspectorAdvancedControls,null,(0,r.createElement)(u.Z,{setAttributes:f,id:n})),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Consent Settings","jetpack")},(0,r.createElement)(o.BaseControl,null,(0,r.createElement)(o.SelectControl,{label:__("Permission to email","jetpack"),value:d,options:[{label:__("Mention that you can email","jetpack"),value:"implicit"},{label:__("Add a privacy checkbox","jetpack"),value:"explicit"}],onChange:e=>f({consentType:e})})))))})}))},65249:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(5160),l=n(13003),c=n(70041);const __=a.__;t.Z=e=>{let{setAttributes:t,width:n,id:a,required:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{title:__("Required","jetpack"),icon:(0,s.Z)((0,r.createElement)(i.Path,{d:"M8.23118 8L16 16M8 16L15.7688 8 M6.5054 11.893L17.6567 11.9415M12.0585 17.6563L12 6.5",stroke:"currentColor"})),onClick:()=>{t({required:!u})},className:u?"is-pressed":void 0}))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Field Settings","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Field is required","jetpack"),className:"jetpack-field-label__required",checked:u,onChange:e=>t({required:e}),help:__("Does this field have to be completed for the form to be submitted?","jetpack")}),(0,r.createElement)(l.Z,{setAttributes:t,width:n}))),(0,r.createElement)(o.InspectorAdvancedControls,null,(0,r.createElement)(c.Z,{setAttributes:t,id:a})))}},70041:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,id:n}=e;return(0,r.createElement)(o.TextControl,{label:__("Unique CSS ID","jetpack"),value:n,onChange:e=>t({id:e}),help:__("A unique ID that can be used in CSS or as an anchor.","jetpack")})}},68919:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175);const __=a.__;t.Z=e=>{let{setAttributes:t,label:n,labelFieldName:a,placeholder:i,resetFocus:s,required:l}=e;return(0,r.createElement)("div",{className:"jetpack-field-label"},(0,r.createElement)(o.RichText,{tagName:"label",value:n,className:"jetpack-field-label__input",onChange:e=>{s&&s(),t(a?{[a]:e}:{label:e})},placeholder:null!=i?i:__("Add label…","jetpack"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic"]}),l&&(0,r.createElement)("span",{className:"required"},__("(required)","jetpack")))}},11898:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(68919),l=n(77744),c=n(65249);const __=a.__;t.Z=(0,i.withInstanceId)((function(e){const{id:t,type:n,instanceId:a,required:i,label:u,setAttributes:p,isSelected:d,width:m,options:h}=e,[f,g]=(0,r.useState)(null),b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=h.slice(0);null===t?(n.splice(e,1),e>0&&g(e-1)):(n.splice(e,1,t),g(e)),p({options:n})},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=h.slice(0);let n=0;"object"==typeof e?(t.push(""),n=t.length-1):(t.splice(e+1,0,""),n=e+1),g(n),p({options:t})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{id:`jetpack-field-multiple-${a}`,className:"jetpack-field jetpack-field-multiple",label:(0,r.createElement)(s.Z,{required:i,label:u,setAttributes:p,isSelected:d,resetFocus:()=>g(null)})},(0,r.createElement)("ol",{className:"jetpack-field-multiple__list",id:`jetpack-field-multiple-${a}`},h.map(((e,t)=>(0,r.createElement)(l.Z,{type:n,key:t,option:e,index:t,onChangeOption:b,onAddOption:v,isInFocus:t===f&&d,isSelected:d})))),d&&(0,r.createElement)(o.Button,{className:"jetpack-field-multiple__add-option",icon:"insert",label:__("Insert option","jetpack"),onClick:v},__("Add option","jetpack"))),(0,r.createElement)(c.Z,{id:t,required:i,setAttributes:p,width:m}))}))},70627:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(68919),s=n(65249);const __=a.__;function l(e){const{id:t,required:n,label:a,setAttributes:l,placeholder:c,width:u}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"jetpack-field"},(0,r.createElement)(i.Z,{required:n,label:a,setAttributes:l}),(0,r.createElement)(o.Disabled,null,(0,r.createElement)(o.TextareaControl,{placeholder:c,value:c,onChange:e=>l({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,r.createElement)(s.Z,{id:t,required:n,setAttributes:l,width:u}))}},13003:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(65736),o=n(55609);const __=a.__;function i(e){let{setAttributes:t,width:n}=e;return(0,r.createElement)(o.BaseControl,{label:__("Field Width","jetpack"),help:__("Adjust the width of the field to include multiple fields on a single line.","jetpack"),className:"jetpack-field-label__width"},(0,r.createElement)(o.ButtonGroup,{"aria-label":__("Field Width","jetpack")},[25,50,75,100].map((e=>(0,r.createElement)(o.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>t({width:e})},e,"%")))))}},52653:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3779),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(55609),c=n(92694),u=n(68919),p=n(65249);const __=i.__;function d(e){const{id:t,type:n,required:r,label:a,setAttributes:i,placeholder:s,width:c}=e;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"jetpack-field"},(0,o.createElement)(u.Z,{required:r,label:a,setAttributes:i}),(0,o.createElement)(l.Disabled,null,(0,o.createElement)(l.TextControl,{type:n,placeholder:s,value:s,onChange:e=>i({placeholder:e}),title:__("Set the placeholder text","jetpack")}))),(0,o.createElement)(p.Z,{id:t,required:r,width:c,setAttributes:i}))}const m=(0,s.createHigherOrderComponent)((e=>t=>{if(t.name.indexOf("jetpack/field")>-1){const n=t.attributes.width?"jetpack-field__width-"+t.attributes.width:"";return(0,o.createElement)(e,a()({},t,{className:n}))}return(0,o.createElement)(e,t)}),"withCustomClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/contact-form",m)},12710:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(9818),s=n(4981);const __=o.__,l=()=>{const{insertConsentBlock:e}=(()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]),{insertBlock:t}=(0,i.useDispatch)("core/block-editor");return{insertConsentBlock:(0,r.useCallback)((async()=>{var n;let r=(null!==(n=e.innerBlocks)&&void 0!==n?n:[]).findIndex((e=>{let{name:t}=e;return"jetpack/button"===t}));var a;-1===r&&(r=(null!==(a=e.innerBlocks)&&void 0!==a?a:[]).length);const o=await(0,s.createBlock)("jetpack/field-consent");await t(o,r,e.clientId,!1)}),[t,e.clientId,e.innerBlocks])}})();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("You’re already collecting email contacts. Why not make sure you have permission to email them too?","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:e,style:{marginBottom:"1em"}},__("Add email permission request","jetpack")),(0,r.createElement)("br",null))};t.Z=()=>{const e=(0,i.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);return(0,r.useMemo)((()=>(e=>{const t=e.some((e=>{let{name:t}=e;return"jetpack/field-email"===t})),n=e.some((e=>{let{name:t}=e;return"jetpack/field-consent"===t}));return!!t&&!n})(e.innerBlocks)),[e.innerBlocks])?(0,r.createElement)(l,null):null}},15521:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(92819),i=n(68363),s=n(12414),l=n(80587);const c="creative-mail-by-constant-contact/creative-mail-plugin.php",u=e=>{let{pluginState:t,setPluginState:n}=e;const[a,o]=(0,r.useState)(),[i,c]=(0,r.useState)(!1),u=((e,t,n)=>(0,r.useCallback)(((r,a)=>{e(void 0),t(!0),r(a).then((()=>{n(l.Q.ACTIVE)})).catch((t=>{e(t)})).finally((()=>t(!1)))}),[t,e,n]))(o,c,n);return a?(0,r.createElement)(s.Z,{error:a}):(0,r.createElement)(l.Z,{pluginState:t,onCreativeMailPluginClick:u,isInstalling:i})},p=e=>{let{isFetchingPlugins:t,hasError:n,pluginState:o,setPluginState:i}=e;return t?(0,r.createElement)(a.Spinner,null):n?null:(0,r.createElement)(u,{pluginState:o,setPluginState:i})};t.Z=()=>{const[e,t]=(0,r.useState)(!0),[n,a]=(0,r.useState)(!1),[s,u]=(0,r.useState)(l.Q.NOT_INSTALLED);return(0,r.useEffect)((()=>{(0,i.uM)().then((e=>{a(!1),(0,o.get)(e,c)&&((0,o.get)(e,[c,"active"])?u(l.Q.ACTIVE):u(l.Q.INSTALLED))})).catch((()=>a(!0))).finally((()=>t(!1)))}),[u,t,a]),(0,r.createElement)(p,{isFetchingPlugins:e,hasError:n,pluginState:s,setPluginState:u})}},12414:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__;t.Z=e=>{let{error:t}=e;return(0,r.createElement)(a.Notice,{isDismissible:!1,status:"error"},(0,r.createInterpolateElement)(__("The plugin failed to install. <b /> Please check the <a>plugin information</a> for detailed requirements.","jetpack"),{a:(0,r.createElement)(a.ExternalLink,{href:"https://wordpress.org/plugins/creative-mail-by-constant-contact"}),b:(0,r.createElement)("span",null,t)}))}},80587:function(e,t,n){"use strict";n.d(t,{Q:function(){return c}});var r=n(69307),a=n(62369),o=n(55609),i=n(65736),s=n(68363),l=n(92819);const __=i.__,c=Object.freeze({ACTIVE:1,INSTALLED:2,NOT_INSTALLED:3}),u=e=>{let{isActivating:t}=e;const n=t?__("Activating…","jetpack"):__("Installing…","jetpack",0);return(0,r.createElement)(o.Button,{variant:"secondary",icon:(0,r.createElement)(o.Icon,{style:{animation:"rotation 2s infinite linear"},icon:"update"}),disabled:!0,"aria-label":n},n)},p=e=>{let{installAndActivateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",{style:{color:"rgba(38, 46, 57, 0.7)"}},__("To start sending email campaigns, install the Creative Mail plugin for WordPress.","jetpack"),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,null),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Install Creative Mail plugin","jetpack"))))},d=e=>{let{activateCreativeMailPlugin:t,isInstalling:n}=e;return(0,r.createElement)("p",{className:"jetpack-contact-form__integration-panel"},(0,r.createElement)("em",null,__("To start sending email campaigns, activate the Creative Mail plugin for WordPress.","jetpack")),(0,r.createElement)("br",null),n&&(0,r.createElement)(u,{isActivating:!0}),!n&&(0,r.createElement)(o.Button,{variant:"secondary",onClick:t},__("Activate Creative Mail Plugin","jetpack")))},m=()=>(0,r.createElement)("p",null,(0,r.createElement)("em",null,__("You’re all setup for email marketing with Creative Mail.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:`${(0,l.get)((0,a.Pb)(),"adminUrl",!1)}admin.php?page=creativemail`},__("Open Creative Mail settings","jetpack"))));t.Z=e=>{let{pluginState:t,onCreativeMailPluginClick:n,isInstalling:a}=e;return(0,r.createElement)("div",{"aria-live":"polite"},c.ACTIVE===t&&(0,r.createElement)(m,null),c.INSTALLED===t&&(0,r.createElement)(d,{activateCreativeMailPlugin:()=>n(s.bu,"creative-mail-by-constant-contact/creative-mail-plugin"),isInstalling:a}),c.NOT_INSTALLED===t&&(0,r.createElement)(p,{installAndActivateCreativeMailPlugin:()=>n(s.yX,"creative-mail-by-constant-contact"),isInstalling:a}))}},91483:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736),i=n(12710),s=n(15521);const __=o.__;t.Z=()=>(0,r.createElement)(a.PanelBody,{title:__("Newsletter Integration","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,null,(0,r.createElement)(i.Z,null),(0,r.createElement)(s.Z,null)))},77744:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;class i extends r.Component{constructor(){super(...arguments),this.onChangeOption=this.onChangeOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onDeleteOption=this.onDeleteOption.bind(this),this.textInput=(0,r.createRef)()}componentDidMount(){this.props.isInFocus&&this.textInput.current.focus()}componentDidUpdate(){this.props.isInFocus&&this.textInput.current.focus()}onChangeOption(e){this.props.onChangeOption(this.props.index,e.target.value)}onKeyPress(e){return"Enter"===e.key?(this.props.onAddOption(this.props.index),void e.preventDefault()):"Backspace"===e.key&&""===e.target.value?(this.props.onChangeOption(this.props.index),void e.preventDefault()):void 0}onDeleteOption(){this.props.onChangeOption(this.props.index)}render(){const{isSelected:e,option:t,type:n}=this.props;return(0,r.createElement)("li",{className:"jetpack-option"},n&&"select"!==n&&(0,r.createElement)("input",{className:"jetpack-option__type",type:n,disabled:!0}),(0,r.createElement)("input",{type:"text",className:"jetpack-option__input",value:t,placeholder:__("Write option…","jetpack"),onChange:this.onChangeOption,onKeyDown:this.onKeyPress,ref:this.textInput}),e&&(0,r.createElement)(o.Button,{className:"jetpack-option__remove",icon:"trash",label:__("Remove option","jetpack"),onClick:this.onDeleteOption}))}}t.Z=i},76450:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(52175),s=n(4981),l=n(40465);const __=o.__,c=["submit_button_text","has_form_settings_set","submitButtonText","backgroundButtonColor","textButtonColor","customBackgroundButtonColor","customTextButtonColor","submitButtonClasses","hasFormSettingsSet"],u={attributes:{...l.Z},supports:{html:!1},save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)},p={attributes:{submit_button_text:{type:"string",default:__("Submit","jetpack")},has_form_settings_set:{type:"string",default:null},submitButtonText:{type:"string",default:__("Submit","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},submitButtonClasses:{type:"string"},...l.Z},migrate:(e,t)=>{const n=(0,a.omit)(e,c),r={text:e.submitButtonText||e.submit_button_text||__("Submit","jetpack"),backgroundColor:e.backgroundButtonColor,textColor:e.textButtonColor,customBackgroundColor:e.customBackgroundButtonColor,customTextColor:e.customTextButtonColor};return[n,t.concat((0,s.createBlock)("jetpack/button",{element:"button",...r}))]},isEligible:e=>!(!e.has_form_settings_set&&!e.hasFormSettingsSet),save:()=>(0,r.createElement)(i.InnerBlocks.Content,null)};t.Z=[u,p]},23876:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(89105),i=n.n(o),s=n(89453),l=n(65736),c=n(94333),u=n(4981),p=n(9818),d=n(39630),m=n(52175),h=n(55609),f=n(62369),g=n(39403),b=n(65842),v=n(79168),k=n(91483);const __=l.__,y=["jetpack/markdown","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/file","core/html","core/separator","core/spacer","core/subhead","core/table","core/verse","core/video"];t.Z=(0,c.compose)([(0,p.withSelect)(((e,t)=>{const{getBlockType:n,getBlockVariations:r,getDefaultBlockVariation:o}=e("core/blocks"),{getBlocks:i}=e("core/block-editor"),{getEditedPostAttribute:s}=e("core/editor"),{getSite:l,getUser:c,canUser:u}=e("core"),p=i(t.clientId),d=s("author"),m=d&&c(d)&&c(d).email,h=s("title"),f=u("create","plugins");return{blockType:n&&n(t.name),canUserInstallPlugins:f,defaultVariation:o&&o(t.name,"block"),variations:r&&r(t.name,"block"),innerBlocks:p,hasInnerBlocks:p.length>0,siteTitle:(0,a.get)(l&&l(),["title"]),postTitle:h,postAuthorEmail:m}})),(0,p.withDispatch)((e=>{const{replaceInnerBlocks:t,selectBlock:n}=e("core/block-editor");return{replaceInnerBlocks:t,selectBlock:n}})),c.withInstanceId])((function(e){let{attributes:t,setAttributes:n,siteTitle:o,postTitle:c,postAuthorEmail:p,hasInnerBlocks:E,replaceInnerBlocks:w,selectBlock:_,clientId:C,instanceId:S,className:j,blockType:x,variations:P,defaultVariation:T,canUserInstallPlugins:A}=e;const{to:N,subject:I,customThankyou:B,customThankyouHeading:M,customThankyouMessage:R,customThankyouRedirect:L,jetpackCRM:Z}=t,[D,F]=(0,r.useState)(!1),O=i()(j,"jetpack-contact-form"),z=e=>(0,a.map)(e,(e=>{let[t,n,r=[]]=e;return(0,u.createBlock)(t,n,z(r))})),U=e=>{e.attributes&&n(e.attributes),e.innerBlocks&&w(C,z(e.innerBlocks)),_(C)};(0,r.useEffect)((()=>{E||u.registerBlockVariation||U(b.Z[0])})),(0,r.useEffect)((()=>{if(void 0===N&&p&&n({to:p}),void 0===I&&void 0!==o&&void 0!==c){n({subject:"["+o+"] "+c})}}),[N,p,I,o,c,n]);const $=e=>0!==(e=e.trim()).length&&(!s.validate(e)&&{email:e}),H=e=>{if(0===e.target.value.length)return F(!1),void n({to:p});const t=e.target.value.split(",").map($).filter(Boolean);t&&t.length&&F(t)},V=e=>{F(!1),n({to:e.trim()})},G=()=>{const e=void 0!==N?N:"",t=void 0!==I?I:"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(h.TextControl,{"aria-describedby":`contact-form-${S}-email-${D&&D.length>0?"error":"help"}`,label:__("Email address to send to","jetpack"),placeholder:__("name@example.com","jetpack"),onKeyDown:e=>{"Enter"===event.key&&(e.preventDefault(),e.stopPropagation())},value:e,onBlur:H,onChange:V,help:__("You can enter multiple email addresses separated by commas.","jetpack")}),(0,r.createElement)(g.Z,{isError:!0,id:`contact-form-${S}-email-error`},(()=>{if(D){if(1===D.length)return D[0]&&D[0].email?(0,l.sprintf)(
5
  /* translators: placeholder is an email address. */
7
  /* translators: placeholders are email addresses. */
8
  __("%1$s and %2$s are not a valid email address.","jetpack"),D[0].email,D[1].email);const e=D.map((e=>e.email));return(0,l.sprintf)(
9
  /* translators: placeholder is a list of email addresses. */
10
+ __("%s are not a valid email address.","jetpack"),e.join(", "))}return null})()),(0,r.createElement)(h.TextControl,{label:__("Email subject line","jetpack"),value:t,placeholder:__("Enter a subject","jetpack"),onChange:e=>n({subject:e}),help:__("Choose a subject line that you recognize as an email from your website.","jetpack")}),(0,r.createElement)(h.SelectControl,{label:__("On Submission","jetpack"),value:B,options:[{label:__("Show a summary of submitted fields","jetpack"),value:""},{label:__("Show a custom text message","jetpack"),value:"message"},{label:__("Redirect to another webpage","jetpack"),value:"redirect"}],onChange:e=>n({customThankyou:e})}),"redirect"!==B&&(0,r.createElement)(h.TextControl,{label:__("Message Heading","jetpack"),value:M,placeholder:__("Message Sent","jetpack"),onChange:e=>n({customThankyouHeading:e})}),"message"===B&&(0,r.createElement)(h.TextareaControl,{label:__("Message Text","jetpack"),value:R,placeholder:__("Thank you for your submission!","jetpack"),onChange:e=>n({customThankyouMessage:e})}),"redirect"===B&&(0,r.createElement)(h.BaseControl,{label:__("Redirect Address","jetpack"),id:`contact-form-${S}-thankyou-url`},(0,r.createElement)(m.URLInput,{id:`contact-form-${S}-thankyou-url`,value:L,className:"jetpack-contact-form__thankyou-redirect-url",onChange:e=>n({customThankyouRedirect:e})})))};return!E&&u.registerBlockVariation?(0,r.createElement)("div",{className:O},(0,r.createElement)(m.__experimentalBlockVariationPicker,{icon:(0,a.get)(x,["icon","src"]),label:(0,a.get)(x,["title"]),instructions:__("Please select which type of form you'd like to add, or create your own using the skip option.","jetpack"),variations:P,allowSkip:!0,onSelect:function(){U(arguments.length>0&&void 0!==arguments[0]?arguments[0]:T)}})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m.BlockControls,null,(0,r.createElement)(h.ToolbarGroup,null,(0,r.createElement)(h.ToolbarItem,null,(()=>(0,r.createElement)(h.Dropdown,{position:"bottom right",className:"jetpack-contact-form-settings-selector",contentClassName:"jetpack-contact-form__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(h.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("Edit Form Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==d.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,r.createElement)(h.Icon,{icon:"edit"})}))(t,n)},renderContent:()=>G()}))))),(0,r.createElement)(m.InspectorControls,null,(0,r.createElement)(h.PanelBody,{title:__("Form Settings","jetpack")},G()),!(0,f.Wp)()&&(0,r.createElement)(r.Fragment,null,A&&(0,r.createElement)(v.Z,{jetpackCRM:Z,setAttributes:n}),(0,r.createElement)(k.Z,null))),(0,r.createElement)("div",{className:O},(0,r.createElement)(m.InnerBlocks,{allowedBlocks:y,templateInsertUpdatesSelection:!1})))}))},35849:function(e,t,n){"use strict";n.d(t,{u2:function(){return y},Xd:function(){return w},Nk:function(){return x}});var r=n(69307),a=n(65736),o=n(4981),i=n(55609),s=n(52175),l=n(23876),c=n(40465),u=n(65842),p=n(76450),d=n(62391),m=n(52653),h=n(70627),f=n(60618),g=n(11898),b=n(5160),v=n(35338),k=n(78530);const __=a.__,_x=a._x,y="contact-form",E=(0,b.Z)((0,r.createElement)(i.Path,{d:"M13 7.5h5v2h-5zm0 7h5v2h-5zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM11 6H6v5h5V6zm-1 4H7V7h3v3zm1 3H6v5h5v-5zm-1 4H7v-3h3v3z"})),w={title:__("Form","jetpack"),description:__("A simple way to get feedback from folks visiting your site.","jetpack"),icon:{src:E,foreground:(0,v.m)()},keywords:[_x("email","block search term","jetpack"),_x("feedback","block search term","jetpack"),_x("contact form","block search term","jetpack")],supports:{color:{link:!0,gradients:!0},html:!1,spacing:{padding:!0,margin:!0}},attributes:c.Z,edit:l.Z,save:()=>{const e=s.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(s.InnerBlocks.Content,null))},variations:u.Z,category:"grow",transforms:d.Z,deprecated:p.Z},_={category:"grow",parent:["jetpack/contact-form"],supports:{reusable:!1,html:!1},attributes:{label:{type:"string",default:null},required:{type:"boolean",default:!1},options:{type:"array",default:[]},defaultValue:{type:"string",default:""},placeholder:{type:"string",default:""},id:{type:"string",default:""},width:{type:"number",default:100}},transforms:{to:[{type:"block",blocks:["jetpack/field-text"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-text",e)},{type:"block",blocks:["jetpack/field-name"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-name",e)},{type:"block",blocks:["jetpack/field-email"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-email",e)},{type:"block",blocks:["jetpack/field-url"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-url",e)},{type:"block",blocks:["jetpack/field-date"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-date",e)},{type:"block",blocks:["jetpack/field-telephone"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-telephone",e)},{type:"block",blocks:["jetpack/field-textarea"],isMatch:e=>{let{options:t}=e;return!t.length},transform:e=>(0,o.createBlock)("jetpack/field-textarea",e)},{type:"block",blocks:["jetpack/field-checkbox-multiple"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-checkbox-multiple",e)},{type:"block",blocks:["jetpack/field-radio"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-radio",e)},{type:"block",blocks:["jetpack/field-select"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-select",e)},{type:"block",blocks:["jetpack/field-consent"],isMatch:e=>{let{options:t}=e;return 1<=t.length},transform:e=>(0,o.createBlock)("jetpack/field-consent",e)}]},save:()=>null,example:{}},C=e=>{let{attributes:t,name:n}=e;return null===t.label?(0,o.getBlockType)(n).title:t.label},S=e=>t=>(0,r.createElement)(m.Z,{type:e,label:C(t),required:t.attributes.required,setAttributes:t.setAttributes,isSelected:t.isSelected,defaultValue:t.attributes.defaultValue,placeholder:t.attributes.placeholder,id:t.attributes.id,width:t.attributes.width}),j=e=>t=>(0,r.createElement)(g.Z,{label:C(t),required:t.attributes.required,options:t.attributes.options,setAttributes:t.setAttributes,type:e,isSelected:t.isSelected,id:t.attributes.id,width:t.attributes.width}),x=[{name:"field-text",settings:{..._,title:__("Text","jetpack"),description:__("When you need just a small amount of text, add a text input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),edit:S("text")}},{name:"field-name",settings:{..._,title:__("Name","jetpack"),description:__("Introductions are important. Add an input for folks to add their name.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),edit:S("text")}},{name:"field-email",settings:{..._,title:__("Email","jetpack"),keywords:[__("e-mail","jetpack"),__("mail","jetpack"),"email"],description:__("Want to reply to folks? Add an email address input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),edit:S("email")}},{name:"field-url",settings:{..._,title:__("Website","jetpack"),keywords:["url",__("internet page","jetpack"),"link"],description:__("Add an address input for a website.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"})),edit:S("url")}},{name:"field-date",settings:{..._,title:__("Date Picker","jetpack"),keywords:[__("Calendar","jetpack"),_x("day month year","block search term","jetpack")],description:__("The best way to set a date. Add a date picker.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zm0-12H5V5h14v2zM7 11h5v5H7z"})),edit:S("text")}},{name:"field-telephone",settings:{..._,title:__("Phone Number","jetpack"),keywords:[__("Phone","jetpack"),__("Cellular phone","jetpack"),__("Mobile","jetpack")],description:__("Add a phone number input.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),edit:S("tel")}},{name:"field-textarea",settings:{..._,title:__("Message","jetpack"),keywords:[__("Textarea","jetpack"),"textarea",__("Multiline text","jetpack")],description:__("Let folks speak their mind. This text box is great for longer responses.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),edit:e=>(0,r.createElement)(h.Z,{label:C(e),required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,placeholder:e.attributes.placeholder,id:e.attributes.id,width:e.attributes.width})}},{name:"field-checkbox",settings:{..._,title:__("Checkbox","jetpack"),keywords:[__("Confirm","jetpack"),__("Accept","jetpack")],description:__("Add a single checkbox.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"})),edit:e=>(0,r.createElement)(f.Z,{label:e.attributes.label,required:e.attributes.required,setAttributes:e.setAttributes,isSelected:e.isSelected,defaultValue:e.attributes.defaultValue,id:e.attributes.id,width:e.attributes.width}),attributes:{..._.attributes,label:{type:"string",default:""}}}},{name:"field-consent",settings:{..._,title:__("Consent","jetpack"),keywords:[__("Consent","jetpack")],description:__("Ask for consent","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"m81 370h142v40h-142zm0-39h142v-40h-142zm0-79h245v-40h-245zm378 260h-40c0-40.253906-32.746094-73-73-73s-73 32.746094-73 73h-40c0-42.085938 23.128906-78.867188 57.34375-98.3125-11.40625-13.023438-18.34375-30.054688-18.34375-48.6875 0-40.804688 33.195312-74 74-74s74 33.195312 74 74c0 18.632812-6.9375 35.664062-18.34375 48.6875 34.214844 19.445312 57.34375 56.226562 57.34375 98.3125zm-113-113c18.746094 0 34-15.253906 34-34s-15.253906-34-34-34-34 15.253906-34 34 15.253906 34 34 34zm-286 73h138.316406c-3.460937 12.757812-5.316406 26.164062-5.316406 40h-133c-33.085938 0-60-26.914062-60-60v-392c0-33.085938 26.914062-60 60-60h203.757812l142.132813 142.855469v125.210937c-12.042969-7.476562-25.453125-12.765625-39.890625-15.324218v-81.632813h-71.109375c-33.085937 0-60-26.914063-60-60v-71.109375h-174.890625c-11.027344 0-20 8.972656-20 20v392c0 11.027344 8.972656 20 20 20zm234.890625-340.890625h42.972656l-62.972656-63.234375v43.234375c0 11.03125 8.96875 20 20 20zm0 0"}),24,25,"-26 0 512 512"),attributes:{..._.attributes,label:{type:"string",default:__("Consent","jetpack")},consentType:{type:"string",default:"implicit"},implicitConsentMessage:{type:"string",default:__("By submitting your information, you're giving us permission to email you. You may unsubscribe at any time.","jetpack")},explicitConsentMessage:{type:"string",default:__("Can we send you an email from time to time?","jetpack")}},edit:e=>{let{attributes:t,isSelected:n,setAttributes:a}=e;const{id:o,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c}=t;return(0,r.createElement)(k.Z,{id:o,isSelected:n,width:i,consentType:s,implicitConsentMessage:l,explicitConsentMessage:c,setAttributes:a})}}},{name:"field-checkbox-multiple",settings:{..._,title:__("Checkbox Group","jetpack"),keywords:[__("Choose Multiple","jetpack"),__("Option","jetpack")],description:__("People love options. Add several checkbox items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"})),edit:j("checkbox"),attributes:{..._.attributes,label:{type:"string",default:"Choose several"}}}},{name:"field-radio",settings:{..._,title:__("Radio","jetpack"),keywords:[__("Choose","jetpack"),__("Select","jetpack"),__("Option","jetpack")],description:__("Inspired by radios, only one radio item can be selected at a time. Add several radio button items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,r.createElement)(i.Circle,{cx:"12",cy:"12",r:"5"}))),edit:j("radio"),attributes:{..._.attributes,label:{type:"string",default:"Choose one"}}}},{name:"field-select",settings:{..._,title:__("Select","jetpack"),keywords:[__("Choose","jetpack"),__("Dropdown","jetpack"),__("Option","jetpack")],description:__("Compact, but powerful. Add a select box with several items.","jetpack"),icon:(0,b.Z)((0,r.createElement)(i.Path,{fill:(0,v.m)(),d:"M3 17h18v2H3zm16-5v1H5v-1h14m2-2H3v5h18v-5zM3 6h18v2H3z"})),edit:j("select"),attributes:{..._.attributes,label:{type:"string",default:"Select one"}}}}]},62391:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=(e,t,n)=>{const r=n.match(new RegExp(`\\[${e}[^\\]]* ${t}="([^"]*)"`,"im"));if(r&&r.length)return r[1];const a=n.match(new RegExp(`\\[${e}[^\\]]* ${t}='([^']*)'`,"im"));if(a&&a.length)return a[1];const o=n.match(new RegExp(`\\[${e}[^\\]]* ${t}=([^\\s]*)\\s`,"im"));return!(!o||!o.length)&&o[1]},s={root:{},innerBlocks:[]};t.Z={from:[{type:"raw",priority:1,isMatch:e=>!("P"!==e.nodeName||!(/\[contact-form(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[contact-field(\s.*?)?\](?:([^\[]+)?)?/g.test(e.textContent)||/\[\/contact-form]/g.test(e.textContent))),transform:e=>{const t=e.textContent.replace("<br>","");if(t.includes("[contact-form")&&(s.root={},s.innerBlocks=[],s.root=(e=>{const t={to:i("contact-form","to",e),subject:i("contact-form","subject",e),submitButtonText:i("contact-form","submit_button_text",e)};return{blockName:"jetpack/contact-form",attrs:(0,r.pickBy)(t,r.identity)}})(t)),t.includes("[contact-field")){const e=t.match(/(\[contact-field[\s\S]*?\/?])/g);e&&e.length>0&&e.forEach((e=>{s.innerBlocks.push((e=>{const t={label:i("contact-field","label",e),placeholder:i("contact-field","placeholder",e),required:i("contact-field","required",e),options:i("contact-field","options",e)},n=(e=>{const t={text:"jetpack/field-text",url:"jetpack/field-text",textarea:"jetpack/field-textarea",radio:"jetpack/field-radio",checkbox:"jetpack/field-checkbox","checkbox-multiple":"jetpack/field-checkbox-multiple",select:"jetpack/field-select",email:"jetpack/field-email",name:"jetpack/field-name",default:"jetpack/field-text"};return t[e]?t[e]:t.default})(i("contact-field","type",e));return t.options&&(t.options=t.options.split(",")),(0,a.createBlock)(n,(0,r.pickBy)(t,r.identity))})(e))}))}if(t.includes("[/contact-form]")){s.innerBlocks.push((0,a.createBlock)("jetpack/button",{element:"button",text:s.root.attrs.submitButtonText||__("Contact Us","jetpack")}));return(0,a.createBlock)(s.root.blockName,s.root.attrs,s.innerBlocks)}return!1}}]}},65842:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(62369),i=n(65736),s=n(55609),l=n(5160),c=n(35338);const __=i.__,u=(0,a.compact)([{name:"contact-form",title:__("Contact Form","jetpack"),description:__("Add a contact form to your page.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M21.99 8c0-.72-.37-1.35-.94-1.7l-8.04-4.71c-.62-.37-1.4-.37-2.02 0L2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zm-11.05 4.34l-7.2-4.5 7.25-4.25c.62-.37 1.4-.37 2.02 0l7.25 4.25-7.2 4.5c-.65.4-1.47.4-2.12 0z"}),48,48,"-4 -4 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-textarea",{}],["jetpack/button",{text:__("Contact Us","jetpack"),element:"button"}]]},!(0,o.Wp)()&&{name:"newsletter-form",title:__("Newsletter Sign-up","jetpack"),description:__("A simple way to collect information from folks visiting your site.","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M37.9999 7.59998C49.3999 7.59998 68.3999 26.6 68.3999 26.6V68.4H7.59985V26.6C7.59985 26.6 26.5999 7.59998 37.9999 7.59998ZM64.5999 63.536L50.4259 52.44L64.5999 41.8L62.9659 40.394L54.3779 45.334L55.2899 28.956L21.9639 26.98L20.2159 44.232L12.6539 40.622L11.3999 41.8L25.5739 52.44L12.5019 63.27L14.0219 64.904L37.9999 49.4L62.8139 65.17L64.5999 63.536Z"}),48,48,"-6 -6 92 92"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-consent",{}],["jetpack/button",{text:__("Subscribe","jetpack"),element:"button"}]]},{name:"rsvp-form",title:__("RSVP Form","jetpack"),description:__("Add an RSVP form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M10 9V7.41c0-.89-1.08-1.34-1.71-.71L3.7 11.29c-.39.39-.39 1.02 0 1.41l4.59 4.59c.63.63 1.71.19 1.71-.7V14.9c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Attending?","jetpack"),required:!0,options:[__("Yes","jetpack"),__("No","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send RSVP","jetpack"),element:"button"}]],attributes:{subject:__("A new RSVP from your website","jetpack")}},{name:"registration-form",title:__("Registration Form","jetpack"),description:__("Add a Registration form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.34 15.02c.39.39 1.02.39 1.41 0l6.36-6.36c.39-.39.39-1.02 0-1.41L14.16 2.3c-.38-.4-1.01-.4-1.4-.01L6.39 8.66c-.39.39-.39 1.02 0 1.41l4.95 4.95zm2.12-10.61L17 7.95l-4.95 4.95-3.54-3.54 4.95-4.95zm6.95 11l-2.12-2.12c-.18-.18-.44-.29-.7-.29h-.27l-2 2h1.91L19 17H5l1.78-2h2.05l-2-2h-.42c-.27 0-.52.11-.71.29l-2.12 2.12c-.37.38-.58.89-.58 1.42V20c0 1.1.9 2 2 2h14c1.1 0 2-.89 2-2v-3.17c0-.53-.21-1.04-.59-1.42z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{label:__("Phone Number","jetpack")}],["jetpack/field-select",{label:__("How did you hear about us?","jetpack"),options:[__("Search Engine","jetpack"),__("Social Media","jetpack"),__("TV","jetpack"),__("Radio","jetpack"),__("Friend or Family","jetpack")]}],["jetpack/field-textarea",{label:__("Other Details","jetpack")}],["jetpack/button",{text:__("Send","jetpack"),element:"button"}]],attributes:{subject:__("A new registration from your website","jetpack")}},{name:"appointment-form",title:__("Appointment Form","jetpack"),description:__("Add an Appointment booking form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V8c0-.55-.45-1-1-1s-1 .45-1 1v2H2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h2c.55 0 1-.45 1-1s-.45-1-1-1H6zm9 4c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-telephone",{required:!0}],["jetpack/field-date",{label:__("Date","jetpack"),required:!0}],["jetpack/field-radio",{label:__("Time","jetpack"),required:!0,options:[__("Morning","jetpack"),__("Afternoon","jetpack")]}],["jetpack/field-textarea",{label:__("Notes","jetpack")}],["jetpack/button",{text:__("Book Appointment","jetpack"),element:"button"}]],attributes:{subject:__("A new appointment booked from your website","jetpack")}},{name:"feedback-form",title:__("Feedback Form","jetpack"),description:__("Add a Feedback form to your page","jetpack"),icon:(0,l.Z)((0,r.createElement)(s.Path,{fill:(0,c.m)(),d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.03 0 3.8-1.11 4.75-2.75.19-.33-.05-.75-.44-.75H7.69c-.38 0-.63.42-.44.75.95 1.64 2.72 2.75 4.75 2.75z"}),48,48,"-4 -3 32 32"),innerBlocks:[["jetpack/field-name",{required:!0}],["jetpack/field-email",{required:!0}],["jetpack/field-radio",{label:__("Please rate our website","jetpack"),required:!0,options:[__("1 - Very Bad","jetpack"),__("2 - Poor","jetpack"),__("3 - Average","jetpack"),__("4 - Good","jetpack"),__("5 - Excellent","jetpack")]}],["jetpack/field-textarea",{label:__("How could we improve?","jetpack")}],["jetpack/button",{text:__("Send Feedback","jetpack"),element:"button"}]],attributes:{subject:__("New feedback received from your website","jetpack")}}]);t.Z=u},46699:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(55609),c=n(25961);const __=i.__;class u extends r.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:a,region:i,postal:u,country:p,linkToGoogleMaps:d},isSelected:m,setAttributes:h}=this.props,f=[e,t,n,a,i,u,p].some((e=>""!==e)),g=o()({"jetpack-address-block":!0,"is-selected":m}),b=(0,r.createElement)(l.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:d,onChange:e=>h({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:g},!m&&f&&(0,c.Z)(this.props),(m||!f)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>h({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>h({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>h({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:a,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>h({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:i,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>h({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:u,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>h({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(s.PlainText,{value:p,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>h({country:e}),onKeyDown:this.preventEnterKey}),b))}}t.Z=u},40874:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(46699),s=n(25961),l=n(5160);const __=a.__,_x=a._x,c="address",u={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,l.Z)((0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(o.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:i.Z,save:s.Z}},25961:function(e,t,n){"use strict";var r=n(69307),a=n(65736);const __=a.__,o=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:o,region:i,postal:s,country:l}}=e;return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),o&&!(i||s)&&(0,r.createElement)("div",{className:"jetpack-address__city"},o),o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__city"},o),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),!o&&(i||s)&&(0,r.createElement)("div",null,[(0,r.createElement)("span",{className:"jetpack-address__region"},i)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},s)]),l&&(0,r.createElement)("div",{className:"jetpack-address__country"},l))},i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}}=e;let l=o?`+${o},`:"";l=i?`${l}+${i}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${a?`+${a},`:""}${l}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:a,region:o,postal:i,country:s}=e;return[t,n,r,a,o,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:i(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(o,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(o,e))},28045:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(89105),i=n.n(o);const s=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(a.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l}))}},87098:function(e,t,n){"use strict";var r=n(76162),a=n(31747),o=n(65736);const __=o.__;t.Z=e=>{const{setAttributes:t}=e;return(0,a.Z)("email",e,__("Email","jetpack"),r.Z,(e=>t({email:e})))}},87220:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(87098),s=n(5160),l=n(76162);const __=a.__,_x=a._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:i.Z,save:l.Z,parent:["jetpack/contact-info"]}},76162:function(e,t,n){"use strict";var r=n(69307),a=n(89453);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(r.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(r.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(r.Fragment,{key:t},e)})))}},38535:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return g},Nk:function(){return b}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(4981),l=n(28045),c=n(5160),u=n(40874),p=n(87220),d=n(41971),m=n(35338);const __=a.__,_x=a._x,h="contact-info",f=(0,c.Z)((0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z"})),g={title:__("Contact Info","jetpack"),description:__("Lets you add an email address, phone number, and physical address with improved markup for better SEO results.","jetpack"),keywords:[_x("email","block search term","jetpack"),_x("phone","block search term","jetpack"),_x("address","block search term","jetpack")],icon:{src:f,foreground:(0,m.m)()},category:"grow",supports:{align:["wide","full"],html:!1,color:{link:!0,gradients:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,s.createBlock)("core/heading",{content:t.raw.title}),(0,s.createBlock)("jetpack/email",{email:t.raw.email}),(0,s.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,s.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,s.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,s.createBlock)("jetpack/map",{address:t.raw.address})]),(0,s.createBlock)("jetpack/contact-info",{},n)}}]},attributes:{},edit:l.Z,save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))},example:{attributes:{},innerBlocks:[{name:"jetpack/email",attributes:{email:"hello@yourjetpack.blog"}},{name:"jetpack/phone",attributes:{phone:"123-456-7890"}},{name:"jetpack/address",attributes:{address:"987 Photon Drive",city:"Speedyville",region:"CA",postal:"12345",country:"USA"}}]}},b=[{name:u.u,settings:u.X},{name:p.u,settings:p.X},{name:d.u,settings:d.X}]},32680:function(e,t,n){"use strict";var r=n(65736),a=n(17393),o=n(31747);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},41971:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(32680),s=n(5160),l=n(17393);const __=a.__,_x=a._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:i.Z,save:l.Z}},17393:function(e,t,n){"use strict";var r=n(69307);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let a=n?e.substring(n-1):e,o=n?e.substring(0,n):"",i=a.replace(/\D/g,"");return/[0-9/+/(]/.test(a[0])?(o=o.slice(0,-1),"+"===a[0]&&(i="+"+i)):a=a.substring(1),[o.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},o):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},a)]}(t))}},71313:function(e,t){"use strict";t.Z={participants:{type:"array"},showTimestamps:{type:"boolean",default:!1},skipUpload:{type:"boolean",default:!1}}},7086:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.createContext)()},35892:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(69307),a=n(55609),o=n(65736),i=n(4346);const __=o.__,_x=o._x;function s(e){let{className:t,participants:n,onDelete:o}=e;return(0,r.createElement)("div",{className:`${t}__participant-control`},n.map((e=>{let{label:n,slug:s}=e;return(0,r.createElement)("div",{key:`${s}-key`,className:`${t}__participant`},(0,r.createElement)("div",{className:`${t}__participant-label`},(0,i.iT)(n)),(0,r.createElement)(a.Button,{className:`${t}__remove-participant`,label:__("Remove participant","jetpack"),onClick:()=>o(s),variant:"tertiary",isSmall:!0},_x("Remove","verb: remove item from a list","jetpack")))})))}function l(e){let{participants:t,className:n,onChange:a,onDelete:o}=e;return(0,r.createElement)(s,{className:n,participants:t,onChange:a,onDelete:o})}},97343:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(9818),l=n(35892),c=n(7086),u=n(36129),p=n(69755),d=n(4346);const __=a.__,m=[["jetpack/dialogue"]];t.Z=(0,i.withNotices)((function(e){let{className:t,attributes:n,setAttributes:a,noticeUI:h,clientId:f,noticeOperations:g}=e;const{participants:b=[],showTimestamps:v,skipUpload:k}=n,[y,E]=(0,r.useState)(""),{insertBlocks:w}=(0,s.useDispatch)("core/block-editor"),_=(0,r.useCallback)((e=>{a({participants:b.map((t=>t.slug!==e.slug?t:{...t,...e}))})}),[a,b]),C=(0,r.useCallback)((function(e){let{label:t,slug:n}=e;if(!t)return;const r=t.trim();if(null==r||!r.length)return;const o=(0,d.tQ)(b,r);if(o)return o;const i={slug:n||"speaker-"+ +new Date,label:r};return a({participants:[...b,i]}),i}),[b,a]),S=(0,r.useCallback)(a,[a]),j=(0,r.useMemo)((()=>({setAttributes:S,updateParticipants:_,addNewParticipant:C,attributes:{showTimestamps:v}})),[C,S,v,_]);function x(e){g.removeAllNotices(),g.createErrorNotice(e),E(!1)}const P="wp-block-jetpack-conversation";return null!=b&&b.length||k?(0,r.createElement)(c.Z.Provider,{value:j},(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.Panel,null,(0,r.createElement)(i.PanelBody,{title:__("Speakers","jetpack"),className:`${P}__participants`},(0,r.createElement)(l.C,{className:P,participants:b,onDelete:function(e){a({participants:b.filter((t=>{let{slug:n}=t;return n!==e}))})}})))),(0,r.createElement)(o.InnerBlocks,{template:m}))):(0,r.createElement)(i.Placeholder,{label:__("Conversation","jetpack"),instructions:(0,r.createElement)(r.Fragment,null,__("Upload a transcript file or create a conversation with blank content.","jetpack"),(0,r.createElement)("div",null,(0,r.createElement)("em",null,__("Accepted file formats:","jetpack"),(0,r.createElement)("strong",null," ",d.bZ),"."))),icon:(0,r.createElement)(o.BlockIcon,{icon:u.Xu}),notices:h},(0,r.createElement)("div",{className:`${P}__placeholder`},(0,r.createElement)(i.FormFileUpload,{multiple:!1,className:"wp-block-jetpack-slideshow__add-item-button",onChange:function(e){var t,n;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return x(__("Transcript file not found.","jetpack"));if(null!=r&&r.size&&r.size<=0||null==r||!r.size||r.size>d.$n)return x(__("Invalid transcript file size.","jetpack"));if(null!=r&&null!==(n=r.type)&&void 0!==n&&n.length&&"text/plain"!==r.type)return x(__("Invalid transcript file type.","jetpack"));const o=(0,d.Y7)(null==r?void 0:r.name);if(!(0,d.P8)(o))return x(__("Invalid transcript file extension.","jetpack"));E(!0),(0,d.Bt)(r,(function(e,t){let{conversation:n,dialogues:r}=e;if(t)return x(t);a({participants:n.speakers,skipUpload:!(null!=n&&n.length)});const o=r.map((e=>e.slug||e.timestamp?["jetpack/dialogue",e]:["core/paragraph",e])),i=(0,p.Z)(o);w(i,0,f),E(!1)}))},accept:d.bZ,variant:"primary",title:`${__("Accepted file formats:","jetpack")} ${d.bZ}`,disabled:y},__("Upload transcript","jetpack")),(0,r.createElement)(i.Button,{variant:"tertiary",disabled:y,onClick:()=>a({skipUpload:!0})},__("Skip upload","jetpack"))))}))},96464:function(e,t,n){"use strict";var r=n(65736);const __=r.__,a=[{slug:"participant-0",label:"Rosalind"},{slug:"participant-1",label:"Orlando"}],o=[{name:"core/heading",attributes:{content:__("Shakespeare text","jetpack"),level:4}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("O, my dear Orlando, how it grieves me to see thee wear thy heart in a scarf!","jetpack"),timestamp:"00:10"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("It is my arm.","jetpack"),timestamp:"00:15"}},{name:"jetpack/dialogue",attributes:{...a[0],content:__("I thought thy heart had been wounded with the claws of a lion.","jetpack"),timestamp:"00:32"}},{name:"jetpack/dialogue",attributes:{...a[1],content:__("Wounded it is, but with the eyes of a lady.","jetpack"),timestamp:"00:37"}}];t.Z={attributes:{participants:a,showTimestamps:!0,className:"is-style-row"},innerBlocks:o}},45452:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(4981),o=n(36129),i=n(69755),s=n(71313),l=n(97343),c=n(28761),u=n(96464);const __=r.__,_x=r._x,p="conversation",d={title:__("Conversation","jetpack"),description:__("Create a transcription of a speech or conversation, with any number of participants, using dialogue blocks.","jetpack"),icon:o.Xu,category:"layout",keywords:[_x("conversation","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("dialogue","block search term","jetpack"),_x("speaker","block search term","jetpack")],supports:{align:!0},attributes:s.Z,example:u.Z,styles:[{name:"row",label:__("Row","jetpack"),isDefault:!0},{name:"column",label:__("Column","jetpack")}],edit:l.Z,save:c.Z,providesContext:{"jetpack/conversation-participants":"participants","jetpack/conversation-showTimestamps":"showTimestamps"},transforms:{from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>{const t=e.map((e=>{let{content:t}=e;return["jetpack/dialogue",{content:t}]}));return(0,a.createBlock)("jetpack/conversation",{},(0,i.Z)(t))}}]}}},28761:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175);function s(e){let{attributes:t}=e;return(0,r.createElement)("div",{className:o()("wp-block-jetpack-conversation",{"show-timestamps":null==t?void 0:t.showTimestamp})},(0,r.createElement)(i.InnerBlocks.Content,null))}},4346:function(e,t,n){"use strict";n.d(t,{ly:function(){return i},tQ:function(){return s},iT:function(){return l},Y7:function(){return c},bZ:function(){return m},$n:function(){return h},P8:function(){return k},Bt:function(){return y}});var r=n(72629),a=n(81975),o=n(65736);const __=o.__;function i(e,t){const n=e.filter((e=>{let{slug:n}=e;return n===t}));return null!=n&&n.length?n[0]:null}function s(e,t){const n=e.filter((e=>{let{label:n}=e;return(null==n?void 0:n.toLowerCase())===(null==t?void 0:t.toLowerCase())}));return null!=n&&n.length?n[0]:null}function l(e){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=null===(t=(0,r.getTextContent)((0,r.create)({html:e})))||void 0===t?void 0:t.trim();return n?(0,a.escapeHTML)(o):o}function c(e){return`.${e.substr(e.lastIndexOf(".")+1)}`}const u=".srt",p=".txt",d=[u,p,".vtt",".sbv"],m=d.join(", "),h=1e5,f=/(.*[^\s])\s{1,}(\d{1,2}(?::\d{1,2}?)+)\s+\n([\s\S]*?(?=\n{2}|$))/,g=/(?:(.*[^\s]):\s+)?(?:\[(\d+(?::\d+)*?(?:\.\d*)?)])?(?:[\s])*?([^\s].+?(?:\n+|$))/,b=[{name:"otter",re:new RegExp(f,"gm"),testRE:new RegExp(f,"g")},{name:"sonix",re:new RegExp(g,"gm"),testRE:new RegExp(g,"g")}],v=/(\d+)\n([\d:,]+)\s+-{2}>\s+([\d:,]+)\n([\s\S]*?(?=\n{2}|$))/gm;function k(e){return d.indexOf(e)>=0}function y(e,t){const n=c(null==e?void 0:e.name),r=new FileReader;r.addEventListener("load",(e=>{var r;const a=e.target.result?e.target.result.replace(/\r\n|\r|\n/g,"\n"):null;if(null==a||!a.length)return t({},__("Transcript content is empty","jetpack"));let o={};if(n&&n!==p&&n===u&&(o=function(e){const t={conversation:{speakers:[]},dialogues:[]};let n;for(;null!==(n=v.exec(e));)t.dialogues.push({timestamp:n[2],content:n[4]});return t}(a)),n===p&&(o=function(e){const t={dialogues:[],conversation:{speakers:[]}},n=b.filter((t=>{let{testRE:n}=t;return n.test(e)}));if(null==n||!n.length)return t;const r=n[0];let a;for(;null!=(a=r.re.exec(e));){var o,i,s;const e=a[(null==r||null===(o=r.indexes)||void 0===o?void 0:o.speaker)||1]||"";null!=e&&e.length&&t.conversation.speakers.indexOf(e)<0&&t.conversation.speakers.push(e);const n={content:a[(null==r||null===(i=r.indexes)||void 0===i?void 0:i.content)||3],timestamp:a[(null==r||null===(s=r.indexes)||void 0===s?void 0:s.timestamp)||2],showTimestamp:!0};null!=e&&e.length&&(n.label=e,n.slug=`speaker-${t.conversation.speakers.indexOf(e)}`),t.dialogues.push(n)}return t.conversation.speakers=t.conversation.speakers.map(((e,t)=>({label:e,slug:`speaker-${t}`}))),t}(a)),null===(r=o.dialogues)||void 0===r||!r.length)return t({},__("Transcript format not supported","jetpack"));t(o)})),r.readAsText(e)}},40762:function(e,t){"use strict";t.Z={label:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__participant"},slug:{type:"string"},timestamp:{type:"string",default:"00:00"},showTimestamp:{type:"boolean",default:!1},placeholder:{type:"string"},content:{type:"string",source:"html",selector:".wp-block-jetpack-dialogue__content"}}},71353:function(e,t,n){"use strict";n.d(t,{Ev:function(){return m},v$:function(){return g}});n(3779);var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(65736),l=n(52175),c=n(4346);const __=s.__,u="is-participant-adding",p="is-participant-selecting",d="was-participant-selected";function m(e){let{participants:t,slug:n,onSelect:a}=e;return(0,r.createElement)(i.SelectControl,{label:__("Speaker name","jetpack"),value:n,options:t.map((e=>{let{slug:t,label:n}=e;return{label:(0,c.iT)(n),value:t}})),onChange:e=>a((0,c.ly)(t,e))})}const h=(0,i.withFocusOutside)(class extends r.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return(0,r.createElement)("div",{className:this.props.className},this.props.children)}});function f(e){return{name:"jetpack/conversation-participants",triggerPrefix:"",options:e,getOptionLabel:e=>{let{label:t}=e;return(0,r.createElement)("span",null,(0,c.iT)(t))},getOptionKeywords:e=>{let{label:t}=e;return[t]},getOptionCompletion:e=>({action:"replace",value:e}),popoverProps:{position:"bottom"}}}function g(e){let{className:t,label:n,participant:a,participants:i,transcriptRef:s,onParticipantChange:m,onUpdate:g=(()=>{}),onSelect:b,onAdd:v,onClean:k}=e;const[y,E]=(0,r.useState)("is-participant-ready");function w(){if(!n)return;const e=(0,c.tQ)(i,n);return a&&a.label!==n?e&&e.slug!==a.slug?(E(d),b(e)):(E("was-participant-edited"),g({...a,label:(0,c.iT)(n,!0)})):e?(E(d),b(e)):(v((0,c.iT)(n,!0)),E("was-participant-added"))}const _=(0,r.useMemo)((()=>y?y!==u&&y!==p?[]:[f(i)]:[]),[i,y]);return(0,r.createElement)(h,{className:o()(t,{"has-bold-style":null==n?void 0:n.length,[y]:y}),onFocusOutside:w},(0,r.createElement)(l.RichText,{tagName:"div",value:n,allowedFormats:[],withoutInteractiveFormatting:!0,onChange:function(e){if(null==e||!e.length)return E(u),k();m(e);const t=(0,c.tQ)(i,e);a?a.label===e?E(p):E("is-participant-editing"):E(t?p:u)},placeholder:__("Speaker","jetpack"),keepPlaceholderOnFocus:!0,onSplit:()=>{},onReplace:e=>{setTimeout((()=>{var e;return null==s||null===(e=s.current)||void 0===e?void 0:e.focus()}),10);const t=null==e?void 0:e[0];if(t){const{label:e}=t;return m(e),E(d),b(t)}return w()},autocompleters:_}))}},89996:function(e,t,n){"use strict";n.d(t,{dG:function(){return d},S6:function(){return f}});var r=n(69307),a=n(92819),o=n(55609),i=n(65736),s=n(94978),l=n(98618);const __=i.__,_x=i._x;const c=["hour","min","sec"];function u(e,t){var n,r,a;const o=null===(n=Object.keys(e))||void 0===n?void 0:n[0];if(!o)return t.join(":");let i=String((s=e[o],l="hour"===o?23:59,Math.max(0,Math.min(s,l))));var s,l;return 1===(null===(r=i)||void 0===r?void 0:r.length)?i=`0${i}`:0===(null===(a=i)||void 0===a?void 0:a.length)&&(i="00"),t[c.indexOf(o)]=i,3===t.length&&"00"===t[0]&&t.shift(),t.join(":")}const p=(0,a.debounce)((function(e,t){t((0,l.H)(e))}),250);function d(e){let{value:t,className:n,onChange:a,shortLabel:i=!1,isDisabled:c=!1,duration:d}=e;const[m,h]=(0,r.useState)((0,l.i)(t)),f=t.split(":");return f.length<=2&&f.unshift("00"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${n}__timestamp-controls`},(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__hour`,label:i?_x("Hour","hour (short form)","jetpack"):_x("Hour","hour (long form)","jetpack",0),value:f[0],min:0,max:23,onChange:e=>!c&&a(u({hour:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__minute`,label:i?_x("Min","Short for Minute","jetpack"):__("Minute","jetpack"),value:f[1],min:0,max:59,onChange:e=>!c&&a(u({min:e},f)),disabled:c}),(0,r.createElement)(s.Z,{className:`${n}__timestamp-control__second`,label:i?_x("Sec","Short for Second","jetpack"):__("Second","jetpack"),value:f[2],min:0,max:59,onChange:e=>!c&&a(u({sec:e},f)),disabled:c})),(0,r.createElement)(o.RangeControl,{disabled:void 0===d,value:m,className:`${n}__timestamp-range-control`,min:0,max:d,onChange:e=>{h(e),p(e,a)},withInputField:!1,renderTooltipContent:e=>(0,l.H)(e)}))}function m(e){let{className:t,onPlayback:n,value:a}=e;return(0,r.createElement)(o.Button,{className:t,variant:"tertiary",onClick:()=>n((0,l.i)(a))},a)}function h(e){let{className:t,currentTime:n,isTimestampButtonVisible:a,children:i,onChange:s,onToggle:c}=e;return(0,r.createElement)(o.Button,{className:t,isSmall:!0,variant:"tertiary",onClick:()=>{c(!a),a||s((0,l.H)(n),s)}},i)}function f(e){let{className:t,isSelected:n,show:a,value:o,mediaCurrentTime:i=0,onChange:s,onToggle:l,onPlayback:c}=e;return n?a?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}),(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Remove","jetpack"))):(0,r.createElement)(h,{className:`${t}__timestamp-button`,currentTime:i,onChange:s,onToggle:l,isTimestampButtonVisible:a},__("Add timestamp","jetpack")):a?(0,r.createElement)(m,{className:`${t}__timestamp-label`,value:o,onPlayback:c}):null}},48699:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(52175),l=n(4981),c=n(9818),u=n(55609),p=n(71353),d=n(89996),m=n(87175),h=n(7086),f=n(57979),g=n(84504),b=n(98618),v=n(4346);const __=i.__,k="core/paragraph";function y(e){let{className:t,attributes:n,setAttributes:a,context:i,onReplace:y,mergeBlocks:E,isSelected:w}=e;const{content:_,label:C,slug:S,placeholder:j,showTimestamp:x,timestamp:P}=n,{mediaSource:T,mediaCurrentTime:A,mediaDuration:N,mediaDomReference:I,isMultipleSelection:B}=(0,c.useSelect)((e=>{const{getDefaultMediaSource:t,getMediaSourceCurrentTime:n,getMediaSourceDuration:r,getMediaSourceDomReference:a}=e(f.tT);return{mediaSource:t(),mediaCurrentTime:n(),mediaDuration:r(),mediaDomReference:a(),isMultipleSelection:e("core/block-editor").getMultiSelectedBlocks().length>0}}),[]),{playMediaSource:M,setMediaSourceCurrentTime:R}=(0,c.useDispatch)(f.tT),L=(0,r.useRef)(),Z=i["jetpack/conversation-participants"],D=null!=Z&&Z.length?Z:[],F=(0,v.ly)(D,S),O=(0,r.useContext)(h.Z);function z(e){a({timestamp:e})}return(0,r.useEffect)((()=>{B||w||F&&F.slug===S&&F.label!==C&&a({label:F.label})}),[F,C,S,B,w,a]),(0,r.createElement)("div",{className:t},(0,r.createElement)(s.BlockControls,null,T&&(0,r.createElement)(g.m,{onTimestampClick:e=>{a({showTimestamp:!0}),z((0,b.H)(e))}})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(u.Panel,null,(0,r.createElement)(u.PanelBody,{title:__("Speaker","jetpack")},(0,r.createElement)(p.Ev,{className:m.P,participants:D,slug:S||"",onSelect:a})),!(null==T||!T.title)&&(0,r.createElement)(u.PanelBody,{title:__("Podcast episode","jetpack")},(0,r.createElement)("p",null,T.title)),T&&x&&(0,r.createElement)(u.PanelBody,{title:__("Timestamp","jetpack")},(0,r.createElement)(d.dG,{className:m.P,value:P,onChange:z,mediaSource:T,duration:N})))),(0,r.createElement)("div",{className:o()(`${m.P}__meta`,{"has-not-media-source":!T})},(0,r.createElement)(p.v$,{className:`${m.P}__participant`,label:C,participant:F,participants:D,transcriptRef:L,onParticipantChange:e=>{a({label:e})},onSelect:e=>{B||a(e)},onClean:()=>{a({slug:null,label:""})},onAdd:e=>{const t=O.addNewParticipant({label:e,slug:S});a(t)},onUpdate:e=>{O.updateParticipants(e)}}),T&&(0,r.createElement)(d.S6,{className:m.P,show:x,isSelected:w,value:P,mediaCurrentTime:A,onChange:z,onToggle:e=>a({showTimestamp:e}),onPlayback:function(e){I&&(I.currentTime=e),R(e),M()}})),(0,r.createElement)(s.RichText,{ref:L,identifier:"content",tagName:"p",className:`${m.P}__content`,value:_,onChange:e=>a({content:e}),onMerge:E,onSplit:e=>{if(null==_||!_.length)return(0,l.createBlock)(k);const t=null!=e&&e.length?n:{};return(0,l.createBlock)("jetpack/dialogue",{...t,content:e})},onReplace:function(e){for(var t,n,r,a,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return O?(null===(t=e[0])||void 0===t?void 0:t.name)!==k||(null===(n=e[1])||void 0===n?void 0:n.name)!==k||null!==(r=e[0])&&void 0!==r&&r.attributes.content||null!==(a=e[1])&&void 0!==a&&a.attributes.content?void y(e,...i):((0,c.dispatch)("core/block-editor").selectBlock(e[0].clientId),y([e[0]],...i)):y(e,...i)},onRemove:y?()=>y([]):void 0,placeholder:j||__("Write dialogue…","jetpack"),keepPlaceholderOnFocus:!0}))}},43894:function(e,t,n){"use strict";n.d(t,{u2:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(4981),o=n(40762),i=n(48699),s=n(34114),l=n(36129),c=n(90059),u=n(45452);const __=r.__,_x=r._x,p=c.p,d="dialogue",m={title:__("Dialogue","jetpack"),description:__("Create a dialogue paragraph, setting the participant with an optional timestamp.","jetpack"),parent:[`jetpack/${u.u2}`],icon:l.VV,category:"layout",edit:i.Z,save:s.Z,attributes:o.Z,usesContext:["jetpack/conversation-participants","jetpack/conversation-showTimestamps"],keywords:[_x("dialogue","block search term","jetpack"),_x("participant","block search term","jetpack"),_x("transcription","block search term","jetpack"),_x("speaker","block search term","jetpack")],transforms:{to:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t,label:n}=e;return(0,a.createBlock)("core/paragraph",{content:(null!=n&&n.length?`<strong>${n}</strong>: `:"")+t})}))}],from:[{type:"block",blocks:["core/paragraph"],isMultiBlock:!0,transform:e=>e.map((e=>{let{content:t}=e;return(0,a.createBlock)("jetpack/dialogue",{participant:p[0],content:t})}))}]}}},34114:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(52175),o=n(87175),i=n(98618);function s(e){let{attributes:t}=e;const{content:n,label:s,showTimestamp:l,timestamp:c}=t;return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:`${o.P}__meta`},(0,r.createElement)(a.RichText.Content,{className:`${o.P}__participant has-bold-style`,tagName:"div",value:s}),l&&(0,r.createElement)("div",{className:`${o.P}__timestamp-label`},(0,r.createElement)("a",{className:`${o.P}__timestamp_link`,href:`#${(0,i.i)(c)}`},c))),(0,r.createElement)(a.RichText.Content,{className:`${o.P}__content`,tagName:"p",value:n}))}},87175:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});const r="wp-block-jetpack-dialogue"},84676:function(e,t,n){"use strict";var r=n(69307),a=n(33511),o=n(56038),i=n(89105),s=n.n(i),l=n(52175),c=n(76369);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:i=null,disabled:u=!1,label:p="",onChange:d=null,value:m=""}=e;const[h,f]=(0,r.useState)((0,a.ZP)(m,n,{symbol:""})),[g,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),y=(0,r.useRef)(null),E=(0,r.useCallback)((e=>{if(f(e),!d)return;const t=(0,c.Vm)(e,n);t&&t>=(0,c.hj)(n)?(d(t),k(!1)):e&&k(!0)}),[n,d]),w=()=>{y.current&&(y.current.focus(),b(!0))};return(0,r.useEffect)((()=>{y.current&&y.current.addEventListener("blur",(()=>b(!1)))}),[y]),(0,r.useEffect)((()=>{g||h||E((0,a.ZP)(i,n,{symbol:""}))}),[n,i,h,g,E]),(0,r.useEffect)((()=>{g||v||f((0,a.ZP)(m,n,{symbol:""}))}),[n,g,v,E,m]),(0,r.createElement)("div",{className:s()("donations__amount",t,{"has-focus":g,"has-error":v}),role:"button",tabIndex:0,onClick:w,onKeyDown:w},o.M[n].symbol,u?(0,r.createElement)("div",{className:"donations__amount-value"},(0,a.ZP)(m||i,n,{symbol:""})):(0,r.createElement)(l.RichText,{allowedFormats:[],"aria-label":p,keepPlaceholderOnFocus:!0,multiline:!1,onChange:e=>E(e),placeholder:(0,a.ZP)(i,n,{symbol:""}),ref:y,value:h,withoutInteractiveFormatting:!0}))}},17850:function(e,t,n){"use strict";var r=n(69307),a=n(56038),o=n(62369),i=n(52175),s=n(55609),l=n(65736),c=n(39630),u=n(76369);const __=l.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,monthlyDonation:p,annualDonation:d,showCustomAmount:m}=t,h=(e,r)=>{const a={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[a];n({[a]:{...o,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+a.M[l].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===l,onClick:()=>{n({currency:e}),t()},key:`jetpack-donations-currency-${e}`},e+" - "+a.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:p.show,onChange:e=>h("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>h("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,o.lQ)()}`},__("View donation earnings","jetpack")))))}},17560:function(e,t,n){"use strict";var r=n(69307),a=n(33511),o=n(56038),i=n(52175),s=n(65736),l=n(76369);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:c,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,a.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},o.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,a.ZP)(100*(0,l.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},76430:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(9818),s=n(65736),l=n(45135),c=n(6516),u=n(68598),p=n(5177);const __=s.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:s}=t,[d,m]=(0,o.useState)(""),[h,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[v,k]=(0,o.useState)([]),y=(0,i.useSelect)((e=>e("core/editor").getCurrentPost()),[]);(0,o.useEffect)((()=>{r({fallbackLinkUrl:y.link})}),[y.link,r]);const E=e=>{m(e)},w=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:a,interval:o}=t;return r===s&&"donation"===a&&(e[o]=n),e}),{}),_=e=>{if(!e&&"object"!=typeof e||e.errors)return void m(__("Could not load data from WordPress.com.","jetpack"));f(e.should_upgrade_to_access_memberships),b(e.connect_url);const t=w(e.products);(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(t)?k(t):e.should_upgrade_to_access_memberships||e.connect_url?k({"one-time":-1,"1 month":-1,"1 year":-1}):(0,u.Z)(s).then((e=>k(w(e))),E)};return(0,o.useEffect)((()=>{(0,p.Z)("donation").then(_,E)}),[s]),d?(0,o.createElement)(c.Z,{className:n,error:d}):(0,o.createElement)(l.Z,a()({},e,{products:v,shouldUpgrade:h,stripeConnectUrl:g}))}},68598:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z=async e=>{try{return await a()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e}})}catch(e){return Promise.reject(e.message)}}},5177:function(e,t,n){"use strict";var r=n(82827),a=n(86989),o=n.n(a),i=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{query:t}=(0,r.Qc)(window.location.href,!0),n=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.origin?"gutenberg-wpcom":"gutenberg",...e&&{type:e}});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},68768:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},Xd:function(){return c}});var r=n(65736),a=n(76430),o=n(77928),i=n(17560),s=n(36129);const __=r.__,_x=r._x,l="donations",c={title:__("Donations Form","jetpack"),description:__("Collect one-time, monthly, or annually recurring donations.","jetpack"),icon:s.K9,category:"earn",keywords:[_x("charity","block search term","jetpack"),_x("contribution","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("donate","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("fundraising","block search term","jetpack"),_x("fundraiser","block search term","jetpack"),"gofundme",_x("money","block search term","jetpack"),_x("nonprofit","block search term","jetpack"),_x("non-profit","block search term","jetpack"),_x("paid","block search term","jetpack"),"patreon",_x("pay","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("recurring","block search term","jetpack"),"stripe",_x("sponsor","block search term","jetpack"),"square",_x("tipping","block search term","jetpack"),"venmo"],supports:{html:!1},edit:a.Z,save:o.Z,example:{},deprecated:[i.Z]}},6516:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},77928:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:o,monthlyDonation:i,annualDonation:s}=t;return o&&o.show&&o.planId&&-1!==o.planId?(0,r.createElement)("div",null,(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:o.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:o.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:o.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(a.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(a.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},94121:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(9818),i=n(65736),s=n(84676),l=n(76369);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:c}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},v=e=>n[b[t]][e],k=(e,r)=>{const a=b[t],o=n[a];c({[a]:{...o,[e]:r}})},[y,E]=(0,r.useState)(u),w=(0,l.hj)(u),_=(0,r.useMemo)((()=>[10*w,30*w,200*w]),[w]);(0,r.useEffect)((()=>{y!==u&&(E(u),c({oneTimeDonation:{...p,amounts:_},monthlyDonation:{...d,amounts:_},annualDonation:{...m,amounts:_}}))}),[u,y,_,p,d,m,c]);const C=v("amounts"),S=(0,o.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(a.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},C.map(((e,t)=>(0,r.createElement)(s.Z,{currency:u,defaultValue:_[t],label:(0,i.sprintf)(// translators: %d: Tier level e.g: "1", "2", "3"
11
  __("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...C];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({customAmountText:e})}),(0,r.createElement)(s.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,l.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:S})))}},45135:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(65736),l=n(17850),c=n(94121),u=n(53970);const __=s.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:s,shouldUpgrade:p,stripeConnectUrl:d}=e,{oneTimeDonation:m,monthlyDonation:h,annualDonation:f}=t,[g,b]=(0,r.useState)("one-time"),v=(0,i.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),k=(0,r.useCallback)((e=>g===e),[g]),y={"one-time":{title:__("One-Time","jetpack")},...h.show&&{"1 month":{title:__("Monthly","jetpack")}},...f.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.useEffect)((()=>{m.planId===a["one-time"]&&h.planId===a["1 month"]&&f.planId===a["1 year"]||s({...a["one-time"]&&{oneTimeDonation:{...m,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...h,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...f,planId:a["1 year"]}}})}),[m,h,f,s,a]),(0,r.useEffect)((()=>{!h.show&&k("1 month")&&b("one-time"),!f.show&&k("1 year")&&b("one-time")}),[h,f,b,k]),(0,r.createElement)("div",{className:n},!p&&d&&(0,r.createElement)(u.Z,{blockName:"donations",postId:v,stripeConnectUrl:d}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(y).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(y).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:o()("donations__nav-item",{"is-active":k(t)}),onClick:()=>b(t),onKeyDown:()=>b(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(c.Z,{activeTab:g,attributes:t,setAttributes:s}))),(0,r.createElement)(l.Z,e))}},77412:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},51459:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},50215:function(e,t,n){"use strict";var r=n(16770);t.Z=[r.Z]},16770:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(92819),l=n(4981),c=n(65736);const _x=c._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const a={...(0,s.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},o=(0,s.pick)(e,u);return[a,[(0,l.createBlock)("jetpack/button",{element:"a",text:o.text||_x("Register","verb: e.g. register for an event.","jetpack"),...o,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:s,style:l}=t;if(n)return a||"modal"===l?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:s,eventId:l,text:c,textColor:u,url:p}=e,d=(0,i.getColorClassName)("color",u),m=(0,i.getColorClassName)("background-color",t),h=o()("wp-block-button__link",{"has-text-color":u||s,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:s,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(i.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${l}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:c}))}(t):s&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:s},s)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,s.isEmpty)(t)||(0,s.some)((0,s.pick)(e,u),Boolean))}},57745:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(52175),c=n(62369),u=n(77825),p=n(77412),d=n(22719),m=n(32684),h=n(8964),f=n(62474),g=n(90117),b=n(51459);const __=i.__,_x=i._x;class v extends o.Component{constructor(){super(...arguments),a()(this,"state",{editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1}),a()(this,"setUrl",(e=>{const{attributes:t,noticeOperations:n,setAttributes:r}=this.props,{style:a}=t;if(!e||u.Q7===e||"modal"===a)return;const o=(0,d.Ve)(e);if(o){const t={eventId:o,url:e};(0,g.Z)(t.url,this.setIsResolvingUrl).then((e=>{const a=(0,m.S)(p.Z,{...t,url:e});r(a),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()})),a()(this,"setIsResolvingUrl",(e=>this.setState({isResolvingUrl:e}))),a()(this,"setEditingUrl",(e=>this.setState({editingUrl:e}))),a()(this,"setErrorNotice",(()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,o.createElement)(o.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,o.createElement)(s.Button,{variant:"link",onClick:()=>(0,d.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))})),a()(this,"submitForm",(e=>{e&&e.preventDefault(),this.setUrl((0,d.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})})),a()(this,"cannotEmbed",(()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!u.Wh.test(e)}))}componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}renderLoading(){return(0,o.createElement)("div",{className:"wp-block-embed is-loading"},(0,o.createElement)(s.Spinner,null),(0,o.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:r}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,o.createElement)("div",{className:"block-editor-block-preview__container"},(0,o.createElement)("img",{src:h,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,o.createElement)(f.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:r,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,r=(0,c.Wp)()||(0,c.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u.qv,notices:t},(0,o.createElement)("form",{onSubmit:this.submitForm},(0,o.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,o.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,o.createElement)("div",{className:"components-placeholder__learn-more"},(0,o.createElement)(s.ExternalLink,{href:r},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,r=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,o.createElement)("div",{className:e},(0,o.createElement)(s.SandBox,{html:r}),(0,o.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:r,isResolvingUrl:a}=this.state;return a?this.renderLoading():r||!t||this.cannotEmbed()?this.renderEditEmbed():(0,o.createElement)(o.Fragment,null,this.renderInspectorControls(),(0,o.createElement)(l.BlockControls,null,(0,o.createElement)(b.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,o.createElement)(l.InnerBlocks,{template:[[u.Ss.name,u.Ss.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,s.withNotices)(v)},77825:function(e,t,n){"use strict";n.d(t,{Ss:function(){return d},Wh:function(){return m},Q7:function(){return f},u2:function(){return g},qv:function(){return v},Xd:function(){return k}});var r=n(69307),a=n(65736),o=n(55609),i=n(4981),s=n(77412),l=n(50215),c=n(57745),u=n(26527),p=n(35338);const __=a.__,_x=a._x,d={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},m=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^\/]*?(\d+)\/?(?:\?[^\/]*)?\s*$/i,h=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^\/]*)?\s*$/i,f="https://www.eventbrite.com/e/test-event-tickets-123456789",g="eventbrite",b=__("Eventbrite Checkout","jetpack"),v=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,r.createElement)(o.G,{id:"eventbrite-icon"},(0,r.createElement)(o.Path,{d:"M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z"}))),k={title:b,description:__("Embed Eventbrite event details and ticket checkout.","jetpack"),icon:{src:v,foreground:(0,p.m)()},category:"embed",keywords:[_x("events","block search term","jetpack"),_x("tickets","block search term","jetpack")],supports:{html:!1,align:!0},attributes:s.Z,edit:c.Z,save:u.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(m.test(e.textContent)||h.test(e.textContent)),transform:e=>(0,i.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},example:{attributes:{url:f,eventId:123456789,style:"modal"},innerBlocks:[d]},deprecated:l.Z}},26527:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:t}=e;const{eventId:n,style:o,url:i}=t;if(n)return"modal"===o?(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},22719:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},Ve:function(){return i},qq:function(){return s}});var r=n(69307),a=n(4981);function o(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,a.createBlock)("core/paragraph",{content:(0,r.renderToString)(n)}))}function i(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},99725:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(4981),u=n(9818);const __=s.__;function p(e){let{onReplace:t}=e;const[n,a]=(0,i.useState)(!1),s=(0,u.useSelect)((e=>e("core/editor").getEditedPostAttribute("jetpack_publicize_connections")));return{isGatheringStorm:n,unleashStorm:(e,n)=>{if((0,r.isEmpty)(e))return;const i=e.match(/^https?:\/\/(?:www\.)?twitter\.com\/([^/]+)\/status\/\d+/);if((0,r.isEmpty)(i))return;const p=i[1];n.removeAllNotices(),a(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/tweetstorm/gather",{url:e})}).then((e=>{if(a(!1),!(0,r.isArray)(e))return void n.createErrorNotice(__("An error occurred. Please try again later.","jetpack"));if((0,r.isEmpty)(e))return void n.createErrorNotice(__("We were unable to get any content from this tweet.","jetpack"));t(e.map((e=>{switch(e.type){case"paragraph":return(0,c.createBlock)("core/paragraph",{content:e.content});case"gallery":return(0,c.createBlock)("core/gallery",{images:e.images});case"image":return(0,c.createBlock)("core/image",{url:e.url,alt:e.alt});case"video":return(0,c.createBlock)("core/video",{src:e.url,caption:e.alt});case"embed":return(0,c.createBlock)("core/embed",{url:e.url})}})));(0,r.some)(s,(e=>"twitter"===e.service_name&&`@${p}`===e.display_name))||(0,u.dispatch)("core/notices").createWarningNotice(__("We were unable to verify that this Twitter thread was published on a Twitter account belonging to you. Please ensure you have permission to reproduce it before publishing.","jetpack")),(0,u.dispatch)("core/notices").createSuccessNotice(__("Twitter thread successfully imported","jetpack"),{type:"snackbar"})})).catch((e=>{a(!1),n.createErrorNotice(e.message)}))}}}},7696:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609);const __=a.__;t.Z=(0,r.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit"},__("Search","jetpack")))}))},40805:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},1747:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(52175);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(a.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},35286:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609),l=n(52175),c=n(39377),u=n(80835),p=n(7696),d=n(1747),m=n(85132);const __=i.__;t.Z=function(e){let{attributes:t,setAttributes:n,className:a,isSelected:i}=e;const{align:h,caption:f,giphyUrl:g,searchText:b,paddingTop:v}=t,k=o()(a,`align${h}`),[y,E]=(0,r.useState)(!1),w=(0,r.createRef)(),{isFetching:_,giphyData:C,fetchGiphyData:S}=(0,m.Z)(),j=()=>{w.current.focus(),E(!1)};(0,r.useEffect)((()=>{C&&C[0]&&n((0,u.ix)(C[0]))}),[C,n]);const x=e=>{e.preventDefault(),t.searchText&&!_&&S((0,u.Gr)(t.searchText))},P=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:k},(0,r.createElement)(d.Z,null),g?(0,r.createElement)("figure",null,i&&(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w}),i&&C&&C.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},C.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,u.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:j,onKeyDown:j,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:g,title:b})),(!l.RichText.isEmpty(f)||i)&&!!g&&(0,r.createElement)(l.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,unstableOnFocus:()=>E(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:f})):(0,r.createElement)(s.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:c.qv,label:c.TN,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(p.Z,{onSubmit:x,onChange:P,value:b,ref:w})))}},85132:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[a,o]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&o(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:a,fetchGiphyData:s}}},39377:function(e,t,n){"use strict";n.d(t,{u2:function(){return l},TN:function(){return c},qv:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(55609),i=n(35286),s=n(35338);const __=a.__,_x=a._x,l="gif",c=__("GIF","jetpack"),u=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z"})),p={title:c,icon:{src:u,foreground:(0,s.m)()},category:"embed",keywords:[_x("animated","block search term","jetpack"),_x("giphy","block search term","jetpack"),_x("image","block search term","jetpack")],description:__("Search for and insert an animated image.","jetpack"),attributes:{align:{type:"string",default:"center"},caption:{type:"string"},giphyUrl:{type:"string"},searchText:{type:"string"},paddingTop:{type:"string",default:"56.2%"}},supports:{html:!1,align:!0},edit:i.Z,save:()=>null,example:{attributes:{align:"center",giphyUrl:"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc",paddingTop:"100%",searchText:"WordPress"}}}},80835:function(e,t,n){"use strict";n.d(t,{Gr:function(){return s},ix:function(){return u}});var r=n(40805);const a=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`,o=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(r.U)}`,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;const n=e.split(t);return n[n.length-1]},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,r=e.match(n);return r&&r[3]&&(t=i(r[3],"-")),t?o(t):a(e)},l=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,c=e=>null==e?void 0:e.embed_url,u=e=>({giphyUrl:c(e),paddingTop:l(e)})},23966:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(65736);const __=o.__,_x=o._x;t.Z=e=>{const{className:t,embedValue:n,onChange:o,onSubmit:i}=e;return(0,r.createElement)(a.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,r.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},71759:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(52175),l=n(90162),c=n(4981),u=n(62369),p=n(23966),d=n(99599),m=n(99077);const __=a.__,_x=a._x;t.Z=(0,i.compose)(o.withNotices,(0,l.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:a,isMobile:i,isSelected:l,name:h,noticeOperations:f,noticeUI:g,setAttributes:b}=e,[v,k]=(0,r.useState)(t||""),[y,E]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1);(0,r.useEffect)((()=>{!l&&w&&_(!1)}),[l,w]);const C=()=>{_(!0)},S=e=>{e&&e.preventDefault();const t=(0,m.L7)(v.trim());if(!m.Wh.test(t.url))return f.removeAllNotices(),void f.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));b(t),E(!1),f.removeAllNotices()},j=(0,c.getBlockDefaultClassName)(h),x=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${i?"300":n}"></iframe>`,P=(0,r.createElement)(o.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),T=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(p.Z,{className:`${j}-embed-form-sidebar`,embedValue:v,onChange:e=>k(e.target.value),onSubmit:S}));if(y||!t){const e=(0,u.Wp)()||(0,u.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:a},T,(0,r.createElement)(o.Placeholder,{className:a,label:__("Google Calendar","jetpack"),icon:d.Z,instructions:(0,r.createElement)("ol",{className:`${j}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),notices:g},(A=`${j}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:S,className:A},(0,r.createElement)("textarea",{type:"text",value:v,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>k(e.target.value)}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${j}-placeholder-links`},(0,r.createElement)(o.ExternalLink,{href:e},__("Learn more","jetpack")))))}var A;return(0,r.createElement)("div",{className:a},T,(0,r.createElement)("div",null,(0,r.createElement)(o.SandBox,{html:x,onFocus:C}),!w&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:C})))}))},99599:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{height:"23",viewBox:"0 0 24 23",width:"24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.Path,{d:"M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z"}))},47196:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p}});var r=n(69307),a=n(65736),o=n(4981),i=n(71759),s=n(99077),l=n(99599),c=n(35338);const __=a.__,_x=a._x,u="google-calendar",p={title:__("Google Calendar","jetpack"),description:__("Embed a Google Calendar","jetpack"),keywords:[_x("events","block search term","jetpack"),_x("dates","block search term","jetpack"),_x("schedule","block search term","jetpack"),_x("appointments","block search term","jetpack")],icon:{src:l.Z,foreground:(0,c.m)()},category:"embed",supports:{align:!0,alignWide:!0,html:!1},attributes:{url:{type:"string"},height:{type:"integer",default:600}},edit:i.Z,save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)},transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.Wh.test(e.textContent),transform:e=>(0,o.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&s.E6.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,s.jj)(e.innerHTML.trim());return(0,o.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]},example:{attributes:{url:"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}},99077:function(e,t,n){"use strict";n.d(t,{Wh:function(){return a},E6:function(){return o},jj:function(){return c},L7:function(){return u}});const r="s*https?://calendar.google.com/calendar",a=new RegExp(`^${r}`,"i"),o=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=o.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(a.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return o.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},88315:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{attributes:t,setAttributes:n}=e;const{orientation:o}=t;return(0,r.createElement)(a.PanelBody,{title:__("Orientation","jetpack")},(0,r.createElement)(a.RadioControl,{selected:o||"horizontal",options:[{label:__("Side by side","jetpack"),value:"horizontal"},{label:__("Above and below","jetpack"),value:"vertical"}],onChange:e=>n({orientation:e})}))}},20931:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(94333),s=n(65736),l=n(852),c=n(88315),u=n(83013),p=n(64715);n(67060);const __=s.__;t.Z=e=>{let{attributes:t,className:n,clientId:s,isSelected:d,setAttributes:m}=e;const{align:h,imageBefore:f,imageAfter:g,caption:b,orientation:v}=t;let k=null,y=null;const E=(0,r.useRef)();i.useResizeObserver&&([k,y]=(0,i.useResizeObserver)(),(0,p.Z)((e=>{e>0&&"undefined"!=typeof juxtapose&&juxtapose.sliders&&juxtapose.sliders.forEach((t=>{t.wrapper.parentElement.id===s&&t.optimizeWrapper(e)}))}),200,y.width));const w=f&&f.url&&g&&g.url?"image-compare__comparison juxtapose":"image-compare__placeholder";return(0,r.useLayoutEffect)((()=>{f.url&&g.url&&"undefined"!=typeof juxtapose&&juxtapose.makeSlider(null==E?void 0:E.current)}),[h,f,g,v]),(0,r.createElement)("figure",{className:n,id:s},k,(0,r.createElement)(a.InspectorControls,{key:"controls"},(0,r.createElement)(c.Z,{attributes:t,setAttributes:m})),(0,r.createElement)("div",{ref:E,className:w,"data-mode":v||"horizontal"},(0,r.createElement)(o.Placeholder,{label:null},(0,r.createElement)("div",{className:"image-compare__image-before"},(0,r.createElement)(u.Z,{image:{id:f.id,url:f.url,alt:f.alt},placeHolderLabel:__("Image before","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageBefore:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})),(0,r.createElement)("div",{className:"image-compare__image-after"},(0,r.createElement)(u.Z,{image:{id:g.id,url:g.url,alt:g.alt},placeHolderLabel:__("Image after","jetpack"),onChange:e=>{if("image"===e.media_type||"image"===e.type){var t,n;const{src:r}=(0,l.z)(e),{alt:a,id:o,media_details:i}=e,s=null!==(t=null==i?void 0:i.width)&&void 0!==t?t:e.width,c=null!==(n=null==i?void 0:i.height)&&void 0!==n?n:e.height;m({imageAfter:{id:o,url:r||e.url,alt:a,width:s,height:c}})}}})))),(!a.RichText.isEmpty(b)||d&&f.url&&g.url)&&(0,r.createElement)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption","jetpack"),value:b,onChange:e=>m({caption:e}),inlineToolbar:!0}))}},27237:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M21 4h-6v1.5h6c.3 0 .5.2.5.5v.4l-3.6 3.5L15 8.1v1.8l2.6 1.7c.1.1.3.1.4.1.2 0 .4-.1.5-.2l3-2.9V18c0 .3-.2.5-.5.5h-6V20h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM1 6v12c0 1.1.9 2 2 2h10.5V4H3c-1.1 0-2 .9-2 2zm11 12.5H3c-.3 0-.5-.2-.5-.5v-1.4L5 14.7l1.5-1.1.1-.1 3 1.9c.1.1.3.1.4.1.2 0 .4-.1.5-.2L12 14v4.5zm0-6.6l-2.1 2L7 12c-.1-.1-.3-.1-.4-.1h-.1c-.1 0-.3.1-.4.1l-1.1.9-2.5 1.8V6c0-.3.2-.5.5-.5h9v6.4z"}))},83013:function(e,t,n){"use strict";var r=n(69307),a=n(94333),o=n(52175),i=n(55609);t.Z=(0,a.compose)([i.withNotices])((e=>{const{image:t,noticeOperations:n,noticeUI:a,onChange:i,placeHolderLabel:s}=e,l=(0,r.createElement)("img",{id:t.id,src:t.url,alt:t.alt}),c=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MediaPlaceholder,{labels:{title:s},accept:"image/*",allowedTypes:["image"],onSelect:i,onError:e=>n.createErrorNotice(e),notices:a}));return t&&t.url?l:c}))},59554:function(e,t,n){"use strict";n.d(t,{u:function(){return p},X:function(){return d}});var r=n(65736),a=n(20931),o=n(27237),i=n(57164),s=n(90767),l=n(58632),c=n(61365),u=n(35338);const __=r.__,_x=r._x,p="image-compare",d={title:__("Image Compare","jetpack"),description:__("Compare two images with a slider. Works best with images of the same size.","jetpack"),icon:{src:o.Z,foreground:(0,u.m)()},category:(0,c.Z)("media","layout"),keywords:[_x("juxtapose","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack"),_x("side by side","block search term","jetpack"),_x("slider","block search term","jetpack")],supports:{align:["wide","full"]},attributes:{imageBefore:{type:"object",default:{}},imageAfter:{type:"object",default:{}},caption:{type:"string"},orientation:{type:"string",default:"horizontal"}},example:{attributes:{imageBefore:{id:1,url:l,alt:__("Before","jetpack")},imageAfter:{id:2,url:s,alt:__("After","jetpack")},caption:__("Example image","jetpack")}},edit:a.Z,save:i.Z}},57164:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{attributes:t,className:n}=e;const{imageBefore:o,imageAfter:i,caption:s,orientation:l}=t;return(0,r.createElement)("figure",{className:n},(0,r.createElement)("div",{className:"juxtapose","data-mode":l||"horizontal"},(0,r.createElement)("img",{id:o.id,src:o.url,alt:o.alt,width:o.width,height:o.height,className:"image-compare__image-before"}),(0,r.createElement)("img",{id:i.id,src:i.url,alt:i.alt,width:i.width,height:i.height,className:"image-compare__image-after"})),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}},64715:function(e,t,n){"use strict";var r=n(69307);t.Z=(e,t,n)=>{(0,r.useEffect)((()=>{const r=setTimeout((()=>e(n)),t);return()=>clearTimeout(r)}),[n])}},67060:function(e,t,n){"use strict";var r=n(47701);n.n(r)()((function(){const e={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2};function t(e,t){const n=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){n.loaded=!0,t._onLoaded()},this.image.src=e.src,this.image.alt=e.alt||"",this.label=e.label||!1}function n(e,t){e&&e.classList.add(t)}function r(e,t){e&&e.classList.remove(t)}function a(e){return{width:parseInt(window.getComputedStyle(e).width,10),height:parseInt(window.getComputedStyle(e).height,10)}}function o(e,t){let n;if("string"==typeof t||"number"==typeof t)n=parseInt(t,10);else{const r=e.getBoundingClientRect(),a={top:r.top+document.body.scrollTop+document.documentElement.scrollTop,left:r.left+document.body.scrollLeft+document.documentElement.scrollLeft},o=e.offsetWidth;n=(function(e){let t;return t=e.pageX?e.pageX:e.touches?e.touches[0].pageX:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t}(t)-a.left)/o*100}return n}function i(e,t,n){let r;if("string"==typeof t||"number"==typeof t)r=parseInt(t,10);else{const a=e.getBoundingClientRect(),o={top:a.top+n.body.scrollTop+n.documentElement.scrollTop,left:a.left+n.body.scrollLeft+n.documentElement.scrollLeft},i=e.offsetHeight;r=(function(e){let t;return t=e.pageY?e.pageY:e.touches?e.touches[0].pageY:e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}(t)-o.top)/i*100}return r}const s={animate:!0,showLabels:!0,makeResponsive:!0};function l(e,n,r){let a;for(a in this.element=e,this.options={animate:!0,showLabels:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null},this.options)a in r&&(this.options[a]=a in s?"string"!=typeof(o=r[a])?Boolean(o):!("false"===o||""===o):r[a]);var o;2===n.length&&(this.imgBefore=new t(n[0],this),this.imgAfter=new t(n[1],this))}l.prototype={updateSlider:function(e,t){let a;a="vertical"===this.options.mode?i(this.slider,e,this.sliderParentDocument):o(this.slider,e),a=a.toFixed(2)+"%";const s=parseFloat(a),l=100-s+"%";s>0&&s<100&&(r(this.handle,"transition"),r(this.rightImage,"transition"),r(this.leftImage,"transition"),this.options.animate&&t&&(n(this.handle,"transition"),n(this.leftImage,"transition"),n(this.rightImage,"transition")),"vertical"===this.options.mode?(this.handle.style.top=a,this.leftImage.style.height=a,this.rightImage.style.height=l):(this.handle.style.left=a,this.leftImage.style.width=a,this.rightImage.style.width=l),this.sliderPosition=a)},getPosition:function(){return this.sliderPosition},displayLabel:function(e,t){const n=document.createElement("div");n.className="jx-label",n.setAttribute("tabindex",0),function(e,t){document.body.textContent?e.textContent=t:e.innerText=t}(n,t),e.appendChild(n)},setStartingPosition:function(e){this.options.startingPosition=e},calculateDims:function(e,t){const n=(r=this.imgBefore.image,{width:r.naturalWidth,height:r.naturalHeight,aspect:function(){return this.width/this.height}}).aspect();var r;return e?t=e/n:t&&(e=t*n),{width:e,height:t,ratio:n}},responsivizeIframe:function(e){return e.height<window.innerHeight?e.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((window.innerHeight-e.height)/2)+"px"):e.height>window.innerHeight&&(e=this.calculateDims(0,window.innerHeight),this.wrapper.style.paddingLeft=parseInt((window.innerWidth-e.width)/2)+"px"),e},setWrapperDimensions:function(){const e=a(this.wrapper.parentNode).width,t=a(this.wrapper.parentNode).height;let n=this.calculateDims(e,t);window.location===window.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n)),this.wrapper.style.height=parseInt(n.height)+"px",this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(t){let n=e.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",n=e.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth<t?this.wrapper.style.width=this.imgAfter.image.naturalWidth+"px":this.wrapper.style.width=this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),n},_onLoaded:function(){if(this.imgBefore&&!0===this.imgBefore.loaded&&this.imgAfter&&!0===this.imgAfter.loaded){var e;if(this.wrapper=this.element,!this.wrapper||this.wrapper.querySelector(".jx-slider"))return;n(this.wrapper,"juxtapose"),this.wrapper.style.width=this.imgBefore.image.naturalWidth,this.setWrapperDimensions(),this.slider=document.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.sliderParentDocument=this.wrapper.ownerDocument,"horizontal"!==this.options.mode&&n(this.slider,this.options.mode),this.handle=document.createElement("div"),this.handle.className="jx-handle",this.rightImage=document.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=document.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.leftArrow=document.createElement("div"),this.rightArrow=document.createElement("div"),this.control=document.createElement("div"),this.controller=document.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.controller.setAttribute("aria-label",(null===(e=window.imageCompareHandle)||void 0===e?void 0:e.msg)||"Slide to compare images"),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init()}},_init:function(){this.updateSlider(this.options.startingPosition,!1),!0===this.options.showLabels&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));const t=this;window.addEventListener("resize",(function(){t.setWrapperDimensions()})),this.slider.addEventListener("mousedown",(function(e){e.preventDefault(),t.updateSlider(e,!0);let n=!0;this.addEventListener("mousemove",(function(e){e.preventDefault(),n&&t.updateSlider(e,!1)})),this.addEventListener("mouseup",(function(e){e.preventDefault(),e.stopPropagation(),n=!1}))})),this.slider.addEventListener("touchstart",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!0),this.addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation(),t.updateSlider(e,!1)}))})),this.handle.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;let r=parseFloat(this.style.left);if(37===n){r-=1;const e=parseFloat(this.style.left)-1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}if(39===n){r+=1;const e=parseFloat(this.style.left)+1;t.updateSlider(e,!1),t.controller.setAttribute("aria-valuenow",r)}})),this.leftImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("90%",!0),t.controller.setAttribute("aria-valuenow",91))})),this.rightImage.addEventListener("keydown",(function(e){const n=e.which||e.keyCode;13!==n&&32!==n||(t.updateSlider("10%",!0),t.controller.setAttribute("aria-valuenow",10))})),e.sliders.push(this),this.options.callback&&"function"==typeof this.options.callback&&this.options.callback(this)}},e.makeSlider=function(t,r){void 0===r&&(r=e.sliders.length);const a=t,o=a.querySelectorAll("img");if(o.length<2)return;const i={};a.getAttribute("data-animate")&&(i.animate=a.getAttribute("data-animate")),a.getAttribute("data-showlabels")&&(i.showLabels=a.getAttribute("data-showlabels")),a.getAttribute("data-startingposition")&&(i.startingPosition=a.getAttribute("data-startingposition")),a.getAttribute("data-mode")&&(i.mode=a.getAttribute("data-mode")),a.getAttribute("data-makeresponsive")&&(i.mode=a.getAttribute("data-makeresponsive"));return n(t,"juxtapose-"+r),a.innerHTML?a.innerHTML="":a.innerText="",new e.JXSlider(t,[{src:o[0].src,label:o[0].getAttribute("data-label"),alt:o[0].alt},{src:o[1].src,label:o[1].getAttribute("data-label"),alt:o[1].alt}],i)},e.scanPage=function(){const t=document.querySelectorAll(".juxtapose");for(let n=0;n<t.length;n++)e.makeSlider(t[n],n)},e.JXSlider=l,window.juxtapose=e,e.scanPage()}))},11949:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},93255:function(e,t,n){"use strict";n.d(t,{u:function(){return r},D:function(){return a}});const r=30,a="jetpack-new-instagram-connection"},17404:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(69307),a=n(55609),o=n(65736),i=n(93255);const __=o.__,_n=o._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(a.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(a.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(a.PanelRow,null,(0,r.createElement)(a.Button,{isDestructive:!0,variant:"link",onClick:()=>l(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(a.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,o.sprintf)(
12
  /* translators: placeholder is a number. */
13
  _n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},20174:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(52175),l=n(55609),c=n(65736),u=n(11949),p=n(93255),d=n(32684),m=n(42803),h=n(66082),f=n(38594),g=n(46917),b=n(29482),v=n(17404);const __=c.__;t.Z=(0,l.withNotices)((e=>{const{attributes:t,className:n,isSelected:a,noticeOperations:c,noticeUI:k,setAttributes:y}=e,{accessToken:E,align:w,columns:_,count:C,isStackedOnMobile:S,spacing:j}=t;(0,r.useEffect)((()=>{const e=(0,d.S)(u.Z,t);(0,i.isEqual)(e,t)||y(e)}),[t,y]);const[x,P]=(0,r.useState)(E),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:A}=(0,h.Z)(),{images:N,isLoadingGallery:I,setImages:B}=(0,f.Z)({accessToken:E,noticeOperations:c,setAttributes:y,setSelectedAccount:P}),{connectToService:M,disconnectFromService:R,isConnecting:L,isRequestingUserConnections:Z,userConnections:D}=(0,m.Z)({accessToken:E,noticeOperations:c,selectedAccount:x,setAttributes:y,setImages:B,setSelectedAccount:P}),F=(0,b.Z)(),O=C>N.length?N.length:C,z=!I&&(!E||(0,i.isEmpty)(N)),U=!z,$=E&&I&&(0,i.isEmpty)(N),H=!z&&!$,V=o()(n,{[`align${w}`]:w}),G=o()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${_}`,{"is-stacked-on-mobile":S}),q={gridGap:j,"--latest-instagram-posts-spacing":j?`${j}px`:void 0},W={padding:j},K=()=>{x&&p.D!==x?y({accessToken:x,instagramUser:(0,i.find)(D,{token:x}).username}):M()};return(0,r.createElement)("div",{className:V},z&&(0,r.createElement)(l.Placeholder,{icon:"instagram",instructions:F?Z||D.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k},F?(()=>{const e=D.length>0,t=[...(0,i.map)(D,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:p.D}],n=L||Z||e&&!x;return(0,r.createElement)("div",null,e&&(0,r.createElement)(l.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:x}),p.D===x&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(l.Button,{disabled:n,variant:"primary",onClick:K},L&&__("Connecting…","jetpack"),Z&&__("Loading your connections…","jetpack"),!L&&!Z&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(l.Button,{disabled:T||!A,href:A,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),$&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(l.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),H&&(0,r.createElement)("div",{className:G,style:q},(0,i.times)(a?C:O,(e=>(0,r.createElement)("span",{className:o()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:W},(e=>{if(N[e]){const n=N[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:j})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),U&&(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.Z,{accountImageTotal:N.length,attributes:t,currentUserConnected:F,disconnectFromService:R,shouldRenderSidebarNotice:U&&!$&&N.length<C,setAttributes:y})))}))},46917:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),a=n(89105),o=n.n(a);function i(e){let{src:t,alt:n,spacing:a}=e;const[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)("auto"),u=(0,r.useRef)(),p=()=>{s(!0),c("auto")};(0,r.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=p}u.current&&c(u.current.parentNode.getBoundingClientRect().width)}),[t]);const d=-1*a,m=o()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),h=i?{margin:d}:{margin:d,height:l},f=o()({"is-loaded":i});return(0,r.createElement)("span",{style:h,className:m},(0,r.createElement)("img",{alt:n,className:f,ref:u,src:t}))}},33420:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(4981),i=n(11949),s=n(20174),l=n(35338);const __=a.__,_x=a._x,c="instagram-gallery",u={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:"instagram",foreground:(0,l.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!(null==n||!n.raw)&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:i.Z,edit:s.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},42803:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(70120),a=n(92819),o=n(86989),i=n.n(o),s=n(69307),l=n(65736),c=n(93255),u=n(29482);const __=l.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:o,setAttributes:l,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)([]),k=(0,u.Z)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),v(e)})).catch((()=>{g(!1),v([])})))}),[t,k]),(0,s.useEffect)((()=>{c.D===o||(0,a.find)(b,{token:o})||d(void 0)}),[o,d,b]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new r.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:b}}},66082:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(86989),a=n.n(r),o=n(9818),i=n(69307),s=n(96483),l=n(29482);function c(){const{isAutoDraft:e}=(0,o.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,o.useDispatch)("core/editor"),[n,r]=(0,i.useState)(),[c,u]=(0,i.useState)(!1),p=(0,l.Z)();return(0,i.useEffect)((()=>{p||n||c||(e?t():(u(!0),a()({path:(0,s.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{r(e),u(!1)}))))}),[p,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},38594:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(92819),a=n(86989),o=n.n(a),i=n(69307),s=n(65736),l=n(96483),c=n(93255);const __=s.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:a,setSelectedAccount:s}=e;const[u,p]=(0,i.useState)([]),[d,m]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,l.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,r.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),a({accessToken:void 0,instagramUser:void 0}),void s(void 0);(0,r.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),a({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),a({accessToken:void 0,instagramUser:void 0}),s(void 0)})))}),[t,a,s]),{images:u,isLoadingGallery:d,setImages:p}}},92007:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(93);const a="likes",o={render:r.Z}},93:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(94333),s=n(12238),l=n(9818),c=n(42103);const __=a.__,u=(0,l.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_likes_enabled")}})),p=(0,l.withDispatch)((e=>{const{editPost:t}=e("core/editor");return{editPost:t}}));t.Z=(0,i.compose)([u,p])((e=>{let{areLikesEnabled:t,editPost:n}=e;return(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"jetpack-post-likes"},(0,r.createElement)(c.Z,null,(0,r.createElement)(o.CheckboxControl,{label:__("Show likes.","jetpack"),checked:t,onChange:e=>{n({jetpack_likes_enabled:e})}})))}))},55771:function(e,t,n){"use strict";n.d(t,{N3:function(){return r},sf:function(){return a},Cw:function(){return o}});const r="processing",a="success",o="error"},85608:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(69307),a=n(65736),o=n(55609),i=n(90139),s=n(55771);const __=a.__;function l(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{a({processingLabel:e}),t(s.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(s.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(s.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(i.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},18670:function(e,t,n){"use strict";var r=n(92819),a=n(4981),o=n(65736);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,r.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,a.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,r.isEmpty)(t)||(0,r.some)((0,r.pick)(e,i),Boolean),save:()=>null}},26910:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(89105),c=n.n(l),u=n(65736),p=n(96483),d=n(55609),m=n(52175),h=n(5046),f=n(85608),g=n(29482),b=n(55771);const __=u.__;class v extends o.Component{constructor(){super(...arguments),a()(this,"componentDidMount",(()=>{this.apiCall()})),a()(this,"onError",(e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)})),a()(this,"apiCall",(()=>{const e=(0,g.Z)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};s()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else s()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))})),a()(this,"auditionNotification",(e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)})),a()(this,"clearAudition",(()=>{this.setState({audition:null})})),a()(this,"labelForAuditionType",(e=>{const{attributes:t}=this.props,{processingLabel:n,successLabel:r,errorLabel:a}=t;return e===b.N3?n:e===b.sf?r:e===b.Cw?a:null})),a()(this,"roleForAuditionType",(e=>e===b.Cw?"alert":"status")),a()(this,"render",(()=>{const{attributes:e,className:t,notices:n,noticeUI:r,setAttributes:a}=this.props,{audition:i,connected:s,connectURL:l,currentUserConnected:u}=this.state,{emailPlaceholder:p,consentText:g,interests:b,processingLabel:v,successLabel:k,errorLabel:y,preview:E,signupFieldTag:w,signupFieldValue:_}=e,C="wp-block-jetpack-mailchimp",S=(0,o.createElement)(d.Placeholder,{icon:h.qv,notices:n},(0,o.createElement)(d.Spinner,null)),j=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,o.createElement)(d.Button,{variant:"secondary",href:l,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,o.createElement)("div",{className:`${C}-recheck`},(0,o.createElement)(d.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),x=(0,o.createElement)(d.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:h.qv,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,o.createElement)(d.Button,{variant:"secondary",href:l},__("Connect to WordPress.com","jetpack"))),P=(0,o.createElement)(m.InspectorControls,null,(0,o.createElement)(f.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:p,processingLabel:v,successLabel:k,errorLabel:y,interests:b,setAttributes:this.props.setAttributes,signupFieldTag:w,signupFieldValue:_,connectURL:l})),T=c()(t,{[`${C}_notication-audition`]:i}),A=(0,o.createElement)("div",{className:T},(0,o.createElement)(d.TextControl,{"aria-label":p,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:p,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,o.createElement)(m.InnerBlocks,{template:[[h.Ss.name,h.Ss.attributes]],templateLock:"all"}),(0,o.createElement)(m.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:g,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,o.createElement)("div",{className:`${C}_notification ${C}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),N=A;return(0,o.createElement)(o.Fragment,null,r,E&&N,!E&&0===s&&S,!E&&2===s&&u&&j,!E&&2===s&&!u&&x,!E&&1===s&&P,!E&&1===s&&A)})),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}}t.Z=(0,d.withNotices)(v)},5046:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},qv:function(){return p},Ss:function(){return d},Xd:function(){return m}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(18670),l=n(26910),c=n(35338);const __=a.__,_x=a._x,u="mailchimp",p=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(i.G,{transform:"translate(-45.478101,-100.73059)"},(0,r.createElement)(i.G,{transform:"matrix(0.26458333,0,0,0.26458333,15.6741,59.72)"},(0,r.createElement)(i.Path,{d:"m 176.433,197.529 c 0.657,-0.078 1.286,-0.082 1.865,0 0.335,-0.768 0.392,-2.091 0.091,-3.532 -0.447,-2.142 -1.053,-3.438 -2.305,-3.236 -1.252,0.202 -1.298,1.754 -0.85,3.895 0.252,1.205 0.7,2.235 1.199,2.873"}),(0,r.createElement)(i.Path,{d:"m 165.688,199.224 c 0.895,0.393 1.446,0.654 1.661,0.426 0.139,-0.142 0.097,-0.413 -0.117,-0.762 -0.442,-0.721 -1.351,-1.453 -2.316,-1.864 -1.972,-0.849 -4.325,-0.567 -6.14,0.737 -0.599,0.439 -1.167,1.047 -1.086,1.416 0.026,0.119 0.116,0.209 0.326,0.239 0.494,0.056 2.22,-0.816 4.209,-0.938 1.403,-0.086 2.566,0.353 3.462,0.746"}),(0,r.createElement)(i.Path,{d:"m 163.887,200.252 c -1.167,0.184 -1.81,0.569 -2.223,0.926 -0.352,0.308 -0.57,0.649 -0.568,0.888 0.001,0.114 0.05,0.18 0.089,0.213 0.053,0.047 0.116,0.073 0.192,0.073 0.263,0 0.854,-0.237 0.854,-0.237 1.623,-0.581 2.694,-0.51 3.755,-0.39 0.586,0.066 0.864,0.102 0.992,-0.099 0.038,-0.058 0.084,-0.183 -0.033,-0.373 -0.273,-0.443 -1.451,-1.192 -3.057,-1.001"}),(0,r.createElement)(i.Path,{d:"m 172.805,204.025 c 0.792,0.389 1.664,0.236 1.948,-0.341 0.284,-0.577 -0.128,-1.361 -0.92,-1.75 -0.792,-0.389 -1.664,-0.236 -1.948,0.341 -0.284,0.578 0.128,1.361 0.92,1.75"}),(0,r.createElement)(i.Path,{d:"m 177.896,199.576 c -0.643,-0.011 -1.177,0.695 -1.192,1.578 -0.015,0.883 0.495,1.606 1.138,1.617 0.643,0.011 1.177,-0.695 1.192,-1.578 0.015,-0.882 -0.495,-1.606 -1.138,-1.617"}),(0,r.createElement)(i.Path,{d:"m 134.683,215.485 c -0.16,-0.201 -0.423,-0.14 -0.678,-0.08 -0.178,0.042 -0.379,0.088 -0.6,0.085 -0.473,-0.009 -0.874,-0.211 -1.099,-0.557 -0.293,-0.45 -0.276,-1.121 0.047,-1.889 l 0.151,-0.344 c 0.516,-1.158 1.379,-3.095 0.41,-4.941 -0.73,-1.39 -1.92,-2.255 -3.351,-2.437 -1.374,-0.174 -2.788,0.335 -3.69,1.33 -1.423,1.57 -1.646,3.707 -1.371,4.462 0.101,0.276 0.259,0.353 0.373,0.369 0.242,0.032 0.6,-0.144 0.824,-0.747 l 0.064,-0.196 c 0.1,-0.319 0.286,-0.913 0.591,-1.389 0.368,-0.574 0.94,-0.969 1.612,-1.114 0.684,-0.147 1.384,-0.016 1.97,0.368 0.997,0.652 1.381,1.874 0.955,3.039 -0.22,0.603 -0.578,1.756 -0.499,2.703 0.16,1.917 1.339,2.687 2.398,2.769 1.03,0.039 1.75,-0.54 1.932,-0.962 0.107,-0.25 0.017,-0.402 -0.042,-0.467"}),(0,r.createElement)(i.Path,{d:"m 144.475,180.275 c 3.36,-3.882 7.495,-7.257 11.2,-9.152 0.128,-0.066 0.264,0.073 0.195,0.199 -0.294,0.533 -0.861,1.674 -1.04,2.539 -0.028,0.135 0.119,0.236 0.233,0.159 2.305,-1.571 6.314,-3.255 9.831,-3.471 0.151,-0.009 0.224,0.184 0.104,0.277 -0.535,0.41 -1.12,0.978 -1.547,1.552 -0.073,0.098 -0.004,0.238 0.118,0.239 2.469,0.018 5.95,0.882 8.219,2.155 0.153,0.086 0.044,0.383 -0.128,0.344 -3.433,-0.787 -9.052,-1.384 -14.89,0.04 -5.211,1.271 -9.189,3.234 -12.09,5.344 -0.147,0.107 -0.323,-0.087 -0.204,-0.224 z m 16.732,37.612 0.001,0.002 0.002,0.004 z m 13.854,1.635 c 0.1,-0.042 0.168,-0.155 0.157,-0.268 -0.014,-0.139 -0.138,-0.24 -0.277,-0.226 0,0 -7.169,1.061 -13.942,-1.418 0.738,-2.398 2.699,-1.532 5.664,-1.293 5.344,0.319 10.134,-0.462 13.674,-1.478 3.067,-0.88 7.096,-2.616 10.225,-5.086 1.055,2.318 1.428,4.87 1.428,4.87 0,0 0.817,-0.146 1.5,0.274 0.645,0.397 1.118,1.222 0.795,3.356 -0.658,3.986 -2.352,7.222 -5.2,10.199 -1.734,1.866 -3.838,3.488 -6.246,4.668 -1.279,0.672 -2.64,1.253 -4.079,1.722 -10.736,3.507 -21.726,-0.348 -25.268,-8.626 -0.283,-0.622 -0.522,-1.274 -0.71,-1.955 -1.509,-5.455 -0.228,-12 3.778,-16.12 v -0.002 c 0.247,-0.262 0.499,-0.571 0.499,-0.96 0,-0.325 -0.207,-0.668 -0.386,-0.912 -1.402,-2.033 -6.257,-5.497 -5.282,-12.201 0.7,-4.816 4.912,-8.208 8.839,-8.007 l 0.995,0.057 c 1.702,0.101 3.186,0.319 4.587,0.378 2.345,0.102 4.453,-0.239 6.951,-2.32 0.842,-0.702 1.518,-1.311 2.661,-1.504 0.12,-0.021 0.419,-0.128 1.016,-0.1 0.61,0.033 1.19,0.2 1.711,0.547 2.002,1.332 2.286,4.559 2.39,6.919 0.059,1.347 0.222,4.607 0.278,5.543 0.127,2.14 0.69,2.441 1.828,2.816 0.64,0.211 1.234,0.368 2.11,0.614 2.65,0.744 4.221,1.499 5.212,2.469 0.591,0.606 0.866,1.25 0.951,1.864 0.312,2.28 -1.77,5.096 -7.283,7.655 -6.026,2.797 -13.337,3.505 -18.388,2.942 l -1.77,-0.2 c -4.04,-0.544 -6.345,4.677 -3.92,8.255 1.563,2.306 5.82,3.806 10.079,3.807 9.765,0.001 17.271,-4.169 20.063,-7.77 l 0.223,-0.318 c 0.138,-0.207 0.024,-0.321 -0.147,-0.204 -2.281,1.561 -12.413,7.758 -23.251,5.893 0,0 -1.317,-0.217 -2.519,-0.684 -0.955,-0.372 -2.955,-1.292 -3.198,-3.343 8.746,2.705 14.253,0.148 14.253,0.148 z m -48.039,-20.785 c -3.042,0.591 -5.723,2.315 -7.362,4.697 -0.98,-0.817 -2.805,-2.399 -3.128,-3.016 -2.617,-4.97 2.856,-14.632 6.68,-20.089 9.45,-13.485 24.25,-23.692 31.101,-21.84 1.114,0.315 4.803,4.592 4.803,4.592 0,0 -6.849,3.8 -13.2,9.097 -8.558,6.589 -15.022,16.166 -18.895,26.559 z m 5.111,22.805 c -0.46,0.079 -0.93,0.11 -1.404,0.098 -4.577,-0.123 -9.52,-4.243 -10.011,-9.129 -0.543,-5.401 2.217,-9.557 7.103,-10.543 0.584,-0.118 1.29,-0.186 2.051,-0.146 2.738,0.15 6.772,2.252 7.693,8.216 0.816,5.282 -0.48,10.659 -5.432,11.503 z m 61.996,-9.564 c -0.039,-0.139 -0.295,-1.072 -0.646,-2.197 -0.351,-1.126 -0.714,-1.917 -0.714,-1.917 1.408,-2.107 1.433,-3.992 1.245,-5.059 -0.2,-1.323 -0.751,-2.45 -1.861,-3.616 -1.11,-1.165 -3.381,-2.359 -6.572,-3.255 l -1.674,-0.465 c -0.008,-0.069 -0.088,-3.947 -0.16,-5.612 -0.053,-1.204 -0.156,-3.083 -0.739,-4.933 -0.695,-2.505 -1.905,-4.697 -3.416,-6.099 4.17,-4.322 6.773,-9.084 6.766,-13.168 -0.012,-7.855 -9.659,-10.232 -21.548,-5.309 l -2.519,1.069 c -0.011,-0.011 -4.554,-4.468 -4.622,-4.528 -13.555,-11.823 -55.935,35.284 -42.386,46.725 l 2.961,2.509 c -0.768,1.99 -1.07,4.27 -0.823,6.721 0.316,3.149 1.94,6.167 4.573,8.499 2.499,2.214 5.785,3.616 8.973,3.613 5.273,12.151 17.321,19.605 31.447,20.025 15.153,0.45 27.873,-6.66 33.203,-19.432 0.349,-0.896 1.828,-4.935 1.828,-8.501 0,-3.583 -2.026,-5.068 -3.316,-5.068"})))),d={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},m={title:__("Mailchimp","jetpack"),icon:{src:p,foreground:(0,c.m)()},description:__("A form enabling readers to join a Mailchimp audience.","jetpack"),category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack")],supports:{align:["wide","full"],color:{gradients:!0},spacing:{padding:!0,margin:!0}},attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},edit:l.Z,save:()=>(0,r.createElement)(o.InnerBlocks.Content,null),example:{attributes:{preview:!0},innerBlocks:[d]},deprecated:[s.Z]}},90139:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(55609);class c extends o.Component{constructor(){super(...arguments),a()(this,"state",{interest_categories:[]}),a()(this,"retrieveGroups",(()=>{s()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))})),a()(this,"render",(()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,o.createElement)(o.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,o.createElement)(l.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}))}componentDidMount(){this.retrieveGroups()}}t.Z=c,c.defaultProps={interests:[],onChange:()=>null}},30330:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(57115);const __=a.__;class s extends r.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(i.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n})))}}s.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{}},t.Z=s},46951:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(92819),l=n(55609),c=n(63435),u=n(65799),p=n(70207),d=n(18914),m=n(45388);const __=i.__;class h extends o.Component{constructor(){super(...arguments),a()(this,"onMarkerClick",(e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()})),a()(this,"onMapClick",(()=>{this.setState({activeMarker:null})})),a()(this,"clearCurrentMarker",(()=>{this.setState({activeMarker:null})})),a()(this,"updateActiveMarker",(e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,a=t.slice(0);(0,s.assign)(a[r],e),this.props.onSetPoints(a)})),a()(this,"deleteActiveMarker",(()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})})),a()(this,"sizeMap",(()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;if(e)n.style.height=e+"px";else{const e=n.offsetWidth,t=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(e*(3/4),t);n.style.height=r+"px"}t.resize(),this.setBoundsByMarkers()})),a()(this,"updateZoom",(()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e),t.updateZoom(e)})),a()(this,"setBoundsByMarkers",(()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:a}=this.props,{map:o,activeMarker:i,mapboxgl:s,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!o)return;if(r.length&&e?o.dragPan.disable():o.dragPan.enable(),!r.length)return;if(i)return;const u=new s.LngLatBounds;if(r.forEach((e=>{u.extend([e.coordinates.longitude,e.coordinates.latitude])})),t(u.getCenter()),r.length>1){o.fitBounds(u,{padding:{top:80,bottom:80,left:40,right:40}}),this.setState({boundsSetProgrammatically:!0});try{o.removeControl(l)}catch(e){}}else{if(o.setCenter(u.getCenter()),c){const e=12;o.setZoom(e),n(e)}else o.setZoom(parseInt(a,10));o.addControl(l),this.setState({boundsSetProgrammatically:!1})}})),a()(this,"scriptsLoaded",(()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)})),a()(this,"googlePoint2Mapbox",(e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0})),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:r}=this.props,{map:a,activeMarker:i,mapboxgl:p}=this.state,{onMarkerClick:d,deleteActiveMarker:m,updateActiveMarker:h}=this,f=(0,s.get)(i,"props.point")||{},{title:g,caption:b}=f,v=o.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),k=a&&p&&e.map(((e,t)=>(0,o.createElement)(c.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:a,mapboxgl:p,markerColor:r,onClick:d}))),y=p&&(0,o.createElement)(u.Z,{activeMarker:i,map:a,mapboxgl:p,unsetActiveMarker:()=>this.setState({activeMarker:null})},i&&t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.TextControl,{label:__("Marker Title","jetpack"),value:g,onChange:e=>h({title:e})}),(0,o.createElement)(l.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>h({caption:e})}),(0,o.createElement)(l.Button,{onClick:m,className:"wp-block-jetpack-map__delete-btn"},(0,o.createElement)(l.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),i&&!t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h3",null,g),(0,o.createElement)("p",null,b)));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},k),y,v)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:a,mapStyle:o,mapDetails:i,scrollToZoom:s,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),a!==e.points&&this.setBoundsByMarkers(),a.length!==e.points.length&&this.clearCurrentMarker(),o===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,p.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,d.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,d.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,d.Pp)(m,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:a,scrollToZoom:o,showFullscreenButton:i,admin:s}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:this.googlePoint2Mapbox(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void a("mapbox_error",e.message)}o||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{a("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),i&&(l.addControl(c),s&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}h.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{}},t.Z=h},86622:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(50594),l=n(28875);const __=a.__;t.Z=e=>{let{attributes:t,setAttributes:n,state:a,setState:c,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g}=e;const b=e=>{n({align:e}),setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockAlignmentToolbar,{value:t.align,onChange:b,controls:["center","wide","full"]}),(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{icon:l.X.markerIcon,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(o.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(o.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let a=parseInt(e.target.value,10);isNaN(a)?a=null:null==r?a=p.current.mapRef.current.offsetHeight:a<m&&(a=m),n({mapHeight:a}),setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(o.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:t.zoom,onChange:e=>{n({zoom:e}),setTimeout(p.current.updateZoom,0)},min:0,max:22}),(0,r.createElement)(o.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})})),t.points.length?(0,r.createElement)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,(0,r.createElement)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(o.TextControl,{help:"wpcom"===a.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:a.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,r.createElement)(o.ButtonGroup,null,(0,r.createElement)(o.Button,{type:"button",onClick:f,disabled:!a.apiKeyControl||a.apiKeyControl===a.apiKey},__("Update Token","jetpack")),(0,r.createElement)(o.Button,{type:"button",onClick:h,disabled:"wpcom"===a.apiKeySource,variant:"secondary"},__("Remove Token","jetpack")))))}},40055:function(e,t,n){"use strict";var r=n(53533);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},53533:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},o.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},54041:function(e,t,n){"use strict";var r=n(3743);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:r.Z}},3743:function(e,t,n){"use strict";var r=n(69307);class a extends r.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:a,points:o,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=o.map(((e,t)=>{const{longitude:n,latitude:a}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+a+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:o},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":a,"data-points":JSON.stringify(o),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},o.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},27171:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(86989),s=n.n(i),l=n(65736),c=n(55609),u=n(52175),p=n(30330),d=n(46951),m=n(86622),h=n(28875),f=n(96406),g=n(94333),b=n(9818),v=n(18187),k=n(94823);const __=l.__,y={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class E extends o.Component{constructor(){super(...arguments),a()(this,"geoCodeAddress",((e,t)=>{t&&(0,k.P)(e,t).then((e=>{var t;if(null!==(t=e.features)&&void 0!==t&&t.length){const t=e.features[0],n=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:n})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))})),a()(this,"componentDidUpdate",(e=>{var t,n;const r=null===(t=this.props.attributes)||void 0===t?void 0:t.address,a=null===(n=e.attributes)||void 0===n?void 0:n.address;r&&a!==r&&this.geoCodeAddress(r,this.state.apiKey)})),a()(this,"addPoint",(e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,a=r.slice(0);let o=!1;r.map((t=>{t.id===e.id&&(o=!0)})),o||(a.push(e),n({points:a}),this.setState({addPointVisibility:!1}))})),a()(this,"setPointVisibility",(()=>{this.setState({addPointVisibility:!0})})),a()(this,"updateAPIKeyControl",(e=>{this.setState({apiKeyControl:e.target.value})})),a()(this,"updateAPIKey",(()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")})),a()(this,"removeAPIKey",(()=>{this.apiCall(null,"DELETE")})),a()(this,"onError",((e,t)=>{const{noticeOperations:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)})),a()(this,"onMapResize",((e,t,n,r)=>{const{onResizeStop:a,setAttributes:o}=this.props;a();o({mapHeight:parseInt(this.mapRef.current.mapRef.current.offsetHeight+r.height,10)}),setTimeout(this.mapRef.current.sizeMap,0)})),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,o.createRef)()}apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:a}=this.props,o="/wpcom/v2/service-api-keys/mapbox",i=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};this.setState({apiRequestOutstanding:!0},(()=>{s()(i).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;a.removeAllNotices();const o=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:o,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}componentDidMount(){this.apiCall().then((()=>{var e,t;null!==(e=this.props.attributes)&&void 0!==e&&e.address&&this.geoCodeAddress(null===(t=this.props.attributes)||void 0===t?void 0:t.address,this.state.apiKey)}))}render(){const{className:e,setAttributes:t,attributes:n,noticeUI:r,notices:a,isSelected:i,instanceId:s,onResizeStart:l}=this.props,{mapDetails:g,points:b,zoom:k,mapCenter:E,markerColor:w,preview:_,mapHeight:C,showFullscreenButton:S}=n,{addPointVisibility:j,apiKey:x,apiKeyControl:P,apiState:T,apiRequestOutstanding:A}=this.state,N=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(u.BlockControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef})),(0,o.createElement)(u.InspectorControls,null,(0,o.createElement)(m.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:s,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey}))),I=(0,o.createElement)(c.Placeholder,{icon:h.X.icon},(0,o.createElement)(c.Spinner,null)),B=(0,o.createElement)(o.Fragment,null,__("To use the map block, you need an Access Token.","jetpack"),(0,o.createElement)("br",null),(0,o.createElement)(c.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,o.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),M=(0,o.createElement)(c.Placeholder,{icon:h.X.icon,label:__("Map","jetpack"),notices:a,instructions:B},(0,o.createElement)(o.Fragment,null,(0,o.createElement)("form",null,(0,o.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:A,placeholder:__("Paste Token Here","jetpack"),value:P,onChange:this.updateAPIKeyControl}),(0,o.createElement)(c.Button,{variant:"secondary",disabled:A||!P||P.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),R=i&&b.length<=1,L=(0,v.t)(h.X.styles,n.className),Z=(0,o.createElement)(o.Fragment,null,N,(0,o.createElement)("div",{className:e},(0,o.createElement)(c.ResizableBox,{size:{height:C||"auto",width:"100%"},grid:[10,10],showHandle:i,minHeight:400,enable:y,onResizeStart:l,onResizeStop:this.onMapResize},(0,o.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,o.createElement)(d.Z,{ref:this.mapRef,scrollToZoom:R,showFullscreenButton:S,mapStyle:L||"default",mapDetails:g,mapHeight:C,points:b,zoom:k,mapCenter:E,markerColor:w,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:x,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!b.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError},i&&j&&(0,o.createElement)(p.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:x,onError:this.onError,tagName:"AddPoint"})))))),D=h.X.styles.find((e=>e.name===L)),F=(0,o.createElement)("div",null,(0,o.createElement)("img",{alt:__("Map Preview","jetpack"),src:D?D.preview:f}));return(0,o.createElement)(o.Fragment,null,r,_&&F,!_&&0===T&&I,!_&&1===T&&M,!_&&2===T&&Z)}}t.Z=(0,g.compose)([c.withNotices,(0,b.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(E)},94823:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},88155:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(28875),a=n(27171),o=n(607),i=n(40055),s=n(54041),l=n(35338);const{name:c}=r.X,u={title:r.X.title,icon:{src:r.X.icon,foreground:(0,l.m)()},category:r.X.category,keywords:r.X.keywords,description:r.X.description,attributes:r.X.attributes,supports:r.X.supports,styles:r.X.styles,getEditWrapperProps(e){const{align:t}=e;if(-1!==r.X.validAlignments.indexOf(t))return{"data-align":t}},edit:a.Z,save:o.Z,example:r.X.example,deprecated:[s.Z,i.Z]}},65799:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307);class i extends o.Component{constructor(){super(...arguments),a()(this,"closeClick",(()=>{this.props.unsetActiveMarker()}))}componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}}),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,o.createPortal)(this.props.children,this.el):null}openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}i.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=i},57115:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609),l=n(30725);const c=(0,i.__)("Add a marker…","jetpack");class u extends o.Component{constructor(){super(...arguments),a()(this,"getOptionCompletion",(e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text})),a()(this,"search",(e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const a=new XMLHttpRequest;a.open("GET",r),a.onload=function(){if(200===a.status){const t=JSON.parse(a.responseText);e(t.features)}else{const e=JSON.parse(a.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},a.send()}))})),a()(this,"onReset",(()=>{this.textRef.current.value=null})),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,o.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}render(){const{label:e}=this.props;return(0,o.createElement)("div",{ref:this.containerRef},(0,o.createElement)(s.BaseControl,{label:e,className:"components-location-search"},(0,o.createElement)(l.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:r,onChange:a,onKeyDown:i}=e;return(0,o.createElement)(s.TextControl,{placeholder:c,ref:this.textRef,onChange:a,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":r,onKeyDown:i})}))))}}u.defaultProps={onError:()=>{}},t.Z=u},50594:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(55609);class s extends o.Component{constructor(){super(...arguments),a()(this,"onDeletePoint",(e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,a=n.slice(0);a.splice(t,1),r(a)})),this.state={selectedCell:null}}setMarkerField(e,t,n){const{points:r,onChange:a}=this.props,o=r.slice(0);o[n][e]=t,a(o)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,o.createElement)(i.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,o.createElement)(i.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,o.createElement)(i.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,o.createElement)(i.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,o.createElement)(i.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,o.createElement)("div",{className:"component__locations"},(0,o.createElement)(i.Panel,{className:"component__locations__panel"},t))}}s.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=s},30725:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(65736),c=n(55609),u=n(92819),p=n(39630),d=n(94333);const __=l.__,_n=l._n;function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const a=e[r];let{keywords:o=[]}=a;if("string"==typeof a.label&&(o=[...o,a.label]),n.push(a),n.length===t)break}return n}class h extends o.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),a()(this,"select",(e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()})),a()(this,"reset",(()=>{this.setState(this.constructor.getInitialState())})),a()(this,"onChange",(e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?m(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})})),a()(this,"onKeyDown",(e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let a;switch(e.keyCode){case p.UP:a=(0===n?r.length:n)-1,this.setState({selectedIndex:a});break;case p.DOWN:a=(n+1)%r.length,this.setState({selectedIndex:a});break;case p.ENTER:this.select(r[n]);break;case p.LEFT:case p.RIGHT:case p.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()})),this.debouncedLoadOptions=(0,u.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),a=m(n),o=a.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:a,selectedIndex:o,isOpen:a.length>0}),this.announce(a)}))}announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,l.sprintf)(
35
  /* translators: placeholder is a number. */
36
  _n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,o.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,o.createElement)(s.Placeholder,{icon:m.qv,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,o.createElement)(s.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,o.createElement)(s.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,o.createElement)(s.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,o.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,o.createElement)(l.InnerBlocks,null)))}}t.Z=(0,c.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(f)},47515:function(e,t,n){"use strict";var r=n(69307),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},66117:function(e,t,n){"use strict";n.d(t,{FV:function(){return r},Am:function(){return a},Kv:function(){return o}});const r="after-visits",a="before-visits",o=3},22198:function(e,t,n){"use strict";n.d(t,{u2:function(){return m},qv:function(){return h},Xd:function(){return f}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(5160),l=n(89323),c=n(47515),u=n(66117),p=n(35338);const __=a.__,_x=a._x,d={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(i.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,s.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),f={attributes:{criteria:{type:"string",default:u.FV},threshold:{type:"number",default:u.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,p.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:l.Z,save:c.Z,example:{attributes:{criteria:u.FV,threshold:u.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[d]}},71151:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={revueUsername:{type:"string"},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0}}},8138:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(4981),i=n(65736);const _x=i._x,__=i.__,s=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius","gradient","customGradient"];t.Z={attributes:{revueUsername:{type:"string"},text:{type:"string",default:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")},emailLabel:{type:"string",default:__("Email address","jetpack")},emailPlaceholder:{type:"string",default:__("Enter your email address","jetpack")},firstNameLabel:{type:"string",default:__("First name","jetpack")},firstNamePlaceholder:{type:"string",default:__("Enter your first name","jetpack")},firstNameShow:{type:"boolean",default:!0},lastNameLabel:{type:"string",default:__("Last name","jetpack")},lastNamePlaceholder:{type:"string",default:__("Enter your last name","jetpack")},lastNameShow:{type:"boolean",default:!0},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},migrate:e=>{const t=(0,a.omit)(e,s),n=(0,a.pick)(e,s);return[t,[(0,o.createBlock)("jetpack/button",{element:"button",text:n.text||"Subscribe",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,s),Boolean),save:e=>{let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)("a",{href:n},n))}}},48517:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(92819),o=n(62369),i=n(52175),s=n(55609),l=n(65736),c=n(8491),u=n(71151),p=n(68919),d=n(41448),m=n(32684);const __=l.__;function h(e){let{attributes:t,className:n,setAttributes:l}=e;(0,r.useEffect)((()=>{const e=(0,m.S)(u.Z,t);(0,a.isEqual)(e,t)||l(e)}),[t,l]);const{revueUsername:h,emailLabel:f,emailPlaceholder:g,firstNameLabel:b,firstNamePlaceholder:v,firstNameShow:k,lastNameLabel:y,lastNamePlaceholder:E,lastNameShow:w}=t,[_,C]=(0,r.useState)("");(0,r.useEffect)((()=>{!_&&h&&C(h)}),[]);const S=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/revue-block/":"https://jetpack.com/support/jetpack-blocks/revue-block/";return(0,r.createElement)("div",{className:n},!h&&(0,r.createElement)(s.Placeholder,{icon:d.Z,instructions:__("Enter your Revue username.","jetpack"),label:__("Revue","jetpack")},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),l({revueUsername:_.trim()})}},(0,r.createElement)("input",{className:"components-placeholder__input",onChange:e=>C(e.target.value.trim()),placeholder:__("Enter your Revue username here…","jetpack"),type:"text",value:_}),(0,r.createElement)("div",null,(0,r.createElement)(s.Button,{disabled:!_,variant:"secondary",type:"submit"},__("Add Form","jetpack")))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(s.ExternalLink,{href:S},__("Need help finding your Revue username?","jetpack")))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show first name field.","jetpack"),checked:k,onChange:()=>l({firstNameShow:!k})}),(0,r.createElement)(s.ToggleControl,{label:__("Show last name field.","jetpack"),checked:w,onChange:()=>l({lastNameShow:!w})}),(0,r.createElement)(s.TextControl,{label:__("Revue Username","jetpack"),onChange:e=>{C(e.trim()),l({revueUsername:e.trim()})},value:h}))),(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:f,labelFieldName:"emailLabel",required:!0,setAttributes:l}),onChange:e=>l({emailPlaceholder:e}),placeholder:g,value:g}),k&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:b,labelFieldName:"firstNameLabel",setAttributes:l}),onChange:e=>l({firstNamePlaceholder:e}),placeholder:v,value:v}),w&&(0,r.createElement)(s.TextControl,{label:(0,r.createElement)(p.Z,{label:y,labelFieldName:"lastNameLabel",setAttributes:l}),onChange:e=>l({lastNamePlaceholder:e}),placeholder:E,value:E}),(0,r.createElement)(i.InnerBlocks,{template:[[c.Ss.name,c.Ss.attributes]],templateLock:"all"})))}},41448:function(e,t,n){"use strict";var r=n(69307),a=n(55609);t.Z=(0,r.createElement)(a.SVG,{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{fillRule:"nonzero"},(0,r.createElement)(a.Path,{d:"M16.8452322,23.2301186 C13.9471277,22.2565366 12.0226052,20.2188069 10.6188359,16.5961763 C10.2565728,15.6225943 9.87166831,14.4905223 9.80374399,14.1056178 C9.66789534,13.4037331 9.6452539,13.3810917 8.96601067,13.6075061 C7.8792215,13.9697691 7.76601429,14.1282592 7.35846835,15.758443 C6.724508,18.2490015 6.45281071,18.7244718 5.56979451,18.8829619 C5.09432424,18.9735276 4.5735711,18.9282447 4.27923236,18.7697547 C3.84904498,18.5433402 3.8037621,18.3848502 3.93961075,17.501834 C4.00753507,16.9584394 4.41508101,15.3056142 4.82262695,13.8339205 C5.8414918,10.2792143 6.11318909,8.98865211 6.29432062,7.1094125 C6.43016927,5.63771883 6.47545215,5.50187018 7.08677106,5.20753145 C7.92450438,4.79998551 8.80752058,5.09432424 9.19242508,5.88677468 C9.44148093,6.38488639 9.39619805,6.90563953 8.96601067,8.98865211 C8.67167193,10.3924215 8.51318185,11.5244935 8.62638905,11.5244935 C9.12450076,11.5244935 11.2754377,10.2565728 12.0452467,9.50940525 C13.8339205,7.83393861 14.2641079,5.77356748 13.2905259,3.82640354 C12.5886412,2.4226342 11.6150593,1.94716393 9.78110255,2.08301258 C6.97356385,2.28678555 4.43772245,4.25659092 3.01131166,7.35846835 C2.21886123,9.05657643 2.19621978,9.07921787 1.49433511,8.94336923 C-1.74339096,8.28676744 0.63396035,3.39621616 5.29809721,1.19999638 C8.39997464,-0.294338734 11.5018521,-0.362263057 14.0829764,0.950940525 C17.0716466,2.51319996 18.0225871,5.93205756 16.2791961,8.96601067 C15.5999529,10.1433656 14.2641079,11.3886449 12.9509043,12.0678881 C12.5433584,12.2716611 12.2037367,12.5207169 12.2037367,12.6339241 C12.2037367,12.9509043 13.2678845,15.9395745 13.6301475,16.6641006 C14.3093908,17.9773042 16.2339133,19.8112609 17.4565511,20.377297 C18.8829619,21.0112573 21.4640861,21.0791816 23.0263456,20.5131456 L23.9772861,20.1508826 L23.9772861,20.7169186 C23.9772861,21.5320105 23.3433258,22.3471023 22.3018195,22.8904969 C21.147106,23.4791744 18.1584357,23.6603059 16.8452322,23.2301186 Z"})))},8491:function(e,t,n){"use strict";n.d(t,{Ss:function(){return u},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(71151),o=n(8138),i=n(48517),s=n(41448),l=n(35338),c=n(93812);const __=r.__,_x=r._x,u={name:"jetpack/button",attributes:{element:"button",text:_x("Subscribe","verb: e.g. subscribe to a newsletter.","jetpack")}},p="revue",d={title:__("Revue","jetpack"),description:__("Add a subscription form for your Revue newsletter.","jetpack"),icon:{src:s.Z,foreground:(0,l.m)()},category:"grow",keywords:[_x("email","block search term","jetpack"),_x("subscription","block search term","jetpack"),_x("newsletter","block search term","jetpack"),_x("mailing list","block search term","jetpack")],supports:{html:!1},attributes:a.Z,edit:i.Z,save:c.Z,example:{attributes:{revueUsername:"example"},innerBlocks:[u]},deprecated:[o.Z]}},93812:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{attributes:{revueUsername:t}}=e;const n=`https://www.getrevue.co/profile/${t}`;return(0,r.createElement)("div",null,(0,r.createElement)(a.InnerBlocks.Content,null),(0,r.createElement)("a",{className:"wp-block-jetpack-revue__fallback",href:n},n))}},52909:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(52175);function o(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},83086:function(e,t,n){"use strict";n.d(t,{u2:function(){return p},Xd:function(){return d}});var r=n(69307),a=n(65736),o=n(52175),i=n(55609),s=n(52909),l=n(53067),c=n(5160),u=n(35338);const __=a.__,_x=a._x,p="send-a-message",d={title:__("Send A Message","jetpack"),description:__("Let your visitors send you messages with the tap of a button.","jetpack"),icon:{src:(0,c.Z)((0,r.createElement)(i.Path,{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),foreground:(0,u.m)()},category:"grow",keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1},attributes:{},edit:s.Z,save:e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(o.InnerBlocks.Content,null)),variations:l.Z,example:{}}},72120:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"MA",label:"🇲🇦 +212",value:"212MA"},{code:"DZ",label:"🇩🇿 +213",value:"213DZ"},{code:"TN",label:"🇹🇳 +216",value:"216TN"},{code:"LY",label:"🇱🇾 +218",value:"218LY"},{code:"GM",label:"🇬🇲 +220",value:"220GM"},{code:"SN",label:"🇸🇳 +221",value:"221SN"},{code:"MR",label:"🇲🇷 +222",value:"222MR"},{code:"ML",label:"🇲🇱 +223",value:"223ML"},{code:"GN",label:"🇬🇳 +224",value:"224GN"},{code:"CI",label:"🇨🇮 +225",value:"225CI"},{code:"BF",label:"🇧🇫 +226",value:"226BF"},{code:"NE",label:"🇳🇪 +227",value:"227NE"},{code:"TG",label:"🇹🇬 +228",value:"228TG"},{code:"BJ",label:"🇧🇯 +229",value:"229BJ"},{code:"MU",label:"🇲🇺 +230",value:"230MU"},{code:"LR",label:"🇱🇷 +231",value:"231LR"},{code:"SL",label:"🇸🇱 +232",value:"232SL"},{code:"GH",label:"🇬🇭 +233",value:"233GH"},{code:"NG",label:"🇳🇬 +234",value:"234NG"},{code:"TD",label:"🇹🇩 +235",value:"235TD"},{code:"CF",label:"🇨🇫 +236",value:"236CF"},{code:"CM",label:"🇨🇲 +237",value:"237CM"},{code:"CV",label:"🇨🇻 +238",value:"238CV"},{code:"ST",label:"🇸🇹 +239",value:"239ST"},{code:"GQ",label:"🇬🇶 +240",value:"240GQ"},{code:"GA",label:"🇬🇦 +241",value:"241GA"},{code:"CG",label:"🇨🇬 +242",value:"242CG"},{code:"CD",label:"🇨🇩 +243",value:"243CD"},{code:"AO",label:"🇦🇴 +244",value:"244AO"},{code:"GW",label:"🇬🇼 +245",value:"245GW"},{code:"IO",label:"🇮🇴 +246",value:"246IO"},{code:"SC",label:"🇸🇨 +248",value:"248SC"},{code:"SD",label:"🇸🇩 +249",value:"249SD"},{code:"RW",label:"🇷🇼 +250",value:"250RW"},{code:"ET",label:"🇪🇹 +251",value:"251ET"},{code:"SO",label:"🇸🇴 +252",value:"252SO"},{code:"DJ",label:"🇩🇯 +253",value:"253DJ"},{code:"KE",label:"🇰🇪 +254",value:"254KE"},{code:"TZ",label:"🇹🇿 +255",value:"255TZ"},{code:"UG",label:"🇺🇬 +256",value:"256UG"},{code:"BI",label:"🇧🇮 +257",value:"257BI"},{code:"MZ",label:"🇲🇿 +258",value:"258MZ"},{code:"ZM",label:"🇿🇲 +260",value:"260ZM"},{code:"MG",label:"🇲🇬 +261",value:"261MG"},{code:"YT",label:"🇾🇹 +262",value:"262YT"},{code:"RE",label:"🇷🇪 +262",value:"262RE"},{code:"ZW",label:"🇿🇼 +263",value:"263ZW"},{code:"NA",label:"🇳🇦 +264",value:"264NA"},{code:"MW",label:"🇲🇼 +265",value:"265MW"},{code:"LS",label:"🇱🇸 +266",value:"266LS"},{code:"BW",label:"🇧🇼 +267",value:"267BW"},{code:"SZ",label:"🇸🇿 +268",value:"268SZ"},{code:"KM",label:"🇰🇲 +269",value:"269KM"},{code:"ZA",label:"🇿🇦 +27",value:"27ZA"},{code:"SH",label:"🇸🇭 +290",value:"290SH"},{code:"ER",label:"🇪🇷 +291",value:"291ER"},{code:"AW",label:"🇦🇼 +297",value:"297AW"},{code:"FO",label:"🇫🇴 +298",value:"298FO"},{code:"GL",label:"🇬🇱 +299",value:"299GL"},{code:"GR",label:"🇬🇷 +30",value:"30GR"},{code:"NL",label:"🇳🇱 +31",value:"31NL"},{code:"BE",label:"🇧🇪 +32",value:"32BE"},{code:"FR",label:"🇫🇷 +33",value:"33FR"},{code:"ES",label:"🇪🇸 +34",value:"34ES"},{code:"KY",label:"🇰🇾 +345",value:"345KY"},{code:"GI",label:"🇬🇮 +350",value:"350GI"},{code:"PT",label:"🇵🇹 +351",value:"351PT"},{code:"LU",label:"🇱🇺 +352",value:"352LU"},{code:"IE",label:"🇮🇪 +353",value:"353IE"},{code:"IS",label:"🇮🇸 +354",value:"354IS"},{code:"AL",label:"🇦🇱 +355",value:"355AL"},{code:"MT",label:"🇲🇹 +356",value:"356MT"},{code:"CY",label:"🇨🇾 +357",value:"357CY"},{code:"FI",label:"🇫🇮 +358",value:"358FI"},{code:"BG",label:"🇧🇬 +359",value:"359BG"},{code:"HU",label:"🇭🇺 +36",value:"36HU"},{code:"LT",label:"🇱🇹 +370",value:"370LT"},{code:"LV",label:"🇱🇻 +371",value:"371LV"},{code:"EE",label:"🇪🇪 +372",value:"372EE"},{code:"MD",label:"🇲🇩 +373",value:"373MD"},{code:"AM",label:"🇦🇲 +374",value:"374AM"},{code:"BY",label:"🇧🇾 +375",value:"375BY"},{code:"AD",label:"🇦🇩 +376",value:"376AD"},{code:"MC",label:"🇲🇨 +377",value:"377MC"},{code:"SM",label:"🇸🇲 +378",value:"378SM"},{code:"VA",label:"🇻🇦 +379",value:"379VA"},{code:"UA",label:"🇺🇦 +380",value:"380UA"},{code:"RS",label:"🇷🇸 +381",value:"381RS"},{code:"ME",label:"🇲🇪 +382",value:"382ME"},{code:"XK",label:"🇽🇰 +383",value:"383XK"},{code:"HR",label:"🇭🇷 +385",value:"385HR"},{code:"SI",label:"🇸🇮 +386",value:"386SI"},{code:"BA",label:"🇧🇦 +387",value:"387BA"},{code:"MK",label:"🇲🇰 +389",value:"389MK"},{code:"IT",label:"🇮🇹 +39",value:"39IT"},{code:"RO",label:"🇷🇴 +40",value:"40RO"},{code:"CH",label:"🇨🇭 +41",value:"41CH"},{code:"CZ",label:"🇨🇿 +420",value:"420CZ"},{code:"SK",label:"🇸🇰 +421",value:"421SK"},{code:"LI",label:"🇱🇮 +423",value:"423LI"},{code:"AT",label:"🇦🇹 +43",value:"43AT"},{code:"IM",label:"🇮🇲 +44",value:"44IM"},{code:"GG",label:"🇬🇬 +44",value:"44GG"},{code:"JE",label:"🇯🇪 +44",value:"44JE"},{code:"GB",label:"🇬🇧 +44",value:"44GB"},{code:"DK",label:"🇩🇰 +45",value:"45DK"},{code:"SE",label:"🇸🇪 +46",value:"46SE"},{code:"NO",label:"🇳🇴 +47",value:"47NO"},{code:"SJ",label:"🇸🇯 +47",value:"47SJ"},{code:"PL",label:"🇵🇱 +48",value:"48PL"},{code:"DE",label:"🇩🇪 +49",value:"49DE"},{code:"FK",label:"🇫🇰 +500",value:"500FK"},{code:"GS",label:"🇬🇸 +500",value:"500GS"},{code:"BZ",label:"🇧🇿 +501",value:"501BZ"},{code:"GT",label:"🇬🇹 +502",value:"502GT"},{code:"SV",label:"🇸🇻 +503",value:"503SV"},{code:"HN",label:"🇭🇳 +504",value:"504HN"},{code:"NI",label:"🇳🇮 +505",value:"505NI"},{code:"CR",label:"🇨🇷 +506",value:"506CR"},{code:"PA",label:"🇵🇦 +507",value:"507PA"},{code:"PM",label:"🇵🇲 +508",value:"508PM"},{code:"HT",label:"🇭🇹 +509",value:"509HT"},{code:"PE",label:"🇵🇪 +51",value:"51PE"},{code:"MX",label:"🇲🇽 +52",value:"52MX"},{code:"CU",label:"🇨🇺 +53",value:"53CU"},{code:"AR",label:"🇦🇷 +54",value:"54AR"},{code:"BR",label:"🇧🇷 +55",value:"55BR"},{code:"CL",label:"🇨🇱 +56",value:"56CL"},{code:"CO",label:"🇨🇴 +57",value:"57CO"},{code:"VE",label:"🇻🇪 +58",value:"58VE"},{code:"BL",label:"🇧🇱 +590",value:"590BL"},{code:"MF",label:"🇲🇫 +590",value:"590MF"},{code:"GP",label:"🇬🇵 +590",value:"590GP"},{code:"BO",label:"🇧🇴 +591",value:"591BO"},{code:"GY",label:"🇬🇾 +592",value:"592GY"},{code:"EC",label:"🇪🇨 +593",value:"593EC"},{code:"GF",label:"🇬🇫 +594",value:"594GF"},{code:"PY",label:"🇵🇾 +595",value:"595PY"},{code:"MQ",label:"🇲🇶 +596",value:"596MQ"},{code:"SR",label:"🇸🇷 +597",value:"597SR"},{code:"UY",label:"🇺🇾 +598",value:"598UY"},{code:"MY",label:"🇲🇾 +60",value:"60MY"},{code:"CC",label:"🇨🇨 +61",value:"61CC"},{code:"AU",label:"🇦🇺 +61",value:"61AU"},{code:"CX",label:"🇨🇽 +61",value:"61CX"},{code:"ID",label:"🇮🇩 +62",value:"62ID"},{code:"PH",label:"🇵🇭 +63",value:"63PH"},{code:"NZ",label:"🇳🇿 +64",value:"64NZ"},{code:"SG",label:"🇸🇬 +65",value:"65SG"},{code:"TH",label:"🇹🇭 +66",value:"66TH"},{code:"TL",label:"🇹🇱 +670",value:"670TL"},{code:"NF",label:"🇳🇫 +672",value:"672NF"},{code:"BN",label:"🇧🇳 +673",value:"673BN"},{code:"NR",label:"🇳🇷 +674",value:"674NR"},{code:"PG",label:"🇵🇬 +675",value:"675PG"},{code:"TO",label:"🇹🇴 +676",value:"676TO"},{code:"SB",label:"🇸🇧 +677",value:"677SB"},{code:"VU",label:"🇻🇺 +678",value:"678VU"},{code:"FJ",label:"🇫🇯 +679",value:"679FJ"},{code:"PW",label:"🇵🇼 +680",value:"680PW"},{code:"WF",label:"🇼🇫 +681",value:"681WF"},{code:"CK",label:"🇨🇰 +682",value:"682CK"},{code:"NU",label:"🇳🇺 +683",value:"683NU"},{code:"WS",label:"🇼🇸 +685",value:"685WS"},{code:"KI",label:"🇰🇮 +686",value:"686KI"},{code:"NC",label:"🇳🇨 +687",value:"687NC"},{code:"TV",label:"🇹🇻 +688",value:"688TV"},{code:"PF",label:"🇵🇫 +689",value:"689PF"},{code:"TK",label:"🇹🇰 +690",value:"690TK"},{code:"FM",label:"🇫🇲 +691",value:"691FM"},{code:"MH",label:"🇲🇭 +692",value:"692MH"},{code:"RU",label:"🇷🇺 +7",value:"7RU"},{code:"KZ",label:"🇰🇿 +77",value:"77KZ"},{code:"JP",label:"🇯🇵 +81",value:"81JP"},{code:"KR",label:"🇰🇷 +82",value:"82KR"},{code:"VN",label:"🇻🇳 +84",value:"84VN"},{code:"KP",label:"🇰🇵 +850",value:"850KP"},{code:"HK",label:"🇭🇰 +852",value:"852HK"},{code:"MO",label:"🇲🇴 +853",value:"853MO"},{code:"KH",label:"🇰🇭 +855",value:"855KH"},{code:"LA",label:"🇱🇦 +856",value:"856LA"},{code:"CN",label:"🇨🇳 +86",value:"86CN"},{code:"PN",label:"🇵🇳 +872",value:"872PN"},{code:"BD",label:"🇧🇩 +880",value:"880BD"},{code:"TW",label:"🇹🇼 +886",value:"886TW"},{code:"TR",label:"🇹🇷 +90",value:"90TR"},{code:"IN",label:"🇮🇳 +91",value:"91IN"},{code:"PK",label:"🇵🇰 +92",value:"92PK"},{code:"AF",label:"🇦🇫 +93",value:"93AF"},{code:"LK",label:"🇱🇰 +94",value:"94LK"},{code:"MM",label:"🇲🇲 +95",value:"95MM"},{code:"MV",label:"🇲🇻 +960",value:"960MV"},{code:"LB",label:"🇱🇧 +961",value:"961LB"},{code:"JO",label:"🇯🇴 +962",value:"962JO"},{code:"SY",label:"🇸🇾 +963",value:"963SY"},{code:"IQ",label:"🇮🇶 +964",value:"964IQ"},{code:"KW",label:"🇰🇼 +965",value:"965KW"},{code:"SA",label:"🇸🇦 +966",value:"966SA"},{code:"YE",label:"🇾🇪 +967",value:"967YE"},{code:"OM",label:"🇴🇲 +968",value:"968OM"},{code:"PS",label:"🇵🇸 +970",value:"970PS"},{code:"AE",label:"🇦🇪 +971",value:"971AE"},{code:"IL",label:"🇮🇱 +972",value:"972IL"},{code:"BH",label:"🇧🇭 +973",value:"973BH"},{code:"QA",label:"🇶🇦 +974",value:"974QA"},{code:"BT",label:"🇧🇹 +975",value:"975BT"},{code:"MN",label:"🇲🇳 +976",value:"976MN"},{code:"NP",label:"🇳🇵 +977",value:"977NP"},{code:"IR",label:"🇮🇷 +98",value:"98IR"},{code:"TJ",label:"🇹🇯 +992",value:"992TJ"},{code:"TM",label:"🇹🇲 +993",value:"993TM"},{code:"AZ",label:"🇦🇿 +994",value:"994AZ"},{code:"GE",label:"🇬🇪 +995",value:"995GE"},{code:"KG",label:"🇰🇬 +996",value:"996KG"},{code:"UZ",label:"🇺🇿 +998",value:"998UZ"}]},53067:function(e,t,n){"use strict";var r=n(65736),a=n(54044),o=n(25906);const __=r.__,i=[{isDefault:!0,name:"whatsapp-button",title:__("WhatsApp Button","jetpack"),description:__("Let your visitors send you messages on WhatsApp with the tap of a button.","jetpack"),icon:(0,o.p)("send-a-message",a.Z),innerBlocks:[["jetpack/whatsapp-button",{}]]}];t.Z=i},5738:function(e,t,n){"use strict";var r=n(65736);const __=r.__;t.Z={countryCode:{type:"string"},phoneNumber:{type:"string"},firstMessage:{type:"string",default:__("Hi, I got your WhatsApp information from your website.","jetpack")},buttonText:{type:"array",source:"children",selector:"a.whatsapp-block__button",default:__("Chat on WhatsApp","jetpack")},backgroundColor:{type:"string",default:"#25D366"},colorClass:{type:"string",default:"dark"},openInNewTab:{type:"boolean",default:!1}}},1572:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(65736),o=n(55609),i=n(52175),s=n(39630),l=n(72120),c=n(5160),u=n(39403);const __=a.__,_x=a._x,p="#25D366",d="#465B64";function m(e){let{attributes:t,setAttributes:n,context:a}=e;const{countryCode:m,phoneNumber:h,firstMessage:f,openInNewTab:g,backgroundColor:b}=t,[v,k]=(0,r.useState)(!0),y=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BaseControl,{label:__("Phone Number","jetpack"),help:__("Enter the phone number you use for WhatsApp and would like to be contacted on.","jetpack"),className:"jetpack-whatsapp-button__phonenumber"},(0,r.createElement)(o.SelectControl,{label:__("Country code","jetpack"),value:m,onChange:e=>n({countryCode:e}),options:l.n,hideLabelFromVision:!0}),(0,r.createElement)(o.TextControl,{placeholder:__("Your phone number…","jetpack"),onChange:e=>{n({phoneNumber:e}),0===e.length&&k(!0),e.length>2&&k((e=>{const t=RegExp(/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,"g");return!(void 0===e||e.length<1)&&t.test(m.replace(/\D/g,"")+e)})(e))},value:h}),!v&&(0,r.createElement)(u.Z,{isError:!0,className:"jetpack-whatsapp-error"},__("Please enter a valid phone number.","jetpack"))),"inspector"===a&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.TextareaControl,{label:__("Default First Message","jetpack"),help:__("The default first message that will be sent by visitors when using this button.","jetpack"),value:f,onChange:e=>n({firstMessage:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Open in new tab","jetpack"),checked:g,onChange:e=>n({openInNewTab:e}),help:__("When the button is tapped, should a new tab be opened if the visitor does not have WhatsApp installed?","jetpack")})));return"toolbar"===a?(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.Dropdown,{position:"bottom right",className:"jetpack-whatsapp-button-settings-selector",contentClassName:"jetpack-whatsapp-button__popover",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return((e,t)=>(0,r.createElement)(o.Button,{className:"components-toolbar__control jetpack-contact-form__toggle",label:__("WhatsApp Button Settings","jetpack"),onClick:t,onKeyDown:n=>{e||n.keyCode!==s.DOWN||(n.preventDefault(),n.stopPropagation(),t())},icon:(0,c.Z)((0,r.createElement)(o.Path,{d:"M10.82 12.49c.02-.16.04-.32.04-.49 0-.17-.02-.33-.04-.49l1.08-.82c.1-.07.12-.21.06-.32l-1.03-1.73c-.06-.11-.2-.15-.31-.11l-1.28.5c-.27-.2-.56-.36-.87-.49l-.2-1.33c0-.12-.11-.21-.24-.21H5.98c-.13 0-.24.09-.26.21l-.2 1.32c-.31.12-.6.3-.87.49l-1.28-.5c-.12-.05-.25 0-.31.11l-1.03 1.73c-.06.12-.03.25.07.33l1.08.82c-.02.16-.03.33-.03.49 0 .17.02.33.04.49l-1.09.83c-.1.07-.12.21-.06.32l1.03 1.73c.06.11.2.15.31.11l1.28-.5c.27.2.56.36.87.49l.2 1.32c.01.12.12.21.25.21h2.06c.13 0 .24-.09.25-.21l.2-1.32c.31-.12.6-.3.87-.49l1.28.5c.12.05.25 0 .31-.11l1.03-1.73c.06-.11.04-.24-.06-.32l-1.1-.83zM7 13.75c-.99 0-1.8-.78-1.8-1.75s.81-1.75 1.8-1.75 1.8.78 1.8 1.75S8 13.75 7 13.75zM18 1.01L8 1c-1.1 0-2 .9-2 2v3h2V5h10v14H8v-1H6v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"}))}))(t,n)},renderContent:y})):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("WhatsApp Button Settings","jetpack"),initialOpen:!0},y()),(0,r.createElement)(i.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!1,colorSettings:[{value:b,onChange:e=>(e=>{if(n({backgroundColor:e}),void 0===e||e===p||e===d)return n({colorClass:"dark"});n({colorClass:"light"})})(e),label:__("Background Color","jetpack"),disableCustomColors:!0,colors:[{name:_x("WhatsApp Green","background color name","jetpack"),slug:"whatsapp-green",color:p},{name:_x("WhatsApp Dark","background color name","jetpack"),slug:"whatsapp-dark",color:d},{name:_x("WhatsApp Light","background color name","jetpack"),slug:"whatsapp-light",color:"#F4F4F4"},{name:_x("White","background color name","jetpack"),slug:"whatsapp-white",color:"#FFFFFF"}]}]}))}},42005:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(54005),l=n(5738);t.Z={attributes:l.Z,supports:{html:!1,reusable:!1},save:function(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,colorClass:u,buttonText:p,backgroundColor:d,openInNewTab:m}=t,h=m?"_blank":"_self",f=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",g=o()(n,u?"is-color-"+u:void 0,p.length?void 0:"has-no-text");return(0,r.createElement)("div",{className:g},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+f;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:d},target:h,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:p})))}}},51510:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(89105),o=n.n(a),i=n(9818),s=n(52175),l=n(72120),c=n(1572);function u(e){let{attributes:t,setAttributes:n,className:a,clientId:u}=e;const{countryCode:p,buttonText:d,colorClass:m,backgroundColor:h}=t,{selectBlock:f}=(0,i.useDispatch)("core/block-editor"),g=(0,r.useCallback)((async()=>{n({countryCode:"1"});const e=await fetch("https://public-api.wordpress.com/geo/").then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json();l.n.forEach((e=>{e.code===t.country_short&&n({countryCode:e.value})}))}}),[n]);(0,r.useEffect)((()=>{void 0===p&&(g(),f(u))}),[u,p,g,f]);return(0,r.createElement)("div",{className:o()(a,m?"is-color-"+m:void 0)},(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(c.Z,{context:"toolbar",setAttributes:n,attributes:t})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(c.Z,{context:"inspector",setAttributes:n,attributes:t})),(0,r.createElement)(s.RichText,{placeholder:d.default,value:d,onChange:e=>n({buttonText:e}),withoutInteractiveFormatting:!0,allowedFormats:[],className:"whatsapp-block__button",tagName:"a",preserveWhiteSpace:!1,style:{backgroundColor:h,color:"dark"===m?"#fff":"#465B64"}}))}},54044:function(e,t,n){"use strict";var r=n(69307),a=n(55609),o=n(35338);t.Z=(0,r.createElement)(a.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1"},(0,r.createElement)(a.Path,{fill:(0,o.m)(),d:"M24,11.6909333 C24,18.1477333 18.7256,23.3818667 12.2181333,23.3818667 C10.1522667,23.3818667 8.21146667,22.8538667 6.52293333,21.9272 L0,24 L2.12666667,17.7274667 C1.05386667,15.9658667 0.436,13.8997333 0.436,11.6909333 C0.436,5.23413333 5.71093333,0 12.2181333,0 C18.7261333,0 24,5.23413333 24,11.6909333 Z M12.2181333,1.86186667 C6.75573333,1.86186667 2.31253333,6.2712 2.31253333,11.6909333 C2.31253333,13.8416 3.0136,15.8333333 4.19946667,17.4536 L2.96186667,21.104 L6.76853333,19.8941333 C8.33253333,20.9210667 10.2061333,21.52 12.2184,21.52 C17.68,21.52 22.124,17.1112 22.124,11.6914667 C22.124,6.27173333 17.6802667,1.86186667 12.2181333,1.86186667 Z M18.1677333,14.3834667 C18.0949333,14.2642667 17.9026667,14.1922667 17.6141333,14.0490667 C17.3250667,13.9058667 15.9048,13.2122667 15.6408,13.1170667 C15.376,13.0216 15.1829333,12.9736 14.9906667,13.2602667 C14.7984,13.5472 14.2448,14.1922667 14.076,14.3834667 C13.9074667,14.5752 13.7392,14.5992 13.4501333,14.4557333 C13.1616,14.3125333 12.2312,14.0096 11.128,13.0336 C10.2696,12.2741333 9.68986667,11.3365333 9.52133333,11.0493333 C9.35306667,10.7626667 9.50373333,10.6077333 9.648,10.4650667 C9.77813333,10.3365333 9.93706667,10.1304 10.0813333,9.9632 C10.2261333,9.79573333 10.2741333,9.67653333 10.3698667,9.48506667 C10.4666667,9.29386667 10.4184,9.12666667 10.3458667,8.98293333 C10.2738667,8.83973333 9.69573333,7.4296 9.4552,6.85573333 C9.21466667,6.2824 8.9744,6.37786667 8.8056,6.37786667 C8.63733333,6.37786667 8.44453333,6.35386667 8.252,6.35386667 C8.05946667,6.35386667 7.7464,6.4256 7.4816,6.71226667 C7.21706667,6.9992 6.4712,7.69253333 6.4712,9.1024 C6.4712,10.5125333 7.5056,11.8749333 7.6504,12.0658667 C7.79466667,12.2568 9.64773333,15.2445333 12.5837333,16.392 C15.52,17.5389333 15.52,17.1562667 16.0496,17.1082667 C16.5786667,17.0605333 17.7578667,16.4152 17.9994667,15.7464 C18.2394667,15.0765333 18.2394667,14.5029333 18.1677333,14.3834667 Z"}))},54005:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},pf:function(){return d},Xd:function(){return m}});var r=n(65736),a=n(35338),o=n(5738),i=n(51510),s=n(14895),l=n(42005),c=n(54044);const __=r.__,_x=r._x,u="whatsapp-button",p=__("WhatsApp Button","jetpack"),d="https://api.whatsapp.com/send?phone=",m=(__("Chat on WhatsApp","jetpack"),__("Hi, I got your WhatsApp information from your website.","jetpack"),{title:p,description:__("Let your visitors send you a message on WhatsApp with the tap of a button.","jetpack"),icon:{src:c.Z,foreground:(0,a.m)()},category:"grow",parent:["jetpack/send-a-message"],keywords:[_x("whatsapp","keyword","jetpack"),_x("messenger","keyword","jetpack"),_x("contact","keyword","jetpack"),_x("support","keyword","jetpack")],supports:{html:!1,reusable:!1,align:["left","center","right"]},attributes:o.Z,edit:i.Z,save:s.Z,example:{attributes:{countryCode:"1",phoneNumber:"555-123-4567"}},deprecated:[l.Z]})},14895:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(52175),s=n(54005);function l(e){let{attributes:t,className:n}=e;const{countryCode:a,phoneNumber:l,firstMessage:c,buttonText:u,backgroundColor:p,colorClass:d,openInNewTab:m}=t,h=a&&l?a.replace(/\D+/g,"")+l.replace(/\D+/g,""):"",f=o()(n,d?"is-color-"+d:void 0,u.length?void 0:"has-no-text"),g=m?"_blank":"_self";return(0,r.createElement)("div",{className:f},(0,r.createElement)("a",{className:"whatsapp-block__button",href:(()=>{let e=s.pf+h;return""!==c&&(e+="&text="+encodeURIComponent(c)),e})(),style:{backgroundColor:p,color:"dark"===d?"#fff":"#465B64"},target:g,rel:"noopener noreferrer"},(0,r.createElement)(i.RichText.Content,{value:u})))}},69022:function(e,t,n){"use strict";n.d(t,{u:function(){return c},X:function(){return u}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(14040),l=n(14465);const __=a.__,c="seo",u={render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("SEO Description","jetpack")},(0,r.createElement)(l.Z,null))),(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,id:"seo-title",title:(0,r.createElement)("span",{id:"seo-defaults",key:"seo-title-span"},__("SEO Description","jetpack"))},(0,r.createElement)(l.Z,null)))}},14465:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(9818);const __=i.__,_n=i._n;class u extends o.Component{constructor(){super(...arguments),a()(this,"onMessageChange",(e=>{this.props.updateSeoDescription(e.target.value)}))}render(){const{seoDescription:e}=this.props;return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)("textarea",{value:e,onChange:this.onMessageChange,placeholder:__("Write a description…","jetpack"),rows:4}),(0,o.createElement)("div",{className:"jetpack-seo-character-count"},(0,i.sprintf)(
37
  /* translators: Placeholder is a number of characters in a sentence. */
38
+ _n("%d character","%d characters",e.length,"jetpack"),e.length)))}}t.Z=(0,s.compose)([(0,c.withSelect)((e=>({seoDescription:(0,l.get)(e("core/editor").getEditedPostAttribute("meta"),["advanced_seo_description"],"")}))),(0,c.withDispatch)((e=>({updateSeoDescription(t){e("core/editor").editPost({meta:{advanced_seo_description:t}})}})))])(u)},62624:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(92819),i=n(55609),s=n(9818),l=n(35730),c=n(14040);const __=a.__,u="shortlinks",p={render:()=>(0,r.createElement)(m,null)};class d extends r.Component{render(){const{shortlink:e}=this.props;return e?(0,r.createElement)(c.Z,null,(0,r.createElement)(i.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel"},(0,r.createElement)(l.Z,{link:e}))):null}}const m=(0,s.withSelect)((e=>{const t=e("core/editor").getCurrentPost();return{shortlink:(0,o.get)(t,"jetpack_shortlink","")}}))(d)},61408:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},a7:function(){return a},Rh:function(){return o}});const r="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},39124:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(69307),a=n(55609),o=n(65736);const __=o.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(a.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(a.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},55882:function(e,t,n){"use strict";var r=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(r.RawHTML,null,`[simple-payment id="${n}"]`):null}}},25810:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(56038),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(39403),b=n(84970),v=n(49812),k=n(35405),y=n(61408);const __=p.__,_n=p._n;class E extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return y.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
39
  /* translators: Placeholder is a number of decimals in a number. */
40
  _n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?l.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(
41
  /* translators: placeholder is an email address. */
42
  __("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",y.Rh.map((e=>{const{symbol:t}=(0,u.X)(e);return{value:e,label:t===e?e:`${e} ${(0,c.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(f.InspectorControls,null,(0,o.createElement)(h.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,o.createElement)(h.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,o.createElement)(h.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))))))}componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r}=this.props,{productId:a}=e;!a&&t&&this.saveProduct();const o=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&r({...o&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a}=this.props;(0,c.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!n&&this.validateAttributes();const o=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(o||i)&&a({...o&&{postLinkUrl:r},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,c.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:u,multiple:p,price:d,title:m}=n;r({content:(0,c.get)(e,["content","raw"],a),currency:(0,c.get)(e,["meta","spay_currency"],o),email:(0,c.get)(e,["meta","spay_email"],i),featuredMediaId:(0,c.get)(e,["featured_media"],s),featuredMediaUrl:(0,c.get)(t,"url",l),featuredMediaTitle:(0,c.get)(t,"title",u),multiple:Boolean((0,c.get)(e,["meta","spay_multiple"],Boolean(p))),price:(0,c.get)(e,["meta","spay_price"],d||void 0),title:(0,c.get)(e,["title","raw"],m)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,m.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",y.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(
43
  /* translators: placeholder is an email address. */
44
+ __("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:r,instanceId:a,isSelected:i,setAttributes:l,simplePayment:u}=this.props,{content:p,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:E,multiple:w,price:_,productId:C,title:S}=r,j=C&&(0,c.isEmpty)(u);if(!i&&j)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(b.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&S&&!e&&!t&&!n)return(0,o.createElement)(b.Z,{"aria-busy":"false",content:p,featuredMediaUrl:y,featuredMediaTitle:E,formattedPrice:(0,k.w)(_,d),multiple:w,title:S});const x=j?h.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(v.Z,{featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:E,setAttributes:l}),(0,o.createElement)("div",null,(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-title-error`,className:s()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,o.createElement)(g.Z,{id:`${a}-title-error`,isError:!0},n),(0,o.createElement)(h.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:p}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(h.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-price-error`,className:s()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,o.createElement)(g.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(h.ToggleControl,{checked:Boolean(w),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:s()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:m}),(0,o.createElement)(g.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(g.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(h.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const w=(0,m.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{isSavingPost:a,getCurrentPost:o}=e("core/editor"),{productId:i,featuredMediaId:s}=t.attributes,l=i?(0,c.pick)(n("postType",y.LC,i),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,u=o();return{hasPublishAction:!!(0,c.get)(u,["_links","wp:action-publish"]),isSaving:!!a(),simplePayment:l,featuredMedia:s?r(s):null,postLinkUrl:u.link}}));t.Z=(0,d.compose)(w,d.withInstanceId)(E)},31680:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(62369),s=n(61408),l=n(35338),c=n(25810),u=n(3595);const __=a.__,_x=a._x,p=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),d=(0,i.Wp)()||(0,i.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",m={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:d},__("Support reference","jetpack"))),icon:{src:p,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),_x("simple","block search term","jetpack"),_x("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:s.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:c.Z,save:u.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};t.Z=m},3595:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(35405);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,a.w)(u,o))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},78158:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(89453),c=n(92819),u=n(56038),p=n(65736),d=n(94333),m=n(9818),h=n(55609),f=n(52175),g=n(6551),b=n(39403),v=n(84970),k=n(49812),y=n(35405),E=n(61408),w=n(39124);const __=p.__,_n=p._n;class _ extends o.Component{constructor(){super(...arguments),a()(this,"state",{fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1}),a()(this,"shouldInjectPaymentAttributes",!!this.props.attributes.productId),a()(this,"validateAttributes",(()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r})),a()(this,"validateCurrency",(()=>{const{currency:e}=this.props.attributes;return E.Rh.includes(e)})),a()(this,"validatePrice",(()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,u.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,y.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,p.sprintf)(
45
  /* translators: Placeholder is a number of decimals in a number. */
46
  _n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)})),a()(this,"validateEmail",(()=>{const{email:e}=this.props.attributes;return e?l.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,p.sprintf)(
47
  /* translators: Placeholder is an email address. */
48
  __("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)})),a()(this,"validateTitle",(()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)})),a()(this,"handleEmailChange",(e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})})),a()(this,"handleContentChange",(e=>{this.props.setAttributes({content:e})})),a()(this,"handlePriceChange",(e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})})),a()(this,"handleCurrencyChange",(e=>{this.props.setAttributes({currency:e})})),a()(this,"handleMultipleChange",(e=>{this.props.setAttributes({multiple:!!e})})),a()(this,"handleTitleChange",(e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})})),a()(this,"getCurrencyList",E.Rh.map((e=>{const{symbol:t}=(0,u.X)(e);return{value:e,label:t===e?e:`${e} ${(0,c.trimEnd)(t,".")}`}}))),a()(this,"renderSettings",(()=>(0,o.createElement)(f.InspectorControls,null,(0,o.createElement)(w.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}))))}componentDidMount(){var e,t;this.injectPaymentAttributes();const{attributes:n,hasPublishAction:r,postLinkUrl:a,setAttributes:o,isPostEditor:i}=this.props,{productId:s}=n;(!s&&r||!i)&&this.saveProduct();const l=a&&a!==this.props.attributes.postLinkUrl,c=!this.props.attributes.postLinkText;(l||c)&&o({...l&&{postLinkUrl:a},...c&&{postLinkText:__("Click here to purchase.","jetpack")}}),null===(e=window.wp)||void 0===e||null===(t=e.customize)||void 0===t||t.bind("change",(e=>{let t;const n=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(n){t=`${n[1]}-${parseInt(n[2],10)}`}else t=e.id;t===(0,g.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:a,isPostEditor:o}=this.props;(0,c.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&o||!this.validateAttributes()?e.isSelected&&!n&&this.validateAttributes():this.saveProduct();const i=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&a({...i&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,c.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:a,currency:o,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:u,multiple:p,price:d,title:m}=n;r({content:(0,c.get)(e,["content","raw"],a),currency:(0,c.get)(e,["meta","spay_currency"],o),email:(0,c.get)(e,["meta","spay_email"],i),featuredMediaId:(0,c.get)(e,["featured_media"],s),featuredMediaUrl:(0,c.get)(t,"url",l),featuredMediaTitle:(0,c.get)(t,"title",u),multiple:Boolean((0,c.get)(e,["meta","spay_multiple"],Boolean(p))),price:(0,c.get)(e,["meta","spay_price"],d||void 0),title:(0,c.get)(e,["title","raw"],m)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:a,multiple:o,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:a,meta:{spay_currency:n,spay_email:r,spay_multiple:o,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,m.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",E.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,p.sprintf)(
49
  /* translators: Placeholder is an email address. */
50
+ __("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:r,instanceId:a,isSelected:i,setAttributes:l,simplePayment:u}=this.props,{content:p,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:E,multiple:w,price:_,productId:C,title:S}=r,j=C&&(0,c.isEmpty)(u);if(!i&&j)return(0,o.createElement)("div",{className:"simple-payments__loading"},(0,o.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&S&&!e&&!t&&!n)return(0,o.createElement)(v.Z,{"aria-busy":"false",content:p,featuredMediaUrl:g,featuredMediaTitle:E,formattedPrice:(0,y.T4)(_,d),multiple:w,title:S});const x=j?h.Disabled:"div";return(0,o.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,o.createElement)(k.Z,{featuredMediaId:f,featuredMediaUrl:g,featuredMediaTitle:E,setAttributes:l}),(0,o.createElement)("div",null,(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-title-error`,className:s()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,o.createElement)(b.Z,{id:`${a}-title-error`,isError:!0},n),(0,o.createElement)(h.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:p}),(0,o.createElement)("div",{className:"simple-payments__price-container"},(0,o.createElement)(h.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-price-error`,className:s()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,y.T4)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,o.createElement)(b.Z,{id:`${a}-price-error`,isError:!0},t)),(0,o.createElement)("div",{className:"simple-payments__field-multiple"},(0,o.createElement)(h.ToggleControl,{checked:Boolean(w),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,o.createElement)(h.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:s()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:m}),(0,o.createElement)(b.Z,{id:`${a}-email-error`,isError:!0},e),(0,o.createElement)(b.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,o.createElement)(h.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const C=(0,m.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{getCurrentPost:a}=e("core/editor"),{__experimentalGetDirtyEntityRecords:o,isSavingEntityRecord:i}=e("core"),s=o,{productId:l,featuredMediaId:u}=t.attributes,p=l?(0,c.pick)(n("postType",E.LC,l),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,d=a();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,c.get)(d,["_links","wp:action-publish"]),isSaving:s().some((e=>i(e.kind,e.name,e.key))),simplePayment:p,featuredMedia:u?r(u):null,postLinkUrl:null==d?void 0:d.link,isPostEditor:Object.keys(a()).length>0}}));t.Z=(0,d.compose)(C,d.withInstanceId)(_)},49812:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(52175),i=n(92819),s=n(55609),l=n(89284);const __=a.__,c=e=>t=>e({featuredMediaId:(0,i.get)(t,"id",0),featuredMediaUrl:(0,i.get)(t,"url",null),featuredMediaTitle:(0,i.get)(t,"title",null)});t.Z=e=>{let{featuredMediaId:t,featuredMediaUrl:n,featuredMediaTitle:a,setAttributes:i}=e;return t?(0,r.createElement)("div",null,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:c(i),allowedTypes:["image"],value:t,render:e=>{let{open:t}=e;return(0,r.createElement)(l.Z,{label:__("Edit Image","jetpack"),onClick:t})}}))),(0,r.createElement)(s.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>i({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:n,alt:a})))):(0,r.createElement)(o.MediaPlaceholder,{icon:(0,r.createElement)(o.BlockIcon,{icon:"format-image"}),labels:{title:__("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:c(i)})}},28929:function(e,t,n){"use strict";n.d(t,{u2:function(){return h},Xd:function(){return b}});var r=n(69307),a=n(65736),o=n(55609),i=n(62369),s=n(61408),l=n(35338),c=n(78158),u=n(11488),p=n(55882),d=n(31680),m=n(60206);const __=a.__,_x=a._x,h="simple-payments",f=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),g=(0,i.Wp)()||(0,i.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",b={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(o.ExternalLink,{href:g},__("Support reference","jetpack"))),icon:{src:f,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"square",_x("payments","block search term","jetpack")],attributes:{currency:{type:"string",default:s.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:c.Z,save:u.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"jetpack@jetpack.com",featuredMediaUrl:m}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[p.Z,d.Z]}},84970:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(22323),i=n(23879);const __=a.__;t.Z=e=>{let{title:t="",content:n="",formattedPrice:a="",multiple:s=!1,featuredMediaUrl:l=null,featuredMediaTitle:c=null}=e;return(0,r.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},l&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,r.createElement)("img",{src:l,alt:c}))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},t&&(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,t)),n&&(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),a&&(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,a)),(0,r.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},s&&(0,r.createElement)("div",{className:"jetpack-simple-payments-items"},(0,r.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),(0,r.createElement)("div",{className:"jetpack-simple-payments-button"},(0,r.createElement)("img",{alt:__("Pay with PayPal","jetpack"),src:o,srcSet:`${i} 2x`}))))))}},11488:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(35405);function o(e){let{attributes:t}=e;const{content:n,currency:o,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,a.T4)(u,o))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},35405:function(e,t,n){"use strict";n.d(t,{N3:function(){return o},w:function(){return s},T4:function(){return l}});var r=n(56038),a=n(92819);n(61408);const o=e=>{const t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},i=function(){var e,t,n,r,a,o;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const s=null===(e=window)||void 0===e||null===(t=e.window)||void 0===t?void 0:t.navigator;return null!=s&&null!==(n=s.languages)&&void 0!==n&&n.length?s.languages[0]:null!==(r=null!==(a=null!==(o=null==s?void 0:s.userLanguage)&&void 0!==o?o:null==s?void 0:s.language)&&void 0!==a?a:null==s?void 0:s.browserLanguage)&&void 0!==r?r:i},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{precision:o,symbol:i}=(0,r.X)(t),s=e.toFixed(o);return n?`${s} ${(0,a.trimEnd)(i,".")}`:s},l=function(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1?arguments[1]:void 0,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return s(r,a,o);const l=null!==(e=null===(t=window)||void 0===t||null===(n=t.Jetpack_Editor_Initial_State)||void 0===n?void 0:n.siteLocale)&&void 0!==e?e:"en-US",c=[l,i(),"en-US"];let u,p={};for(u of(o&&(p={style:"currency",currency:a}),c))try{return Intl.NumberFormat(u,p).format(r)}catch{continue}return s(r,a,o)}},98568:function(e,t,n){"use strict";n.d(t,{G:function(){return c},J:function(){return u}});var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(92819),l=n(89284);const __=i.__,_x=i._x;function c(e){let{attributes:{autoplay:t,delay:n,effect:a,images:i,sizeSlug:l},imageSizeOptions:c,onChangeImageSize:u,setAttributes:p}=e;const d="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,m=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Autoplay","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{p({autoplay:e})}}),t&&(0,r.createElement)(o.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:n,onChange:e=>{p({delay:e})},min:1,max:5}),t&&d&&(0,r.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Effects","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Transition effect","jetpack"),value:a,onChange:e=>{p({effect:e})},options:m})),!(0,s.isEmpty)(i)&&!(0,s.isEmpty)(c)&&(0,r.createElement)(o.PanelBody,{title:__("Image Settings","jetpack")},(0,r.createElement)(o.SelectControl,{label:__("Image Size","jetpack"),value:l,options:c,onChange:e=>u(e)})))}function u(e){let{allowedMediaTypes:t,attributes:{images:n},onSelectImages:i}=e;return(0,r.createElement)(r.Fragment,null,!!n.length&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{onSelect:i,allowedTypes:t,multiple:!0,gallery:!0,value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(l.Z,{label:__("Edit Slideshow","jetpack"),onClick:t})}})))))}},36802:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(92819);async function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".swiper-container",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:(0,r.mapValues)(a,(e=>function(){e(this)}))},[{default:i}]=await Promise.all([Promise.all([n.e(263),n.e(390)]).then(n.t.bind(n,16402,23)),Promise.all([n.e(263),n.e(390)]).then(n.bind(n,21130))]);return new i(e,(0,r.merge)({},o,t))}},37128:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(94333),l=n(92819),c=n(11313),u=n(9818),p=n(52175),d=n(12238),m=n(55609),h=n(43118),f=n(98568),g=n(99813);const __=i.__,b=["image"],v=(e,t)=>{const n=(0,l.pick)(e,["alt","id","link","caption"]);return n.url=(0,l.get)(e,["sizes",t,"url"])||(0,l.get)(e,["media_details","sizes",t,"source_url"])||e.url,n};class k extends o.Component{constructor(){super(...arguments),a()(this,"onSelectImages",(e=>{const{sizeSlug:t}=this.props.attributes,n=e.map((e=>v(e,t)));this.setAttributes({images:n})})),a()(this,"onRemoveImage",(e=>()=>{const t=(0,l.filter)(this.props.attributes.images,((t,n)=>e!==n));this.setState({selectedImage:null}),this.setAttributes({images:t})})),a()(this,"addFiles",(e=>{const t=this.props.attributes.images||[],n=this.props.attributes.sizeSlug,{lockPostSaving:r,unlockPostSaving:a,noticeOperations:o}=this.props,i="slideshowBlockLock";r(i),(0,d.mediaUpload)({allowedTypes:b,filesList:e,onFileChange:e=>{const r=e.map((e=>v(e,n)));this.setAttributes({images:[...t,...r]}),r.every((e=>(0,c.isBlobURL)(e.url)))||a(i)},onError:o.createErrorNotice})})),a()(this,"uploadFromFiles",(e=>this.addFiles(e.target.files))),a()(this,"updateImagesSize",(e=>{const{images:t}=this.props.attributes,{resizedImages:n}=this.props,r=t.map((t=>{const r=n.find((e=>{let{id:n}=e;return parseInt(n,10)===parseInt(t.id,10)})),a=(0,l.get)(r,["sizes",e,"source_url"]);return{...t,...a&&{url:a}}}));this.setAttributes({images:r,sizeSlug:e})})),this.state={selectedImage:null}}componentDidMount(){const{ids:e,sizeSlug:t}=this.props.attributes;t||this.setAttributes({sizeSlug:e.length?"full":"large"})}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,l.map)(e,(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}render(){const{attributes:e,className:t,isSelected:n,noticeOperations:r,noticeUI:a}=this.props,{align:i,autoplay:s,delay:l,effect:c,images:u}=e,d=this.getImageSizeOptions(),v=(0,o.createElement)(o.Fragment,null,(0,o.createElement)(p.InspectorControls,null,(0,o.createElement)(f.G,{attributes:e,imageSizeOptions:d,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,o.createElement)(p.BlockControls,null,(0,o.createElement)(f.J,{allowedMediaTypes:b,attributes:e,onSelectImages:this.onSelectImages})));return 0===u.length?(0,o.createElement)(o.Fragment,null,v,(0,o.createElement)(p.MediaPlaceholder,{icon:h.qv,className:t,labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:b,multiple:!0,notices:a,onError:r.createErrorNotice})):(0,o.createElement)(o.Fragment,null,v,a,(0,o.createElement)(g.Z,{align:i,autoplay:s,className:t,delay:l,effect:c,images:u,onError:r.createErrorNotice}),(0,o.createElement)(m.DropZone,{onFilesDrop:this.addFiles}),n&&(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,o.createElement)(m.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}t.ZP=(0,s.compose)((0,u.withSelect)(((e,t)=>({imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce(((t,n)=>{const r=e("core").getMedia(n);return[...t,{id:n,sizes:(0,l.get)(r,["media_details","sizes"])}]}),[])}))),(0,u.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:n}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:n}})),m.withNotices)(k)},43118:function(e,t,n){"use strict";n.d(t,{qv:function(){return h},u2:function(){return g},Xd:function(){return b}});var r=n(69307),a=n(65736),o=n(55609),i=n(37128),s=n(26153),l=n(37287),c=n(35338),u=n(61365),p=n(65784),d=n(6425),m=n(85983);const __=a.__,_x=a._x,h=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)(o.Path,{d:"M21 8V19C21 20.1046 20.1057 21 19.0011 21C15.8975 21 9.87435 21 6 21",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Rect,{x:"3.75",y:"3.75",width:"13.5",height:"13.5",rx:"0.875",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),(0,r.createElement)(o.Path,{d:"M9 14L12 11L9 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})),f={align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:p},{alt:"",caption:"",id:23,url:d},{alt:"",caption:"",id:23,url:m}],effect:"slide"},g="slideshow",b={title:__("Slideshow","jetpack"),category:(0,u.Z)("media","layout"),keywords:[_x("image","block search term","jetpack"),_x("gallery","block search term","jetpack"),_x("slider","block search term","jetpack")],description:__("Add an interactive slideshow.","jetpack"),attributes:{align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}},supports:{align:["center","wide","full"],html:!1},icon:{src:h,foreground:(0,c.m)()},edit:i.ZP,save:s.Z,transforms:l.Z,example:{attributes:f}}},26153:function(e,t,n){"use strict";var r=n(69307),a=n(99813);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:o,effect:i,images:s},className:l}=e;return(0,r.createElement)(a.Z,{align:t,autoplay:n,className:l,delay:o,effect:i,images:s})}},99813:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(89105),s=n.n(i),l=n(54166),c=n(65736),u=n(11313),p=n(92819),d=n(52175),m=n(55609),h=n(36802),f=n(74609);const __=c.__;class g extends o.Component{constructor(e){var t;super(e),t=this,a()(this,"pendingRequestAnimationFrame",null),a()(this,"resizeObserver",null),a()(this,"initializeResizeObserver",(e=>{this.clearResizeObserver(),this.resizeObserver=new l.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,f.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)})),a()(this,"clearPendingRequestAnimationFrame",(()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)})),a()(this,"clearResizeObserver",(()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)})),a()(this,"prefersReducedMotion",(()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)),a()(this,"buildSwiper",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,h.Z)(t.slideshowRef.current,{autoplay:!(!t.props.autoplay||t.prefersReducedMotion())&&{delay:1e3*t.props.delay,disableOnInteraction:!1},effect:t.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:t.btnNextRef.current,prevEl:t.btnPrevRef.current},pagination:{clickable:!0,el:t.paginationRef.current,type:"bullets"}},{init:f.UA,imagesReady:f.$m,paginationRender:f.Wj,transitionEnd:f.HV})})),this.slideshowRef=(0,o.createRef)(),this.btnNextRef=(0,o.createRef)(),this.btnPrevRef=(0,o.createRef)(),this.paginationRef=(0,o.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:a,images:o,onError:i}=this.props;if(t===e.align&&(0,p.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){let t;t=this.swiperIndex?o.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}render(){var e,t;if(null===(e=this.props)||void 0===e||null===(t=e.images)||void 0===t||!t.length)return null;const{autoplay:n,className:r,delay:a,effect:i,images:l}=this.props;return(0,o.createElement)("div",{className:r,"data-autoplay":n||null,"data-delay":n?a:null,"data-effect":i},(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,o.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return(0,o.createElement)("li",{className:s()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,u.isBlobURL)(a)&&"is-transient"),key:r||a},(0,o.createElement)("figure",null,(0,o.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:a}),(0,u.isBlobURL)(a)&&(0,o.createElement)(m.Spinner,null),n&&(0,o.createElement)(d.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,o.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,o.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,o.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}}a()(g,"defaultProps",{effect:"slide"}),t.Z=g},74609:function(e,t,n){"use strict";n.d(t,{HV:function(){return l},UA:function(){return i},Wj:function(){return c},$m:function(){return s}});var r=n(81975),a=n(92819);const o="wp-block-jetpack-slideshow_autoplay-paused";function i(e){s(e),l(e);document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function s(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,1.7777777777777777),1),a="undefined"!=typeof window?.8*window.innerHeight:600,o=Math.min(e.width/r,a),i=`${Math.floor(o)}px`,s=`${Math.floor(o/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=i,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=s,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=s}function l(e){(0,a.forEach)(e.slides,((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],a=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(a.alt))}(e)}function c(e){(0,a.forEach)(e.pagination.bullets,(t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},37287:function(e,t,n){"use strict";var r=n(4981),a=n(92819);function o(e){return(0,a.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const i={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>o(e).length>0,transform:e=>{const t=o(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const n=o(t);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map((e=>{let{alt:t,caption:n,id:r,url:a}=e;return{alt:t,caption:n,id:r,url:a}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,r.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n}=e;return(0,r.createBlock)("core/gallery",{images:t,ids:n})}},{type:"block",blocks:["core/image"],transform:e=>{let{images:t}=e;return t.length>0?t.map((e=>{let{id:t,url:n,alt:a,caption:o}=e;return(0,r.createBlock)("core/image",{id:t,url:n,alt:a,caption:o})})):(0,r.createBlock)("core/image")}}]};t.Z=i},52605:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(3779),a=n.n(r),o=n(69307),i=n(65736),s=n(16548),l=n(87947),c=n(60125);const __=i.__,u=[{title:__("Google Search","jetpack"),icon:"google",name:"google",preview:s.Z},{title:__("Facebook","jetpack"),icon:"facebook",name:"facebook",preview:e=>(0,o.createElement)(l.Z,a()({type:"article"},e))},{title:__("Twitter","jetpack"),icon:"twitter",name:"twitter",preview:e=>(0,o.createElement)(c.Z,e)}]},27087:function(e,t,n){"use strict";n.d(t,{u2:function(){return u},Xd:function(){return p},w6:function(){return d}});var r=n(69307),a=n(65736),o=n(55609),i=n(72067),s=n(14040),l=n(81310),c=n(66258);const __=a.__,u="social-previews",p={render:()=>(0,r.createElement)(d,null)},d=function(e){let{showUpgradeNudge:t}=e;const[n,a]=(0,r.useState)(!1);return(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(c.Z,{showUpgradeNudge:t,onClose:()=>a(!1)}),(0,r.createElement)(s.Z,null,(0,r.createElement)(o.PanelBody,{title:__("Social Previews","jetpack")},(0,r.createElement)(l.Z,{openModal:()=>a(!0),showUpgradeNudge:t}))),(0,r.createElement)(i.PluginPrePublishPanel,{title:__("Social Previews","jetpack")},(0,r.createElement)(l.Z,{openModal:()=>a(!0),showUpgradeNudge:t})))}},66258:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(9818),s=n(60859),l=n(52605),c=n(36129),u=n(7739);const __=a.__;t.Z=(0,i.withSelect)(((e,t)=>{var n;if(t.showUpgradeNudge)return{};const{getMedia:r,getUser:a}=e("core"),{getCurrentPost:o,getEditedPostAttribute:i}=e("core/editor"),{getTweetTemplate:s,getTweetStorm:l,getShareMessage:c,isTweetStorm:p}=e("jetpack/publicize"),d=i("featured_media"),m=i("author"),h=m&&a(m),f={post:o(),title:i("title"),description:(null===(n=i("meta"))||void 0===n?void 0:n.advanced_seo_description)||i("excerpt")||i("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:i("link"),author:null==h?void 0:h.name,image:!!d&&(0,u.i)(r(d))};let g=[];return p()?g=l():g.push({...s(),text:c(),card:{...f,type:f.image?"summary_large_image":"summary"}}),{...f,tweets:g,isTweetStorm:p()}}))((function(e){let{onClose:t,showUpgradeNudge:n,image:a,title:i,description:u,url:p,author:d,isTweetStorm:m,tweets:h}=e;const f=l.z.map((e=>({...e,title:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.av,{serviceName:e.icon}),e.title)})));return(0,r.createElement)(o.Modal,{onRequestClose:t,title:__("Social Previews","jetpack"),className:"jetpack-social-previews__modal"},n?(0,r.createElement)(s.Z,null):(0,r.createElement)(o.TabPanel,{className:"jetpack-social-previews__modal-previews",tabs:f,initialTabName:m?"twitter":null,orientation:"vertical"},(e=>(0,r.createElement)("div",null,(0,r.createElement)(e.preview,{title:i,description:u,url:p,author:d,image:a,isTweetStorm:m,tweets:h})))))}))},81310:function(e,t,n){"use strict";var r=n(69307),a=n(65736),o=n(55609),i=n(52605),s=n(36129);const __=a.__;t.Z=function(e){let{openModal:t,showUpgradeNudge:n}=e;const a=n?__("Learn more","jetpack"):__("Preview","jetpack",0),l=n?__("Learn more about paid plans","jetpack"):__("Open Social Previews","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-social-previews__panel"},(0,r.createElement)("p",null,__("Preview what this will look like on social networks and Google search.","jetpack")),n&&(0,r.createElement)("p",null,__("Pro plan required.","jetpack")),(0,r.createElement)("div",{className:"jetpack-gutenberg-social-icons"},i.z.map((e=>(0,r.createElement)(s.av,{key:e.icon,serviceName:e.icon,className:"jetpack-social-previews__icon"})))),(0,r.createElement)(o.Button,{variant:"secondary",onClick:t,label:l},a))}},60859:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(69307),a=n(55609),o=n(65736),i=n(62369),s=n(97334),l=n(37447),c=n(23281),u=n(27087);const __=o.__;function p(){var e,t;const n=null===(e=(0,i.OZ)(u.u2))||void 0===e||null===(t=e.details)||void 0===t?void 0:t.required_plan,[o,p,d]=(0,c.Z)(n,(()=>{s.Z.tracks.recordEvent("jetpack_editor_block_upgrade_click",{plan:n,block:u.u2})})),m=d?__("Redirecting…","jetpack"):__("Upgrade","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-social-previews__modal-upgrade"},(0,r.createElement)("img",{className:"jetpack-social-previews__upgrade-illustration",src:l,width:"351",height:"264",alt:""}),(0,r.createElement)("div",{className:"jetpack-social-previews__upgrade-description"},(0,r.createElement)("h2",{className:"jetpack-social-previews__upgrade-heading"},__("Upgrade to a Pro plan to unlock the power of our SEO tools","jetpack")),(0,r.createElement)("ul",{className:"jetpack-social-previews__upgrade-feature-list"},(0,r.createElement)("li",null,__("Preview your site’s content as it will appear on Facebook, Twitter, and the WordPress.com Reader.","jetpack")),(0,r.createElement)("li",null,__("Control how page titles will appear on Google search results and social networks.","jetpack")),(0,r.createElement)("li",null,__("Customize your front page metadata to change how your site appears to search engines.","jetpack"))),(0,r.createElement)(a.Button,{href:o,variant:"primary",label:__("Purchase a Business plan to access social previews","jetpack"),onClick:p,target:"_top",isBusy:d},m)))}},7739:function(e,t,n){"use strict";function r(e){var t,n,r;return e?(null===(t=e.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||e.source_url:null}n.d(t,{i:function(){return r}})},712:function(e,t,n){"use strict";var r=n(69307),a=n(52175),o=n(55609),i=n(65736),s=n(89284);const __=i.__;t.Z=e=>{let{allowedMediaTypes:t,attributes:{mediaFiles:n},onSelectMedia:i}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.BlockControls,null,!!n.length&&(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{title:__("Edit Story","jetpack"),onSelect:i,allowedTypes:t,addToGallery:!0,multiple:"add",value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(s.Z,{label:__("Edit Story","jetpack"),onClick:t})}}))))))}},46115:function(e,t,n){"use strict";var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(65736),l=n(11313),c=n(9818),u=n(52175),p=n(55609),d=n(9275),m=n(712),h=n(29241);const __=s.__,f=["image","video"],g=e=>{var t,n,r;const a=(0,i.pick)(e,["alt","title","id","link","type","mime","caption","width","height"]);return a.url=(0,i.get)(e,["media_details","original","url"])||(0,i.get)(e,["media_details","videopress","original"])||(0,i.get)(e,["media_details","sizes","large","source_url"])||(0,i.get)(e,["sizes","large","url"])||e.url,a.type=e.media_type||e.type,a.mime=e.mime_type||e.mime,a.title=(null===(t=a.title)||void 0===t?void 0:t.rendered)||a.title,a.width=a.width||(null===(n=e.media_details)||void 0===n?void 0:n.width),a.height=a.height||(null===(r=e.media_details)||void 0===r?void 0:r.height),a};t.Z=(0,p.withNotices)((function(e){let{attributes:t,className:n,isSelected:a,noticeOperations:i,noticeUI:s,setAttributes:p}=e;const{mediaFiles:b}=t,{lockPostSaving:v,unlockPostSaving:k}=(0,c.useDispatch)("core/editor"),y="storyBlockLock",E=e=>{const t=e.map((e=>{if(!isNaN(e)){return b.find((t=>t.id===e))||{id:e}}return e})).map(g),n=t.filter((e=>!(0,l.isBlobURL)(e.url)));t.length!==n.length?v(y):k(y),p({mediaFiles:t})},w=(0,r.createElement)(m.Z,{allowedMediaTypes:f,attributes:t,onSelectMedia:E}),_=!!b.length,C=(0,r.createElement)(u.MediaPlaceholder,{addToGallery:_,isAppender:_,className:n,disableMediaButtons:_&&!a,icon:!_&&d.qv,labels:{title:!_&&__("Story","jetpack"),instructions:!_&&__("Drag images and videos, upload new ones, or select files from your library.","jetpack")},onSelect:E,accept:f.map((e=>e+"/*")).join(","),allowedTypes:f,multiple:"add",value:b,notices:_?void 0:s,onError:i.createErrorNotice});return _?(0,r.createElement)(r.Fragment,null,w,s,(0,r.createElement)("div",{className:o()("wp-block-jetpack-story","wp-story",n)},(0,r.createElement)(h.Z,{slides:b,disabled:!a,showSlideCount:a,shadowDOM:{enabled:!1},playInFullscreen:!1,tapToPlayPause:!1,playOnNextSlide:!1})),a&&C):(0,r.createElement)(r.Fragment,null,w,C)}))},27526:function(e,t,n){"use strict";var r=n(69307),a=n(55609);const o=(0,n(5160).Z)((0,r.createElement)(a.G,null,(0,r.createElement)(a.Path,{d:"M17 5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2h9z"}),(0,r.createElement)(a.Path,{d:"M13 4H5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"}),(0,r.createElement)(a.Path,{d:"M7 16h8a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"})));t.Z=o},9275:function(e,t,n){"use strict";n.d(t,{qv:function(){return i.Z},u2:function(){return p},Xd:function(){return d}});var r=n(65736),a=n(46115),o=n(41803),i=n(27526),s=n(61365),l=n(35338),c=n(15915);const __=r.__,_x=r._x,u={mediaFiles:[{alt:"",caption:"",mime:"image/jpg",type:"image",id:22,url:c}]},p="story",d={title:__("Story","jetpack"),category:(0,s.Z)("media","layout"),keywords:[_x("story","block search term","jetpack"),_x("image","block search term","jetpack"),_x("video","block search term","jetpack"),_x("gallery","block search term","jetpack")],description:__("Add an interactive story.","jetpack"),attributes:{settings:{type:"object"},mediaFiles:{type:"array",default:[]}},supports:{html:!1},icon:{src:i.Z,foreground:(0,l.m)()},edit:a.Z,save:o.Z,example:{attributes:u}}},10395:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(55609);function o(e){let{currentMedia:t}=e;const n=t&&"image"===t.type?t.url:null;return(0,r.createElement)("div",{className:"wp-story-background"},(0,r.createElement)("div",{className:"wp-story-background-image",style:{backgroundImage:n?`url("${n}")`:"none"}}),(0,r.createElement)("div",{className:"wp-story-background-blur"}),(0,r.createElement)(a.SVG,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0"},(0,r.createElement)("filter",{id:"gaussian-blur-18"},(0,r.createElement)("feGaussianBlur",{stdDeviation:"18"}))))}},50111:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(69307),a=n(89105),o=n.n(a),i=n(65736),s=n(55609);const __=i.__;function l(e){let{isEllipsis:t,disabled:n,index:a,isSelected:l,progress:c,onClick:u}=e;const p=n||t;let d=null;return t||(d=l?(0,i.sprintf)(
51
  /* translators: %d: Slide number. */
52
  __("Slide %d, currently selected","jetpack"),a+1):(0,i.sprintf)(
53
  /* translators: %d: Slide number. */
99
  /* translators: placeholder is the product name of the plan. */
100
  __("To re-share a post, you need to upgrade to the %s plan","jetpack"),_)),(0,r.createElement)(l.Button,{href:v?null:g,onClick:b,target:"_top",icon:c.Z,className:o()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!g}),isBusy:v},v?__("Redirecting…","jetpack"):x)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,S),(0,r.createElement)("br",null),(0,s.sprintf)(
101
  /* translators: placeholder is the product name of the plan. */
102
+ __("This feature is for sites with a %s plan.","jetpack"),_),(0,r.createElement)("br",null),(0,r.createElement)(l.ExternalLink,{href:j},__("More information.","jetpack")))}},64519:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(9818),a=n(12238),o=n(62369);const i="republicize";function s(){var e,t;const{togglePublicizeFeature:n}=(0,r.useDispatch)("jetpack/publicize"),{available:s}=(0,o.OZ)(i),l=(0,r.useSelect)((e=>e(a.store).isCurrentPostPublished()),[]),c=(0,r.useSelect)((e=>e("jetpack/publicize").getFeatureEnableState()),[]),u=!(null===(e=window)||void 0===e||null===(t=e.Jetpack_Editor_Initial_State.jetpack)||void 0===t||!t.republicize_enabled),p=(0,o.X1)(i);return{isPublicizeEnabledMeta:c,isRePublicizeFeatureEnabled:u,isPublicizeEnabled:l&&!(p&&u)||c,togglePublicizeFeature:n,isPublicizeDisabledBySitePlan:u&&l&&p,isRePublicizeFeatureAvailable:s,isRePublicizeUpgradableViaUpsell:p,hideRePublicizeFeature:l&&!s&&!p&&u}}},28056:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(94333),a=n(12238),o=n(9818),i=n(69307);function s(e,t){const n=(0,o.useSelect)((e=>e(a.store).isPublishingPost()),[]),s=(0,r.usePrevious)(n);(0,i.useEffect)((()=>{s&&!n&&e()}),[n,s,e,t])}},6082:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(86989),a=n.n(r),o=n(9818),i=n(12238),s=n(69307),l=n(65736),c=n(49806),u=n(23438);const __=l.__;function p(e){var t;const n=null==e?void 0:e.code,r=null==e||null===(t=e.errors)||void 0===t?void 0:t.length;if(!n&&!r)return!1;let a="";return n&&(a=__("Unable to share the Post","jetpack")),r&&(a=__("Unable to share the Post","jetpack")),{message:a,result:e}}function d(e){const{message:t}=(0,c.Z)(),{skippedConnections:n}=(0,u.Z)(),r=(0,o.useSelect)((e=>e(i.store).getCurrentPostId()),[]);e=e||r;const[l,d]=(0,s.useState)({data:[],error:{}}),m=(0,s.useCallback)((function(){const r={isFetching:!1,isError:!1,isSuccess:!1,data:[],error:{},postId:e};if(!l.isFetching)return d({...r,isFetching:!0}),a()({path:`/wpcom/v2/posts/${e}/publicize`,method:"POST",data:{message:t,skipped_connections:n}}).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=p(e);if(t)return d((e=>({...e,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:t})));d((t=>({...t,isFetching:!1,isSuccess:!0,isError:!1,data:null==e?void 0:e.results,error:{}})))})).catch((e=>{d((t=>({...t,isFetching:!1,isSuccess:!1,isError:!0,data:[],error:p(e)})))})),function(){d(r)}}),[e,t,n,l.isFetching]);return{...l,doPublicize:m}}},23438:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9818);function a(){const{refreshConnectionTestResults:e,toggleConnectionById:t}=(0,r.useDispatch)("jetpack/publicize"),n=(0,r.useSelect)((e=>e("jetpack/publicize").getConnections()),[]),a=n.filter((e=>!e.enabled)).map((e=>e.id));return{connections:n,hasConnections:n.length>0,hasEnabledConnections:n&&n.some((e=>e.enabled)),skippedConnections:a,toggleById:t,refresh:e}}},49806:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9818),a=n(12238);function o(){const{editPost:e}=(0,r.useDispatch)(a.store),{message:t,maxLength:n}=(0,r.useSelect)((e=>({message:e("jetpack/publicize").getShareMessage(),maxLength:e("jetpack/publicize").getShareMessageMaxLength()})),[]);return{message:t,maxLength:n,updateMessage:function(t){e({meta:{jetpack_publicize_message:t}})}}}},31172:function(e,t,n){"use strict";n.d(t,{u:function(){return u},X:function(){return p}});var r=n(69307),a=n(65736),o=n(72067),i=n(12238),s=(n(96434),n(94642)),l=n(14040),c=n(47657);const __=a.__,u="publicize",p={render:()=>(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(s.ZP,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(c.Z,null)),(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack"))},(0,r.createElement)(c.Z,{prePublish:!0})))}},70490:function(e,t,n){"use strict";n.r(t),n.d(t,{refreshConnectionTestResults:function(){return a},toggleConnectionById:function(){return o},togglePublicizeFeature:function(){return i},fetchFromAPI:function(){return s},refreshTweets:function(){return l},setTweets:function(){return c},getTwitterCards:function(){return u},setTwitterCards:function(){return p}});var r=n(9818);function a(){return{type:"REFRESH_CONNECTION_TEST_RESULTS"}}function o(e){return{type:"TOGGLE_CONNECTION_BY_ID",connectionId:e}}function i(){return{type:"TOGGLE_PUBLICIZE_FEATURE"}}function s(e){return{type:"FETCH_FROM_API",path:e}}function l(){return{type:"REFRESH_TWEETS"}}function c(e){return{type:"SET_TWEETS",tweets:e}}function u(e){const{twitterCardIsCached:t}=(0,r.select)("jetpack/publicize");return{type:"GET_TWITTER_CARDS",urls:e.filter((e=>!t(e)))}}function p(e){return{type:"SET_TWITTER_CARDS",cards:e}}},60770:function(e,t,n){"use strict";var r=n(86989),a=n.n(r);t.Z={FETCH_FROM_API:e=>{let{path:t}=e;return a()({path:t})}}},10061:function(e,t,n){"use strict";var r=n(92819),a=n(86989),o=n.n(a),i=n(4981),s=n(9818),l=n(12238),c=n(94642);const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{getSupportedBlockType:t}=(0,s.select)("jetpack/publicize");return(0,r.flatMap)(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(e.name)||e.name.startsWith("core-embed/")?e:c.H8.includes(e.name)?u(e.innerBlocks):[]}))};const p=(0,r.throttle)((async function(){const e=(0,s.select)("core/editor").getBlocks(),t=u(e);try{const e=await o()({path:"/wpcom/v2/tweetstorm/parse",data:{blocks:t.map((e=>({attributes:e.attributes,block:(0,i.serialize)(e),clientId:e.clientId})))},method:"POST"}),n=(0,r.flatMap)(e,(e=>e.urls));return(0,s.dispatch)("jetpack/publicize").getTwitterCards(n),(0,s.dispatch)("jetpack/publicize").setTweets(e)}catch(e){}}),2e3,{leading:!0,trailing:!0});t.ZP={REFRESH_CONNECTION_TEST_RESULTS:async function(){try{const e=await o()({path:"/wpcom/v2/publicize/connection-test-results"}),t=(0,s.select)("jetpack/publicize").getConnections(),n=e,r=[],a={done:!1,enabled:!0,toggleable:!0};for(const e of n){const n=t.find((t=>t.id===e.id)),{done:o,enabled:i,toggleable:s}=null!=n?n:a,l={display_name:e.display_name,service_name:e.service_name,id:e.id,profile_picture:e.profile_picture,done:o,enabled:i,toggleable:s};r.push(l)}return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:r})}catch(e){}},TOGGLE_CONNECTION_BY_ID:async function(e){let{connectionId:t}=e;const n=(0,s.select)("jetpack/publicize").getConnections().map((e=>({...e,enabled:e.id===t?!e.enabled:e.enabled})));return(0,s.dispatch)(l.store).editPost({jetpack_publicize_connections:n})},TOGGLE_PUBLICIZE_FEATURE:async function(){const e=(0,s.select)("jetpack/publicize").getFeatureEnableState();return(0,s.dispatch)(l.store).editPost({meta:{jetpack_publicize_feature_enabled:!e}})},REFRESH_TWEETS:p,GET_TWITTER_CARDS:async function(e){if(0===e.urls.length)return(0,s.dispatch)("jetpack/publicize").setTwitterCards([]);try{const t=await o()({path:"/wpcom/v2/tweetstorm/generate-cards",data:{urls:e.urls},method:"POST"});return(0,s.dispatch)("jetpack/publicize").setTwitterCards(t)}catch(e){}}}},96434:function(e,t,n){"use strict";var r=n(9818),a=n(70490),o=n(6965),i=n(61734),s=n(60770),l=n(37815);const c=(0,r.registerStore)("jetpack/publicize",{actions:a,controls:s.Z,reducer:l.Z,selectors:o});(0,i.Z)(c)},61734:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2601),a=n.n(r),o=n(92819),i=n(10061);function s(e){const t=[a()(i.ZP)];let n=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r=[];const s={getState:e.getState,dispatch:function(){return n(...arguments)}};return r=t.map((e=>e(s))),n=(0,o.flowRight)(...r)(e.dispatch),e.dispatch=n,e}},37815:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r={tweets:[],twitterCards:[]};function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_CONNECTION_TEST_RESULTS":case"TOGGLE_CONNECTION_BY_ID":case"TOGGLE_PUBLICIZE_FEATURE":return e;case"SET_TWEETS":return{...e,tweets:t.tweets};case"GET_TWITTER_CARDS":{const n={};return t.urls.forEach((e=>n[e]={error:"loading"})),{...e,twitterCards:{...e.twitterCards,...n}}}case"SET_TWITTER_CARDS":return{...e,twitterCards:{...e.twitterCards,...t.cards}}}return e}},6965:function(e,t,n){"use strict";n.r(t),n.d(t,{getFailedConnections:function(){return u},getMustReauthConnections:function(){return p},getTweetTemplate:function(){return d},getTweetStorm:function(){return m},getFirstTweet:function(){return h},getLastTweet:function(){return f},getSupportedBlockType:function(){return g},getTweetsForBlock:function(){return b},getTwitterCardForURLs:function(){return v},twitterCardIsCached:function(){return k},getShareMessage:function(){return y},getShareMessageMaxLength:function(){return E},isTweetStorm:function(){return w},getBoundariesForBlock:function(){return _},getBoundaryStyleSelectors:function(){return S},checkForTagsInContentAttributes:function(){return j},getPopoverWarnings:function(){return x},isSelectedTweetBoundary:function(){return P},contentAttributesChanged:function(){return T},getConnections:function(){return A},getFeatureEnableState:function(){return N}});var r=n(92819),a=n(19551),o=n(9818),i=n(65736),s=n(12238),l=n(94642);const __=i.__,c="\n\n"+__("A thread ⬇️","jetpack");function u(){return A().filter((e=>!1===e.test_success))}function p(){return A().filter((e=>"must_reauth"===e.test_success)).map((e=>e.service_name))}function d(e){const t=e.connections||A(),n=null==t?void 0:t.find((e=>"twitter"===e.service_name));return{date:Date.now(),name:(null==n?void 0:n.profile_display_name)||__("Account Name","jetpack"),profileImage:(null==n?void 0:n.profile_picture)||"https://abs.twimg.com/sticky/default_profile_images/default_profile_bigger.png",screenName:(null==n?void 0:n.display_name)||""}}function m(e){const t=d(e),n=[h(e),...e.tweets.slice(0,100).map((n=>({...t,text:n.text,media:n.media,tweet:n.tweet,urls:n.urls,card:v(e,n.urls)})))];return n.length>1&&n.push(f(e)),n}function h(e){var t,n,r,a;if(!(0,o.select)("core"))return;const i=d(e),{getMedia:s}=(0,o.select)("core"),{getEditedPostAttribute:l}=(0,o.select)("core/editor"),c=l("featured_media"),u=l("link"),p=c&&s(c),m=(null==p||null===(t=p.media_details)||void 0===t||null===(n=t.sizes)||void 0===n||null===(r=n.large)||void 0===r?void 0:r.source_url)||(null==p?void 0:p.source_url);return{...i,text:y()+` ${u}`,urls:[u],card:{title:l("title"),description:(null===(a=l("meta"))||void 0===a?void 0:a.advanced_seo_description)||l("excerpt")||l("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack"),url:u,image:m,type:m?"summary_large_image":"summary"}}}function f(e){if(!(0,o.select)("core/editor"))return;const{getEditedPostAttribute:t}=(0,o.select)("core/editor"),n=t("link"),r=e.tweets.length>100?__("The rest of this thread can be read here:","jetpack"):__("This thread can be read here:","jetpack");return{...h(e),text:`${r} ${n}`}}function g(e,t){if(l.nE[t])return l.nE[t]}const b=(0,a.Z)(((e,t)=>e.tweets.filter((e=>!!e.blocks.find((e=>e.clientId===t))))),(e=>[e.tweets]));function v(e,t){if(t)return t.reduce(((t,n)=>t||(e.twitterCards[n]&&!e.twitterCards[n].error?{url:n,...e.twitterCards[n]}:void 0)),void 0)}function k(e,t){return!!e.twitterCards[t]}function y(){const{getEditedPostAttribute:e}=(0,o.select)("core/editor"),t=e("meta"),n=e("title"),a=(0,r.get)(t,["jetpack_publicize_message"],"");return a?a.substr(0,E()):w()&&n?n.substr(0,E())+c:""}function E(){return w()?255-c.length:255}function w(){var e;return!(null===(e=(0,o.select)("core/editor").getEditedPostAttribute("meta"))||void 0===e||!e.jetpack_is_tweetstorm)}const _=(0,a.Z)(((e,t)=>{if(!w())return[];const n=b(e,t);return n&&0!==n.length?n.filter((e=>e.boundary)).map((e=>e.boundary)):[]}),(e=>[e.tweets]));function C(e,t){if(`block-${t}`===e.id)return`#block-${t}`;const n=e.parentNode,r=Array.prototype.indexOf.call(n.children,e);return C(n,t)+` > :nth-child( ${r+1} )`}const S=(0,a.Z)(((e,t)=>{const n=_(e,t),r=document.getElementById(`block-${t}`);return n.filter((e=>"end-of-line"===e.type)).map((e=>{if(!r)return!1;const n=r.getElementsByTagName("li").item(e.line);return!!n&&C(n,t)})).filter((e=>!!e))}),(e=>[e.tweets]));function j(e,t,n){var r;if(0===n.length)return!1;if(null===(r=g(0,t.name))||void 0===r||!r.contentAttributes)return!1;const a=new RegExp(`<(${n.join("|")})( |>|/>)`,"gi");return g(0,t.name).contentAttributes.reduce(((e,n)=>!!e||a.test(t.attributes[n])),!1)}const x=(0,a.Z)(((e,t)=>{const{isTyping:n,isDraggingBlocks:r,isMultiSelecting:a,hasMultiSelection:i,isCaretWithinFormattedText:s}=(0,o.select)("core/block-editor");if(!w())return[];if(n()||r()||a()||i()||s())return[];const c=[];return g(0,t.name)||l.H8[t.name]?("core/gallery"===t.name&&t.attributes.images.length>4&&c.push(__("Twitter displays the first four images.","jetpack")),j(0,t,["strong","bold","em","i","sup","sub","span","s"])&&c.push(__("Twitter removes all text formatting.","jetpack")),j(0,t,["a"])&&c.push(__("Links will be posted seperately.","jetpack"))):c.push(__("This block is not exportable to Twitter","jetpack")),c}),(e=>[e.tweets]));function P(e,t){const{isBlockSelected:n}=(0,o.select)("core/block-editor");if(!w())return!1;const r=g(0,t.name),a=b(e,t.clientId);if(!a||0===a.length)return!1;const i=a[a.length-1];return n(t.clientId)&&!r||i.blocks[i.blocks.length-1].clientId===t.clientId&&a.some((e=>e.blocks.some((e=>n(e.clientId)))))}function T(e,t,n){const a=g(0,n.name);if(!a)return!1;const o=a.contentAttributes;return!(0,r.isEqual)(o.map((e=>({attribute:e,content:t.attributes[e]}))),o.map((e=>({attribute:e,content:n.attributes[e]}))))}function A(){return(0,o.select)(s.store).getEditedPostAttribute("jetpack_publicize_connections")||[]}function N(){const{getEditedPostAttribute:e}=(0,o.select)(s.store),t=e("meta");return(0,r.get)(t,["jetpack_publicize_feature_enabled"],!0)}},21966:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(69307),a=n(55609),o=n(65736),i=n(12238),s=n(9818),l=n(42103);const __=o.__;function c(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(a.CheckboxControl,{label:__("Show sharing buttons.","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}function u(){const e=(0,s.useSelect)((e=>e(i.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,s.useDispatch)(i.store);return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(l.Z,null,(0,r.createElement)(c,{checked:e,onChange:t})))}},45685:function(e,t,n){"use strict";n.d(t,{u:function(){return a},X:function(){return o}});var r=n(21966);const a="sharing",o={render:r.Z}},88608:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void 0:getComputedStyle(e).color}}))},90778:function(e,t,n){"use strict";var r=n(69307),a=n(4981),o=n(65736),i=n(62369),s=n(36129);const __=o.__;(0,i.Wp)()||(0,i.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},18914:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}function o(e){try{var t;return!(null==e||null===(t=e.parent)||void 0===t||!t.location.href)}catch(e){return!1}}function i(e,t){var n;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=[];if(!t||!e&&!e.length||!a(t))return s;const{currentDoc:l,currentWindow:c}=r(t);if(!o(c))return s;const u=null==c||null===(n=c.parent)||void 0===n?void 0:n.document;return l&&u?(s=e.filter((e=>{const t=u.querySelector(e),n=!!l.querySelector(e);return!(!t||n)&&(l.head.appendChild(t.cloneNode()),i&&t.remove(),!0)})),s):void 0}function s(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;const t=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))return s();const l=o.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${n}-${e.version}.${r}`,l.onload=s,i.appendChild(l)}}))}function l(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{bL:function(){return r},DT:function(){return i},Pp:function(){return s},Dz:function(){return l}})},35338:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(62369);const a=n(27655).O["Jetpack Green 40"];function o(){return(0,r.Ug)()||(0,r.Wp)()?null:a}},18187:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),a=n.n(r),o=n(92819);function i(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,o.find)(e,{name:t});if(r)return r}return(0,o.find)(e,"isDefault")}(e,t);return n?n.name:null}},35730:function(e,t,n){"use strict";var r=n(64140),a=n.n(r),o=n(69307),i=n(65736),s=n(55609);const __=i.__,_x=i._x;class l extends o.Component{constructor(){super(...arguments),a()(this,"state",{hasCopied:!1}),a()(this,"onCopy",(()=>this.setState({hasCopied:!0}))),a()(this,"onFinishCopy",(()=>this.setState({hasCopied:!1}))),a()(this,"onFocus",(e=>e.target.select()))}render(){const{link:e}=this.props,{hasCopied:t}=this.state;return e?(0,o.createElement)("div",{className:"jetpack-clipboard-input"},(0,o.createElement)(s.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,o.createElement)(s.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=l},76750:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});const r=/^#?[A-Fa-f0-9]{6}$/;function a(e){return r.test(e)}},27196:function(e,t,n){"use strict";var r=n(69307),a=n(92819),o=n(65736),i=n(25158),s=n(57979);const __=o.__,l="undefined"!=typeof _wpmejsSettings?_wpmejsSettings:{};function c(e,t,n){const r=document.createElement("div");r.className=e;const a=document.createElement("button");return a.innerText=t,a.addEventListener("click",n),a.setAttribute("aria-label",t),a.setAttribute("title",t),r.appendChild(a),r}t.Z=function(e){let{trackSource:t,onPlay:n,onPause:o,onError:u,onTimeChange:p,onSkipForward:d,onJumpBack:m,currentTime:h,playStatus:f=s._5,onMetadataLoaded:g,loadWhenReady:b=!1,preload:v="metadata"}=e;const k=(0,r.useRef)(),y=()=>{k.current.play().catch((()=>{}))},E=()=>{k.current.pause(),(0,i.speak)(__("Paused","jetpack"),"assertive")};return(0,r.useEffect)((()=>{MediaElementPlayer.prototype._setResponsiveMode||(MediaElementPlayer.prototype._setResponsiveMode=MediaElementPlayer.prototype.setResponsiveMode,MediaElementPlayer.prototype.setResponsiveMode=function(){const e=this;e.getElement(e.container).parentNode&&e._setResponsiveMode()})}),[]),(0,r.useEffect)((()=>{const e=k.current;e.preload=v;const t=new MediaElementPlayer(e,{...l,success:()=>b&&(null==e?void 0:e.load())});if(m||d){const e=`${t.options.classPrefix}button ${t.options.classPrefix}jump-button`;if(m){const n=`${e} ${t.options.classPrefix}jump-backward-button`;t.addControlElement(c(n,__("Jump Back","jetpack"),m),"jumpBackwardButton")}if(d){const n=`${e} ${t.options.classPrefix}skip-forward-button`;t.addControlElement(c(n,__("Skip Forward","jetpack"),d),"skipForwardButton")}}return n&&e.addEventListener("play",n),o&&e.addEventListener("pause",o),u&&e.addEventListener("error",u),g&&e.addEventListener("loadedmetadata",g),()=>{t.remove(),n&&e.removeEventListener("play",n),o&&e.removeEventListener("pause",o),u&&e.removeEventListener("error",u),g&&e.removeEventListener("loadedmetadata",g)}}),[n,o,u,m,d,g,b,v]),(0,r.useEffect)((()=>{var e;const[t,n]=!1===(null===(e=k.current)||void 0===e?void 0:e.paused)?[s.Wp,E]:[s._5,y],r=(0,a.debounce)(n,100);return s.Vy!==f&&t!==f&&r(),()=>{r.cancel()}}),[k,f,t]),(0,r.useEffect)((()=>{if(!p)return;const e=k.current,t=(0,a.throttle)((e=>p(e)),1e3,{leading:!0,trailing:!1}),n=e=>t(e.target.currentTime);return p&&(null==e||e.addEventListener("timeupdate",n)),()=>{t.cancel(),null==e||e.removeEventListener("timeupdate",n)}}),[k,p]),(0,r.useEffect)((()=>{const e=k.current;h&&e&&Math.abs(Math.floor(h-e.currentTime))>1&&(e.currentTime=h)}),[k,h]),(0,r.createElement)("div",{className:"jetpack-audio-player"},(0,r.createElement)("audio",{src:t,ref:k}))}},28743:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(52175),l=n(94726);function c(e){let{blockName:t,buttonLabel:n,href:a,icon:c,onClick:u,subtitle:p,title:d,className:m}=e;const{autosaveAndRedirect:h}=(0,l.Z)(a);return(0,r.createElement)(s.Warning,{actions:a&&[(0,r.createElement)(i.Button,{href:a,onClick:e=>{e.preventDefault(),u(t),h(e)},target:"_top",variant:"secondary"},n)],className:o()(m,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},c,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},d),p&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},p))))}},62474:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(69307),a=n(89105),o=n.n(a),i=n(92819),s=n(4981),l=n(52175),c=n(55609),u=n(9818),p=n(39630),d=n(65736);const __=d.__,m=e=>{let{attributes:t,styleOption:n,viewportWidth:a,blockName:o}=e;const i=(0,s.getBlockType)(o);return(0,r.createElement)(l.BlockPreview,{viewportWidth:a,blocks:(c=i.example?(0,s.getBlockFromExample)(o,{attributes:{...i.example.attributes,style:n.value},innerBlocks:i.example.innerBlocks}):(0,s.createBlock)(o,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},h=r.memo?(0,r.memo)(m,((e,t)=>(0,i.isEqual)(e,t))):m;function f(e){let t,{attributes:n,clientId:a,styleOptions:i,onSelectStyle:s,activeStyle:d,viewportWidth:m,title:f}=e;return u.useSelect&&(t=(0,u.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:i.map((e=>({title:e.label,isActive:e.value===d,onClick:()=>s({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(c.PanelBody,{title:f||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},i.map((e=>{const a={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:o()("block-editor-block-styles__item",{"is-active":e.value===d}),onClick:()=>{s({style:e.value})},onKeyDown:t=>{p.ENTER!==t.keyCode&&p.SPACE!==t.keyCode||(t.preventDefault(),s({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:u.useSelect&&t&&(0,r.createElement)(h,{blockName:t.name,styleOption:e,attributes:a,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},46660:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307),a=n(62309);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"jetpack-inspector-notice"},(0,r.createElement)("span",null,t),(0,r.createElement)(a.Z,{height:16,logoColor:"#1a1a1a",showText:!1}))}},84504:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var r=n(69307),a=n(89105),o=n.n(a),i=n(55609),s=n(9818),l=n(65736),c=n(36129),u=n(57979),p=n(98618);const __=l.__;function d(e){let{skipForwardTime:t=5,jumpBackTime:n=5,playIcon:a="controls-play",pauseIcon:l="controls-pause",jumpBackIcon:d=c.Qv,skipForwardIcon:m=c._z,currenTimeDisplay:h=!0,onTimestampClick:f}=e;const{playerState:g,mediaCurrentTime:b,defaultMediaSource:v,mediaDomReference:k}=(0,s.useSelect)((e=>{const{getMediaSourceCurrentTime:t,getMediaPlayerState:n,getDefaultMediaSource:r,getMediaSourceDuration:a,getMediaSourceDomReference:o}=e(u.tT);return{playerState:n(),mediaCurrentTime:t(),mediaDuration:a(),defaultMediaSource:r(),mediaDomReference:o()}}),[]),y=(0,p.H)(b),E=!v,{toggleMediaSource:w,setMediaSourceCurrentTime:_}=(0,s.useDispatch)(u.tT);function C(e){!function(e){k&&(k.currentTime=e),_(v.id,e)}(e),k&&(k.currentTime=e)}return(0,r.createElement)(r.Fragment,null,!1!==n&&(0,r.createElement)(i.ToolbarButton,{icon:d,isDisabled:E,onClick:()=>C(b-n),label:__("Jump back","jetpack")}),(0,r.createElement)(i.ToolbarButton,{icon:g===u._5?a:l,isDisabled:E,onClick:function(){w(v.id)},label:__("Play","jetpack")}),t&&(0,r.createElement)(i.ToolbarButton,{icon:m,isDisabled:E,onClick:()=>C(b+t),label:__("Skip forward","jetpack")}),h&&(0,r.createElement)(i.ToolbarButton,{className:o()("media-player-control__current-time",{"is-disabled":E}),label:__("Set timestamp","jetpack"),onClick:()=>f(b)},y))}function m(e){return(0,r.createElement)(i.ToolbarGroup,{className:"media-player-control__toolbar"},(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(d,e))))}},98618:function(e,t,n){"use strict";n.d(t,{H:function(){return r},i:function(){return a}});const r=mejs.Utils.secondsToTimeCode,a=mejs.Utils.timeCodeToSeconds},94978:function(e,t,n){"use strict";var r=n(3779),a=n.n(r),o=n(69307),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,o.createElement)(i.TextControl,a()({type:"number",inputMode:"numeric"},e))};t.Z=s},12321:function(e,t,n){"use strict";n.d(t,{mj:function(){return r},DW:function(){return a},Bn:function(){return o},DM:function(){return i}});const r=0,a=1,o="payment-plan",i="subscription"},2372:function(e,t,n){"use strict";n.d(t,{a:function(){return o},Q:function(){return i}});var r=n(69307),a=n(12321);const o=(0,r.createContext)({blockName:void 0,clientId:void 0,products:[],productType:a.Bn,selectedProductId:0,setSelectedProductId:()=>{}}),i=()=>(0,r.useContext)(o)},94322:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(69307),a=n(52175),o=n(9818),i=n(12321),s=n(2372),l=n(42004),c=n(98451),u=n(71817),p=n(53413),d=n(40975);function m(e){let{blockName:t,clientId:n,productType:m=i.Bn,selectedProductId:h=0,setSelectedProductId:f=(()=>{})}=e;const g=(0,o.useSelect)((e=>e(d.h).getProducts(m,h,f)),[]),{connectUrl:b,isApiConnected:v,isSelectedProductInvalid:k,shouldUpgrade:y}=(0,o.useSelect)((e=>{const{getConnectUrl:t,getShouldUpgrade:n,isApiStateConnected:r,isInvalidProduct:a}=e(d.h);return{connectUrl:t(),isApiConnected:r(),isSelectedProductInvalid:a(h),shouldUpgrade:n()}}));if(y)return null;const E={blockName:t,clientId:n,products:g,productType:m,selectedProductId:h,setSelectedProductId:f};return(0,r.createElement)(s.a.Provider,{value:E},!v&&!!b&&(0,r.createElement)(a.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(p.Z,{blockName:t,connectUrl:b})),v&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Z,null),(0,r.createElement)(c.Z,null)),v&&k&&(0,r.createElement)(u.Z,null))}},42004:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(69307),a=n(52175),o=n(55609),i=n(9818),s=n(65736),l=n(63425),c=n(12321),u=n(2372),p=n(31082),d=n(76369),m=n(40975);const __=s.__;function h(){const{productType:e,setSelectedProductId:t}=(0,u.Q)(),n=(0,i.useSelect)((e=>e(m.h).getSiteSlug())),{saveProduct:s}=(0,i.useDispatch)(m.h),[h,f]=(0,r.useState)(c.mj),[g,b]=(0,r.useState)((0,p.l)("default new product title",e)),[v,k]=(0,r.useState)("USD"),[y,E]=(0,r.useState)(5),[w,_]=(0,r.useState)("1 month"),C=[{label:__("Month","jetpack"),value:"1 month"},{label:__("Year","jetpack"),value:"1 year"},{label:__("One-Time Payment","jetpack"),value:"one-time"}];return(0,r.createElement)(a.InspectorControls,null,n&&(0,r.createElement)(o.PanelBody,null,(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${n}`},(0,p.l)("manage your products",e))),(0,r.createElement)(o.PanelBody,{title:(0,p.l)("add a new product",e),initialOpen:!0,className:"product-management-control-inspector__add-plan"},h===c.DW&&(0,r.createElement)(o.Placeholder,{icon:l.Z,label:(0,p.l)("saving product",e)},(0,r.createElement)(o.Spinner,null)),h===c.mj&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-title"},(0,r.createElement)(o.TextControl,{id:"new-product-title",label:__("Name","jetpack"),onChange:e=>b(e),value:g})),(0,r.createElement)(o.PanelRow,{className:"product-management-control-inspector__product-price"},(0,r.createElement)(o.SelectControl,{label:__("Currency","jetpack"),onChange:e=>k(e),options:d.Xy,value:v}),(0,r.createElement)(o.TextControl,{label:__("Price","jetpack"),onChange:e=>E(e),type:"number",value:y})),(0,r.createElement)(o.PanelRow,{className:"plan-interval"},(0,r.createElement)(o.SelectControl,{label:__("Interval","jetpack"),onChange:e=>_(e),options:C,value:w})),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/wordpress-editor/blocks/payments/#related-fees"},__("Read more about Payments and related fees.","jetpack"))),(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{onClick:n=>{n.preventDefault(),f(c.DW),s({title:g,currency:v,price:y,interval:w},e,t,(e=>{f(c.mj),e&&(E(5),b(""))}))},variant:"secondary"},(0,p.l)("add product",e))))))}},71817:function(e,t,n){"use strict";n