Version Description
Download this release
Release Info
Developer | cgastrell |
Plugin | Crowdsignal Forms |
Version | 1.3.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.3 to 1.3.4
- README.TXT +1 -1
- build/applause.asset.php +1 -1
- build/applause.css +1 -1
- build/applause.js +783 -13
- build/editor.asset.php +1 -1
- build/editor.css +1 -1
- build/editor.js +1751 -13
- build/poll.asset.php +1 -1
- build/poll.js +526 -13
README.TXT
CHANGED
@@ -4,7 +4,7 @@ Tags: polls, forms, surveys, gutenberg, block
|
|
4 |
Requires at least: 5.0
|
5 |
Requires PHP: 5.6.20
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Requires at least: 5.0
|
5 |
Requires PHP: 5.6.20
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.3.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
build/applause.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '365ec159f087b0e555b625e408a918c0');
|
build/applause.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:
|
1 |
+
@keyframes crowdsignal-forms-animation__pop{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__pulse{0%{opacity:0.4}50%{opacity:0.7}100%{opacity:0.4}}@keyframes crowdsignal-forms-animation__grow{0%{transform:scale(1)}50%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes crowdsignal-forms-animation__fade-in{0%{opacity:0}100%{opacity:1}}@keyframes crowdsignal-forms-animation__fade-out{0%{opacity:1}100%{opacity:0}}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 16px 18px 12px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 16px 20px 8px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 18px 22px 8px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}.crowdsignal-forms__branding{display:flex}.crowdsignal-forms__branding .crowdsignal-forms__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 12px 0;text-decoration:none !important;text-transform:uppercase;box-shadow:none;border:0}.crowdsignal-forms__branding .crowdsignal-forms__branding-link:hover{box-shadow:none}.crowdsignal-forms__branding .crowdsignal-forms__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:top}.crowdsignal-forms__branding .crowdsignal-forms__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}
|
build/applause.js
CHANGED
@@ -1,13 +1,783 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
*/!function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=i,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function a(t,n,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},o.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var i=JSON.stringify(n);/^[\{\[]/.test(i)&&(n=i)}catch(u){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in a)a[s]&&(c+="; "+s,!0!==a[s]&&(c+="="+a[s].split(";")[0]));return document.cookie=t+"="+n+c}}function i(e,n){if("undefined"!=typeof document){for(var o={},a=document.cookie?document.cookie.split("; "):[],i=0;i<a.length;i++){var c=a[i].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var u=t(c[0]);if(s=(r.read||r)(s,u)||t(s),n)try{s=JSON.parse(s)}catch(l){}if(o[u]=s,e===u)break}catch(l){}}return e?o[e]:o}}return o.set=a,o.get=function(e){return i(e,!1)},o.getJSON=function(e){return i(e,!0)},o.remove=function(t,n){a(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(12);e.exports=function(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}}),t&&r(e,t)}},function(e,t,n){var r=n(17);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(31),o=n(32),a=n(16),i=n(33);e.exports=function(e){return r(e)||o(e)||a(e)||i()}},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(34);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(35),o=n(36);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(10),o=n(12),a=n(37),i=n(38);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(s){o=!0,a=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(30);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=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 c.name="Invariant Violation",c}}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:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(17);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(12),o=n(39);function a(t,n,i){return o()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var o=[null];o.push.apply(o,t);var a=new(Function.bind.apply(e,o));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),a=n(2),i=n(4),c=n.n(i),s=n(9),u=n.n(s),l=n(3),f=(n(18),n(7)),p=n.n(f),d=(n(13),n(8)),b=n(1),m=n.n(b),O=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),h=(Object.freeze([O.CABIN,O.CHIVO,O.OPEN_SANS,O.FIRA_SANS,O.ROBOTO,O.NUNITO,O.OVERPASS,O.LATO,O.LIBRE_FRANKLIN,O.MONTSERRAT,O.POPPINS,O.RUBIK,O.RALEWAY,O.JOSEFIN_SANS,O.ALEGREYA_SANS,O.OSWALD]),Object.freeze((r={},m()(r,O.THEME_DEFAULT,null),m()(r,O.GEORGIA,"Georgia, serif"),m()(r,O.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),m()(r,O.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),m()(r,O.ARIAL,"Arial, Helvetica, sans-serif"),m()(r,O.IMPACT,"Impact, Charcoal, sans-serif"),m()(r,O.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),m()(r,O.TAHOMA,"Tahoma, Geneva, sans-serif"),m()(r,O.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),m()(r,O.VERDANA,"Verdana, Geneva, sans-serif"),m()(r,O.COURIER,'"Courier New", Courier, monospace'),m()(r,O.CABIN,'"Cabin", sans-serif'),m()(r,O.CHIVO,'"Chivo", sans-serif'),m()(r,O.OPEN_SANS,'"Open Sans", sans-serif'),m()(r,O.FIRA_SANS,'"Fira Sans", sans-serif'),m()(r,O.ROBOTO,'"Roboto", sans-serif'),m()(r,O.NUNITO,'"Nunito", sans-serif'),m()(r,O.OVERPASS,'"Overpass", sans-serif'),m()(r,O.LATO,'"Lato", sans-serif'),m()(r,O.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),m()(r,O.MONTSERRAT,'"Montserrat", sans-serif'),m()(r,O.POPPINS,'"Poppins", sans-serif'),m()(r,O.RUBIK,'"Rubik", sans-serif'),m()(r,O.RALEWAY,'"Raleway", sans-serif'),m()(r,O.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),m()(r,O.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),m()(r,O.OSWALD,'"Oswald", sans-serif'),r)),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"})),y=(Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"}),function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t}),v=n(19),w=n.n(v),C=n(20),g=n.n(C),S=n(21),E=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},x=n(5),j=n.n(x),L=n(6),A=n.n(L),R=n(11),N=n.n(R),_=n(14),T=n.n(_),I=n(15),P=n.n(I),k=n(22),D=n.n(k),M=n(10),F=n.n(M),U=n(23),B=n.n(U);n(24);function H(e){return function(){var t,n=F()(e);if(W()){var r=F()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return D()(this,t)}}function W(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var V=function(){var e=A()(j.a.mark((function e(t){var n,r,o=arguments;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=A()(j.a.mark((function e(t){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new J;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new J;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=A()(j.a.mark((function e(t,n,r,o){var a,i,c;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(a,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((i=e.sent).ok){e.next=6;break}throw new J;case 6:return e.next=8,i.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new K(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),K=function(e){P()(n,e);var t=H(n);function n(){return T()(this,n),t.apply(this,arguments)}return n}(B()(Error)),J=function(e){P()(n,e);var t=H(n);function n(){return T()(this,n),t.call(this,Object(d.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(K),Y=function(e,t){var n=Object(a.useState)(null),r=c()(n,2),o=r[0],i=r[1],s=Object(a.useState)(null),u=c()(s,2),l=u[0],f=u[1],p=Object(a.useState)(!0),d=c()(p,2),b=d[0],m=d[1];return Object(a.useEffect)((function(){m(!0),f(null),i(null),e().then(i).catch(f).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:b}},q=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(d.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};q.propTypes={showBranding:u.a.bool,referralCode:u.a.string.isRequired};var Z=q,X=function(e){var t=e.active,n=e.className,r=p()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},$=function(e){var t,n=e.attributes,r=e.fallbackStyles,i=e.renderStyleProbe,s=n.apiPollData?n.apiPollData.id:null,u=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(a.useState)(!1),i=c()(o,2),s=i[0],u=i[1],l=Object(a.useState)(!1),f=c()(l,2),p=f[0],d=f[1],b=Object(a.useState)(""),m=c()(b,2),O=m[0],h=m[1];Object(a.useEffect)((function(){t&&void 0!==N.a.get(r)&&(d(!0),h(N.a.get(r)))}),[]);var y=function(){var o=A()(j.a.mark((function o(a){var i,c,s,l=arguments;return j.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=l.length>1&&void 0!==l[1]?l[1]:1,o.prev=1,u(!0),o.next=5,G(e);case 5:return c=o.sent,o.next=8,z(c,e,a,i);case 8:d(!0),t&&(s=n?a.join(","):(new Date).getTime(),N.a.set(r,s,{sameSite:"Strict",expires:365}),h(s));case 10:return o.prev=10,u(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:p,isVoting:s,vote:y,storedCookieValue:O}}(s,!0),f=u.hasVoted,d=u.vote,b=Object(a.useState)(0),m=c()(b,2),O=m[0],y=m[1],v=Object(a.useState)(0),w=c()(v,2),C=w[0],g=w[1],S=Object(a.useState)(null),E=c()(S,2),x=E[0],L=E[1],R=Object(a.useState)(!1),_=c()(R,2),T=_[0],I=_[1],P=Object(a.useState)(null),k=c()(P,2),D=k[0],M=k[1],F=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Y((function(){return V(e,t)}),[e]),r=n.data,o=n.error,a=n.loading;return{error:o,loading:a,results:r}}(s).results,U=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(h.CLOSED===e)return!0;if(h.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(n.pollStatus,n.closedAfterDateTime),B=function(){if(null!==s&&!U){D&&clearTimeout(D),I(!0),M(setTimeout((function(){I(!1)}),200));var e=C+1;g(e),y(O+1);var t=n.apiPollData.answers[0].id;null!==x&&clearTimeout(x);var r=setTimeout((function(){d([t],e),L(null),g(0)}),1e3);L(r)}},H=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(n,"crowdsignal-forms-applause",n.className,"size-".concat(n.size),{"is-closed":U}),W=function(e,t){var n=Object(l.isEmpty)(e.textColor)?t.text:e.textColor;return Object(l.mapKeys)({bgColor:e.backgroundColor||t.surface,textColor:n,hoverColor:t.accent,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(l.kebabCase)(t))}))}(n,r),K=(null!==F?Object(l.values)(F)[0]:0)+O;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:H,style:W,onClick:B,onKeyPress:B,role:"button",tabIndex:0},Object(o.createElement)(X,{active:T}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},(t=K)?t>=1e7?"".concat(Object(l.round)(t/1e6),"M"):t>=1e6?"".concat((t/1e6).toFixed(1),"M"):t>=1e4?"".concat(Object(l.round)(t/1e3),"K"):t>=1e3?"".concat((t/1e3).toFixed(1),"K"):t.toString():"0"," Claps"),i()),Object(o.createElement)(Z,{showBranding:f&&!n.hideBranding,referralCode:"cs-forms-applause"}))};$.propTypes={className:u.a.string};var Q,ee,te=(Q=function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))},ee=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=y(r),a=window.getComputedStyle(r).color,i=y(n),c=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null),s=i;return s===o&&(s=c||a),{accent:s,surface:o,text:a}},function(e){return Object(S.withFallbackStyles)((function(e){return{fallbackStyles:ee(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=g()(t,["fallbackStyles"]);return Object(o.createElement)(e,w()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(o.createElement)(E,null,Object(o.createElement)(Q,null))}},r))}))})($),ne=n(25),re=function(e,t){return Object(l.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(l.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(ne.render)(o,n)}catch(a){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},oe=function(e,t){(Object(l.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return re(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(l.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,re(e,t))};(function(e,t){if("complete"===document.readyState)return oe(e,t);window.addEventListener("load",(function(){return oe(e,t)}))})("data-crowdsignal-applause",(function(e){return Object(o.createElement)(te,{attributes:e})}))}]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = "./client/applause.js");
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./client/applause.js":
|
90 |
+
/*!****************************!*\
|
91 |
+
!*** ./client/applause.js ***!
|
92 |
+
\****************************/
|
93 |
+
/*! no exports provided */
|
94 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
95 |
+
|
96 |
+
"use strict";
|
97 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_applause__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/applause */ \"./client/components/applause/index.js\");\n/* harmony import */ var lib_mutation_observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lib/mutation-observer */ \"./client/lib/mutation-observer/index.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\nObject(lib_mutation_observer__WEBPACK_IMPORTED_MODULE_3__[\"default\"])('data-crowdsignal-applause', function (attributes) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_applause__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n attributes: attributes\n });\n});\n\n//# sourceURL=webpack:///./client/applause.js?");
|
98 |
+
|
99 |
+
/***/ }),
|
100 |
+
|
101 |
+
/***/ "./client/blocks/applause/util.js":
|
102 |
+
/*!****************************************!*\
|
103 |
+
!*** ./client/blocks/applause/util.js ***!
|
104 |
+
\****************************************/
|
105 |
+
/*! exports provided: getApplauseStyleVars, getBlockCssClasses */
|
106 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
107 |
+
|
108 |
+
"use strict";
|
109 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getApplauseStyleVars\", function() { return getApplauseStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getApplauseStyleVars = function getApplauseStyleVars(attributes, fallbackStyles) {\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.text : attributes.textColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"mapKeys\"])({\n bgColor: attributes.backgroundColor || fallbackStyles.surface,\n textColor: textColor,\n hoverColor: fallbackStyles.accent,\n borderRadius: \"\".concat(attributes.borderRadius || 0, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth || 0, \"px\"),\n borderColor: attributes.borderColor\n }, function (_, key) {\n return \"--crowdsignal-forms-applause-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"kebabCase\"])(key));\n });\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_0___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-border-color': attributes.borderColor\n }, extraClasses);\n};\n\n//# sourceURL=webpack:///./client/blocks/applause/util.js?");
|
110 |
+
|
111 |
+
/***/ }),
|
112 |
+
|
113 |
+
/***/ "./client/blocks/poll/constants.js":
|
114 |
+
/*!*****************************************!*\
|
115 |
+
!*** ./client/blocks/poll/constants.js ***!
|
116 |
+
\*****************************************/
|
117 |
+
/*! exports provided: ConfirmMessageType, FontFamilyType, GoogleFonts, FontFamilyMap, PollStatus, ClosedPollState, ConnectedAccountState, AnswerStyle, ButtonAlignment */
|
118 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
119 |
+
|
120 |
+
"use strict";
|
121 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConfirmMessageType\", function() { return ConfirmMessageType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyType\", function() { return FontFamilyType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GoogleFonts\", function() { return GoogleFonts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyMap\", function() { return FontFamilyMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStatus\", function() { return PollStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClosedPollState\", function() { return ClosedPollState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConnectedAccountState\", function() { return ConnectedAccountState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AnswerStyle\", function() { return AnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ButtonAlignment\", function() { return ButtonAlignment; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar _Object$freeze;\n\nvar ConfirmMessageType = Object.freeze({\n THANK_YOU: 'thank-you',\n CUSTOM_TEXT: 'custom-text',\n REDIRECT: 'redirect',\n RESULTS: 'results'\n});\nvar FontFamilyType = Object.freeze({\n THEME_DEFAULT: 'theme-default',\n GEORGIA: 'georgia',\n PALATINO: 'palatino',\n TIMES_NEW_ROMAN: 'times-new-roman',\n ARIAL: 'arial',\n IMPACT: 'impact',\n LUCIDA: 'lucida',\n TAHOMA: 'tahoma',\n TREBUCHET: 'trebuchet',\n VERDANA: 'verdana',\n COURIER: 'courier',\n // Google fonts: enum value = google font url slug\n CABIN: 'Cabin',\n CHIVO: 'Chivo',\n OPEN_SANS: 'Open+Sans',\n FIRA_SANS: 'Fira+Sans',\n ROBOTO: 'Roboto',\n NUNITO: 'Nunito',\n OVERPASS: 'Overpass',\n LATO: 'Lato',\n LIBRE_FRANKLIN: 'Libre+Franklin',\n MONTSERRAT: 'Montserrat',\n POPPINS: 'Poppins',\n RUBIK: 'Rubik',\n RALEWAY: 'Raleway',\n JOSEFIN_SANS: 'Josefin+Sans',\n ALEGREYA_SANS: 'Alegreya+Sans',\n OSWALD: 'Oswald'\n});\nvar GoogleFonts = Object.freeze([FontFamilyType.CABIN, FontFamilyType.CHIVO, FontFamilyType.OPEN_SANS, FontFamilyType.FIRA_SANS, FontFamilyType.ROBOTO, FontFamilyType.NUNITO, FontFamilyType.OVERPASS, FontFamilyType.LATO, FontFamilyType.LIBRE_FRANKLIN, FontFamilyType.MONTSERRAT, FontFamilyType.POPPINS, FontFamilyType.RUBIK, FontFamilyType.RALEWAY, FontFamilyType.JOSEFIN_SANS, FontFamilyType.ALEGREYA_SANS, FontFamilyType.OSWALD]);\nvar FontFamilyMap = Object.freeze((_Object$freeze = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.THEME_DEFAULT, null), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.GEORGIA, 'Georgia, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.PALATINO, '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TIMES_NEW_ROMAN, '\"Times New Roman\", Times, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ARIAL, 'Arial, Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.IMPACT, 'Impact, Charcoal, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LUCIDA, '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TAHOMA, 'Tahoma, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TREBUCHET, '\"Trebuchet MS\", Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.VERDANA, 'Verdana, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.COURIER, '\"Courier New\", Courier, monospace'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CABIN, '\"Cabin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CHIVO, '\"Chivo\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OPEN_SANS, '\"Open Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.FIRA_SANS, '\"Fira Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ROBOTO, '\"Roboto\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.NUNITO, '\"Nunito\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OVERPASS, '\"Overpass\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LATO, '\"Lato\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LIBRE_FRANKLIN, '\"Libre Franklin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.MONTSERRAT, '\"Montserrat\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.POPPINS, '\"Poppins\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RUBIK, '\"Rubik\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RALEWAY, '\"Raleway\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.JOSEFIN_SANS, '\"Josefin Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ALEGREYA_SANS, '\"Alegreya Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OSWALD, '\"Oswald\", sans-serif'), _Object$freeze));\nvar PollStatus = Object.freeze({\n OPEN: 'open',\n CLOSED: 'closed',\n CLOSED_AFTER: 'closed-after'\n});\nvar ClosedPollState = Object.freeze({\n SHOW_RESULTS: 'show-results',\n SHOW_CLOSED_BANNER: 'show-closed-banner',\n HIDDEN: 'hidden'\n});\nvar ConnectedAccountState = Object.freeze({\n CONNECTED: 'connected',\n NOT_CONNECTED: 'not-connected',\n NOT_VERIFIED: 'not-verified'\n});\nvar AnswerStyle = Object.freeze({\n RADIO: 'radio',\n BUTTON: 'button'\n});\nvar ButtonAlignment = Object.freeze({\n LIST: 'list',\n INLINE: 'inline'\n});\n\n//# sourceURL=webpack:///./client/blocks/poll/constants.js?");
|
122 |
+
|
123 |
+
/***/ }),
|
124 |
+
|
125 |
+
/***/ "./client/blocks/poll/util.js":
|
126 |
+
/*!************************************!*\
|
127 |
+
!*** ./client/blocks/poll/util.js ***!
|
128 |
+
\************************************/
|
129 |
+
/*! exports provided: addAnswer, getFontFamilyFromType, getStyleVars, extractRGBColorProperties, hexToRGB, getBlockCssClasses, isPollClosed, getAnswerStyle, toggleButtonStyleAvailability */
|
130 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
131 |
+
|
132 |
+
"use strict";
|
133 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAnswer\", function() { return addAnswer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFontFamilyFromType\", function() { return getFontFamilyFromType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStyleVars\", function() { return getStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractRGBColorProperties\", function() { return extractRGBColorProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hexToRGB\", function() { return hexToRGB; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isPollClosed\", function() { return isPollClosed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAnswerStyle\", function() { return getAnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleButtonStyleAvailability\", function() { return toggleButtonStyleAvailability; });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Creates a new Answer object then returns a copy of the passed in `answers` array with the new answer appended to it.\n *\n * @param {Array} answers The existing array of answers.\n * @param {string} text\tThe text for the new answer to add.\n * @return {Array}\t\t\tThe newly created answers array.\n */\n\nvar addAnswer = function addAnswer(answers, text) {\n return [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(answers), [{\n answerId: null,\n text: text\n }]);\n};\nvar getFontFamilyFromType = function getFontFamilyFromType(type) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyType\"], type)) {\n return null;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyMap\"][type];\n};\nvar getStyleVars = function getStyleVars(attributes, fallbackStyles) {\n var _attributes$borderCol, _getFontFamilyFromTyp, _getFontFamilyFromTyp2, _extractRGBColorPrope;\n\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.text : attributes.textColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"mapKeys\"])({\n borderColor: (_attributes$borderCol = attributes.borderColor) !== null && _attributes$borderCol !== void 0 ? _attributes$borderCol : fallbackStyles.accent,\n borderRadius: \"\".concat(attributes.borderRadius, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth, \"px\"),\n bgColor: attributes.backgroundColor,\n bodyFontFamily: (_getFontFamilyFromTyp = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp !== void 0 ? _getFontFamilyFromTyp : fallbackStyles.bodyFontFamily,\n questionFontFamily: (_getFontFamilyFromTyp2 = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp2 !== void 0 ? _getFontFamilyFromTyp2 : fallbackStyles.questionFontFamily,\n submitButtonBgColor: attributes.submitButtonBackgroundColor || fallbackStyles.accent,\n submitButtonTextColor: attributes.submitButtonTextColor || fallbackStyles.textInverted,\n textColor: textColor,\n textColorProperties: (_extractRGBColorPrope = extractRGBColorProperties(textColor)) !== null && _extractRGBColorPrope !== void 0 ? _extractRGBColorPrope : '0, 0, 0',\n contentWideWidth: fallbackStyles.contentWideWidth\n }, function (_, key) {\n return \"--crowdsignal-forms-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"kebabCase\"])(key));\n });\n};\n/**\n * Extracts the comma separated color properties from an rgb string.\n * rgba strings are not supported for now because it introduces too many complications.\n *\n * @param {string} color The color string.\n * @return {string} The 3 comma separated rgb color properties.\n */\n\nvar extractRGBColorProperties = function extractRGBColorProperties(color) {\n if (!color || 'string' !== typeof color || -1 === color.indexOf('rgb') && 0 !== color.indexOf('#') || -1 < color.indexOf('rgba')) {\n return null;\n }\n\n if (0 === color.indexOf('#')) {\n color = hexToRGB(color);\n }\n\n return color.match(/\\((.*?)\\)/)[1];\n};\n/**\n * converts css color hex to rgb\n *\n * @param {string} h The hex color string.\n * @return {string} The rgb value.\n */\n\nvar hexToRGB = function hexToRGB(h) {\n var r = 0,\n g = 0,\n b = 0;\n var hexCode = 4 === h.length ? \"#\".concat(h[1] + h[1] + h[2] + h[2] + h[3] + h[3]) : h;\n\n if (7 === hexCode.length) {\n r = parseInt(hexCode.substr(1, 2), 16) || 0;\n g = parseInt(hexCode.substr(3, 2), 16) || 0;\n b = parseInt(hexCode.substr(5, 2), 16) || 0;\n }\n\n return \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\");\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n var _attributes$borderRad;\n\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_1___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-submit-button-bg-color': attributes.submitButtonBackgroundColor,\n 'has-submit-button-text-color': attributes.submitButtonTextColor,\n 'has-border-radius': (_attributes$borderRad = attributes.borderRadius) !== null && _attributes$borderRad !== void 0 ? _attributes$borderRad : false,\n 'has-box-shadow': attributes.hasBoxShadow\n }, extraClasses);\n};\n/**\n * Determines if the poll is closed based on its editor settings.\n *\n * @param {string} pollStatus The poll's status, as set in the editor.\n * @param {string} closedAfterDateTimeUTC The UTC date time string to close the poll after if pollStatus is PollStatus.CLOSED_AFTER.\n * @param {Date} currentDateTime Optionally set the current date that will be used for current time comparisons.\n */\n\nvar isPollClosed = function isPollClosed(pollStatus, closedAfterDateTimeUTC) {\n var currentDateTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Date();\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED === pollStatus) {\n return true;\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED_AFTER === pollStatus) {\n var closedAfterDateTime = new Date(closedAfterDateTimeUTC);\n return closedAfterDateTime < currentDateTime;\n }\n\n return false;\n};\n/**\n * Returns the type of answer controls that should be rendered given the current state of the block.\n *\n * @param {*} attributes the poll's attributes.\n * @param {string} className the css class string Gutenberg is passing into the block.\n */\n\nvar getAnswerStyle = function getAnswerStyle(attributes, className) {\n if (attributes.isMultipleChoice) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(className) && className.indexOf('is-style-buttons') > -1) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].BUTTON;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n};\n/**\n * Registers or de-registers the `buttons` block style.\n *\n * @param {boolean} enable True if button style should be available, false if not.\n */\n\nvar toggleButtonStyleAvailability = function toggleButtonStyleAvailability(enable) {\n if (enable) {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"registerBlockStyle\"])('crowdsignal-forms/poll', {\n name: 'buttons',\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Buttons', 'crowdsignal-forms')\n });\n } else {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"unregisterBlockStyle\"])('crowdsignal-forms/poll', 'buttons');\n }\n};\n\n//# sourceURL=webpack:///./client/blocks/poll/util.js?");
|
134 |
+
|
135 |
+
/***/ }),
|
136 |
+
|
137 |
+
/***/ "./client/components/applause/animation.js":
|
138 |
+
/*!*************************************************!*\
|
139 |
+
!*** ./client/components/applause/animation.js ***!
|
140 |
+
\*************************************************/
|
141 |
+
/*! exports provided: default */
|
142 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
143 |
+
|
144 |
+
"use strict";
|
145 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies\n */\n\n\n\nvar ApplauseAnimation = function ApplauseAnimation(_ref) {\n var active = _ref.active,\n className = _ref.className;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('crowdsignal-forms-applause__animation', className, {\n 'is-active': active\n });\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n className: classes,\n width: \"32\",\n height: \"32\",\n viewBox: \"0 0 32 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-right\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n className: \"crowdsignal-forms-applause__animation-inner-fill\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-left\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n className: \"crowdsignal-forms-applause__animation-inner-fill\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-wave-small\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"15.4854\",\n y: \"4.42176\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(8 15.4854 4.42176)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"19.9369\",\n y: \"5.15548\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(43 19.9369 5.15548)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"11.1523\",\n y: \"4.78963\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(-27 11.1523 4.78963)\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-wave-large\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"23.453\",\n y: \"2.41095\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(38 23.453 2.41095)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"26.9413\",\n y: \"5.27211\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(73 26.9413 5.27211)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"19.5165\",\n y: \"0.562988\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(3 19.5165 0.562988)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)\"\n })));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ApplauseAnimation);\n\n//# sourceURL=webpack:///./client/components/applause/animation.js?");
|
146 |
+
|
147 |
+
/***/ }),
|
148 |
+
|
149 |
+
/***/ "./client/components/applause/index.js":
|
150 |
+
/*!*********************************************!*\
|
151 |
+
!*** ./client/components/applause/index.js ***!
|
152 |
+
\*********************************************/
|
153 |
+
/*! exports provided: default */
|
154 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155 |
+
|
156 |
+
"use strict";
|
157 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var blocks_poll_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! blocks/poll/util */ \"./client/blocks/poll/util.js\");\n/* harmony import */ var blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! blocks/applause/util */ \"./client/blocks/applause/util.js\");\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./styles */ \"./client/components/applause/styles.js\");\n/* harmony import */ var components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/with-fallback-styles */ \"./client/components/with-fallback-styles/index.js\");\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n/* harmony import */ var components_vote_util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/vote/util */ \"./client/components/vote/util.js\");\n/* harmony import */ var components_brand_link__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/brand-link */ \"./client/components/brand-link/index.js\");\n/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./animation */ \"./client/components/applause/animation.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\n\nvar Applause = function Applause(props) {\n var attributes = props.attributes,\n fallbackStyles = props.fallbackStyles,\n renderStyleProbe = props.renderStyleProbe;\n var apiPollId = attributes.apiPollData ? attributes.apiPollData.id : null;\n\n var _usePollVote = Object(data_hooks__WEBPACK_IMPORTED_MODULE_9__[\"usePollVote\"])(apiPollId, true),\n hasVoted = _usePollVote.hasVoted,\n vote = _usePollVote.vote;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(0),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n currentVote = _useState2[0],\n setCurrentVote = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(0),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),\n queuedVotes = _useState4[0],\n setQueuedVotes = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(null),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),\n timeoutHandle = _useState6[0],\n setTimeoutHandle = _useState6[1];\n\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(false),\n _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState7, 2),\n animationActiveState = _useState8[0],\n setAnimationActiveState = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(null),\n _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState9, 2),\n animationTimeoutHandle = _useState10[0],\n setAnimationTimeoutHandle = _useState10[1];\n\n var _usePollResults = Object(data_hooks__WEBPACK_IMPORTED_MODULE_9__[\"usePollResults\"])(apiPollId),\n results = _usePollResults.results;\n\n var isClosed = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_5__[\"isPollClosed\"])(attributes.pollStatus, attributes.closedAfterDateTime);\n\n var handleVote = function handleVote() {\n if (apiPollId === null || isClosed) {\n return;\n }\n\n if (animationTimeoutHandle) {\n clearTimeout(animationTimeoutHandle);\n }\n\n setAnimationActiveState(true);\n setAnimationTimeoutHandle(setTimeout(function () {\n setAnimationActiveState(false);\n }, 200));\n var newQueuedVoteCount = queuedVotes + 1;\n setQueuedVotes(newQueuedVoteCount);\n setCurrentVote(currentVote + 1);\n var answerId = attributes.apiPollData.answers[0].id;\n\n if (null !== timeoutHandle) {\n clearTimeout(timeoutHandle);\n }\n\n var handle = setTimeout(function () {\n vote([answerId], newQueuedVoteCount);\n setTimeoutHandle(null);\n setQueuedVotes(0);\n }, 1000);\n setTimeoutHandle(handle);\n };\n\n var classes = Object(blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__[\"getBlockCssClasses\"])(attributes, 'crowdsignal-forms-applause', attributes.className, \"size-\".concat(attributes.size), {\n 'is-closed': isClosed\n });\n var styleVars = Object(blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__[\"getApplauseStyleVars\"])(attributes, fallbackStyles);\n var apiVoteCount = null !== results ? Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(results)[0] : 0;\n var displayedVoteCount = apiVoteCount + currentVote;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: classes,\n style: styleVars,\n onClick: handleVote,\n onKeyPress: handleVote,\n role: \"button\",\n tabIndex: 0\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_animation__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n active: animationActiveState\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"p\", {\n className: \"crowdsignal-forms-applause__count\"\n }, Object(components_vote_util__WEBPACK_IMPORTED_MODULE_10__[\"formatVoteCount\"])(displayedVoteCount), \" Claps\"), renderStyleProbe()), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(components_brand_link__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n showBranding: hasVoted && !attributes.hideBranding,\n referralCode: \"cs-forms-applause\"\n }));\n};\n\nApplause.propTypes = {\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_8__[\"withFallbackStyles\"])(_styles__WEBPACK_IMPORTED_MODULE_7__[\"ApplauseStyles\"], _styles__WEBPACK_IMPORTED_MODULE_7__[\"getApplauseStyles\"])(Applause));\n\n//# sourceURL=webpack:///./client/components/applause/index.js?");
|
158 |
+
|
159 |
+
/***/ }),
|
160 |
+
|
161 |
+
/***/ "./client/components/applause/styles.js":
|
162 |
+
/*!**********************************************!*\
|
163 |
+
!*** ./client/components/applause/styles.js ***!
|
164 |
+
\**********************************************/
|
165 |
+
/*! exports provided: getApplauseStyles, ApplauseStyles */
|
166 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
167 |
+
|
168 |
+
"use strict";
|
169 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getApplauseStyles\", function() { return getApplauseStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ApplauseStyles\", function() { return ApplauseStyles; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/with-fallback-styles/util */ \"./client/components/with-fallback-styles/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getApplauseStyles = function getApplauseStyles(node) {\n if (null === node) {\n return {};\n }\n\n var buttonNode = node.querySelector('.wp-block-button__link');\n var textNode = node.querySelector('p');\n var surfaceColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(textNode);\n var textColor = window.getComputedStyle(textNode).color;\n var buttonBackgroundColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(buttonNode);\n var buttonBorderColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBorderColor\"])(buttonNode); // Ensure that we don't end up with the same color for surface and accent.\n // Falls back to button border color, then text color.\n\n var accentColor = buttonBackgroundColor;\n\n if (accentColor === surfaceColor) {\n accentColor = buttonBorderColor ? buttonBorderColor : textColor;\n }\n\n return {\n accent: accentColor,\n surface: surfaceColor,\n text: textColor\n };\n};\nvar ApplauseStyles = function ApplauseStyles() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link\"\n })));\n};\n\n//# sourceURL=webpack:///./client/components/applause/styles.js?");
|
170 |
+
|
171 |
+
/***/ }),
|
172 |
+
|
173 |
+
/***/ "./client/components/brand-link/index.js":
|
174 |
+
/*!***********************************************!*\
|
175 |
+
!*** ./client/components/brand-link/index.js ***!
|
176 |
+
\***********************************************/
|
177 |
+
/*! exports provided: default */
|
178 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
179 |
+
|
180 |
+
"use strict";
|
181 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n\nvar BrandLink = function BrandLink(_ref) {\n var showBranding = _ref.showBranding,\n referralCode = _ref.referralCode;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__branding\"\n }, showBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"a\", {\n className: \"crowdsignal-forms__branding-link with-external-icon\",\n href: \"https://crowdsignal.com?ref=\".concat(referralCode),\n target: \"blank\",\n rel: \"noopener noreferrer\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Powered by Crowdsignal', 'crowdsignal-forms')), !showBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms__branding-link\"\n }, \"\\xA0\"));\n};\n\nBrandLink.propTypes = {\n showBranding: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n referralCode: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (BrandLink);\n\n//# sourceURL=webpack:///./client/components/brand-link/index.js?");
|
182 |
+
|
183 |
+
/***/ }),
|
184 |
+
|
185 |
+
/***/ "./client/components/vote/util.js":
|
186 |
+
/*!****************************************!*\
|
187 |
+
!*** ./client/components/vote/util.js ***!
|
188 |
+
\****************************************/
|
189 |
+
/*! exports provided: formatVoteCount */
|
190 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
191 |
+
|
192 |
+
"use strict";
|
193 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatVoteCount\", function() { return formatVoteCount; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Formats the counter values on vote items:\n *\n * @param {number} count Vote count\n * @return {string} Formatted count\n */\n\nvar formatVoteCount = function formatVoteCount(count) {\n if (!count) {\n return '0';\n }\n\n if (count >= 10000000) {\n return \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"round\"])(count / 1000000), \"M\");\n }\n\n if (count >= 1000000) {\n return \"\".concat((count / 1000000).toFixed(1), \"M\");\n }\n\n if (count >= 10000) {\n return \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"round\"])(count / 1000), \"K\");\n }\n\n if (count >= 1000) {\n return \"\".concat((count / 1000).toFixed(1), \"K\");\n }\n\n return count.toString();\n};\n\n//# sourceURL=webpack:///./client/components/vote/util.js?");
|
194 |
+
|
195 |
+
/***/ }),
|
196 |
+
|
197 |
+
/***/ "./client/components/with-fallback-styles/index.js":
|
198 |
+
/*!*********************************************************!*\
|
199 |
+
!*** ./client/components/with-fallback-styles/index.js ***!
|
200 |
+
\*********************************************************/
|
201 |
+
/*! exports provided: withFallbackStyles */
|
202 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
203 |
+
|
204 |
+
"use strict";
|
205 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withFallbackStyles\", function() { return withFallbackStyles; });\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\nvar StyleProbe = function StyleProbe(_ref) {\n var children = _ref.children;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__style-probe\"\n }, children);\n};\n\nvar withFallbackStyles = function withFallbackStyles(VirtualComponent, getStyles) {\n return function (WrappedComponent) {\n var getFallbackStyles = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__[\"withFallbackStyles\"])(function (node) {\n return {\n fallbackStyles: getStyles(node.querySelector('.crowdsignal-forms__style-probe'))\n };\n });\n return getFallbackStyles(function (_ref2) {\n var fallbackStyles = _ref2.fallbackStyles,\n props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, [\"fallbackStyles\"]);\n\n var renderProbe = function renderProbe() {\n if (fallbackStyles) {\n return null;\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(StyleProbe, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(VirtualComponent, null));\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(WrappedComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n fallbackStyles: fallbackStyles || {},\n renderStyleProbe: renderProbe\n }, props));\n });\n };\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/index.js?");
|
206 |
+
|
207 |
+
/***/ }),
|
208 |
+
|
209 |
+
/***/ "./client/components/with-fallback-styles/util.js":
|
210 |
+
/*!********************************************************!*\
|
211 |
+
!*** ./client/components/with-fallback-styles/util.js ***!
|
212 |
+
\********************************************************/
|
213 |
+
/*! exports provided: getBackgroundColor, getBorderColor */
|
214 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
215 |
+
|
216 |
+
"use strict";
|
217 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBackgroundColor\", function() { return getBackgroundColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBorderColor\", function() { return getBorderColor; });\n/**\n * Traverses the parent chain of the given node to get a 'best guess' of\n * what the background color is if the provided node has a transparent background.\n * Algorithm for traversing parent chain \"borrowed\" from\n * https://github.com/WordPress/gutenberg/blob/0c6e369/packages/block-editor/src/components/colors/use-colors.js#L201-L216\n *\n * @param {Element} backgroundColorNode The element to check for background color\n * @return {string} The background colour of the node\n */\nvar getBackgroundColor = function getBackgroundColor(backgroundColorNode) {\n var backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n\n while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === window.Node.ELEMENT_NODE) {\n backgroundColorNode = backgroundColorNode.parentNode;\n backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n }\n\n return backgroundColor;\n};\n/**\n * Gets the border color for a node, if it appears valid.\n * If we get '0px' for the width, then we likely don't have a border and return null.\n * We use 'borderBlockStartWidth' because of FF: https://bugzilla.mozilla.org/show_bug.cgi?id=137688\n *\n * @param {Element} borderNode The element to check for a border color\n * @return {string|null} The border colour value of null if invalid\n */\n\nvar getBorderColor = function getBorderColor(borderNode) {\n var borderWidth = window.getComputedStyle(borderNode).borderBlockStartWidth;\n return borderWidth !== '0px' ? window.getComputedStyle(borderNode).borderBlockStartColor : null;\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/util.js?");
|
218 |
+
|
219 |
+
/***/ }),
|
220 |
+
|
221 |
+
/***/ "./client/data/hooks/index.js":
|
222 |
+
/*!************************************!*\
|
223 |
+
!*** ./client/data/hooks/index.js ***!
|
224 |
+
\************************************/
|
225 |
+
/*! exports provided: usePollResults, usePollVote, useIsCsConnected */
|
226 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
227 |
+
|
228 |
+
"use strict";
|
229 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollResults\", function() { return usePollResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollVote\", function() { return usePollVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useIsCsConnected\", function() { return useIsCsConnected; });\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! js-cookie */ \"./node_modules/js-cookie/src/js.cookie.js\");\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var data_poll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! data/poll */ \"./client/data/poll/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ \"./client/data/hooks/util.js\");\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar usePollResults = function usePollResults(pollId) {\n var doFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var _useFetch = Object(_util__WEBPACK_IMPORTED_MODULE_6__[\"useFetch\"])(function () {\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestResults\"])(pollId, doFetch);\n }, [pollId]),\n data = _useFetch.data,\n error = _useFetch.error,\n loading = _useFetch.loading;\n\n return {\n error: error,\n loading: loading,\n results: data\n };\n};\n/**\n * React Hook that returns state variables for voting status and a function to perform a vote.\n *\n * @param {number} pollId ID of the poll being loaded.\n * @param {boolean} enableVoteRestriction sets whether or not the vote cookie is read and set\n * @param {boolean} storeAnswerIdsInCookie sets whether or not the answer ids are stored in the vote restriction cookie\n */\n\nvar usePollVote = function usePollVote(pollId) {\n var enableVoteRestriction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var storeAnswerIdsInCookie = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var cookieName = \"cs-poll-\".concat(pollId);\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),\n isVoting = _useState2[0],\n setIsVoting = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),\n hasVoted = _useState4[0],\n setHasVoted = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(''),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),\n storedCookieValue = _useState6[0],\n setStoredCookieValue = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n if (enableVoteRestriction && undefined !== js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName)) {\n setHasVoted(true);\n setStoredCookieValue(js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName));\n }\n }, []);\n\n var vote = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(selectedAnswerIds) {\n var voteCount,\n nonce,\n cookieValue,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n voteCount = _args.length > 1 && _args[1] !== undefined ? _args[1] : 1;\n _context.prev = 1;\n setIsVoting(true);\n _context.next = 5;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVoteNonce\"])(pollId);\n\n case 5:\n nonce = _context.sent;\n _context.next = 8;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVote\"])(nonce, pollId, selectedAnswerIds, voteCount);\n\n case 8:\n setHasVoted(true);\n\n if (enableVoteRestriction) {\n cookieValue = storeAnswerIdsInCookie ? selectedAnswerIds.join(',') : new Date().getTime();\n js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.set(cookieName, cookieValue, {\n sameSite: 'Strict',\n expires: 365\n });\n setStoredCookieValue(cookieValue);\n }\n\n case 10:\n _context.prev = 10;\n setIsVoting(false);\n return _context.finish(10);\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[1,, 10, 13]]);\n }));\n\n return function vote(_x) {\n return _ref.apply(this, arguments);\n };\n }();\n\n return {\n hasVoted: hasVoted,\n isVoting: isVoting,\n vote: vote,\n storedCookieValue: storedCookieValue\n };\n};\nvar useIsCsConnected = function useIsCsConnected() {\n /* assume connection is enabled, so placeholder doesn't flash while we add a block and wait for the request */\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),\n isConnected = _useState8[0],\n setIsConnected = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),\n isAccountVerified = _useState10[0],\n setIsAccountVerified = _useState10[1];\n\n var checkIsConnected = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {\n var connectedState, isNowConnected, isNowVerified;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestIsCsConnected\"])();\n\n case 2:\n connectedState = _context2.sent;\n isNowConnected = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState || blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].NOT_VERIFIED === connectedState;\n isNowVerified = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState;\n setIsConnected(isNowConnected);\n setIsAccountVerified(isNowVerified);\n return _context2.abrupt(\"return\", {\n isNowConnected: isNowConnected,\n isNowVerified: isNowVerified\n });\n\n case 8:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function checkIsConnected() {\n return _ref2.apply(this, arguments);\n };\n }();\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n checkIsConnected();\n }, []);\n return {\n isConnected: isConnected,\n isAccountVerified: isAccountVerified,\n checkIsConnected: checkIsConnected\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/index.js?");
|
230 |
+
|
231 |
+
/***/ }),
|
232 |
+
|
233 |
+
/***/ "./client/data/hooks/util.js":
|
234 |
+
/*!***********************************!*\
|
235 |
+
!*** ./client/data/hooks/util.js ***!
|
236 |
+
\***********************************/
|
237 |
+
/*! exports provided: useFetch */
|
238 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
239 |
+
|
240 |
+
"use strict";
|
241 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useFetch\", function() { return useFetch; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\nvar useFetch = function useFetch(fetchCallback, watchProps) {\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n data = _useState2[0],\n setData = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),\n error = _useState4[0],\n setError = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(true),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),\n loading = _useState6[0],\n setLoading = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n setLoading(true);\n setError(null);\n setData(null);\n fetchCallback().then(setData).catch(setError).finally(function () {\n return setLoading(false);\n });\n }, watchProps);\n return {\n data: data,\n error: error,\n loading: loading\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/util.js?");
|
242 |
+
|
243 |
+
/***/ }),
|
244 |
+
|
245 |
+
/***/ "./client/data/poll/index.js":
|
246 |
+
/*!***********************************!*\
|
247 |
+
!*** ./client/data/poll/index.js ***!
|
248 |
+
\***********************************/
|
249 |
+
/*! exports provided: requestResults, requestVoteNonce, requestVote, CrowdsignalFormsError, CrowdsignalFormsServerError, requestIsCsConnected */
|
250 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
251 |
+
|
252 |
+
"use strict";
|
253 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestResults\", function() { return requestResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVoteNonce\", function() { return requestVoteNonce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVote\", function() { return requestVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsError\", function() { return CrowdsignalFormsError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsServerError\", function() { return CrowdsignalFormsServerError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestIsCsConnected\", function() { return requestIsCsConnected; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ \"./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\");\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ \"@wordpress/api-fetch\");\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\n/**\n * External dependencies\n */\n\n\n/**\n * Fetch the poll results for the given pollId\n *\n * @param {number} pollId Poll ID.\n * @param {boolean} doFetch Whether or not to actually perform the request.\n * @return {Promise} Promise that resolves to a key-value object with answer IDs and vote counts.\n */\n\nvar requestResults = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(pollId) {\n var doFetch,\n baseUrl,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n doFetch = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;\n baseUrl = 'https://api.crowdsignal.com/v3/polls';\n\n if (doFetch) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt(\"return\", null);\n\n case 4:\n return _context.abrupt(\"return\", window.fetch(\"\".concat(baseUrl, \"/\").concat(pollId, \"/results\"), {\n method: 'GET',\n headers: {\n 'content-type': 'application/json'\n }\n }).then(function (response) {\n if (response.status >= 200 && response.status < 300) {\n return response.json();\n }\n\n throw response;\n }).then(function (response) {\n if (404 === response.status) {\n // poll doesn't exist on the platform yet, return an empty result\n return {};\n } else if (response.error) {\n throw new Error(response.message);\n }\n\n return response.results.votes_by_answer;\n }));\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function requestResults(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar requestVoteNonce = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(pollId) {\n var hash, timestamp, respNonce, jsonNonce;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n hash = '5430eeac3911395001d731d9702fc38b'; // hash not used when format=json is passed\n\n timestamp = new Date().getTime();\n _context2.next = 4;\n return window.fetch(\"https://polldaddy.com/n/\".concat(hash, \"/\").concat(pollId, \"?\").concat(timestamp, \"&format=json\"));\n\n case 4:\n respNonce = _context2.sent;\n\n if (respNonce.ok) {\n _context2.next = 7;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 7:\n _context2.next = 9;\n return respNonce.json();\n\n case 9:\n jsonNonce = _context2.sent;\n\n if (jsonNonce.nonce) {\n _context2.next = 12;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 12:\n return _context2.abrupt(\"return\", jsonNonce.nonce);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function requestVoteNonce(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar requestVote = /*#__PURE__*/function () {\n var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3(nonce, pollId, selectedAnswerIds, voteCount) {\n var answerString, respVote, jsonVote;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n answerString = selectedAnswerIds.join(',');\n _context3.next = 3;\n return window.fetch(\"https://polls.polldaddy.com/vote-js.php?format=json&p=\".concat(pollId, \"&b=1&a=\").concat(answerString, \"&o=&va=16&cookie=0&n=\").concat(nonce, \"&url=\").concat(encodeURIComponent(window.location), \"&vi=\").concat(voteCount));\n\n case 3:\n respVote = _context3.sent;\n\n if (respVote.ok) {\n _context3.next = 6;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 6:\n _context3.next = 8;\n return respVote.json();\n\n case 8:\n jsonVote = _context3.sent;\n\n if (!('error' === jsonVote.status)) {\n _context3.next = 11;\n break;\n }\n\n throw new CrowdsignalFormsError(jsonVote.error);\n\n case 11:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function requestVote(_x3, _x4, _x5, _x6) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar CrowdsignalFormsError = /*#__PURE__*/function (_Error) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsError, _Error);\n\n var _super = _createSuper(CrowdsignalFormsError);\n\n function CrowdsignalFormsError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsError);\n\n return _super.apply(this, arguments);\n }\n\n return CrowdsignalFormsError;\n}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error));\nvar CrowdsignalFormsServerError = /*#__PURE__*/function (_CrowdsignalFormsErro) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsServerError, _CrowdsignalFormsErro);\n\n var _super2 = _createSuper(CrowdsignalFormsServerError);\n\n function CrowdsignalFormsServerError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsServerError);\n\n return _super2.call(this, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__[\"__\"])('Server error. Please try again.', 'crowdsignal-forms'));\n }\n\n return CrowdsignalFormsServerError;\n}(CrowdsignalFormsError);\n/**\n * Returns the connected state of the current user's account.\n *\n * @return {string} Enum value of the account's state.\n */\n\nvar requestIsCsConnected = /*#__PURE__*/function () {\n var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee4() {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({\n path: \"/crowdsignal-forms/v1/account/connected\",\n method: 'GET'\n });\n\n case 2:\n return _context4.abrupt(\"return\", _context4.sent);\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function requestIsCsConnected() {\n return _ref4.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack:///./client/data/poll/index.js?");
|
254 |
+
|
255 |
+
/***/ }),
|
256 |
+
|
257 |
+
/***/ "./client/lib/mutation-observer/index.js":
|
258 |
+
/*!***********************************************!*\
|
259 |
+
!*** ./client/lib/mutation-observer/index.js ***!
|
260 |
+
\***********************************************/
|
261 |
+
/*! exports provided: default */
|
262 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
263 |
+
|
264 |
+
"use strict";
|
265 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n\n\nvar MutationObserver = function MutationObserver(dataAttributeName, blockBuilder) {\n if ('complete' === document.readyState) {\n return blockObserver(dataAttributeName, blockBuilder);\n }\n\n window.addEventListener('load', function () {\n return blockObserver(dataAttributeName, blockBuilder);\n });\n};\n\nvar initBlocks = function initBlocks(dataAttributeName, blockBuilder) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"forEach\"])(document.querySelectorAll(\"div[\".concat(dataAttributeName, \"]\")), function (element) {\n // Try-catch potentially prevents other blocks from breaking\n // when there's more then one on the page\n try {\n var attributes = JSON.parse(element.dataset[Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"camelCase\"])(dataAttributeName.substr('data-'.length))]);\n var block = blockBuilder(attributes, element);\n element.removeAttribute(dataAttributeName);\n Object(react_dom__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(block, element);\n } catch (error) {\n // eslint-disable-next-line\n console.error('Crowdsignal Forms: Failed to parse block data for: %s', dataAttributeName);\n }\n });\n};\n\nvar blockObserver = function blockObserver(dataAttributeName, blockBuilder) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(window.CrowdsignalMutationObservers) && true === window.CrowdsignalMutationObservers[dataAttributeName]) {\n return;\n }\n\n var observer = new window.MutationObserver(function () {\n return initBlocks(dataAttributeName, blockBuilder);\n });\n observer.observe(document.body, {\n attributes: true,\n attributeFilter: [dataAttributeName],\n childList: true,\n subtree: true\n });\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(window.CrowdsignalMutationObservers)) {\n window.CrowdsignalMutationObservers = [];\n }\n\n window.CrowdsignalMutationObservers[dataAttributeName] = true; // Run the first pass on load\n\n initBlocks(dataAttributeName, blockBuilder);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MutationObserver);\n\n//# sourceURL=webpack:///./client/lib/mutation-observer/index.js?");
|
266 |
+
|
267 |
+
/***/ }),
|
268 |
+
|
269 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
270 |
+
/*!*****************************************************************!*\
|
271 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
272 |
+
\*****************************************************************/
|
273 |
+
/*! no static exports found */
|
274 |
+
/***/ (function(module, exports) {
|
275 |
+
|
276 |
+
eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
|
277 |
+
|
278 |
+
/***/ }),
|
279 |
+
|
280 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
281 |
+
/*!***************************************************************!*\
|
282 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
283 |
+
\***************************************************************/
|
284 |
+
/*! no static exports found */
|
285 |
+
/***/ (function(module, exports) {
|
286 |
+
|
287 |
+
eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
|
288 |
+
|
289 |
+
/***/ }),
|
290 |
+
|
291 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
292 |
+
/*!******************************************************************!*\
|
293 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
294 |
+
\******************************************************************/
|
295 |
+
/*! no static exports found */
|
296 |
+
/***/ (function(module, exports, __webpack_require__) {
|
297 |
+
|
298 |
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?");
|
299 |
+
|
300 |
+
/***/ }),
|
301 |
+
|
302 |
+
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
303 |
+
/*!**********************************************************************!*\
|
304 |
+
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
305 |
+
\**********************************************************************/
|
306 |
+
/*! no static exports found */
|
307 |
+
/***/ (function(module, exports) {
|
308 |
+
|
309 |
+
eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js?");
|
310 |
+
|
311 |
+
/***/ }),
|
312 |
+
|
313 |
+
/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
|
314 |
+
/*!*****************************************************************!*\
|
315 |
+
!*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
|
316 |
+
\*****************************************************************/
|
317 |
+
/*! no static exports found */
|
318 |
+
/***/ (function(module, exports) {
|
319 |
+
|
320 |
+
eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
|
321 |
+
|
322 |
+
/***/ }),
|
323 |
+
|
324 |
+
/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
325 |
+
/*!***************************************************************!*\
|
326 |
+
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
327 |
+
\***************************************************************/
|
328 |
+
/*! no static exports found */
|
329 |
+
/***/ (function(module, exports) {
|
330 |
+
|
331 |
+
eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js?");
|
332 |
+
|
333 |
+
/***/ }),
|
334 |
+
|
335 |
+
/***/ "./node_modules/@babel/runtime/helpers/construct.js":
|
336 |
+
/*!**********************************************************!*\
|
337 |
+
!*** ./node_modules/@babel/runtime/helpers/construct.js ***!
|
338 |
+
\**********************************************************/
|
339 |
+
/*! no static exports found */
|
340 |
+
/***/ (function(module, exports, __webpack_require__) {
|
341 |
+
|
342 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ \"./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/construct.js?");
|
343 |
+
|
344 |
+
/***/ }),
|
345 |
+
|
346 |
+
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
|
347 |
+
/*!***************************************************************!*\
|
348 |
+
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
349 |
+
\***************************************************************/
|
350 |
+
/*! no static exports found */
|
351 |
+
/***/ (function(module, exports) {
|
352 |
+
|
353 |
+
eval("function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js?");
|
354 |
+
|
355 |
+
/***/ }),
|
356 |
+
|
357 |
+
/***/ "./node_modules/@babel/runtime/helpers/extends.js":
|
358 |
+
/*!********************************************************!*\
|
359 |
+
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
|
360 |
+
\********************************************************/
|
361 |
+
/*! no static exports found */
|
362 |
+
/***/ (function(module, exports) {
|
363 |
+
|
364 |
+
eval("function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/extends.js?");
|
365 |
+
|
366 |
+
/***/ }),
|
367 |
+
|
368 |
+
/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
369 |
+
/*!***************************************************************!*\
|
370 |
+
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
371 |
+
\***************************************************************/
|
372 |
+
/*! no static exports found */
|
373 |
+
/***/ (function(module, exports) {
|
374 |
+
|
375 |
+
eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js?");
|
376 |
+
|
377 |
+
/***/ }),
|
378 |
+
|
379 |
+
/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
|
380 |
+
/*!*********************************************************!*\
|
381 |
+
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
382 |
+
\*********************************************************/
|
383 |
+
/*! no static exports found */
|
384 |
+
/***/ (function(module, exports, __webpack_require__) {
|
385 |
+
|
386 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/inherits.js?");
|
387 |
+
|
388 |
+
/***/ }),
|
389 |
+
|
390 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeFunction.js":
|
391 |
+
/*!*****************************************************************!*\
|
392 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
|
393 |
+
\*****************************************************************/
|
394 |
+
/*! no static exports found */
|
395 |
+
/***/ (function(module, exports) {
|
396 |
+
|
397 |
+
eval("function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeFunction.js?");
|
398 |
+
|
399 |
+
/***/ }),
|
400 |
+
|
401 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
|
402 |
+
/*!*************************************************************************!*\
|
403 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
|
404 |
+
\*************************************************************************/
|
405 |
+
/*! no static exports found */
|
406 |
+
/***/ (function(module, exports) {
|
407 |
+
|
408 |
+
eval("function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?");
|
409 |
+
|
410 |
+
/***/ }),
|
411 |
+
|
412 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
413 |
+
/*!****************************************************************!*\
|
414 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
415 |
+
\****************************************************************/
|
416 |
+
/*! no static exports found */
|
417 |
+
/***/ (function(module, exports) {
|
418 |
+
|
419 |
+
eval("function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js?");
|
420 |
+
|
421 |
+
/***/ }),
|
422 |
+
|
423 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
424 |
+
/*!*********************************************************************!*\
|
425 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
426 |
+
\*********************************************************************/
|
427 |
+
/*! no static exports found */
|
428 |
+
/***/ (function(module, exports) {
|
429 |
+
|
430 |
+
eval("function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
|
431 |
+
|
432 |
+
/***/ }),
|
433 |
+
|
434 |
+
/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
435 |
+
/*!****************************************************************!*\
|
436 |
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
437 |
+
\****************************************************************/
|
438 |
+
/*! no static exports found */
|
439 |
+
/***/ (function(module, exports) {
|
440 |
+
|
441 |
+
eval("function _nonIterableRest() {\n 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}\n\nmodule.exports = _nonIterableRest;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js?");
|
442 |
+
|
443 |
+
/***/ }),
|
444 |
+
|
445 |
+
/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
|
446 |
+
/*!******************************************************************!*\
|
447 |
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
|
448 |
+
\******************************************************************/
|
449 |
+
/*! no static exports found */
|
450 |
+
/***/ (function(module, exports) {
|
451 |
+
|
452 |
+
eval("function _nonIterableSpread() {\n 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}\n\nmodule.exports = _nonIterableSpread;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js?");
|
453 |
+
|
454 |
+
/***/ }),
|
455 |
+
|
456 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
|
457 |
+
/*!************************************************************************!*\
|
458 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
|
459 |
+
\************************************************************************/
|
460 |
+
/*! no static exports found */
|
461 |
+
/***/ (function(module, exports, __webpack_require__) {
|
462 |
+
|
463 |
+
eval("var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js?");
|
464 |
+
|
465 |
+
/***/ }),
|
466 |
+
|
467 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
|
468 |
+
/*!*****************************************************************************!*\
|
469 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
|
470 |
+
\*****************************************************************************/
|
471 |
+
/*! no static exports found */
|
472 |
+
/***/ (function(module, exports) {
|
473 |
+
|
474 |
+
eval("function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?");
|
475 |
+
|
476 |
+
/***/ }),
|
477 |
+
|
478 |
+
/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
479 |
+
/*!**************************************************************************!*\
|
480 |
+
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
481 |
+
\**************************************************************************/
|
482 |
+
/*! no static exports found */
|
483 |
+
/***/ (function(module, exports, __webpack_require__) {
|
484 |
+
|
485 |
+
eval("var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?");
|
486 |
+
|
487 |
+
/***/ }),
|
488 |
+
|
489 |
+
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
490 |
+
/*!***************************************************************!*\
|
491 |
+
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
492 |
+
\***************************************************************/
|
493 |
+
/*! no static exports found */
|
494 |
+
/***/ (function(module, exports) {
|
495 |
+
|
496 |
+
eval("function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js?");
|
497 |
+
|
498 |
+
/***/ }),
|
499 |
+
|
500 |
+
/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
501 |
+
/*!**************************************************************!*\
|
502 |
+
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
503 |
+
\**************************************************************/
|
504 |
+
/*! no static exports found */
|
505 |
+
/***/ (function(module, exports, __webpack_require__) {
|
506 |
+
|
507 |
+
eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js?");
|
508 |
+
|
509 |
+
/***/ }),
|
510 |
+
|
511 |
+
/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
|
512 |
+
/*!******************************************************************!*\
|
513 |
+
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
|
514 |
+
\******************************************************************/
|
515 |
+
/*! no static exports found */
|
516 |
+
/***/ (function(module, exports, __webpack_require__) {
|
517 |
+
|
518 |
+
eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\n\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js?");
|
519 |
+
|
520 |
+
/***/ }),
|
521 |
+
|
522 |
+
/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
|
523 |
+
/*!*******************************************************!*\
|
524 |
+
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
525 |
+
\*******************************************************/
|
526 |
+
/*! no static exports found */
|
527 |
+
/***/ (function(module, exports) {
|
528 |
+
|
529 |
+
eval("function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/typeof.js?");
|
530 |
+
|
531 |
+
/***/ }),
|
532 |
+
|
533 |
+
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
534 |
+
/*!***************************************************************************!*\
|
535 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
536 |
+
\***************************************************************************/
|
537 |
+
/*! no static exports found */
|
538 |
+
/***/ (function(module, exports, __webpack_require__) {
|
539 |
+
|
540 |
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");
|
541 |
+
|
542 |
+
/***/ }),
|
543 |
+
|
544 |
+
/***/ "./node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
|
545 |
+
/*!****************************************************************!*\
|
546 |
+
!*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
|
547 |
+
\****************************************************************/
|
548 |
+
/*! no static exports found */
|
549 |
+
/***/ (function(module, exports, __webpack_require__) {
|
550 |
+
|
551 |
+
eval("var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n\nvar setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeFunction = __webpack_require__(/*! ./isNativeFunction */ \"./node_modules/@babel/runtime/helpers/isNativeFunction.js\");\n\nvar construct = __webpack_require__(/*! ./construct */ \"./node_modules/@babel/runtime/helpers/construct.js\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/wrapNativeSuper.js?");
|
552 |
+
|
553 |
+
/***/ }),
|
554 |
+
|
555 |
+
/***/ "./node_modules/classnames/index.js":
|
556 |
+
/*!******************************************!*\
|
557 |
+
!*** ./node_modules/classnames/index.js ***!
|
558 |
+
\******************************************/
|
559 |
+
/*! no static exports found */
|
560 |
+
/***/ (function(module, exports, __webpack_require__) {
|
561 |
+
|
562 |
+
eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?");
|
563 |
+
|
564 |
+
/***/ }),
|
565 |
+
|
566 |
+
/***/ "./node_modules/js-cookie/src/js.cookie.js":
|
567 |
+
/*!*************************************************!*\
|
568 |
+
!*** ./node_modules/js-cookie/src/js.cookie.js ***!
|
569 |
+
\*************************************************/
|
570 |
+
/*! no static exports found */
|
571 |
+
/***/ (function(module, exports, __webpack_require__) {
|
572 |
+
|
573 |
+
eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (true) {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n\n\n//# sourceURL=webpack:///./node_modules/js-cookie/src/js.cookie.js?");
|
574 |
+
|
575 |
+
/***/ }),
|
576 |
+
|
577 |
+
/***/ "./node_modules/object-assign/index.js":
|
578 |
+
/*!*********************************************!*\
|
579 |
+
!*** ./node_modules/object-assign/index.js ***!
|
580 |
+
\*********************************************/
|
581 |
+
/*! no static exports found */
|
582 |
+
/***/ (function(module, exports, __webpack_require__) {
|
583 |
+
|
584 |
+
"use strict";
|
585 |
+
eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack:///./node_modules/object-assign/index.js?");
|
586 |
+
|
587 |
+
/***/ }),
|
588 |
+
|
589 |
+
/***/ "./node_modules/prop-types/checkPropTypes.js":
|
590 |
+
/*!***************************************************!*\
|
591 |
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
592 |
+
\***************************************************/
|
593 |
+
/*! no static exports found */
|
594 |
+
/***/ (function(module, exports, __webpack_require__) {
|
595 |
+
|
596 |
+
"use strict";
|
597 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (undefined !== 'production') {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (undefined !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (undefined !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/checkPropTypes.js?");
|
598 |
+
|
599 |
+
/***/ }),
|
600 |
+
|
601 |
+
/***/ "./node_modules/prop-types/factoryWithThrowingShims.js":
|
602 |
+
/*!*************************************************************!*\
|
603 |
+
!*** ./node_modules/prop-types/factoryWithThrowingShims.js ***!
|
604 |
+
\*************************************************************/
|
605 |
+
/*! no static exports found */
|
606 |
+
/***/ (function(module, exports, __webpack_require__) {
|
607 |
+
|
608 |
+
"use strict";
|
609 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithThrowingShims.js?");
|
610 |
+
|
611 |
+
/***/ }),
|
612 |
+
|
613 |
+
/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
|
614 |
+
/*!************************************************************!*\
|
615 |
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
616 |
+
\************************************************************/
|
617 |
+
/*! no static exports found */
|
618 |
+
/***/ (function(module, exports, __webpack_require__) {
|
619 |
+
|
620 |
+
"use strict";
|
621 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (undefined !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (undefined !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (undefined !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (undefined !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n undefined !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js?");
|
622 |
+
|
623 |
+
/***/ }),
|
624 |
+
|
625 |
+
/***/ "./node_modules/prop-types/index.js":
|
626 |
+
/*!******************************************!*\
|
627 |
+
!*** ./node_modules/prop-types/index.js ***!
|
628 |
+
\******************************************/
|
629 |
+
/*! no static exports found */
|
630 |
+
/***/ (function(module, exports, __webpack_require__) {
|
631 |
+
|
632 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (undefined !== 'production') {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(/*! ./factoryWithThrowingShims */ \"./node_modules/prop-types/factoryWithThrowingShims.js\")();\n}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?");
|
633 |
+
|
634 |
+
/***/ }),
|
635 |
+
|
636 |
+
/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
637 |
+
/*!*************************************************************!*\
|
638 |
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
639 |
+
\*************************************************************/
|
640 |
+
/*! no static exports found */
|
641 |
+
/***/ (function(module, exports, __webpack_require__) {
|
642 |
+
|
643 |
+
"use strict";
|
644 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js?");
|
645 |
+
|
646 |
+
/***/ }),
|
647 |
+
|
648 |
+
/***/ "./node_modules/react-is/cjs/react-is.development.js":
|
649 |
+
/*!***********************************************************!*\
|
650 |
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
651 |
+
\***********************************************************/
|
652 |
+
/*! no static exports found */
|
653 |
+
/***/ (function(module, exports, __webpack_require__) {
|
654 |
+
|
655 |
+
"use strict";
|
656 |
+
eval("/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (undefined !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-is/cjs/react-is.development.js?");
|
657 |
+
|
658 |
+
/***/ }),
|
659 |
+
|
660 |
+
/***/ "./node_modules/react-is/cjs/react-is.production.min.js":
|
661 |
+
/*!**************************************************************!*\
|
662 |
+
!*** ./node_modules/react-is/cjs/react-is.production.min.js ***!
|
663 |
+
\**************************************************************/
|
664 |
+
/*! no static exports found */
|
665 |
+
/***/ (function(module, exports, __webpack_require__) {
|
666 |
+
|
667 |
+
"use strict";
|
668 |
+
eval("/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n\n\n//# sourceURL=webpack:///./node_modules/react-is/cjs/react-is.production.min.js?");
|
669 |
+
|
670 |
+
/***/ }),
|
671 |
+
|
672 |
+
/***/ "./node_modules/react-is/index.js":
|
673 |
+
/*!****************************************!*\
|
674 |
+
!*** ./node_modules/react-is/index.js ***!
|
675 |
+
\****************************************/
|
676 |
+
/*! no static exports found */
|
677 |
+
/***/ (function(module, exports, __webpack_require__) {
|
678 |
+
|
679 |
+
"use strict";
|
680 |
+
eval("\n\nif (undefined === 'production') {\n module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ \"./node_modules/react-is/cjs/react-is.production.min.js\");\n} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-is/index.js?");
|
681 |
+
|
682 |
+
/***/ }),
|
683 |
+
|
684 |
+
/***/ "@babel/runtime/regenerator":
|
685 |
+
/*!**********************************************!*\
|
686 |
+
!*** external {"this":"regeneratorRuntime"} ***!
|
687 |
+
\**********************************************/
|
688 |
+
/*! no static exports found */
|
689 |
+
/***/ (function(module, exports) {
|
690 |
+
|
691 |
+
eval("(function() { module.exports = this[\"regeneratorRuntime\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22regeneratorRuntime%22%7D?");
|
692 |
+
|
693 |
+
/***/ }),
|
694 |
+
|
695 |
+
/***/ "@wordpress/api-fetch":
|
696 |
+
/*!*******************************************!*\
|
697 |
+
!*** external {"this":["wp","apiFetch"]} ***!
|
698 |
+
\*******************************************/
|
699 |
+
/*! no static exports found */
|
700 |
+
/***/ (function(module, exports) {
|
701 |
+
|
702 |
+
eval("(function() { module.exports = this[\"wp\"][\"apiFetch\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22apiFetch%22%5D%7D?");
|
703 |
+
|
704 |
+
/***/ }),
|
705 |
+
|
706 |
+
/***/ "@wordpress/blocks":
|
707 |
+
/*!*****************************************!*\
|
708 |
+
!*** external {"this":["wp","blocks"]} ***!
|
709 |
+
\*****************************************/
|
710 |
+
/*! no static exports found */
|
711 |
+
/***/ (function(module, exports) {
|
712 |
+
|
713 |
+
eval("(function() { module.exports = this[\"wp\"][\"blocks\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22blocks%22%5D%7D?");
|
714 |
+
|
715 |
+
/***/ }),
|
716 |
+
|
717 |
+
/***/ "@wordpress/components":
|
718 |
+
/*!*********************************************!*\
|
719 |
+
!*** external {"this":["wp","components"]} ***!
|
720 |
+
\*********************************************/
|
721 |
+
/*! no static exports found */
|
722 |
+
/***/ (function(module, exports) {
|
723 |
+
|
724 |
+
eval("(function() { module.exports = this[\"wp\"][\"components\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22components%22%5D%7D?");
|
725 |
+
|
726 |
+
/***/ }),
|
727 |
+
|
728 |
+
/***/ "@wordpress/element":
|
729 |
+
/*!******************************************!*\
|
730 |
+
!*** external {"this":["wp","element"]} ***!
|
731 |
+
\******************************************/
|
732 |
+
/*! no static exports found */
|
733 |
+
/***/ (function(module, exports) {
|
734 |
+
|
735 |
+
eval("(function() { module.exports = this[\"wp\"][\"element\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22element%22%5D%7D?");
|
736 |
+
|
737 |
+
/***/ }),
|
738 |
+
|
739 |
+
/***/ "@wordpress/i18n":
|
740 |
+
/*!***************************************!*\
|
741 |
+
!*** external {"this":["wp","i18n"]} ***!
|
742 |
+
\***************************************/
|
743 |
+
/*! no static exports found */
|
744 |
+
/***/ (function(module, exports) {
|
745 |
+
|
746 |
+
eval("(function() { module.exports = this[\"wp\"][\"i18n\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22i18n%22%5D%7D?");
|
747 |
+
|
748 |
+
/***/ }),
|
749 |
+
|
750 |
+
/***/ "lodash":
|
751 |
+
/*!**********************************!*\
|
752 |
+
!*** external {"this":"lodash"} ***!
|
753 |
+
\**********************************/
|
754 |
+
/*! no static exports found */
|
755 |
+
/***/ (function(module, exports) {
|
756 |
+
|
757 |
+
eval("(function() { module.exports = this[\"lodash\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22lodash%22%7D?");
|
758 |
+
|
759 |
+
/***/ }),
|
760 |
+
|
761 |
+
/***/ "react":
|
762 |
+
/*!*********************************!*\
|
763 |
+
!*** external {"this":"React"} ***!
|
764 |
+
\*********************************/
|
765 |
+
/*! no static exports found */
|
766 |
+
/***/ (function(module, exports) {
|
767 |
+
|
768 |
+
eval("(function() { module.exports = this[\"React\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22React%22%7D?");
|
769 |
+
|
770 |
+
/***/ }),
|
771 |
+
|
772 |
+
/***/ "react-dom":
|
773 |
+
/*!************************************!*\
|
774 |
+
!*** external {"this":"ReactDOM"} ***!
|
775 |
+
\************************************/
|
776 |
+
/*! no static exports found */
|
777 |
+
/***/ (function(module, exports) {
|
778 |
+
|
779 |
+
eval("(function() { module.exports = this[\"ReactDOM\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22ReactDOM%22%7D?");
|
780 |
+
|
781 |
+
/***/ })
|
782 |
+
|
783 |
+
/******/ })));
|
build/editor.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '3bddbc4a608cc6dcddbbda79a03d06e7');
|
build/editor.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-left:0;margin-right:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-left:auto;margin-right:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-left:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-left:0;margin-right:0}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:28px !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-left:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;right:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;right:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:0}.crowdsignal-forms-applause.size-small{padding:20px 16px 18px 12px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 16px 20px 8px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 18px 22px 8px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}
|
1 |
+
.crowdsignal-forms__connect-to-crowdsignal{border:1px solid #000;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:24px;text-align:initial}.crowdsignal-forms__connect-to-crowdsignal-header{display:flex;flex-direction:row;align-items:center}.crowdsignal-forms__connect-to-crowdsignal-body{font-size:13px;margin-top:24px;margin-bottom:16px}.crowdsignal-forms__connect-to-crowdsignal-title{font-size:24pt;margin-inline-start:16px}#editor .editor-styles-wrapper .crowdsignal-forms-poll{margin-left:0;margin-right:0}#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}@media screen and (min-width: 660px){#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="wide"] .crowdsignal-forms-poll__content,#editor .editor-styles-wrapper .block-editor-block-list__block[data-type="crowdsignal-forms/poll"][data-align="full"] .crowdsignal-forms-poll__content{padding:80px}}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer{cursor:text}#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer:hover,#editor .editor-styles-wrapper .crowdsignal-forms-poll__answer.is-focused{color:inherit}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{cursor:text}#editor .editor-styles-wrapper .wp-block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:inherit}.crowdsignal-forms-poll__resize-wrapper{margin-left:auto;margin-right:auto}.crowdsignal-forms__redirect-url input[type="text"]{width:100%}.crowdsignal-forms__redirect-url__suggestions{width:260px}.crowdsignal-forms__row{display:flex;flex-direction:row}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="text"]{width:40px}.crowdsignal-forms__row .crowdsignal-forms__small-text-input input[type="number"]{width:50px}.crowdsignal-forms__reset-width-button{margin-left:auto;margin-top:25px}.crowdsignal-forms-poll__edit-bar{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.crowdsignal-forms-poll__edit-bar .crowdsignal-forms-poll__edit-bar-message{padding-inline-end:24px}.crowdsignal-forms-poll__edit-bar button.crowdsignal-forms-poll__edit-bar-button{border:2px solid #d82e20;border-radius:4px;color:#d82e20;background:transparent;padding:8px 16px;cursor:pointer}.crowdsignal-poll-wrapper:not(:first-child),[data-type="crowdsignal-forms/poll"]:not(:first-child){margin-top:3em}.crowdsignal-poll-wrapper:not(:last-child),[data-type="crowdsignal-forms/poll"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-poll{border-color:var(--crowdsignal-forms-border-color);border-style:solid;border-width:var(--crowdsignal-forms-border-width);margin-left:auto;margin-right:auto;margin-top:5px;position:relative;text-align:left}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll{border-left-width:0;border-right-width:0}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question{margin:0 0 28px}.crowdsignal-forms-poll h3.crowdsignal-forms-poll__question:first-child{margin-top:0}.crowdsignal-forms-poll p.crowdsignal-forms-poll__note{font-style:italic;margin:0 0 32px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:40px 24px 16px 24px}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__question{font-family:var(--crowdsignal-forms-question-font-family)}.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-label,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__answer-results-answer,.crowdsignal-forms-poll .crowdsignal-forms-poll__content .crowdsignal-forms-poll__note{font-family:var(--crowdsignal-forms-body-font-family)}.entry-content .alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{margin:0 auto;max-width:var(--crowdsignal-forms-content-wide-width)}@media screen and (min-width: 660px){.alignwide.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content,.alignfull.crowdsignal-poll-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__content{padding:80px}}.crowdsignal-forms-poll.is-closed .crowdsignal-forms-poll__form{opacity:0.5}.crowdsignal-forms-poll.is-hidden{opacity:0.5}.crowdsignal-forms-poll.has-text-color{color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll.has-bg-color{background-color:var(--crowdsignal-forms-bg-color)}.crowdsignal-forms-poll.has-border-radius{border-radius:var(--crowdsignal-forms-border-radius);overflow:hidden}.crowdsignal-forms-poll.has-box-shadow{box-shadow:0 3px 6px rgba(0,0,0,0.16),0 3px 6px rgba(0,0,0,0.23)}.crowdsignal-forms-poll .is-transparent{opacity:0;pointer-events:none}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button{-webkit-appearance:initial}.crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button:disabled{opacity:0.7}.crowdsignal-forms-poll.has-submit-button-text-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{color:var(--crowdsignal-forms-submit-button-text-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link{background-color:var(--crowdsignal-forms-submit-button-bg-color)}.crowdsignal-forms-poll.has-submit-button-bg-color .crowdsignal-forms-poll__block-button .crowdsignal-forms-poll__submit-button.wp-block-button__link:hover{opacity:0.9}.crowdsignal-forms-poll__options.is-button{display:flex;flex-direction:column;flex-wrap:wrap}.crowdsignal-forms-poll__options.is-button.is-inline-button-alignment{flex-direction:row}.crowdsignal-forms-poll__answer{cursor:pointer;display:flex;font-size:inherit;font-weight:600;margin:0;padding:0 2px;position:relative}.crowdsignal-forms-poll__answer.is-button{margin-inline-end:20px;margin-block-end:20px;max-width:100%}.crowdsignal-forms-poll__answer.is-button .wp-block-button.crowdsignal-forms-poll__block-button,.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{max-width:100%}.crowdsignal-forms-poll__answer.is-button .crowdsignal-forms-poll__submit-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crowdsignal-forms-poll__answer:not(.is-button){margin-block-end:16px}.crowdsignal-forms-poll__answer:hover,.crowdsignal-forms-poll__answer.is-focused{color:var(--crowdsignal-forms-submit-button-bg-color)}.has-voted .crowdsignal-forms-poll__answer{opacity:0.5}input[type="checkbox"].crowdsignal-forms-poll__input,input[type="radio"].crowdsignal-forms-poll__input{height:0;opacity:0;position:absolute;width:0}.crowdsignal-forms-poll__check{display:inline-block;height:1em;margin:0 10px 0 0;position:relative;width:1em}.crowdsignal-forms-poll__check::before{background-color:transparent;border:1.5px solid var(--crowdsignal-forms-text-color);border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;transition:background-color 0.3s, border-color 0.3s;width:100%}.crowdsignal-forms-poll__answer.is-multiple-choice .crowdsignal-forms-poll__check::before{border-radius:3px}.crowdsignal-forms-poll__answer.is-multiple-choice.is-selected .crowdsignal-forms-poll__check::before{border-color:var(--crowdsignal-forms-text-color);background-color:var(--crowdsignal-forms-text-color)}.crowdsignal-forms-poll__answer.is-selected:not(.is-multiple-choice) .crowdsignal-forms-poll__check::after{animation-duration:0.3s;animation-name:crowdsignal-forms-animation__pop;animation-iteration-count:1;background-clip:padding-box;background-color:var(--crowdsignal-forms-text-color);border:4.5px solid transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;left:0;top:0;width:100%}.crowdsignal-forms-poll__answer.is-selected.is-multiple-choice .crowdsignal-forms-poll__check::after{border-color:var(--crowdsignal-forms-submit-button-text-color);border-style:solid;border-width:0 0 2px 2px;box-sizing:border-box;content:"";display:block;height:25%;margin:-0.1em 0 0 -0.2em;position:absolute;left:50%;top:50%;transform:rotateZ(-45deg);width:50%}div.crowdsignal-forms-poll__answer-label-wrapper{flex:1;word-break:break-word}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label{line-height:1;vertical-align:top}div.crowdsignal-forms-poll__answer-label-wrapper span.crowdsignal-forms-poll__answer-label span::after{vertical-align:top}.crowdsignal-forms-poll__button{border:0;padding:0}.crowdsignal-forms-poll__actions .wp-block-button,.crowdsignal-forms-poll__options .wp-block-button{margin:0}.crowdsignal-forms-poll__actions{display:flex;justify-content:flex-end}.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__actions .wp-block-button.crowdsignal-forms-poll__block-button,.editor-styles-wrapper .crowdsignal-forms-poll .crowdsignal-forms-poll__options .wp-block-button.crowdsignal-forms-poll__block-button{margin:0}.crowdsignal-forms-poll__closed-banner{background-color:var(--crowdsignal-forms-border-color);box-sizing:border-box;display:flex;color:var(--crowdsignal-forms-submit-button-text-color);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;justify-content:center;padding:calc(var(--crowdsignal-forms-border-width) + 0.2em) 0 0.2em;width:100%}.is-hidden .crowdsignal-forms-poll__closed-banner{font-style:italic}.crowdsignal-forms-poll__error{color:red}.crowdsignal-forms-poll__results-list{margin:0 0 1em;position:relative}.crowdsignal-forms-poll__answer-results{display:flex;flex-direction:column;margin:0 0 16px;width:100%}.crowdsignal-forms-poll__answer-results:last-child{margin:0}.crowdsignal-forms-poll__answer-results-labels{align-items:flex-end;display:flex;margin:0 0 8px;width:100%;word-break:break-word}.crowdsignal-forms-poll__answer-results-answer{flex:1;font-size:1em;font-weight:600}.crowdsignal-forms-poll__answer-results-votes{font-size:0.75em;line-height:2}.crowdsignal-forms-poll__answer-results-percent{font-weight:600;line-height:1.6}.crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results-percent{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-left:20px;transition:opacity 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-percent{display:none}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse;background-color:var(--crowdsignal-forms-text-color);font-size:0.7em;height:1em;width:50px}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-votes:last-child,.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-percent:last-child{width:40px}.crowdsignal-forms-poll__answer-results-progress-track{border:1px solid;border-color:rgba(var(--crowdsignal-forms-text-color-properties), 0.3);box-sizing:border-box;height:1em;width:100%}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-track{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:crowdsignal-forms-animation__pulse}.crowdsignal-forms-poll__answer-results-progress-bar{animation-fill-mode:forwards;background-color:var(--crowdsignal-forms-submit-button-bg-color);height:100%;transition:background-color 0.3s, width 0.3s}.crowdsignal-forms-poll__answer-results.is-error .crowdsignal-forms-poll__answer-results-progress-bar{width:0}.crowdsignal-forms-poll__answer-results.is-loading .crowdsignal-forms-poll__answer-results-progress-bar{background-color:var(--crowdsignal-forms-text-color);width:25%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+1) .crowdsignal-forms-poll__answer-results-progress-bar{width:40%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+2) .crowdsignal-forms-poll__answer-results-progress-bar{width:75%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+3) .crowdsignal-forms-poll__answer-results-progress-bar{width:50%}.crowdsignal-forms-poll__answer-results.is-loading:nth-child(5n+4) .crowdsignal-forms-poll__answer-results-progress-bar{width:60%}.crowdsignal-forms-poll__results-footer{display:flex;flex-direction:column;justify-content:space-between;width:100%;font-size:0.9em}.crowdsignal-forms-poll__results-total{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;position:relative;text-align:right;width:100%;margin-bottom:1em}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total{color:transparent}.crowdsignal-forms-poll__results.is-loading .crowdsignal-forms-poll__results-total::before{animation-name:crowdsignal-forms-animation__pulse;animation-duration:1.5s;animation-iteration-count:infinite;background-color:var(--crowdsignal-forms-text-color);content:"";display:block;position:absolute;right:0;height:1em;width:150px}.crowdsignal-forms-poll__footer-branding{display:flex;justify-content:space-between;align-items:center;width:100%}.crowdsignal-forms-poll__footer-branding img.crowdsignal-forms-poll__footer-branding-logo{width:50px;height:50px;margin-left:0;margin-right:0}.crowdsignal-forms-poll__footer-cs-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:16px;text-decoration:none;text-transform:uppercase}.crowdsignal-forms-poll__footer-cs-link:not(:hover){color:var(--crowdsignal-forms-text-color);opacity:0.4}.has-default-thankyou .crowdsignal-forms-poll__footer-cs-link{color:#333}.crowdsignal-forms-poll__error-banner{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:13px;margin-top:24px;padding:18px 24px;color:#d82e20;border-left:4px solid #d82e20;background:#f8dad8}.crowdsignal-forms-poll__submit-message-container{position:absolute;background-color:var(--crowdsignal-forms-bg-color);left:0;top:0;width:100%;height:100%;overflow:hidden}.has-default-thankyou .crowdsignal-forms-poll__submit-message-container{background-color:#fff}.crowdsignal-forms-poll__submit-message{position:relative}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message{position:absolute;right:0;top:0;background-color:transparent;color:#000;text-decoration:none;border:none}.crowdsignal-forms-poll__submit-message button.crowdsignal-forms-poll__dismiss-submit-message:hover{background:inherit}.crowdsignal-forms-poll__submit-message-footer{position:absolute;bottom:0;left:0;padding:16px 24px;width:100%;background-color:inherit}.crowdsignal-forms-poll__thank-you-cs-sticker{right:25px;top:66px}.crowdsignal-forms-poll__thank-you-sticker{right:132px;top:12px}.crowdsignal-forms-poll__thank-you-cs-sticker,.crowdsignal-forms-poll__thank-you-sticker{filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2));width:100px;height:100px;position:absolute}.crowdsignal-forms-poll__custom-message-check{color:var(--crowdsignal-forms-text-color);padding-left:24px;padding-top:24px}.crowdsignal-forms-poll__custom-message{font-family:var(--crowdsignal-forms-question-font-family);font-weight:600;padding:16px 24px}.wp_block-crowdsignal-forms-poll__vote-branding{margin-top:16px}.crowdsignal-forms__style-probe{display:none}.crowdsignal-forms-vote .block-editor-block-list__layout{display:flex;flex-direction:row}.crowdsignal-forms__border-popover .crowdsignal-forms__row{padding:10px}.crowdsignal-forms-vote.no-results .crowdsignal-forms-vote-item__count{display:none}.crowdsignal-forms-vote__size-dropdown .components-button.components-dropdown-menu__menu-item.is-active::after{content:"\2713";margin-inline-start:auto;margin-inline-end:0}.crowdsignal-vote-wrapper:not(:first-child),[data-type="crowdsignal-forms/vote"]:not(:first-child){margin-top:3em}.crowdsignal-vote-wrapper:not(:last-child),[data-type="crowdsignal-forms/vote"]:not(:last-child){margin-bottom:3em}.crowdsignal-forms-vote{align-items:center;display:inline-flex;flex-direction:column}.crowdsignal-forms-vote.crowdsignal-forms-vote__example{align-items:center}[data-type="crowdsignal-forms/vote-item"]{margin-top:28px !important;margin-bottom:28px !important}.crowdsignal-forms-vote__items{display:flex;flex-direction:row}.crowdsignal-forms-vote-item{border:var(--crowdsignal-forms-vote-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-vote-border-radius);cursor:pointer;display:flex;flex-direction:row;align-items:center;position:relative;user-select:none;-webkit-user-select:none}.crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:8px !important}.crowdsignal-forms-vote-item.has-bg-color{background-color:var(--crowdsignal-forms-vote-bg-color)}.crowdsignal-forms-vote-item.has-border-color{border-color:var(--crowdsignal-forms-vote-border-color)}.crowdsignal-forms-vote-item.has-text-color{color:var(--crowdsignal-forms-vote-text-color)}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled{cursor:inherit}.is-closed .crowdsignal-forms-vote-item,.crowdsignal-forms-vote-item.is-disabled:not(.is-voted-on){opacity:0.5}.size-small .crowdsignal-forms-vote-item{padding:18px 10px;height:0.7em}.size-small .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-medium .crowdsignal-forms-vote-item{height:1em;padding:20px 10px}.size-medium .crowdsignal-forms-vote-item.is-type-down{padding-left:9px}.size-large .crowdsignal-forms-vote-item{height:1.2em;padding:22px 16px}.size-large .crowdsignal-forms-vote-item:not(:last-child){margin-inline-end:16px !important}.size-large .crowdsignal-forms-vote-item.is-type-down{padding-left:15px}.crowdsignal-forms-vote-item.is-voted-on,.crowdsignal-forms-vote-item:hover:not(.is-disabled),.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor){border-color:var(--crowdsignal-forms-vote-voted-color);color:var(--crowdsignal-forms-vote-voted-color)}.crowdsignal-forms-vote-item.is-voted-on.has-bg-color,.crowdsignal-forms-vote-item.is-voted-on.has-text-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-bg-color,.crowdsignal-forms-vote-item:hover:not(.is-disabled).has-text-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-bg-color,.crowdsignal-forms-vote-item:focus:not(.is-disabled):not(.is-in-editor).has-text-color{background-color:var(--crowdsignal-forms-vote-text-color);border-color:var(--crowdsignal-forms-vote-bg-color);color:var(--crowdsignal-forms-vote-bg-color)}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:0.7em;height:0.7em;max-height:0.7em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1em;height:1em;max-height:1em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__icon{width:1.2em;height:1.2em;max-height:1.2em}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item__icon{animation-duration:0.4s;animation-name:crowdsignal-forms-animation__grow;animation-iteration-count:1;animation-timing-function:ease-out}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:14pt;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;margin-inline-start:10px;font-variant-numeric:tabular-nums;transform:rotateX(0deg);transform-origin:50% 50% 10px;transition:transform 0.3s}.size-small .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.6em}.size-medium .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:0.8em}.size-large .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count{font-size:1em}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter-active{margin:0;position:absolute;right:0}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(-90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-enter{transform:rotateX(90deg)}.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{margin:0;position:absolute;right:10px;top:4px;transform:rotateX(90deg)}.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit,.crowdsignal-forms-vote-item.is-voted-on .crowdsignal-forms-vote-item .crowdsignal-forms-vote-item__count-exit-active{transform:rotateX(-90deg)}.crowdsignal-forms-vote__branding{display:flex}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:8px;padding:8px 4px 0;text-decoration:none !important;text-transform:uppercase;border:0 !important}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link.with-external-icon::after{content:"\2197";display:inline;font-size:6px;vertical-align:super}.crowdsignal-forms-vote__branding .crowdsignal-forms-vote__branding-link:not(:hover){color:var(--crowdsignal-forms-text-color)}.crowdsignal-applause-wrapper{margin-bottom:3em}.crowdsignal-forms-applause{display:flex;flex-direction:row;align-items:center;outline:0;width:max-content;cursor:pointer;border:var(--crowdsignal-forms-applause-border-width) solid #d2d2d2;border-radius:var(--crowdsignal-forms-applause-border-radius);user-select:none;--webkit-user-select: none}.crowdsignal-forms-applause .crowdsignal-forms-applause__count{margin:unset !important}.crowdsignal-forms-applause.size-small{padding:20px 16px 18px 12px;height:0.7em}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__count{font-size:14px;padding-bottom:2px}.crowdsignal-forms-applause.size-medium{height:1em;padding:24px 16px 20px 8px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__count{font-size:16px;padding-bottom:4px}.crowdsignal-forms-applause.size-large{height:1.2em;padding:28px 18px 22px 8px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__count{font-size:19px;padding-bottom:6px}.crowdsignal-forms-applause.is-closed{opacity:0.5}.crowdsignal-forms-applause.has-text-color{color:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause.has-border-color{border:var(--crowdsignal-forms-applause-border-width) solid var(--crowdsignal-forms-applause-border-color)}.crowdsignal-forms-applause.has-bg-color{background-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover{color:var(--crowdsignal-forms-applause-hover-color);border-color:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause:not(.is-closed):hover.has-bg-color{color:var(--crowdsignal-forms-applause-bg-color);background-color:var(--crowdsignal-forms-applause-text-color);border-color:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-text-color);margin-inline-end:5px}.crowdsignal-forms-applause.size-small .crowdsignal-forms-applause__animation{width:33px;height:33px;max-height:33px}.crowdsignal-forms-applause.size-medium .crowdsignal-forms-applause__animation{width:50px;height:50px;max-height:50px}.crowdsignal-forms-applause.size-large .crowdsignal-forms-applause__animation{width:60px;height:60px;max-height:60px}.crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-hover-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation{fill:var(--crowdsignal-forms-applause-bg-color)}.crowdsignal-forms-applause.has-bg-color:not(.is-closed):hover .crowdsignal-forms-applause__animation .crowdsignal-forms-applause__animation-inner-fill{fill:var(--crowdsignal-forms-applause-text-color)}.crowdsignal-forms-applause__animation-right{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-right{transform:translateX(3%) translateY(-3%)}.crowdsignal-forms-applause__animation-left{transition:transform 0.3s}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-left{transform:translateX(-3%) translateY(0)}.crowdsignal-forms-applause__animation-wave-small{opacity:1}.crowdsignal-forms-applause:not(.is-closed):hover .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause__animation-wave-large{opacity:0}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-right{transform:translateX(-3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-left{transform:translateX(3%) translateY(0);transition:transform 0.1s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-small{animation:crowdsignal-forms-animation__fade-out 0.3s forwards;transform:translateY(-5%);transition:transform 0.3s}.crowdsignal-forms-applause .crowdsignal-forms-applause__animation.is-active .crowdsignal-forms-applause__animation-wave-large{animation:crowdsignal-forms-animation__fade-in 0.03s forwards;animation-delay:0.07s}
|
build/editor.js
CHANGED
@@ -1,13 +1,1751 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
*/!function(l){if(void 0===(o="function"==typeof(r=l)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=l(),!!0){var a=window.Cookies,c=window.Cookies=l();c.noConflict=function(){return window.Cookies=a,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function l(t,n,l){if("undefined"!=typeof document){"number"==typeof(l=e({path:"/"},o.defaults,l)).expires&&(l.expires=new Date(1*new Date+864e5*l.expires)),l.expires=l.expires?l.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(i){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in l)l[s]&&(c+="; "+s,!0!==l[s]&&(c+="="+l[s].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},l=document.cookie?document.cookie.split("; "):[],a=0;a<l.length;a++){var c=l[a].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var i=t(c[0]);if(s=(r.read||r)(s,i)||t(s),n)try{s=JSON.parse(s)}catch(u){}if(o[i]=s,e===i)break}catch(u){}}return e?o[e]:o}}return o.set=l,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){l(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(22);e.exports=function(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}}),t&&r(e,t)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(25);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){var r=n(40),o=n(41);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(19),o=n(22),l=n(42),a=n(43);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!l(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,l=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}},,,function(e,t,n){var r=n(25);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,l=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,l=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw l}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(39);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,l,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}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:l,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(22),o=n(44);function l(t,n,a){return o()?e.exports=l=Reflect.construct:e.exports=l=function(e,t,n){var o=[null];o.push.apply(o,t);var l=new(Function.bind.apply(e,o));return n&&r(l,n.prototype),l},l.apply(null,arguments)}e.exports=l},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n(0),l=n(1),a=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 6L5.5 18C5.5 18.2761 5.72386 18.5 6 18.5L18 18.5C18.2761 18.5 18.5 18.2761 18.5 18L18.5 6C18.5 5.72386 18.2761 5.5 18 5.5L6 5.5C5.72386 5.5 5.5 5.72386 5.5 6ZM4 18L4 6C4 4.89543 4.89543 4 6 4L18 4C19.1046 4 20 4.89543 20 6L20 18C20 19.1046 19.1046 20 18 20L6 20C4.89543 20 4 19.1046 4 18Z"}),Object(o.createElement)("rect",{x:"15",y:"17",width:"6",height:"1.5",transform:"rotate(-90 15 17)"}),Object(o.createElement)("rect",{x:"11.5",y:"17",width:"9",height:"1.5",transform:"rotate(-90 11.5 17)"}),Object(o.createElement)("rect",{x:"8",y:"17",width:"5",height:"1.5",transform:"rotate(-90 8 17)"}))},c=n(16),s=n.n(c),i=n(5),u=n.n(i),d=n(11),f=n(3);function b(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={tryFetch:!1,isFetching:!1,pollsByClientId:{},pollClientIds:[]},O={setTryFetchPollData:function(e){return{type:"SET_TRY_FETCH",tryFetch:e}},setIsFetchingPollData:function(e){return{type:"IS_FETCHING",isFetching:e}},setPollApiDataForClientId:function(e,t){return{type:"SET_POLL",clientId:e,pollData:t}},addPollClientId:function(e){return{type:"ADD_POLL_CLIENT_ID",clientId:e}},removePollClientId:function(e){return{type:"REMOVE_POLL_CLIENT_ID",clientId:e}}},g=(Object(d.registerStore)("crowdsignal-forms/polls",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TRY_FETCH":return p({},e,{tryFetch:!!t.tryFetch});case"IS_FETCHING":return p({},e,{isFetching:!!t.isFetching});case"SET_POLL":return p({},e,{pollsByClientId:p({},e.pollsByClientId,u()({},t.clientId,t.pollData))});case"ADD_POLL_CLIENT_ID":return p({},e,{pollClientIds:e.pollClientIds.indexOf(t.clientId)<0?[].concat(s()(e.pollClientIds),[t.clientId]):e.pollClientIds});case"REMOVE_POLL_CLIENT_ID":return p({},e,{pollClientIds:Object(f.filter)(e.pollClientIds,(function(e){return e!==t.clientId}))});default:return e}},actions:O,selectors:{shouldTryFetchingPollData:function(e){return!!e.tryFetch},getPollDataByClientId:function(e,t){return e.pollsByClientId[t]||null},getPollClientIds:function(e){return e.pollClientIds},isFetchingPollData:function(e){return!!e.isFetching}},controls:{},resolvers:{}}),n(15)),w=n.n(g),h=n(8),j=n.n(h),C=n(2),v=n.n(C),_=n(6),E=n(4),y=n(13),x=n(12),S=n(9),N=n.n(S),k=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,a=e.showSubmitMessage,c=N()({"is-transparent":a},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:c},r&&Object(l.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(l.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(l.__)("Thanks For Voting!","crowdsignal-forms"))},T=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},L=function(e){return"0px"!==window.getComputedStyle(e).borderBlockStartWidth?window.getComputedStyle(e).borderBlockStartColor:null},P=n(7),R=n.n(P),A=n(10),I=n.n(A),D=n(14),B=n.n(D),F=n(20),M=n.n(F),V=n(23),H=n.n(V),U=n(24),W=n.n(U),z=n(27),Z=n.n(z),q=n(19),G=n.n(q),K=n(28),Y=n.n(K),J=n(18),X=n.n(J);function $(e){return function(){var t,n=G()(e);if(Q()){var r=G()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Z()(this,t)}}function Q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ee,te=function(){var e=B()(I.a.mark((function e(t){var n,r,o=arguments;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=B()(I.a.mark((function e(t){var n,r,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new le;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new le;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=B()(I.a.mark((function e(t,n,r,o){var l,a,c;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(l,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((a=e.sent).ok){e.next=6;break}throw new le;case 6:return e.next=8,a.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new oe(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),oe=function(e){W()(n,e);var t=$(n);function n(){return H()(this,n),t.apply(this,arguments)}return n}(Y()(Error)),le=function(e){W()(n,e);var t=$(n);function n(){return H()(this,n),t.call(this,Object(l.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(oe),ae=function(){var e=B()(I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X()({path:"/crowdsignal-forms/v1/account/connected",method:"GET"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=function(e,t){var n=Object(C.useState)(null),r=j()(n,2),o=r[0],l=r[1],a=Object(C.useState)(null),c=j()(a,2),s=c[0],i=c[1],u=Object(C.useState)(!0),d=j()(u,2),f=d[0],b=d[1];return Object(C.useEffect)((function(){b(!0),i(null),l(null),e().then(l).catch(i).finally((function(){return b(!1)}))}),t),{data:o,error:s,loading:f}},se=Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),ie=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),ue=Object.freeze([ie.CABIN,ie.CHIVO,ie.OPEN_SANS,ie.FIRA_SANS,ie.ROBOTO,ie.NUNITO,ie.OVERPASS,ie.LATO,ie.LIBRE_FRANKLIN,ie.MONTSERRAT,ie.POPPINS,ie.RUBIK,ie.RALEWAY,ie.JOSEFIN_SANS,ie.ALEGREYA_SANS,ie.OSWALD]),de=Object.freeze((ee={},u()(ee,ie.THEME_DEFAULT,null),u()(ee,ie.GEORGIA,"Georgia, serif"),u()(ee,ie.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),u()(ee,ie.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),u()(ee,ie.ARIAL,"Arial, Helvetica, sans-serif"),u()(ee,ie.IMPACT,"Impact, Charcoal, sans-serif"),u()(ee,ie.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),u()(ee,ie.TAHOMA,"Tahoma, Geneva, sans-serif"),u()(ee,ie.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),u()(ee,ie.VERDANA,"Verdana, Geneva, sans-serif"),u()(ee,ie.COURIER,'"Courier New", Courier, monospace'),u()(ee,ie.CABIN,'"Cabin", sans-serif'),u()(ee,ie.CHIVO,'"Chivo", sans-serif'),u()(ee,ie.OPEN_SANS,'"Open Sans", sans-serif'),u()(ee,ie.FIRA_SANS,'"Fira Sans", sans-serif'),u()(ee,ie.ROBOTO,'"Roboto", sans-serif'),u()(ee,ie.NUNITO,'"Nunito", sans-serif'),u()(ee,ie.OVERPASS,'"Overpass", sans-serif'),u()(ee,ie.LATO,'"Lato", sans-serif'),u()(ee,ie.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),u()(ee,ie.MONTSERRAT,'"Montserrat", sans-serif'),u()(ee,ie.POPPINS,'"Poppins", sans-serif'),u()(ee,ie.RUBIK,'"Rubik", sans-serif'),u()(ee,ie.RALEWAY,'"Raleway", sans-serif'),u()(ee,ie.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),u()(ee,ie.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),u()(ee,ie.OSWALD,'"Oswald", sans-serif'),ee)),fe=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),be=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),pe=Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),me=Object.freeze({RADIO:"radio",BUTTON:"button"}),Oe=Object.freeze({LIST:"list",INLINE:"inline"}),ge=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=ce((function(){return te(e,t)}),[e]),r=n.data,o=n.error,l=n.loading;return{error:o,loading:l,results:r}},we=function(e){var t=e.error,n=e.loading,r=e.text,a=e.totalVotes,c=e.votes,s=N()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),i=!n&&!t,u=0===a?0:100*c/a,d={width:"".concat(parseInt(u,10),"%")};return Object(o.createElement)("div",{className:s},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},i&&Object(l.sprintf)(Object(l._n)("%s vote","%s votes",c,"crowdsignal-forms"),c.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},i&&"".concat(u.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:d})))};we.propTypes={loading:R.a.bool,text:R.a.string.isRequired,totalVotes:R.a.number,votes:R.a.number};var he=we,je=function(e){var t=e.showLogo;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__footer-branding"},Object(o.createElement)("a",{className:"crowdsignal-forms-poll__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},Object(l.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),t&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};function Ce(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}var ve=function(e,t){return Object(f.map)(e,(function(e){return void 0!==e.answerIdFromApi?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerIdFromApi:t[e.answerId]})}))},_e=function(e){return Object(f.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text},Ee=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,a=e.hideBranding,c=ge(n),s=c.error,i=c.loading,u=c.results;Object(C.useEffect)((function(){r(s?Object(l.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[s]);var d=N()("crowdsignal-forms-poll__results",{"is-error":!!s,"is-loading":i}),b=Object(f.sum)(Object(f.values)(u));return Object(o.createElement)("div",{className:d},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(f.map)(t,(function(e){var t;return!_e(e)&&Object(o.createElement)(he,{key:e.answerId,error:!!s,loading:i,text:e.text,totalVotes:b,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(l.sprintf)(Object(l._n)("%s total vote","%s total votes",b,"crowdsignal-forms"),b?b.toLocaleString():0)),!a&&Object(o.createElement)(je,null)))};Ee.propTypes={pollIdFromApi:R.a.number,answers:R.a.arrayOf(R.a.shape({answerId:R.a.string.isRequired,answerIdFromApi:R.a.number,text:R.a.string})).isRequired,setErrorMessage:R.a.func.isRequired,hideBranding:R.a.bool};var ye=Ee,xe=n(29),Se=n.n(xe),Ne=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},ke=function(e,t){return function(n){return Object(E.withFallbackStyles)((function(e){return{fallbackStyles:t(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var r=t.fallbackStyles,l=Se()(t,["fallbackStyles"]);return Object(o.createElement)(n,w()({fallbackStyles:r||{},renderStyleProbe:function(){return r?null:Object(o.createElement)(Ne,null,Object(o.createElement)(e,null))}},l))}))}};function Te(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}var Le=function(e){var t=e.answer,n=e.answerStyle,r=e.index,a=e.isMultipleChoice,c=e.onChange,s=e.onDelete,i=e.onNewAnswer,d=e.disabled,b=function(e){return c(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{text:e}))},p=function(){return s(r)},m=function(){return i(r+1)},O=N()("crowdsignal-forms-poll__answer",{"is-multiple-choice":a,"is-button":me.BUTTON===n});return Object(o.createElement)("div",{className:O},me.RADIO===n&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},d?Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},t.text?Object(y.decodeEntities)(t.text):Object(l.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(_.RichText,{className:"crowdsignal-forms-poll__answer-label",tagName:"span",placeholder:Object(l.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:m,onReplace:f.noop,onRemove:p,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0}))),me.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},d?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.text?Object(y.decodeEntities)(t.text):Object(l.__)("Enter an answer","crowdsignal-forms")):Object(o.createElement)(_.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",placeholder:Object(l.__)("Enter an answer","crowdsignal-forms"),multiline:!1,preserveWhiteSpace:!1,onChange:b,onSplit:m,onReplace:f.noop,onRemove:p,value:t.text,allowedFormats:[],withoutInteractiveFormatting:!0,keepPlaceholderOnFocus:!0})))},Pe=function(e,t){return Object(f.tap)(e.querySelectorAll("[role=textbox]")[t],(function(e){return e&&e.focus()}))},Re=function(e){var t=e.attributes,n=e.isSelected,r=e.setAttributes,l=e.disabled,a=e.answerStyle,c=e.buttonAlignment,i=Object(C.useRef)(),u=function(e,n){return r({answers:Object(f.tap)(s()(t.answers),(function(t){t[e]=n}))})},d=function(e){Pe(i.current,Math.max(e-1,0)),r({answers:Object(f.filter)(t.answers,(function(n){return t.answers.length<=2||n!==t.answers[e]}))})},b=function(e){e<t.answers.length&&r({answers:[].concat(s()(Object(f.slice)(t.answers,0,e)),[{}],s()(Object(f.slice)(t.answers,e,t.answers.length)))}),Pe(i.current,Math.min(e,t.answers.length))},p=n&&Object(f.last)(t.answers).text?[].concat(s()(t.answers),[{}]):t.answers,m=N()({"is-button":me.BUTTON===a,"is-inline-button-alignment":Oe.INLINE===c},"crowdsignal-forms-poll__options"),O=me.RADIO===a;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{ref:i,className:m},Object(f.map)(p,(function(e,r){return function(e){return n&&!l||!_e(e)}(e)&&Object(o.createElement)(Le,{key:"poll-answer-".concat(r),answer:e,answerStyle:a,index:r,isMultipleChoice:t.isMultipleChoice,onChange:u,onDelete:d,onNewAnswer:b,disabled:l})}))),O&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},l?Object(o.createElement)("div",{className:"wp-block-button__link crowdsignal-forms-poll__submit-button"},t.submitButtonLabel):Object(o.createElement)(_.RichText,{className:"wp-block-button__link crowdsignal-forms-poll__submit-button",onChange:function(e){return r({submitButtonLabel:e})},value:t.submitButtonLabel,allowedFormats:[]}))))},Ae=function(e){return Object(f.includes)(ie,e)?de[e]:null},Ie=function(e,t){var n,r,o,l,a=Object(f.isEmpty)(e.textColor)?t.text:e.textColor;return Object(f.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accent,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=Ae(e.fontFamily))&&void 0!==r?r:t.bodyFontFamily,questionFontFamily:null!==(o=Ae(e.fontFamily))&&void 0!==o?o:t.questionFontFamily,submitButtonBgColor:e.submitButtonBackgroundColor||t.accent,submitButtonTextColor:e.submitButtonTextColor||t.textInverted,textColor:a,textColorProperties:null!==(l=De(a))&&void 0!==l?l:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(f.kebabCase)(t))}))},De=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=Be(e)),e.match(/\((.*?)\)/)[1])},Be=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},Fe=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)},Me=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(fe.CLOSED===e)return!0;if(fe.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1},Ve=function(e,t){return e.isMultipleChoice?me.RADIO:!Object(f.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?me.BUTTON:me.RADIO},He=function(e){e?Object(r.registerBlockStyle)("crowdsignal-forms/poll",{name:"buttons",label:Object(l.__)("Buttons","crowdsignal-forms")}):Object(r.unregisterBlockStyle)("crowdsignal-forms/poll","buttons")},Ue=function(e){var t,n=e.attributes,r=e.className,a=e.setAttributes,c=e.fallbackBackgroundColor,s=e.fallbackTextColor,i=e.fallbackSubmitButtonBackgroundColor,u=e.fallbackSubmitButtonTextColor,d=e.viewResultsUrl,b=""!==d,p=Ve(n,r);return Object(o.createElement)(_.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,b?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:b?d:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:d,isSecondary:!0,target:"_blank",disabled:!b},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:Object(y.decodeEntities)(null!==(t=n.title)&&void 0!==t?t:n.question),label:Object(l.__)("Title of the poll block","crowdsignal-forms"),onChange:function(e){return a({title:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Confirmation message","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(E.SelectControl,{value:n.confirmMessageType,label:Object(l.__)("On submission","crowdsignal-forms"),options:[{label:Object(l.__)("Show results","crowdsignal-forms"),value:se.RESULTS},{label:Object(l.__)('Show "Thank You" message',"crowdsignal-forms"),value:se.THANK_YOU},{label:Object(l.__)("Show a custom text message","crowdsignal-forms"),value:se.CUSTOM_TEXT},{label:Object(l.__)("Redirect to another webpage","crowdsignal-forms"),value:se.REDIRECT}],onChange:function(e){return Object(f.includes)(se,e)&&a({confirmMessageType:e})}}),se.CUSTOM_TEXT===n.confirmMessageType&&Object(o.createElement)(E.TextareaControl,{value:n.customConfirmMessage,label:Object(l.__)("Message text","crowdsignal-forms"),placeholder:Object(l.__)("Thanks for voting!","crowdsignal-forms"),onChange:function(e){return a({customConfirmMessage:e})}}),se.REDIRECT===n.confirmMessageType&&Object(o.createElement)(_.URLInput,{className:"crowdsignal-forms__redirect-url",value:n.redirectAddress,label:Object(l.__)("Redirect address","crowdsignal-forms"),onChange:function(e){return a({redirectAddress:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Poll status","crowdsignal-forms"),initialOpen:!1},Object(o.createElement)(E.SelectControl,{value:n.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:fe.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:fe.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:fe.CLOSED}],onChange:function(e){Object(f.includes)(fe,e)&&a({closedAfterDateTime:e===fe.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),fe.CLOSED_AFTER===n.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:n.closedAfterDateTime,label:Object(l.__)("Close poll on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);a({closedAfterDateTime:t.toISOString()})},is12Hour:!0}),fe.OPEN!==n.pollStatus&&Object(o.createElement)(E.SelectControl,{value:n.closedPollState,label:Object(l.__)("When poll is closed","crowdsignal-forms"),options:[{label:Object(l.__)("Show results","crowdsignal-forms"),value:be.SHOW_RESULTS},{label:Object(l.__)('Show poll with "Closed" banner',"crowdsignal-forms"),value:be.SHOW_CLOSED_BANNER},{label:Object(l.__)("Hide poll","crowdsignal-forms"),value:be.HIDDEN}],onChange:function(e){return Object(f.includes)(be,e)&&a({closedPollState:e})}})),Object(o.createElement)(_.PanelColorSettings,{title:Object(l.__)("Block styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.textColor,onChange:function(e){return a({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:n.backgroundColor,onChange:function(e){return a({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:n.borderColor,onChange:function(e){return a({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]},Object(o.createElement)(_.ContrastChecker,{textColor:n.textColor,backgroundColor:n.backgroundColor,fallbackBackgroundColor:c,fallbackTextColor:s}),Object(o.createElement)(E.SelectControl,{value:n.fontFamily,label:Object(l.__)("Choose font","crowdsignal-forms"),options:[{label:Object(l.__)("Default theme font","crowdsignal-forms"),value:ie.THEME_DEFAULT},{label:"Alegreya Sans",value:ie.ALEGREYA_SANS},{label:"Arial",value:ie.ARIAL},{label:"Cabin",value:ie.CABIN},{label:"Chivo",value:ie.CHIVO},{label:"Courier",value:ie.COURIER},{label:"Fira Sans",value:ie.FIRA_SANS},{label:"Georgia",value:ie.GEORGIA},{label:"Impact",value:ie.IMPACT},{label:"Josefin Sans",value:ie.JOSEFIN_SANS},{label:"Lato",value:ie.LATO},{label:"Libre Franklin",value:ie.LIBRE_FRANKLIN},{label:"Lucida",value:ie.LUCIDA},{label:"Montserrat",value:ie.MONTSERRAT},{label:"Nunito",value:ie.NUNITO},{label:"Open Sans",value:ie.OPEN_SANS},{label:"Oswald",value:ie.OSWALD},{label:"Overpass",value:ie.OVERPASS},{label:"Palatino",value:ie.PALATINO},{label:"Poppins",value:ie.POPPINS},{label:"Raleway",value:ie.RALEWAY},{label:"Roboto",value:ie.ROBOTO},{label:"Rubik",value:ie.RUBIK},{label:"Tahoma",value:ie.TAHOMA},{label:"Times New Roman",value:ie.TIMES_NEW_ROMAN},{label:"Trebuchet",value:ie.TREBUCHET},{label:"Verdana",value:ie.VERDANA}],onChange:function(e){return Object(f.includes)(ie,e)&&a({fontFamily:e})}}),"full"!==n.align&&Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{type:"number",label:Object(l.__)("Width (%)","crowdsignal-forms"),value:n.width,onChange:function(e){return a({width:parseInt(e,10)})}}),Object(o.createElement)(E.Button,{isSmall:!0,className:"crowdsignal-forms__reset-width-button",onClick:function(){return a({width:100})}},Object(l.__)("Reset","crowdsignal-forms"))),Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),value:n.borderWidth,onChange:function(e){a({borderWidth:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"}),Object(o.createElement)(E.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),value:n.borderRadius,onChange:function(e){a({borderRadius:parseInt(e,10)||0})},type:"number",className:"crowdsignal-forms__small-text-input"})),Object(o.createElement)(E.ToggleControl,{label:Object(l.__)("Drop shadow","crowdsignal-forms"),checked:n.hasBoxShadow,onChange:function(e){a({hasBoxShadow:e})}})),Object(o.createElement)(_.PanelColorSettings,{title:Object(l.__)("Button styling","crowdsignal-forms"),initialOpen:!1,colorSettings:[{value:n.submitButtonTextColor,onChange:function(e){return a({submitButtonTextColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:n.submitButtonBackgroundColor,onChange:function(e){return a({submitButtonBackgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")}]},Object(o.createElement)(_.ContrastChecker,{textColor:n.submitButtonTextColor,backgroundColor:n.submitButtonBackgroundColor,fallbackBackgroundColor:i,fallbackTextColor:u}),me.BUTTON===p&&Object(o.createElement)(E.SelectControl,{value:n.buttonAlignment,label:Object(l.__)("Alignment","crowdsignal-forms"),options:[{value:Oe.LIST,label:Object(l.__)("List","crowdsignal-forms")},{value:Oe.INLINE,label:Object(l.__)("Inline","crowdsignal-forms")}],onChange:function(e){return a({buttonAlignment:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Answer settings","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)(E.CheckboxControl,{checked:n.hasOneResponsePerComputer,label:Object(l.__)("One response per computer","crowdsignal-forms"),onChange:function(e){return a({hasOneResponsePerComputer:e})}}),Object(o.createElement)(E.CheckboxControl,{checked:n.randomizeAnswers,label:Object(l.__)("Randomize answer order","crowdsignal-forms"),onChange:function(e){return a({randomizeAnswers:e})}})))};function We(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}var ze=[{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z"}),Object(o.createElement)("path",{d:"M6 12.75C6.55228 12.75 7 12.3023 7 11.75C7 11.1977 6.55228 10.75 6 10.75C5.44772 10.75 5 11.1977 5 11.75C5 12.3023 5.44772 12.75 6 12.75ZM6 13.75C7.10457 13.75 8 12.8546 8 11.75C8 10.6454 7.10457 9.75 6 9.75C4.89543 9.75 4 10.6454 4 11.75C4 12.8546 4.89543 13.75 6 13.75Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z"}))},title:Object(l.__)("Choose one answer","crowdsignal-forms"),value:!1},{icon:function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 10.75H5V12.75H7V10.75ZM4 9.75V13.75H8V9.75H4Z"}),Object(o.createElement)("path",{d:"M4 4H8V8H4V4Z"}),Object(o.createElement)("path",{d:"M4 16H8V20H4V16Z"}),Object(o.createElement)("path",{d:"M20 6.75H12V5.25H20V6.75Z"}),Object(o.createElement)("path",{d:"M20 12.5H12V11H20V12.5Z"}),Object(o.createElement)("path",{d:"M20 18.75H12V17.25H20V18.75Z"}))},title:Object(l.__)("Choose multiple answers","crowdsignal-forms"),value:!0}],Ze=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.map)(ze,(function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:e.value===t.isMultipleChoice,onClick:function(){n({isMultipleChoice:e.value}),He(e.value)}})}));return Object(o.createElement)(_.BlockControls,null,Object(o.createElement)(E.Toolbar,{controls:r}))},qe=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},Ge="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),Ke=new Uint8Array(16);function Ye(){if(!Ge)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ge(Ke)}for(var Je=[],Xe=0;Xe<256;++Xe)Je.push((Xe+256).toString(16).substr(1));var $e=function(e,t){var n=t||0;return(Je[e[n+0]]+Je[e[n+1]]+Je[e[n+2]]+Je[e[n+3]]+"-"+Je[e[n+4]]+Je[e[n+5]]+"-"+Je[e[n+6]]+Je[e[n+7]]+"-"+Je[e[n+8]]+Je[e[n+9]]+"-"+Je[e[n+10]]+Je[e[n+11]]+Je[e[n+12]]+Je[e[n+13]]+Je[e[n+14]]+Je[e[n+15]]).toLowerCase()};var Qe=function(e,t,n){var r=(e=e||{}).random||(e.rng||Ye)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return $e(r)},et=function(e){var t=e.onEditClick;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__edit-bar-message"},Object(l.__)("Warning! This poll is published. Deleting or reordering answers may cause the loss of existing responses.","crowdsignal-forms")),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__edit-bar-button",onClick:function(){t()}},Object(l.__)("Edit","crowdsignal-forms")))},tt=function(e){var t=e.blockIcon,n=e.blockName,r=e.children,a=function(){var e=Object(C.useState)(!0),t=j()(e,2),n=t[0],r=t[1],o=Object(C.useState)(!0),l=j()(o,2),a=l[0],c=l[1],s=function(){var e=B()(I.a.mark((function e(){var t,n,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return t=e.sent,n=pe.CONNECTED===t||pe.NOT_VERIFIED===t,o=pe.CONNECTED===t,r(n),c(o),e.abrupt("return",{isNowConnected:n,isNowVerified:o});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(C.useEffect)((function(){s()}),[]),{isConnected:n,isAccountVerified:a,checkIsConnected:s}}(),c=a.isConnected,s=a.isAccountVerified,i=a.checkIsConnected,u=function(){var e=B()(I.a.mark((function e(){var t,n,r,o;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c,e.next=3,i();case 3:n=e.sent,r=n.isNowConnected,o=n.isNowVerified,r||window.open("/wp-admin/admin.php?page=crowdsignal-forms-setup"),t&&!o&&window.open("https://wordpress.com/me/account");case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(c&&s)return r;var d=!c,f=c&&!s;return Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal"},Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-header"},t,Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-title"},n)),Object(o.createElement)("div",{className:"crowdsignal-forms__connect-to-crowdsignal-body"},d&&Object(l.__)("You need to connect to a Crowdsignal account to collect and manage your results.","crowdsignal-forms"),f&&Object(l.__)("Please verify your WordPress.com email address in order to publish your poll.","crowdsignal-forms")),Object(o.createElement)(E.Button,{isPrimary:!0,onClick:u},d&&Object(l.__)("Connect to Crowdsignal","crowdsignal-forms"),f&&Object(l.__)("Verify or Change your Email Address","crowdsignal-forms")))};function nt(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 rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ot=function(e){return"crowdsignal-forms/poll"===e.name||"crowdsignal-forms/applause"===e.name||"crowdsignal-forms/vote"===e.name},lt=!1,at=!1;!function(){if(!lt){lt=!0;var e=Object(d.select)("core/editor"),t=e.isEditedPostDirty,n=e.isEditedPostNew,r=e.isSavingPost,o=e.isCleanNewPost,l=e.getCurrentPostId,a=Object(d.dispatch)("crowdsignal-forms/polls"),c=a.setTryFetchPollData,s=a.setPollApiDataForClientId,i=a.setIsFetchingPollData,u=Object(d.select)("crowdsignal-forms/polls"),b=u.shouldTryFetchingPollData,p=u.getPollDataByClientId,m=u.isFetchingPollData;Object(d.subscribe)((function(){var e=Object(f.filter)(Object(d.select)("core/block-editor").getBlocks(),ot);if(!(e.length<1)&&(!m()&&!(o()||n()||r()||t())&&l())){var a=Object(f.filter)(e,(function(e){var t=e.attributes;return t.pollId&&null===p(t.pollId)}));a.length<1||(b()?m()||(i(!0),Promise.all(Object(f.map)(a,(function(e){var t=e.attributes.pollId;return X()({path:"/crowdsignal-forms/v1/polls/".concat(t,"?cached=1"),method:"GET"}).then((function(e){return s(t,rt({},e,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(e.id,"/results")}))}),(function(){return s(t,null)}))}))).finally((function(){return i(!1)}))):c(!0))}}))}}();var ct=function(e){return function(t){var n=t.attributes,r=t.setAttributes,l=t.addPollClientId,a=t.removePollClientId;return Object(C.useEffect)((function(){return"p2tenberg"in window&&function(){if(!at){at=!0;var e=null,t=function(){null!==e&&clearTimeout(e),e=setTimeout((function(){return n()}),1e3+1e3*Math.random())},n=function(){var e=Object(d.select)("crowdsignal-forms/polls"),n=e.getPollClientIds,r=e.getPollDataByClientId,o=e.shouldTryFetchingPollData,l=e.isFetchingPollData,a=Object(f.filter)(n(),(function(e){return null===r(e)}));if(a.length<1)return t();var c=Object(d.dispatch)("crowdsignal-forms/polls"),s=c.setTryFetchPollData,i=c.setPollApiDataForClientId,u=c.setIsFetchingPollData;return o()?l()||(u(!0),Promise.all(Object(f.map)(a,(function(e){return X()({path:"/crowdsignal-forms/v1/polls/".concat(e,"?cached=1"),method:"GET"}).then((function(t){return i(e,rt({},t,{viewResultsUrl:"https://app.crowdsignal.com/polls/".concat(t.id,"/results")}))}),(function(){return i(e,null)}))}))).finally((function(){return u(!1)}))):s(!0),t()};n()}}(),n.pollId&&l(n.pollId),function(){n.pollId&&a(n.pollId)}}),[]),function(e,t,n,r){Object(C.useEffect)((function(){if(!Object(f.isEmpty)(t))if(window.csPolls||(window.csPolls={}),window.csPolls[t])if(window.csPolls[t].indexOf(e)>-1);else{var o=Object(f.map)(n,(function(e){return Object(f.omit)(e,["answerId"])}));r({pollId:null,answers:o})}else window.csPolls[t]=[e]}),[t])}(t.clientId,n.pollId,n.answers,r),Object(o.createElement)(e,t)}},st=function(e){return Object(x.compose)([Object(d.withSelect)((function(e,t){var n=e("crowdsignal-forms/polls"),r=n.getPollDataByClientId,o=n.shouldTryFetchingPollData,l=n.isFetchingPollData,a=t.attributes;return{pollDataFromApi:a.pollId?r(a.pollId):null,getPollDataByClientId:r,shouldTryFetchingPollData:o,isFetchingPollData:l}})),Object(d.withDispatch)((function(e){var t=e("crowdsignal-forms/polls");return{setTryFetchPollData:t.setTryFetchPollData,setPollApiDataForClientId:t.setPollApiDataForClientId,setIsFetchingPollData:t.setIsFetchingPollData,addPollClientId:t.addPollClientId,removePollClientId:t.removePollClientId}})),ct])(e)};function it(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}var ut=Object(x.compose)([ke((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Question"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=e.querySelector("h3"),o=e.querySelector(".alignwide"),l=T(t),a=T(n),c=window.getComputedStyle(n).color;if(l===a){var s=L(t);l=s||c}return{accent:l,surface:a,text:c,bodyFontFamily:window.getComputedStyle(n).fontFamily,questionFontFamily:window.getComputedStyle(r).fontFamily,textInverted:window.getComputedStyle(t).color,contentWideWidth:window.getComputedStyle(o).maxWidth}})),st,function(e){return function(t){var n=t.attributes,r=t.setAttributes;return Object(C.useEffect)((function(){if(!n.pollId){var e=Qe();r({pollId:e})}if(Object(f.some)(n.answers,(function(e){return!e.answerId&&e.text}))){var t=Object(f.map)(n.answers,(function(e){return e.answerId||!e.text?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{answerId:Qe()})}));r({answers:t})}})),Object(o.createElement)(e,t)}}])((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,c=e.isSelected,s=e.setAttributes,i=e.renderStyleProbe,u=e.pollDataFromApi,d=Object(C.useState)(!0),b=j()(d,2),p=b[0],m=b[1],O=Object(C.useState)(""),g=j()(O,2),h=g[0],v=g[1],x=!Object(f.isEmpty)(u),S=u?u.viewResultsUrl:"",N=u?u.id:null,T={};u&&Object(f.map)(u.answers,(function(e){T[e.client_id]=e.id}));var L=c&&"full"!==t.align,P="full"!==t.align?"".concat(t.width,"%"):"auto",R=Me(t.pollStatus,t.closedAfterDateTime),A=t.note||c&&p,I=R&&be.SHOW_RESULTS===t.closedPollState,D=R&&be.HIDDEN===t.closedPollState;Object(C.useEffect)((function(){return m(!x)}),[c]),Object(C.useEffect)((function(){c&&He(!t.isMultipleChoice)}),[t.isMultipleChoice,c]);var B=c&&x&&!p,F=Ve(t,n);return t.fontFamily&&function(e){if(!Object(f.isEmpty)(e)&&ie.THEME_DEFAULT!==e&&-1!==ue.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(f.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(f.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily),Object(o.createElement)(tt,{blockIcon:Object(o.createElement)(a,null),blockName:Object(l.__)("Crowdsignal Poll","crowdsignal-forms")},Object(o.createElement)(Ze,e),Object(o.createElement)(Ue,w()({},e,{viewResultsUrl:S})),Object(o.createElement)(E.ResizableBox,{className:"crowdsignal-forms-poll__resize-wrapper",size:{height:"auto",width:P},minWidth:"25%",maxWidth:"100%",enable:{left:!0,right:!0},onResizeStop:function(e,t,n){"right"!==t&&"left"!==t||s({width:Object(f.round)(n.offsetWidth/n.parentNode.offsetWidth*100)})},showHandle:L,resizeRatio:2},Object(o.createElement)("div",{className:Fe(t,n,{"is-selected-in-editor":c,"is-closed":R,"is-hidden":D},"crowdsignal-forms-poll"),style:Ie(t,r)},B&&Object(o.createElement)(et,{onEditClick:function(){m(!0)}}),h&&Object(o.createElement)(qe,null,h),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__content"},p?Object(o.createElement)(_.RichText,{tagName:"h3",className:"crowdsignal-forms-poll__question",placeholder:Object(l.__)("Enter your question","crowdsignal-forms"),onChange:function(e){return s({question:e})},value:t.question,allowedFormats:[]}):Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},t.question?Object(y.decodeEntities)(t.question):Object(l.__)("Enter your question","crowdsignal-forms")),A&&(p?Object(o.createElement)(_.RichText,{tagName:"p",className:"crowdsignal-forms-poll__note",placeholder:Object(l.__)("Add a note (optional)","crowdsignal-forms"),onChange:function(e){return s({note:e})},value:t.note,allowedFormats:[]}):Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},t.note?Object(y.decodeEntities)(t.note):Object(l.__)("Add a note (optional)","crowdsignal-forms"))),!I&&Object(o.createElement)(Re,w()({},e,{setAttributes:s,disabled:!p,answerStyle:F,buttonAlignment:t.buttonAlignment})),I&&Object(o.createElement)(ye,{answers:ve(Object(f.filter)(t.answers,(function(e){return!_e(e)})),T),pollIdFromApi:N,hideBranding:!0,setErrorMessage:v})),R&&Object(o.createElement)(k,{isPollHidden:D,isPollClosed:R}),i())))})),dt={pollId:{type:"string",default:null},isMultipleChoice:{type:"boolean",default:!1},title:{type:"string",default:null},question:{type:"string",default:""},note:{type:"string",default:""},answers:{type:"array",default:[{},{},{}],items:{type:"object",properties:{answerId:{type:"string",default:null},text:{type:"string",default:""}}}},submitButtonLabel:{type:"string",default:Object(l.__)("Submit","crowdsignal-forms")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},confirmMessageType:{type:"string",default:se.RESULTS},customConfirmMessage:{type:"string"},redirectAddress:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:2},borderRadius:{type:"number",default:0},hasBoxShadow:{type:"boolean",default:!1},fontFamily:{type:"string",default:ie.THEME_DEFAULT},hasOneResponsePerComputer:{type:"boolean",default:!1},randomizeAnswers:{type:"boolean",default:!1},align:{type:"string"},width:{type:"number",default:100},pollStatus:{type:"string",default:fe.OPEN},closedPollState:{type:"string",default:be.SHOW_RESULTS},closedAfterDateTime:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},buttonAlignment:{type:"string",default:Oe.LIST}},ft={title:Object(l.__)("Poll","crowdsignal-forms"),description:Object(l.__)("Create polls and get your audience’s opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(l.__)("ask","crowdsignal-forms"),"crowdsignal",Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("form","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("poll","crowdsignal-forms"),Object(l.__)("pop","crowdsignal-forms"),Object(l.__)("question","crowdsignal-forms"),Object(l.__)("quiz","crowdsignal-forms"),Object(l.__)("research","crowdsignal-forms"),Object(l.__)("survey","crowdsignal-forms"),Object(l.__)("vote","crowdsignal-forms")],icon:Object(o.createElement)(a,null),edit:ut,attributes:dt,supports:{align:["center","wide","full"]},getEditWrapperProps:function(e){return{"data-align":e.align}},example:{attributes:{question:Object(l.__)("How did you hear about us?","crowdsignal-forms"),answers:[{text:Object(l.__)("Search","crowdsignal-forms")},{text:Object(l.__)("Friend","crowdsignal-forms")},{text:Object(l.__)("Email","crowdsignal-forms")}]}},styles:[{name:"default",label:Object(l.__)("Default","crowdsignal-forms"),isDefault:!0}]},bt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("mask",{id:"maskVote","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"3",width:"18",height:"18"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5999 9.525H13.3942L14.1779 5.75475L14.2027 5.49075C14.2027 5.1525 14.0624 4.839 13.8397 4.61625L12.9652 3.75L7.53666 9.18675C7.23142 9.48374 7.04992 9.89621 7.04991 10.3499H3.75V18.6824H7.05V18.6178C7.05963 19.5172 7.79834 20.25 8.69991 20.25H16.1249C16.8097 20.25 17.3954 19.8375 17.6429 19.2435L20.1344 13.4273C20.2087 13.2375 20.2499 13.0395 20.2499 12.825V11.175C20.2499 10.2675 19.5074 9.525 18.5999 9.525ZM7.05 18.6178V10.3499H7.04991C7.04991 10.35 7.04991 10.35 7.04991 10.35V18.6C7.04991 18.6059 7.04994 18.6119 7.05 18.6178ZM18.5999 12.825L16.1249 18.6H8.69986V10.35L12.2804 6.76952L11.3646 11.175H18.5999V12.825Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskVote)"},Object(o.createElement)("rect",{x:"1.00024",y:"1.25",width:"22",height:"22",fill:"#1E1E1E"})))},pt=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),mt=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),[{title:Object(l.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(l.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(l.__)("Large","crowdsignal-forms"),size:"large"}]),Ot={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"},gt=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,a=""!==r;return Object(o.createElement)(_.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,a?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:a?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!a},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:t.title,label:Object(l.__)("Title of the vote block","crowdsignal-forms"),onChange:function(e){return n({title:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Status","crowdsignal-forms")},Object(o.createElement)(E.SelectControl,{value:t.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:pt.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:pt.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:pt.CLOSED}],onChange:function(e){Object(f.includes)(pt,e)&&n({closedAfterDateTime:e===pt.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),pt.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(l.__)("Close vote block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})))},wt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1894 5.75L13.6668 5.75L13.6668 4.25H19.0002H19.7502L19.7502 5V10.3333H18.2502V6.81054L6.81072 18.25L10.3333 18.25V19.75L5 19.75H4.25V19V13.6666L5.75 13.6666L5.75 17.1894L17.1894 5.75Z"}))},ht=function(){return Object(o.createElement)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("line",{x1:"8",y1:"8.5",x2:"24",y2:"8.5",stroke:"currentColor"}),Object(o.createElement)("line",{x1:"8",y1:"15",x2:"24",y2:"15",stroke:"currentColor",strokeWidth:"2"}),Object(o.createElement)("line",{x1:"8",y1:"22.5",x2:"24",y2:"22.5",stroke:"currentColor",strokeWidth:"3"}))},jt=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M12.0078 18.2266C14.7656 18.2266 16.4062 15.9531 16.4062 12.3438C16.4062 8.73438 14.75 6.5 12.0078 6.5C9.25781 6.5 7.59375 8.75 7.59375 12.3516C7.59375 15.9688 9.24219 18.2266 12.0078 18.2266ZM12.0078 16.5781C10.5078 16.5781 9.625 15 9.625 12.3438C9.625 9.73438 10.5234 8.14844 12.0078 8.14844C13.4844 8.14844 14.3672 9.71875 14.3672 12.3516C14.3672 15.0078 13.5 16.5781 12.0078 16.5781Z"}))};function Ct(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}var vt=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),a=mt,c=Object(C.useState)(!1),s=j()(c,2),i=s[0],d=s[1],b=function(){return d(!i)},p=t.hideResults?Object(l.__)("Show vote counters","crowdsignal-forms"):Object(l.__)("Hide vote counters","crowdsignal-forms");return Object(o.createElement)(_.BlockControls,null,Object(o.createElement)(E.ToolbarGroup,{isCollapsed:!0,icon:wt,label:Object(l.__)("Change block size","crowdsignal-forms"),popoverProps:Ot,controls:a.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(E.Toolbar,{controls:[{icon:ht,onClick:b},{icon:jt,label:p,onClick:function(){return n({hideResults:!t.hideResults})},isActive:!t.hideResults,isPressed:!t.hideResults}]}),i&&Object(o.createElement)(E.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth||0}),Object(o.createElement)(E.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius||0}))))},_t=function(e,t){return function(n){var r=n.attributes,l=n.setAttributes,a=Object(f.isArray)(t)?t:[t];return Object(C.useEffect)((function(){Object(f.map)(a,(function(e){if(!r[e]){var t=Qe(),n={};n[e]=t,l(n)}}))})),Object(o.createElement)(e,n)}},Et=function(e,t,n,r){return Object(C.useEffect)((function(){Object(f.isEmpty)(window.csBlockTypeCount)&&(window.csBlockTypeCount={}),Object(f.isNil)(window.csBlockTypeCount[e])&&(window.csBlockTypeCount[e]=0),window.csBlockTypeCount[e]++,null===n.title&&(1===window.csBlockTypeCount[e]?r({title:t}):r({title:"".concat(t," ").concat(window.csBlockTypeCount[e])}))}),[])},yt=Object(x.compose)([st])(_t((function(e){var t=e.attributes,n=e.setAttributes,r=e.className,a=e.pollDataFromApi;Et(e.name,Object(l.__)("Untitled Vote","crowdsignal-forms"),t,n);var c=a?a.viewResultsUrl:"",s=Me(t.pollStatus,t.closedAfterDateTime),i=N()(r,"crowdsignal-forms-vote","size-".concat(t.size),{"no-results":t.hideResults,"is-closed":s}),u=function(e){return Object(f.mapKeys)({borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px")},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t);return Object(o.createElement)(tt,{blockIcon:null,blockName:Object(l.__)("Crowdsignal Vote","crowdsignal-forms")},Object(o.createElement)(gt,w()({},e,{viewResultsUrl:c})),Object(o.createElement)(vt,e),Object(o.createElement)("div",{className:i,style:u},Object(o.createElement)("div",{className:"crowdsignal-forms-vote__items"},Object(o.createElement)(_.InnerBlocks,{template:[["crowdsignal-forms/vote-item",{type:"up"}],["crowdsignal-forms/vote-item",{type:"down"}]],templateInsertUpdatesSelection:!1,templateLock:"insert",allowedBlocks:["crowdsignal-forms/vote-item"],orientation:"horizontal",__experimentalMoverDirection:"horizontal"}))))}),"pollId")),xt={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},pollStatus:{type:"string",default:pt.OPEN},closedAfterDateTime:{type:"string",default:null},size:{type:"string",default:"medium"},borderWidth:{type:"number",default:1},borderRadius:{type:"number",default:5},hideResults:{type:"boolean",default:!1}},St={title:Object(l.__)("Vote","crowdsignal-forms"),description:Object(l.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:[Object(l.__)("ballot","crowdsignal-forms"),Object(l.__)("button","crowdsignal-forms"),Object(l.__)("count","crowdsignal-forms"),"crowdsignal",Object(l.__)("deciding","crowdsignal-forms"),Object(l.__)("decision","crowdsignal-forms"),Object(l.__)("elect","crowdsignal-forms"),Object(l.__)("election","crowdsignal-forms"),Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("form","crowdsignal-forms"),Object(l.__)("like","crowdsignal-forms"),Object(l.__)("nero","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("poll","crowdsignal-forms"),Object(l.__)("polling","crowdsignal-forms"),Object(l.__)("rate","crowdsignal-forms"),Object(l.__)("rating","crowdsignal-forms"),Object(l.__)("research","crowdsignal-forms"),Object(l.__)("survey","crowdsignal-forms"),Object(l.__)("thumb down","crowdsignal-forms"),Object(l.__)("thumb up","crowdsignal-forms"),Object(l.__)("thumbs","crowdsignal-forms"),Object(l.__)("vote","crowdsignal-forms"),Object(l.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)(bt,null),edit:yt,save:function(){return Object(o.createElement)(_.InnerBlocks.Content,null)},attributes:xt,example:{attributes:{className:"crowdsignal-forms-vote__example",size:"large"}}},Nt=function(e){var t=e.attributes,n=e.setAttributes;return Object(o.createElement)(_.InspectorControls,null,Object(o.createElement)(_.PanelColorSettings,{title:Object(l.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]}))};function kt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Tt(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Lt=n(21),Pt=n.n(Lt),Rt=!1,At=v.a.createContext(null),It="entering",Dt="entered",Bt=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,l=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?l?(o="exited",r.appearStatus=It):o=Dt:o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}kt(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==It&&n!==Dt&&(t=It):n!==It&&n!==Dt||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===It?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[Pt.a.findDOMNode(this),r],l=o[0],a=o[1],c=this.getTimeouts(),s=r?c.appear:c.enter;!e&&!n||Rt?this.safeSetState({status:Dt},(function(){t.props.onEntered(l)})):(this.props.onEnter(l,a),this.safeSetState({status:It},(function(){t.props.onEntering(l,a),t.onTransitionEnd(s,(function(){t.safeSetState({status:Dt},(function(){t.props.onEntered(l,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Pt.a.findDOMNode(this);t&&!Rt?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Pt.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],l=o[0],a=o[1];this.props.addEndListener(l,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Tt(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return v.a.createElement(At.Provider,{value:null},"function"==typeof n?n(e,r):v.a.cloneElement(v.a.Children.only(n),r))},t}(v.a.Component);function Ft(){}Bt.contextType=At,Bt.propTypes={},Bt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ft,onEntering:Ft,onEntered:Ft,onExit:Ft,onExiting:Ft,onExited:Ft},Bt.UNMOUNTED="unmounted",Bt.EXITED="exited",Bt.ENTERING=It,Bt.ENTERED=Dt,Bt.EXITING="exiting";var Mt,Vt,Ht=Bt;var Ut="out-in",Wt="in-out",zt=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},Zt=((Mt={})[Ut]=function(e){var t=e.current,n=e.changeState;return v.a.cloneElement(t,{in:!1,onExited:zt(t,"onExited",(function(){n(It,null)}))})},Mt[Wt]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,v.a.cloneElement(r,{in:!0,onEntered:zt(r,"onEntered",(function(){n(It)}))})]},Mt),qt=((Vt={})[Ut]=function(e){var t=e.children,n=e.changeState;return v.a.cloneElement(t,{in:!0,onEntered:zt(t,"onEntered",(function(){n(Dt,v.a.cloneElement(t,{in:!0}))}))})},Vt[Wt]=function(e){var t=e.current,n=e.children,r=e.changeState;return[v.a.cloneElement(t,{in:!1,onExited:zt(t,"onExited",(function(){r(Dt,v.a.cloneElement(n,{in:!0}))}))}),v.a.cloneElement(n,{in:!0})]},Vt),Gt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:Dt,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}kt(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===It&&e.mode===Wt?{status:It}:!t.current||(n=t.current,r=e.children,n===r||v.a.isValidElement(n)&&v.a.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:v.a.cloneElement(e.children,{in:!0})}:{status:"exiting"};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,l=o.status,a=o.current,c={children:n,current:a,changeState:this.changeState,status:l};switch(l){case It:e=qt[r](c);break;case"exiting":e=Zt[r](c);break;case Dt:e=a}return v.a.createElement(At.Provider,{value:{isMounting:!this.appeared}},e)},t}(v.a.Component);Gt.propTypes={},Gt.defaultProps={mode:Ut};var Kt=Gt;function Yt(){return(Yt=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}).apply(this,arguments)}function Jt(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Xt=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Jt(n.className,r):n.setAttribute("class",Jt(n.className&&n.className.baseVal||"",r)));var n,r}))},$t=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1];t.removeClasses(o,"exit"),t.addClass(o,l?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1]?"appear":"enter";t.addClass(o,l,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],l=r[1]?"appear":"enter";t.removeClasses(o,l),t.addClass(o,l,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}kt(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,l=n.done;this.appliedClasses[t]={},r&&Xt(e,r),o&&Xt(e,o),l&&Xt(e,l)},n.render=function(){var e=this.props,t=(e.classNames,Tt(e,["classNames"]));return v.a.createElement(Ht,Yt({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(v.a.Component);$t.defaultProps={classNames:""},$t.propTypes={};var Qt=$t,en=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsUp)"},Object(o.createElement)("mask",{id:"maskThumbsUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"-1",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsUp)"},Object(o.createElement)("rect",{x:"0.999878",y:"-3.05176e-05",width:"22",height:"22",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsUp"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},tn=function(e){var t=e.className,n=e.fillColor,r=void 0===n?"black":n;return Object(o.createElement)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clipThumbsDown)"},Object(o.createElement)("mask",{id:"maskThumbsDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"5",width:"20",height:"20"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskThumbsDown)"},Object(o.createElement)("rect",{x:"23.0001",y:"24",width:"22",height:"22",transform:"rotate(-180 23.0001 24)",fill:r}))),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clipThumbsDown"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))},nn=function(e){return e?e>=1e7?"".concat(Object(f.round)(e/1e6),"M"):e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e4?"".concat(Object(f.round)(e/1e3),"K"):e>=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toString():"0"},rn=function(e){var t=e.attributes,n=e.voteCount,r=e.apiAnswerId,l=e.onVote,a=e.disabled,c=e.isVotedOn,s=e.hideCount,i=e.fallbackStyles,u=e.isInEditor,d=t.className,b=t.type,p=Object(C.useState)(0),m=j()(p,2),O=m[0],g=m[1],w=function(){!a&&l&&(g(1),l(r))},h="up"===b?en:tn,v="is-type-".concat(b),_=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-vote-item",d,{"is-voted-on":c,"is-disabled":a,"is-in-editor":u},v),E=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.textColor:e.textColor,r=Object(f.isEmpty)(e.backgroundColor)?t.backgroundColor:e.backgroundColor;return Object(f.mapKeys)({borderColor:e.borderColor,bgColor:r,textColor:n,votedColor:t.accentColor},(function(e,t){return"--crowdsignal-forms-vote-".concat(Object(f.kebabCase)(t))}))}(t,i),y=n+O;return Object(o.createElement)("div",{className:_,onClick:w,onKeyPress:w,role:"button",style:E,tabIndex:0},Object(o.createElement)(h,{className:"crowdsignal-forms-vote-item__icon",fillColor:"currentColor"}),!s&&Object(o.createElement)(Kt,{mode:"in-out"},Object(o.createElement)(Qt,{key:O,classNames:"crowdsignal-forms-vote-item__count",timeout:300},Object(o.createElement)("div",{className:"crowdsignal-forms-vote-item__count"},nn(y)))))};rn.propTypes={apiAnswerId:R.a.number,className:R.a.string,disabled:R.a.bool,isVotedOn:R.a.bool,onVote:R.a.func,type:R.a.string.isRequired,voteCount:R.a.number.isRequired};var on=rn,ln=Object(x.compose)([ke((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=T(t),o=T(n),l=window.getComputedStyle(n).color;if(r===o){var a=L(t);r=a||l}return{accentColor:r,textColor:l,backgroundColor:o}}))])(_t((function(e){var t=e.attributes,n=e.className,r=e.fallbackStyles,l=e.renderStyleProbe;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Nt,e),Object(o.createElement)(on,{attributes:t,fallbackStyles:r,className:n,voteCount:0,isInEditor:!0,type:t.type}),l())}),"answerId")),an={title:Object(l.__)("Vote Item","crowdsignal-forms"),description:Object(l.__)("Allow your audience to rate your work or express their opinion — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",parent:["crowdsignal-forms/vote"],icon:Object(o.createElement)(bt,null),edit:ln,attributes:{answerId:{type:"string",default:null},type:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"}}},cn=function(e){var t=e.showBranding,n=e.referralCode;return Object(o.createElement)("div",{className:"crowdsignal-forms__branding"},t&&Object(o.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:"https://crowdsignal.com?ref=".concat(n),target:"blank",rel:"noopener noreferrer"},Object(l.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&Object(o.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "))};cn.propTypes={showBranding:R.a.bool,referralCode:R.a.string.isRequired};var sn=cn,un=function(e){var t=e.active,n=e.className,r=N()("crowdsignal-forms-applause__animation",n,{"is-active":t});return Object(o.createElement)("svg",{className:r,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},Object(o.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},Object(o.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),Object(o.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),Object(o.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),Object(o.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},Object(o.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),Object(o.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),Object(o.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),Object(o.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},dn=function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,l=t.apiPollData?t.apiPollData.id:null,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(C.useState)(!1),l=j()(o,2),a=l[0],c=l[1],s=Object(C.useState)(!1),i=j()(s,2),u=i[0],d=i[1],f=Object(C.useState)(""),b=j()(f,2),p=b[0],m=b[1];Object(C.useEffect)((function(){t&&void 0!==M.a.get(r)&&(d(!0),m(M.a.get(r)))}),[]);var O=function(){var o=B()(I.a.mark((function o(l){var a,s,i,u=arguments;return I.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,c(!0),o.next=5,ne(e);case 5:return s=o.sent,o.next=8,re(s,e,l,a);case 8:d(!0),t&&(i=n?l.join(","):(new Date).getTime(),M.a.set(r,i,{sameSite:"Strict",expires:365}),m(i));case 10:return o.prev=10,c(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:u,isVoting:a,vote:O,storedCookieValue:p}}(l,!0),c=a.hasVoted,s=a.vote,i=Object(C.useState)(0),u=j()(i,2),d=u[0],b=u[1],p=Object(C.useState)(0),m=j()(p,2),O=m[0],g=m[1],w=Object(C.useState)(null),h=j()(w,2),v=h[0],_=h[1],E=Object(C.useState)(!1),y=j()(E,2),x=y[0],S=y[1],k=Object(C.useState)(null),T=j()(k,2),L=T[0],P=T[1],R=ge(l).results,A=Me(t.pollStatus,t.closedAfterDateTime),D=function(){if(null!==l&&!A){L&&clearTimeout(L),S(!0),P(setTimeout((function(){S(!1)}),200));var e=O+1;g(e),b(d+1);var n=t.apiPollData.answers[0].id;null!==v&&clearTimeout(v);var r=setTimeout((function(){s([n],e),_(null),g(0)}),1e3);_(r)}},F=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},n)}(t,"crowdsignal-forms-applause",t.className,"size-".concat(t.size),{"is-closed":A}),V=function(e,t){var n=Object(f.isEmpty)(e.textColor)?t.text:e.textColor;return Object(f.mapKeys)({bgColor:e.backgroundColor||t.surface,textColor:n,hoverColor:t.accent,borderRadius:"".concat(e.borderRadius||0,"px"),borderWidth:"".concat(e.borderWidth||0,"px"),borderColor:e.borderColor},(function(e,t){return"--crowdsignal-forms-applause-".concat(Object(f.kebabCase)(t))}))}(t,n),H=(null!==R?Object(f.values)(R)[0]:0)+d;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:F,style:V,onClick:D,onKeyPress:D,role:"button",tabIndex:0},Object(o.createElement)(un,{active:x}),Object(o.createElement)("p",{className:"crowdsignal-forms-applause__count"},nn(H)," Claps"),r()),Object(o.createElement)(sn,{showBranding:c&&!t.hideBranding,referralCode:"cs-forms-applause"}))};dn.propTypes={className:R.a.string};var fn=ke((function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})))}),(function(e){if(null===e)return{};var t=e.querySelector(".wp-block-button__link"),n=e.querySelector("p"),r=T(n),o=window.getComputedStyle(n).color,l=T(t),a=L(t),c=l;return c===r&&(c=a||o),{accent:c,surface:r,text:o}}))(dn),bn=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),pn=[{title:Object(l.__)("Small","crowdsignal-forms"),size:"small"},{title:Object(l.__)("Medium","crowdsignal-forms"),size:"medium"},{title:Object(l.__)("Large","crowdsignal-forms"),size:"large"}],mn={position:"bottom right",isAlternate:!0,className:"crowdsignal-forms-vote__size-dropdown"};function On(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}var gn=function(e){var t=e.attributes,n=e.setAttributes,r=Object(f.get)(t,"size","medium"),a=pn,c=Object(C.useState)(!1),s=j()(c,2),i=s[0],d=s[1],b=function(){return d(!i)};return Object(o.createElement)(_.BlockControls,null,Object(o.createElement)(E.ToolbarGroup,{isCollapsed:!0,icon:wt,label:Object(l.__)("Change block size","crowdsignal-forms"),popoverProps:mn,controls:a.map((function(e){var t=e.size;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{isActive:r===t,role:"menuitemradio",onClick:function(){return n({size:t})}})}))}),Object(o.createElement)(E.Toolbar,{controls:[{icon:ht,onClick:b}]}),i&&Object(o.createElement)(E.Popover,{className:"crowdsignal-forms__border-popover",onFocusOutside:b},Object(o.createElement)("div",{className:"crowdsignal-forms__row"},Object(o.createElement)(E.TextControl,{label:Object(l.__)("Border thickness","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderWidth:parseInt(e,10)||0})},value:t.borderWidth}),Object(o.createElement)(E.TextControl,{label:Object(l.__)("Corner radius","crowdsignal-forms"),type:"number",className:"crowdsignal-forms__small-text-input",onChange:function(e){n({borderRadius:parseInt(e,10)||0})},value:t.borderRadius}))))},wn=function(e){var t=e.attributes,n=e.setAttributes,r=e.viewResultsUrl,a=""!==r;return Object(o.createElement)(_.InspectorControls,null,Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Results","crowdsignal-forms"),initialOpen:!0},Object(o.createElement)("p",null,a?Object(l.__)("Manage results on ","crowdsignal-forms"):Object(l.__)("Publish this post to enable results on ","crowdsignal-forms"),Object(o.createElement)(E.ExternalLink,{href:a?r:"https://www.crowdsignal.com"},"crowdsignal.com")),Object(o.createElement)("p",null,Object(o.createElement)(E.Button,{href:r,isSecondary:!0,target:"_blank",disabled:!a},Object(l.__)("View results","crowdsignal-forms"))),Object(o.createElement)(E.TextControl,{value:t.title,label:Object(l.__)("Title of the applause block","crowdsignal-forms"),onChange:function(e){return n({title:e})}})),Object(o.createElement)(E.PanelBody,{title:Object(l.__)("Status","crowdsignal-forms")},Object(o.createElement)(E.SelectControl,{value:t.pollStatus,label:Object(l.__)("Currently","crowdsignal-forms"),options:[{label:Object(l.__)("Open","crowdsignal-forms"),value:bn.OPEN},{label:Object(l.__)("Closed after","crowdsignal-forms"),value:bn.CLOSED_AFTER},{label:Object(l.__)("Closed","crowdsignal-forms"),value:bn.CLOSED}],onChange:function(e){Object(f.includes)(bn,e)&&n({closedAfterDateTime:e===bn.CLOSED_AFTER?new Date((new Date).getTime()+864e5).toISOString():null,pollStatus:e})}}),bn.CLOSED_AFTER===t.pollStatus&&Object(o.createElement)(E.TimePicker,{currentTime:t.closedAfterDateTime,label:Object(l.__)("Close applause block on","crowdsignal-forms"),onChange:function(e){var t=new Date(e);n({closedAfterDateTime:t.toISOString()})},is12Hour:!0})),Object(o.createElement)(_.PanelColorSettings,{title:Object(l.__)("Styling","crowdsignal-forms"),initialOpen:!0,colorSettings:[{value:t.textColor,onChange:function(e){return n({textColor:e})},label:Object(l.__)("Text color","crowdsignal-forms")},{value:t.backgroundColor,onChange:function(e){return n({backgroundColor:e})},label:Object(l.__)("Background color","crowdsignal-forms")},{value:t.borderColor,onChange:function(e){return n({borderColor:e})},label:Object(l.__)("Border color","crowdsignal-forms")}]}))},hn=Object(x.compose)([st])(_t((function(e){var t=e.attributes,n=e.setAttributes,r=e.pollDataFromApi,a=r?r.viewResultsUrl:"";return Et(e.name,Object(l.__)("Untitled Applause","crowdsignal-forms"),t,n),Object(o.createElement)(tt,{blockIcon:null,blockName:Object(l.__)("Crowdsignal Applause","crowdsignal-forms")},Object(o.createElement)(wn,w()({},e,{viewResultsUrl:a})),Object(o.createElement)(gn,e),Object(o.createElement)(fn,e))}),["pollId","answerId"])),jn={pollId:{type:"string",default:null},hideBranding:{type:"boolean",default:!1},title:{type:"string",default:null},answerId:{type:"string",default:null},size:{type:"string",default:"medium"},pollStatus:{type:"string",default:bn.OPEN},closedAfterDateTime:{type:"string",default:null},textColor:{type:"string"},backgroundColor:{type:"string"},borderColor:{type:"string"},borderWidth:{type:"number",default:0},borderRadius:{type:"number",default:0}},Cn={title:Object(l.__)("Applause","crowdsignal-forms"),description:Object(l.__)("Let your audience cheer with a big round of applause — powered by Crowdsignal.","crowdsignal-forms"),category:"crowdsignal-forms",keywords:["crowdsignal",Object(l.__)("applause","crowdsignal-forms"),Object(l.__)("cheer","crowdsignal-forms"),Object(l.__)("cheering","crowdsignal-forms"),Object(l.__)("clap","crowdsignal-forms"),Object(l.__)("feedback","crowdsignal-forms"),Object(l.__)("kudos","crowdsignal-forms"),Object(l.__)("like","crowdsignal-forms"),Object(l.__)("opinion","crowdsignal-forms"),Object(l.__)("praise","crowdsignal-forms"),Object(l.__)("rating","crowdsignal-forms"),Object(l.__)("upvote","crowdsignal-forms"),Object(l.__)("upvoting","crowdsignal-forms"),Object(l.__)("votes","crowdsignal-forms"),Object(l.__)("voting","crowdsignal-forms")],icon:Object(o.createElement)((function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("g",{clipPath:"url(#clip0)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.5284 16.5813L18.7187 20.432C17.7707 21.7312 15.9506 22.0157 14.6513 21.0676L6.50915 15.1265C5.69788 14.5345 5.51988 13.3957 6.11185 12.5844C6.18478 12.4845 6.26946 12.3931 6.35573 12.3119L6.19112 12.1918C5.37984 11.5998 5.20185 10.461 5.79382 9.64968C5.93538 9.45568 6.10792 9.29329 6.30287 9.17428C6.1079 8.62662 6.17683 8.00125 6.54574 7.49567C7.11197 6.71967 8.18077 6.52659 8.98362 7.03133C9.03891 6.91852 9.10007 6.81 9.173 6.71006C9.76497 5.89878 10.9038 5.72079 11.7151 6.31276L17.3294 10.4094L17.6107 8.44349C17.6946 7.84704 18.1496 7.35925 18.7389 7.23069L20.7027 6.79878L22.045 14.3547C22.1819 15.1302 21.9917 15.9464 21.5284 16.5813ZM20.61 14.605L19.5377 8.54337L19.0543 8.65016L18.4231 13.0093L10.857 7.48855C10.857 7.48855 10.4687 7.4034 10.3486 7.56801C10.2285 7.73262 10.2635 7.95632 10.4281 8.07643L14.6667 11.1693L13.8088 12.345L8.22979 8.27416C8.06518 8.15405 7.84147 8.18902 7.72136 8.35362C7.60126 8.51823 7.63622 8.74194 7.80082 8.86204L13.3798 12.9329L12.5219 14.1087L7.47787 10.4282C7.31327 10.3081 7.08956 10.343 6.96945 10.5076C6.84934 10.6722 6.8843 10.8959 7.04891 11.0161L12.0929 14.6966L11.235 15.8723L7.7959 13.3629C7.6313 13.2428 7.40759 13.2777 7.28748 13.4423C7.16737 13.607 7.20233 13.8307 7.36694 13.9508L15.5091 19.8919C16.1558 20.3638 17.0709 20.2207 17.5428 19.5741L20.3568 15.7175C20.5884 15.4001 20.6763 14.9957 20.61 14.605Z",fill:"black"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813ZM17.3105 14.805L16.2381 8.74337L15.7548 8.85016L15.1235 13.2093L7.55749 7.68854C7.55749 7.68854 7.16918 7.6034 7.04907 7.76801C6.92896 7.93261 6.96392 8.15632 7.12853 8.27643L11.3672 11.3692L10.5092 12.545L4.93023 8.47416C4.76562 8.35405 4.54191 8.38901 4.4218 8.55362C4.3017 8.71823 4.33666 8.94193 4.50126 9.06204L10.0803 13.1329L9.22235 14.3087L4.17831 10.6282C4.0137 10.5081 3.79 10.543 3.66989 10.7076C3.54978 10.8722 3.58474 11.0959 3.74935 11.216L8.79338 14.8965L7.93546 16.0723L4.49634 13.5629C4.33173 13.4428 4.10803 13.4777 3.98792 13.6423C3.86781 13.8069 3.90277 14.0307 4.06738 14.1508L12.2096 20.0919C12.8562 20.5638 13.7714 20.4207 14.2432 19.7741L17.0572 15.9175C17.2889 15.6001 17.3767 15.1957 17.3105 14.805Z",fill:"black"}),Object(o.createElement)("rect",{x:"12.4851",y:"1.42175",width:"1.5",height:"3",transform:"rotate(8 12.4851 1.42175)",fill:"black"}),Object(o.createElement)("rect",{x:"16.9365",y:"2.15547",width:"1.5",height:"3",transform:"rotate(43 16.9365 2.15547)",fill:"black"}),Object(o.createElement)("rect",{x:"8.15195",y:"1.78963",width:"1.5",height:"3",transform:"rotate(-27 8.15195 1.78963)",fill:"black"})),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clip0"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"white"}))))}),null),edit:hn,attributes:jn,example:{attributes:{size:"large"}}};Object(r.registerBlockType)("crowdsignal-forms/poll",ft),Object(r.registerBlockType)("crowdsignal-forms/vote",St),Object(r.registerBlockType)("crowdsignal-forms/vote-item",an),Object(r.registerBlockType)("crowdsignal-forms/applause",Cn)}]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = "./client/editor.js");
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./client/blocks/applause/attributes.js":
|
90 |
+
/*!**********************************************!*\
|
91 |
+
!*** ./client/blocks/applause/attributes.js ***!
|
92 |
+
\**********************************************/
|
93 |
+
/*! exports provided: default */
|
94 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
95 |
+
|
96 |
+
"use strict";
|
97 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./client/blocks/applause/constants.js\");\n/*\n * Note: Any changes made to the attributes definition need to be duplicated in\n * Crowdsignal_Forms\\Frontend\\Blocks\\Crowdsignal_Forms_Applause_Block::attributes()\n * inside includes/frontend/blocks/class-crowdsignal-forms-applause-block.php.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n pollId: {\n type: 'string',\n default: null\n },\n hideBranding: {\n type: 'boolean',\n default: false\n },\n title: {\n type: 'string',\n default: null\n },\n answerId: {\n type: 'string',\n default: null\n },\n size: {\n type: 'string',\n default: 'medium'\n },\n pollStatus: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_0__[\"PollStatus\"].OPEN\n },\n closedAfterDateTime: {\n type: 'string',\n default: null\n },\n textColor: {\n type: 'string'\n },\n backgroundColor: {\n type: 'string'\n },\n borderColor: {\n type: 'string'\n },\n borderWidth: {\n type: 'number',\n default: 0\n },\n borderRadius: {\n type: 'number',\n default: 0\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/applause/attributes.js?");
|
98 |
+
|
99 |
+
/***/ }),
|
100 |
+
|
101 |
+
/***/ "./client/blocks/applause/constants.js":
|
102 |
+
/*!*********************************************!*\
|
103 |
+
!*** ./client/blocks/applause/constants.js ***!
|
104 |
+
\*********************************************/
|
105 |
+
/*! exports provided: PollStatus, DEFAULT_SIZE_CONTROLS, POPOVER_PROPS */
|
106 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
107 |
+
|
108 |
+
"use strict";
|
109 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStatus\", function() { return PollStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_SIZE_CONTROLS\", function() { return DEFAULT_SIZE_CONTROLS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"POPOVER_PROPS\", function() { return POPOVER_PROPS; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * WordPress dependencies\n */\n\nvar PollStatus = Object.freeze({\n OPEN: 'open',\n CLOSED: 'closed',\n CLOSED_AFTER: 'closed-after'\n});\nvar DEFAULT_SIZE_CONTROLS = [{\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Small', 'crowdsignal-forms'),\n size: 'small'\n}, {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Medium', 'crowdsignal-forms'),\n size: 'medium'\n}, {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Large', 'crowdsignal-forms'),\n size: 'large'\n}];\nvar POPOVER_PROPS = {\n position: 'bottom right',\n isAlternate: true,\n className: 'crowdsignal-forms-vote__size-dropdown'\n};\n\n//# sourceURL=webpack:///./client/blocks/applause/constants.js?");
|
110 |
+
|
111 |
+
/***/ }),
|
112 |
+
|
113 |
+
/***/ "./client/blocks/applause/edit.js":
|
114 |
+
/*!****************************************!*\
|
115 |
+
!*** ./client/blocks/applause/edit.js ***!
|
116 |
+
\****************************************/
|
117 |
+
/*! exports provided: default */
|
118 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
119 |
+
|
120 |
+
"use strict";
|
121 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/connect-to-crowdsignal */ \"./client/components/connect-to-crowdsignal/index.js\");\n/* harmony import */ var components_with_client_id__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/with-client-id */ \"./client/components/with-client-id/index.js\");\n/* harmony import */ var components_use_numbered_title__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! components/use-numbered-title */ \"./client/components/use-numbered-title/index.js\");\n/* harmony import */ var components_applause__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/applause */ \"./client/components/applause/index.js\");\n/* harmony import */ var components_with_poll_base__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/with-poll-base */ \"./client/components/with-poll-base/index.js\");\n/* harmony import */ var _toolbar__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./toolbar */ \"./client/blocks/applause/toolbar.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sidebar */ \"./client/blocks/applause/sidebar.js\");\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\nvar EditApplauseBlock = function EditApplauseBlock(props) {\n var attributes = props.attributes,\n setAttributes = props.setAttributes,\n pollDataFromApi = props.pollDataFromApi;\n var viewResultsUrl = pollDataFromApi ? pollDataFromApi.viewResultsUrl : '';\n Object(components_use_numbered_title__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(props.name, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Untitled Applause', 'crowdsignal-forms'), attributes, setAttributes);\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n blockIcon: null,\n blockName: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Crowdsignal Applause', 'crowdsignal-forms')\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_sidebar__WEBPACK_IMPORTED_MODULE_11__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n viewResultsUrl: viewResultsUrl\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_toolbar__WEBPACK_IMPORTED_MODULE_10__[\"default\"], props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(components_applause__WEBPACK_IMPORTED_MODULE_8__[\"default\"], props));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__[\"compose\"])([components_with_poll_base__WEBPACK_IMPORTED_MODULE_9__[\"default\"]])(Object(components_with_client_id__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(EditApplauseBlock, ['pollId', 'answerId'])));\n\n//# sourceURL=webpack:///./client/blocks/applause/edit.js?");
|
122 |
+
|
123 |
+
/***/ }),
|
124 |
+
|
125 |
+
/***/ "./client/blocks/applause/index.js":
|
126 |
+
/*!*****************************************!*\
|
127 |
+
!*** ./client/blocks/applause/index.js ***!
|
128 |
+
\*****************************************/
|
129 |
+
/*! exports provided: default */
|
130 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
131 |
+
|
132 |
+
"use strict";
|
133 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_icon_applause__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/icon/applause */ \"./client/components/icon/applause.js\");\n/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ \"./client/blocks/applause/edit.js\");\n/* harmony import */ var _attributes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./attributes */ \"./client/blocks/applause/attributes.js\");\n\n\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Applause', 'crowdsignal-forms'),\n description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Let your audience cheer with a big round of applause — powered by Crowdsignal.', 'crowdsignal-forms'),\n category: 'crowdsignal-forms',\n keywords: ['crowdsignal', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('applause', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('cheer', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('cheering', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('clap', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('feedback', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('kudos', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('like', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('opinion', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('praise', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('rating', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('upvote', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('upvoting', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('votes', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('voting', 'crowdsignal-forms')],\n icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_applause__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null),\n edit: _edit__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n attributes: _attributes__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n example: {\n attributes: {\n size: 'large'\n }\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/applause/index.js?");
|
134 |
+
|
135 |
+
/***/ }),
|
136 |
+
|
137 |
+
/***/ "./client/blocks/applause/sidebar.js":
|
138 |
+
/*!*******************************************!*\
|
139 |
+
!*** ./client/blocks/applause/sidebar.js ***!
|
140 |
+
\*******************************************/
|
141 |
+
/*! exports provided: default */
|
142 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
143 |
+
|
144 |
+
"use strict";
|
145 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ \"./client/blocks/applause/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\nvar SideBar = function SideBar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes,\n viewResultsUrl = _ref.viewResultsUrl;\n\n var handleChangeTitle = function handleChangeTitle(title) {\n return setAttributes({\n title: title\n });\n };\n\n var resultsLinkEnabled = '' !== viewResultsUrl;\n\n var handleChangePollStatus = function handleChangePollStatus(pollStatus) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"], pollStatus)) {\n return;\n } // closedAfterDateTime MUST be set when pollStatus is set to CLOSED_AFTER\n\n\n setAttributes({\n closedAfterDateTime: pollStatus === _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER ? new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString() : null,\n pollStatus: pollStatus\n });\n };\n\n var handleChangeCloseAfterDateTime = function handleChangeCloseAfterDateTime(closedAfterDateTime) {\n var dateTime = new Date(closedAfterDateTime);\n setAttributes({\n closedAfterDateTime: dateTime.toISOString()\n });\n };\n\n var handleChangeTextColor = function handleChangeTextColor(textColor) {\n return setAttributes({\n textColor: textColor\n });\n };\n\n var handleChangeBackgroundColor = function handleChangeBackgroundColor(backgroundColor) {\n return setAttributes({\n backgroundColor: backgroundColor\n });\n };\n\n var handleChangeBorderColor = function handleChangeBorderColor(borderColor) {\n return setAttributes({\n borderColor: borderColor\n });\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"InspectorControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Results', 'crowdsignal-forms'),\n initialOpen: true\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, resultsLinkEnabled ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Manage results on ', 'crowdsignal-forms') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Publish this post to enable results on ', 'crowdsignal-forms'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"ExternalLink\"], {\n href: resultsLinkEnabled ? viewResultsUrl : 'https://www.crowdsignal.com'\n }, \"crowdsignal.com\")), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"Button\"], {\n href: viewResultsUrl,\n isSecondary: true,\n target: \"_blank\",\n disabled: !resultsLinkEnabled\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('View results', 'crowdsignal-forms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n value: attributes.title,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Title of the applause block', 'crowdsignal-forms'),\n onChange: handleChangeTitle\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Status', 'crowdsignal-forms')\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.pollStatus,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Currently', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Open', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].OPEN\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Closed after', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Closed', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED\n }],\n onChange: handleChangePollStatus\n }), _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER === attributes.pollStatus && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TimePicker\"], {\n currentTime: attributes.closedAfterDateTime,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Close applause block on', 'crowdsignal-forms'),\n onChange: handleChangeCloseAfterDateTime,\n is12Hour: true\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"PanelColorSettings\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Styling', 'crowdsignal-forms'),\n initialOpen: true,\n colorSettings: [{\n value: attributes.textColor,\n onChange: handleChangeTextColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Text color', 'crowdsignal-forms')\n }, {\n value: attributes.backgroundColor,\n onChange: handleChangeBackgroundColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Background color', 'crowdsignal-forms')\n }, {\n value: attributes.borderColor,\n onChange: handleChangeBorderColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Border color', 'crowdsignal-forms')\n }]\n }));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SideBar);\n\n//# sourceURL=webpack:///./client/blocks/applause/sidebar.js?");
|
146 |
+
|
147 |
+
/***/ }),
|
148 |
+
|
149 |
+
/***/ "./client/blocks/applause/toolbar.js":
|
150 |
+
/*!*******************************************!*\
|
151 |
+
!*** ./client/blocks/applause/toolbar.js ***!
|
152 |
+
\*******************************************/
|
153 |
+
/*! exports provided: default */
|
154 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155 |
+
|
156 |
+
"use strict";
|
157 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constants */ \"./client/blocks/applause/constants.js\");\n/* harmony import */ var components_icon_size__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/icon/size */ \"./client/components/icon/size.js\");\n/* harmony import */ var components_icon_border__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/icon/border */ \"./client/components/icon/border.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\nvar ToolBar = function ToolBar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var size = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(attributes, 'size', 'medium');\n var sizeControls = _constants__WEBPACK_IMPORTED_MODULE_8__[\"DEFAULT_SIZE_CONTROLS\"];\n\n var handleChangeBorderRadius = function handleChangeBorderRadius(borderRadius) {\n setAttributes({\n borderRadius: parseInt(borderRadius, 10) || 0\n });\n };\n\n var handleChangeBorderWidth = function handleChangeBorderWidth(borderWidth) {\n setAttributes({\n borderWidth: parseInt(borderWidth, 10) || 0\n });\n };\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),\n isPopoverVisible = _useState2[0],\n setPopoverVisible = _useState2[1];\n\n var handlePopoverVisible = function handlePopoverVisible() {\n return setPopoverVisible(!isPopoverVisible);\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__[\"BlockControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"ToolbarGroup\"], {\n isCollapsed: true,\n icon: components_icon_size__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Change block size', 'crowdsignal-forms'),\n popoverProps: _constants__WEBPACK_IMPORTED_MODULE_8__[\"POPOVER_PROPS\"],\n controls: sizeControls.map(function (control) {\n var controlSize = control.size;\n var isActive = size === controlSize;\n return _objectSpread({}, control, {\n isActive: isActive,\n role: 'menuitemradio',\n onClick: function onClick() {\n return setAttributes({\n size: controlSize\n });\n }\n });\n })\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"Toolbar\"], {\n controls: [{\n icon: components_icon_border__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n onClick: handlePopoverVisible\n }]\n }), isPopoverVisible && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"Popover\"], {\n className: \"crowdsignal-forms__border-popover\",\n onFocusOutside: handlePopoverVisible\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__row\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Border thickness', 'crowdsignal-forms'),\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\",\n onChange: handleChangeBorderWidth,\n value: attributes.borderWidth\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Corner radius', 'crowdsignal-forms'),\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\",\n onChange: handleChangeBorderRadius,\n value: attributes.borderRadius\n }))));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ToolBar);\n\n//# sourceURL=webpack:///./client/blocks/applause/toolbar.js?");
|
158 |
+
|
159 |
+
/***/ }),
|
160 |
+
|
161 |
+
/***/ "./client/blocks/applause/util.js":
|
162 |
+
/*!****************************************!*\
|
163 |
+
!*** ./client/blocks/applause/util.js ***!
|
164 |
+
\****************************************/
|
165 |
+
/*! exports provided: getApplauseStyleVars, getBlockCssClasses */
|
166 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
167 |
+
|
168 |
+
"use strict";
|
169 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getApplauseStyleVars\", function() { return getApplauseStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getApplauseStyleVars = function getApplauseStyleVars(attributes, fallbackStyles) {\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.text : attributes.textColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"mapKeys\"])({\n bgColor: attributes.backgroundColor || fallbackStyles.surface,\n textColor: textColor,\n hoverColor: fallbackStyles.accent,\n borderRadius: \"\".concat(attributes.borderRadius || 0, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth || 0, \"px\"),\n borderColor: attributes.borderColor\n }, function (_, key) {\n return \"--crowdsignal-forms-applause-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"kebabCase\"])(key));\n });\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_0___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-border-color': attributes.borderColor\n }, extraClasses);\n};\n\n//# sourceURL=webpack:///./client/blocks/applause/util.js?");
|
170 |
+
|
171 |
+
/***/ }),
|
172 |
+
|
173 |
+
/***/ "./client/blocks/poll/attributes.js":
|
174 |
+
/*!******************************************!*\
|
175 |
+
!*** ./client/blocks/poll/attributes.js ***!
|
176 |
+
\******************************************/
|
177 |
+
/*! exports provided: default */
|
178 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
179 |
+
|
180 |
+
"use strict";
|
181 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/*\n * Note: Any changes made to the attributes definition need to be duplicated in\n * Crowdsignal_Forms\\Frontend\\Blocks\\Crowdsignal_Forms_Poll_Block::attributes()\n * inside includes/frontend/blocks/class-crowdsignal-forms-poll-block.php.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n pollId: {\n type: 'string',\n default: null\n },\n isMultipleChoice: {\n type: 'boolean',\n default: false\n },\n title: {\n type: 'string',\n default: null\n },\n question: {\n type: 'string',\n default: ''\n },\n note: {\n type: 'string',\n default: ''\n },\n answers: {\n type: 'array',\n default: [{}, {}, {}],\n items: {\n type: 'object',\n properties: {\n answerId: {\n type: 'string',\n default: null\n },\n text: {\n type: 'string',\n default: ''\n }\n }\n }\n },\n submitButtonLabel: {\n type: 'string',\n default: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Submit', 'crowdsignal-forms')\n },\n submitButtonTextColor: {\n type: 'string'\n },\n submitButtonBackgroundColor: {\n type: 'string'\n },\n confirmMessageType: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_1__[\"ConfirmMessageType\"].RESULTS\n },\n customConfirmMessage: {\n type: 'string'\n },\n redirectAddress: {\n type: 'string'\n },\n textColor: {\n type: 'string'\n },\n backgroundColor: {\n type: 'string'\n },\n borderColor: {\n type: 'string'\n },\n borderWidth: {\n type: 'number',\n default: 2\n },\n borderRadius: {\n type: 'number',\n default: 0\n },\n hasBoxShadow: {\n type: 'boolean',\n default: false\n },\n fontFamily: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_1__[\"FontFamilyType\"].THEME_DEFAULT\n },\n hasOneResponsePerComputer: {\n type: 'boolean',\n default: false\n },\n randomizeAnswers: {\n type: 'boolean',\n default: false\n },\n align: {\n type: 'string'\n },\n width: {\n type: 'number',\n default: 100\n },\n pollStatus: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_1__[\"PollStatus\"].OPEN\n },\n closedPollState: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_1__[\"ClosedPollState\"].SHOW_RESULTS\n },\n closedAfterDateTime: {\n type: 'string',\n default: null\n },\n hideBranding: {\n type: 'boolean',\n default: false\n },\n buttonAlignment: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_1__[\"ButtonAlignment\"].LIST\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/poll/attributes.js?");
|
182 |
+
|
183 |
+
/***/ }),
|
184 |
+
|
185 |
+
/***/ "./client/blocks/poll/constants.js":
|
186 |
+
/*!*****************************************!*\
|
187 |
+
!*** ./client/blocks/poll/constants.js ***!
|
188 |
+
\*****************************************/
|
189 |
+
/*! exports provided: ConfirmMessageType, FontFamilyType, GoogleFonts, FontFamilyMap, PollStatus, ClosedPollState, ConnectedAccountState, AnswerStyle, ButtonAlignment */
|
190 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
191 |
+
|
192 |
+
"use strict";
|
193 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConfirmMessageType\", function() { return ConfirmMessageType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyType\", function() { return FontFamilyType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GoogleFonts\", function() { return GoogleFonts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyMap\", function() { return FontFamilyMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStatus\", function() { return PollStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClosedPollState\", function() { return ClosedPollState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConnectedAccountState\", function() { return ConnectedAccountState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AnswerStyle\", function() { return AnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ButtonAlignment\", function() { return ButtonAlignment; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar _Object$freeze;\n\nvar ConfirmMessageType = Object.freeze({\n THANK_YOU: 'thank-you',\n CUSTOM_TEXT: 'custom-text',\n REDIRECT: 'redirect',\n RESULTS: 'results'\n});\nvar FontFamilyType = Object.freeze({\n THEME_DEFAULT: 'theme-default',\n GEORGIA: 'georgia',\n PALATINO: 'palatino',\n TIMES_NEW_ROMAN: 'times-new-roman',\n ARIAL: 'arial',\n IMPACT: 'impact',\n LUCIDA: 'lucida',\n TAHOMA: 'tahoma',\n TREBUCHET: 'trebuchet',\n VERDANA: 'verdana',\n COURIER: 'courier',\n // Google fonts: enum value = google font url slug\n CABIN: 'Cabin',\n CHIVO: 'Chivo',\n OPEN_SANS: 'Open+Sans',\n FIRA_SANS: 'Fira+Sans',\n ROBOTO: 'Roboto',\n NUNITO: 'Nunito',\n OVERPASS: 'Overpass',\n LATO: 'Lato',\n LIBRE_FRANKLIN: 'Libre+Franklin',\n MONTSERRAT: 'Montserrat',\n POPPINS: 'Poppins',\n RUBIK: 'Rubik',\n RALEWAY: 'Raleway',\n JOSEFIN_SANS: 'Josefin+Sans',\n ALEGREYA_SANS: 'Alegreya+Sans',\n OSWALD: 'Oswald'\n});\nvar GoogleFonts = Object.freeze([FontFamilyType.CABIN, FontFamilyType.CHIVO, FontFamilyType.OPEN_SANS, FontFamilyType.FIRA_SANS, FontFamilyType.ROBOTO, FontFamilyType.NUNITO, FontFamilyType.OVERPASS, FontFamilyType.LATO, FontFamilyType.LIBRE_FRANKLIN, FontFamilyType.MONTSERRAT, FontFamilyType.POPPINS, FontFamilyType.RUBIK, FontFamilyType.RALEWAY, FontFamilyType.JOSEFIN_SANS, FontFamilyType.ALEGREYA_SANS, FontFamilyType.OSWALD]);\nvar FontFamilyMap = Object.freeze((_Object$freeze = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.THEME_DEFAULT, null), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.GEORGIA, 'Georgia, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.PALATINO, '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TIMES_NEW_ROMAN, '\"Times New Roman\", Times, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ARIAL, 'Arial, Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.IMPACT, 'Impact, Charcoal, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LUCIDA, '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TAHOMA, 'Tahoma, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TREBUCHET, '\"Trebuchet MS\", Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.VERDANA, 'Verdana, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.COURIER, '\"Courier New\", Courier, monospace'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CABIN, '\"Cabin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CHIVO, '\"Chivo\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OPEN_SANS, '\"Open Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.FIRA_SANS, '\"Fira Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ROBOTO, '\"Roboto\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.NUNITO, '\"Nunito\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OVERPASS, '\"Overpass\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LATO, '\"Lato\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LIBRE_FRANKLIN, '\"Libre Franklin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.MONTSERRAT, '\"Montserrat\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.POPPINS, '\"Poppins\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RUBIK, '\"Rubik\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RALEWAY, '\"Raleway\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.JOSEFIN_SANS, '\"Josefin Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ALEGREYA_SANS, '\"Alegreya Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OSWALD, '\"Oswald\", sans-serif'), _Object$freeze));\nvar PollStatus = Object.freeze({\n OPEN: 'open',\n CLOSED: 'closed',\n CLOSED_AFTER: 'closed-after'\n});\nvar ClosedPollState = Object.freeze({\n SHOW_RESULTS: 'show-results',\n SHOW_CLOSED_BANNER: 'show-closed-banner',\n HIDDEN: 'hidden'\n});\nvar ConnectedAccountState = Object.freeze({\n CONNECTED: 'connected',\n NOT_CONNECTED: 'not-connected',\n NOT_VERIFIED: 'not-verified'\n});\nvar AnswerStyle = Object.freeze({\n RADIO: 'radio',\n BUTTON: 'button'\n});\nvar ButtonAlignment = Object.freeze({\n LIST: 'list',\n INLINE: 'inline'\n});\n\n//# sourceURL=webpack:///./client/blocks/poll/constants.js?");
|
194 |
+
|
195 |
+
/***/ }),
|
196 |
+
|
197 |
+
/***/ "./client/blocks/poll/edit-answer.js":
|
198 |
+
/*!*******************************************!*\
|
199 |
+
!*** ./client/blocks/poll/edit-answer.js ***!
|
200 |
+
\*******************************************/
|
201 |
+
/*! exports provided: default */
|
202 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
203 |
+
|
204 |
+
"use strict";
|
205 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\nvar EditAnswer = function EditAnswer(_ref) {\n var answer = _ref.answer,\n answerStyle = _ref.answerStyle,\n index = _ref.index,\n isMultipleChoice = _ref.isMultipleChoice,\n onChange = _ref.onChange,\n onDelete = _ref.onDelete,\n onNewAnswer = _ref.onNewAnswer,\n disabled = _ref.disabled;\n\n var handleChangeText = function handleChangeText(text) {\n return onChange(index, _objectSpread({}, answer, {\n text: text\n }));\n };\n\n var handleDelete = function handleDelete() {\n return onDelete(index);\n };\n\n var handleSplit = function handleSplit() {\n return onNewAnswer(index + 1);\n };\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__answer', {\n 'is-multiple-choice': isMultipleChoice,\n 'is-button': _constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].BUTTON === answerStyle\n });\n\n var renderRadioAnswers = function renderRadioAnswers() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__check\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-label-wrapper\"\n }, !disabled ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__[\"RichText\"], {\n className: \"crowdsignal-forms-poll__answer-label\",\n tagName: \"span\",\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__[\"__\"])('Enter an answer', 'crowdsignal-forms'),\n multiline: false,\n preserveWhiteSpace: false,\n onChange: handleChangeText,\n onSplit: handleSplit,\n onReplace: lodash__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onRemove: handleDelete,\n value: answer.text,\n allowedFormats: [],\n withoutInteractiveFormatting: true\n }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-label\"\n }, answer.text ? Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_6__[\"decodeEntities\"])(answer.text) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__[\"__\"])('Enter an answer', 'crowdsignal-forms'))));\n };\n\n var renderButtonAnswers = function renderButtonAnswers() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"wp-block-button crowdsignal-forms-poll__block-button\"\n }, !disabled ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__[\"RichText\"], {\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\",\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__[\"__\"])('Enter an answer', 'crowdsignal-forms'),\n multiline: false,\n preserveWhiteSpace: false,\n onChange: handleChangeText,\n onSplit: handleSplit,\n onReplace: lodash__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onRemove: handleDelete,\n value: answer.text,\n allowedFormats: [],\n withoutInteractiveFormatting: true,\n keepPlaceholderOnFocus: true\n }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\"\n }, answer.text ? Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_6__[\"decodeEntities\"])(answer.text) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__[\"__\"])('Enter an answer', 'crowdsignal-forms')));\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: classes\n }, _constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].RADIO === answerStyle && renderRadioAnswers(), _constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].BUTTON === answerStyle && renderButtonAnswers());\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (EditAnswer);\n\n//# sourceURL=webpack:///./client/blocks/poll/edit-answer.js?");
|
206 |
+
|
207 |
+
/***/ }),
|
208 |
+
|
209 |
+
/***/ "./client/blocks/poll/edit-answers.js":
|
210 |
+
/*!********************************************!*\
|
211 |
+
!*** ./client/blocks/poll/edit-answers.js ***!
|
212 |
+
\********************************************/
|
213 |
+
/*! exports provided: default */
|
214 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
215 |
+
|
216 |
+
"use strict";
|
217 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _edit_answer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./edit-answer */ \"./client/blocks/poll/edit-answer.js\");\n/* harmony import */ var components_poll_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! components/poll/util */ \"./client/components/poll/util.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\nvar shiftAnswerFocus = function shiftAnswerFocus(wrapper, index) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"tap\"])(wrapper.querySelectorAll('[role=textbox]')[index], function (answer) {\n return answer && answer.focus();\n });\n};\n\nvar EditAnswers = function EditAnswers(_ref) {\n var attributes = _ref.attributes,\n isSelected = _ref.isSelected,\n setAttributes = _ref.setAttributes,\n disabled = _ref.disabled,\n answerStyle = _ref.answerStyle,\n buttonAlignment = _ref.buttonAlignment;\n var answersContainer = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n\n var handleChangeSubmitButtonLabel = function handleChangeSubmitButtonLabel(submitButtonLabel) {\n return setAttributes({\n submitButtonLabel: submitButtonLabel\n });\n };\n\n var handleChangeAnswer = function handleChangeAnswer(index, answer) {\n return setAttributes({\n answers: Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"tap\"])(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(attributes.answers), function (answers) {\n answers[index] = answer;\n })\n });\n };\n\n var handleDeleteAnswer = function handleDeleteAnswer(index) {\n shiftAnswerFocus(answersContainer.current, Math.max(index - 1, 0));\n setAttributes({\n answers: Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(attributes.answers, function (answer) {\n return attributes.answers.length <= 2 || answer !== attributes.answers[index];\n })\n });\n };\n\n var handleNewAnswer = function handleNewAnswer(insertAt) {\n if (insertAt < attributes.answers.length) {\n setAttributes({\n answers: [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"slice\"])(attributes.answers, 0, insertAt)), [{}], _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"slice\"])(attributes.answers, insertAt, attributes.answers.length)))\n });\n }\n\n shiftAnswerFocus(answersContainer.current, Math.min(insertAt, attributes.answers.length));\n }; // Only show empty answers when the poll block is selected and not disabled\n\n\n var shouldShowAnswer = function shouldShowAnswer(answer) {\n return isSelected && !disabled || !Object(components_poll_util__WEBPACK_IMPORTED_MODULE_7__[\"isAnswerEmpty\"])(answer);\n }; // Rendering n + 1 answers vs a separate placeholder\n // prevents the text field from loosing focus when you start typing a new answer.\n\n\n var editableAnswers = isSelected && Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"last\"])(attributes.answers).text ? [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(attributes.answers), [{}]) : attributes.answers;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()({\n 'is-button': _constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].BUTTON === answerStyle,\n 'is-inline-button-alignment': _constants__WEBPACK_IMPORTED_MODULE_8__[\"ButtonAlignment\"].INLINE === buttonAlignment\n }, 'crowdsignal-forms-poll__options');\n var showSubmitButton = _constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].RADIO === answerStyle;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n ref: answersContainer,\n className: classes\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(editableAnswers, function (answer, index) {\n return shouldShowAnswer(answer) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_edit_answer__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n key: \"poll-answer-\".concat(index),\n answer: answer,\n answerStyle: answerStyle,\n index: index,\n isMultipleChoice: attributes.isMultipleChoice,\n onChange: handleChangeAnswer,\n onDelete: handleDeleteAnswer,\n onNewAnswer: handleNewAnswer,\n disabled: disabled\n });\n })), showSubmitButton && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__actions\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"wp-block-button crowdsignal-forms-poll__block-button\"\n }, !disabled ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__[\"RichText\"], {\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\",\n onChange: handleChangeSubmitButtonLabel,\n value: attributes.submitButtonLabel,\n allowedFormats: []\n }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\"\n }, attributes.submitButtonLabel))));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (EditAnswers);\n\n//# sourceURL=webpack:///./client/blocks/poll/edit-answers.js?");
|
218 |
+
|
219 |
+
/***/ }),
|
220 |
+
|
221 |
+
/***/ "./client/blocks/poll/edit-bar.js":
|
222 |
+
/*!****************************************!*\
|
223 |
+
!*** ./client/blocks/poll/edit-bar.js ***!
|
224 |
+
\****************************************/
|
225 |
+
/*! exports provided: default */
|
226 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
227 |
+
|
228 |
+
"use strict";
|
229 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\nvar EditBar = function EditBar(_ref) {\n var onEditClick = _ref.onEditClick;\n\n var handleEditClick = function handleEditClick() {\n onEditClick();\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__edit-bar\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__edit-bar-message\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Warning! This poll is published. Deleting or reordering answers may cause the loss of existing responses.', 'crowdsignal-forms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"button\", {\n className: \"crowdsignal-forms-poll__edit-bar-button\",\n onClick: handleEditClick\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Edit', 'crowdsignal-forms')));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (EditBar);\n\n//# sourceURL=webpack:///./client/blocks/poll/edit-bar.js?");
|
230 |
+
|
231 |
+
/***/ }),
|
232 |
+
|
233 |
+
/***/ "./client/blocks/poll/edit.js":
|
234 |
+
/*!************************************!*\
|
235 |
+
!*** ./client/blocks/poll/edit.js ***!
|
236 |
+
\************************************/
|
237 |
+
/*! exports provided: default */
|
238 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
239 |
+
|
240 |
+
"use strict";
|
241 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var components_poll_closed_banner__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/poll/closed-banner */ \"./client/components/poll/closed-banner.js\");\n/* harmony import */ var components_poll_styles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! components/poll/styles */ \"./client/components/poll/styles.js\");\n/* harmony import */ var components_poll_results__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! components/poll/results */ \"./client/components/poll/results.js\");\n/* harmony import */ var components_poll_util__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/poll/util */ \"./client/components/poll/util.js\");\n/* harmony import */ var components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! components/with-fallback-styles */ \"./client/components/with-fallback-styles/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n/* harmony import */ var _edit_answers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./edit-answers */ \"./client/blocks/poll/edit-answers.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./sidebar */ \"./client/blocks/poll/sidebar.js\");\n/* harmony import */ var _toolbar__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./toolbar */ \"./client/blocks/poll/toolbar.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./util */ \"./client/blocks/poll/util.js\");\n/* harmony import */ var components_poll_error_banner__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! components/poll/error-banner */ \"./client/components/poll/error-banner.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/index.js\");\n/* harmony import */ var _edit_bar__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./edit-bar */ \"./client/blocks/poll/edit-bar.js\");\n/* harmony import */ var components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! components/connect-to-crowdsignal */ \"./client/components/connect-to-crowdsignal/index.js\");\n/* harmony import */ var components_icon_poll__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! components/icon/poll */ \"./client/components/icon/poll.js\");\n/* harmony import */ var components_with_poll_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! components/with-poll-base */ \"./client/components/with-poll-base/index.js\");\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar withPollAndAnswerIds = function withPollAndAnswerIds(Element) {\n return function (props) {\n var attributes = props.attributes,\n setAttributes = props.setAttributes;\n Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"])(function () {\n if (!attributes.pollId) {\n var thePollId = Object(uuid__WEBPACK_IMPORTED_MODULE_22__[\"v4\"])();\n setAttributes({\n pollId: thePollId\n });\n }\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(attributes.answers, function (a) {\n return !a.answerId && a.text;\n })) {\n var answers = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(attributes.answers, function (answer) {\n if (answer.answerId || !answer.text) {\n return answer;\n }\n\n var answerId = Object(uuid__WEBPACK_IMPORTED_MODULE_22__[\"v4\"])();\n return _objectSpread({}, answer, {\n answerId: answerId\n });\n });\n setAttributes({\n answers: answers\n });\n }\n });\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(Element, props);\n };\n};\n\nvar PollBlock = function PollBlock(props) {\n var attributes = props.attributes,\n className = props.className,\n fallbackStyles = props.fallbackStyles,\n isSelected = props.isSelected,\n setAttributes = props.setAttributes,\n renderStyleProbe = props.renderStyleProbe,\n pollDataFromApi = props.pollDataFromApi;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"])(true),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),\n isPollEditable = _useState2[0],\n setIsPollEditable = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"])(''),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),\n errorMessage = _useState4[0],\n setErrorMessage = _useState4[1];\n\n var pollIsPublished = !Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEmpty\"])(pollDataFromApi);\n var viewResultsUrl = pollDataFromApi ? pollDataFromApi.viewResultsUrl : '';\n var pollIdFromApi = pollDataFromApi ? pollDataFromApi.id : null;\n var answerIdMap = {};\n\n if (pollDataFromApi) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(pollDataFromApi.answers, function (answer) {\n answerIdMap[answer.client_id] = answer.id;\n });\n }\n\n var handleChangeQuestion = function handleChangeQuestion(question) {\n return setAttributes({\n question: question\n });\n };\n\n var handleChangeNote = function handleChangeNote(note) {\n return setAttributes({\n note: note\n });\n };\n\n var handleResize = function handleResize(event, handle, element) {\n if (handle !== 'right' && handle !== 'left') {\n return;\n }\n\n setAttributes({\n width: Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"round\"])(element.offsetWidth / element.parentNode.offsetWidth * 100)\n });\n };\n\n var isResizable = isSelected && attributes.align !== 'full';\n var blockWidth = attributes.align !== 'full' ? \"\".concat(attributes.width, \"%\") : 'auto';\n var isClosed = Object(_util__WEBPACK_IMPORTED_MODULE_20__[\"isPollClosed\"])(attributes.pollStatus, attributes.closedAfterDateTime);\n var showNote = attributes.note || isSelected && isPollEditable;\n var showResults = isClosed && _constants__WEBPACK_IMPORTED_MODULE_16__[\"ClosedPollState\"].SHOW_RESULTS === attributes.closedPollState;\n var isHidden = isClosed && _constants__WEBPACK_IMPORTED_MODULE_16__[\"ClosedPollState\"].HIDDEN === attributes.closedPollState;\n var hideBranding = true; // hide branding in editor for now\n\n Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"])(function () {\n return setIsPollEditable(!pollIsPublished);\n }, [isSelected]);\n Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"])(function () {\n if (isSelected) {\n Object(_util__WEBPACK_IMPORTED_MODULE_20__[\"toggleButtonStyleAvailability\"])(!attributes.isMultipleChoice);\n }\n }, [attributes.isMultipleChoice, isSelected]);\n var showEditBar = isSelected && pollIsPublished && !isPollEditable;\n var answerStyle = Object(_util__WEBPACK_IMPORTED_MODULE_20__[\"getAnswerStyle\"])(attributes, className);\n\n if (attributes.fontFamily) {\n Object(components_poll_util__WEBPACK_IMPORTED_MODULE_14__[\"loadCustomFont\"])(attributes.fontFamily);\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n blockIcon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(components_icon_poll__WEBPACK_IMPORTED_MODULE_25__[\"default\"], null),\n blockName: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Crowdsignal Poll', 'crowdsignal-forms')\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_toolbar__WEBPACK_IMPORTED_MODULE_19__[\"default\"], props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_sidebar__WEBPACK_IMPORTED_MODULE_18__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n viewResultsUrl: viewResultsUrl\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"ResizableBox\"], {\n className: \"crowdsignal-forms-poll__resize-wrapper\",\n size: {\n height: 'auto',\n width: blockWidth\n },\n minWidth: \"25%\",\n maxWidth: \"100%\",\n enable: {\n left: true,\n right: true\n },\n onResizeStop: handleResize,\n showHandle: isResizable,\n resizeRatio: 2\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: Object(_util__WEBPACK_IMPORTED_MODULE_20__[\"getBlockCssClasses\"])(attributes, className, {\n 'is-selected-in-editor': isSelected,\n 'is-closed': isClosed,\n 'is-hidden': isHidden\n }, 'crowdsignal-forms-poll'),\n style: Object(_util__WEBPACK_IMPORTED_MODULE_20__[\"getStyleVars\"])(attributes, fallbackStyles)\n }, showEditBar && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_edit_bar__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n onEditClick: function onEditClick() {\n setIsPollEditable(true);\n }\n }), errorMessage && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(components_poll_error_banner__WEBPACK_IMPORTED_MODULE_21__[\"default\"], null, errorMessage), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__content\"\n }, isPollEditable ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__[\"RichText\"], {\n tagName: \"h3\",\n className: \"crowdsignal-forms-poll__question\",\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Enter your question', 'crowdsignal-forms'),\n onChange: handleChangeQuestion,\n value: attributes.question,\n allowedFormats: []\n }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"h3\", {\n className: \"crowdsignal-forms-poll__question\"\n }, attributes.question ? Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_8__[\"decodeEntities\"])(attributes.question) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Enter your question', 'crowdsignal-forms')), showNote && (isPollEditable ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__[\"RichText\"], {\n tagName: \"p\",\n className: \"crowdsignal-forms-poll__note\",\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Add a note (optional)', 'crowdsignal-forms'),\n onChange: handleChangeNote,\n value: attributes.note,\n allowedFormats: []\n }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"p\", {\n className: \"crowdsignal-forms-poll__note\"\n }, attributes.note ? Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_8__[\"decodeEntities\"])(attributes.note) : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__[\"__\"])('Add a note (optional)', 'crowdsignal-forms'))), !showResults && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_edit_answers__WEBPACK_IMPORTED_MODULE_17__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n setAttributes: setAttributes,\n disabled: !isPollEditable,\n answerStyle: answerStyle,\n buttonAlignment: attributes.buttonAlignment\n })), showResults && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(components_poll_results__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n answers: Object(components_poll_util__WEBPACK_IMPORTED_MODULE_14__[\"addApiAnswerIds\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"filter\"])(attributes.answers, function (answer) {\n return !Object(components_poll_util__WEBPACK_IMPORTED_MODULE_14__[\"isAnswerEmpty\"])(answer);\n }), answerIdMap),\n pollIdFromApi: pollIdFromApi,\n hideBranding: hideBranding,\n setErrorMessage: setErrorMessage\n })), isClosed && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(components_poll_closed_banner__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n isPollHidden: isHidden,\n isPollClosed: isClosed\n }), renderStyleProbe())));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__[\"compose\"])([Object(components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_15__[\"withFallbackStyles\"])(components_poll_styles__WEBPACK_IMPORTED_MODULE_12__[\"PollStyles\"], components_poll_styles__WEBPACK_IMPORTED_MODULE_12__[\"getPollStyles\"]), components_with_poll_base__WEBPACK_IMPORTED_MODULE_26__[\"default\"], withPollAndAnswerIds])(PollBlock));\n\n//# sourceURL=webpack:///./client/blocks/poll/edit.js?");
|
242 |
+
|
243 |
+
/***/ }),
|
244 |
+
|
245 |
+
/***/ "./client/blocks/poll/index.js":
|
246 |
+
/*!*************************************!*\
|
247 |
+
!*** ./client/blocks/poll/index.js ***!
|
248 |
+
\*************************************/
|
249 |
+
/*! exports provided: default */
|
250 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
251 |
+
|
252 |
+
"use strict";
|
253 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_icon_poll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/icon/poll */ \"./client/components/icon/poll.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./store */ \"./client/blocks/poll/store.js\");\n/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ \"./client/blocks/poll/edit.js\");\n/* harmony import */ var _attributes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./attributes */ \"./client/blocks/poll/attributes.js\");\n\n\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Poll', 'crowdsignal-forms'),\n description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Create polls and get your audience’s opinion — powered by Crowdsignal.', 'crowdsignal-forms'),\n category: 'crowdsignal-forms',\n keywords: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('ask', 'crowdsignal-forms'), 'crowdsignal', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('feedback', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('form', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('opinion', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('poll', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('pop', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('question', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('quiz', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('research', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('survey', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('vote', 'crowdsignal-forms')],\n icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_poll__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null),\n edit: _edit__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n attributes: _attributes__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n supports: {\n align: ['center', 'wide', 'full']\n },\n getEditWrapperProps: function getEditWrapperProps(_ref) {\n var align = _ref.align;\n return {\n 'data-align': align\n };\n },\n example: {\n attributes: {\n question: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('How did you hear about us?', 'crowdsignal-forms'),\n answers: [{\n text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Search', 'crowdsignal-forms')\n }, {\n text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Friend', 'crowdsignal-forms')\n }, {\n text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Email', 'crowdsignal-forms')\n }]\n }\n },\n styles: [{\n name: 'default',\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Default', 'crowdsignal-forms'),\n isDefault: true\n }]\n});\n\n//# sourceURL=webpack:///./client/blocks/poll/index.js?");
|
254 |
+
|
255 |
+
/***/ }),
|
256 |
+
|
257 |
+
/***/ "./client/blocks/poll/sidebar.js":
|
258 |
+
/*!***************************************!*\
|
259 |
+
!*** ./client/blocks/poll/sidebar.js ***!
|
260 |
+
\***************************************/
|
261 |
+
/*! exports provided: default */
|
262 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
263 |
+
|
264 |
+
"use strict";
|
265 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./util */ \"./client/blocks/poll/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar SideBar = function SideBar(_ref) {\n var _attributes$title;\n\n var attributes = _ref.attributes,\n className = _ref.className,\n setAttributes = _ref.setAttributes,\n fallbackBackgroundColor = _ref.fallbackBackgroundColor,\n fallbackTextColor = _ref.fallbackTextColor,\n fallbackSubmitButtonBackgroundColor = _ref.fallbackSubmitButtonBackgroundColor,\n fallbackSubmitButtonTextColor = _ref.fallbackSubmitButtonTextColor,\n viewResultsUrl = _ref.viewResultsUrl;\n\n var handleChangeTitle = function handleChangeTitle(title) {\n return setAttributes({\n title: title\n });\n };\n\n var handleChangeConfirmMessageType = function handleChangeConfirmMessageType(type) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"], type) && setAttributes({\n confirmMessageType: type\n });\n };\n\n var handleChangeCustomConfirmMessage = function handleChangeCustomConfirmMessage(customConfirmMessage) {\n return setAttributes({\n customConfirmMessage: customConfirmMessage\n });\n };\n\n var handleChangeRedirectAddress = function handleChangeRedirectAddress(redirectAddress) {\n return setAttributes({\n redirectAddress: redirectAddress\n });\n };\n\n var handleChangeTextColor = function handleChangeTextColor(textColor) {\n return setAttributes({\n textColor: textColor\n });\n };\n\n var handleChangeBackgroundColor = function handleChangeBackgroundColor(backgroundColor) {\n return setAttributes({\n backgroundColor: backgroundColor\n });\n };\n\n var handleChangeBorderColor = function handleChangeBorderColor(borderColor) {\n return setAttributes({\n borderColor: borderColor\n });\n };\n\n var handleChangeBorderRadius = function handleChangeBorderRadius(borderRadius) {\n setAttributes({\n borderRadius: parseInt(borderRadius, 10) || 0\n });\n };\n\n var handleChangeBorderWidth = function handleChangeBorderWidth(borderWidth) {\n setAttributes({\n borderWidth: parseInt(borderWidth, 10) || 0\n });\n };\n\n var handleChangeFontFamily = function handleChangeFontFamily(font) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"], font) && setAttributes({\n fontFamily: font\n });\n };\n\n var handleChangeHasOneResponsePerComputer = function handleChangeHasOneResponsePerComputer(hasOneResponsePerComputer) {\n return setAttributes({\n hasOneResponsePerComputer: hasOneResponsePerComputer\n });\n };\n\n var handleChangeRandomizeAnswers = function handleChangeRandomizeAnswers(randomizeAnswers) {\n return setAttributes({\n randomizeAnswers: randomizeAnswers\n });\n };\n\n var handleChangeSubmitButtonTextColor = function handleChangeSubmitButtonTextColor(submitButtonTextColor) {\n return setAttributes({\n submitButtonTextColor: submitButtonTextColor\n });\n };\n\n var handleChangeSubmitButtonBackgroundColor = function handleChangeSubmitButtonBackgroundColor(submitButtonBackgroundColor) {\n return setAttributes({\n submitButtonBackgroundColor: submitButtonBackgroundColor\n });\n };\n\n var handleChangePollStatus = function handleChangePollStatus(pollStatus) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"], pollStatus)) {\n return;\n } // closedAfterDateTime MUST be set when pollStatus is set to CLOSED_AFTER\n\n\n setAttributes({\n closedAfterDateTime: pollStatus === _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].CLOSED_AFTER ? new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString() : null,\n pollStatus: pollStatus\n });\n };\n\n var handleChangeClosedPollState = function handleChangeClosedPollState(closedPollState) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_7__[\"ClosedPollState\"], closedPollState) && setAttributes({\n closedPollState: closedPollState\n });\n };\n\n var handleChangeCloseAfterDateTime = function handleChangeCloseAfterDateTime(closedAfterDateTime) {\n var dateTime = new Date(closedAfterDateTime);\n setAttributes({\n closedAfterDateTime: dateTime.toISOString()\n });\n };\n\n var handleChangeHasBoxShadow = function handleChangeHasBoxShadow(hasBoxShadow) {\n setAttributes({\n hasBoxShadow: hasBoxShadow\n });\n };\n\n var handleChangeButtonAlignment = function handleChangeButtonAlignment(buttonAlignment) {\n return setAttributes({\n buttonAlignment: buttonAlignment\n });\n };\n\n var handleChangeWidth = function handleChangeWidth(width) {\n return setAttributes({\n width: parseInt(width, 10)\n });\n };\n\n var handleResetWidth = function handleResetWidth() {\n return setAttributes({\n width: 100\n });\n };\n\n var resultsLinkEnabled = '' !== viewResultsUrl;\n var answerStyle = Object(_util__WEBPACK_IMPORTED_MODULE_8__[\"getAnswerStyle\"])(attributes, className);\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"InspectorControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Results', 'crowdsignal-forms'),\n initialOpen: true\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, resultsLinkEnabled ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Manage results on ', 'crowdsignal-forms') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Publish this post to enable results on ', 'crowdsignal-forms'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"ExternalLink\"], {\n href: resultsLinkEnabled ? viewResultsUrl : 'https://www.crowdsignal.com'\n }, \"crowdsignal.com\")), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"Button\"], {\n href: viewResultsUrl,\n isSecondary: true,\n target: \"_blank\",\n disabled: !resultsLinkEnabled\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('View results', 'crowdsignal-forms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n value: Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_5__[\"decodeEntities\"])((_attributes$title = attributes.title) !== null && _attributes$title !== void 0 ? _attributes$title : attributes.question),\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Title of the poll block', 'crowdsignal-forms'),\n onChange: handleChangeTitle\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Confirmation message', 'crowdsignal-forms'),\n initialOpen: false\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.confirmMessageType,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('On submission', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Show results', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].RESULTS\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Show \"Thank You\" message', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].THANK_YOU\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Show a custom text message', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].CUSTOM_TEXT\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Redirect to another webpage', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].REDIRECT\n }],\n onChange: handleChangeConfirmMessageType\n }), _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].CUSTOM_TEXT === attributes.confirmMessageType && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextareaControl\"], {\n value: attributes.customConfirmMessage,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Message text', 'crowdsignal-forms'),\n placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Thanks for voting!', 'crowdsignal-forms'),\n onChange: handleChangeCustomConfirmMessage\n }), _constants__WEBPACK_IMPORTED_MODULE_7__[\"ConfirmMessageType\"].REDIRECT === attributes.confirmMessageType && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"URLInput\"], {\n className: \"crowdsignal-forms__redirect-url\",\n value: attributes.redirectAddress,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Redirect address', 'crowdsignal-forms'),\n onChange: handleChangeRedirectAddress\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Poll status', 'crowdsignal-forms'),\n initialOpen: false\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.pollStatus,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Currently', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Open', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].OPEN\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Closed after', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].CLOSED_AFTER\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Closed', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].CLOSED\n }],\n onChange: handleChangePollStatus\n }), _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].CLOSED_AFTER === attributes.pollStatus && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TimePicker\"], {\n currentTime: attributes.closedAfterDateTime,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Close poll on', 'crowdsignal-forms'),\n onChange: handleChangeCloseAfterDateTime,\n is12Hour: true\n }), _constants__WEBPACK_IMPORTED_MODULE_7__[\"PollStatus\"].OPEN !== attributes.pollStatus && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.closedPollState,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('When poll is closed', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Show results', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ClosedPollState\"].SHOW_RESULTS\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Show poll with \"Closed\" banner', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ClosedPollState\"].SHOW_CLOSED_BANNER\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Hide poll', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ClosedPollState\"].HIDDEN\n }],\n onChange: handleChangeClosedPollState\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"PanelColorSettings\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Block styling', 'crowdsignal-forms'),\n initialOpen: false,\n colorSettings: [{\n value: attributes.textColor,\n onChange: handleChangeTextColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Text color', 'crowdsignal-forms')\n }, {\n value: attributes.backgroundColor,\n onChange: handleChangeBackgroundColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Background color', 'crowdsignal-forms')\n }, {\n value: attributes.borderColor,\n onChange: handleChangeBorderColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Border color', 'crowdsignal-forms')\n }]\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"ContrastChecker\"], {\n textColor: attributes.textColor,\n backgroundColor: attributes.backgroundColor,\n fallbackBackgroundColor: fallbackBackgroundColor,\n fallbackTextColor: fallbackTextColor\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.fontFamily,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Choose font', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Default theme font', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].THEME_DEFAULT\n }, {\n label: 'Alegreya Sans',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].ALEGREYA_SANS\n }, {\n label: 'Arial',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].ARIAL\n }, {\n label: 'Cabin',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].CABIN\n }, {\n label: 'Chivo',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].CHIVO\n }, {\n label: 'Courier',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].COURIER\n }, {\n label: 'Fira Sans',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].FIRA_SANS\n }, {\n label: 'Georgia',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].GEORGIA\n }, {\n label: 'Impact',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].IMPACT\n }, {\n label: 'Josefin Sans',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].JOSEFIN_SANS\n }, {\n label: 'Lato',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].LATO\n }, {\n label: 'Libre Franklin',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].LIBRE_FRANKLIN\n }, {\n label: 'Lucida',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].LUCIDA\n }, {\n label: 'Montserrat',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].MONTSERRAT\n }, {\n label: 'Nunito',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].NUNITO\n }, {\n label: 'Open Sans',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].OPEN_SANS\n }, {\n label: 'Oswald',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].OSWALD\n }, {\n label: 'Overpass',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].OVERPASS\n }, {\n label: 'Palatino',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].PALATINO\n }, {\n label: 'Poppins',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].POPPINS\n }, {\n label: 'Raleway',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].RALEWAY\n }, {\n label: 'Roboto',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].ROBOTO\n }, {\n label: 'Rubik',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].RUBIK\n }, {\n label: 'Tahoma',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].TAHOMA\n }, {\n label: 'Times New Roman',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].TIMES_NEW_ROMAN\n }, {\n label: 'Trebuchet',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].TREBUCHET\n }, {\n label: 'Verdana',\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"FontFamilyType\"].VERDANA\n }],\n onChange: handleChangeFontFamily\n }), attributes.align !== 'full' && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__row\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n type: \"number\",\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Width (%)', 'crowdsignal-forms'),\n value: attributes.width,\n onChange: handleChangeWidth\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"Button\"], {\n isSmall: true,\n className: \"crowdsignal-forms__reset-width-button\",\n onClick: handleResetWidth\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Reset', 'crowdsignal-forms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__row\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Border thickness', 'crowdsignal-forms'),\n value: attributes.borderWidth,\n onChange: handleChangeBorderWidth,\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Corner radius', 'crowdsignal-forms'),\n value: attributes.borderRadius,\n onChange: handleChangeBorderRadius,\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"ToggleControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Drop shadow', 'crowdsignal-forms'),\n checked: attributes.hasBoxShadow,\n onChange: handleChangeHasBoxShadow\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"PanelColorSettings\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Button styling', 'crowdsignal-forms'),\n initialOpen: false,\n colorSettings: [{\n value: attributes.submitButtonTextColor,\n onChange: handleChangeSubmitButtonTextColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Text color', 'crowdsignal-forms')\n }, {\n value: attributes.submitButtonBackgroundColor,\n onChange: handleChangeSubmitButtonBackgroundColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Background color', 'crowdsignal-forms')\n }]\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"ContrastChecker\"], {\n textColor: attributes.submitButtonTextColor,\n backgroundColor: attributes.submitButtonBackgroundColor,\n fallbackBackgroundColor: fallbackSubmitButtonBackgroundColor,\n fallbackTextColor: fallbackSubmitButtonTextColor\n }), _constants__WEBPACK_IMPORTED_MODULE_7__[\"AnswerStyle\"].BUTTON === answerStyle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.buttonAlignment,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Alignment', 'crowdsignal-forms'),\n options: [{\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ButtonAlignment\"].LIST,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('List', 'crowdsignal-forms')\n }, {\n value: _constants__WEBPACK_IMPORTED_MODULE_7__[\"ButtonAlignment\"].INLINE,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Inline', 'crowdsignal-forms')\n }],\n onChange: handleChangeButtonAlignment\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Answer settings', 'crowdsignal-forms'),\n initialOpen: true\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"CheckboxControl\"], {\n checked: attributes.hasOneResponsePerComputer,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('One response per computer', 'crowdsignal-forms'),\n onChange: handleChangeHasOneResponsePerComputer\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"CheckboxControl\"], {\n checked: attributes.randomizeAnswers,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Randomize answer order', 'crowdsignal-forms'),\n onChange: handleChangeRandomizeAnswers\n })));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SideBar);\n\n//# sourceURL=webpack:///./client/blocks/poll/sidebar.js?");
|
266 |
+
|
267 |
+
/***/ }),
|
268 |
+
|
269 |
+
/***/ "./client/blocks/poll/store.js":
|
270 |
+
/*!*************************************!*\
|
271 |
+
!*** ./client/blocks/poll/store.js ***!
|
272 |
+
\*************************************/
|
273 |
+
/*! exports provided: default */
|
274 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
275 |
+
|
276 |
+
"use strict";
|
277 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * wordpress dependencies\n */\n\n\n/**\n * Module Constants\n */\n\nvar MODULE_KEY = 'crowdsignal-forms/polls';\nvar SET_TRY_FETCH = 'SET_TRY_FETCH';\nvar IS_FETCHING = 'IS_FETCHING';\nvar SET_POLL = 'SET_POLL';\nvar ADD_POLL_CLIENT_ID = 'ADD_POLL_CLIENT_ID';\nvar REMOVE_POLL_CLIENT_ID = 'REMOVE_POLL_CLIENT_ID';\nvar DEFAULT_STATE = {\n tryFetch: false,\n isFetching: false,\n pollsByClientId: {},\n pollClientIds: []\n};\nvar actions = {\n setTryFetchPollData: function setTryFetchPollData(tryFetch) {\n return {\n type: SET_TRY_FETCH,\n tryFetch: tryFetch\n };\n },\n setIsFetchingPollData: function setIsFetchingPollData(isFetching) {\n return {\n type: IS_FETCHING,\n isFetching: isFetching\n };\n },\n setPollApiDataForClientId: function setPollApiDataForClientId(clientId, pollData) {\n return {\n type: SET_POLL,\n clientId: clientId,\n pollData: pollData\n };\n },\n addPollClientId: function addPollClientId(clientId) {\n return {\n type: ADD_POLL_CLIENT_ID,\n clientId: clientId\n };\n },\n removePollClientId: function removePollClientId(clientId) {\n return {\n type: REMOVE_POLL_CLIENT_ID,\n clientId: clientId\n };\n }\n};\nvar store = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"registerStore\"])(MODULE_KEY, {\n reducer: function reducer() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case SET_TRY_FETCH:\n return _objectSpread({}, state, {\n tryFetch: !!action.tryFetch\n });\n\n case IS_FETCHING:\n return _objectSpread({}, state, {\n isFetching: !!action.isFetching\n });\n\n case SET_POLL:\n return _objectSpread({}, state, {\n pollsByClientId: _objectSpread({}, state.pollsByClientId, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, action.clientId, action.pollData))\n });\n\n case ADD_POLL_CLIENT_ID:\n return _objectSpread({}, state, {\n pollClientIds: state.pollClientIds.indexOf(action.clientId) < 0 ? [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(state.pollClientIds), [action.clientId]) : state.pollClientIds\n });\n\n case REMOVE_POLL_CLIENT_ID:\n return _objectSpread({}, state, {\n pollClientIds: Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(state.pollClientIds, function (clientId) {\n return clientId !== action.clientId;\n })\n });\n\n default:\n return state;\n }\n },\n actions: actions,\n selectors: {\n shouldTryFetchingPollData: function shouldTryFetchingPollData(state) {\n return !!state.tryFetch;\n },\n getPollDataByClientId: function getPollDataByClientId(state, clientId) {\n return state.pollsByClientId[clientId] || null;\n },\n getPollClientIds: function getPollClientIds(state) {\n return state.pollClientIds;\n },\n isFetchingPollData: function isFetchingPollData(state) {\n return !!state.isFetching;\n }\n },\n controls: {},\n resolvers: {}\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (store);\n\n//# sourceURL=webpack:///./client/blocks/poll/store.js?");
|
278 |
+
|
279 |
+
/***/ }),
|
280 |
+
|
281 |
+
/***/ "./client/blocks/poll/subscriptions.js":
|
282 |
+
/*!*********************************************!*\
|
283 |
+
!*** ./client/blocks/poll/subscriptions.js ***!
|
284 |
+
\*********************************************/
|
285 |
+
/*! exports provided: startPolling, startSubscriptions, withPollDataSelect, withPollDataDispatch */
|
286 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
287 |
+
|
288 |
+
"use strict";
|
289 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startPolling\", function() { return startPolling; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startSubscriptions\", function() { return startSubscriptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withPollDataSelect\", function() { return withPollDataSelect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withPollDataDispatch\", function() { return withPollDataDispatch; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ \"@wordpress/api-fetch\");\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * WordPress dependencies\n */\n\n\n\n\nvar isPollBlock = function isPollBlock(block) {\n return block.name === 'crowdsignal-forms/poll' || block.name === 'crowdsignal-forms/applause' || block.name === 'crowdsignal-forms/vote';\n};\n\nvar subsStarted = false;\nvar pollingStarted = false;\nvar startPolling = function startPolling() {\n if (pollingStarted) {\n return;\n }\n\n pollingStarted = true;\n var lastInterval = null;\n\n var scheduleNextTick = function scheduleNextTick() {\n if (null !== lastInterval) {\n clearTimeout(lastInterval);\n }\n\n lastInterval = setTimeout(function () {\n return tick();\n }, 1000 + Math.random() * 1000);\n };\n\n var tick = function tick() {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('crowdsignal-forms/polls'),\n getPollClientIds = _select.getPollClientIds,\n getPollDataByClientId = _select.getPollDataByClientId,\n shouldTryFetchingPollData = _select.shouldTryFetchingPollData,\n isFetchingPollData = _select.isFetchingPollData;\n\n var pollsWithNoApiData = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(getPollClientIds(), function (clientId) {\n return null === getPollDataByClientId(clientId);\n });\n\n if (pollsWithNoApiData.length < 1) {\n return scheduleNextTick();\n }\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"dispatch\"])('crowdsignal-forms/polls'),\n setTryFetchPollData = _dispatch.setTryFetchPollData,\n setPollApiDataForClientId = _dispatch.setPollApiDataForClientId,\n setIsFetchingPollData = _dispatch.setIsFetchingPollData;\n\n if (!shouldTryFetchingPollData()) {\n setTryFetchPollData(true);\n } else if (!isFetchingPollData()) {\n setIsFetchingPollData(true);\n Promise.all(Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(pollsWithNoApiData, function (clientId) {\n return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({\n path: \"/crowdsignal-forms/v1/polls/\".concat(clientId, \"?cached=1\"),\n method: 'GET'\n }).then(function (response) {\n return setPollApiDataForClientId(clientId, _objectSpread({}, response, {\n viewResultsUrl: \"https://app.crowdsignal.com/polls/\".concat(response.id, \"/results\")\n }));\n }, function () {\n return setPollApiDataForClientId(clientId, null);\n });\n })).finally(function () {\n return setIsFetchingPollData(false);\n });\n }\n\n return scheduleNextTick();\n };\n\n tick();\n};\nvar startSubscriptions = function startSubscriptions() {\n if (subsStarted) {\n return;\n }\n\n subsStarted = true;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('core/editor'),\n isEditedPostDirty = _select2.isEditedPostDirty,\n isEditedPostNew = _select2.isEditedPostNew,\n isSavingPost = _select2.isSavingPost,\n isCleanNewPost = _select2.isCleanNewPost,\n getCurrentPostId = _select2.getCurrentPostId;\n\n var _dispatch2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"dispatch\"])('crowdsignal-forms/polls'),\n setTryFetchPollData = _dispatch2.setTryFetchPollData,\n setPollApiDataForClientId = _dispatch2.setPollApiDataForClientId,\n setIsFetchingPollData = _dispatch2.setIsFetchingPollData;\n\n var _select3 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('crowdsignal-forms/polls'),\n shouldTryFetchingPollData = _select3.shouldTryFetchingPollData,\n getPollDataByClientId = _select3.getPollDataByClientId,\n isFetchingPollData = _select3.isFetchingPollData;\n\n Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"subscribe\"])(function () {\n var pollBlocks = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('core/block-editor').getBlocks(), isPollBlock);\n\n if (pollBlocks.length < 1) {\n return;\n }\n\n if (isFetchingPollData()) {\n return;\n }\n\n if (isCleanNewPost() || isEditedPostNew() || isSavingPost() || isEditedPostDirty()) {\n return;\n }\n\n var postId = getCurrentPostId();\n\n if (!postId) {\n return;\n }\n\n var pollsThatAreNotFetched = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"filter\"])(pollBlocks, function (_ref) {\n var attributes = _ref.attributes;\n return attributes.pollId && null === getPollDataByClientId(attributes.pollId);\n });\n\n if (pollsThatAreNotFetched.length < 1) {\n return;\n }\n\n if (!shouldTryFetchingPollData()) {\n setTryFetchPollData(true);\n } else if (!isFetchingPollData()) {\n setIsFetchingPollData(true);\n Promise.all(Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(pollsThatAreNotFetched, function (pollBlock) {\n var pollId = pollBlock.attributes.pollId;\n return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({\n path: \"/crowdsignal-forms/v1/polls/\".concat(pollId, \"?cached=1\"),\n method: 'GET'\n }).then(function (response) {\n return setPollApiDataForClientId(pollId, _objectSpread({}, response, {\n viewResultsUrl: \"https://app.crowdsignal.com/polls/\".concat(response.id, \"/results\")\n }));\n }, function () {\n return setPollApiDataForClientId(pollId, null);\n });\n })).finally(function () {\n return setIsFetchingPollData(false);\n });\n }\n });\n};\nvar withPollDataSelect = function withPollDataSelect() {\n return (// eslint-disable-next-line no-shadow\n Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select, ownProps) {\n var _select4 = select('crowdsignal-forms/polls'),\n getPollDataByClientId = _select4.getPollDataByClientId,\n shouldTryFetchingPollData = _select4.shouldTryFetchingPollData,\n isFetchingPollData = _select4.isFetchingPollData;\n\n var attributes = ownProps.attributes;\n var pollDataFromApi = attributes.pollId ? getPollDataByClientId(attributes.pollId) : null;\n return {\n pollDataFromApi: pollDataFromApi,\n getPollDataByClientId: getPollDataByClientId,\n shouldTryFetchingPollData: shouldTryFetchingPollData,\n isFetchingPollData: isFetchingPollData\n };\n })\n );\n};\nvar withPollDataDispatch = function withPollDataDispatch() {\n return (// eslint-disable-next-line no-shadow\n Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withDispatch\"])(function (dispatch) {\n var _dispatch3 = dispatch('crowdsignal-forms/polls'),\n setTryFetchPollData = _dispatch3.setTryFetchPollData,\n setPollApiDataForClientId = _dispatch3.setPollApiDataForClientId,\n setIsFetchingPollData = _dispatch3.setIsFetchingPollData,\n addPollClientId = _dispatch3.addPollClientId,\n removePollClientId = _dispatch3.removePollClientId;\n\n return {\n setTryFetchPollData: setTryFetchPollData,\n setPollApiDataForClientId: setPollApiDataForClientId,\n setIsFetchingPollData: setIsFetchingPollData,\n addPollClientId: addPollClientId,\n removePollClientId: removePollClientId\n };\n })\n );\n};\n\n//# sourceURL=webpack:///./client/blocks/poll/subscriptions.js?");
|
290 |
+
|
291 |
+
/***/ }),
|
292 |
+
|
293 |
+
/***/ "./client/blocks/poll/toolbar.js":
|
294 |
+
/*!***************************************!*\
|
295 |
+
!*** ./client/blocks/poll/toolbar.js ***!
|
296 |
+
\***************************************/
|
297 |
+
/*! exports provided: default */
|
298 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
299 |
+
|
300 |
+
"use strict";
|
301 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var components_icon_checklist_multiple_choice__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! components/icon/checklist-multiple-choice */ \"./client/components/icon/checklist-multiple-choice.js\");\n/* harmony import */ var components_icon_checklist_single_choice__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/icon/checklist-single-choice */ \"./client/components/icon/checklist-single-choice.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./util */ \"./client/blocks/poll/util.js\");\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar multipleChoiceControls = [{\n icon: components_icon_checklist_single_choice__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Choose one answer', 'crowdsignal-forms'),\n value: false\n}, {\n icon: components_icon_checklist_multiple_choice__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Choose multiple answers', 'crowdsignal-forms'),\n value: true\n}];\n\nvar PollToolbar = function PollToolbar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var multipleChoiceToolbar = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(multipleChoiceControls, function (button) {\n return _objectSpread({}, button, {\n isActive: button.value === attributes.isMultipleChoice,\n onClick: function onClick() {\n setAttributes({\n isMultipleChoice: button.value\n });\n Object(_util__WEBPACK_IMPORTED_MODULE_9__[\"toggleButtonStyleAvailability\"])(button.value);\n }\n });\n });\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__[\"BlockControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__[\"Toolbar\"], {\n controls: multipleChoiceToolbar\n }));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollToolbar);\n\n//# sourceURL=webpack:///./client/blocks/poll/toolbar.js?");
|
302 |
+
|
303 |
+
/***/ }),
|
304 |
+
|
305 |
+
/***/ "./client/blocks/poll/util.js":
|
306 |
+
/*!************************************!*\
|
307 |
+
!*** ./client/blocks/poll/util.js ***!
|
308 |
+
\************************************/
|
309 |
+
/*! exports provided: addAnswer, getFontFamilyFromType, getStyleVars, extractRGBColorProperties, hexToRGB, getBlockCssClasses, isPollClosed, getAnswerStyle, toggleButtonStyleAvailability */
|
310 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
311 |
+
|
312 |
+
"use strict";
|
313 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAnswer\", function() { return addAnswer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFontFamilyFromType\", function() { return getFontFamilyFromType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStyleVars\", function() { return getStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractRGBColorProperties\", function() { return extractRGBColorProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hexToRGB\", function() { return hexToRGB; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isPollClosed\", function() { return isPollClosed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAnswerStyle\", function() { return getAnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleButtonStyleAvailability\", function() { return toggleButtonStyleAvailability; });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Creates a new Answer object then returns a copy of the passed in `answers` array with the new answer appended to it.\n *\n * @param {Array} answers The existing array of answers.\n * @param {string} text\tThe text for the new answer to add.\n * @return {Array}\t\t\tThe newly created answers array.\n */\n\nvar addAnswer = function addAnswer(answers, text) {\n return [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(answers), [{\n answerId: null,\n text: text\n }]);\n};\nvar getFontFamilyFromType = function getFontFamilyFromType(type) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyType\"], type)) {\n return null;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyMap\"][type];\n};\nvar getStyleVars = function getStyleVars(attributes, fallbackStyles) {\n var _attributes$borderCol, _getFontFamilyFromTyp, _getFontFamilyFromTyp2, _extractRGBColorPrope;\n\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.text : attributes.textColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"mapKeys\"])({\n borderColor: (_attributes$borderCol = attributes.borderColor) !== null && _attributes$borderCol !== void 0 ? _attributes$borderCol : fallbackStyles.accent,\n borderRadius: \"\".concat(attributes.borderRadius, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth, \"px\"),\n bgColor: attributes.backgroundColor,\n bodyFontFamily: (_getFontFamilyFromTyp = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp !== void 0 ? _getFontFamilyFromTyp : fallbackStyles.bodyFontFamily,\n questionFontFamily: (_getFontFamilyFromTyp2 = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp2 !== void 0 ? _getFontFamilyFromTyp2 : fallbackStyles.questionFontFamily,\n submitButtonBgColor: attributes.submitButtonBackgroundColor || fallbackStyles.accent,\n submitButtonTextColor: attributes.submitButtonTextColor || fallbackStyles.textInverted,\n textColor: textColor,\n textColorProperties: (_extractRGBColorPrope = extractRGBColorProperties(textColor)) !== null && _extractRGBColorPrope !== void 0 ? _extractRGBColorPrope : '0, 0, 0',\n contentWideWidth: fallbackStyles.contentWideWidth\n }, function (_, key) {\n return \"--crowdsignal-forms-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"kebabCase\"])(key));\n });\n};\n/**\n * Extracts the comma separated color properties from an rgb string.\n * rgba strings are not supported for now because it introduces too many complications.\n *\n * @param {string} color The color string.\n * @return {string} The 3 comma separated rgb color properties.\n */\n\nvar extractRGBColorProperties = function extractRGBColorProperties(color) {\n if (!color || 'string' !== typeof color || -1 === color.indexOf('rgb') && 0 !== color.indexOf('#') || -1 < color.indexOf('rgba')) {\n return null;\n }\n\n if (0 === color.indexOf('#')) {\n color = hexToRGB(color);\n }\n\n return color.match(/\\((.*?)\\)/)[1];\n};\n/**\n * converts css color hex to rgb\n *\n * @param {string} h The hex color string.\n * @return {string} The rgb value.\n */\n\nvar hexToRGB = function hexToRGB(h) {\n var r = 0,\n g = 0,\n b = 0;\n var hexCode = 4 === h.length ? \"#\".concat(h[1] + h[1] + h[2] + h[2] + h[3] + h[3]) : h;\n\n if (7 === hexCode.length) {\n r = parseInt(hexCode.substr(1, 2), 16) || 0;\n g = parseInt(hexCode.substr(3, 2), 16) || 0;\n b = parseInt(hexCode.substr(5, 2), 16) || 0;\n }\n\n return \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\");\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n var _attributes$borderRad;\n\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_1___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-submit-button-bg-color': attributes.submitButtonBackgroundColor,\n 'has-submit-button-text-color': attributes.submitButtonTextColor,\n 'has-border-radius': (_attributes$borderRad = attributes.borderRadius) !== null && _attributes$borderRad !== void 0 ? _attributes$borderRad : false,\n 'has-box-shadow': attributes.hasBoxShadow\n }, extraClasses);\n};\n/**\n * Determines if the poll is closed based on its editor settings.\n *\n * @param {string} pollStatus The poll's status, as set in the editor.\n * @param {string} closedAfterDateTimeUTC The UTC date time string to close the poll after if pollStatus is PollStatus.CLOSED_AFTER.\n * @param {Date} currentDateTime Optionally set the current date that will be used for current time comparisons.\n */\n\nvar isPollClosed = function isPollClosed(pollStatus, closedAfterDateTimeUTC) {\n var currentDateTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Date();\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED === pollStatus) {\n return true;\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED_AFTER === pollStatus) {\n var closedAfterDateTime = new Date(closedAfterDateTimeUTC);\n return closedAfterDateTime < currentDateTime;\n }\n\n return false;\n};\n/**\n * Returns the type of answer controls that should be rendered given the current state of the block.\n *\n * @param {*} attributes the poll's attributes.\n * @param {string} className the css class string Gutenberg is passing into the block.\n */\n\nvar getAnswerStyle = function getAnswerStyle(attributes, className) {\n if (attributes.isMultipleChoice) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(className) && className.indexOf('is-style-buttons') > -1) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].BUTTON;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n};\n/**\n * Registers or de-registers the `buttons` block style.\n *\n * @param {boolean} enable True if button style should be available, false if not.\n */\n\nvar toggleButtonStyleAvailability = function toggleButtonStyleAvailability(enable) {\n if (enable) {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"registerBlockStyle\"])('crowdsignal-forms/poll', {\n name: 'buttons',\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Buttons', 'crowdsignal-forms')\n });\n } else {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"unregisterBlockStyle\"])('crowdsignal-forms/poll', 'buttons');\n }\n};\n\n//# sourceURL=webpack:///./client/blocks/poll/util.js?");
|
314 |
+
|
315 |
+
/***/ }),
|
316 |
+
|
317 |
+
/***/ "./client/blocks/vote-item/attributes.js":
|
318 |
+
/*!***********************************************!*\
|
319 |
+
!*** ./client/blocks/vote-item/attributes.js ***!
|
320 |
+
\***********************************************/
|
321 |
+
/*! exports provided: default */
|
322 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
323 |
+
|
324 |
+
"use strict";
|
325 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/*\n * Note: Any changes made to the attributes definition need to be duplicated in\n * Crowdsignal_Forms\\Frontend\\Blocks\\Crowdsignal_Forms_Vote_Item_Block::attributes()\n * inside includes/frontend/blocks/class-crowdsignal-forms-vote-item-block.php.\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n answerId: {\n type: 'string',\n default: null\n },\n type: {\n type: 'string'\n },\n textColor: {\n type: 'string'\n },\n backgroundColor: {\n type: 'string'\n },\n borderColor: {\n type: 'string'\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/vote-item/attributes.js?");
|
326 |
+
|
327 |
+
/***/ }),
|
328 |
+
|
329 |
+
/***/ "./client/blocks/vote-item/edit.js":
|
330 |
+
/*!*****************************************!*\
|
331 |
+
!*** ./client/blocks/vote-item/edit.js ***!
|
332 |
+
\*****************************************/
|
333 |
+
/*! exports provided: default */
|
334 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
335 |
+
|
336 |
+
"use strict";
|
337 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sidebar */ \"./client/blocks/vote-item/sidebar.js\");\n/* harmony import */ var components_with_client_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/with-client-id */ \"./client/components/with-client-id/index.js\");\n/* harmony import */ var components_vote_vote_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/vote/vote-item */ \"./client/components/vote/vote-item.js\");\n/* harmony import */ var components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/with-fallback-styles */ \"./client/components/with-fallback-styles/index.js\");\n/* harmony import */ var components_vote_styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! components/vote/styles */ \"./client/components/vote/styles.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\nvar EditVoteItemBlock = function EditVoteItemBlock(props) {\n var attributes = props.attributes,\n className = props.className,\n fallbackStyles = props.fallbackStyles,\n renderStyleProbe = props.renderStyleProbe;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_sidebar__WEBPACK_IMPORTED_MODULE_3__[\"default\"], props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_vote_vote_item__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n attributes: attributes,\n fallbackStyles: fallbackStyles,\n className: className,\n voteCount: 0,\n isInEditor: true,\n type: attributes.type\n }), renderStyleProbe());\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__[\"compose\"])([Object(components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_6__[\"withFallbackStyles\"])(components_vote_styles__WEBPACK_IMPORTED_MODULE_7__[\"VoteStyles\"], components_vote_styles__WEBPACK_IMPORTED_MODULE_7__[\"getVoteStyles\"])])(Object(components_with_client_id__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(EditVoteItemBlock, 'answerId')));\n\n//# sourceURL=webpack:///./client/blocks/vote-item/edit.js?");
|
338 |
+
|
339 |
+
/***/ }),
|
340 |
+
|
341 |
+
/***/ "./client/blocks/vote-item/index.js":
|
342 |
+
/*!******************************************!*\
|
343 |
+
!*** ./client/blocks/vote-item/index.js ***!
|
344 |
+
\******************************************/
|
345 |
+
/*! exports provided: default */
|
346 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
347 |
+
|
348 |
+
"use strict";
|
349 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_icon_vote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/icon/vote */ \"./client/components/icon/vote.js\");\n/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ \"./client/blocks/vote-item/edit.js\");\n/* harmony import */ var _attributes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./attributes */ \"./client/blocks/vote-item/attributes.js\");\n\n\n/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Vote Item', 'crowdsignal-forms'),\n description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Allow your audience to rate your work or express their opinion — powered by Crowdsignal.', 'crowdsignal-forms'),\n category: 'crowdsignal-forms',\n parent: ['crowdsignal-forms/vote'],\n icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_vote__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null),\n edit: _edit__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n attributes: _attributes__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n\n//# sourceURL=webpack:///./client/blocks/vote-item/index.js?");
|
350 |
+
|
351 |
+
/***/ }),
|
352 |
+
|
353 |
+
/***/ "./client/blocks/vote-item/sidebar.js":
|
354 |
+
/*!********************************************!*\
|
355 |
+
!*** ./client/blocks/vote-item/sidebar.js ***!
|
356 |
+
\********************************************/
|
357 |
+
/*! exports provided: default */
|
358 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
359 |
+
|
360 |
+
"use strict";
|
361 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n\nvar SideBar = function SideBar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n\n var handleChangeTextColor = function handleChangeTextColor(textColor) {\n return setAttributes({\n textColor: textColor\n });\n };\n\n var handleChangeBackgroundColor = function handleChangeBackgroundColor(backgroundColor) {\n return setAttributes({\n backgroundColor: backgroundColor\n });\n };\n\n var handleChangeBorderColor = function handleChangeBorderColor(borderColor) {\n return setAttributes({\n borderColor: borderColor\n });\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__[\"InspectorControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__[\"PanelColorSettings\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Styling', 'crowdsignal-forms'),\n initialOpen: true,\n colorSettings: [{\n value: attributes.textColor,\n onChange: handleChangeTextColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Text color', 'crowdsignal-forms')\n }, {\n value: attributes.backgroundColor,\n onChange: handleChangeBackgroundColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Background color', 'crowdsignal-forms')\n }, {\n value: attributes.borderColor,\n onChange: handleChangeBorderColor,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Border color', 'crowdsignal-forms')\n }]\n }));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SideBar);\n\n//# sourceURL=webpack:///./client/blocks/vote-item/sidebar.js?");
|
362 |
+
|
363 |
+
/***/ }),
|
364 |
+
|
365 |
+
/***/ "./client/blocks/vote/attributes.js":
|
366 |
+
/*!******************************************!*\
|
367 |
+
!*** ./client/blocks/vote/attributes.js ***!
|
368 |
+
\******************************************/
|
369 |
+
/*! exports provided: default */
|
370 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
371 |
+
|
372 |
+
"use strict";
|
373 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./client/blocks/vote/constants.js\");\n/*\n * Note: Any changes made to the attributes definition need to be duplicated in\n * Crowdsignal_Forms\\Frontend\\Blocks\\Crowdsignal_Forms_Vote_Block::attributes()\n * inside includes/frontend/blocks/class-crowdsignal-forms-vote-block.php.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n pollId: {\n type: 'string',\n default: null\n },\n hideBranding: {\n type: 'boolean',\n default: false\n },\n title: {\n type: 'string',\n default: null\n },\n pollStatus: {\n type: 'string',\n default: _constants__WEBPACK_IMPORTED_MODULE_0__[\"PollStatus\"].OPEN\n },\n closedAfterDateTime: {\n type: 'string',\n default: null\n },\n size: {\n type: 'string',\n default: 'medium'\n },\n borderWidth: {\n type: 'number',\n default: 1\n },\n borderRadius: {\n type: 'number',\n default: 5\n },\n hideResults: {\n type: 'boolean',\n default: false\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/vote/attributes.js?");
|
374 |
+
|
375 |
+
/***/ }),
|
376 |
+
|
377 |
+
/***/ "./client/blocks/vote/constants.js":
|
378 |
+
/*!*****************************************!*\
|
379 |
+
!*** ./client/blocks/vote/constants.js ***!
|
380 |
+
\*****************************************/
|
381 |
+
/*! exports provided: PollStatus, ConnectedAccountState, DEFAULT_SIZE_CONTROLS, POPOVER_PROPS */
|
382 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
383 |
+
|
384 |
+
"use strict";
|
385 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStatus\", function() { return PollStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConnectedAccountState\", function() { return ConnectedAccountState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_SIZE_CONTROLS\", function() { return DEFAULT_SIZE_CONTROLS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"POPOVER_PROPS\", function() { return POPOVER_PROPS; });\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * WordPress dependencies\n */\n\nvar PollStatus = Object.freeze({\n OPEN: 'open',\n CLOSED: 'closed',\n CLOSED_AFTER: 'closed-after'\n});\nvar ConnectedAccountState = Object.freeze({\n CONNECTED: 'connected',\n NOT_CONNECTED: 'not-connected',\n NOT_VERIFIED: 'not-verified'\n});\nvar DEFAULT_SIZE_CONTROLS = [{\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Small', 'crowdsignal-forms'),\n size: 'small'\n}, {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Medium', 'crowdsignal-forms'),\n size: 'medium'\n}, {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Large', 'crowdsignal-forms'),\n size: 'large'\n}];\nvar POPOVER_PROPS = {\n position: 'bottom right',\n isAlternate: true,\n className: 'crowdsignal-forms-vote__size-dropdown'\n};\n\n//# sourceURL=webpack:///./client/blocks/vote/constants.js?");
|
386 |
+
|
387 |
+
/***/ }),
|
388 |
+
|
389 |
+
/***/ "./client/blocks/vote/edit.js":
|
390 |
+
/*!************************************!*\
|
391 |
+
!*** ./client/blocks/vote/edit.js ***!
|
392 |
+
\************************************/
|
393 |
+
/*! exports provided: default */
|
394 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
395 |
+
|
396 |
+
"use strict";
|
397 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./sidebar */ \"./client/blocks/vote/sidebar.js\");\n/* harmony import */ var _toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./toolbar */ \"./client/blocks/vote/toolbar.js\");\n/* harmony import */ var components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/connect-to-crowdsignal */ \"./client/components/connect-to-crowdsignal/index.js\");\n/* harmony import */ var components_with_client_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/with-client-id */ \"./client/components/with-client-id/index.js\");\n/* harmony import */ var blocks_vote_util__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! blocks/vote/util */ \"./client/blocks/vote/util.js\");\n/* harmony import */ var blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! blocks/poll/util */ \"./client/blocks/poll/util.js\");\n/* harmony import */ var components_use_numbered_title__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! components/use-numbered-title */ \"./client/components/use-numbered-title/index.js\");\n/* harmony import */ var components_with_poll_base__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/with-poll-base */ \"./client/components/with-poll-base/index.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\n\nvar EditVoteBlock = function EditVoteBlock(props) {\n var attributes = props.attributes,\n setAttributes = props.setAttributes,\n className = props.className,\n pollDataFromApi = props.pollDataFromApi;\n Object(components_use_numbered_title__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(props.name, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Untitled Vote', 'crowdsignal-forms'), attributes, setAttributes);\n var viewResultsUrl = pollDataFromApi ? pollDataFromApi.viewResultsUrl : '';\n var isClosed = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__[\"isPollClosed\"])(attributes.pollStatus, attributes.closedAfterDateTime);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, 'crowdsignal-forms-vote', \"size-\".concat(attributes.size), {\n 'no-results': attributes.hideResults,\n 'is-closed': isClosed\n });\n var voteItemStyleVars = Object(blocks_vote_util__WEBPACK_IMPORTED_MODULE_11__[\"getVoteStyleVars\"])(attributes);\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(components_connect_to_crowdsignal__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n blockIcon: null,\n blockName: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__[\"__\"])('Crowdsignal Vote', 'crowdsignal-forms')\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_sidebar__WEBPACK_IMPORTED_MODULE_7__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n viewResultsUrl: viewResultsUrl\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_toolbar__WEBPACK_IMPORTED_MODULE_8__[\"default\"], props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: classes,\n style: voteItemStyleVars\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-vote__items\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__[\"InnerBlocks\"], {\n template: [['crowdsignal-forms/vote-item', {\n type: 'up'\n }], ['crowdsignal-forms/vote-item', {\n type: 'down'\n }]],\n templateInsertUpdatesSelection: false,\n templateLock: \"insert\",\n allowedBlocks: ['crowdsignal-forms/vote-item'],\n orientation: \"horizontal\",\n __experimentalMoverDirection: \"horizontal\" // required for pre WP 5.5, post 5.5 only requires `orientation` to be set\n\n }))));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__[\"compose\"])([components_with_poll_base__WEBPACK_IMPORTED_MODULE_14__[\"default\"]])(Object(components_with_client_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(EditVoteBlock, 'pollId')));\n\n//# sourceURL=webpack:///./client/blocks/vote/edit.js?");
|
398 |
+
|
399 |
+
/***/ }),
|
400 |
+
|
401 |
+
/***/ "./client/blocks/vote/index.js":
|
402 |
+
/*!*************************************!*\
|
403 |
+
!*** ./client/blocks/vote/index.js ***!
|
404 |
+
\*************************************/
|
405 |
+
/*! exports provided: default */
|
406 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
407 |
+
|
408 |
+
"use strict";
|
409 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var components_icon_vote__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! components/icon/vote */ \"./client/components/icon/vote.js\");\n/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ \"./client/blocks/vote/edit.js\");\n/* harmony import */ var _attributes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./attributes */ \"./client/blocks/vote/attributes.js\");\n\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n // import './store';\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Vote', 'crowdsignal-forms'),\n description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Allow your audience to rate your work or express their opinion — powered by Crowdsignal.', 'crowdsignal-forms'),\n category: 'crowdsignal-forms',\n keywords: [Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('ballot', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('button', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('count', 'crowdsignal-forms'), 'crowdsignal', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('deciding', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('decision', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('elect', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('election', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('feedback', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('form', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('like', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('nero', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('opinion', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('poll', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('polling', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('rate', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('rating', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('research', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('survey', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('thumb down', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('thumb up', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('thumbs', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('vote', 'crowdsignal-forms'), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('voting', 'crowdsignal-forms')],\n icon: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_vote__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null),\n edit: _edit__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n save: function save() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__[\"InnerBlocks\"].Content, null);\n },\n attributes: _attributes__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n example: {\n attributes: {\n className: 'crowdsignal-forms-vote__example',\n size: 'large'\n }\n }\n});\n\n//# sourceURL=webpack:///./client/blocks/vote/index.js?");
|
410 |
+
|
411 |
+
/***/ }),
|
412 |
+
|
413 |
+
/***/ "./client/blocks/vote/sidebar.js":
|
414 |
+
/*!***************************************!*\
|
415 |
+
!*** ./client/blocks/vote/sidebar.js ***!
|
416 |
+
\***************************************/
|
417 |
+
/*! exports provided: default */
|
418 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
419 |
+
|
420 |
+
"use strict";
|
421 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ \"./client/blocks/vote/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\nvar SideBar = function SideBar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes,\n viewResultsUrl = _ref.viewResultsUrl;\n\n var handleChangeTitle = function handleChangeTitle(title) {\n return setAttributes({\n title: title\n });\n };\n\n var resultsLinkEnabled = '' !== viewResultsUrl;\n\n var handleChangePollStatus = function handleChangePollStatus(pollStatus) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"], pollStatus)) {\n return;\n } // closedAfterDateTime MUST be set when pollStatus is set to CLOSED_AFTER\n\n\n setAttributes({\n closedAfterDateTime: pollStatus === _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER ? new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString() : null,\n pollStatus: pollStatus\n });\n };\n\n var handleChangeCloseAfterDateTime = function handleChangeCloseAfterDateTime(closedAfterDateTime) {\n var dateTime = new Date(closedAfterDateTime);\n setAttributes({\n closedAfterDateTime: dateTime.toISOString()\n });\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__[\"InspectorControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Results', 'crowdsignal-forms'),\n initialOpen: true\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, resultsLinkEnabled ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Manage results on ', 'crowdsignal-forms') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Publish this post to enable results on ', 'crowdsignal-forms'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"ExternalLink\"], {\n href: resultsLinkEnabled ? viewResultsUrl : 'https://www.crowdsignal.com'\n }, \"crowdsignal.com\")), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"Button\"], {\n href: viewResultsUrl,\n isSecondary: true,\n target: \"_blank\",\n disabled: !resultsLinkEnabled\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('View results', 'crowdsignal-forms'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TextControl\"], {\n value: attributes.title,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Title of the vote block', 'crowdsignal-forms'),\n onChange: handleChangeTitle\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"PanelBody\"], {\n title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Status', 'crowdsignal-forms')\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"SelectControl\"], {\n value: attributes.pollStatus,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Currently', 'crowdsignal-forms'),\n options: [{\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Open', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].OPEN\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Closed after', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER\n }, {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Closed', 'crowdsignal-forms'),\n value: _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED\n }],\n onChange: handleChangePollStatus\n }), _constants__WEBPACK_IMPORTED_MODULE_6__[\"PollStatus\"].CLOSED_AFTER === attributes.pollStatus && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__[\"TimePicker\"], {\n currentTime: attributes.closedAfterDateTime,\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Close vote block on', 'crowdsignal-forms'),\n onChange: handleChangeCloseAfterDateTime,\n is12Hour: true\n })));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SideBar);\n\n//# sourceURL=webpack:///./client/blocks/vote/sidebar.js?");
|
422 |
+
|
423 |
+
/***/ }),
|
424 |
+
|
425 |
+
/***/ "./client/blocks/vote/toolbar.js":
|
426 |
+
/*!***************************************!*\
|
427 |
+
!*** ./client/blocks/vote/toolbar.js ***!
|
428 |
+
\***************************************/
|
429 |
+
/*! exports provided: default */
|
430 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
431 |
+
|
432 |
+
"use strict";
|
433 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ \"@wordpress/block-editor\");\n/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var blocks_vote_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! blocks/vote/constants */ \"./client/blocks/vote/constants.js\");\n/* harmony import */ var components_icon_size__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! components/icon/size */ \"./client/components/icon/size.js\");\n/* harmony import */ var components_icon_border__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/icon/border */ \"./client/components/icon/border.js\");\n/* harmony import */ var components_icon_counter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/icon/counter */ \"./client/components/icon/counter.js\");\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\nvar ToolBar = function ToolBar(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var size = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(attributes, 'size', 'medium');\n var sizeControls = blocks_vote_constants__WEBPACK_IMPORTED_MODULE_8__[\"DEFAULT_SIZE_CONTROLS\"];\n\n var handleChangeBorderRadius = function handleChangeBorderRadius(borderRadius) {\n setAttributes({\n borderRadius: parseInt(borderRadius, 10) || 0\n });\n };\n\n var handleChangeBorderWidth = function handleChangeBorderWidth(borderWidth) {\n setAttributes({\n borderWidth: parseInt(borderWidth, 10) || 0\n });\n };\n\n var handleToggleResults = function handleToggleResults() {\n return setAttributes({\n hideResults: !attributes.hideResults\n });\n };\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),\n isPopoverVisible = _useState2[0],\n setPopoverVisible = _useState2[1];\n\n var handlePopoverVisible = function handlePopoverVisible() {\n return setPopoverVisible(!isPopoverVisible);\n };\n\n var toggleResultsLabel = attributes.hideResults ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Show vote counters', 'crowdsignal-forms') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Hide vote counters', 'crowdsignal-forms');\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__[\"BlockControls\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"ToolbarGroup\"], {\n isCollapsed: true,\n icon: components_icon_size__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Change block size', 'crowdsignal-forms'),\n popoverProps: blocks_vote_constants__WEBPACK_IMPORTED_MODULE_8__[\"POPOVER_PROPS\"],\n controls: sizeControls.map(function (control) {\n var controlSize = control.size;\n var isActive = size === controlSize;\n return _objectSpread({}, control, {\n isActive: isActive,\n role: 'menuitemradio',\n onClick: function onClick() {\n return setAttributes({\n size: controlSize\n });\n }\n });\n })\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"Toolbar\"], {\n controls: [{\n icon: components_icon_border__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n onClick: handlePopoverVisible\n }, {\n icon: components_icon_counter__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n label: toggleResultsLabel,\n onClick: handleToggleResults,\n isActive: !attributes.hideResults,\n // Pre gutenberg 8\n isPressed: !attributes.hideResults\n }]\n }), isPopoverVisible && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"Popover\"], {\n className: \"crowdsignal-forms__border-popover\",\n onFocusOutside: handlePopoverVisible\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__row\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Border thickness', 'crowdsignal-forms'),\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\",\n onChange: handleChangeBorderWidth,\n value: attributes.borderWidth || 0\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__[\"TextControl\"], {\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])('Corner radius', 'crowdsignal-forms'),\n type: \"number\",\n className: \"crowdsignal-forms__small-text-input\",\n onChange: handleChangeBorderRadius,\n value: attributes.borderRadius || 0\n }))));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ToolBar);\n\n//# sourceURL=webpack:///./client/blocks/vote/toolbar.js?");
|
434 |
+
|
435 |
+
/***/ }),
|
436 |
+
|
437 |
+
/***/ "./client/blocks/vote/util.js":
|
438 |
+
/*!************************************!*\
|
439 |
+
!*** ./client/blocks/vote/util.js ***!
|
440 |
+
\************************************/
|
441 |
+
/*! exports provided: getVoteStyleVars, getVoteItemStyleVars, getBlockCssClasses */
|
442 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
443 |
+
|
444 |
+
"use strict";
|
445 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getVoteStyleVars\", function() { return getVoteStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getVoteItemStyleVars\", function() { return getVoteItemStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getVoteStyleVars = function getVoteStyleVars(attributes) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"mapKeys\"])({\n borderRadius: \"\".concat(attributes.borderRadius, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth, \"px\")\n }, function (_, key) {\n return \"--crowdsignal-forms-vote-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"kebabCase\"])(key));\n });\n};\nvar getVoteItemStyleVars = function getVoteItemStyleVars(attributes, fallbackStyles) {\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.textColor : attributes.textColor;\n var backgroundColor = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(attributes.backgroundColor) ? fallbackStyles.backgroundColor : attributes.backgroundColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"mapKeys\"])({\n borderColor: attributes.borderColor,\n bgColor: backgroundColor,\n textColor: textColor,\n votedColor: fallbackStyles.accentColor\n }, function (_, key) {\n return \"--crowdsignal-forms-vote-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"kebabCase\"])(key));\n });\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_0___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-border-color': attributes.borderColor\n }, extraClasses);\n};\n\n//# sourceURL=webpack:///./client/blocks/vote/util.js?");
|
446 |
+
|
447 |
+
/***/ }),
|
448 |
+
|
449 |
+
/***/ "./client/components/applause/animation.js":
|
450 |
+
/*!*************************************************!*\
|
451 |
+
!*** ./client/components/applause/animation.js ***!
|
452 |
+
\*************************************************/
|
453 |
+
/*! exports provided: default */
|
454 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
455 |
+
|
456 |
+
"use strict";
|
457 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies\n */\n\n\n\nvar ApplauseAnimation = function ApplauseAnimation(_ref) {\n var active = _ref.active,\n className = _ref.className;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('crowdsignal-forms-applause__animation', className, {\n 'is-active': active\n });\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n className: classes,\n width: \"32\",\n height: \"32\",\n viewBox: \"0 0 32 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-right\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n className: \"crowdsignal-forms-applause__animation-inner-fill\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-left\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n className: \"crowdsignal-forms-applause__animation-inner-fill\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-wave-small\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"15.4854\",\n y: \"4.42176\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(8 15.4854 4.42176)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"19.9369\",\n y: \"5.15548\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(43 19.9369 5.15548)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"11.1523\",\n y: \"4.78963\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(-27 11.1523 4.78963)\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n className: \"crowdsignal-forms-applause__animation-wave-large\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"23.453\",\n y: \"2.41095\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(38 23.453 2.41095)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"26.9413\",\n y: \"5.27211\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(73 26.9413 5.27211)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"19.5165\",\n y: \"0.562988\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(3 19.5165 0.562988)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"1.5\",\n height: \"3\",\n transform: \"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)\"\n })));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ApplauseAnimation);\n\n//# sourceURL=webpack:///./client/components/applause/animation.js?");
|
458 |
+
|
459 |
+
/***/ }),
|
460 |
+
|
461 |
+
/***/ "./client/components/applause/index.js":
|
462 |
+
/*!*********************************************!*\
|
463 |
+
!*** ./client/components/applause/index.js ***!
|
464 |
+
\*********************************************/
|
465 |
+
/*! exports provided: default */
|
466 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
467 |
+
|
468 |
+
"use strict";
|
469 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var blocks_poll_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! blocks/poll/util */ \"./client/blocks/poll/util.js\");\n/* harmony import */ var blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! blocks/applause/util */ \"./client/blocks/applause/util.js\");\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./styles */ \"./client/components/applause/styles.js\");\n/* harmony import */ var components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! components/with-fallback-styles */ \"./client/components/with-fallback-styles/index.js\");\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n/* harmony import */ var components_vote_util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! components/vote/util */ \"./client/components/vote/util.js\");\n/* harmony import */ var components_brand_link__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! components/brand-link */ \"./client/components/brand-link/index.js\");\n/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./animation */ \"./client/components/applause/animation.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\n\nvar Applause = function Applause(props) {\n var attributes = props.attributes,\n fallbackStyles = props.fallbackStyles,\n renderStyleProbe = props.renderStyleProbe;\n var apiPollId = attributes.apiPollData ? attributes.apiPollData.id : null;\n\n var _usePollVote = Object(data_hooks__WEBPACK_IMPORTED_MODULE_9__[\"usePollVote\"])(apiPollId, true),\n hasVoted = _usePollVote.hasVoted,\n vote = _usePollVote.vote;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(0),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n currentVote = _useState2[0],\n setCurrentVote = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(0),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),\n queuedVotes = _useState4[0],\n setQueuedVotes = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(null),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),\n timeoutHandle = _useState6[0],\n setTimeoutHandle = _useState6[1];\n\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(false),\n _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState7, 2),\n animationActiveState = _useState8[0],\n setAnimationActiveState = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(null),\n _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState9, 2),\n animationTimeoutHandle = _useState10[0],\n setAnimationTimeoutHandle = _useState10[1];\n\n var _usePollResults = Object(data_hooks__WEBPACK_IMPORTED_MODULE_9__[\"usePollResults\"])(apiPollId),\n results = _usePollResults.results;\n\n var isClosed = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_5__[\"isPollClosed\"])(attributes.pollStatus, attributes.closedAfterDateTime);\n\n var handleVote = function handleVote() {\n if (apiPollId === null || isClosed) {\n return;\n }\n\n if (animationTimeoutHandle) {\n clearTimeout(animationTimeoutHandle);\n }\n\n setAnimationActiveState(true);\n setAnimationTimeoutHandle(setTimeout(function () {\n setAnimationActiveState(false);\n }, 200));\n var newQueuedVoteCount = queuedVotes + 1;\n setQueuedVotes(newQueuedVoteCount);\n setCurrentVote(currentVote + 1);\n var answerId = attributes.apiPollData.answers[0].id;\n\n if (null !== timeoutHandle) {\n clearTimeout(timeoutHandle);\n }\n\n var handle = setTimeout(function () {\n vote([answerId], newQueuedVoteCount);\n setTimeoutHandle(null);\n setQueuedVotes(0);\n }, 1000);\n setTimeoutHandle(handle);\n };\n\n var classes = Object(blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__[\"getBlockCssClasses\"])(attributes, 'crowdsignal-forms-applause', attributes.className, \"size-\".concat(attributes.size), {\n 'is-closed': isClosed\n });\n var styleVars = Object(blocks_applause_util__WEBPACK_IMPORTED_MODULE_6__[\"getApplauseStyleVars\"])(attributes, fallbackStyles);\n var apiVoteCount = null !== results ? Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(results)[0] : 0;\n var displayedVoteCount = apiVoteCount + currentVote;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: classes,\n style: styleVars,\n onClick: handleVote,\n onKeyPress: handleVote,\n role: \"button\",\n tabIndex: 0\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(_animation__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n active: animationActiveState\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"p\", {\n className: \"crowdsignal-forms-applause__count\"\n }, Object(components_vote_util__WEBPACK_IMPORTED_MODULE_10__[\"formatVoteCount\"])(displayedVoteCount), \" Claps\"), renderStyleProbe()), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(components_brand_link__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n showBranding: hasVoted && !attributes.hideBranding,\n referralCode: \"cs-forms-applause\"\n }));\n};\n\nApplause.propTypes = {\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_8__[\"withFallbackStyles\"])(_styles__WEBPACK_IMPORTED_MODULE_7__[\"ApplauseStyles\"], _styles__WEBPACK_IMPORTED_MODULE_7__[\"getApplauseStyles\"])(Applause));\n\n//# sourceURL=webpack:///./client/components/applause/index.js?");
|
470 |
+
|
471 |
+
/***/ }),
|
472 |
+
|
473 |
+
/***/ "./client/components/applause/styles.js":
|
474 |
+
/*!**********************************************!*\
|
475 |
+
!*** ./client/components/applause/styles.js ***!
|
476 |
+
\**********************************************/
|
477 |
+
/*! exports provided: getApplauseStyles, ApplauseStyles */
|
478 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
479 |
+
|
480 |
+
"use strict";
|
481 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getApplauseStyles\", function() { return getApplauseStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ApplauseStyles\", function() { return ApplauseStyles; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/with-fallback-styles/util */ \"./client/components/with-fallback-styles/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getApplauseStyles = function getApplauseStyles(node) {\n if (null === node) {\n return {};\n }\n\n var buttonNode = node.querySelector('.wp-block-button__link');\n var textNode = node.querySelector('p');\n var surfaceColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(textNode);\n var textColor = window.getComputedStyle(textNode).color;\n var buttonBackgroundColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(buttonNode);\n var buttonBorderColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBorderColor\"])(buttonNode); // Ensure that we don't end up with the same color for surface and accent.\n // Falls back to button border color, then text color.\n\n var accentColor = buttonBackgroundColor;\n\n if (accentColor === surfaceColor) {\n accentColor = buttonBorderColor ? buttonBorderColor : textColor;\n }\n\n return {\n accent: accentColor,\n surface: surfaceColor,\n text: textColor\n };\n};\nvar ApplauseStyles = function ApplauseStyles() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link\"\n })));\n};\n\n//# sourceURL=webpack:///./client/components/applause/styles.js?");
|
482 |
+
|
483 |
+
/***/ }),
|
484 |
+
|
485 |
+
/***/ "./client/components/brand-link/index.js":
|
486 |
+
/*!***********************************************!*\
|
487 |
+
!*** ./client/components/brand-link/index.js ***!
|
488 |
+
\***********************************************/
|
489 |
+
/*! exports provided: default */
|
490 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
491 |
+
|
492 |
+
"use strict";
|
493 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n\nvar BrandLink = function BrandLink(_ref) {\n var showBranding = _ref.showBranding,\n referralCode = _ref.referralCode;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__branding\"\n }, showBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"a\", {\n className: \"crowdsignal-forms__branding-link with-external-icon\",\n href: \"https://crowdsignal.com?ref=\".concat(referralCode),\n target: \"blank\",\n rel: \"noopener noreferrer\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Powered by Crowdsignal', 'crowdsignal-forms')), !showBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms__branding-link\"\n }, \"\\xA0\"));\n};\n\nBrandLink.propTypes = {\n showBranding: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n referralCode: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (BrandLink);\n\n//# sourceURL=webpack:///./client/components/brand-link/index.js?");
|
494 |
+
|
495 |
+
/***/ }),
|
496 |
+
|
497 |
+
/***/ "./client/components/connect-to-crowdsignal/index.js":
|
498 |
+
/*!***********************************************************!*\
|
499 |
+
!*** ./client/components/connect-to-crowdsignal/index.js ***!
|
500 |
+
\***********************************************************/
|
501 |
+
/*! exports provided: default */
|
502 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
503 |
+
|
504 |
+
"use strict";
|
505 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\nvar ConnectToCrowdsignal = function ConnectToCrowdsignal(props) {\n var blockIcon = props.blockIcon,\n blockName = props.blockName,\n children = props.children;\n\n var _useIsCsConnected = Object(data_hooks__WEBPACK_IMPORTED_MODULE_5__[\"useIsCsConnected\"])(),\n isConnected = _useIsCsConnected.isConnected,\n isAccountVerified = _useIsCsConnected.isAccountVerified,\n checkIsConnected = _useIsCsConnected.checkIsConnected;\n\n var handleConnectClick = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {\n var initialConnectedState, _yield$checkIsConnect, isNowConnected, isNowVerified;\n\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n initialConnectedState = isConnected;\n _context.next = 3;\n return checkIsConnected();\n\n case 3:\n _yield$checkIsConnect = _context.sent;\n isNowConnected = _yield$checkIsConnect.isNowConnected;\n isNowVerified = _yield$checkIsConnect.isNowVerified;\n\n if (!isNowConnected) {\n window.open('/wp-admin/admin.php?page=crowdsignal-forms-setup');\n } // Don't pop open the email window if the connection state just changed.\n // Allow the new placeholder to be displayed first.\n\n\n if (initialConnectedState && !isNowVerified) {\n window.open('https://wordpress.com/me/account');\n }\n\n case 8:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function handleConnectClick() {\n return _ref.apply(this, arguments);\n };\n }();\n\n if (isConnected && isAccountVerified) {\n return children;\n }\n\n var showConnectionMessage = !isConnected;\n var showVerificationMessage = isConnected && !isAccountVerified;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__connect-to-crowdsignal\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__connect-to-crowdsignal-header\"\n }, blockIcon, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__connect-to-crowdsignal-title\"\n }, blockName)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__connect-to-crowdsignal-body\"\n }, showConnectionMessage && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('You need to connect to a Crowdsignal account to collect and manage your results.', 'crowdsignal-forms'), showVerificationMessage && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Please verify your WordPress.com email address in order to publish your poll.', 'crowdsignal-forms')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__[\"Button\"], {\n isPrimary: true,\n onClick: handleConnectClick\n }, showConnectionMessage && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Connect to Crowdsignal', 'crowdsignal-forms'), showVerificationMessage && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Verify or Change your Email Address', 'crowdsignal-forms')));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConnectToCrowdsignal);\n\n//# sourceURL=webpack:///./client/components/connect-to-crowdsignal/index.js?");
|
506 |
+
|
507 |
+
/***/ }),
|
508 |
+
|
509 |
+
/***/ "./client/components/icon/applause.js":
|
510 |
+
/*!********************************************!*\
|
511 |
+
!*** ./client/components/icon/applause.js ***!
|
512 |
+
\********************************************/
|
513 |
+
/*! exports provided: default */
|
514 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
515 |
+
|
516 |
+
"use strict";
|
517 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n clipPath: \"url(#clip0)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"24\",\n height: \"24\",\n fill: \"white\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.5284 16.5813L18.7187 20.432C17.7707 21.7312 15.9506 22.0157 14.6513 21.0676L6.50915 15.1265C5.69788 14.5345 5.51988 13.3957 6.11185 12.5844C6.18478 12.4845 6.26946 12.3931 6.35573 12.3119L6.19112 12.1918C5.37984 11.5998 5.20185 10.461 5.79382 9.64968C5.93538 9.45568 6.10792 9.29329 6.30287 9.17428C6.1079 8.62662 6.17683 8.00125 6.54574 7.49567C7.11197 6.71967 8.18077 6.52659 8.98362 7.03133C9.03891 6.91852 9.10007 6.81 9.173 6.71006C9.76497 5.89878 10.9038 5.72079 11.7151 6.31276L17.3294 10.4094L17.6107 8.44349C17.6946 7.84704 18.1496 7.35925 18.7389 7.23069L20.7027 6.79878L22.045 14.3547C22.1819 15.1302 21.9917 15.9464 21.5284 16.5813ZM20.61 14.605L19.5377 8.54337L19.0543 8.65016L18.4231 13.0093L10.857 7.48855C10.857 7.48855 10.4687 7.4034 10.3486 7.56801C10.2285 7.73262 10.2635 7.95632 10.4281 8.07643L14.6667 11.1693L13.8088 12.345L8.22979 8.27416C8.06518 8.15405 7.84147 8.18902 7.72136 8.35362C7.60126 8.51823 7.63622 8.74194 7.80082 8.86204L13.3798 12.9329L12.5219 14.1087L7.47787 10.4282C7.31327 10.3081 7.08956 10.343 6.96945 10.5076C6.84934 10.6722 6.8843 10.8959 7.04891 11.0161L12.0929 14.6966L11.235 15.8723L7.7959 13.3629C7.6313 13.2428 7.40759 13.2777 7.28748 13.4423C7.16737 13.607 7.20233 13.8307 7.36694 13.9508L15.5091 19.8919C16.1558 20.3638 17.0709 20.2207 17.5428 19.5741L20.3568 15.7175C20.5884 15.4001 20.6763 14.9957 20.61 14.605Z\",\n fill: \"black\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813Z\",\n fill: \"white\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.2289 16.7813L15.4192 20.632C14.4711 21.9312 12.651 22.2157 11.3518 21.2676L3.20959 15.3265C2.39831 14.7345 2.22032 13.5957 2.81229 12.7844C2.88522 12.6845 2.9699 12.5931 3.05617 12.5119L2.89156 12.3918C2.08028 11.7998 1.90229 10.661 2.49426 9.84968C2.63582 9.65567 2.80836 9.49329 3.0033 9.37428C2.80834 8.82662 2.87727 8.20125 3.24618 7.69567C3.81241 6.91967 4.88121 6.72658 5.68406 7.23133C5.73935 7.11852 5.80051 7.01 5.87344 6.91006C6.46541 6.09878 7.60427 5.92079 8.41555 6.51276L14.0298 10.6094L14.3111 8.64348C14.395 8.04703 14.85 7.55925 15.4393 7.43069L17.4031 6.99877L18.7455 14.5547C18.8823 15.3302 18.6921 16.1464 18.2289 16.7813ZM17.3105 14.805L16.2381 8.74337L15.7548 8.85016L15.1235 13.2093L7.55749 7.68854C7.55749 7.68854 7.16918 7.6034 7.04907 7.76801C6.92896 7.93261 6.96392 8.15632 7.12853 8.27643L11.3672 11.3692L10.5092 12.545L4.93023 8.47416C4.76562 8.35405 4.54191 8.38901 4.4218 8.55362C4.3017 8.71823 4.33666 8.94193 4.50126 9.06204L10.0803 13.1329L9.22235 14.3087L4.17831 10.6282C4.0137 10.5081 3.79 10.543 3.66989 10.7076C3.54978 10.8722 3.58474 11.0959 3.74935 11.216L8.79338 14.8965L7.93546 16.0723L4.49634 13.5629C4.33173 13.4428 4.10803 13.4777 3.98792 13.6423C3.86781 13.8069 3.90277 14.0307 4.06738 14.1508L12.2096 20.0919C12.8562 20.5638 13.7714 20.4207 14.2432 19.7741L17.0572 15.9175C17.2889 15.6001 17.3767 15.1957 17.3105 14.805Z\",\n fill: \"black\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"12.4851\",\n y: \"1.42175\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(8 12.4851 1.42175)\",\n fill: \"black\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"16.9365\",\n y: \"2.15547\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(43 16.9365 2.15547)\",\n fill: \"black\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"8.15195\",\n y: \"1.78963\",\n width: \"1.5\",\n height: \"3\",\n transform: \"rotate(-27 8.15195 1.78963)\",\n fill: \"black\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"defs\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"clipPath\", {\n id: \"clip0\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"24\",\n height: \"24\",\n fill: \"white\"\n }))));\n});\n\n//# sourceURL=webpack:///./client/components/icon/applause.js?");
|
518 |
+
|
519 |
+
/***/ }),
|
520 |
+
|
521 |
+
/***/ "./client/components/icon/border.js":
|
522 |
+
/*!******************************************!*\
|
523 |
+
!*** ./client/components/icon/border.js ***!
|
524 |
+
\******************************************/
|
525 |
+
/*! exports provided: default */
|
526 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
527 |
+
|
528 |
+
"use strict";
|
529 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"32\",\n height: \"32\",\n viewBox: \"0 0 32 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"line\", {\n x1: \"8\",\n y1: \"8.5\",\n x2: \"24\",\n y2: \"8.5\",\n stroke: \"currentColor\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"line\", {\n x1: \"8\",\n y1: \"15\",\n x2: \"24\",\n y2: \"15\",\n stroke: \"currentColor\",\n strokeWidth: \"2\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"line\", {\n x1: \"8\",\n y1: \"22.5\",\n x2: \"24\",\n y2: \"22.5\",\n stroke: \"currentColor\",\n strokeWidth: \"3\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/border.js?");
|
530 |
+
|
531 |
+
/***/ }),
|
532 |
+
|
533 |
+
/***/ "./client/components/icon/checklist-multiple-choice.js":
|
534 |
+
/*!*************************************************************!*\
|
535 |
+
!*** ./client/components/icon/checklist-multiple-choice.js ***!
|
536 |
+
\*************************************************************/
|
537 |
+
/*! exports provided: default */
|
538 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
539 |
+
|
540 |
+
"use strict";
|
541 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7 10.75H5V12.75H7V10.75ZM4 9.75V13.75H8V9.75H4Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M4 4H8V8H4V4Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M4 16H8V20H4V16Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 6.75H12V5.25H20V6.75Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 12.5H12V11H20V12.5Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 18.75H12V17.25H20V18.75Z\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/checklist-multiple-choice.js?");
|
542 |
+
|
543 |
+
/***/ }),
|
544 |
+
|
545 |
+
/***/ "./client/components/icon/checklist-single-choice.js":
|
546 |
+
/*!***********************************************************!*\
|
547 |
+
!*** ./client/components/icon/checklist-single-choice.js ***!
|
548 |
+
\***********************************************************/
|
549 |
+
/*! exports provided: default */
|
550 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
551 |
+
|
552 |
+
"use strict";
|
553 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 6.75H12V5.25H20V6.75Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 12.5H12V11H20V12.5Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M20 18.75H12V17.25H20V18.75Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M6 12.75C6.55228 12.75 7 12.3023 7 11.75C7 11.1977 6.55228 10.75 6 10.75C5.44772 10.75 5 11.1977 5 11.75C5 12.3023 5.44772 12.75 6 12.75ZM6 13.75C7.10457 13.75 8 12.8546 8 11.75C8 10.6454 7.10457 9.75 6 9.75C4.89543 9.75 4 10.6454 4 11.75C4 12.8546 4.89543 13.75 6 13.75Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6 19C6.55228 19 7 18.5523 7 18C7 17.4477 6.55228 17 6 17C5.44772 17 5 17.4477 5 18C5 18.5523 5.44772 19 6 19ZM6 20C7.10457 20 8 19.1046 8 18C8 16.8954 7.10457 16 6 16C4.89543 16 4 16.8954 4 18C4 19.1046 4.89543 20 6 20Z\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/checklist-single-choice.js?");
|
554 |
+
|
555 |
+
/***/ }),
|
556 |
+
|
557 |
+
/***/ "./client/components/icon/counter.js":
|
558 |
+
/*!*******************************************!*\
|
559 |
+
!*** ./client/components/icon/counter.js ***!
|
560 |
+
\*******************************************/
|
561 |
+
/*! exports provided: default */
|
562 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
563 |
+
|
564 |
+
"use strict";
|
565 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M12.0078 18.2266C14.7656 18.2266 16.4062 15.9531 16.4062 12.3438C16.4062 8.73438 14.75 6.5 12.0078 6.5C9.25781 6.5 7.59375 8.75 7.59375 12.3516C7.59375 15.9688 9.24219 18.2266 12.0078 18.2266ZM12.0078 16.5781C10.5078 16.5781 9.625 15 9.625 12.3438C9.625 9.73438 10.5234 8.14844 12.0078 8.14844C13.4844 8.14844 14.3672 9.71875 14.3672 12.3516C14.3672 15.0078 13.5 16.5781 12.0078 16.5781Z\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/counter.js?");
|
566 |
+
|
567 |
+
/***/ }),
|
568 |
+
|
569 |
+
/***/ "./client/components/icon/poll.js":
|
570 |
+
/*!****************************************!*\
|
571 |
+
!*** ./client/components/icon/poll.js ***!
|
572 |
+
\****************************************/
|
573 |
+
/*! exports provided: default */
|
574 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
575 |
+
|
576 |
+
"use strict";
|
577 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.5 6L5.5 18C5.5 18.2761 5.72386 18.5 6 18.5L18 18.5C18.2761 18.5 18.5 18.2761 18.5 18L18.5 6C18.5 5.72386 18.2761 5.5 18 5.5L6 5.5C5.72386 5.5 5.5 5.72386 5.5 6ZM4 18L4 6C4 4.89543 4.89543 4 6 4L18 4C19.1046 4 20 4.89543 20 6L20 18C20 19.1046 19.1046 20 18 20L6 20C4.89543 20 4 19.1046 4 18Z\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"15\",\n y: \"17\",\n width: \"6\",\n height: \"1.5\",\n transform: \"rotate(-90 15 17)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"11.5\",\n y: \"17\",\n width: \"9\",\n height: \"1.5\",\n transform: \"rotate(-90 11.5 17)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"8\",\n y: \"17\",\n width: \"5\",\n height: \"1.5\",\n transform: \"rotate(-90 8 17)\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/poll.js?");
|
578 |
+
|
579 |
+
/***/ }),
|
580 |
+
|
581 |
+
/***/ "./client/components/icon/size.js":
|
582 |
+
/*!****************************************!*\
|
583 |
+
!*** ./client/components/icon/size.js ***!
|
584 |
+
\****************************************/
|
585 |
+
/*! exports provided: default */
|
586 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
587 |
+
|
588 |
+
"use strict";
|
589 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M17.1894 5.75L13.6668 5.75L13.6668 4.25H19.0002H19.7502L19.7502 5V10.3333H18.2502V6.81054L6.81072 18.25L10.3333 18.25V19.75L5 19.75H4.25V19V13.6666L5.75 13.6666L5.75 17.1894L17.1894 5.75Z\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/size.js?");
|
590 |
+
|
591 |
+
/***/ }),
|
592 |
+
|
593 |
+
/***/ "./client/components/icon/thumbs-down.js":
|
594 |
+
/*!***********************************************!*\
|
595 |
+
!*** ./client/components/icon/thumbs-down.js ***!
|
596 |
+
\***********************************************/
|
597 |
+
/*! exports provided: default */
|
598 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
599 |
+
|
600 |
+
"use strict";
|
601 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (_ref) {\n var className = _ref.className,\n _ref$fillColor = _ref.fillColor,\n fillColor = _ref$fillColor === void 0 ? 'black' : _ref$fillColor;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n className: className,\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n clipPath: \"url(#clipThumbsDown)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"mask\", {\n id: \"maskThumbsDown\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: \"2\",\n y: \"5\",\n width: \"20\",\n height: \"20\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.65002 17.75H10.4342L9.56336 21.9392L9.53586 22.2325C9.53586 22.6083 9.69169 22.9567 9.93919 23.2042L10.9109 24.1667L16.9425 18.1258C17.2817 17.7958 17.4834 17.3375 17.4834 16.8333L21.15 16.8333L21.15 7.57499H17.4834V7.66666C17.4834 6.65832 16.6584 5.83332 15.65 5.83332H7.40003C6.63919 5.83332 5.98836 6.29165 5.71336 6.95166L2.94503 13.4142C2.86253 13.625 2.81669 13.845 2.81669 14.0833V15.9167C2.81669 16.925 3.64169 17.75 4.65002 17.75ZM4.65002 14.0833L7.40002 7.66666H15.65L15.65 16.8333L11.6717 20.8117L12.6892 15.9167H4.65002V14.0833Z\",\n fill: \"white\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n mask: \"url(#maskThumbsDown)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"23.0001\",\n y: \"24\",\n width: \"22\",\n height: \"22\",\n transform: \"rotate(-180 23.0001 24)\",\n fill: fillColor\n }))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"defs\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"clipPath\", {\n id: \"clipThumbsDown\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"24\",\n height: \"24\",\n fill: \"white\"\n }))));\n});\n\n//# sourceURL=webpack:///./client/components/icon/thumbs-down.js?");
|
602 |
+
|
603 |
+
/***/ }),
|
604 |
+
|
605 |
+
/***/ "./client/components/icon/thumbs-up.js":
|
606 |
+
/*!*********************************************!*\
|
607 |
+
!*** ./client/components/icon/thumbs-up.js ***!
|
608 |
+
\*********************************************/
|
609 |
+
/*! exports provided: default */
|
610 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
611 |
+
|
612 |
+
"use strict";
|
613 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (_ref) {\n var className = _ref.className,\n _ref$fillColor = _ref.fillColor,\n fillColor = _ref$fillColor === void 0 ? 'black' : _ref$fillColor;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n className: className,\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n clipPath: \"url(#clipThumbsUp)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"mask\", {\n id: \"maskThumbsUp\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: \"2\",\n y: \"-1\",\n width: \"20\",\n height: \"20\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M19.35 6.24998H13.5658L14.4366 2.06081L14.4641 1.76748C14.4641 1.39165 14.3083 1.04331 14.0608 0.795813L13.0891 -0.166687L7.05748 5.87415C6.71831 6.20415 6.51664 6.66248 6.51664 7.16665L2.84998 7.16665V16.425H6.51664V16.3333C6.51664 17.3416 7.34164 18.1666 8.34998 18.1666H16.6C17.3608 18.1666 18.0116 17.7083 18.2866 17.0483L21.055 10.5858C21.1375 10.375 21.1833 10.155 21.1833 9.91665V8.08331C21.1833 7.07498 20.3583 6.24998 19.35 6.24998ZM19.35 9.91665L16.6 16.3333H8.34998V7.16665L12.3283 3.18831L11.3108 8.08331H19.35V9.91665Z\",\n fill: \"white\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n mask: \"url(#maskThumbsUp)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"0.999878\",\n y: \"-3.05176e-05\",\n width: \"22\",\n height: \"22\",\n fill: fillColor\n }))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"defs\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"clipPath\", {\n id: \"clipThumbsUp\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"24\",\n height: \"24\",\n fill: \"white\"\n }))));\n});\n\n//# sourceURL=webpack:///./client/components/icon/thumbs-up.js?");
|
614 |
+
|
615 |
+
/***/ }),
|
616 |
+
|
617 |
+
/***/ "./client/components/icon/vote.js":
|
618 |
+
/*!****************************************!*\
|
619 |
+
!*** ./client/components/icon/vote.js ***!
|
620 |
+
\****************************************/
|
621 |
+
/*! exports provided: default */
|
622 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
623 |
+
|
624 |
+
"use strict";
|
625 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"mask\", {\n id: \"maskVote\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: \"3\",\n y: \"3\",\n width: \"18\",\n height: \"18\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M18.5999 9.525H13.3942L14.1779 5.75475L14.2027 5.49075C14.2027 5.1525 14.0624 4.839 13.8397 4.61625L12.9652 3.75L7.53666 9.18675C7.23142 9.48374 7.04992 9.89621 7.04991 10.3499H3.75V18.6824H7.05V18.6178C7.05963 19.5172 7.79834 20.25 8.69991 20.25H16.1249C16.8097 20.25 17.3954 19.8375 17.6429 19.2435L20.1344 13.4273C20.2087 13.2375 20.2499 13.0395 20.2499 12.825V11.175C20.2499 10.2675 19.5074 9.525 18.5999 9.525ZM7.05 18.6178V10.3499H7.04991C7.04991 10.35 7.04991 10.35 7.04991 10.35V18.6C7.04991 18.6059 7.04994 18.6119 7.05 18.6178ZM18.5999 12.825L16.1249 18.6H8.69986V10.35L12.2804 6.76952L11.3646 11.175H18.5999V12.825Z\",\n fill: \"white\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n mask: \"url(#maskVote)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n x: \"1.00024\",\n y: \"1.25\",\n width: \"22\",\n height: \"22\",\n fill: \"#1E1E1E\"\n })));\n});\n\n//# sourceURL=webpack:///./client/components/icon/vote.js?");
|
626 |
+
|
627 |
+
/***/ }),
|
628 |
+
|
629 |
+
/***/ "./client/components/poll/answer-results.js":
|
630 |
+
/*!**************************************************!*\
|
631 |
+
!*** ./client/components/poll/answer-results.js ***!
|
632 |
+
\**************************************************/
|
633 |
+
/*! exports provided: default */
|
634 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
635 |
+
|
636 |
+
"use strict";
|
637 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\nvar PollAnswerResults = function PollAnswerResults(_ref) {\n var error = _ref.error,\n loading = _ref.loading,\n text = _ref.text,\n totalVotes = _ref.totalVotes,\n votes = _ref.votes;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__answer-results', {\n 'is-error': error,\n 'is-loading': loading\n });\n var showResults = !loading && !error;\n var answerShare = 0 === totalVotes ? 0 : votes * 100 / totalVotes;\n var progressBarStyles = {\n width: \"\".concat(parseInt(answerShare, 10), \"%\")\n };\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-labels\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-answer\"\n }, Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__[\"decodeEntities\"])(text)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-votes\"\n }, showResults && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"sprintf\"])( // translators: %s: Number of votes.\n Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"_n\"])('%s vote', '%s votes', votes, 'crowdsignal-forms'), votes.toLocaleString())), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-percent\"\n }, showResults && \"\".concat(answerShare.toFixed(2), \"%\"))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-progress-track\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-progress-bar\",\n style: progressBarStyles\n })));\n};\n\nPollAnswerResults.propTypes = {\n loading: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n totalVotes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n votes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollAnswerResults);\n\n//# sourceURL=webpack:///./client/components/poll/answer-results.js?");
|
638 |
+
|
639 |
+
/***/ }),
|
640 |
+
|
641 |
+
/***/ "./client/components/poll/closed-banner.js":
|
642 |
+
/*!*************************************************!*\
|
643 |
+
!*** ./client/components/poll/closed-banner.js ***!
|
644 |
+
\*************************************************/
|
645 |
+
/*! exports provided: default */
|
646 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
647 |
+
|
648 |
+
"use strict";
|
649 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n\nvar ClosedBanner = function ClosedBanner(_ref) {\n var hasVoted = _ref.hasVoted,\n isPollClosed = _ref.isPollClosed,\n isPollHidden = _ref.isPollHidden,\n showSubmitMessage = _ref.showSubmitMessage;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()({\n 'is-transparent': showSubmitMessage\n }, 'crowdsignal-forms-poll__closed-banner');\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, isPollHidden && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('This Poll is Hidden', 'crowdsignal-forms'), isPollClosed && !isPollHidden && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('This Poll is Closed', 'crowdsignal-forms'), hasVoted && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Thanks For Voting!', 'crowdsignal-forms'));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ClosedBanner);\n\n//# sourceURL=webpack:///./client/components/poll/closed-banner.js?");
|
650 |
+
|
651 |
+
/***/ }),
|
652 |
+
|
653 |
+
/***/ "./client/components/poll/error-banner.js":
|
654 |
+
/*!************************************************!*\
|
655 |
+
!*** ./client/components/poll/error-banner.js ***!
|
656 |
+
\************************************************/
|
657 |
+
/*! exports provided: default */
|
658 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
659 |
+
|
660 |
+
"use strict";
|
661 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\n\nvar ErrorBanner = function ErrorBanner(_ref) {\n var children = _ref.children;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__error-banner\"\n }, children);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ErrorBanner);\n\n//# sourceURL=webpack:///./client/components/poll/error-banner.js?");
|
662 |
+
|
663 |
+
/***/ }),
|
664 |
+
|
665 |
+
/***/ "./client/components/poll/footer-branding.js":
|
666 |
+
/*!***************************************************!*\
|
667 |
+
!*** ./client/components/poll/footer-branding.js ***!
|
668 |
+
\***************************************************/
|
669 |
+
/*! exports provided: default */
|
670 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
671 |
+
|
672 |
+
"use strict";
|
673 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * WordPress dependencies\n */\n\n\nvar FooterBranding = function FooterBranding(_ref) {\n var showLogo = _ref.showLogo;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__footer-branding\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"a\", {\n className: \"crowdsignal-forms-poll__footer-cs-link\",\n href: \"https://crowdsignal.com?ref=cs-forms-poll\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Create your own poll with Crowdsignal', 'crowdsignal-forms')), showLogo && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"img\", {\n className: \"crowdsignal-forms-poll__footer-branding-logo\",\n src: \"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg\",\n alt: \"Crowdsignal sticker\"\n }));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FooterBranding);\n\n//# sourceURL=webpack:///./client/components/poll/footer-branding.js?");
|
674 |
+
|
675 |
+
/***/ }),
|
676 |
+
|
677 |
+
/***/ "./client/components/poll/results.js":
|
678 |
+
/*!*******************************************!*\
|
679 |
+
!*** ./client/components/poll/results.js ***!
|
680 |
+
\*******************************************/
|
681 |
+
/*! exports provided: default */
|
682 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
683 |
+
|
684 |
+
"use strict";
|
685 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n/* harmony import */ var _answer_results__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./answer-results */ \"./client/components/poll/answer-results.js\");\n/* harmony import */ var _footer_branding__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./footer-branding */ \"./client/components/poll/footer-branding.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./util */ \"./client/components/poll/util.js\");\n\n\n/**\n * External dependencies\n */\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\nvar PollResults = function PollResults(_ref) {\n var answers = _ref.answers,\n pollIdFromApi = _ref.pollIdFromApi,\n setErrorMessage = _ref.setErrorMessage,\n hideBranding = _ref.hideBranding;\n\n var _usePollResults = Object(data_hooks__WEBPACK_IMPORTED_MODULE_6__[\"usePollResults\"])(pollIdFromApi),\n error = _usePollResults.error,\n loading = _usePollResults.loading,\n results = _usePollResults.results;\n\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n setErrorMessage(error ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])(\"Unfortunately, we're having some trouble retrieving \" + \"the results for this poll at this time.\", 'crowdsignal-forms') : '');\n }, [error]);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__results', {\n 'is-error': !!error,\n 'is-loading': loading\n });\n var total = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"sum\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(results));\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__results-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(answers, function (answer) {\n var _results$answer$answe;\n\n return !Object(_util__WEBPACK_IMPORTED_MODULE_9__[\"isAnswerEmpty\"])(answer) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_answer_results__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n key: answer.answerId,\n error: !!error,\n loading: loading,\n text: answer.text,\n totalVotes: total,\n votes: results ? (_results$answer$answe = results[answer.answerIdFromApi]) !== null && _results$answer$answe !== void 0 ? _results$answer$answe : 0 : 0\n });\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__results-footer\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__results-total\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"sprintf\"])( // translators: %s: Number of votes\n Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"_n\"])('%s total vote', '%s total votes', total, 'crowdsignal-forms'), total ? total.toLocaleString() : 0)), !hideBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_footer_branding__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null)));\n};\n\nPollResults.propTypes = {\n pollIdFromApi: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n answers: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n answerId: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n answerIdFromApi: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string\n })).isRequired,\n setErrorMessage: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n hideBranding: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollResults);\n\n//# sourceURL=webpack:///./client/components/poll/results.js?");
|
686 |
+
|
687 |
+
/***/ }),
|
688 |
+
|
689 |
+
/***/ "./client/components/poll/styles.js":
|
690 |
+
/*!******************************************!*\
|
691 |
+
!*** ./client/components/poll/styles.js ***!
|
692 |
+
\******************************************/
|
693 |
+
/*! exports provided: getPollStyles, PollStyles */
|
694 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
695 |
+
|
696 |
+
"use strict";
|
697 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPollStyles\", function() { return getPollStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStyles\", function() { return PollStyles; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/with-fallback-styles/util */ \"./client/components/with-fallback-styles/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getPollStyles = function getPollStyles(node) {\n if (null === node) {\n return {};\n }\n\n var buttonNode = node.querySelector('.wp-block-button__link');\n var textNode = node.querySelector('p');\n var h3Node = node.querySelector('h3');\n var wideContentNode = node.querySelector('.alignwide');\n var accentColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(buttonNode);\n var surfaceColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(textNode);\n var textColor = window.getComputedStyle(textNode).color; // Ensure that we don't end up with the same color for surface and accent.\n // Falls back to button border color, then text color.\n\n if (accentColor === surfaceColor) {\n var borderColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBorderColor\"])(buttonNode);\n accentColor = borderColor ? borderColor : textColor;\n }\n\n return {\n accent: accentColor,\n surface: surfaceColor,\n text: textColor,\n bodyFontFamily: window.getComputedStyle(textNode).fontFamily,\n questionFontFamily: window.getComputedStyle(h3Node).fontFamily,\n textInverted: window.getComputedStyle(buttonNode).color,\n contentWideWidth: window.getComputedStyle(wideContentNode).maxWidth\n };\n};\nvar PollStyles = function PollStyles() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"h3\", null, \"Question\"), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"entry-content\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"alignwide\"\n })));\n};\n\n//# sourceURL=webpack:///./client/components/poll/styles.js?");
|
698 |
+
|
699 |
+
/***/ }),
|
700 |
+
|
701 |
+
/***/ "./client/components/poll/util.js":
|
702 |
+
/*!****************************************!*\
|
703 |
+
!*** ./client/components/poll/util.js ***!
|
704 |
+
\****************************************/
|
705 |
+
/*! exports provided: addApiAnswerIds, shuffleWithGenerator, isAnswerEmpty, loadCustomFont */
|
706 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
707 |
+
|
708 |
+
"use strict";
|
709 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addApiAnswerIds\", function() { return addApiAnswerIds; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffleWithGenerator\", function() { return shuffleWithGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAnswerEmpty\", function() { return isAnswerEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCustomFont\", function() { return loadCustomFont; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Adds api answer ids to the answer objects (when they are available).\n *\n * @param {Array} answers Answers array\n * @param {Array} answerIdMap A json object with client answer ids as keys, and API answer ids as values.\n * @return {Array} Updated answers array\n */\n\nvar addApiAnswerIds = function addApiAnswerIds(answers, answerIdMap) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(answers, function (answer) {\n if (typeof answer.answerIdFromApi !== 'undefined') {\n return answer;\n }\n\n return _objectSpread({}, answer, {\n answerIdFromApi: answerIdMap[answer.answerId]\n });\n });\n};\n/**\n * Fisher-Yates algorithm shuffle implementation.\n * Provides a predictable way of shuffling array items given a seed.\n *\n * @param {Array} toShuffle The array to shuffle.\n * @param {Function} randomNumberGenerator A function that generates a random number (like `seedrandom`).\n * @return {Array} The shuffled array.\n */\n\nvar shuffleWithGenerator = function shuffleWithGenerator(toShuffle, randomNumberGenerator) {\n var shuffled = toShuffle.slice();\n\n for (var i = shuffled.length - 1; i > 0; i--) {\n var j = Math.floor(randomNumberGenerator() * i);\n var tmp = shuffled[i];\n shuffled[i] = shuffled[j];\n shuffled[j] = tmp;\n }\n\n return shuffled;\n};\n/**\n * Determines if an answer is considered \"empty\", based on if text is set and blank or object has no values.\n *\n * @param {*} answer The answer object.\n */\n\nvar isAnswerEmpty = function isAnswerEmpty(answer) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(answer) || 'undefined' === typeof answer.text || null === answer.text || '' === answer.text;\n};\n/**\n * Loads a custom google font, by name, only once per page if called more than once for the same font.\n *\n * @param {*} font The name of the Google font\n */\n\nvar loadCustomFont = function loadCustomFont(font) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(font) || blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__[\"FontFamilyType\"].THEME_DEFAULT === font || -1 === blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__[\"GoogleFonts\"].indexOf(font)) {\n return;\n }\n\n var googleFontsLink = \"https://fonts.googleapis.com/css2?family=\".concat(font, \":wght@400;600;700&display=swap\");\n var crowdsignalFonts = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"filter\"])(Array.from(document.head.childNodes), function (node) {\n return node.nodeName.toLowerCase() === 'link' && node.href === googleFontsLink;\n });\n\n if (crowdsignalFonts.length === 0) {\n document.head.appendChild(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"tap\"])(document.createElement('link'), function (link) {\n link.type = 'text/css';\n link.rel = 'stylesheet';\n link.href = googleFontsLink;\n }));\n }\n};\n\n//# sourceURL=webpack:///./client/components/poll/util.js?");
|
710 |
+
|
711 |
+
/***/ }),
|
712 |
+
|
713 |
+
/***/ "./client/components/use-numbered-title/index.js":
|
714 |
+
/*!*******************************************************!*\
|
715 |
+
!*** ./client/components/use-numbered-title/index.js ***!
|
716 |
+
\*******************************************************/
|
717 |
+
/*! exports provided: default */
|
718 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
719 |
+
|
720 |
+
"use strict";
|
721 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n\n\nvar useNumberedTitle = function useNumberedTitle(blockName, titlePrefix, attributes, setAttributes) {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(window.csBlockTypeCount)) {\n window.csBlockTypeCount = {};\n }\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isNil\"])(window.csBlockTypeCount[blockName])) {\n window.csBlockTypeCount[blockName] = 0;\n }\n\n window.csBlockTypeCount[blockName]++;\n\n if (null !== attributes.title) {\n // exit if title is set, but only after block count has been set, so newer blocks get the correct count.\n return;\n }\n\n if (1 === window.csBlockTypeCount[blockName]) {\n setAttributes({\n title: titlePrefix\n });\n } else {\n setAttributes({\n title: \"\".concat(titlePrefix, \" \").concat(window.csBlockTypeCount[blockName])\n });\n }\n }, []);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useNumberedTitle);\n\n//# sourceURL=webpack:///./client/components/use-numbered-title/index.js?");
|
722 |
+
|
723 |
+
/***/ }),
|
724 |
+
|
725 |
+
/***/ "./client/components/use-poll-duplicate-cleaner/index.js":
|
726 |
+
/*!***************************************************************!*\
|
727 |
+
!*** ./client/components/use-poll-duplicate-cleaner/index.js ***!
|
728 |
+
\***************************************************************/
|
729 |
+
/*! exports provided: default */
|
730 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
731 |
+
|
732 |
+
"use strict";
|
733 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (blockClientId, pollId, answers, setAttributes) {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(pollId)) {\n return;\n }\n\n if (!window.csPolls) {\n window.csPolls = {};\n }\n\n if (!window.csPolls[pollId]) {\n window.csPolls[pollId] = [blockClientId];\n } else if (window.csPolls[pollId].indexOf(blockClientId) > -1) {// clientid already known, ignore.\n } else {\n var newAnswers = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(answers, function (answer) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"omit\"])(answer, ['answerId']);\n });\n setAttributes({\n pollId: null,\n answers: newAnswers\n });\n }\n }, [pollId]);\n});\n\n//# sourceURL=webpack:///./client/components/use-poll-duplicate-cleaner/index.js?");
|
734 |
+
|
735 |
+
/***/ }),
|
736 |
+
|
737 |
+
/***/ "./client/components/vote/styles.js":
|
738 |
+
/*!******************************************!*\
|
739 |
+
!*** ./client/components/vote/styles.js ***!
|
740 |
+
\******************************************/
|
741 |
+
/*! exports provided: getVoteStyles, VoteStyles */
|
742 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
743 |
+
|
744 |
+
"use strict";
|
745 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getVoteStyles\", function() { return getVoteStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VoteStyles\", function() { return VoteStyles; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/with-fallback-styles/util */ \"./client/components/with-fallback-styles/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getVoteStyles = function getVoteStyles(node) {\n if (null === node) {\n return {};\n }\n\n var buttonNode = node.querySelector('.wp-block-button__link');\n var textNode = node.querySelector('p');\n var accentColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(buttonNode);\n var surfaceColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(textNode);\n var textColor = window.getComputedStyle(textNode).color; // Ensure that we don't end up with the same color for surface and accent.\n // Falls back to button border color, then text color.\n\n if (accentColor === surfaceColor) {\n var borderColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBorderColor\"])(buttonNode);\n accentColor = borderColor ? borderColor : textColor;\n }\n\n return {\n accentColor: accentColor,\n textColor: textColor,\n backgroundColor: surfaceColor\n };\n};\nvar VoteStyles = function VoteStyles() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link\"\n })));\n};\n\n//# sourceURL=webpack:///./client/components/vote/styles.js?");
|
746 |
+
|
747 |
+
/***/ }),
|
748 |
+
|
749 |
+
/***/ "./client/components/vote/util.js":
|
750 |
+
/*!****************************************!*\
|
751 |
+
!*** ./client/components/vote/util.js ***!
|
752 |
+
\****************************************/
|
753 |
+
/*! exports provided: formatVoteCount */
|
754 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
755 |
+
|
756 |
+
"use strict";
|
757 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatVoteCount\", function() { return formatVoteCount; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies\n */\n\n/**\n * Formats the counter values on vote items:\n *\n * @param {number} count Vote count\n * @return {string} Formatted count\n */\n\nvar formatVoteCount = function formatVoteCount(count) {\n if (!count) {\n return '0';\n }\n\n if (count >= 10000000) {\n return \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"round\"])(count / 1000000), \"M\");\n }\n\n if (count >= 1000000) {\n return \"\".concat((count / 1000000).toFixed(1), \"M\");\n }\n\n if (count >= 10000) {\n return \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"round\"])(count / 1000), \"K\");\n }\n\n if (count >= 1000) {\n return \"\".concat((count / 1000).toFixed(1), \"K\");\n }\n\n return count.toString();\n};\n\n//# sourceURL=webpack:///./client/components/vote/util.js?");
|
758 |
+
|
759 |
+
/***/ }),
|
760 |
+
|
761 |
+
/***/ "./client/components/vote/vote-item.js":
|
762 |
+
/*!*********************************************!*\
|
763 |
+
!*** ./client/components/vote/vote-item.js ***!
|
764 |
+
\*********************************************/
|
765 |
+
/*! exports provided: default */
|
766 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
767 |
+
|
768 |
+
"use strict";
|
769 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var components_icon_thumbs_up__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/icon/thumbs-up */ \"./client/components/icon/thumbs-up.js\");\n/* harmony import */ var components_icon_thumbs_down__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/icon/thumbs-down */ \"./client/components/icon/thumbs-down.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util */ \"./client/components/vote/util.js\");\n/* harmony import */ var blocks_vote_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! blocks/vote/util */ \"./client/blocks/vote/util.js\");\n\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\nvar VoteItem = function VoteItem(props) {\n var attributes = props.attributes,\n voteCount = props.voteCount,\n apiAnswerId = props.apiAnswerId,\n onVote = props.onVote,\n disabled = props.disabled,\n isVotedOn = props.isVotedOn,\n hideCount = props.hideCount,\n fallbackStyles = props.fallbackStyles,\n isInEditor = props.isInEditor;\n var className = attributes.className,\n type = attributes.type;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"])(0),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n currentVote = _useState2[0],\n setCurrentVote = _useState2[1];\n\n var handleVote = function handleVote() {\n if (disabled || !onVote) {\n return;\n }\n\n setCurrentVote(1);\n onVote(apiAnswerId);\n };\n\n var Icon = 'up' === type ? components_icon_thumbs_up__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : components_icon_thumbs_down__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n var typeClass = \"is-type-\".concat(type);\n var classes = Object(blocks_vote_util__WEBPACK_IMPORTED_MODULE_8__[\"getBlockCssClasses\"])(attributes, 'crowdsignal-forms-vote-item', className, {\n 'is-voted-on': isVotedOn,\n 'is-disabled': disabled,\n 'is-in-editor': isInEditor\n }, typeClass);\n var blockStyle = Object(blocks_vote_util__WEBPACK_IMPORTED_MODULE_8__[\"getVoteItemStyleVars\"])(attributes, fallbackStyles);\n var displayedVoteCount = voteCount + currentVote;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: classes,\n onClick: handleVote,\n onKeyPress: handleVote,\n role: \"button\",\n style: blockStyle,\n tabIndex: 0\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(Icon, {\n className: \"crowdsignal-forms-vote-item__icon\",\n fillColor: \"currentColor\"\n }), !hideCount && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(react_transition_group__WEBPACK_IMPORTED_MODULE_4__[\"SwitchTransition\"], {\n mode: \"in-out\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(react_transition_group__WEBPACK_IMPORTED_MODULE_4__[\"CSSTransition\"], {\n key: currentVote,\n classNames: \"crowdsignal-forms-vote-item__count\",\n timeout: 300\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-vote-item__count\"\n }, Object(_util__WEBPACK_IMPORTED_MODULE_7__[\"formatVoteCount\"])(displayedVoteCount)))));\n};\n\nVoteItem.propTypes = {\n apiAnswerId: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n isVotedOn: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n onVote: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string.isRequired,\n voteCount: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (VoteItem);\n\n//# sourceURL=webpack:///./client/components/vote/vote-item.js?");
|
770 |
+
|
771 |
+
/***/ }),
|
772 |
+
|
773 |
+
/***/ "./client/components/with-client-id/index.js":
|
774 |
+
/*!***************************************************!*\
|
775 |
+
!*** ./client/components/with-client-id/index.js ***!
|
776 |
+
\***************************************************/
|
777 |
+
/*! exports provided: default */
|
778 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
779 |
+
|
780 |
+
"use strict";
|
781 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/index.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n\nvar withClientId = function withClientId(Element, clientIdAttributeNames) {\n return function (props) {\n var attributes = props.attributes,\n setAttributes = props.setAttributes;\n var clientIdNames = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"isArray\"])(clientIdAttributeNames) ? clientIdAttributeNames : [clientIdAttributeNames];\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(clientIdNames, function (name) {\n if (!attributes[name]) {\n var clientId = Object(uuid__WEBPACK_IMPORTED_MODULE_2__[\"v4\"])();\n var newAttribute = {};\n newAttribute[name] = clientId;\n setAttributes(newAttribute);\n }\n });\n });\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Element, props);\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withClientId);\n\n//# sourceURL=webpack:///./client/components/with-client-id/index.js?");
|
782 |
+
|
783 |
+
/***/ }),
|
784 |
+
|
785 |
+
/***/ "./client/components/with-fallback-styles/index.js":
|
786 |
+
/*!*********************************************************!*\
|
787 |
+
!*** ./client/components/with-fallback-styles/index.js ***!
|
788 |
+
\*********************************************************/
|
789 |
+
/*! exports provided: withFallbackStyles */
|
790 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
791 |
+
|
792 |
+
"use strict";
|
793 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withFallbackStyles\", function() { return withFallbackStyles; });\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\nvar StyleProbe = function StyleProbe(_ref) {\n var children = _ref.children;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__style-probe\"\n }, children);\n};\n\nvar withFallbackStyles = function withFallbackStyles(VirtualComponent, getStyles) {\n return function (WrappedComponent) {\n var getFallbackStyles = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__[\"withFallbackStyles\"])(function (node) {\n return {\n fallbackStyles: getStyles(node.querySelector('.crowdsignal-forms__style-probe'))\n };\n });\n return getFallbackStyles(function (_ref2) {\n var fallbackStyles = _ref2.fallbackStyles,\n props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, [\"fallbackStyles\"]);\n\n var renderProbe = function renderProbe() {\n if (fallbackStyles) {\n return null;\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(StyleProbe, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(VirtualComponent, null));\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(WrappedComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n fallbackStyles: fallbackStyles || {},\n renderStyleProbe: renderProbe\n }, props));\n });\n };\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/index.js?");
|
794 |
+
|
795 |
+
/***/ }),
|
796 |
+
|
797 |
+
/***/ "./client/components/with-fallback-styles/util.js":
|
798 |
+
/*!********************************************************!*\
|
799 |
+
!*** ./client/components/with-fallback-styles/util.js ***!
|
800 |
+
\********************************************************/
|
801 |
+
/*! exports provided: getBackgroundColor, getBorderColor */
|
802 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
803 |
+
|
804 |
+
"use strict";
|
805 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBackgroundColor\", function() { return getBackgroundColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBorderColor\", function() { return getBorderColor; });\n/**\n * Traverses the parent chain of the given node to get a 'best guess' of\n * what the background color is if the provided node has a transparent background.\n * Algorithm for traversing parent chain \"borrowed\" from\n * https://github.com/WordPress/gutenberg/blob/0c6e369/packages/block-editor/src/components/colors/use-colors.js#L201-L216\n *\n * @param {Element} backgroundColorNode The element to check for background color\n * @return {string} The background colour of the node\n */\nvar getBackgroundColor = function getBackgroundColor(backgroundColorNode) {\n var backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n\n while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === window.Node.ELEMENT_NODE) {\n backgroundColorNode = backgroundColorNode.parentNode;\n backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n }\n\n return backgroundColor;\n};\n/**\n * Gets the border color for a node, if it appears valid.\n * If we get '0px' for the width, then we likely don't have a border and return null.\n * We use 'borderBlockStartWidth' because of FF: https://bugzilla.mozilla.org/show_bug.cgi?id=137688\n *\n * @param {Element} borderNode The element to check for a border color\n * @return {string|null} The border colour value of null if invalid\n */\n\nvar getBorderColor = function getBorderColor(borderNode) {\n var borderWidth = window.getComputedStyle(borderNode).borderBlockStartWidth;\n return borderWidth !== '0px' ? window.getComputedStyle(borderNode).borderBlockStartColor : null;\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/util.js?");
|
806 |
+
|
807 |
+
/***/ }),
|
808 |
+
|
809 |
+
/***/ "./client/components/with-poll-base/index.js":
|
810 |
+
/*!***************************************************!*\
|
811 |
+
!*** ./client/components/with-poll-base/index.js ***!
|
812 |
+
\***************************************************/
|
813 |
+
/*! exports provided: default */
|
814 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
815 |
+
|
816 |
+
"use strict";
|
817 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var blocks_poll_subscriptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! blocks/poll/subscriptions */ \"./client/blocks/poll/subscriptions.js\");\n/* harmony import */ var components_use_poll_duplicate_cleaner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/use-poll-duplicate-cleaner */ \"./client/components/use-poll-duplicate-cleaner/index.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\nObject(blocks_poll_subscriptions__WEBPACK_IMPORTED_MODULE_3__[\"startSubscriptions\"])();\n\nvar isP2tenberg = function isP2tenberg() {\n return 'p2tenberg' in window;\n};\n\nvar withPollBase = function withPollBase(Element) {\n return function (props) {\n var attributes = props.attributes,\n setAttributes = props.setAttributes,\n addPollClientId = props.addPollClientId,\n removePollClientId = props.removePollClientId;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n if (isP2tenberg()) {\n Object(blocks_poll_subscriptions__WEBPACK_IMPORTED_MODULE_3__[\"startPolling\"])();\n }\n\n if (attributes.pollId) {\n addPollClientId(attributes.pollId);\n }\n\n return function () {\n if (attributes.pollId) {\n removePollClientId(attributes.pollId);\n }\n };\n }, []);\n Object(components_use_poll_duplicate_cleaner__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.clientId, attributes.pollId, attributes.answers, setAttributes);\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Element, props);\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (Element) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__[\"compose\"])([Object(blocks_poll_subscriptions__WEBPACK_IMPORTED_MODULE_3__[\"withPollDataSelect\"])(), Object(blocks_poll_subscriptions__WEBPACK_IMPORTED_MODULE_3__[\"withPollDataDispatch\"])(), withPollBase])(Element);\n});\n\n//# sourceURL=webpack:///./client/components/with-poll-base/index.js?");
|
818 |
+
|
819 |
+
/***/ }),
|
820 |
+
|
821 |
+
/***/ "./client/data/hooks/index.js":
|
822 |
+
/*!************************************!*\
|
823 |
+
!*** ./client/data/hooks/index.js ***!
|
824 |
+
\************************************/
|
825 |
+
/*! exports provided: usePollResults, usePollVote, useIsCsConnected */
|
826 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
827 |
+
|
828 |
+
"use strict";
|
829 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollResults\", function() { return usePollResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollVote\", function() { return usePollVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useIsCsConnected\", function() { return useIsCsConnected; });\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! js-cookie */ \"./node_modules/js-cookie/src/js.cookie.js\");\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var data_poll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! data/poll */ \"./client/data/poll/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ \"./client/data/hooks/util.js\");\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar usePollResults = function usePollResults(pollId) {\n var doFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var _useFetch = Object(_util__WEBPACK_IMPORTED_MODULE_6__[\"useFetch\"])(function () {\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestResults\"])(pollId, doFetch);\n }, [pollId]),\n data = _useFetch.data,\n error = _useFetch.error,\n loading = _useFetch.loading;\n\n return {\n error: error,\n loading: loading,\n results: data\n };\n};\n/**\n * React Hook that returns state variables for voting status and a function to perform a vote.\n *\n * @param {number} pollId ID of the poll being loaded.\n * @param {boolean} enableVoteRestriction sets whether or not the vote cookie is read and set\n * @param {boolean} storeAnswerIdsInCookie sets whether or not the answer ids are stored in the vote restriction cookie\n */\n\nvar usePollVote = function usePollVote(pollId) {\n var enableVoteRestriction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var storeAnswerIdsInCookie = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var cookieName = \"cs-poll-\".concat(pollId);\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),\n isVoting = _useState2[0],\n setIsVoting = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),\n hasVoted = _useState4[0],\n setHasVoted = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(''),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),\n storedCookieValue = _useState6[0],\n setStoredCookieValue = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n if (enableVoteRestriction && undefined !== js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName)) {\n setHasVoted(true);\n setStoredCookieValue(js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName));\n }\n }, []);\n\n var vote = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(selectedAnswerIds) {\n var voteCount,\n nonce,\n cookieValue,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n voteCount = _args.length > 1 && _args[1] !== undefined ? _args[1] : 1;\n _context.prev = 1;\n setIsVoting(true);\n _context.next = 5;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVoteNonce\"])(pollId);\n\n case 5:\n nonce = _context.sent;\n _context.next = 8;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVote\"])(nonce, pollId, selectedAnswerIds, voteCount);\n\n case 8:\n setHasVoted(true);\n\n if (enableVoteRestriction) {\n cookieValue = storeAnswerIdsInCookie ? selectedAnswerIds.join(',') : new Date().getTime();\n js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.set(cookieName, cookieValue, {\n sameSite: 'Strict',\n expires: 365\n });\n setStoredCookieValue(cookieValue);\n }\n\n case 10:\n _context.prev = 10;\n setIsVoting(false);\n return _context.finish(10);\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[1,, 10, 13]]);\n }));\n\n return function vote(_x) {\n return _ref.apply(this, arguments);\n };\n }();\n\n return {\n hasVoted: hasVoted,\n isVoting: isVoting,\n vote: vote,\n storedCookieValue: storedCookieValue\n };\n};\nvar useIsCsConnected = function useIsCsConnected() {\n /* assume connection is enabled, so placeholder doesn't flash while we add a block and wait for the request */\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),\n isConnected = _useState8[0],\n setIsConnected = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),\n isAccountVerified = _useState10[0],\n setIsAccountVerified = _useState10[1];\n\n var checkIsConnected = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {\n var connectedState, isNowConnected, isNowVerified;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestIsCsConnected\"])();\n\n case 2:\n connectedState = _context2.sent;\n isNowConnected = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState || blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].NOT_VERIFIED === connectedState;\n isNowVerified = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState;\n setIsConnected(isNowConnected);\n setIsAccountVerified(isNowVerified);\n return _context2.abrupt(\"return\", {\n isNowConnected: isNowConnected,\n isNowVerified: isNowVerified\n });\n\n case 8:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function checkIsConnected() {\n return _ref2.apply(this, arguments);\n };\n }();\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n checkIsConnected();\n }, []);\n return {\n isConnected: isConnected,\n isAccountVerified: isAccountVerified,\n checkIsConnected: checkIsConnected\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/index.js?");
|
830 |
+
|
831 |
+
/***/ }),
|
832 |
+
|
833 |
+
/***/ "./client/data/hooks/util.js":
|
834 |
+
/*!***********************************!*\
|
835 |
+
!*** ./client/data/hooks/util.js ***!
|
836 |
+
\***********************************/
|
837 |
+
/*! exports provided: useFetch */
|
838 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
839 |
+
|
840 |
+
"use strict";
|
841 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useFetch\", function() { return useFetch; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\nvar useFetch = function useFetch(fetchCallback, watchProps) {\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n data = _useState2[0],\n setData = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),\n error = _useState4[0],\n setError = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(true),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),\n loading = _useState6[0],\n setLoading = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n setLoading(true);\n setError(null);\n setData(null);\n fetchCallback().then(setData).catch(setError).finally(function () {\n return setLoading(false);\n });\n }, watchProps);\n return {\n data: data,\n error: error,\n loading: loading\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/util.js?");
|
842 |
+
|
843 |
+
/***/ }),
|
844 |
+
|
845 |
+
/***/ "./client/data/poll/index.js":
|
846 |
+
/*!***********************************!*\
|
847 |
+
!*** ./client/data/poll/index.js ***!
|
848 |
+
\***********************************/
|
849 |
+
/*! exports provided: requestResults, requestVoteNonce, requestVote, CrowdsignalFormsError, CrowdsignalFormsServerError, requestIsCsConnected */
|
850 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
851 |
+
|
852 |
+
"use strict";
|
853 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestResults\", function() { return requestResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVoteNonce\", function() { return requestVoteNonce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVote\", function() { return requestVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsError\", function() { return CrowdsignalFormsError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsServerError\", function() { return CrowdsignalFormsServerError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestIsCsConnected\", function() { return requestIsCsConnected; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ \"./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\");\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ \"@wordpress/api-fetch\");\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\n/**\n * External dependencies\n */\n\n\n/**\n * Fetch the poll results for the given pollId\n *\n * @param {number} pollId Poll ID.\n * @param {boolean} doFetch Whether or not to actually perform the request.\n * @return {Promise} Promise that resolves to a key-value object with answer IDs and vote counts.\n */\n\nvar requestResults = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(pollId) {\n var doFetch,\n baseUrl,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n doFetch = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;\n baseUrl = 'https://api.crowdsignal.com/v3/polls';\n\n if (doFetch) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt(\"return\", null);\n\n case 4:\n return _context.abrupt(\"return\", window.fetch(\"\".concat(baseUrl, \"/\").concat(pollId, \"/results\"), {\n method: 'GET',\n headers: {\n 'content-type': 'application/json'\n }\n }).then(function (response) {\n if (response.status >= 200 && response.status < 300) {\n return response.json();\n }\n\n throw response;\n }).then(function (response) {\n if (404 === response.status) {\n // poll doesn't exist on the platform yet, return an empty result\n return {};\n } else if (response.error) {\n throw new Error(response.message);\n }\n\n return response.results.votes_by_answer;\n }));\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function requestResults(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar requestVoteNonce = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(pollId) {\n var hash, timestamp, respNonce, jsonNonce;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n hash = '5430eeac3911395001d731d9702fc38b'; // hash not used when format=json is passed\n\n timestamp = new Date().getTime();\n _context2.next = 4;\n return window.fetch(\"https://polldaddy.com/n/\".concat(hash, \"/\").concat(pollId, \"?\").concat(timestamp, \"&format=json\"));\n\n case 4:\n respNonce = _context2.sent;\n\n if (respNonce.ok) {\n _context2.next = 7;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 7:\n _context2.next = 9;\n return respNonce.json();\n\n case 9:\n jsonNonce = _context2.sent;\n\n if (jsonNonce.nonce) {\n _context2.next = 12;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 12:\n return _context2.abrupt(\"return\", jsonNonce.nonce);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function requestVoteNonce(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar requestVote = /*#__PURE__*/function () {\n var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3(nonce, pollId, selectedAnswerIds, voteCount) {\n var answerString, respVote, jsonVote;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n answerString = selectedAnswerIds.join(',');\n _context3.next = 3;\n return window.fetch(\"https://polls.polldaddy.com/vote-js.php?format=json&p=\".concat(pollId, \"&b=1&a=\").concat(answerString, \"&o=&va=16&cookie=0&n=\").concat(nonce, \"&url=\").concat(encodeURIComponent(window.location), \"&vi=\").concat(voteCount));\n\n case 3:\n respVote = _context3.sent;\n\n if (respVote.ok) {\n _context3.next = 6;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 6:\n _context3.next = 8;\n return respVote.json();\n\n case 8:\n jsonVote = _context3.sent;\n\n if (!('error' === jsonVote.status)) {\n _context3.next = 11;\n break;\n }\n\n throw new CrowdsignalFormsError(jsonVote.error);\n\n case 11:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function requestVote(_x3, _x4, _x5, _x6) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar CrowdsignalFormsError = /*#__PURE__*/function (_Error) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsError, _Error);\n\n var _super = _createSuper(CrowdsignalFormsError);\n\n function CrowdsignalFormsError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsError);\n\n return _super.apply(this, arguments);\n }\n\n return CrowdsignalFormsError;\n}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error));\nvar CrowdsignalFormsServerError = /*#__PURE__*/function (_CrowdsignalFormsErro) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsServerError, _CrowdsignalFormsErro);\n\n var _super2 = _createSuper(CrowdsignalFormsServerError);\n\n function CrowdsignalFormsServerError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsServerError);\n\n return _super2.call(this, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__[\"__\"])('Server error. Please try again.', 'crowdsignal-forms'));\n }\n\n return CrowdsignalFormsServerError;\n}(CrowdsignalFormsError);\n/**\n * Returns the connected state of the current user's account.\n *\n * @return {string} Enum value of the account's state.\n */\n\nvar requestIsCsConnected = /*#__PURE__*/function () {\n var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee4() {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({\n path: \"/crowdsignal-forms/v1/account/connected\",\n method: 'GET'\n });\n\n case 2:\n return _context4.abrupt(\"return\", _context4.sent);\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function requestIsCsConnected() {\n return _ref4.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack:///./client/data/poll/index.js?");
|
854 |
+
|
855 |
+
/***/ }),
|
856 |
+
|
857 |
+
/***/ "./client/editor.js":
|
858 |
+
/*!**************************!*\
|
859 |
+
!*** ./client/editor.js ***!
|
860 |
+
\**************************/
|
861 |
+
/*! no exports provided */
|
862 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
863 |
+
|
864 |
+
"use strict";
|
865 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var blocks_poll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! blocks/poll */ \"./client/blocks/poll/index.js\");\n/* harmony import */ var blocks_vote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! blocks/vote */ \"./client/blocks/vote/index.js\");\n/* harmony import */ var blocks_vote_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! blocks/vote-item */ \"./client/blocks/vote-item/index.js\");\n/* harmony import */ var blocks_applause__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! blocks/applause */ \"./client/blocks/applause/index.js\");\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\nObject(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__[\"registerBlockType\"])('crowdsignal-forms/poll', blocks_poll__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nObject(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__[\"registerBlockType\"])('crowdsignal-forms/vote', blocks_vote__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\nObject(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__[\"registerBlockType\"])('crowdsignal-forms/vote-item', blocks_vote_item__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\nObject(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__[\"registerBlockType\"])('crowdsignal-forms/applause', blocks_applause__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\n\n//# sourceURL=webpack:///./client/editor.js?");
|
866 |
+
|
867 |
+
/***/ }),
|
868 |
+
|
869 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
870 |
+
/*!*****************************************************************!*\
|
871 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
872 |
+
\*****************************************************************/
|
873 |
+
/*! no static exports found */
|
874 |
+
/***/ (function(module, exports) {
|
875 |
+
|
876 |
+
eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
|
877 |
+
|
878 |
+
/***/ }),
|
879 |
+
|
880 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
881 |
+
/*!***************************************************************!*\
|
882 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
883 |
+
\***************************************************************/
|
884 |
+
/*! no static exports found */
|
885 |
+
/***/ (function(module, exports) {
|
886 |
+
|
887 |
+
eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
|
888 |
+
|
889 |
+
/***/ }),
|
890 |
+
|
891 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
892 |
+
/*!******************************************************************!*\
|
893 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
894 |
+
\******************************************************************/
|
895 |
+
/*! no static exports found */
|
896 |
+
/***/ (function(module, exports, __webpack_require__) {
|
897 |
+
|
898 |
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?");
|
899 |
+
|
900 |
+
/***/ }),
|
901 |
+
|
902 |
+
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
903 |
+
/*!**********************************************************************!*\
|
904 |
+
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
905 |
+
\**********************************************************************/
|
906 |
+
/*! no static exports found */
|
907 |
+
/***/ (function(module, exports) {
|
908 |
+
|
909 |
+
eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js?");
|
910 |
+
|
911 |
+
/***/ }),
|
912 |
+
|
913 |
+
/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
|
914 |
+
/*!*****************************************************************!*\
|
915 |
+
!*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
|
916 |
+
\*****************************************************************/
|
917 |
+
/*! no static exports found */
|
918 |
+
/***/ (function(module, exports) {
|
919 |
+
|
920 |
+
eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
|
921 |
+
|
922 |
+
/***/ }),
|
923 |
+
|
924 |
+
/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
925 |
+
/*!***************************************************************!*\
|
926 |
+
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
927 |
+
\***************************************************************/
|
928 |
+
/*! no static exports found */
|
929 |
+
/***/ (function(module, exports) {
|
930 |
+
|
931 |
+
eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js?");
|
932 |
+
|
933 |
+
/***/ }),
|
934 |
+
|
935 |
+
/***/ "./node_modules/@babel/runtime/helpers/construct.js":
|
936 |
+
/*!**********************************************************!*\
|
937 |
+
!*** ./node_modules/@babel/runtime/helpers/construct.js ***!
|
938 |
+
\**********************************************************/
|
939 |
+
/*! no static exports found */
|
940 |
+
/***/ (function(module, exports, __webpack_require__) {
|
941 |
+
|
942 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ \"./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/construct.js?");
|
943 |
+
|
944 |
+
/***/ }),
|
945 |
+
|
946 |
+
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
|
947 |
+
/*!***************************************************************!*\
|
948 |
+
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
949 |
+
\***************************************************************/
|
950 |
+
/*! no static exports found */
|
951 |
+
/***/ (function(module, exports) {
|
952 |
+
|
953 |
+
eval("function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js?");
|
954 |
+
|
955 |
+
/***/ }),
|
956 |
+
|
957 |
+
/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
958 |
+
/*!**************************************************************************!*\
|
959 |
+
!*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
|
960 |
+
\**************************************************************************/
|
961 |
+
/*! exports provided: default */
|
962 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
963 |
+
|
964 |
+
"use strict";
|
965 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _assertThisInitialized; });\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?");
|
966 |
+
|
967 |
+
/***/ }),
|
968 |
+
|
969 |
+
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
|
970 |
+
/*!************************************************************!*\
|
971 |
+
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
|
972 |
+
\************************************************************/
|
973 |
+
/*! exports provided: default */
|
974 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
975 |
+
|
976 |
+
"use strict";
|
977 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _extends; });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js?");
|
978 |
+
|
979 |
+
/***/ }),
|
980 |
+
|
981 |
+
/***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":
|
982 |
+
/*!******************************************************************!*\
|
983 |
+
!*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***!
|
984 |
+
\******************************************************************/
|
985 |
+
/*! exports provided: default */
|
986 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
987 |
+
|
988 |
+
"use strict";
|
989 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _inheritsLoose; });\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js?");
|
990 |
+
|
991 |
+
/***/ }),
|
992 |
+
|
993 |
+
/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
|
994 |
+
/*!*********************************************************************************!*\
|
995 |
+
!*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
|
996 |
+
\*********************************************************************************/
|
997 |
+
/*! exports provided: default */
|
998 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
999 |
+
|
1000 |
+
"use strict";
|
1001 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutPropertiesLoose; });\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?");
|
1002 |
+
|
1003 |
+
/***/ }),
|
1004 |
+
|
1005 |
+
/***/ "./node_modules/@babel/runtime/helpers/extends.js":
|
1006 |
+
/*!********************************************************!*\
|
1007 |
+
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
|
1008 |
+
\********************************************************/
|
1009 |
+
/*! no static exports found */
|
1010 |
+
/***/ (function(module, exports) {
|
1011 |
+
|
1012 |
+
eval("function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/extends.js?");
|
1013 |
+
|
1014 |
+
/***/ }),
|
1015 |
+
|
1016 |
+
/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
1017 |
+
/*!***************************************************************!*\
|
1018 |
+
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
1019 |
+
\***************************************************************/
|
1020 |
+
/*! no static exports found */
|
1021 |
+
/***/ (function(module, exports) {
|
1022 |
+
|
1023 |
+
eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js?");
|
1024 |
+
|
1025 |
+
/***/ }),
|
1026 |
+
|
1027 |
+
/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
|
1028 |
+
/*!*********************************************************!*\
|
1029 |
+
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
1030 |
+
\*********************************************************/
|
1031 |
+
/*! no static exports found */
|
1032 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1033 |
+
|
1034 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/inherits.js?");
|
1035 |
+
|
1036 |
+
/***/ }),
|
1037 |
+
|
1038 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeFunction.js":
|
1039 |
+
/*!*****************************************************************!*\
|
1040 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
|
1041 |
+
\*****************************************************************/
|
1042 |
+
/*! no static exports found */
|
1043 |
+
/***/ (function(module, exports) {
|
1044 |
+
|
1045 |
+
eval("function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeFunction.js?");
|
1046 |
+
|
1047 |
+
/***/ }),
|
1048 |
+
|
1049 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
|
1050 |
+
/*!*************************************************************************!*\
|
1051 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
|
1052 |
+
\*************************************************************************/
|
1053 |
+
/*! no static exports found */
|
1054 |
+
/***/ (function(module, exports) {
|
1055 |
+
|
1056 |
+
eval("function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?");
|
1057 |
+
|
1058 |
+
/***/ }),
|
1059 |
+
|
1060 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
1061 |
+
/*!****************************************************************!*\
|
1062 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
1063 |
+
\****************************************************************/
|
1064 |
+
/*! no static exports found */
|
1065 |
+
/***/ (function(module, exports) {
|
1066 |
+
|
1067 |
+
eval("function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js?");
|
1068 |
+
|
1069 |
+
/***/ }),
|
1070 |
+
|
1071 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
1072 |
+
/*!*********************************************************************!*\
|
1073 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
1074 |
+
\*********************************************************************/
|
1075 |
+
/*! no static exports found */
|
1076 |
+
/***/ (function(module, exports) {
|
1077 |
+
|
1078 |
+
eval("function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
|
1079 |
+
|
1080 |
+
/***/ }),
|
1081 |
+
|
1082 |
+
/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
1083 |
+
/*!****************************************************************!*\
|
1084 |
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
1085 |
+
\****************************************************************/
|
1086 |
+
/*! no static exports found */
|
1087 |
+
/***/ (function(module, exports) {
|
1088 |
+
|
1089 |
+
eval("function _nonIterableRest() {\n 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}\n\nmodule.exports = _nonIterableRest;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js?");
|
1090 |
+
|
1091 |
+
/***/ }),
|
1092 |
+
|
1093 |
+
/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
|
1094 |
+
/*!******************************************************************!*\
|
1095 |
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
|
1096 |
+
\******************************************************************/
|
1097 |
+
/*! no static exports found */
|
1098 |
+
/***/ (function(module, exports) {
|
1099 |
+
|
1100 |
+
eval("function _nonIterableSpread() {\n 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}\n\nmodule.exports = _nonIterableSpread;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js?");
|
1101 |
+
|
1102 |
+
/***/ }),
|
1103 |
+
|
1104 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
|
1105 |
+
/*!************************************************************************!*\
|
1106 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
|
1107 |
+
\************************************************************************/
|
1108 |
+
/*! no static exports found */
|
1109 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1110 |
+
|
1111 |
+
eval("var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js?");
|
1112 |
+
|
1113 |
+
/***/ }),
|
1114 |
+
|
1115 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
|
1116 |
+
/*!*****************************************************************************!*\
|
1117 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
|
1118 |
+
\*****************************************************************************/
|
1119 |
+
/*! no static exports found */
|
1120 |
+
/***/ (function(module, exports) {
|
1121 |
+
|
1122 |
+
eval("function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js?");
|
1123 |
+
|
1124 |
+
/***/ }),
|
1125 |
+
|
1126 |
+
/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
1127 |
+
/*!**************************************************************************!*\
|
1128 |
+
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
1129 |
+
\**************************************************************************/
|
1130 |
+
/*! no static exports found */
|
1131 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1132 |
+
|
1133 |
+
eval("var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?");
|
1134 |
+
|
1135 |
+
/***/ }),
|
1136 |
+
|
1137 |
+
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
1138 |
+
/*!***************************************************************!*\
|
1139 |
+
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
1140 |
+
\***************************************************************/
|
1141 |
+
/*! no static exports found */
|
1142 |
+
/***/ (function(module, exports) {
|
1143 |
+
|
1144 |
+
eval("function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js?");
|
1145 |
+
|
1146 |
+
/***/ }),
|
1147 |
+
|
1148 |
+
/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
1149 |
+
/*!**************************************************************!*\
|
1150 |
+
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
1151 |
+
\**************************************************************/
|
1152 |
+
/*! no static exports found */
|
1153 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1154 |
+
|
1155 |
+
eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js?");
|
1156 |
+
|
1157 |
+
/***/ }),
|
1158 |
+
|
1159 |
+
/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
|
1160 |
+
/*!******************************************************************!*\
|
1161 |
+
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
|
1162 |
+
\******************************************************************/
|
1163 |
+
/*! no static exports found */
|
1164 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1165 |
+
|
1166 |
+
eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\n\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js?");
|
1167 |
+
|
1168 |
+
/***/ }),
|
1169 |
+
|
1170 |
+
/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
|
1171 |
+
/*!*******************************************************!*\
|
1172 |
+
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
1173 |
+
\*******************************************************/
|
1174 |
+
/*! no static exports found */
|
1175 |
+
/***/ (function(module, exports) {
|
1176 |
+
|
1177 |
+
eval("function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/typeof.js?");
|
1178 |
+
|
1179 |
+
/***/ }),
|
1180 |
+
|
1181 |
+
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
1182 |
+
/*!***************************************************************************!*\
|
1183 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
1184 |
+
\***************************************************************************/
|
1185 |
+
/*! no static exports found */
|
1186 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1187 |
+
|
1188 |
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");
|
1189 |
+
|
1190 |
+
/***/ }),
|
1191 |
+
|
1192 |
+
/***/ "./node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
|
1193 |
+
/*!****************************************************************!*\
|
1194 |
+
!*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
|
1195 |
+
\****************************************************************/
|
1196 |
+
/*! no static exports found */
|
1197 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1198 |
+
|
1199 |
+
eval("var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n\nvar setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeFunction = __webpack_require__(/*! ./isNativeFunction */ \"./node_modules/@babel/runtime/helpers/isNativeFunction.js\");\n\nvar construct = __webpack_require__(/*! ./construct */ \"./node_modules/@babel/runtime/helpers/construct.js\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/wrapNativeSuper.js?");
|
1200 |
+
|
1201 |
+
/***/ }),
|
1202 |
+
|
1203 |
+
/***/ "./node_modules/classnames/index.js":
|
1204 |
+
/*!******************************************!*\
|
1205 |
+
!*** ./node_modules/classnames/index.js ***!
|
1206 |
+
\******************************************/
|
1207 |
+
/*! no static exports found */
|
1208 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1209 |
+
|
1210 |
+
eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif ( true && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (true) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\t\t\treturn classNames;\n\t\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n}());\n\n\n//# sourceURL=webpack:///./node_modules/classnames/index.js?");
|
1211 |
+
|
1212 |
+
/***/ }),
|
1213 |
+
|
1214 |
+
/***/ "./node_modules/dom-helpers/esm/addClass.js":
|
1215 |
+
/*!**************************************************!*\
|
1216 |
+
!*** ./node_modules/dom-helpers/esm/addClass.js ***!
|
1217 |
+
\**************************************************/
|
1218 |
+
/*! exports provided: default */
|
1219 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1220 |
+
|
1221 |
+
"use strict";
|
1222 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return addClass; });\n/* harmony import */ var _hasClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass */ \"./node_modules/dom-helpers/esm/hasClass.js\");\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!Object(_hasClass__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/addClass.js?");
|
1223 |
+
|
1224 |
+
/***/ }),
|
1225 |
+
|
1226 |
+
/***/ "./node_modules/dom-helpers/esm/hasClass.js":
|
1227 |
+
/*!**************************************************!*\
|
1228 |
+
!*** ./node_modules/dom-helpers/esm/hasClass.js ***!
|
1229 |
+
\**************************************************/
|
1230 |
+
/*! exports provided: default */
|
1231 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1232 |
+
|
1233 |
+
"use strict";
|
1234 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return hasClass; });\nfunction hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/hasClass.js?");
|
1235 |
+
|
1236 |
+
/***/ }),
|
1237 |
+
|
1238 |
+
/***/ "./node_modules/dom-helpers/esm/removeClass.js":
|
1239 |
+
/*!*****************************************************!*\
|
1240 |
+
!*** ./node_modules/dom-helpers/esm/removeClass.js ***!
|
1241 |
+
\*****************************************************/
|
1242 |
+
/*! exports provided: default */
|
1243 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1244 |
+
|
1245 |
+
"use strict";
|
1246 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return removeClass; });\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nfunction removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n ;\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/removeClass.js?");
|
1247 |
+
|
1248 |
+
/***/ }),
|
1249 |
+
|
1250 |
+
/***/ "./node_modules/js-cookie/src/js.cookie.js":
|
1251 |
+
/*!*************************************************!*\
|
1252 |
+
!*** ./node_modules/js-cookie/src/js.cookie.js ***!
|
1253 |
+
\*************************************************/
|
1254 |
+
/*! no static exports found */
|
1255 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1256 |
+
|
1257 |
+
eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (true) {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n\n\n//# sourceURL=webpack:///./node_modules/js-cookie/src/js.cookie.js?");
|
1258 |
+
|
1259 |
+
/***/ }),
|
1260 |
+
|
1261 |
+
/***/ "./node_modules/object-assign/index.js":
|
1262 |
+
/*!*********************************************!*\
|
1263 |
+
!*** ./node_modules/object-assign/index.js ***!
|
1264 |
+
\*********************************************/
|
1265 |
+
/*! no static exports found */
|
1266 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1267 |
+
|
1268 |
+
"use strict";
|
1269 |
+
eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack:///./node_modules/object-assign/index.js?");
|
1270 |
+
|
1271 |
+
/***/ }),
|
1272 |
+
|
1273 |
+
/***/ "./node_modules/prop-types/checkPropTypes.js":
|
1274 |
+
/*!***************************************************!*\
|
1275 |
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
1276 |
+
\***************************************************/
|
1277 |
+
/*! no static exports found */
|
1278 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1279 |
+
|
1280 |
+
"use strict";
|
1281 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (undefined !== 'production') {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (undefined !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (undefined !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/checkPropTypes.js?");
|
1282 |
+
|
1283 |
+
/***/ }),
|
1284 |
+
|
1285 |
+
/***/ "./node_modules/prop-types/factoryWithThrowingShims.js":
|
1286 |
+
/*!*************************************************************!*\
|
1287 |
+
!*** ./node_modules/prop-types/factoryWithThrowingShims.js ***!
|
1288 |
+
\*************************************************************/
|
1289 |
+
/*! no static exports found */
|
1290 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1291 |
+
|
1292 |
+
"use strict";
|
1293 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithThrowingShims.js?");
|
1294 |
+
|
1295 |
+
/***/ }),
|
1296 |
+
|
1297 |
+
/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
|
1298 |
+
/*!************************************************************!*\
|
1299 |
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
1300 |
+
\************************************************************/
|
1301 |
+
/*! no static exports found */
|
1302 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1303 |
+
|
1304 |
+
"use strict";
|
1305 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (undefined !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (undefined !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (undefined !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (undefined !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n undefined !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js?");
|
1306 |
+
|
1307 |
+
/***/ }),
|
1308 |
+
|
1309 |
+
/***/ "./node_modules/prop-types/index.js":
|
1310 |
+
/*!******************************************!*\
|
1311 |
+
!*** ./node_modules/prop-types/index.js ***!
|
1312 |
+
\******************************************/
|
1313 |
+
/*! no static exports found */
|
1314 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1315 |
+
|
1316 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (undefined !== 'production') {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(/*! ./factoryWithThrowingShims */ \"./node_modules/prop-types/factoryWithThrowingShims.js\")();\n}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?");
|
1317 |
+
|
1318 |
+
/***/ }),
|
1319 |
+
|
1320 |
+
/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
1321 |
+
/*!*************************************************************!*\
|
1322 |
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
1323 |
+
\*************************************************************/
|
1324 |
+
/*! no static exports found */
|
1325 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1326 |
+
|
1327 |
+
"use strict";
|
1328 |
+
eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js?");
|
1329 |
+
|
1330 |
+
/***/ }),
|
1331 |
+
|
1332 |
+
/***/ "./node_modules/react-is/cjs/react-is.development.js":
|
1333 |
+
/*!***********************************************************!*\
|
1334 |
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
1335 |
+
\***********************************************************/
|
1336 |
+
/*! no static exports found */
|
1337 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1338 |
+
|
1339 |
+
"use strict";
|
1340 |
+
eval("/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (undefined !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-is/cjs/react-is.development.js?");
|
1341 |
+
|
1342 |
+
/***/ }),
|
1343 |
+
|
1344 |
+
/***/ "./node_modules/react-is/cjs/react-is.production.min.js":
|
1345 |
+
/*!**************************************************************!*\
|
1346 |
+
!*** ./node_modules/react-is/cjs/react-is.production.min.js ***!
|
1347 |
+
\**************************************************************/
|
1348 |
+
/*! no static exports found */
|
1349 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1350 |
+
|
1351 |
+
"use strict";
|
1352 |
+
eval("/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n\n\n//# sourceURL=webpack:///./node_modules/react-is/cjs/react-is.production.min.js?");
|
1353 |
+
|
1354 |
+
/***/ }),
|
1355 |
+
|
1356 |
+
/***/ "./node_modules/react-is/index.js":
|
1357 |
+
/*!****************************************!*\
|
1358 |
+
!*** ./node_modules/react-is/index.js ***!
|
1359 |
+
\****************************************/
|
1360 |
+
/*! no static exports found */
|
1361 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1362 |
+
|
1363 |
+
"use strict";
|
1364 |
+
eval("\n\nif (undefined === 'production') {\n module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ \"./node_modules/react-is/cjs/react-is.production.min.js\");\n} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-is/index.js?");
|
1365 |
+
|
1366 |
+
/***/ }),
|
1367 |
+
|
1368 |
+
/***/ "./node_modules/react-transition-group/esm/CSSTransition.js":
|
1369 |
+
/*!******************************************************************!*\
|
1370 |
+
!*** ./node_modules/react-transition-group/esm/CSSTransition.js ***!
|
1371 |
+
\******************************************************************/
|
1372 |
+
/*! exports provided: default */
|
1373 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1374 |
+
|
1375 |
+
"use strict";
|
1376 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var dom_helpers_addClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-helpers/addClass */ \"./node_modules/dom-helpers/esm/addClass.js\");\n/* harmony import */ var dom_helpers_removeClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom-helpers/removeClass */ \"./node_modules/dom-helpers/esm/removeClass.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/esm/Transition.js\");\n/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/esm/utils/PropTypes.js\");\n\n\n\n\n\n\n\n\n\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return Object(dom_helpers_addClass__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return Object(dom_helpers_removeClass__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is for to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n /* eslint-disable no-unused-expressions */\n node && node.scrollTop;\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_Transition__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(react__WEBPACK_IMPORTED_MODULE_6___default.a.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = undefined !== \"production\" ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _Transition__WEBPACK_IMPORTED_MODULE_7__[\"default\"].propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: _utils_PropTypes__WEBPACK_IMPORTED_MODULE_8__[\"classNamesShape\"],\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func\n}) : {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (CSSTransition);\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/CSSTransition.js?");
|
1377 |
+
|
1378 |
+
/***/ }),
|
1379 |
+
|
1380 |
+
/***/ "./node_modules/react-transition-group/esm/ReplaceTransition.js":
|
1381 |
+
/*!**********************************************************************!*\
|
1382 |
+
!*** ./node_modules/react-transition-group/esm/ReplaceTransition.js ***!
|
1383 |
+
\**********************************************************************/
|
1384 |
+
/*! exports provided: default */
|
1385 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1386 |
+
|
1387 |
+
"use strict";
|
1388 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _TransitionGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/esm/TransitionGroup.js\");\n\n\n\n\n\n\n/**\n * The `<ReplaceTransition>` component is a specialized `Transition` component\n * that animates between two children.\n *\n * ```jsx\n * <ReplaceTransition in>\n * <Fade><div>I appear first</div></Fade>\n * <Fade><div>I replace the above</div></Fade>\n * </ReplaceTransition>\n * ```\n */\n\nvar ReplaceTransition = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ReplaceTransition, _React$Component);\n\n function ReplaceTransition() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n\n _this.handleEnter = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _this.handleLifecycle('onEnter', 0, args);\n };\n\n _this.handleEntering = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return _this.handleLifecycle('onEntering', 0, args);\n };\n\n _this.handleEntered = function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return _this.handleLifecycle('onEntered', 0, args);\n };\n\n _this.handleExit = function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return _this.handleLifecycle('onExit', 1, args);\n };\n\n _this.handleExiting = function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return _this.handleLifecycle('onExiting', 1, args);\n };\n\n _this.handleExited = function () {\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n args[_key7] = arguments[_key7];\n }\n\n return _this.handleLifecycle('onExited', 1, args);\n };\n\n return _this;\n }\n\n var _proto = ReplaceTransition.prototype;\n\n _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {\n var _child$props;\n\n var children = this.props.children;\n var child = react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.toArray(children)[idx];\n if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);\n\n if (this.props[handler]) {\n var maybeNode = child.props.nodeRef ? undefined : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this);\n this.props[handler](maybeNode);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n inProp = _this$props.in,\n props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props, [\"children\", \"in\"]);\n\n var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.toArray(children),\n first = _React$Children$toArr[0],\n second = _React$Children$toArr[1];\n\n delete props.onEnter;\n delete props.onEntering;\n delete props.onEntered;\n delete props.onExit;\n delete props.onExiting;\n delete props.onExited;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_TransitionGroup__WEBPACK_IMPORTED_MODULE_5__[\"default\"], props, inProp ? react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(first, {\n key: 'first',\n onEnter: this.handleEnter,\n onEntering: this.handleEntering,\n onEntered: this.handleEntered\n }) : react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(second, {\n key: 'second',\n onEnter: this.handleExit,\n onEntering: this.handleExiting,\n onEntered: this.handleExited\n }));\n };\n\n return ReplaceTransition;\n}(react__WEBPACK_IMPORTED_MODULE_3___default.a.Component);\n\nReplaceTransition.propTypes = undefined !== \"production\" ? {\n in: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool.isRequired,\n children: function children(props, propName) {\n if (react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.count(props[propName]) !== 2) return new Error(\"\\\"\" + propName + \"\\\" must be exactly two transition components.\");\n return null;\n }\n} : {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReplaceTransition);\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/ReplaceTransition.js?");
|
1389 |
+
|
1390 |
+
/***/ }),
|
1391 |
+
|
1392 |
+
/***/ "./node_modules/react-transition-group/esm/SwitchTransition.js":
|
1393 |
+
/*!*********************************************************************!*\
|
1394 |
+
!*** ./node_modules/react-transition-group/esm/SwitchTransition.js ***!
|
1395 |
+
\*********************************************************************/
|
1396 |
+
/*! exports provided: modes, default */
|
1397 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1398 |
+
|
1399 |
+
"use strict";
|
1400 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"modes\", function() { return modes; });\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/esm/Transition.js\");\n/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TransitionGroupContext */ \"./node_modules/react-transition-group/esm/TransitionGroupContext.js\");\n\n\nvar _leaveRenders, _enterRenders;\n\n\n\n\n\n\nfunction areChildrenDifferent(oldChildren, newChildren) {\n if (oldChildren === newChildren) return false;\n\n if (react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(oldChildren) && react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(newChildren) && oldChildren.key != null && oldChildren.key === newChildren.key) {\n return false;\n }\n\n return true;\n}\n/**\n * Enum of modes for SwitchTransition component\n * @enum { string }\n */\n\n\nvar modes = {\n out: 'out-in',\n in: 'in-out'\n};\n\nvar callHook = function callHook(element, name, cb) {\n return function () {\n var _element$props;\n\n element.props[name] && (_element$props = element.props)[name].apply(_element$props, arguments);\n cb();\n };\n};\n\nvar leaveRenders = (_leaveRenders = {}, _leaveRenders[modes.out] = function (_ref) {\n var current = _ref.current,\n changeState = _ref.changeState;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(current, {\n in: false,\n onExited: callHook(current, 'onExited', function () {\n changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERING\"], null);\n })\n });\n}, _leaveRenders[modes.in] = function (_ref2) {\n var current = _ref2.current,\n changeState = _ref2.changeState,\n children = _ref2.children;\n return [current, react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, {\n in: true,\n onEntered: callHook(children, 'onEntered', function () {\n changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERING\"]);\n })\n })];\n}, _leaveRenders);\nvar enterRenders = (_enterRenders = {}, _enterRenders[modes.out] = function (_ref3) {\n var children = _ref3.children,\n changeState = _ref3.changeState;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, {\n in: true,\n onEntered: callHook(children, 'onEntered', function () {\n changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERED\"], react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, {\n in: true\n }));\n })\n });\n}, _enterRenders[modes.in] = function (_ref4) {\n var current = _ref4.current,\n children = _ref4.children,\n changeState = _ref4.changeState;\n return [react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(current, {\n in: false,\n onExited: callHook(current, 'onExited', function () {\n changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERED\"], react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, {\n in: true\n }));\n })\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, {\n in: true\n })];\n}, _enterRenders);\n/**\n * A transition component inspired by the [vue transition modes](https://vuejs.org/v2/guide/transitions.html#Transition-Modes).\n * You can use it when you want to control the render between state transitions.\n * Based on the selected mode and the child's key which is the `Transition` or `CSSTransition` component, the `SwitchTransition` makes a consistent transition between them.\n *\n * If the `out-in` mode is selected, the `SwitchTransition` waits until the old child leaves and then inserts a new child.\n * If the `in-out` mode is selected, the `SwitchTransition` inserts a new child first, waits for the new child to enter and then removes the old child.\n *\n * **Note**: If you want the animation to happen simultaneously\n * (that is, to have the old child removed and a new child inserted **at the same time**),\n * you should use\n * [`TransitionGroup`](https://reactcommunity.org/react-transition-group/transition-group)\n * instead.\n *\n * ```jsx\n * function App() {\n * const [state, setState] = useState(false);\n * return (\n * <SwitchTransition>\n * <CSSTransition\n * key={state ? \"Goodbye, world!\" : \"Hello, world!\"}\n * addEndListener={(node, done) => node.addEventListener(\"transitionend\", done, false)}\n * classNames='fade'\n * >\n * <button onClick={() => setState(state => !state)}>\n * {state ? \"Goodbye, world!\" : \"Hello, world!\"}\n * </button>\n * </CSSTransition>\n * </SwitchTransition>\n * );\n * }\n * ```\n *\n * ```css\n * .fade-enter{\n * opacity: 0;\n * }\n * .fade-exit{\n * opacity: 1;\n * }\n * .fade-enter-active{\n * opacity: 1;\n * }\n * .fade-exit-active{\n * opacity: 0;\n * }\n * .fade-enter-active,\n * .fade-exit-active{\n * transition: opacity 500ms;\n * }\n * ```\n */\n\nvar SwitchTransition = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(SwitchTransition, _React$Component);\n\n function SwitchTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.state = {\n status: _Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERED\"],\n current: null\n };\n _this.appeared = false;\n\n _this.changeState = function (status, current) {\n if (current === void 0) {\n current = _this.state.current;\n }\n\n _this.setState({\n status: status,\n current: current\n });\n };\n\n return _this;\n }\n\n var _proto = SwitchTransition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.appeared = true;\n };\n\n SwitchTransition.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.children == null) {\n return {\n current: null\n };\n }\n\n if (state.status === _Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERING\"] && props.mode === modes.in) {\n return {\n status: _Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERING\"]\n };\n }\n\n if (state.current && areChildrenDifferent(state.current, props.children)) {\n return {\n status: _Transition__WEBPACK_IMPORTED_MODULE_3__[\"EXITING\"]\n };\n }\n\n return {\n current: react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(props.children, {\n in: true\n })\n };\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n mode = _this$props.mode,\n _this$state = this.state,\n status = _this$state.status,\n current = _this$state.current;\n var data = {\n children: children,\n current: current,\n changeState: this.changeState,\n status: status\n };\n var component;\n\n switch (status) {\n case _Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERING\"]:\n component = enterRenders[mode](data);\n break;\n\n case _Transition__WEBPACK_IMPORTED_MODULE_3__[\"EXITING\"]:\n component = leaveRenders[mode](data);\n break;\n\n case _Transition__WEBPACK_IMPORTED_MODULE_3__[\"ENTERED\"]:\n component = current;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Provider, {\n value: {\n isMounting: !this.appeared\n }\n }, component);\n };\n\n return SwitchTransition;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nSwitchTransition.propTypes = undefined !== \"production\" ? {\n /**\n * Transition modes.\n * `out-in`: Current element transitions out first, then when complete, the new element transitions in.\n * `in-out`: New element transitions in first, then when complete, the current element transitions out.\n *\n * @type {'out-in'|'in-out'}\n */\n mode: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf([modes.in, modes.out]),\n\n /**\n * Any `Transition` or `CSSTransition` component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.element.isRequired])\n} : {};\nSwitchTransition.defaultProps = {\n mode: modes.out\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (SwitchTransition);\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/SwitchTransition.js?");
|
1401 |
+
|
1402 |
+
/***/ }),
|
1403 |
+
|
1404 |
+
/***/ "./node_modules/react-transition-group/esm/Transition.js":
|
1405 |
+
/*!***************************************************************!*\
|
1406 |
+
!*** ./node_modules/react-transition-group/esm/Transition.js ***!
|
1407 |
+
\***************************************************************/
|
1408 |
+
/*! exports provided: UNMOUNTED, EXITED, ENTERING, ENTERED, EXITING, default */
|
1409 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1410 |
+
|
1411 |
+
"use strict";
|
1412 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"UNMOUNTED\", function() { return UNMOUNTED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EXITED\", function() { return EXITED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENTERING\", function() { return ENTERING; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ENTERED\", function() { return ENTERED; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EXITING\", function() { return EXITING; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config */ \"./node_modules/react-transition-group/esm/config.js\");\n/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/PropTypes */ \"./node_modules/react-transition-group/esm/utils/PropTypes.js\");\n/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TransitionGroupContext */ \"./node_modules/react-transition-group/esm/TransitionGroupContext.js\");\n\n\n\n\n\n\n\n\nvar UNMOUNTED = 'unmounted';\nvar EXITED = 'exited';\nvar ENTERING = 'entering';\nvar ENTERED = 'entered';\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || _config__WEBPACK_IMPORTED_MODULE_5__[\"default\"].disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || _config__WEBPACK_IMPORTED_MODULE_5__[\"default\"].disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(react__WEBPACK_IMPORTED_MODULE_3___default.a.Component);\n\nTransition.contextType = _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\nTransition.propTypes = undefined !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n current: typeof Element === 'undefined' ? prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.any : prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.instanceOf(Element)\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_6__[\"timeoutsShape\"];\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Transition);\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/Transition.js?");
|
1413 |
+
|
1414 |
+
/***/ }),
|
1415 |
+
|
1416 |
+
/***/ "./node_modules/react-transition-group/esm/TransitionGroup.js":
|
1417 |
+
/*!********************************************************************!*\
|
1418 |
+
!*** ./node_modules/react-transition-group/esm/TransitionGroup.js ***!
|
1419 |
+
\********************************************************************/
|
1420 |
+
/*! exports provided: default */
|
1421 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1422 |
+
|
1423 |
+
"use strict";
|
1424 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TransitionGroupContext */ \"./node_modules/react-transition-group/esm/TransitionGroupContext.js\");\n/* harmony import */ var _utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/ChildMapping */ \"./node_modules/react-transition-group/esm/utils/ChildMapping.js\");\n\n\n\n\n\n\n\n\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__[\"getInitialChildMapping\"])(nextProps, handleExited) : Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__[\"getNextChildMapping\"])(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__[\"getChildMapping\"])(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: contextValue\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component);\n\nTransitionGroup.propTypes = undefined !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\n/* harmony default export */ __webpack_exports__[\"default\"] = (TransitionGroup);\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/TransitionGroup.js?");
|
1425 |
+
|
1426 |
+
/***/ }),
|
1427 |
+
|
1428 |
+
/***/ "./node_modules/react-transition-group/esm/TransitionGroupContext.js":
|
1429 |
+
/*!***************************************************************************!*\
|
1430 |
+
!*** ./node_modules/react-transition-group/esm/TransitionGroupContext.js ***!
|
1431 |
+
\***************************************************************************/
|
1432 |
+
/*! exports provided: default */
|
1433 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1434 |
+
|
1435 |
+
"use strict";
|
1436 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null));\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/TransitionGroupContext.js?");
|
1437 |
+
|
1438 |
+
/***/ }),
|
1439 |
+
|
1440 |
+
/***/ "./node_modules/react-transition-group/esm/config.js":
|
1441 |
+
/*!***********************************************************!*\
|
1442 |
+
!*** ./node_modules/react-transition-group/esm/config.js ***!
|
1443 |
+
\***********************************************************/
|
1444 |
+
/*! exports provided: default */
|
1445 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1446 |
+
|
1447 |
+
"use strict";
|
1448 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n disabled: false\n});\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/config.js?");
|
1449 |
+
|
1450 |
+
/***/ }),
|
1451 |
+
|
1452 |
+
/***/ "./node_modules/react-transition-group/esm/index.js":
|
1453 |
+
/*!**********************************************************!*\
|
1454 |
+
!*** ./node_modules/react-transition-group/esm/index.js ***!
|
1455 |
+
\**********************************************************/
|
1456 |
+
/*! exports provided: CSSTransition, ReplaceTransition, SwitchTransition, TransitionGroup, Transition, config */
|
1457 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1458 |
+
|
1459 |
+
"use strict";
|
1460 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSSTransition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CSSTransition */ \"./node_modules/react-transition-group/esm/CSSTransition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CSSTransition\", function() { return _CSSTransition__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _ReplaceTransition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ReplaceTransition */ \"./node_modules/react-transition-group/esm/ReplaceTransition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ReplaceTransition\", function() { return _ReplaceTransition__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _SwitchTransition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SwitchTransition */ \"./node_modules/react-transition-group/esm/SwitchTransition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SwitchTransition\", function() { return _SwitchTransition__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _TransitionGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TransitionGroup */ \"./node_modules/react-transition-group/esm/TransitionGroup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TransitionGroup\", function() { return _TransitionGroup__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Transition */ \"./node_modules/react-transition-group/esm/Transition.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Transition\", function() { return _Transition__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config */ \"./node_modules/react-transition-group/esm/config.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"config\", function() { return _config__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/index.js?");
|
1461 |
+
|
1462 |
+
/***/ }),
|
1463 |
+
|
1464 |
+
/***/ "./node_modules/react-transition-group/esm/utils/ChildMapping.js":
|
1465 |
+
/*!***********************************************************************!*\
|
1466 |
+
!*** ./node_modules/react-transition-group/esm/utils/ChildMapping.js ***!
|
1467 |
+
\***********************************************************************/
|
1468 |
+
/*! exports provided: getChildMapping, mergeChildMappings, getInitialChildMapping, getNextChildMapping */
|
1469 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1470 |
+
|
1471 |
+
"use strict";
|
1472 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getChildMapping\", function() { return getChildMapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mergeChildMappings\", function() { return mergeChildMappings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getInitialChildMapping\", function() { return getInitialChildMapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextChildMapping\", function() { return getNextChildMapping; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nfunction getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) react__WEBPACK_IMPORTED_MODULE_0__[\"Children\"].map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nfunction mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nfunction getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"])(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nfunction getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"])(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"])(child, {\n in: false\n });\n } else if (hasNext && hasPrev && Object(react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"])(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"])(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/utils/ChildMapping.js?");
|
1473 |
+
|
1474 |
+
/***/ }),
|
1475 |
+
|
1476 |
+
/***/ "./node_modules/react-transition-group/esm/utils/PropTypes.js":
|
1477 |
+
/*!********************************************************************!*\
|
1478 |
+
!*** ./node_modules/react-transition-group/esm/utils/PropTypes.js ***!
|
1479 |
+
\********************************************************************/
|
1480 |
+
/*! exports provided: timeoutsShape, classNamesShape */
|
1481 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1482 |
+
|
1483 |
+
"use strict";
|
1484 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"timeoutsShape\", function() { return timeoutsShape; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"classNamesShape\", function() { return classNamesShape; });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n\nvar timeoutsShape = undefined !== 'production' ? prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({\n enter: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number,\n appear: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number\n}).isRequired]) : null;\nvar classNamesShape = undefined !== 'production' ? prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({\n enter: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n active: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string\n}), prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({\n enter: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n enterDone: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n enterActive: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n exitDone: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n exitActive: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string\n})]) : null;\n\n//# sourceURL=webpack:///./node_modules/react-transition-group/esm/utils/PropTypes.js?");
|
1485 |
+
|
1486 |
+
/***/ }),
|
1487 |
+
|
1488 |
+
/***/ "./node_modules/uuid/dist/esm-browser/bytesToUuid.js":
|
1489 |
+
/*!***********************************************************!*\
|
1490 |
+
!*** ./node_modules/uuid/dist/esm-browser/bytesToUuid.js ***!
|
1491 |
+
\***********************************************************/
|
1492 |
+
/*! exports provided: default */
|
1493 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1494 |
+
|
1495 |
+
"use strict";
|
1496 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction bytesToUuid(buf, offset_) {\n var offset = offset_ || 0; // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n\n return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (bytesToUuid);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/bytesToUuid.js?");
|
1497 |
+
|
1498 |
+
/***/ }),
|
1499 |
+
|
1500 |
+
/***/ "./node_modules/uuid/dist/esm-browser/index.js":
|
1501 |
+
/*!*****************************************************!*\
|
1502 |
+
!*** ./node_modules/uuid/dist/esm-browser/index.js ***!
|
1503 |
+
\*****************************************************/
|
1504 |
+
/*! exports provided: v1, v3, v4, v5 */
|
1505 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1506 |
+
|
1507 |
+
"use strict";
|
1508 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _v1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./v1.js */ \"./node_modules/uuid/dist/esm-browser/v1.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"v1\", function() { return _v1_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _v3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v3.js */ \"./node_modules/uuid/dist/esm-browser/v3.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"v3\", function() { return _v3_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _v4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./v4.js */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"v4\", function() { return _v4_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _v5_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./v5.js */ \"./node_modules/uuid/dist/esm-browser/v5.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"v5\", function() { return _v5_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/index.js?");
|
1509 |
+
|
1510 |
+
/***/ }),
|
1511 |
+
|
1512 |
+
/***/ "./node_modules/uuid/dist/esm-browser/md5.js":
|
1513 |
+
/*!***************************************************!*\
|
1514 |
+
!*** ./node_modules/uuid/dist/esm-browser/md5.js ***!
|
1515 |
+
\***************************************************/
|
1516 |
+
/*! exports provided: default */
|
1517 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1518 |
+
|
1519 |
+
"use strict";
|
1520 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (md5);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/md5.js?");
|
1521 |
+
|
1522 |
+
/***/ }),
|
1523 |
+
|
1524 |
+
/***/ "./node_modules/uuid/dist/esm-browser/rng.js":
|
1525 |
+
/*!***************************************************!*\
|
1526 |
+
!*** ./node_modules/uuid/dist/esm-browser/rng.js ***!
|
1527 |
+
\***************************************************/
|
1528 |
+
/*! exports provided: default */
|
1529 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1530 |
+
|
1531 |
+
"use strict";
|
1532 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return rng; });\n// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nfunction rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/rng.js?");
|
1533 |
+
|
1534 |
+
/***/ }),
|
1535 |
+
|
1536 |
+
/***/ "./node_modules/uuid/dist/esm-browser/sha1.js":
|
1537 |
+
/*!****************************************************!*\
|
1538 |
+
!*** ./node_modules/uuid/dist/esm-browser/sha1.js ***!
|
1539 |
+
\****************************************************/
|
1540 |
+
/*! exports provided: default */
|
1541 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1542 |
+
|
1543 |
+
"use strict";
|
1544 |
+
eval("__webpack_require__.r(__webpack_exports__);\n// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (sha1);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/sha1.js?");
|
1545 |
+
|
1546 |
+
/***/ }),
|
1547 |
+
|
1548 |
+
/***/ "./node_modules/uuid/dist/esm-browser/v1.js":
|
1549 |
+
/*!**************************************************!*\
|
1550 |
+
!*** ./node_modules/uuid/dist/esm-browser/v1.js ***!
|
1551 |
+
\**************************************************/
|
1552 |
+
/*! exports provided: default */
|
1553 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1554 |
+
|
1555 |
+
"use strict";
|
1556 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rng_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rng.js */ \"./node_modules/uuid/dist/esm-browser/rng.js\");\n/* harmony import */ var _bytesToUuid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bytesToUuid.js */ \"./node_modules/uuid/dist/esm-browser/bytesToUuid.js\");\n\n // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || _rng_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || Object(_bytesToUuid_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(b);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (v1);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/v1.js?");
|
1557 |
+
|
1558 |
+
/***/ }),
|
1559 |
+
|
1560 |
+
/***/ "./node_modules/uuid/dist/esm-browser/v3.js":
|
1561 |
+
/*!**************************************************!*\
|
1562 |
+
!*** ./node_modules/uuid/dist/esm-browser/v3.js ***!
|
1563 |
+
\**************************************************/
|
1564 |
+
/*! exports provided: default */
|
1565 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1566 |
+
|
1567 |
+
"use strict";
|
1568 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _v35_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./v35.js */ \"./node_modules/uuid/dist/esm-browser/v35.js\");\n/* harmony import */ var _md5_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./md5.js */ \"./node_modules/uuid/dist/esm-browser/md5.js\");\n\n\nvar v3 = Object(_v35_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('v3', 0x30, _md5_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (v3);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/v3.js?");
|
1569 |
+
|
1570 |
+
/***/ }),
|
1571 |
+
|
1572 |
+
/***/ "./node_modules/uuid/dist/esm-browser/v35.js":
|
1573 |
+
/*!***************************************************!*\
|
1574 |
+
!*** ./node_modules/uuid/dist/esm-browser/v35.js ***!
|
1575 |
+
\***************************************************/
|
1576 |
+
/*! exports provided: DNS, URL, default */
|
1577 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1578 |
+
|
1579 |
+
"use strict";
|
1580 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DNS\", function() { return DNS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"URL\", function() { return URL; });\n/* harmony import */ var _bytesToUuid_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bytesToUuid.js */ \"./node_modules/uuid/dist/esm-browser/bytesToUuid.js\");\n\n\nfunction uuidToBytes(uuid) {\n // Note: We assume we're being passed a valid uuid string\n var bytes = [];\n uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {\n bytes.push(parseInt(hex, 16));\n });\n return bytes;\n}\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nvar DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nvar URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = uuidToBytes(namespace);\n }\n\n if (!Array.isArray(value)) {\n throw TypeError('value must be an array of bytes');\n }\n\n if (!Array.isArray(namespace) || namespace.length !== 16) {\n throw TypeError('namespace must be uuid string or an Array of 16 byte values');\n } // Per 4.3\n\n\n var bytes = hashfunc(namespace.concat(value));\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return Object(_bytesToUuid_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n});\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/v35.js?");
|
1581 |
+
|
1582 |
+
/***/ }),
|
1583 |
+
|
1584 |
+
/***/ "./node_modules/uuid/dist/esm-browser/v4.js":
|
1585 |
+
/*!**************************************************!*\
|
1586 |
+
!*** ./node_modules/uuid/dist/esm-browser/v4.js ***!
|
1587 |
+
\**************************************************/
|
1588 |
+
/*! exports provided: default */
|
1589 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1590 |
+
|
1591 |
+
"use strict";
|
1592 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _rng_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rng.js */ \"./node_modules/uuid/dist/esm-browser/rng.js\");\n/* harmony import */ var _bytesToUuid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bytesToUuid.js */ \"./node_modules/uuid/dist/esm-browser/bytesToUuid.js\");\n\n\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || _rng_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return Object(_bytesToUuid_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(rnds);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (v4);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/v4.js?");
|
1593 |
+
|
1594 |
+
/***/ }),
|
1595 |
+
|
1596 |
+
/***/ "./node_modules/uuid/dist/esm-browser/v5.js":
|
1597 |
+
/*!**************************************************!*\
|
1598 |
+
!*** ./node_modules/uuid/dist/esm-browser/v5.js ***!
|
1599 |
+
\**************************************************/
|
1600 |
+
/*! exports provided: default */
|
1601 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1602 |
+
|
1603 |
+
"use strict";
|
1604 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _v35_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./v35.js */ \"./node_modules/uuid/dist/esm-browser/v35.js\");\n/* harmony import */ var _sha1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sha1.js */ \"./node_modules/uuid/dist/esm-browser/sha1.js\");\n\n\nvar v5 = Object(_v35_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('v5', 0x50, _sha1_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (v5);\n\n//# sourceURL=webpack:///./node_modules/uuid/dist/esm-browser/v5.js?");
|
1605 |
+
|
1606 |
+
/***/ }),
|
1607 |
+
|
1608 |
+
/***/ "@babel/runtime/regenerator":
|
1609 |
+
/*!**********************************************!*\
|
1610 |
+
!*** external {"this":"regeneratorRuntime"} ***!
|
1611 |
+
\**********************************************/
|
1612 |
+
/*! no static exports found */
|
1613 |
+
/***/ (function(module, exports) {
|
1614 |
+
|
1615 |
+
eval("(function() { module.exports = this[\"regeneratorRuntime\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22regeneratorRuntime%22%7D?");
|
1616 |
+
|
1617 |
+
/***/ }),
|
1618 |
+
|
1619 |
+
/***/ "@wordpress/api-fetch":
|
1620 |
+
/*!*******************************************!*\
|
1621 |
+
!*** external {"this":["wp","apiFetch"]} ***!
|
1622 |
+
\*******************************************/
|
1623 |
+
/*! no static exports found */
|
1624 |
+
/***/ (function(module, exports) {
|
1625 |
+
|
1626 |
+
eval("(function() { module.exports = this[\"wp\"][\"apiFetch\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22apiFetch%22%5D%7D?");
|
1627 |
+
|
1628 |
+
/***/ }),
|
1629 |
+
|
1630 |
+
/***/ "@wordpress/block-editor":
|
1631 |
+
/*!**********************************************!*\
|
1632 |
+
!*** external {"this":["wp","blockEditor"]} ***!
|
1633 |
+
\**********************************************/
|
1634 |
+
/*! no static exports found */
|
1635 |
+
/***/ (function(module, exports) {
|
1636 |
+
|
1637 |
+
eval("(function() { module.exports = this[\"wp\"][\"blockEditor\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22blockEditor%22%5D%7D?");
|
1638 |
+
|
1639 |
+
/***/ }),
|
1640 |
+
|
1641 |
+
/***/ "@wordpress/blocks":
|
1642 |
+
/*!*****************************************!*\
|
1643 |
+
!*** external {"this":["wp","blocks"]} ***!
|
1644 |
+
\*****************************************/
|
1645 |
+
/*! no static exports found */
|
1646 |
+
/***/ (function(module, exports) {
|
1647 |
+
|
1648 |
+
eval("(function() { module.exports = this[\"wp\"][\"blocks\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22blocks%22%5D%7D?");
|
1649 |
+
|
1650 |
+
/***/ }),
|
1651 |
+
|
1652 |
+
/***/ "@wordpress/components":
|
1653 |
+
/*!*********************************************!*\
|
1654 |
+
!*** external {"this":["wp","components"]} ***!
|
1655 |
+
\*********************************************/
|
1656 |
+
/*! no static exports found */
|
1657 |
+
/***/ (function(module, exports) {
|
1658 |
+
|
1659 |
+
eval("(function() { module.exports = this[\"wp\"][\"components\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22components%22%5D%7D?");
|
1660 |
+
|
1661 |
+
/***/ }),
|
1662 |
+
|
1663 |
+
/***/ "@wordpress/compose":
|
1664 |
+
/*!******************************************!*\
|
1665 |
+
!*** external {"this":["wp","compose"]} ***!
|
1666 |
+
\******************************************/
|
1667 |
+
/*! no static exports found */
|
1668 |
+
/***/ (function(module, exports) {
|
1669 |
+
|
1670 |
+
eval("(function() { module.exports = this[\"wp\"][\"compose\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22compose%22%5D%7D?");
|
1671 |
+
|
1672 |
+
/***/ }),
|
1673 |
+
|
1674 |
+
/***/ "@wordpress/data":
|
1675 |
+
/*!***************************************!*\
|
1676 |
+
!*** external {"this":["wp","data"]} ***!
|
1677 |
+
\***************************************/
|
1678 |
+
/*! no static exports found */
|
1679 |
+
/***/ (function(module, exports) {
|
1680 |
+
|
1681 |
+
eval("(function() { module.exports = this[\"wp\"][\"data\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22data%22%5D%7D?");
|
1682 |
+
|
1683 |
+
/***/ }),
|
1684 |
+
|
1685 |
+
/***/ "@wordpress/element":
|
1686 |
+
/*!******************************************!*\
|
1687 |
+
!*** external {"this":["wp","element"]} ***!
|
1688 |
+
\******************************************/
|
1689 |
+
/*! no static exports found */
|
1690 |
+
/***/ (function(module, exports) {
|
1691 |
+
|
1692 |
+
eval("(function() { module.exports = this[\"wp\"][\"element\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22element%22%5D%7D?");
|
1693 |
+
|
1694 |
+
/***/ }),
|
1695 |
+
|
1696 |
+
/***/ "@wordpress/html-entities":
|
1697 |
+
/*!***********************************************!*\
|
1698 |
+
!*** external {"this":["wp","htmlEntities"]} ***!
|
1699 |
+
\***********************************************/
|
1700 |
+
/*! no static exports found */
|
1701 |
+
/***/ (function(module, exports) {
|
1702 |
+
|
1703 |
+
eval("(function() { module.exports = this[\"wp\"][\"htmlEntities\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22htmlEntities%22%5D%7D?");
|
1704 |
+
|
1705 |
+
/***/ }),
|
1706 |
+
|
1707 |
+
/***/ "@wordpress/i18n":
|
1708 |
+
/*!***************************************!*\
|
1709 |
+
!*** external {"this":["wp","i18n"]} ***!
|
1710 |
+
\***************************************/
|
1711 |
+
/*! no static exports found */
|
1712 |
+
/***/ (function(module, exports) {
|
1713 |
+
|
1714 |
+
eval("(function() { module.exports = this[\"wp\"][\"i18n\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%5B%22wp%22,%22i18n%22%5D%7D?");
|
1715 |
+
|
1716 |
+
/***/ }),
|
1717 |
+
|
1718 |
+
/***/ "lodash":
|
1719 |
+
/*!**********************************!*\
|
1720 |
+
!*** external {"this":"lodash"} ***!
|
1721 |
+
\**********************************/
|
1722 |
+
/*! no static exports found */
|
1723 |
+
/***/ (function(module, exports) {
|
1724 |
+
|
1725 |
+
eval("(function() { module.exports = this[\"lodash\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22lodash%22%7D?");
|
1726 |
+
|
1727 |
+
/***/ }),
|
1728 |
+
|
1729 |
+
/***/ "react":
|
1730 |
+
/*!*********************************!*\
|
1731 |
+
!*** external {"this":"React"} ***!
|
1732 |
+
\*********************************/
|
1733 |
+
/*! no static exports found */
|
1734 |
+
/***/ (function(module, exports) {
|
1735 |
+
|
1736 |
+
eval("(function() { module.exports = this[\"React\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22React%22%7D?");
|
1737 |
+
|
1738 |
+
/***/ }),
|
1739 |
+
|
1740 |
+
/***/ "react-dom":
|
1741 |
+
/*!************************************!*\
|
1742 |
+
!*** external {"this":"ReactDOM"} ***!
|
1743 |
+
\************************************/
|
1744 |
+
/*! no static exports found */
|
1745 |
+
/***/ (function(module, exports) {
|
1746 |
+
|
1747 |
+
eval("(function() { module.exports = this[\"ReactDOM\"]; }());\n\n//# sourceURL=webpack:///external_%7B%22this%22:%22ReactDOM%22%7D?");
|
1748 |
+
|
1749 |
+
/***/ })
|
1750 |
+
|
1751 |
+
/******/ })));
|
build/poll.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '0106967ae74f428a0847fa5eee92cd41');
|
build/poll.js
CHANGED
@@ -1,13 +1,1022 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var a=window.Cookies,c=window.Cookies=i();c.noConflict=function(){return window.Cookies=a,c}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(l){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in i)i[s]&&(c+="; "+s,!0!==i[s]&&(c+="="+i[s].split(";")[0]));return document.cookie=t+"="+n+c}}function a(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),s=c.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var l=t(c[0]);if(s=(r.read||r)(s,l)||t(s),n)try{s=JSON.parse(s)}catch(u){}if(o[l]=s,e===l)break}catch(u){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(18);e.exports=function(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}}),t&&r(e,t)}},function(e,t,n){var r=n(23);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){var r=n(34),o=n(35),i=n(36),a=n(37),c=n(38),s=n(39),l=n(40);l.alea=r,l.xor128=o,l.xorwow=i,l.xorshift7=a,l.xor4096=c,l.tychei=s,e.exports=l},function(e,t,n){var r=n(45);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(48),o=n(49);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(16),o=n(18),i=n(50),a=n(51);function c(t){var n="function"==typeof Map?new Map:void 0;return e.exports=c=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},c(t)}e.exports=c},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.ReactDOM}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function c(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var n=new a(e),r=t&&t.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+11102230246251565e-32*(2097152*o()|0)},o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.alea=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor128=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function c(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorwow=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function c(e,t){return t.x=e.x.slice(),t.i=e.i,t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.x&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xorshift7=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,a,c=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),o=0,i=-32;i<s;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(a=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(a=a+1640531527|0,o=0==(n=c[127&i]^=r+a)?o+1:0);for(o>=128&&(c[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=c[o+34&127],n=c[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,c[o]=r^n;e.w=a,e.X=c,e.i=o}(t,e)}function c(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function s(e,t){null==e&&(e=+new Date);var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.X&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.xor4096=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function c(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function s(e,t){var n=new a(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&c(r,n),o.state=function(){return c(n,{})}),o}o&&o.exports?o.exports=s:n(9)&&n(13)?void 0===(r=function(){return s}.call(t,n,t,o))||(o.exports=r):this.tychei=s}(0,e,n(9))}).call(this,n(12)(e))},function(e,t,n){var r;!function(o,i,a){var c,s=a.pow(256,6),l=a.pow(2,52),u=2*l;function f(e,t,n){var r=[],f=m(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(a){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,b(i)]:null==e?function(){try{var e;return c&&(e=c.randomBytes)?e=e(256):(e=new Uint8Array(256),(o.crypto||o.msCrypto).getRandomValues(e)),b(e)}catch(r){var t=o.navigator,n=t&&t.plugins;return[+new Date,o,n,o.screen,b(i)]}}():e,3),r),h=new d(r),w=function(){for(var e=h.g(6),t=s,n=0;e<l;)e=256*(e+n),t*=256,n=h.g(1);for(;e>=u;)e/=2,t/=2,n>>>=1;return(e+n)/t};return w.int32=function(){return 0|h.g(4)},w.quick=function(){return h.g(4)/4294967296},w.double=w,m(b(h.S),i),(t.pass||n||function(e,t,n,r){return r&&(r.S&&p(r,h),e.state=function(){return p(h,{})}),n?(a.random=e,t):e})(w,f,"global"in t?t.global:this==a,t.state)}function d(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);o<256;)a[o]=o++;for(o=0;o<256;o++)a[o]=a[i=255&i+e[o%n]+(t=a[o])],a[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,a=r.S;e--;)t=a[o=255&o+1],n=256*n+a[255&(a[o]=a[i=255&i+t])+(a[i]=t)];return r.i=o,r.j=i,n})(256)}function p(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function m(e,t){for(var n,r=e+"",o=0;o<r.length;)t[255&o]=255&(n^=19*t[255&o])+r.charCodeAt(o++);return b(t)}function b(e){return String.fromCharCode.apply(0,e)}if(m(a.random(),i),e.exports){e.exports=f;try{c=n(41)}catch(h){}}else void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof self?self:this,[],Math)},function(e,t){},function(e,t,n){var r=n(23);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(47);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}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:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(18),o=n(52);function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t,n){"use strict";n.r(t);var r,o=n(0),i=n(3),a=n(14),c=n.n(a),s=n(2),l=n.n(s),u=n(7),f=n.n(u),d=n(10),p=n.n(d),m=n(6),b=n.n(m),h=n(24),w=n.n(h),O=n(1),v=n(8),g=n.n(v),y=n(11),x=n(5),j=n(15),L=n.n(j),E=(n(19),Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"})),C=Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"}),S=Object.freeze([C.CABIN,C.CHIVO,C.OPEN_SANS,C.FIRA_SANS,C.ROBOTO,C.NUNITO,C.OVERPASS,C.LATO,C.LIBRE_FRANKLIN,C.MONTSERRAT,C.POPPINS,C.RUBIK,C.RALEWAY,C.JOSEFIN_SANS,C.ALEGREYA_SANS,C.OSWALD]),_=Object.freeze((r={},l()(r,C.THEME_DEFAULT,null),l()(r,C.GEORGIA,"Georgia, serif"),l()(r,C.PALATINO,'"Palatino Linotype", "Book Antiqua", Palatino, serif'),l()(r,C.TIMES_NEW_ROMAN,'"Times New Roman", Times, serif'),l()(r,C.ARIAL,"Arial, Helvetica, sans-serif"),l()(r,C.IMPACT,"Impact, Charcoal, sans-serif"),l()(r,C.LUCIDA,'"Lucida Sans Unicode", "Lucida Grande", sans-serif'),l()(r,C.TAHOMA,"Tahoma, Geneva, sans-serif"),l()(r,C.TREBUCHET,'"Trebuchet MS", Helvetica, sans-serif'),l()(r,C.VERDANA,"Verdana, Geneva, sans-serif"),l()(r,C.COURIER,'"Courier New", Courier, monospace'),l()(r,C.CABIN,'"Cabin", sans-serif'),l()(r,C.CHIVO,'"Chivo", sans-serif'),l()(r,C.OPEN_SANS,'"Open Sans", sans-serif'),l()(r,C.FIRA_SANS,'"Fira Sans", sans-serif'),l()(r,C.ROBOTO,'"Roboto", sans-serif'),l()(r,C.NUNITO,'"Nunito", sans-serif'),l()(r,C.OVERPASS,'"Overpass", sans-serif'),l()(r,C.LATO,'"Lato", sans-serif'),l()(r,C.LIBRE_FRANKLIN,'"Libre Franklin", sans-serif'),l()(r,C.MONTSERRAT,'"Montserrat", sans-serif'),l()(r,C.POPPINS,'"Poppins", sans-serif'),l()(r,C.RUBIK,'"Rubik", sans-serif'),l()(r,C.RALEWAY,'"Raleway", sans-serif'),l()(r,C.JOSEFIN_SANS,'"Josefin Sans", sans-serif'),l()(r,C.ALEGREYA_SANS,'"Alegreya Sans", sans-serif'),l()(r,C.OSWALD,'"Oswald", sans-serif'),r)),N=Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}),A=Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),k=(Object.freeze({CONNECTED:"connected",NOT_CONNECTED:"not-connected",NOT_VERIFIED:"not-verified"}),Object.freeze({RADIO:"radio",BUTTON:"button"})),R=Object.freeze({LIST:"list",INLINE:"inline"}),T=function(e){return Object(O.includes)(C,e)?_[e]:null},I=function(e){return!e||"string"!=typeof e||-1===e.indexOf("rgb")&&0!==e.indexOf("#")||-1<e.indexOf("rgba")?null:(0===e.indexOf("#")&&(e=M(e)),e.match(/\((.*?)\)/)[1])},M=function(e){var t=0,n=0,r=0,o=4===e.length?"#".concat(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]):e;return 7===o.length&&(t=parseInt(o.substr(1,2),16)||0,n=parseInt(o.substr(3,2),16)||0,r=parseInt(o.substr(5,2),16)||0),"rgb(".concat(t,", ").concat(n,", ").concat(r,")")},P=n(25),F=n.n(P),D=n(26),B=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms__style-probe"},t)},U=function(e){var t=e.hasVoted,n=e.isPollClosed,r=e.isPollHidden,i=e.showSubmitMessage,a=g()({"is-transparent":i},"crowdsignal-forms-poll__closed-banner");return Object(o.createElement)("div",{className:a},r&&Object(x.__)("This Poll is Hidden","crowdsignal-forms"),n&&!r&&Object(x.__)("This Poll is Closed","crowdsignal-forms"),t&&Object(x.__)("Thanks For Voting!","crowdsignal-forms"))},Z=n(4),V=n.n(Z),q=n(17),W=n.n(q),H=n(20),z=n.n(H),G=n(21),Y=n.n(G),K=n(27),J=n.n(K),X=n(16),Q=n.n(X),$=n(28),ee=n.n($);n(29);function te(e){return function(){var t,n=Q()(e);if(ne()){var r=Q()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return J()(this,t)}}function ne(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var re=function(){var e=p()(f.a.mark((function e(t){var n,r,o=arguments;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(o.length>1&&void 0!==o[1])||o[1],r="https://api.crowdsignal.com/v3/polls",n){e.next=4;break}return e.abrupt("return",null);case 4:return e.abrupt("return",window.fetch("".concat(r,"/").concat(t,"/results"),{method:"GET",headers:{"content-type":"application/json"}}).then((function(e){if(e.status>=200&&e.status<300)return e.json();throw e})).then((function(e){if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=p()(f.a.mark((function e(t){var n,r,o;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"5430eeac3911395001d731d9702fc38b",n=(new Date).getTime(),e.next=4,window.fetch("https://polldaddy.com/n/".concat("5430eeac3911395001d731d9702fc38b","/").concat(t,"?").concat(n,"&format=json"));case 4:if((r=e.sent).ok){e.next=7;break}throw new ce;case 7:return e.next=9,r.json();case 9:if((o=e.sent).nonce){e.next=12;break}throw new ce;case 12:return e.abrupt("return",o.nonce);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=p()(f.a.mark((function e(t,n,r,o){var i,a,c;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.join(","),e.next=3,window.fetch("https://polls.polldaddy.com/vote-js.php?format=json&p=".concat(n,"&b=1&a=").concat(i,"&o=&va=16&cookie=0&n=").concat(t,"&url=").concat(encodeURIComponent(window.location),"&vi=").concat(o));case 3:if((a=e.sent).ok){e.next=6;break}throw new ce;case 6:return e.next=8,a.json();case 8:if("error"!==(c=e.sent).status){e.next=11;break}throw new ae(c.error);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),ae=function(e){Y()(n,e);var t=te(n);function n(){return z()(this,n),t.apply(this,arguments)}return n}(ee()(Error)),ce=function(e){Y()(n,e);var t=te(n);function n(){return z()(this,n),t.call(this,Object(x.__)("Server error. Please try again.","crowdsignal-forms"))}return n}(ae),se=function(e,t){var n=Object(i.useState)(null),r=b()(n,2),o=r[0],a=r[1],c=Object(i.useState)(null),s=b()(c,2),l=s[0],u=s[1],f=Object(i.useState)(!0),d=b()(f,2),p=d[0],m=d[1];return Object(i.useEffect)((function(){m(!0),u(null),a(null),e().then(a).catch(u).finally((function(){return m(!1)}))}),t),{data:o,error:l,loading:p}},le=function(e){var t=e.error,n=e.loading,r=e.text,i=e.totalVotes,a=e.votes,c=g()("crowdsignal-forms-poll__answer-results",{"is-error":t,"is-loading":n}),s=!n&&!t,l=0===i?0:100*a/i,u={width:"".concat(parseInt(l,10),"%")};return Object(o.createElement)("div",{className:c},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-labels"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-answer"},Object(y.decodeEntities)(r)),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-votes"},s&&Object(x.sprintf)(Object(x._n)("%s vote","%s votes",a,"crowdsignal-forms"),a.toLocaleString())),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-results-percent"},s&&"".concat(l.toFixed(2),"%"))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-track"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-results-progress-bar",style:u})))};le.propTypes={loading:V.a.bool,text:V.a.string.isRequired,totalVotes:V.a.number,votes:V.a.number};var ue=le,fe=function(e){var t=e.showLogo;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__footer-branding"},Object(o.createElement)("a",{className:"crowdsignal-forms-poll__footer-cs-link",href:"https://crowdsignal.com?ref=cs-forms-poll",target:"_blank",rel:"noopener noreferrer"},Object(x.__)("Create your own poll with Crowdsignal","crowdsignal-forms")),t&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__footer-branding-logo",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"}))};var de=function(e){var t=e.answers,n=e.pollIdFromApi,r=e.setErrorMessage,a=e.hideBranding,c=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=se((function(){return re(e,t)}),[e]),r=n.data,o=n.error,i=n.loading;return{error:o,loading:i,results:r}}(n),s=c.error,l=c.loading,u=c.results;Object(i.useEffect)((function(){r(s?Object(x.__)("Unfortunately, we're having some trouble retrieving the results for this poll at this time.","crowdsignal-forms"):"")}),[s]);var f=g()("crowdsignal-forms-poll__results",{"is-error":!!s,"is-loading":l}),d=Object(O.sum)(Object(O.values)(u));return Object(o.createElement)("div",{className:f},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-list"},Object(O.map)(t,(function(e){var t;return!function(e){return Object(O.isEmpty)(e)||void 0===e.text||null===e.text||""===e.text}(e)&&Object(o.createElement)(ue,{key:e.answerId,error:!!s,loading:l,text:e.text,totalVotes:d,votes:u&&null!==(t=u[e.answerIdFromApi])&&void 0!==t?t:0})}))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__results-footer"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__results-total"},Object(x.sprintf)(Object(x._n)("%s total vote","%s total votes",d,"crowdsignal-forms"),d?d.toLocaleString():0)),!a&&Object(o.createElement)(fe,null)))};de.propTypes={pollIdFromApi:V.a.number,answers:V.a.arrayOf(V.a.shape({answerId:V.a.string.isRequired,answerIdFromApi:V.a.number,text:V.a.string})).isRequired,setErrorMessage:V.a.func.isRequired,hideBranding:V.a.bool};var pe=de,me=function(e){var t=e.answerIdFromApi,n=e.answerStyle,r=e.hasVoted,i=e.isMultipleChoice,a=e.isSelected,c=e.isVoting,s=e.isFocused,l=e.onSelect,u=e.onFocus,f=e.text,d=function(e){return l(parseInt(e.target.attributes.answerid.value,10))},p=function(e){return u(parseInt(e.target.attributes.answerid.value,10))},m=function(e){e.preventDefault(),d(e)},b=g()("crowdsignal-forms-poll__answer",{"is-multiple-choice":i,"is-selected":a,"is-focused":s,"is-button":k.BUTTON===n}),h="poll-answer-".concat(t);return Object(o.createElement)("div",{className:b},k.RADIO===n&&Object(o.createElement)("label",{className:b,htmlFor:h,tabIndex:"-1"},Object(o.createElement)("input",{className:"crowdsignal-forms-poll__input",id:h,name:"answer",onChange:d,selected:a,type:i?"checkbox":"radio",answerid:t,disabled:r||c,tabIndex:"0","aria-label":f,onFocus:p}),Object(o.createElement)("span",{className:"crowdsignal-forms-poll__check"}),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__answer-label-wrapper"},Object(o.createElement)("span",{className:"crowdsignal-forms-poll__answer-label"},Object(y.decodeEntities)(f)))),k.BUTTON===n&&Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",value:Object(y.decodeEntities)(f),answerid:t,onClick:m})))};me.propTypes={answerIdFromApi:V.a.number.isRequired,hasVoted:V.a.bool,isMultipleChoice:V.a.bool,isSelected:V.a.bool,isVoting:V.a.bool,onSelect:V.a.func.isRequired,text:V.a.string.isRequired};var be=me,he=function(e){var t=e.answers,n=e.answerStyle,r=e.buttonAlignment,a=e.hasVoted,s=e.isMultipleChoice,l=e.isVoting,u=e.onSubmit,f=e.submitButtonLabel,d=e.hideBranding,p=Object(i.useState)([]),m=b()(p,2),h=m[0],w=m[1],v=function(e){return k.BUTTON===n?(w([e]),u([e])):s?Object(O.includes)(h,e)?w(Object(O.without)(h,e)):void w([].concat(L()(h),[e])):w([e])},y=Object(i.useState)([]),x=b()(y,2),j=x[0],E=x[1],C=function(e){return E([e])},S=g()({"is-button":k.BUTTON===n,"is-inline-button-alignment":R.INLINE===r},"crowdsignal-forms-poll__options");return Object(o.createElement)("form",{className:"crowdsignal-forms-poll__form",onSubmit:function(e){e.preventDefault(),u(h)}},Object(o.createElement)("div",{className:S},Object(O.map)(t,(function(e,t){return Object(o.createElement)(be,c()({key:"poll-answer-".concat(t),answerStyle:n,isMultipleChoice:s,isSelected:Object(O.includes)(h,e.answerIdFromApi),isFocused:Object(O.includes)(j,e.answerIdFromApi),onSelect:v,onFocus:C,hasVoted:a,isVoting:l},e))}))),!a&&k.RADIO===n&&Object(o.createElement)("div",{className:"crowdsignal-forms-poll__actions"},Object(o.createElement)("div",{className:"wp-block-button crowdsignal-forms-poll__block-button"},Object(o.createElement)("input",{type:"submit",className:"wp-block-button__link crowdsignal-forms-poll__submit-button",disabled:l||!h.length,value:f}))),!d&&Object(o.createElement)("div",{className:"wp_block-crowdsignal-forms-poll__vote-branding"},Object(o.createElement)(fe,{showLogo:!1})))};he.propTypes={answers:V.a.array.isRequired,isMultipleChoice:V.a.bool,onSubmit:V.a.func.isRequired,submitButtonLabel:V.a.string.isRequired};var we=he,Oe=function(e){for(var t=window.getComputedStyle(e).backgroundColor;"rgba(0, 0, 0, 0)"===t&&e.parentNode&&e.parentNode.nodeType===window.Node.ELEMENT_NODE;)e=e.parentNode,t=window.getComputedStyle(e).backgroundColor;return t},ve=function(e){var t=e.children;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__error-banner"},t)},ge=function(){return Object(o.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{d:"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",fill:"white"}),Object(o.createElement)("mask",{id:"maskClose","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"5",y:"5",width:"14",height:"14"},Object(o.createElement)("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"white"})),Object(o.createElement)("g",{mask:"url(#maskClose)"},Object(o.createElement)("rect",{width:"24",height:"24",fill:"black"})))},ye=function(){return Object(o.createElement)("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z",fill:"var(--crowdsignal-forms-submit-button-bg-color)"}),Object(o.createElement)("mask",{id:"maskCheck","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"34",height:"34"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z"})),Object(o.createElement)("g",{mask:"url(#maskCheck)"}))},xe=function(e){var t=e.className;return Object(o.createElement)("svg",{width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},Object(o.createElement)("g",{filter:"url(#filterThankYou)"},Object(o.createElement)("path",{d:"M44 80C66.0914 80 84 62.0914 84 40C84 17.9086 66.0914 0 44 0C21.9086 0 4 17.9086 4 40C4 62.0914 21.9086 80 44 80Z",fill:"#384869"}),Object(o.createElement)("path",{d:"M26.0226 27.1047L27.2135 22.9517L28.6403 23.3609L29.0032 22.0954L24.5573 20.8206L24.1945 22.086L25.6214 22.4952L24.4305 26.6481L26.0226 27.1047ZM33.0856 29.1299L34.6393 23.7116L33.0472 23.2551L32.4572 25.3128L30.5497 24.7658L31.1397 22.7081L29.5476 22.2516L27.9939 27.6699L29.586 28.1265L30.1868 26.0312L32.0943 26.5782L31.4935 28.6734L33.0856 29.1299ZM37.4113 30.3703L39.1085 30.857L38.8937 24.9315L36.896 24.3587L33.5738 29.2699L35.1959 29.7351L35.7865 28.7381L37.4387 29.2119L37.4113 30.3703ZM37.4837 25.8804L37.5138 25.889L37.4715 28.0063L36.3976 27.6983L37.4837 25.8804ZM41.0986 31.4276L41.9169 28.5739L41.947 28.5825L43.2352 32.0403L44.4556 32.3902L46.0092 26.9719L44.5073 26.5412L43.7019 29.3499L43.6719 29.3412L42.3857 25.9328L41.1504 25.5786L39.5967 30.997L41.0986 31.4276ZM46.7986 33.0621L47.2056 31.6427L47.7936 31.1936L48.4057 33.5229L50.2569 34.0537L49.2542 30.5072L51.728 28.6117L50.0571 28.1325L47.7234 29.9504L47.6934 29.9417L48.3523 27.6437L46.7602 27.1872L45.2065 32.6056L46.7986 33.0621ZM55.281 35.4944L55.7731 33.7784L58.6859 30.6068L57.0225 30.1298L55.4426 32.0541L55.4125 32.0455L55.0924 29.5764L53.3914 29.0887L54.181 33.3218L53.6889 35.0378L55.281 35.4944ZM61.4239 31.2903C59.7492 30.8101 58.3861 31.5815 57.8897 33.3125C57.3934 35.0435 58.1379 36.4152 59.8163 36.8964C61.491 37.3767 62.853 36.6091 63.3494 34.878C63.8458 33.147 63.0986 31.7705 61.4239 31.2903ZM61.0599 32.5595C61.7246 32.7501 61.9964 33.4742 61.7273 34.4129C61.4592 35.3479 60.8486 35.8189 60.1803 35.6273C59.5119 35.4356 59.2438 34.7126 59.5119 33.7776C59.781 32.8389 60.3953 32.3689 61.0599 32.5595ZM66.3384 32.8012L64.7463 32.3446L63.7461 35.833C63.3918 37.0683 64.1232 38.1314 65.5539 38.5417C66.9845 38.9519 68.1681 38.4379 68.5223 37.2025L69.5226 33.7142L67.9305 33.2577L66.9809 36.5695C66.8172 37.1403 66.4462 37.3712 65.9318 37.2237C65.4174 37.0762 65.2251 36.6838 65.3888 36.113L66.3384 32.8012ZM36.4693 42.5838L37.0195 40.665L39.0246 41.24L39.367 40.0459L37.3619 39.4709L37.6601 38.4308L39.8755 39.0661L40.2384 37.8007L36.4309 36.7089L34.8772 42.1273L36.4693 42.5838ZM43.4269 38.6134C41.7522 38.1332 40.3892 38.9045 39.8928 40.6356C39.3964 42.3666 40.141 43.7382 41.8194 44.2195C43.4941 44.6997 44.8561 43.9321 45.3525 42.2011C45.8488 40.4701 45.1016 39.0936 43.4269 38.6134ZM43.063 39.8826C43.7276 40.0731 43.9995 40.7972 43.7303 41.7359C43.4622 42.6709 42.8517 43.142 42.1833 42.9503C41.515 42.7587 41.2468 42.0357 41.5149 41.1007C41.7841 40.162 42.3984 39.692 43.063 39.8826ZM48.0045 41.2995L48.6654 41.489C49.0934 41.6117 49.2996 41.9838 49.1844 42.3856C49.0671 42.7948 48.7144 42.9904 48.2675 42.8622L47.6104 42.6738L48.0045 41.2995ZM47.3089 43.7252L47.8309 43.8748L48.1659 45.9377L49.9457 46.4481L49.5058 44.0991C50.1503 43.9913 50.6348 43.4638 50.8179 42.8255C51.1506 41.6652 50.602 40.7724 49.1563 40.3579L46.7494 39.6677L45.1957 45.086L46.7878 45.5426L47.3089 43.7252ZM26.5905 52.2347L29.7888 47.2879L28.0315 46.784L26.0433 50.4442L26.0133 50.4356L26.2667 46.278L24.4343 45.7525L24.5253 51.6425L26.5905 52.2347ZM32.7521 48.036C31.0774 47.5558 29.7143 48.3272 29.218 50.0582C28.7216 51.7892 29.4661 53.1608 31.1446 53.6421C32.8193 54.1223 34.1813 53.3547 34.6776 51.6237C35.174 49.8927 34.4268 48.5162 32.7521 48.036ZM32.3882 49.3052C33.0528 49.4958 33.3247 50.2199 33.0555 51.1586C32.7874 52.0936 32.1769 52.5646 31.5085 52.373C30.8401 52.1813 30.572 51.4583 30.8401 50.5233C31.1093 49.5846 31.7236 49.1146 32.3882 49.3052ZM37.0705 55.2398L38.2613 51.0868L39.6882 51.496L40.0511 50.2306L35.6052 48.9557L35.2424 50.2211L36.6692 50.6303L35.4784 54.7832L37.0705 55.2398ZM40.6339 56.2616L42.1876 50.8432L40.5955 50.3867L39.0418 55.805L40.6339 56.2616ZM42.8869 56.9076L43.7052 54.0538L43.7352 54.0625L45.0234 57.5202L46.2438 57.8702L47.7975 52.4518L46.2955 52.0211L45.4901 54.8298L45.4601 54.8212L44.174 51.4128L42.9386 51.0585L41.3849 56.4769L42.8869 56.9076ZM52.7701 57.2465L52.9747 56.533L50.6166 55.8569L50.3129 56.9157L51.139 57.1526L51.11 57.2256C50.94 57.6482 50.4891 57.8318 49.9709 57.6832C49.2725 57.483 48.9872 56.7632 49.2704 55.7756C49.5471 54.8106 50.1045 54.369 50.7804 54.5628C51.2385 54.6942 51.5209 55.0556 51.5119 55.4837L53.0777 55.9327C53.2763 54.7868 52.4918 53.6963 51.1325 53.3065C49.4615 52.8274 48.1511 53.5569 47.6418 55.333C47.1261 57.1316 47.854 58.4335 49.5738 58.9266C51.1471 59.3778 52.3448 58.7297 52.7701 57.2465ZM54.5376 54.3845L53.6262 58.0731L54.9329 58.4477L56.1146 54.8367L54.5376 54.3845ZM53.7294 60.1792C54.1649 60.3041 54.6201 60.077 54.7407 59.6564C54.8603 59.2396 54.5945 58.8058 54.159 58.681C53.7159 58.5539 53.2644 58.782 53.1449 59.1988C53.0243 59.6194 53.2863 60.0521 53.7294 60.1792Z",fill:"white"}),Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44 75.2C63.4405 75.2 79.2 59.4404 79.2 40C79.2 20.5596 63.4405 4.80002 44 4.80002C24.5596 4.80002 8.80005 20.5596 8.80005 40C8.80005 59.4404 24.5596 75.2 44 75.2Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"0.1 4"})),Object(o.createElement)("defs",null,Object(o.createElement)("filter",{id:"filterThankYou",x:"0",y:"0",width:"88",height:"88",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(o.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(o.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(o.createElement)("feOffset",{dy:"4"}),Object(o.createElement)("feGaussianBlur",{stdDeviation:"2"}),Object(o.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),Object(o.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(o.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))},je=function(e){var t=e.target;t&&(t.paused?t.play():t.pause())},Le=function(e){var t=e.confirmMessageType,n=e.customConfirmMessage,r=e.setDismissSubmitMessage,i=e.hideBranding;return Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-container"},Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message"},E.THANK_YOU===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("video",{muted:!0,autoPlay:!0,loop:!0,playsInline:!0,poster:"https://crowdsignal.files.wordpress.com/2020/02/thumbs-up-video-placeholder.jpg",width:"100%",onClick:je},Object(o.createElement)("source",{src:"https://crowdsignal.files.wordpress.com/2019/08/thumbs-up-cs.mp4",type:"video/mp4"})),Object(o.createElement)(xe,{className:"crowdsignal-forms-poll__thank-you-sticker"}),!i&&Object(o.createElement)("img",{className:"crowdsignal-forms-poll__thank-you-cs-sticker",src:"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg",alt:"Crowdsignal sticker"})),E.CUSTOM_TEXT===t&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message-check"},Object(o.createElement)(ye,null)),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__custom-message"},Object(O.isEmpty)(n)?Object(x.__)("Thanks for voting!","crowdsignal-forms"):n)),Object(o.createElement)("button",{className:"crowdsignal-forms-poll__dismiss-submit-message",onClick:function(){return r(!0)}},Object(o.createElement)(ge,null))),Object(o.createElement)("div",{className:"crowdsignal-forms-poll__submit-message-footer"},!i&&Object(o.createElement)(fe,{showLogo:E.THANK_YOU!==t})))};function Ee(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 Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Se,_e,Ne=(Se=function(){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null),Object(o.createElement)("h3",null,"Question"),Object(o.createElement)("div",{className:"wp-block-button"},Object(o.createElement)("div",{className:"wp-block-button__link"})),Object(o.createElement)("div",{className:"entry-content"},Object(o.createElement)("div",{className:"alignwide"})))},_e=function(e){if(null===e)return{};var t,n=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),o=e.querySelector("h3"),i=e.querySelector(".alignwide"),a=Oe(n),c=Oe(r),s=window.getComputedStyle(r).color;if(a===c){var l=(t=n,"0px"!==window.getComputedStyle(t).borderBlockStartWidth?window.getComputedStyle(t).borderBlockStartColor:null);a=l||s}return{accent:a,surface:c,text:s,bodyFontFamily:window.getComputedStyle(r).fontFamily,questionFontFamily:window.getComputedStyle(o).fontFamily,textInverted:window.getComputedStyle(n).color,contentWideWidth:window.getComputedStyle(i).maxWidth}},function(e){return Object(D.withFallbackStyles)((function(e){return{fallbackStyles:_e(e.querySelector(".crowdsignal-forms__style-probe"))}}))((function(t){var n=t.fallbackStyles,r=F()(t,["fallbackStyles"]);return Object(o.createElement)(e,c()({fallbackStyles:n||{},renderStyleProbe:function(){return n?null:Object(o.createElement)(B,null,Object(o.createElement)(Se,null))}},r))}))})((function(e){var t=e.attributes,n=e.fallbackStyles,r=e.renderStyleProbe,a=Object(i.useState)(Math.random()),s=b()(a,1)[0],l=Object(i.useState)(""),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(!1),v=b()(h,2),j=v[0],L=v[1],_=t.apiPollData,R=_.id,M=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="cs-poll-".concat(e),o=Object(i.useState)(!1),a=b()(o,2),c=a[0],s=a[1],l=Object(i.useState)(!1),u=b()(l,2),d=u[0],m=u[1],h=Object(i.useState)(""),w=b()(h,2),O=w[0],v=w[1];Object(i.useEffect)((function(){t&&void 0!==W.a.get(r)&&(m(!0),v(W.a.get(r)))}),[]);var g=function(){var o=p()(f.a.mark((function o(i){var a,c,l,u=arguments;return f.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=u.length>1&&void 0!==u[1]?u[1]:1,o.prev=1,s(!0),o.next=5,oe(e);case 5:return c=o.sent,o.next=8,ie(c,e,i,a);case 8:m(!0),t&&(l=n?i.join(","):(new Date).getTime(),W.a.set(r,l,{sameSite:"Strict",expires:365}),v(l));case 10:return o.prev=10,s(!1),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[1,,10,13]])})));return function(e){return o.apply(this,arguments)}}();return{hasVoted:d,isVoting:c,vote:g,storedCookieValue:O}}(R,t.hasOneResponsePerComputer),P=M.hasVoted,F=M.isVoting,D=M.vote,B=function(){var e=p()(f.a.mark((function e(n){return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m(""),L(!1),e.next=5,D(n);case 5:E.REDIRECT===t.confirmMessageType&&window.open(t.redirectAddress),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),e.t0 instanceof ae?m(e.t0.message):m(Object(x.__)("Server error. Please try again.","crowdsignal-forms"));case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(N.CLOSED===e)return!0;if(N.CLOSED_AFTER===e){var r=new Date(t);return r<n}return!1}(t.pollStatus,t.closedAfterDateTime);if(Z&&A.HIDDEN===t.closedPollState)return null;var V=Z&&A.SHOW_RESULTS===t.closedPollState||P&&E.RESULTS===t.confirmMessageType,q=P&&!V&&!j&&E.REDIRECT!==t.confirmMessageType,H=E.THANK_YOU===t.confirmMessageType,z=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return g()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-submit-button-bg-color":e.submitButtonBackgroundColor,"has-submit-button-text-color":e.submitButtonTextColor,"has-border-radius":null!==(t=e.borderRadius)&&void 0!==t&&t,"has-box-shadow":e.hasBoxShadow},r)}(t,t.className,"crowdsignal-forms-poll",{"has-voted":P,"is-closed":Z,"is-voting":F,"has-default-thankyou":H}),G=Ce({width:"full"!==t.align?"".concat(t.width,"%"):"auto"},function(e,t){var n,r,o,i,a=Object(O.isEmpty)(e.textColor)?t.text:e.textColor;return Object(O.mapKeys)({borderColor:null!==(n=e.borderColor)&&void 0!==n?n:t.accent,borderRadius:"".concat(e.borderRadius,"px"),borderWidth:"".concat(e.borderWidth,"px"),bgColor:e.backgroundColor,bodyFontFamily:null!==(r=T(e.fontFamily))&&void 0!==r?r:t.bodyFontFamily,questionFontFamily:null!==(o=T(e.fontFamily))&&void 0!==o?o:t.questionFontFamily,submitButtonBgColor:e.submitButtonBackgroundColor||t.accent,submitButtonTextColor:e.submitButtonTextColor||t.textInverted,textColor:a,textColorProperties:null!==(i=I(a))&&void 0!==i?i:"0, 0, 0",contentWideWidth:t.contentWideWidth},(function(e,t){return"--crowdsignal-forms-".concat(Object(O.kebabCase)(t))}))}(t,n)),Y=Object(O.reduce)(_.answers,(function(e,t){return e[t.client_id]=t.id,e}),{}),K=Object(O.map)(t.answers,(function(e){return Ce({},e,{answerIdFromApi:Y[e.answerId]})})),J=function(e,t){for(var n=e.slice(),r=n.length-1;r>0;r--){var o=Math.floor(t()*r),i=n[r];n[r]=n[o],n[o]=i}return n}(Object(O.filter)(K,(function(e){return!!e.text})),t.randomizeAnswers?new w.a(s):function(){return 1}),X=g()({"is-transparent":q},"crowdsignal-forms-poll__content"),Q=function(e,t){return e.isMultipleChoice?k.RADIO:!Object(O.isEmpty)(t)&&t.indexOf("is-style-buttons")>-1?k.BUTTON:k.RADIO}(t,t.className);return t.fontFamily&&function(e){if(!Object(O.isEmpty)(e)&&C.THEME_DEFAULT!==e&&-1!==S.indexOf(e)){var t="https://fonts.googleapis.com/css2?family=".concat(e,":wght@400;600;700&display=swap");0===Object(O.filter)(Array.from(document.head.childNodes),(function(e){return"link"===e.nodeName.toLowerCase()&&e.href===t})).length&&document.head.appendChild(Object(O.tap)(document.createElement("link"),(function(e){e.type="text/css",e.rel="stylesheet",e.href=t})))}}(t.fontFamily),Object(o.createElement)("div",{className:z,style:G},d&&Object(o.createElement)(ve,null,d),Object(o.createElement)("div",{className:X},Object(o.createElement)("h3",{className:"crowdsignal-forms-poll__question"},Object(y.decodeEntities)(t.question)),t.note&&Object(o.createElement)("p",{className:"crowdsignal-forms-poll__note"},Object(y.decodeEntities)(t.note)),!V&&Object(o.createElement)(we,{answers:J,answerStyle:Q,buttonAlignment:t.buttonAlignment,isMultipleChoice:t.isMultipleChoice,onSubmit:B,submitButtonLabel:t.submitButtonLabel,hasVoted:P,isVoting:F,hideBranding:t.hideBranding}),V&&Object(o.createElement)(pe,{pollIdFromApi:R,answers:J,setErrorMessage:m,hideBranding:t.hideBranding})),q&&Object(o.createElement)(Le,c()({},t,{setDismissSubmitMessage:L})),(Z||P)&&Object(o.createElement)(U,{showSubmitMessage:q,isPollClosed:Z,hasVoted:P}),r())})),Ae=n(30),ke=function(e,t){return Object(O.forEach)(document.querySelectorAll("div[".concat(e,"]")),(function(n){try{var r=JSON.parse(n.dataset[Object(O.camelCase)(e.substr("data-".length))]),o=t(r,n);n.removeAttribute(e),Object(Ae.render)(o,n)}catch(i){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}))},Re=function(e,t){(Object(O.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver((function(){return ke(e,t)})).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),Object(O.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,ke(e,t))};(function(e,t){if("complete"===document.readyState)return Re(e,t);window.addEventListener("load",(function(){return Re(e,t)}))})("data-crowdsignal-poll",(function(e){return Object(o.createElement)(Ne,{attributes:e})}))}]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = "./client/poll.js");
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./client/blocks/poll/constants.js":
|
90 |
+
/*!*****************************************!*\
|
91 |
+
!*** ./client/blocks/poll/constants.js ***!
|
92 |
+
\*****************************************/
|
93 |
+
/*! exports provided: ConfirmMessageType, FontFamilyType, GoogleFonts, FontFamilyMap, PollStatus, ClosedPollState, ConnectedAccountState, AnswerStyle, ButtonAlignment */
|
94 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
95 |
+
|
96 |
+
"use strict";
|
97 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConfirmMessageType\", function() { return ConfirmMessageType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyType\", function() { return FontFamilyType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GoogleFonts\", function() { return GoogleFonts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FontFamilyMap\", function() { return FontFamilyMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStatus\", function() { return PollStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClosedPollState\", function() { return ClosedPollState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConnectedAccountState\", function() { return ConnectedAccountState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AnswerStyle\", function() { return AnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ButtonAlignment\", function() { return ButtonAlignment; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n\n\nvar _Object$freeze;\n\nvar ConfirmMessageType = Object.freeze({\n THANK_YOU: 'thank-you',\n CUSTOM_TEXT: 'custom-text',\n REDIRECT: 'redirect',\n RESULTS: 'results'\n});\nvar FontFamilyType = Object.freeze({\n THEME_DEFAULT: 'theme-default',\n GEORGIA: 'georgia',\n PALATINO: 'palatino',\n TIMES_NEW_ROMAN: 'times-new-roman',\n ARIAL: 'arial',\n IMPACT: 'impact',\n LUCIDA: 'lucida',\n TAHOMA: 'tahoma',\n TREBUCHET: 'trebuchet',\n VERDANA: 'verdana',\n COURIER: 'courier',\n // Google fonts: enum value = google font url slug\n CABIN: 'Cabin',\n CHIVO: 'Chivo',\n OPEN_SANS: 'Open+Sans',\n FIRA_SANS: 'Fira+Sans',\n ROBOTO: 'Roboto',\n NUNITO: 'Nunito',\n OVERPASS: 'Overpass',\n LATO: 'Lato',\n LIBRE_FRANKLIN: 'Libre+Franklin',\n MONTSERRAT: 'Montserrat',\n POPPINS: 'Poppins',\n RUBIK: 'Rubik',\n RALEWAY: 'Raleway',\n JOSEFIN_SANS: 'Josefin+Sans',\n ALEGREYA_SANS: 'Alegreya+Sans',\n OSWALD: 'Oswald'\n});\nvar GoogleFonts = Object.freeze([FontFamilyType.CABIN, FontFamilyType.CHIVO, FontFamilyType.OPEN_SANS, FontFamilyType.FIRA_SANS, FontFamilyType.ROBOTO, FontFamilyType.NUNITO, FontFamilyType.OVERPASS, FontFamilyType.LATO, FontFamilyType.LIBRE_FRANKLIN, FontFamilyType.MONTSERRAT, FontFamilyType.POPPINS, FontFamilyType.RUBIK, FontFamilyType.RALEWAY, FontFamilyType.JOSEFIN_SANS, FontFamilyType.ALEGREYA_SANS, FontFamilyType.OSWALD]);\nvar FontFamilyMap = Object.freeze((_Object$freeze = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.THEME_DEFAULT, null), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.GEORGIA, 'Georgia, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.PALATINO, '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TIMES_NEW_ROMAN, '\"Times New Roman\", Times, serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ARIAL, 'Arial, Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.IMPACT, 'Impact, Charcoal, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LUCIDA, '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TAHOMA, 'Tahoma, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.TREBUCHET, '\"Trebuchet MS\", Helvetica, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.VERDANA, 'Verdana, Geneva, sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.COURIER, '\"Courier New\", Courier, monospace'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CABIN, '\"Cabin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.CHIVO, '\"Chivo\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OPEN_SANS, '\"Open Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.FIRA_SANS, '\"Fira Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ROBOTO, '\"Roboto\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.NUNITO, '\"Nunito\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OVERPASS, '\"Overpass\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LATO, '\"Lato\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.LIBRE_FRANKLIN, '\"Libre Franklin\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.MONTSERRAT, '\"Montserrat\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.POPPINS, '\"Poppins\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RUBIK, '\"Rubik\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.RALEWAY, '\"Raleway\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.JOSEFIN_SANS, '\"Josefin Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.ALEGREYA_SANS, '\"Alegreya Sans\", sans-serif'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_Object$freeze, FontFamilyType.OSWALD, '\"Oswald\", sans-serif'), _Object$freeze));\nvar PollStatus = Object.freeze({\n OPEN: 'open',\n CLOSED: 'closed',\n CLOSED_AFTER: 'closed-after'\n});\nvar ClosedPollState = Object.freeze({\n SHOW_RESULTS: 'show-results',\n SHOW_CLOSED_BANNER: 'show-closed-banner',\n HIDDEN: 'hidden'\n});\nvar ConnectedAccountState = Object.freeze({\n CONNECTED: 'connected',\n NOT_CONNECTED: 'not-connected',\n NOT_VERIFIED: 'not-verified'\n});\nvar AnswerStyle = Object.freeze({\n RADIO: 'radio',\n BUTTON: 'button'\n});\nvar ButtonAlignment = Object.freeze({\n LIST: 'list',\n INLINE: 'inline'\n});\n\n//# sourceURL=webpack:///./client/blocks/poll/constants.js?");
|
98 |
+
|
99 |
+
/***/ }),
|
100 |
+
|
101 |
+
/***/ "./client/blocks/poll/util.js":
|
102 |
+
/*!************************************!*\
|
103 |
+
!*** ./client/blocks/poll/util.js ***!
|
104 |
+
\************************************/
|
105 |
+
/*! exports provided: addAnswer, getFontFamilyFromType, getStyleVars, extractRGBColorProperties, hexToRGB, getBlockCssClasses, isPollClosed, getAnswerStyle, toggleButtonStyleAvailability */
|
106 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
107 |
+
|
108 |
+
"use strict";
|
109 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAnswer\", function() { return addAnswer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFontFamilyFromType\", function() { return getFontFamilyFromType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getStyleVars\", function() { return getStyleVars; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"extractRGBColorProperties\", function() { return extractRGBColorProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hexToRGB\", function() { return hexToRGB; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBlockCssClasses\", function() { return getBlockCssClasses; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isPollClosed\", function() { return isPollClosed; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAnswerStyle\", function() { return getAnswerStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleButtonStyleAvailability\", function() { return toggleButtonStyleAvailability; });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/blocks */ \"@wordpress/blocks\");\n/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants */ \"./client/blocks/poll/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Creates a new Answer object then returns a copy of the passed in `answers` array with the new answer appended to it.\n *\n * @param {Array} answers The existing array of answers.\n * @param {string} text\tThe text for the new answer to add.\n * @return {Array}\t\t\tThe newly created answers array.\n */\n\nvar addAnswer = function addAnswer(answers, text) {\n return [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(answers), [{\n answerId: null,\n text: text\n }]);\n};\nvar getFontFamilyFromType = function getFontFamilyFromType(type) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"includes\"])(_constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyType\"], type)) {\n return null;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"FontFamilyMap\"][type];\n};\nvar getStyleVars = function getStyleVars(attributes, fallbackStyles) {\n var _attributes$borderCol, _getFontFamilyFromTyp, _getFontFamilyFromTyp2, _extractRGBColorPrope;\n\n var textColor = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(attributes.textColor) ? fallbackStyles.text : attributes.textColor;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"mapKeys\"])({\n borderColor: (_attributes$borderCol = attributes.borderColor) !== null && _attributes$borderCol !== void 0 ? _attributes$borderCol : fallbackStyles.accent,\n borderRadius: \"\".concat(attributes.borderRadius, \"px\"),\n borderWidth: \"\".concat(attributes.borderWidth, \"px\"),\n bgColor: attributes.backgroundColor,\n bodyFontFamily: (_getFontFamilyFromTyp = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp !== void 0 ? _getFontFamilyFromTyp : fallbackStyles.bodyFontFamily,\n questionFontFamily: (_getFontFamilyFromTyp2 = getFontFamilyFromType(attributes.fontFamily)) !== null && _getFontFamilyFromTyp2 !== void 0 ? _getFontFamilyFromTyp2 : fallbackStyles.questionFontFamily,\n submitButtonBgColor: attributes.submitButtonBackgroundColor || fallbackStyles.accent,\n submitButtonTextColor: attributes.submitButtonTextColor || fallbackStyles.textInverted,\n textColor: textColor,\n textColorProperties: (_extractRGBColorPrope = extractRGBColorProperties(textColor)) !== null && _extractRGBColorPrope !== void 0 ? _extractRGBColorPrope : '0, 0, 0',\n contentWideWidth: fallbackStyles.contentWideWidth\n }, function (_, key) {\n return \"--crowdsignal-forms-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"kebabCase\"])(key));\n });\n};\n/**\n * Extracts the comma separated color properties from an rgb string.\n * rgba strings are not supported for now because it introduces too many complications.\n *\n * @param {string} color The color string.\n * @return {string} The 3 comma separated rgb color properties.\n */\n\nvar extractRGBColorProperties = function extractRGBColorProperties(color) {\n if (!color || 'string' !== typeof color || -1 === color.indexOf('rgb') && 0 !== color.indexOf('#') || -1 < color.indexOf('rgba')) {\n return null;\n }\n\n if (0 === color.indexOf('#')) {\n color = hexToRGB(color);\n }\n\n return color.match(/\\((.*?)\\)/)[1];\n};\n/**\n * converts css color hex to rgb\n *\n * @param {string} h The hex color string.\n * @return {string} The rgb value.\n */\n\nvar hexToRGB = function hexToRGB(h) {\n var r = 0,\n g = 0,\n b = 0;\n var hexCode = 4 === h.length ? \"#\".concat(h[1] + h[1] + h[2] + h[2] + h[3] + h[3]) : h;\n\n if (7 === hexCode.length) {\n r = parseInt(hexCode.substr(1, 2), 16) || 0;\n g = parseInt(hexCode.substr(3, 2), 16) || 0;\n b = parseInt(hexCode.substr(5, 2), 16) || 0;\n }\n\n return \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\");\n};\n/**\n * Returns a css 'class' string of overridden styles given a collection of attributes.\n *\n * @param {*} attributes The block's attributes\n * @param {...any} extraClasses A list of additional classes to add to the class string\n */\n\nvar getBlockCssClasses = function getBlockCssClasses(attributes) {\n var _attributes$borderRad;\n\n for (var _len = arguments.length, extraClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n extraClasses[_key - 1] = arguments[_key];\n }\n\n return classnames__WEBPACK_IMPORTED_MODULE_1___default()({\n 'has-bg-color': attributes.backgroundColor,\n 'has-text-color': attributes.textColor,\n 'has-submit-button-bg-color': attributes.submitButtonBackgroundColor,\n 'has-submit-button-text-color': attributes.submitButtonTextColor,\n 'has-border-radius': (_attributes$borderRad = attributes.borderRadius) !== null && _attributes$borderRad !== void 0 ? _attributes$borderRad : false,\n 'has-box-shadow': attributes.hasBoxShadow\n }, extraClasses);\n};\n/**\n * Determines if the poll is closed based on its editor settings.\n *\n * @param {string} pollStatus The poll's status, as set in the editor.\n * @param {string} closedAfterDateTimeUTC The UTC date time string to close the poll after if pollStatus is PollStatus.CLOSED_AFTER.\n * @param {Date} currentDateTime Optionally set the current date that will be used for current time comparisons.\n */\n\nvar isPollClosed = function isPollClosed(pollStatus, closedAfterDateTimeUTC) {\n var currentDateTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Date();\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED === pollStatus) {\n return true;\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_5__[\"PollStatus\"].CLOSED_AFTER === pollStatus) {\n var closedAfterDateTime = new Date(closedAfterDateTimeUTC);\n return closedAfterDateTime < currentDateTime;\n }\n\n return false;\n};\n/**\n * Returns the type of answer controls that should be rendered given the current state of the block.\n *\n * @param {*} attributes the poll's attributes.\n * @param {string} className the css class string Gutenberg is passing into the block.\n */\n\nvar getAnswerStyle = function getAnswerStyle(attributes, className) {\n if (attributes.isMultipleChoice) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n }\n\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"isEmpty\"])(className) && className.indexOf('is-style-buttons') > -1) {\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].BUTTON;\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO;\n};\n/**\n * Registers or de-registers the `buttons` block style.\n *\n * @param {boolean} enable True if button style should be available, false if not.\n */\n\nvar toggleButtonStyleAvailability = function toggleButtonStyleAvailability(enable) {\n if (enable) {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"registerBlockStyle\"])('crowdsignal-forms/poll', {\n name: 'buttons',\n label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__[\"__\"])('Buttons', 'crowdsignal-forms')\n });\n } else {\n Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_3__[\"unregisterBlockStyle\"])('crowdsignal-forms/poll', 'buttons');\n }\n};\n\n//# sourceURL=webpack:///./client/blocks/poll/util.js?");
|
110 |
+
|
111 |
+
/***/ }),
|
112 |
+
|
113 |
+
/***/ "./client/components/icon/check-circle.js":
|
114 |
+
/*!************************************************!*\
|
115 |
+
!*** ./client/components/icon/check-circle.js ***!
|
116 |
+
\************************************************/
|
117 |
+
/*! exports provided: default */
|
118 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
119 |
+
|
120 |
+
"use strict";
|
121 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"34\",\n height: \"34\",\n viewBox: \"0 0 34 34\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z\",\n fill: \"var(--crowdsignal-forms-submit-button-bg-color)\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"mask\", {\n id: \"maskCheck\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: \"0\",\n y: \"0\",\n width: \"34\",\n height: \"34\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.6667 0C7.46667 0 0 7.46667 0 16.6667C0 25.8667 7.46667 33.3333 16.6667 33.3333C25.8667 33.3333 33.3333 25.8667 33.3333 16.6667C33.3333 7.46667 25.8667 0 16.6667 0ZM16.6667 30C9.31667 30 3.33333 24.0167 3.33333 16.6667C3.33333 9.31667 9.31667 3.33333 16.6667 3.33333C24.0167 3.33333 30 9.31667 30 16.6667C30 24.0167 24.0167 30 16.6667 30ZM13.3333 20.2833L24.3167 9.3L26.6667 11.6667L13.3333 25L6.66667 18.3333L9.01667 15.9833L13.3333 20.2833Z\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n mask: \"url(#maskCheck)\"\n }));\n});\n\n//# sourceURL=webpack:///./client/components/icon/check-circle.js?");
|
122 |
+
|
123 |
+
/***/ }),
|
124 |
+
|
125 |
+
/***/ "./client/components/icon/close.js":
|
126 |
+
/*!*****************************************!*\
|
127 |
+
!*** ./client/components/icon/close.js ***!
|
128 |
+
\*****************************************/
|
129 |
+
/*! exports provided: default */
|
130 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
131 |
+
|
132 |
+
"use strict";
|
133 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z\",\n fill: \"white\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"mask\", {\n id: \"maskClose\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: \"5\",\n y: \"5\",\n width: \"14\",\n height: \"14\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z\",\n fill: \"white\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n mask: \"url(#maskClose)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"rect\", {\n width: \"24\",\n height: \"24\",\n fill: \"black\"\n })));\n});\n\n//# sourceURL=webpack:///./client/components/icon/close.js?");
|
134 |
+
|
135 |
+
/***/ }),
|
136 |
+
|
137 |
+
/***/ "./client/components/icon/thank-you.js":
|
138 |
+
/*!*********************************************!*\
|
139 |
+
!*** ./client/components/icon/thank-you.js ***!
|
140 |
+
\*********************************************/
|
141 |
+
/*! exports provided: default */
|
142 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
143 |
+
|
144 |
+
"use strict";
|
145 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function (_ref) {\n var className = _ref.className;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"svg\", {\n width: \"88\",\n height: \"88\",\n viewBox: \"0 0 88 88\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n className: className\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"g\", {\n filter: \"url(#filterThankYou)\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M44 80C66.0914 80 84 62.0914 84 40C84 17.9086 66.0914 0 44 0C21.9086 0 4 17.9086 4 40C4 62.0914 21.9086 80 44 80Z\",\n fill: \"#384869\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n d: \"M26.0226 27.1047L27.2135 22.9517L28.6403 23.3609L29.0032 22.0954L24.5573 20.8206L24.1945 22.086L25.6214 22.4952L24.4305 26.6481L26.0226 27.1047ZM33.0856 29.1299L34.6393 23.7116L33.0472 23.2551L32.4572 25.3128L30.5497 24.7658L31.1397 22.7081L29.5476 22.2516L27.9939 27.6699L29.586 28.1265L30.1868 26.0312L32.0943 26.5782L31.4935 28.6734L33.0856 29.1299ZM37.4113 30.3703L39.1085 30.857L38.8937 24.9315L36.896 24.3587L33.5738 29.2699L35.1959 29.7351L35.7865 28.7381L37.4387 29.2119L37.4113 30.3703ZM37.4837 25.8804L37.5138 25.889L37.4715 28.0063L36.3976 27.6983L37.4837 25.8804ZM41.0986 31.4276L41.9169 28.5739L41.947 28.5825L43.2352 32.0403L44.4556 32.3902L46.0092 26.9719L44.5073 26.5412L43.7019 29.3499L43.6719 29.3412L42.3857 25.9328L41.1504 25.5786L39.5967 30.997L41.0986 31.4276ZM46.7986 33.0621L47.2056 31.6427L47.7936 31.1936L48.4057 33.5229L50.2569 34.0537L49.2542 30.5072L51.728 28.6117L50.0571 28.1325L47.7234 29.9504L47.6934 29.9417L48.3523 27.6437L46.7602 27.1872L45.2065 32.6056L46.7986 33.0621ZM55.281 35.4944L55.7731 33.7784L58.6859 30.6068L57.0225 30.1298L55.4426 32.0541L55.4125 32.0455L55.0924 29.5764L53.3914 29.0887L54.181 33.3218L53.6889 35.0378L55.281 35.4944ZM61.4239 31.2903C59.7492 30.8101 58.3861 31.5815 57.8897 33.3125C57.3934 35.0435 58.1379 36.4152 59.8163 36.8964C61.491 37.3767 62.853 36.6091 63.3494 34.878C63.8458 33.147 63.0986 31.7705 61.4239 31.2903ZM61.0599 32.5595C61.7246 32.7501 61.9964 33.4742 61.7273 34.4129C61.4592 35.3479 60.8486 35.8189 60.1803 35.6273C59.5119 35.4356 59.2438 34.7126 59.5119 33.7776C59.781 32.8389 60.3953 32.3689 61.0599 32.5595ZM66.3384 32.8012L64.7463 32.3446L63.7461 35.833C63.3918 37.0683 64.1232 38.1314 65.5539 38.5417C66.9845 38.9519 68.1681 38.4379 68.5223 37.2025L69.5226 33.7142L67.9305 33.2577L66.9809 36.5695C66.8172 37.1403 66.4462 37.3712 65.9318 37.2237C65.4174 37.0762 65.2251 36.6838 65.3888 36.113L66.3384 32.8012ZM36.4693 42.5838L37.0195 40.665L39.0246 41.24L39.367 40.0459L37.3619 39.4709L37.6601 38.4308L39.8755 39.0661L40.2384 37.8007L36.4309 36.7089L34.8772 42.1273L36.4693 42.5838ZM43.4269 38.6134C41.7522 38.1332 40.3892 38.9045 39.8928 40.6356C39.3964 42.3666 40.141 43.7382 41.8194 44.2195C43.4941 44.6997 44.8561 43.9321 45.3525 42.2011C45.8488 40.4701 45.1016 39.0936 43.4269 38.6134ZM43.063 39.8826C43.7276 40.0731 43.9995 40.7972 43.7303 41.7359C43.4622 42.6709 42.8517 43.142 42.1833 42.9503C41.515 42.7587 41.2468 42.0357 41.5149 41.1007C41.7841 40.162 42.3984 39.692 43.063 39.8826ZM48.0045 41.2995L48.6654 41.489C49.0934 41.6117 49.2996 41.9838 49.1844 42.3856C49.0671 42.7948 48.7144 42.9904 48.2675 42.8622L47.6104 42.6738L48.0045 41.2995ZM47.3089 43.7252L47.8309 43.8748L48.1659 45.9377L49.9457 46.4481L49.5058 44.0991C50.1503 43.9913 50.6348 43.4638 50.8179 42.8255C51.1506 41.6652 50.602 40.7724 49.1563 40.3579L46.7494 39.6677L45.1957 45.086L46.7878 45.5426L47.3089 43.7252ZM26.5905 52.2347L29.7888 47.2879L28.0315 46.784L26.0433 50.4442L26.0133 50.4356L26.2667 46.278L24.4343 45.7525L24.5253 51.6425L26.5905 52.2347ZM32.7521 48.036C31.0774 47.5558 29.7143 48.3272 29.218 50.0582C28.7216 51.7892 29.4661 53.1608 31.1446 53.6421C32.8193 54.1223 34.1813 53.3547 34.6776 51.6237C35.174 49.8927 34.4268 48.5162 32.7521 48.036ZM32.3882 49.3052C33.0528 49.4958 33.3247 50.2199 33.0555 51.1586C32.7874 52.0936 32.1769 52.5646 31.5085 52.373C30.8401 52.1813 30.572 51.4583 30.8401 50.5233C31.1093 49.5846 31.7236 49.1146 32.3882 49.3052ZM37.0705 55.2398L38.2613 51.0868L39.6882 51.496L40.0511 50.2306L35.6052 48.9557L35.2424 50.2211L36.6692 50.6303L35.4784 54.7832L37.0705 55.2398ZM40.6339 56.2616L42.1876 50.8432L40.5955 50.3867L39.0418 55.805L40.6339 56.2616ZM42.8869 56.9076L43.7052 54.0538L43.7352 54.0625L45.0234 57.5202L46.2438 57.8702L47.7975 52.4518L46.2955 52.0211L45.4901 54.8298L45.4601 54.8212L44.174 51.4128L42.9386 51.0585L41.3849 56.4769L42.8869 56.9076ZM52.7701 57.2465L52.9747 56.533L50.6166 55.8569L50.3129 56.9157L51.139 57.1526L51.11 57.2256C50.94 57.6482 50.4891 57.8318 49.9709 57.6832C49.2725 57.483 48.9872 56.7632 49.2704 55.7756C49.5471 54.8106 50.1045 54.369 50.7804 54.5628C51.2385 54.6942 51.5209 55.0556 51.5119 55.4837L53.0777 55.9327C53.2763 54.7868 52.4918 53.6963 51.1325 53.3065C49.4615 52.8274 48.1511 53.5569 47.6418 55.333C47.1261 57.1316 47.854 58.4335 49.5738 58.9266C51.1471 59.3778 52.3448 58.7297 52.7701 57.2465ZM54.5376 54.3845L53.6262 58.0731L54.9329 58.4477L56.1146 54.8367L54.5376 54.3845ZM53.7294 60.1792C54.1649 60.3041 54.6201 60.077 54.7407 59.6564C54.8603 59.2396 54.5945 58.8058 54.159 58.681C53.7159 58.5539 53.2644 58.782 53.1449 59.1988C53.0243 59.6194 53.2863 60.0521 53.7294 60.1792Z\",\n fill: \"white\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M44 75.2C63.4405 75.2 79.2 59.4404 79.2 40C79.2 20.5596 63.4405 4.80002 44 4.80002C24.5596 4.80002 8.80005 20.5596 8.80005 40C8.80005 59.4404 24.5596 75.2 44 75.2Z\",\n stroke: \"white\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeDasharray: \"0.1 4\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"defs\", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"filter\", {\n id: \"filterThankYou\",\n x: \"0\",\n y: \"0\",\n width: \"88\",\n height: \"88\",\n filterUnits: \"userSpaceOnUse\",\n colorInterpolationFilters: \"sRGB\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feFlood\", {\n floodOpacity: \"0\",\n result: \"BackgroundImageFix\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feColorMatrix\", {\n in: \"SourceAlpha\",\n type: \"matrix\",\n values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feOffset\", {\n dy: \"4\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feGaussianBlur\", {\n stdDeviation: \"2\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feColorMatrix\", {\n type: \"matrix\",\n values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feBlend\", {\n mode: \"normal\",\n in2: \"BackgroundImageFix\",\n result: \"effect1_dropShadow\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"feBlend\", {\n mode: \"normal\",\n in: \"SourceGraphic\",\n in2: \"effect1_dropShadow\",\n result: \"shape\"\n }))));\n});\n\n//# sourceURL=webpack:///./client/components/icon/thank-you.js?");
|
146 |
+
|
147 |
+
/***/ }),
|
148 |
+
|
149 |
+
/***/ "./client/components/poll/answer-results.js":
|
150 |
+
/*!**************************************************!*\
|
151 |
+
!*** ./client/components/poll/answer-results.js ***!
|
152 |
+
\**************************************************/
|
153 |
+
/*! exports provided: default */
|
154 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155 |
+
|
156 |
+
"use strict";
|
157 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n\nvar PollAnswerResults = function PollAnswerResults(_ref) {\n var error = _ref.error,\n loading = _ref.loading,\n text = _ref.text,\n totalVotes = _ref.totalVotes,\n votes = _ref.votes;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__answer-results', {\n 'is-error': error,\n 'is-loading': loading\n });\n var showResults = !loading && !error;\n var answerShare = 0 === totalVotes ? 0 : votes * 100 / totalVotes;\n var progressBarStyles = {\n width: \"\".concat(parseInt(answerShare, 10), \"%\")\n };\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-labels\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-answer\"\n }, Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__[\"decodeEntities\"])(text)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-votes\"\n }, showResults && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"sprintf\"])( // translators: %s: Number of votes.\n Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"_n\"])('%s vote', '%s votes', votes, 'crowdsignal-forms'), votes.toLocaleString())), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-results-percent\"\n }, showResults && \"\".concat(answerShare.toFixed(2), \"%\"))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-progress-track\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-results-progress-bar\",\n style: progressBarStyles\n })));\n};\n\nPollAnswerResults.propTypes = {\n loading: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n totalVotes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n votes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollAnswerResults);\n\n//# sourceURL=webpack:///./client/components/poll/answer-results.js?");
|
158 |
+
|
159 |
+
/***/ }),
|
160 |
+
|
161 |
+
/***/ "./client/components/poll/answer.js":
|
162 |
+
/*!******************************************!*\
|
163 |
+
!*** ./client/components/poll/answer.js ***!
|
164 |
+
\******************************************/
|
165 |
+
/*! exports provided: default */
|
166 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
167 |
+
|
168 |
+
"use strict";
|
169 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\n/**\n * External dependencies\n */\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\nvar PollAnswer = function PollAnswer(_ref) {\n var answerIdFromApi = _ref.answerIdFromApi,\n answerStyle = _ref.answerStyle,\n hasVoted = _ref.hasVoted,\n isMultipleChoice = _ref.isMultipleChoice,\n isSelected = _ref.isSelected,\n isVoting = _ref.isVoting,\n isFocused = _ref.isFocused,\n onSelect = _ref.onSelect,\n onFocus = _ref.onFocus,\n text = _ref.text;\n\n var handleSelect = function handleSelect(event) {\n return onSelect(parseInt(event.target.attributes.answerid.value, 10));\n };\n\n var handleFocus = function handleFocus(event) {\n return onFocus(parseInt(event.target.attributes.answerid.value, 10));\n };\n\n var handleButtonVote = function handleButtonVote(event) {\n event.preventDefault();\n handleSelect(event);\n };\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__answer', {\n 'is-multiple-choice': isMultipleChoice,\n 'is-selected': isSelected,\n 'is-focused': isFocused,\n 'is-button': blocks_poll_constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].BUTTON === answerStyle\n });\n var answerElementId = \"poll-answer-\".concat(answerIdFromApi);\n\n var renderRadioAnswers = function renderRadioAnswers() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"label\", {\n className: classes,\n htmlFor: answerElementId,\n tabIndex: \"-1\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"input\", {\n className: \"crowdsignal-forms-poll__input\",\n id: answerElementId,\n name: \"answer\",\n onChange: handleSelect,\n selected: isSelected,\n type: isMultipleChoice ? 'checkbox' : 'radio',\n answerid: answerIdFromApi,\n disabled: hasVoted || isVoting,\n tabIndex: \"0\",\n \"aria-label\": text,\n onFocus: handleFocus\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__check\"\n }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__answer-label-wrapper\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__answer-label\"\n }, Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__[\"decodeEntities\"])(text))));\n };\n\n var renderButtonAnswers = function renderButtonAnswers() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button crowdsignal-forms-poll__block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"input\", {\n type: \"submit\",\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\",\n value: Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__[\"decodeEntities\"])(text),\n answerid: answerIdFromApi,\n onClick: handleButtonVote\n }));\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, blocks_poll_constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].RADIO === answerStyle && renderRadioAnswers(), blocks_poll_constants__WEBPACK_IMPORTED_MODULE_5__[\"AnswerStyle\"].BUTTON === answerStyle && renderButtonAnswers());\n};\n\nPollAnswer.propTypes = {\n answerIdFromApi: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number.isRequired,\n hasVoted: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n isMultipleChoice: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n isSelected: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n isVoting: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n onSelect: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollAnswer);\n\n//# sourceURL=webpack:///./client/components/poll/answer.js?");
|
170 |
+
|
171 |
+
/***/ }),
|
172 |
+
|
173 |
+
/***/ "./client/components/poll/closed-banner.js":
|
174 |
+
/*!*************************************************!*\
|
175 |
+
!*** ./client/components/poll/closed-banner.js ***!
|
176 |
+
\*************************************************/
|
177 |
+
/*! exports provided: default */
|
178 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
179 |
+
|
180 |
+
"use strict";
|
181 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies\n */\n\n\n\n\nvar ClosedBanner = function ClosedBanner(_ref) {\n var hasVoted = _ref.hasVoted,\n isPollClosed = _ref.isPollClosed,\n isPollHidden = _ref.isPollHidden,\n showSubmitMessage = _ref.showSubmitMessage;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()({\n 'is-transparent': showSubmitMessage\n }, 'crowdsignal-forms-poll__closed-banner');\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, isPollHidden && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('This Poll is Hidden', 'crowdsignal-forms'), isPollClosed && !isPollHidden && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('This Poll is Closed', 'crowdsignal-forms'), hasVoted && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__[\"__\"])('Thanks For Voting!', 'crowdsignal-forms'));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ClosedBanner);\n\n//# sourceURL=webpack:///./client/components/poll/closed-banner.js?");
|
182 |
+
|
183 |
+
/***/ }),
|
184 |
+
|
185 |
+
/***/ "./client/components/poll/error-banner.js":
|
186 |
+
/*!************************************************!*\
|
187 |
+
!*** ./client/components/poll/error-banner.js ***!
|
188 |
+
\************************************************/
|
189 |
+
/*! exports provided: default */
|
190 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
191 |
+
|
192 |
+
"use strict";
|
193 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\n\nvar ErrorBanner = function ErrorBanner(_ref) {\n var children = _ref.children;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__error-banner\"\n }, children);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ErrorBanner);\n\n//# sourceURL=webpack:///./client/components/poll/error-banner.js?");
|
194 |
+
|
195 |
+
/***/ }),
|
196 |
+
|
197 |
+
/***/ "./client/components/poll/footer-branding.js":
|
198 |
+
/*!***************************************************!*\
|
199 |
+
!*** ./client/components/poll/footer-branding.js ***!
|
200 |
+
\***************************************************/
|
201 |
+
/*! exports provided: default */
|
202 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
203 |
+
|
204 |
+
"use strict";
|
205 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * WordPress dependencies\n */\n\n\nvar FooterBranding = function FooterBranding(_ref) {\n var showLogo = _ref.showLogo;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__footer-branding\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"a\", {\n className: \"crowdsignal-forms-poll__footer-cs-link\",\n href: \"https://crowdsignal.com?ref=cs-forms-poll\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Create your own poll with Crowdsignal', 'crowdsignal-forms')), showLogo && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"img\", {\n className: \"crowdsignal-forms-poll__footer-branding-logo\",\n src: \"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg\",\n alt: \"Crowdsignal sticker\"\n }));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (FooterBranding);\n\n//# sourceURL=webpack:///./client/components/poll/footer-branding.js?");
|
206 |
+
|
207 |
+
/***/ }),
|
208 |
+
|
209 |
+
/***/ "./client/components/poll/index.js":
|
210 |
+
/*!*****************************************!*\
|
211 |
+
!*** ./client/components/poll/index.js ***!
|
212 |
+
\*****************************************/
|
213 |
+
/*! exports provided: default */
|
214 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
215 |
+
|
216 |
+
"use strict";
|
217 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var seedrandom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! seedrandom */ \"./node_modules/seedrandom/index.js\");\n/* harmony import */ var seedrandom__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(seedrandom__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/html-entities */ \"@wordpress/html-entities\");\n/* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! blocks/poll/util */ \"./client/blocks/poll/util.js\");\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n/* harmony import */ var components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! components/with-fallback-styles */ \"./client/components/with-fallback-styles/index.js\");\n/* harmony import */ var _closed_banner__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./closed-banner */ \"./client/components/poll/closed-banner.js\");\n/* harmony import */ var _results__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./results */ \"./client/components/poll/results.js\");\n/* harmony import */ var _vote__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./vote */ \"./client/components/poll/vote.js\");\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./styles */ \"./client/components/poll/styles.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./util */ \"./client/components/poll/util.js\");\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n/* harmony import */ var data_poll__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! data/poll */ \"./client/data/poll/index.js\");\n/* harmony import */ var _error_banner__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./error-banner */ \"./client/components/poll/error-banner.js\");\n/* harmony import */ var _submit_message__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./submit-message */ \"./client/components/poll/submit-message.js\");\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n\n\n\n/**\n * WordPress dependencies\n */\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Poll = function Poll(_ref) {\n var attributes = _ref.attributes,\n fallbackStyles = _ref.fallbackStyles,\n renderStyleProbe = _ref.renderStyleProbe;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_6__[\"useState\"])(Math.random()),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_useState, 1),\n randomAnswerSeed = _useState2[0];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_6__[\"useState\"])(''),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_useState3, 2),\n errorMessage = _useState4[0],\n setErrorMessage = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_6__[\"useState\"])(false),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_useState5, 2),\n dismissSubmitMessage = _useState6[0],\n setDismissSubmitMessage = _useState6[1];\n\n var apiPollData = attributes.apiPollData;\n var pollIdFromApi = apiPollData.id;\n\n var _usePollVote = Object(data_hooks__WEBPACK_IMPORTED_MODULE_20__[\"usePollVote\"])(pollIdFromApi, attributes.hasOneResponsePerComputer),\n hasVoted = _usePollVote.hasVoted,\n isVoting = _usePollVote.isVoting,\n vote = _usePollVote.vote;\n\n var handleSubmit = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee(selectedAnswerIds) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n setErrorMessage('');\n setDismissSubmitMessage(false);\n _context.next = 5;\n return vote(selectedAnswerIds);\n\n case 5:\n if (blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ConfirmMessageType\"].REDIRECT === attributes.confirmMessageType) {\n window.open(attributes.redirectAddress);\n }\n\n _context.next = 11;\n break;\n\n case 8:\n _context.prev = 8;\n _context.t0 = _context[\"catch\"](0);\n\n if (_context.t0 instanceof data_poll__WEBPACK_IMPORTED_MODULE_21__[\"CrowdsignalFormsError\"]) {\n setErrorMessage(_context.t0.message);\n } else {\n setErrorMessage(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Server error. Please try again.', 'crowdsignal-forms'));\n }\n\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[0, 8]]);\n }));\n\n return function handleSubmit(_x) {\n return _ref2.apply(this, arguments);\n };\n }();\n\n var isClosed = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__[\"isPollClosed\"])(attributes.pollStatus, attributes.closedAfterDateTime);\n\n if (isClosed && blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ClosedPollState\"].HIDDEN === attributes.closedPollState) {\n return null;\n }\n\n var showResults = isClosed && blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ClosedPollState\"].SHOW_RESULTS === attributes.closedPollState || hasVoted && blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ConfirmMessageType\"].RESULTS === attributes.confirmMessageType;\n var showSubmitMessage = hasVoted && !showResults && !dismissSubmitMessage && blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ConfirmMessageType\"].REDIRECT !== attributes.confirmMessageType;\n var hasDefaultThankyou = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_13__[\"ConfirmMessageType\"].THANK_YOU === attributes.confirmMessageType;\n var classes = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__[\"getBlockCssClasses\"])(attributes, attributes.className, 'crowdsignal-forms-poll', {\n 'has-voted': hasVoted,\n 'is-closed': isClosed,\n 'is-voting': isVoting,\n 'has-default-thankyou': hasDefaultThankyou\n });\n\n var blockStyle = _objectSpread({\n width: attributes.align !== 'full' ? \"\".concat(attributes.width, \"%\") : 'auto'\n }, Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleVars\"])(attributes, fallbackStyles));\n\n var answerClientIdMap = Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"reduce\"])(apiPollData.answers, function (accum, answer) {\n accum[answer.client_id] = answer.id;\n return accum;\n }, {});\n var answersWithIds = Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"map\"])(attributes.answers, function (answerWithoutIdFromApi) {\n var answerIdFromApi = answerClientIdMap[answerWithoutIdFromApi.answerId];\n return _objectSpread({}, answerWithoutIdFromApi, {\n answerIdFromApi: answerIdFromApi\n });\n });\n var answers = Object(_util__WEBPACK_IMPORTED_MODULE_19__[\"shuffleWithGenerator\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_8__[\"filter\"])(answersWithIds, function (answer) {\n return !!answer.text;\n }), attributes.randomizeAnswers ? new seedrandom__WEBPACK_IMPORTED_MODULE_7___default.a(randomAnswerSeed) : function () {\n return 1;\n });\n var contentClasses = classnames__WEBPACK_IMPORTED_MODULE_9___default()({\n 'is-transparent': showSubmitMessage\n }, 'crowdsignal-forms-poll__content');\n var answerStyle = Object(blocks_poll_util__WEBPACK_IMPORTED_MODULE_12__[\"getAnswerStyle\"])(attributes, attributes.className);\n\n if (attributes.fontFamily) {\n Object(_util__WEBPACK_IMPORTED_MODULE_19__[\"loadCustomFont\"])(attributes.fontFamily);\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(\"div\", {\n className: classes,\n style: blockStyle\n }, errorMessage && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(_error_banner__WEBPACK_IMPORTED_MODULE_22__[\"default\"], null, errorMessage), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(\"div\", {\n className: contentClasses\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(\"h3\", {\n className: \"crowdsignal-forms-poll__question\"\n }, Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_10__[\"decodeEntities\"])(attributes.question)), attributes.note && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(\"p\", {\n className: \"crowdsignal-forms-poll__note\"\n }, Object(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_10__[\"decodeEntities\"])(attributes.note)), !showResults && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(_vote__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n answers: answers,\n answerStyle: answerStyle,\n buttonAlignment: attributes.buttonAlignment,\n isMultipleChoice: attributes.isMultipleChoice,\n onSubmit: handleSubmit,\n submitButtonLabel: attributes.submitButtonLabel,\n hasVoted: hasVoted,\n isVoting: isVoting,\n hideBranding: attributes.hideBranding\n }), showResults && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(_results__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n pollIdFromApi: pollIdFromApi,\n answers: answers,\n setErrorMessage: setErrorMessage,\n hideBranding: attributes.hideBranding\n })), showSubmitMessage && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(_submit_message__WEBPACK_IMPORTED_MODULE_23__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, attributes, {\n setDismissSubmitMessage: setDismissSubmitMessage\n })), (isClosed || hasVoted) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"])(_closed_banner__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n showSubmitMessage: showSubmitMessage,\n isPollClosed: isClosed,\n hasVoted: hasVoted\n }), renderStyleProbe());\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(components_with_fallback_styles__WEBPACK_IMPORTED_MODULE_14__[\"withFallbackStyles\"])(_styles__WEBPACK_IMPORTED_MODULE_18__[\"PollStyles\"], _styles__WEBPACK_IMPORTED_MODULE_18__[\"getPollStyles\"])(Poll));\n\n//# sourceURL=webpack:///./client/components/poll/index.js?");
|
218 |
+
|
219 |
+
/***/ }),
|
220 |
+
|
221 |
+
/***/ "./client/components/poll/results.js":
|
222 |
+
/*!*******************************************!*\
|
223 |
+
!*** ./client/components/poll/results.js ***!
|
224 |
+
\*******************************************/
|
225 |
+
/*! exports provided: default */
|
226 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
227 |
+
|
228 |
+
"use strict";
|
229 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var data_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! data/hooks */ \"./client/data/hooks/index.js\");\n/* harmony import */ var _answer_results__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./answer-results */ \"./client/components/poll/answer-results.js\");\n/* harmony import */ var _footer_branding__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./footer-branding */ \"./client/components/poll/footer-branding.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./util */ \"./client/components/poll/util.js\");\n\n\n/**\n * External dependencies\n */\n\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\nvar PollResults = function PollResults(_ref) {\n var answers = _ref.answers,\n pollIdFromApi = _ref.pollIdFromApi,\n setErrorMessage = _ref.setErrorMessage,\n hideBranding = _ref.hideBranding;\n\n var _usePollResults = Object(data_hooks__WEBPACK_IMPORTED_MODULE_6__[\"usePollResults\"])(pollIdFromApi),\n error = _usePollResults.error,\n loading = _usePollResults.loading,\n results = _usePollResults.results;\n\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n setErrorMessage(error ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"__\"])(\"Unfortunately, we're having some trouble retrieving \" + \"the results for this poll at this time.\", 'crowdsignal-forms') : '');\n }, [error]);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('crowdsignal-forms-poll__results', {\n 'is-error': !!error,\n 'is-loading': loading\n });\n var total = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"sum\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(results));\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: classes\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__results-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(answers, function (answer) {\n var _results$answer$answe;\n\n return !Object(_util__WEBPACK_IMPORTED_MODULE_9__[\"isAnswerEmpty\"])(answer) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_answer_results__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n key: answer.answerId,\n error: !!error,\n loading: loading,\n text: answer.text,\n totalVotes: total,\n votes: results ? (_results$answer$answe = results[answer.answerIdFromApi]) !== null && _results$answer$answe !== void 0 ? _results$answer$answe : 0 : 0\n });\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__results-footer\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"span\", {\n className: \"crowdsignal-forms-poll__results-total\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"sprintf\"])( // translators: %s: Number of votes\n Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__[\"_n\"])('%s total vote', '%s total votes', total, 'crowdsignal-forms'), total ? total.toLocaleString() : 0)), !hideBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_footer_branding__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null)));\n};\n\nPollResults.propTypes = {\n pollIdFromApi: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n answers: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.shape({\n answerId: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string.isRequired,\n answerIdFromApi: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n text: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string\n })).isRequired,\n setErrorMessage: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n hideBranding: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollResults);\n\n//# sourceURL=webpack:///./client/components/poll/results.js?");
|
230 |
+
|
231 |
+
/***/ }),
|
232 |
+
|
233 |
+
/***/ "./client/components/poll/styles.js":
|
234 |
+
/*!******************************************!*\
|
235 |
+
!*** ./client/components/poll/styles.js ***!
|
236 |
+
\******************************************/
|
237 |
+
/*! exports provided: getPollStyles, PollStyles */
|
238 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
239 |
+
|
240 |
+
"use strict";
|
241 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getPollStyles\", function() { return getPollStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PollStyles\", function() { return PollStyles; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/with-fallback-styles/util */ \"./client/components/with-fallback-styles/util.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\nvar getPollStyles = function getPollStyles(node) {\n if (null === node) {\n return {};\n }\n\n var buttonNode = node.querySelector('.wp-block-button__link');\n var textNode = node.querySelector('p');\n var h3Node = node.querySelector('h3');\n var wideContentNode = node.querySelector('.alignwide');\n var accentColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(buttonNode);\n var surfaceColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBackgroundColor\"])(textNode);\n var textColor = window.getComputedStyle(textNode).color; // Ensure that we don't end up with the same color for surface and accent.\n // Falls back to button border color, then text color.\n\n if (accentColor === surfaceColor) {\n var borderColor = Object(components_with_fallback_styles_util__WEBPACK_IMPORTED_MODULE_2__[\"getBorderColor\"])(buttonNode);\n accentColor = borderColor ? borderColor : textColor;\n }\n\n return {\n accent: accentColor,\n surface: surfaceColor,\n text: textColor,\n bodyFontFamily: window.getComputedStyle(textNode).fontFamily,\n questionFontFamily: window.getComputedStyle(h3Node).fontFamily,\n textInverted: window.getComputedStyle(buttonNode).color,\n contentWideWidth: window.getComputedStyle(wideContentNode).maxWidth\n };\n};\nvar PollStyles = function PollStyles() {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"p\", null), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"h3\", null, \"Question\"), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"wp-block-button__link\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"entry-content\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"alignwide\"\n })));\n};\n\n//# sourceURL=webpack:///./client/components/poll/styles.js?");
|
242 |
+
|
243 |
+
/***/ }),
|
244 |
+
|
245 |
+
/***/ "./client/components/poll/submit-message.js":
|
246 |
+
/*!**************************************************!*\
|
247 |
+
!*** ./client/components/poll/submit-message.js ***!
|
248 |
+
\**************************************************/
|
249 |
+
/*! exports provided: default */
|
250 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
251 |
+
|
252 |
+
"use strict";
|
253 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n/* harmony import */ var components_icon_close__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! components/icon/close */ \"./client/components/icon/close.js\");\n/* harmony import */ var components_icon_check_circle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! components/icon/check-circle */ \"./client/components/icon/check-circle.js\");\n/* harmony import */ var components_icon_thank_you__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! components/icon/thank-you */ \"./client/components/icon/thank-you.js\");\n/* harmony import */ var _footer_branding__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./footer-branding */ \"./client/components/poll/footer-branding.js\");\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\nvar toggleAnimationPlayPause = function toggleAnimationPlayPause(event) {\n var player = event.target;\n\n if (!player) {\n return;\n }\n\n if (player.paused) {\n player.play();\n } else {\n player.pause();\n }\n};\n\nvar SubmitMessage = function SubmitMessage(_ref) {\n var confirmMessageType = _ref.confirmMessageType,\n customConfirmMessage = _ref.customConfirmMessage,\n setDismissSubmitMessage = _ref.setDismissSubmitMessage,\n hideBranding = _ref.hideBranding;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__submit-message-container\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__submit-message\"\n }, blocks_poll_constants__WEBPACK_IMPORTED_MODULE_3__[\"ConfirmMessageType\"].THANK_YOU === confirmMessageType && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"video\", {\n muted: true,\n autoPlay: true,\n loop: true,\n playsInline: true,\n poster: \"https://crowdsignal.files.wordpress.com/2020/02/thumbs-up-video-placeholder.jpg\",\n width: \"100%\",\n onClick: toggleAnimationPlayPause\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"source\", {\n src: \"https://crowdsignal.files.wordpress.com/2019/08/thumbs-up-cs.mp4\",\n type: \"video/mp4\"\n })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_thank_you__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: \"crowdsignal-forms-poll__thank-you-sticker\"\n }), !hideBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"img\", {\n className: \"crowdsignal-forms-poll__thank-you-cs-sticker\",\n src: \"https://app.crowdsignal.com/images/svg/cs-logo-dots.svg\",\n alt: \"Crowdsignal sticker\"\n })), blocks_poll_constants__WEBPACK_IMPORTED_MODULE_3__[\"ConfirmMessageType\"].CUSTOM_TEXT === confirmMessageType && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__custom-message-check\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_check_circle__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__custom-message\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(customConfirmMessage) ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Thanks for voting!', 'crowdsignal-forms') : customConfirmMessage)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"button\", {\n className: \"crowdsignal-forms-poll__dismiss-submit-message\",\n onClick: function onClick() {\n return setDismissSubmitMessage(true);\n }\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_icon_close__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__submit-message-footer\"\n }, !hideBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(_footer_branding__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n showLogo: blocks_poll_constants__WEBPACK_IMPORTED_MODULE_3__[\"ConfirmMessageType\"].THANK_YOU !== confirmMessageType\n })));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SubmitMessage);\n\n//# sourceURL=webpack:///./client/components/poll/submit-message.js?");
|
254 |
+
|
255 |
+
/***/ }),
|
256 |
+
|
257 |
+
/***/ "./client/components/poll/util.js":
|
258 |
+
/*!****************************************!*\
|
259 |
+
!*** ./client/components/poll/util.js ***!
|
260 |
+
\****************************************/
|
261 |
+
/*! exports provided: addApiAnswerIds, shuffleWithGenerator, isAnswerEmpty, loadCustomFont */
|
262 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
263 |
+
|
264 |
+
"use strict";
|
265 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addApiAnswerIds\", function() { return addApiAnswerIds; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shuffleWithGenerator\", function() { return shuffleWithGenerator; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAnswerEmpty\", function() { return isAnswerEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCustomFont\", function() { return loadCustomFont; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n/**\n * Adds api answer ids to the answer objects (when they are available).\n *\n * @param {Array} answers Answers array\n * @param {Array} answerIdMap A json object with client answer ids as keys, and API answer ids as values.\n * @return {Array} Updated answers array\n */\n\nvar addApiAnswerIds = function addApiAnswerIds(answers, answerIdMap) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(answers, function (answer) {\n if (typeof answer.answerIdFromApi !== 'undefined') {\n return answer;\n }\n\n return _objectSpread({}, answer, {\n answerIdFromApi: answerIdMap[answer.answerId]\n });\n });\n};\n/**\n * Fisher-Yates algorithm shuffle implementation.\n * Provides a predictable way of shuffling array items given a seed.\n *\n * @param {Array} toShuffle The array to shuffle.\n * @param {Function} randomNumberGenerator A function that generates a random number (like `seedrandom`).\n * @return {Array} The shuffled array.\n */\n\nvar shuffleWithGenerator = function shuffleWithGenerator(toShuffle, randomNumberGenerator) {\n var shuffled = toShuffle.slice();\n\n for (var i = shuffled.length - 1; i > 0; i--) {\n var j = Math.floor(randomNumberGenerator() * i);\n var tmp = shuffled[i];\n shuffled[i] = shuffled[j];\n shuffled[j] = tmp;\n }\n\n return shuffled;\n};\n/**\n * Determines if an answer is considered \"empty\", based on if text is set and blank or object has no values.\n *\n * @param {*} answer The answer object.\n */\n\nvar isAnswerEmpty = function isAnswerEmpty(answer) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(answer) || 'undefined' === typeof answer.text || null === answer.text || '' === answer.text;\n};\n/**\n * Loads a custom google font, by name, only once per page if called more than once for the same font.\n *\n * @param {*} font The name of the Google font\n */\n\nvar loadCustomFont = function loadCustomFont(font) {\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(font) || blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__[\"FontFamilyType\"].THEME_DEFAULT === font || -1 === blocks_poll_constants__WEBPACK_IMPORTED_MODULE_2__[\"GoogleFonts\"].indexOf(font)) {\n return;\n }\n\n var googleFontsLink = \"https://fonts.googleapis.com/css2?family=\".concat(font, \":wght@400;600;700&display=swap\");\n var crowdsignalFonts = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"filter\"])(Array.from(document.head.childNodes), function (node) {\n return node.nodeName.toLowerCase() === 'link' && node.href === googleFontsLink;\n });\n\n if (crowdsignalFonts.length === 0) {\n document.head.appendChild(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"tap\"])(document.createElement('link'), function (link) {\n link.type = 'text/css';\n link.rel = 'stylesheet';\n link.href = googleFontsLink;\n }));\n }\n};\n\n//# sourceURL=webpack:///./client/components/poll/util.js?");
|
266 |
+
|
267 |
+
/***/ }),
|
268 |
+
|
269 |
+
/***/ "./client/components/poll/vote.js":
|
270 |
+
/*!****************************************!*\
|
271 |
+
!*** ./client/components/poll/vote.js ***!
|
272 |
+
\****************************************/
|
273 |
+
/*! exports provided: default */
|
274 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
275 |
+
|
276 |
+
"use strict";
|
277 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ \"./node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n/* harmony import */ var _answer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./answer */ \"./client/components/poll/answer.js\");\n/* harmony import */ var _footer_branding__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./footer-branding */ \"./client/components/poll/footer-branding.js\");\n\n\n\n\n\n/**\n * External dependencies\n */\n\n\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\nvar PollVote = function PollVote(_ref) {\n var answers = _ref.answers,\n answerStyle = _ref.answerStyle,\n buttonAlignment = _ref.buttonAlignment,\n hasVoted = _ref.hasVoted,\n isMultipleChoice = _ref.isMultipleChoice,\n isVoting = _ref.isVoting,\n onSubmit = _ref.onSubmit,\n submitButtonLabel = _ref.submitButtonLabel,\n hideBranding = _ref.hideBranding;\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"])([]),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),\n selected = _useState2[0],\n setSelected = _useState2[1];\n\n var handleSelect = function handleSelect(answerId) {\n if (blocks_poll_constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].BUTTON === answerStyle) {\n setSelected([answerId]);\n return onSubmit([answerId]);\n }\n\n if (!isMultipleChoice) {\n return setSelected([answerId]);\n }\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"includes\"])(selected, answerId)) {\n return setSelected(Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"without\"])(selected, answerId));\n }\n\n setSelected([].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(selected), [answerId]));\n };\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"])([]),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),\n focused = _useState4[0],\n setFocused = _useState4[1];\n\n var handleFocus = function handleFocus(answerId) {\n return setFocused([answerId]);\n };\n\n var handleSubmit = function handleSubmit(event) {\n event.preventDefault();\n onSubmit(selected);\n };\n\n var classes = classnames__WEBPACK_IMPORTED_MODULE_7___default()({\n 'is-button': blocks_poll_constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].BUTTON === answerStyle,\n 'is-inline-button-alignment': blocks_poll_constants__WEBPACK_IMPORTED_MODULE_8__[\"ButtonAlignment\"].INLINE === buttonAlignment\n }, 'crowdsignal-forms-poll__options');\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"form\", {\n className: \"crowdsignal-forms-poll__form\",\n onSubmit: handleSubmit\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: classes\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(answers, function (answer, index) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_answer__WEBPACK_IMPORTED_MODULE_9__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n key: \"poll-answer-\".concat(index),\n answerStyle: answerStyle,\n isMultipleChoice: isMultipleChoice,\n isSelected: Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"includes\"])(selected, answer.answerIdFromApi),\n isFocused: Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"includes\"])(focused, answer.answerIdFromApi),\n onSelect: handleSelect,\n onFocus: handleFocus,\n hasVoted: hasVoted,\n isVoting: isVoting\n }, answer));\n })), !hasVoted && blocks_poll_constants__WEBPACK_IMPORTED_MODULE_8__[\"AnswerStyle\"].RADIO === answerStyle && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms-poll__actions\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: \"wp-block-button crowdsignal-forms-poll__block-button\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"input\", {\n type: \"submit\",\n className: \"wp-block-button__link crowdsignal-forms-poll__submit-button\",\n disabled: isVoting || !selected.length,\n value: submitButtonLabel\n }))), !hideBranding && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(\"div\", {\n className: \"wp_block-crowdsignal-forms-poll__vote-branding\"\n }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"])(_footer_branding__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n showLogo: false\n })));\n};\n\nPollVote.propTypes = {\n answers: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.array.isRequired,\n isMultipleChoice: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n onSubmit: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func.isRequired,\n submitButtonLabel: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string.isRequired\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PollVote);\n\n//# sourceURL=webpack:///./client/components/poll/vote.js?");
|
278 |
+
|
279 |
+
/***/ }),
|
280 |
+
|
281 |
+
/***/ "./client/components/with-fallback-styles/index.js":
|
282 |
+
/*!*********************************************************!*\
|
283 |
+
!*** ./client/components/with-fallback-styles/index.js ***!
|
284 |
+
\*********************************************************/
|
285 |
+
/*! exports provided: withFallbackStyles */
|
286 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
287 |
+
|
288 |
+
"use strict";
|
289 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withFallbackStyles\", function() { return withFallbackStyles; });\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\n\n\n\nvar StyleProbe = function StyleProbe(_ref) {\n var children = _ref.children;\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(\"div\", {\n className: \"crowdsignal-forms__style-probe\"\n }, children);\n};\n\nvar withFallbackStyles = function withFallbackStyles(VirtualComponent, getStyles) {\n return function (WrappedComponent) {\n var getFallbackStyles = Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__[\"withFallbackStyles\"])(function (node) {\n return {\n fallbackStyles: getStyles(node.querySelector('.crowdsignal-forms__style-probe'))\n };\n });\n return getFallbackStyles(function (_ref2) {\n var fallbackStyles = _ref2.fallbackStyles,\n props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_ref2, [\"fallbackStyles\"]);\n\n var renderProbe = function renderProbe() {\n if (fallbackStyles) {\n return null;\n }\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(StyleProbe, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(VirtualComponent, null));\n };\n\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"])(WrappedComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n fallbackStyles: fallbackStyles || {},\n renderStyleProbe: renderProbe\n }, props));\n });\n };\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/index.js?");
|
290 |
+
|
291 |
+
/***/ }),
|
292 |
+
|
293 |
+
/***/ "./client/components/with-fallback-styles/util.js":
|
294 |
+
/*!********************************************************!*\
|
295 |
+
!*** ./client/components/with-fallback-styles/util.js ***!
|
296 |
+
\********************************************************/
|
297 |
+
/*! exports provided: getBackgroundColor, getBorderColor */
|
298 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
299 |
+
|
300 |
+
"use strict";
|
301 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBackgroundColor\", function() { return getBackgroundColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getBorderColor\", function() { return getBorderColor; });\n/**\n * Traverses the parent chain of the given node to get a 'best guess' of\n * what the background color is if the provided node has a transparent background.\n * Algorithm for traversing parent chain \"borrowed\" from\n * https://github.com/WordPress/gutenberg/blob/0c6e369/packages/block-editor/src/components/colors/use-colors.js#L201-L216\n *\n * @param {Element} backgroundColorNode The element to check for background color\n * @return {string} The background colour of the node\n */\nvar getBackgroundColor = function getBackgroundColor(backgroundColorNode) {\n var backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n\n while (backgroundColor === 'rgba(0, 0, 0, 0)' && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === window.Node.ELEMENT_NODE) {\n backgroundColorNode = backgroundColorNode.parentNode;\n backgroundColor = window.getComputedStyle(backgroundColorNode).backgroundColor;\n }\n\n return backgroundColor;\n};\n/**\n * Gets the border color for a node, if it appears valid.\n * If we get '0px' for the width, then we likely don't have a border and return null.\n * We use 'borderBlockStartWidth' because of FF: https://bugzilla.mozilla.org/show_bug.cgi?id=137688\n *\n * @param {Element} borderNode The element to check for a border color\n * @return {string|null} The border colour value of null if invalid\n */\n\nvar getBorderColor = function getBorderColor(borderNode) {\n var borderWidth = window.getComputedStyle(borderNode).borderBlockStartWidth;\n return borderWidth !== '0px' ? window.getComputedStyle(borderNode).borderBlockStartColor : null;\n};\n\n//# sourceURL=webpack:///./client/components/with-fallback-styles/util.js?");
|
302 |
+
|
303 |
+
/***/ }),
|
304 |
+
|
305 |
+
/***/ "./client/data/hooks/index.js":
|
306 |
+
/*!************************************!*\
|
307 |
+
!*** ./client/data/hooks/index.js ***!
|
308 |
+
\************************************/
|
309 |
+
/*! exports provided: usePollResults, usePollVote, useIsCsConnected */
|
310 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
311 |
+
|
312 |
+
"use strict";
|
313 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollResults\", function() { return usePollResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"usePollVote\", function() { return usePollVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useIsCsConnected\", function() { return useIsCsConnected; });\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! js-cookie */ \"./node_modules/js-cookie/src/js.cookie.js\");\n/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var data_poll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! data/poll */ \"./client/data/poll/index.js\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ \"./client/data/hooks/util.js\");\n/* harmony import */ var blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! blocks/poll/constants */ \"./client/blocks/poll/constants.js\");\n\n\n\n\n/**\n * External dependencies\n */\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\nvar usePollResults = function usePollResults(pollId) {\n var doFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var _useFetch = Object(_util__WEBPACK_IMPORTED_MODULE_6__[\"useFetch\"])(function () {\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestResults\"])(pollId, doFetch);\n }, [pollId]),\n data = _useFetch.data,\n error = _useFetch.error,\n loading = _useFetch.loading;\n\n return {\n error: error,\n loading: loading,\n results: data\n };\n};\n/**\n * React Hook that returns state variables for voting status and a function to perform a vote.\n *\n * @param {number} pollId ID of the poll being loaded.\n * @param {boolean} enableVoteRestriction sets whether or not the vote cookie is read and set\n * @param {boolean} storeAnswerIdsInCookie sets whether or not the answer ids are stored in the vote restriction cookie\n */\n\nvar usePollVote = function usePollVote(pollId) {\n var enableVoteRestriction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var storeAnswerIdsInCookie = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var cookieName = \"cs-poll-\".concat(pollId);\n\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),\n isVoting = _useState2[0],\n setIsVoting = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(false),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),\n hasVoted = _useState4[0],\n setHasVoted = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(''),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),\n storedCookieValue = _useState6[0],\n setStoredCookieValue = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n if (enableVoteRestriction && undefined !== js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName)) {\n setHasVoted(true);\n setStoredCookieValue(js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.get(cookieName));\n }\n }, []);\n\n var vote = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(selectedAnswerIds) {\n var voteCount,\n nonce,\n cookieValue,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n voteCount = _args.length > 1 && _args[1] !== undefined ? _args[1] : 1;\n _context.prev = 1;\n setIsVoting(true);\n _context.next = 5;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVoteNonce\"])(pollId);\n\n case 5:\n nonce = _context.sent;\n _context.next = 8;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestVote\"])(nonce, pollId, selectedAnswerIds, voteCount);\n\n case 8:\n setHasVoted(true);\n\n if (enableVoteRestriction) {\n cookieValue = storeAnswerIdsInCookie ? selectedAnswerIds.join(',') : new Date().getTime();\n js_cookie__WEBPACK_IMPORTED_MODULE_4___default.a.set(cookieName, cookieValue, {\n sameSite: 'Strict',\n expires: 365\n });\n setStoredCookieValue(cookieValue);\n }\n\n case 10:\n _context.prev = 10;\n setIsVoting(false);\n return _context.finish(10);\n\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[1,, 10, 13]]);\n }));\n\n return function vote(_x) {\n return _ref.apply(this, arguments);\n };\n }();\n\n return {\n hasVoted: hasVoted,\n isVoting: isVoting,\n vote: vote,\n storedCookieValue: storedCookieValue\n };\n};\nvar useIsCsConnected = function useIsCsConnected() {\n /* assume connection is enabled, so placeholder doesn't flash while we add a block and wait for the request */\n var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),\n isConnected = _useState8[0],\n setIsConnected = _useState8[1];\n\n var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"])(true),\n _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),\n isAccountVerified = _useState10[0],\n setIsAccountVerified = _useState10[1];\n\n var checkIsConnected = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {\n var connectedState, isNowConnected, isNowVerified;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(data_poll__WEBPACK_IMPORTED_MODULE_5__[\"requestIsCsConnected\"])();\n\n case 2:\n connectedState = _context2.sent;\n isNowConnected = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState || blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].NOT_VERIFIED === connectedState;\n isNowVerified = blocks_poll_constants__WEBPACK_IMPORTED_MODULE_7__[\"ConnectedAccountState\"].CONNECTED === connectedState;\n setIsConnected(isNowConnected);\n setIsAccountVerified(isNowVerified);\n return _context2.abrupt(\"return\", {\n isNowConnected: isNowConnected,\n isNowVerified: isNowVerified\n });\n\n case 8:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function checkIsConnected() {\n return _ref2.apply(this, arguments);\n };\n }();\n\n Object(react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"])(function () {\n checkIsConnected();\n }, []);\n return {\n isConnected: isConnected,\n isAccountVerified: isAccountVerified,\n checkIsConnected: checkIsConnected\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/index.js?");
|
314 |
+
|
315 |
+
/***/ }),
|
316 |
+
|
317 |
+
/***/ "./client/data/hooks/util.js":
|
318 |
+
/*!***********************************!*\
|
319 |
+
!*** ./client/data/hooks/util.js ***!
|
320 |
+
\***********************************/
|
321 |
+
/*! exports provided: useFetch */
|
322 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
323 |
+
|
324 |
+
"use strict";
|
325 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useFetch\", function() { return useFetch; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n/**\n * External dependencies\n */\n\nvar useFetch = function useFetch(fetchCallback, watchProps) {\n var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n data = _useState2[0],\n setData = _useState2[1];\n\n var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(null),\n _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),\n error = _useState4[0],\n setError = _useState4[1];\n\n var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(true),\n _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),\n loading = _useState6[0],\n setLoading = _useState6[1];\n\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () {\n setLoading(true);\n setError(null);\n setData(null);\n fetchCallback().then(setData).catch(setError).finally(function () {\n return setLoading(false);\n });\n }, watchProps);\n return {\n data: data,\n error: error,\n loading: loading\n };\n};\n\n//# sourceURL=webpack:///./client/data/hooks/util.js?");
|
326 |
+
|
327 |
+
/***/ }),
|
328 |
+
|
329 |
+
/***/ "./client/data/poll/index.js":
|
330 |
+
/*!***********************************!*\
|
331 |
+
!*** ./client/data/poll/index.js ***!
|
332 |
+
\***********************************/
|
333 |
+
/*! exports provided: requestResults, requestVoteNonce, requestVote, CrowdsignalFormsError, CrowdsignalFormsServerError, requestIsCsConnected */
|
334 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
335 |
+
|
336 |
+
"use strict";
|
337 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestResults\", function() { return requestResults; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVoteNonce\", function() { return requestVoteNonce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestVote\", function() { return requestVote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsError\", function() { return CrowdsignalFormsError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrowdsignalFormsServerError\", function() { return CrowdsignalFormsServerError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"requestIsCsConnected\", function() { return requestIsCsConnected; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ \"./node_modules/@babel/runtime/helpers/wrapNativeSuper.js\");\n/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ \"@wordpress/api-fetch\");\n/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\n/**\n * External dependencies\n */\n\n\n/**\n * Fetch the poll results for the given pollId\n *\n * @param {number} pollId Poll ID.\n * @param {boolean} doFetch Whether or not to actually perform the request.\n * @return {Promise} Promise that resolves to a key-value object with answer IDs and vote counts.\n */\n\nvar requestResults = /*#__PURE__*/function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(pollId) {\n var doFetch,\n baseUrl,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n doFetch = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;\n baseUrl = 'https://api.crowdsignal.com/v3/polls';\n\n if (doFetch) {\n _context.next = 4;\n break;\n }\n\n return _context.abrupt(\"return\", null);\n\n case 4:\n return _context.abrupt(\"return\", window.fetch(\"\".concat(baseUrl, \"/\").concat(pollId, \"/results\"), {\n method: 'GET',\n headers: {\n 'content-type': 'application/json'\n }\n }).then(function (response) {\n if (response.status >= 200 && response.status < 300) {\n return response.json();\n }\n\n throw response;\n }).then(function (response) {\n if (404 === response.status) {\n // poll doesn't exist on the platform yet, return an empty result\n return {};\n } else if (response.error) {\n throw new Error(response.message);\n }\n\n return response.results.votes_by_answer;\n }));\n\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function requestResults(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar requestVoteNonce = /*#__PURE__*/function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(pollId) {\n var hash, timestamp, respNonce, jsonNonce;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n hash = '5430eeac3911395001d731d9702fc38b'; // hash not used when format=json is passed\n\n timestamp = new Date().getTime();\n _context2.next = 4;\n return window.fetch(\"https://polldaddy.com/n/\".concat(hash, \"/\").concat(pollId, \"?\").concat(timestamp, \"&format=json\"));\n\n case 4:\n respNonce = _context2.sent;\n\n if (respNonce.ok) {\n _context2.next = 7;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 7:\n _context2.next = 9;\n return respNonce.json();\n\n case 9:\n jsonNonce = _context2.sent;\n\n if (jsonNonce.nonce) {\n _context2.next = 12;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 12:\n return _context2.abrupt(\"return\", jsonNonce.nonce);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function requestVoteNonce(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar requestVote = /*#__PURE__*/function () {\n var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3(nonce, pollId, selectedAnswerIds, voteCount) {\n var answerString, respVote, jsonVote;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n answerString = selectedAnswerIds.join(',');\n _context3.next = 3;\n return window.fetch(\"https://polls.polldaddy.com/vote-js.php?format=json&p=\".concat(pollId, \"&b=1&a=\").concat(answerString, \"&o=&va=16&cookie=0&n=\").concat(nonce, \"&url=\").concat(encodeURIComponent(window.location), \"&vi=\").concat(voteCount));\n\n case 3:\n respVote = _context3.sent;\n\n if (respVote.ok) {\n _context3.next = 6;\n break;\n }\n\n throw new CrowdsignalFormsServerError();\n\n case 6:\n _context3.next = 8;\n return respVote.json();\n\n case 8:\n jsonVote = _context3.sent;\n\n if (!('error' === jsonVote.status)) {\n _context3.next = 11;\n break;\n }\n\n throw new CrowdsignalFormsError(jsonVote.error);\n\n case 11:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n\n return function requestVote(_x3, _x4, _x5, _x6) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar CrowdsignalFormsError = /*#__PURE__*/function (_Error) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsError, _Error);\n\n var _super = _createSuper(CrowdsignalFormsError);\n\n function CrowdsignalFormsError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsError);\n\n return _super.apply(this, arguments);\n }\n\n return CrowdsignalFormsError;\n}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error));\nvar CrowdsignalFormsServerError = /*#__PURE__*/function (_CrowdsignalFormsErro) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(CrowdsignalFormsServerError, _CrowdsignalFormsErro);\n\n var _super2 = _createSuper(CrowdsignalFormsServerError);\n\n function CrowdsignalFormsServerError() {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, CrowdsignalFormsServerError);\n\n return _super2.call(this, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__[\"__\"])('Server error. Please try again.', 'crowdsignal-forms'));\n }\n\n return CrowdsignalFormsServerError;\n}(CrowdsignalFormsError);\n/**\n * Returns the connected state of the current user's account.\n *\n * @return {string} Enum value of the account's state.\n */\n\nvar requestIsCsConnected = /*#__PURE__*/function () {\n var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee4() {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({\n path: \"/crowdsignal-forms/v1/account/connected\",\n method: 'GET'\n });\n\n case 2:\n return _context4.abrupt(\"return\", _context4.sent);\n\n case 3:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n\n return function requestIsCsConnected() {\n return _ref4.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack:///./client/data/poll/index.js?");
|
338 |
+
|
339 |
+
/***/ }),
|
340 |
+
|
341 |
+
/***/ "./client/lib/mutation-observer/index.js":
|
342 |
+
/*!***********************************************!*\
|
343 |
+
!*** ./client/lib/mutation-observer/index.js ***!
|
344 |
+
\***********************************************/
|
345 |
+
/*! exports provided: default */
|
346 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
347 |
+
|
348 |
+
"use strict";
|
349 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies\n */\n\n\n\nvar MutationObserver = function MutationObserver(dataAttributeName, blockBuilder) {\n if ('complete' === document.readyState) {\n return blockObserver(dataAttributeName, blockBuilder);\n }\n\n window.addEventListener('load', function () {\n return blockObserver(dataAttributeName, blockBuilder);\n });\n};\n\nvar initBlocks = function initBlocks(dataAttributeName, blockBuilder) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"forEach\"])(document.querySelectorAll(\"div[\".concat(dataAttributeName, \"]\")), function (element) {\n // Try-catch potentially prevents other blocks from breaking\n // when there's more then one on the page\n try {\n var attributes = JSON.parse(element.dataset[Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"camelCase\"])(dataAttributeName.substr('data-'.length))]);\n var block = blockBuilder(attributes, element);\n element.removeAttribute(dataAttributeName);\n Object(react_dom__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(block, element);\n } catch (error) {\n // eslint-disable-next-line\n console.error('Crowdsignal Forms: Failed to parse block data for: %s', dataAttributeName);\n }\n });\n};\n\nvar blockObserver = function blockObserver(dataAttributeName, blockBuilder) {\n if (!Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(window.CrowdsignalMutationObservers) && true === window.CrowdsignalMutationObservers[dataAttributeName]) {\n return;\n }\n\n var observer = new window.MutationObserver(function () {\n return initBlocks(dataAttributeName, blockBuilder);\n });\n observer.observe(document.body, {\n attributes: true,\n attributeFilter: [dataAttributeName],\n childList: true,\n subtree: true\n });\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isEmpty\"])(window.CrowdsignalMutationObservers)) {\n window.CrowdsignalMutationObservers = [];\n }\n\n window.CrowdsignalMutationObservers[dataAttributeName] = true; // Run the first pass on load\n\n initBlocks(dataAttributeName, blockBuilder);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (MutationObserver);\n\n//# sourceURL=webpack:///./client/lib/mutation-observer/index.js?");
|
350 |
+
|
351 |
+
/***/ }),
|
352 |
+
|
353 |
+
/***/ "./client/poll.js":
|
354 |
+
/*!************************!*\
|
355 |
+
!*** ./client/poll.js ***!
|
356 |
+
\************************/
|
357 |
+
/*! no exports provided */
|
358 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
359 |
+
|
360 |
+
"use strict";
|
361 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var components_poll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! components/poll */ \"./client/components/poll/index.js\");\n/* harmony import */ var lib_mutation_observer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lib/mutation-observer */ \"./client/lib/mutation-observer/index.js\");\n\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\n\n\nObject(lib_mutation_observer__WEBPACK_IMPORTED_MODULE_3__[\"default\"])('data-crowdsignal-poll', function (attributes) {\n return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(components_poll__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n attributes: attributes\n });\n});\n\n//# sourceURL=webpack:///./client/poll.js?");
|
362 |
+
|
363 |
+
/***/ }),
|
364 |
+
|
365 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
366 |
+
/*!*****************************************************************!*\
|
367 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
368 |
+
\*****************************************************************/
|
369 |
+
/*! no static exports found */
|
370 |
+
/***/ (function(module, exports) {
|
371 |
+
|
372 |
+
eval("function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");
|
373 |
+
|
374 |
+
/***/ }),
|
375 |
+
|
376 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
377 |
+
/*!***************************************************************!*\
|
378 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
379 |
+
\***************************************************************/
|
380 |
+
/*! no static exports found */
|
381 |
+
/***/ (function(module, exports) {
|
382 |
+
|
383 |
+
eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?");
|
384 |
+
|
385 |
+
/***/ }),
|
386 |
+
|
387 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
388 |
+
/*!******************************************************************!*\
|
389 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
390 |
+
\******************************************************************/
|
391 |
+
/*! no static exports found */
|
392 |
+
/***/ (function(module, exports, __webpack_require__) {
|
393 |
+
|
394 |
+
eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?");
|
395 |
+
|
396 |
+
/***/ }),
|
397 |
+
|
398 |
+
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
399 |
+
/*!**********************************************************************!*\
|
400 |
+
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
401 |
+
\**********************************************************************/
|
402 |
+
/*! no static exports found */
|
403 |
+
/***/ (function(module, exports) {
|
404 |
+
|
405 |
+
eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js?");
|
406 |
+
|
407 |
+
/***/ }),
|
408 |
+
|
409 |
+
/***/ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js":
|
410 |
+
/*!*****************************************************************!*\
|
411 |
+
!*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
|
412 |
+
\*****************************************************************/
|
413 |
+
/*! no static exports found */
|
414 |
+
/***/ (function(module, exports) {
|
415 |
+
|
416 |
+
eval("function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js?");
|
417 |
+
|
418 |
+
/***/ }),
|
419 |
+
|
420 |
+
/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
421 |
+
/*!***************************************************************!*\
|
422 |
+
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
423 |
+
\***************************************************************/
|
424 |
+
/*! no static exports found */
|
425 |
+
/***/ (function(module, exports) {
|
426 |
+
|
427 |
+
eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js?");
|
428 |
+
|
429 |
+
/***/ }),
|
430 |
+
|
431 |
+
/***/ "./node_modules/@babel/runtime/helpers/construct.js":
|
432 |
+
/*!**********************************************************!*\
|
433 |
+
!*** ./node_modules/@babel/runtime/helpers/construct.js ***!
|
434 |
+
\**********************************************************/
|
435 |
+
/*! no static exports found */
|
436 |
+
/***/ (function(module, exports, __webpack_require__) {
|
437 |
+
|
438 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ \"./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/construct.js?");
|
439 |
+
|
440 |
+
/***/ }),
|
441 |
+
|
442 |
+
/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
|
443 |
+
/*!***************************************************************!*\
|
444 |
+
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
445 |
+
\***************************************************************/
|
446 |
+
/*! no static exports found */
|
447 |
+
/***/ (function(module, exports) {
|
448 |
+
|
449 |
+
eval("function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js?");
|
450 |
+
|
451 |
+
/***/ }),
|
452 |
+
|
453 |
+
/***/ "./node_modules/@babel/runtime/helpers/extends.js":
|
454 |
+
/*!********************************************************!*\
|
455 |
+
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
|
456 |
+
\********************************************************/
|
457 |
+
/*! no static exports found */
|
458 |
+
/***/ (function(module, exports) {
|
459 |
+
|
460 |
+
eval("function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/extends.js?");
|
461 |
+
|
462 |
+
/***/ }),
|
463 |
+
|
464 |
+
/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
465 |
+
/*!***************************************************************!*\
|
466 |
+
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
467 |
+
\***************************************************************/
|
468 |
+
/*! no static exports found */
|
469 |
+
/***/ (function(module, exports) {
|
470 |
+
|
471 |
+
eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js?");
|
472 |
+
|
473 |
+
/***/ }),
|
474 |
+
|
475 |
+
/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
|
476 |
+
/*!*********************************************************!*\
|
477 |
+
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
478 |
+
\*********************************************************/
|
479 |
+
/*! no static exports found */
|
480 |
+
/***/ (function(module, exports, __webpack_require__) {
|
481 |
+
|
482 |
+
eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/inherits.js?");
|
483 |
+
|
484 |
+
/***/ }),
|
485 |
+
|
486 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeFunction.js":
|
487 |
+
/*!*****************************************************************!*\
|
488 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
|
489 |
+
\*****************************************************************/
|
490 |
+
/*! no static exports found */
|
491 |
+
/***/ (function(module, exports) {
|
492 |
+
|
493 |
+
eval("function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeFunction.js?");
|
494 |
+
|
495 |
+
/***/ }),
|
496 |
+
|
497 |
+
/***/ "./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
|
498 |
+
/*!*************************************************************************!*\
|
499 |
+
!*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
|
500 |
+
\*************************************************************************/
|
501 |
+
/*! no static exports found */
|
502 |
+
/***/ (function(module, exports) {
|
503 |
+
|
504 |
+
eval("function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?");
|
505 |
+
|
506 |
+
/***/ }),
|
507 |
+
|
508 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
509 |
+
/*!****************************************************************!*\
|
510 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
511 |
+
\****************************************************************/
|
512 |
+
/*! no static exports found */
|
513 |
+
/***/ (function(module, exports) {
|
514 |
+
|
515 |
+
eval("function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js?");
|
516 |
+
|
517 |
+
/***/ }),
|
518 |
+
|
519 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
520 |
+
/*!*********************************************************************!*\
|
521 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
522 |
+
\*********************************************************************/
|
523 |
+
/*! no static exports found */
|
524 |
+
/***/ (function(module, exports) {
|
525 |
+
|
526 |
+
eval("function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports
|