Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 3.1.12 |
Comparing to | |
See all releases |
Code changes from version 3.1.11 to 3.1.12
- CHANGELOG.md +12 -1
- assets/js/admin.js +5 -6
- assets/js/admin.min.js +1 -1
- assets/js/admin.min.js.map +1 -1
- assets/js/forms-api.js +30 -21
- assets/js/forms-api.min.js +1 -1
- assets/js/forms-api.min.js.map +1 -1
- includes/admin/class-admin.php +5 -10
- includes/class-api.php +4 -2
- includes/class-field-map.php +11 -9
- includes/forms/class-admin.php +1 -1
- includes/forms/class-asset-manager.php +38 -59
- includes/forms/class-form-listener.php +5 -3
- includes/forms/class-form-manager.php +1 -1
- includes/forms/class-form-tags.php +2 -1
- includes/forms/views/parts/dynamic-content-tags.php +1 -1
- includes/functions.php +5 -1
- includes/views/parts/update-4.x-notice.php +0 -2
- languages/mailchimp-for-wp-el_GR.mo +0 -0
- languages/mailchimp-for-wp-el_GR.po +618 -1838
- languages/mailchimp-for-wp-fr_FR.mo +0 -0
- languages/mailchimp-for-wp-fr_FR.po +6 -5
- mailchimp-for-wp.php +2 -2
- readme.txt +14 -2
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_real_52.php +3 -3
CHANGELOG.md
CHANGED
@@ -1,13 +1,24 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 3.1.11 - July 5, 2016
|
5 |
|
6 |
**Improvements**
|
7 |
|
8 |
- Update JavaScript dependencies for admin screens.
|
9 |
- Test debug log & show notice when it's not writable.
|
10 |
-
- Reset browser appearance of `<select>` elements in form themes.
|
11 |
|
12 |
**Additions**
|
13 |
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 3.1.12 - July 28. 2016
|
5 |
+
|
6 |
+
**Improvements**
|
7 |
+
|
8 |
+
- Smarter scrolling after submitting form & reloading page.
|
9 |
+
- Format output of `{subscriber_count}` tag.
|
10 |
+
- You can now use `<img>` in your form messages.
|
11 |
+
- Add MailChimp API error code to debug log lines.
|
12 |
+
- Add plugin name + version to User-Agent header for all MailChimp API requests.
|
13 |
+
- Make sure value of MC_LANGUAGE field is limited to 2 characters.
|
14 |
+
|
15 |
+
|
16 |
#### 3.1.11 - July 5, 2016
|
17 |
|
18 |
**Improvements**
|
19 |
|
20 |
- Update JavaScript dependencies for admin screens.
|
21 |
- Test debug log & show notice when it's not writable.
|
|
|
22 |
|
23 |
**Additions**
|
24 |
|
assets/js/admin.js
CHANGED
@@ -74,19 +74,18 @@ helpers.debounce = function(func, wait, immediate) {
|
|
74 |
Array.prototype.forEach.call( showIfElements, function(element) {
|
75 |
var config = JSON.parse( element.getAttribute('data-showif') );
|
76 |
var parentElements = document.querySelectorAll('[name="'+ config.element +'"]');
|
77 |
-
|
78 |
var inputs = element.querySelectorAll('input,select,textarea:not([readonly])');
|
79 |
var hide = config.hide === undefined || config.hide;
|
80 |
|
81 |
function toggleElement() {
|
82 |
|
83 |
-
// do nothing with unchecked
|
84 |
-
if(
|
85 |
return;
|
86 |
}
|
87 |
|
88 |
-
|
89 |
-
var conditionMet = (
|
90 |
|
91 |
if( hide ) {
|
92 |
element.style.display = conditionMet ? '' : 'none';
|
@@ -97,7 +96,7 @@ helpers.debounce = function(func, wait, immediate) {
|
|
97 |
|
98 |
// disable input fields to stop sending their values to server
|
99 |
Array.prototype.forEach.call( inputs, function(inputElement) {
|
100 |
-
conditionMet ?
|
101 |
});
|
102 |
}
|
103 |
|
74 |
Array.prototype.forEach.call( showIfElements, function(element) {
|
75 |
var config = JSON.parse( element.getAttribute('data-showif') );
|
76 |
var parentElements = document.querySelectorAll('[name="'+ config.element +'"]');
|
|
|
77 |
var inputs = element.querySelectorAll('input,select,textarea:not([readonly])');
|
78 |
var hide = config.hide === undefined || config.hide;
|
79 |
|
80 |
function toggleElement() {
|
81 |
|
82 |
+
// do nothing with unchecked radio inputs
|
83 |
+
if( this.getAttribute('type') === "radio" && ! this.checked ) {
|
84 |
return;
|
85 |
}
|
86 |
|
87 |
+
var value = ( this.getAttribute("type") === "checkbox" ) ? this.checked : this.value;
|
88 |
+
var conditionMet = ( value == config.value );
|
89 |
|
90 |
if( hide ) {
|
91 |
element.style.display = conditionMet ? '' : 'none';
|
96 |
|
97 |
// disable input fields to stop sending their values to server
|
98 |
Array.prototype.forEach.call( inputs, function(inputElement) {
|
99 |
+
conditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly','readonly');
|
100 |
});
|
101 |
}
|
102 |
|
assets/js/admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function n(t,r,o){function i(u,l){if(!r[u]){if(!t[u]){var s="function"==typeof e&&e;if(!l&&s)return s(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return i(n?n:e)},f,f.exports,n,t,r,o)}return r[u].exports}for(var a="function"==typeof e&&e,u=0;u<o.length;u++)i(o[u]);return i}({1:[function(e,t,n){"use strict";var r=e("mithril"),o=e("wolfy87-eventemitter"),i=document.getElementById("mc4wp-admin"),a=new o,u=e("./admin/tabs.js")(i),l=e("./admin/helpers.js"),s=e("./admin/settings.js")(i,l,a);window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=l,window.mc4wp.events=a,window.mc4wp.settings=s,window.mc4wp.tabs=u},{"./admin/helpers.js":2,"./admin/settings.js":3,"./admin/tabs.js":4,mithril:6,"wolfy87-eventemitter":7}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("boolean"!=typeof this.checked||this.checked){var t=this.value==n.value;a?(e.style.display=t?"":"none",e.style.visibility=t?"":"hidden"):e.style.opacity=t?"":"0.4",Array.prototype.forEach.call(i,function(e){t?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),o=document.querySelectorAll('[name="'+n.element+'"]'),i=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(o,function(e){t.call(e)}),r.bindEventToElements(o,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){var r=function(e,t,n){"use strict";function r(e,t){return s.filter(function(n){return n[e]===t})}function o(){return s}function i(){return s=[],Array.prototype.forEach.call(u,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"==typeof l[e.value]&&s.push(l[e.value])}),n.trigger("selectedLists.change",[s]),s}function a(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){var t=e.getAttribute("data-list-id"),n=r("id",t).length>0;n?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var u=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),l=mc4wp_vars.mailchimp.lists,s=[];return n.on("selectedLists.change",a),t.bindEventToElements(u,"change",i),i(),{getSelectedLists:o}};t.exports=r},{}],4:[function(e,t,n){var r=function(t){"use strict";function n(e){for(var t=0;t<h.length;t++)if(h[t].id===e)return h[t]}function r(e,t){if("string"==typeof e&&(e=n(e)),!e)return!1;void 0==t&&(t=!0),c.removeClass("tab-active").css("display","none"),f.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var r=l.setParameter(window.location.href,"tab",e.id);return history.pushState&&t&&history.pushState(e.id,"",r),o(e),d.value=r,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function o(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function i(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var n=this.className.match(/nav-tab-(\w+)?/);n&&(t=n[1])}if(!t){var o=l.parse(this.href);if(!o.tab)return;t=o.tab}var i=r(t);return!i||(e.preventDefault(),e.returnValue=!1,!1)}function a(){if(history.pushState){var e=c.filter(":visible").get(0);if(e){var t=n(e.id.substring(4));t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),o(t))}}}var u=window.jQuery,l=e("./url.js"),s=u(t),c=s.find(".tab"),f=s.find(".nav-tab"),d=t.querySelector('input[name="_wp_http_referer"]'),h=[];return u.each(c,function(e,n){var o=n.id.substring(4),i=u(n).find("h2").first().text();h.push({id:o,title:i,element:n,nav:t.querySelectorAll(".nav-tab-"+o),open:function(){return r(o)}})}),f.click(i),u(document.body).on("click",".tab-link",i),a(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){if(!e.state)return!0;var t=e.state;return r(t,!1)}),{open:r,get:n}};t.exports=r},{"./url.js":5}],5:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var o=r.parse(e);return o[t]=n,r.build(o)}};t.exports=r},{}],6:[function(e,n,r){!function(e,r){"use strict";var o=r(e);"object"==typeof n&&null!=n&&n.exports?n.exports=o:"function"==typeof t&&t.amd?t(function(){return o}):e.m=o}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Object]"===Ne.call(e)}function o(e){return"[object String]"===Ne.call(e)}function i(){}function a(e){Ae=e.document,Ce=e.location,Le=e.cancelAnimationFrame||e.clearTimeout,Oe=e.requestAnimationFrame||e.setTimeout}function u(e,t){for(var n,r=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g;n=o.exec(t);)if(""===n[1]&&n[2])e.tag=n[2];else if("#"===n[1])e.attrs.id=n[2];else if("."===n[1])r.push(n[2]);else if("["===n[3][0]){var i=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(n[3]);e.attrs[i[1]]=i[3]||""}return r}function l(e,t){var n=t?e.slice(1):e;return 1===n.length&&ke(n[0])?n[0]:n}function s(e,t,n){var r="class"in t?"class":"className";for(var o in t)je.call(t,o)&&(o===r&&null!=t[o]&&""!==t[o]?(n.push(t[o]),e[o]=""):e[o]=t[o]);n.length&&(e[r]=n.join(" "))}function c(e,t){for(var n=[],i=1,a=arguments.length;i<a;i++)n[i-1]=arguments[i];if(r(e))return re(e,n);if(!o(e))throw new Error("selector in m(selector, attrs, children) should be a string");var c=null!=t&&r(t)&&!("tag"in t||"view"in t||"subtree"in t),f=c?t:{},d={tag:"div",attrs:{},children:l(n,c)};return s(d.attrs,f,u(d,e)),d}function f(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function d(e,t){f(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function h(e){try{if(null!=e&&null!=e.toString())return e}catch(t){}return""}function p(e,t,n,r){try{m(e,t,n),t.nodeValue=r}catch(o){}}function v(e){for(var t=0;t<e.length;t++)ke(e[t])&&(e=e.concat.apply([],e),t--);return e}function m(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function g(e,t,n,r){d(e,function(e,r){t[e=e.key]=t[e]?{action:_e,index:r,from:t[e].index,element:n.nodes[t[e].index]||Ae.createElement("div")}:{action:Re,index:r}});var o=[];for(var i in t)je.call(t,i)&&o.push(t[i]);var a=o.sort($),u=new Array(n.length);return u.nodes=n.nodes.slice(),f(a,function(t){var o=t.index;if(t.action===Te&&(G(n[o].nodes,n[o]),u.splice(o,1)),t.action===Re){var i=Ae.createElement("div");i.key=e[o].attrs.key,m(r,i,o),u.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),u.nodes[o]=i}if(t.action===_e){var a=t.element,l=r.childNodes[o];l!==a&&null!==a&&r.insertBefore(a,l||null),u[o]=n[t.from],u.nodes[o]=a}}),u}function y(e,t,n,r){var o=e.length!==t.length;return o||d(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?g(e,n,t,r):t}function w(e,t,n){f(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),f(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&G([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function b(e){var t=0;d(e,function(){return f(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function E(e,t,n){return e.tag!==t.tag||(n.sort().join()!==Object.keys(t.attrs).sort().join()||(e.attrs.id!==t.attrs.id||(e.attrs.key!==t.attrs.key||("all"===c.redraw.strategy()?!t.configContext||t.configContext.retain!==!0:"diff"===c.redraw.strategy()&&(t.configContext&&t.configContext.retain===!1)))))}function x(e,t,r){E(e,t,r)&&(t.nodes.length&&G(t.nodes),t.configContext&&n(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&f(t.controllers,function(e){e.onunload&&e.onunload({preventDefault:i})}))}function A(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function C(e,t,n){n.length&&(e.views=t,e.controllers=n,f(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Me&&e.onunload){var t=e.onunload;e.onunload=i,e.onunload.$old=t}}))}function O(e,t,r,o,i){if(n(t.attrs.config)){var a=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,r,!o,a,i)})}}function L(e,n,r,o,i,a,u,l){var s=e.nodes[0];return o&&F(s,n.tag,n.attrs,e.attrs,i),e.children=H(s,n.tag,t,t,n.children,e.children,!1,0,n.attrs.contenteditable?s:r,i,u),e.nodes.intact=!0,l.length&&(e.views=a,e.controllers=l),s}function j(e,t,n){var r;e.$trusted?r=Z(t,n,e):(r=[Ae.createTextNode(e)],t.nodeName in Se||m(t,r[0],n));var o;return o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e,o.nodes=r,o}function N(e,t,n,r,o,i){var a=t.nodes;return r&&r===Ae.activeElement||(e.$trusted?(G(a,t),a=Z(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===a[0].nodeType||a.length>1||a[0].nodeValue.trim&&!a[0].nodeValue.trim())&&(G(t.nodes,t),a=[Ae.createTextNode(e)]),p(n,a[0],o,e))),t=new e.constructor(e),t.nodes=a,t}function k(e,t,n,r,o,i,a){return e.nodes.length?e.valueOf()!==t.valueOf()||o?N(t,e,r,i,n,a):(e.nodes.intact=!0,e):j(t,r,n)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(ke(e))return e.length;return 1}function T(e,n,r,o,i,a,u,l,s){e=v(e);var c=[],f=n.length===e.length,h=0,p={},m=!1;d(n,function(e,t){m=!0,p[n[t].attrs.key]={action:Te,index:t}}),b(e),m&&(n=y(e,n,p,r));for(var g=0,E=0,x=e.length;E<x;E++){var A=H(r,i,n,o,e[E],n[g],a,o+h||h,u,l,s);A!==t&&(f=f&&A.nodes.intact,h+=S(A),n[g++]=A)}return f||w(e,n,c),n}function R(e,t,n,r,o){if(null!=t){if(Ne.call(t)===Ne.call(e))return t;if(o&&o.nodes){var i=n-r,a=i+(ke(e)?e:t.nodes).length;G(o.nodes.slice(i,a),o.slice(i,a))}else t.nodes&&G(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function _(e,t){return e.attrs.is?null==t?Ae.createElement(e.tag,e.attrs.is):Ae.createElementNS(t,e.tag,e.attrs.is):null==t?Ae.createElement(e.tag):Ae.createElementNS(t,e.tag)}function M(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function q(e,n,r,o,i,a){return null!=e.children&&e.children.length>0?H(n,e.tag,t,t,e.children,r.children,!0,0,e.attrs.contenteditable?n:o,i,a):e.children}function D(e,t,n,r,o,i,a){var u={tag:e.tag,attrs:t,children:n,nodes:[r]};return C(u,i,a),u.children&&!u.children.nodes&&(u.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),u}function I(e,t,r,o){var i;return i="diff"===c.redraw.strategy()&&e?e.indexOf(t):-1,i>-1?r[i]:n(o)?new o:{}}function P(e,t,n,r){null!=r.onunload&&De.map(function(e){return e.handler}).indexOf(r.onunload)<0&&De.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function U(e,t,n,r,o,i){var a=I(n.views,t,r,e.controller),u=e&&e.attrs&&e.attrs.key;return e=0===Me||Ie||r&&r.indexOf(a)>-1?e.view(a):{tag:"placeholder"},"retain"===e.subtree?e:(e.attrs=e.attrs||{},e.attrs.key=u,P(i,o,t,a),e)}function V(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=U(e,e.view.$original||e.view,t,o,r,n);return e}function z(e,t,n,r,i,a,u,l){var s=[],c=[];if(e=V(e,t,s,c),"retain"===e.subtree)return t;if(!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(x(e,t,f),o(e.tag)){var h=0===t.nodes.length;u=A(e,u);var p;if(h){p=_(e,u);var v=M(e,p,u,d);m(r,p,i);var g=q(e,p,t,n,u,l);t=D(e,v,g,p,u,s,c)}else p=L(t,e,n,d,u,s,l,c);return h||a!==!0||null==p||m(r,p,i),O(l,e,p,h,t),t}}function H(e,t,o,i,a,u,l,s,c,f,d){return a=h(a),"retain"===a.subtree?u:(u=R(a,u,s,i,o),ke(a)?T(a,u,e,s,t,l,c,f,d):null!=a&&r(a)?z(a,u,c,e,s,l,f,d):n(a)?u:k(u,a,s,e,l,c,t))}function $(e,t){return e.action-t.action||e.index-t.index}function B(e,t,n){for(var r in t)je.call(t,r)&&(null!=n&&n[r]===t[r]||(e.style[r]=t[r]));for(r in n)je.call(n,r)&&(je.call(t,r)||(e.style[r]=""))}function J(e,t,o,i,a,u){if("config"===t||"key"===t)return!0;if(n(o)&&"on"===t.slice(0,2))e[t]=ee(o,e);else if("style"===t&&null!=o&&r(o))B(e,o,i);else if(null!=u)"href"===t?e.setAttributeNS("http://www.w3.org/1999/xlink","href",o):e.setAttribute("className"===t?"class":t,o);else if(t in e&&!Pe[t])try{"input"===a&&e[t]===o||(e[t]=o)}catch(l){e.setAttribute(t,o)}else e.setAttribute(t,o)}function K(e,t,n,r,o,i,a){if(t in o&&r===n&&Ae.activeElement!==e)"value"===t&&"input"===i&&e.value!==n&&(e.value=n);else{o[t]=n;try{return J(e,t,n,r,i,a)}catch(u){if(u.message.indexOf("Invalid argument")<0)throw u}}}function F(e,t,n,r,o){for(var i in n)!je.call(n,i)||!K(e,i,n[i],r[i],r,t,o);return r}function G(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Q(t[n])}e.length&&(e.length=0)}function Q(e){e.configContext&&n(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&f(e.controllers,function(e){n(e.onunload)&&e.onunload({preventDefault:i})}),e.children&&(ke(e.children)?f(e.children,Q):e.children.tag&&Q(e.children))}function Y(e,t){try{e.appendChild(Ae.createRange().createContextualFragment(t))}catch(n){e.insertAdjacentHTML("beforeend",t),W(e)}}function W(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(X(e),e);else{var t=e.childNodes;if(t&&t.length)for(var n=0;n<t.length;n++)W(t[n])}return e}function X(e){for(var t=document.createElement("script"),n=e.attributes,r=0;r<n.length;r++)t.setAttribute(n[r].name,n[r].value);return t.text=e.innerHTML,t}function Z(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=Ae.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else Y(e,n);for(var a=[];e.childNodes[t]!==r;)a.push(e.childNodes[t]),t++;return a}function ee(e,t){return function(n){n=n||event,c.redraw.strategy("diff"),c.startComputation();try{return e.call(t,n)}finally{ue()}}}function te(e){var t=Ve.indexOf(e);return t<0?Ve.push(e)-1:t}function ne(e){function t(){return arguments.length&&(e=arguments[0]),e}return t.toJSON=function(){return e},t}function re(e,t){function n(){return(e.controller||i).apply(this,t)||this}function r(n){for(var r=[n].concat(t),o=1;o<arguments.length;o++)r.push(arguments[o]);return e.view.apply(e,r)}e.controller&&(n.prototype=e.controller.prototype),r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function oe(e,t,n,r){if(!r){c.redraw.strategy("all"),c.startComputation(),$e[n]=t;var o;o=He=e?e:e={controller:i};var a=new(e.controller||i);return o===He&&(Je[n]=a,Be[n]=e),ue(),null===e&&ie(t,n),Je[n]}null==e&&ie(t,n)}function ie(e,t){$e.splice(t,1),Je.splice(t,1),Be.splice(t,1),pe(e),Ve.splice(te(e),1)}function ae(){Ge&&(Ge(),Ge=null),f($e,function(e,t){var n=Be[t];if(Je[t]){var r=[Je[t]];c.render(e,n.view?n.view(Je[t],r):"")}}),Qe&&(Qe(),Qe=null),Ke=null,Fe=new Date,c.redraw.strategy("diff")}function ue(){"none"===c.redraw.strategy()?(Me--,c.redraw.strategy("diff")):c.endComputation()}function le(e){return e.slice(et[c.route.mode].length)}function se(e,t,n){Xe={};var r=n.indexOf("?");r!==-1&&(Xe=he(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(i!==-1)return c.mount(e,t[o[i]]),!0;for(var a in t)if(je.call(t,a)){if(a===n)return c.mount(e,t[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,function(){var n=a.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);f(n,function(e,t){Xe[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),c.mount(e,t[a])}),!0}}function ce(e){if(e=e||event,!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault?e.preventDefault():e.returnValue=!1;var t,n=e.currentTarget||e.srcElement;for(t="pathname"===c.route.mode&&n.search?he(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;Me=0,c.route(n[c.route.mode].slice(et[c.route.mode].length),t)}}function fe(){"hash"!==c.route.mode&&Ce.hash?Ce.hash=Ce.hash:e.scrollTo(0,0)}function de(e,n){var o={},i=[];for(var a in e)if(je.call(e,a)){var u=n?n+"["+a+"]":a,l=e[a];if(null===l)i.push(encodeURIComponent(u));else if(r(l))i.push(de(l,u));else if(ke(l)){var s=[];o[u]=o[u]||{},f(l,function(e){o[u][e]||(o[u][e]=!0,s.push(encodeURIComponent(u)+"="+encodeURIComponent(e)))}),i.push(s.join("&"))}else l!==t&&i.push(encodeURIComponent(u)+"="+encodeURIComponent(l))}return i.join("&")}function he(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return f(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(ke(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function pe(e){var n=te(e);G(e.childNodes,ze[n]),ze[n]=t}function ve(e,t){var n=c.prop(t);return e.then(n),n.then=function(n,r){return ve(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n}function me(e,t){function o(e){l=e||at,f.map(function(e){l===it?e.resolve(s):e.reject(s)})}function i(e,t,o,i){if((null!=s&&r(s)||n(s))&&n(e))try{var a=0;e.call(s,function(e){a++||(s=e,t())},function(e){a++||(s=e,o())})}catch(u){c.deferred.onerror(u),s=u,o()}else i()}function a(){var r;try{r=s&&s.then}catch(f){return c.deferred.onerror(f),s=f,l=ot,a()}l===ot&&c.deferred.onerror(s),i(r,function(){l=rt,a()},function(){l=ot,a()},function(){try{l===rt&&n(e)?s=e(s):l===ot&&n(t)&&(s=t(s),l=rt)}catch(a){return c.deferred.onerror(a),s=a,o()}s===u?(s=TypeError(),o()):i(r,function(){o(it)},o,function(){o(l===rt&&it)})})}var u=this,l=0,s=0,f=[];u.promise={},u.resolve=function(e){return l||(s=e,l=rt,a()),u},u.reject=function(e){return l||(s=e,l=ot,a()),u},u.promise.then=function(e,t){var n=new me(e,t);return l===it?n.resolve(s):l===at?n.reject(s):f.push(n),n.promise}}function ge(e){return e}function ye(n){var r=n.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=Ae.createElement("script");e[r]=function(i){o.parentNode.removeChild(o),n.onload({type:"load",target:{responseText:i}}),e[r]=t},o.onerror=function(){return o.parentNode.removeChild(o),n.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[r]=t,!1},o.onload=function(){return!1},o.src=n.url+(n.url.indexOf("?")>0?"&":"?")+(n.callbackKey?n.callbackKey:"callback")+"="+r+"&"+de(n.data||{}),Ae.body.appendChild(o)}function we(t){var r=new e.XMLHttpRequest;if(r.open(t.method,t.url,!0,t.user,t.password),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?t.onload({type:"load",target:r}):t.onerror({type:"error",target:r}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&r.setRequestHeader("Content-Type","application/json; charset=utf-8"),t.deserialize===JSON.parse&&r.setRequestHeader("Accept","application/json, text/*"),n(t.config)){var i=t.config(r,t);null!=i&&(r=i)}var a="GET"!==t.method&&t.data?t.data:"";if(a&&!o(a)&&a.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return r.send(a),r}function be(e){return e.dataType&&"jsonp"===e.dataType.toLowerCase()?ye(e):we(e)}function Ee(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=de(t);e.url+=o?r+o:""}else e.data=n(t)}function xe(e,t){return t&&(e=e.replace(/:[a-z]\w+/gi,function(e){var n=e.slice(1),r=t[n]||e;return delete t[n],r})),e}c.version=function(){return"v0.2.5"};var Ae,Ce,Oe,Le,je={}.hasOwnProperty,Ne={}.toString,ke=Array.isArray||function(e){return"[object Array]"===Ne.call(e)},Se={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};c.deps=function(t){return a(e=t||window),e},c.deps(e);var Te=1,Re=2,_e=3,Me=0;c.startComputation=function(){Me++},c.endComputation=function(){Me>1?Me--:(Me=0,c.redraw())};var qe,De=[],Ie=!1,Pe={list:1,style:1,form:1,type:1,width:1,height:1},Ue={appendChild:function(e){qe===t&&(qe=Ae.createElement("html")),Ae.documentElement&&Ae.documentElement!==e?Ae.replaceChild(e,Ae.documentElement):Ae.appendChild(e),this.childNodes=Ae.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Ve=[],ze={};c.render=function(e,n,r){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,i=[],a=te(e),u=e===Ae;o=u||e===Ae.documentElement?Ue:e,u&&"html"!==n.tag&&(n={tag:"html",attrs:{},children:n}),ze[a]===t&&G(o.childNodes),r===!0&&pe(e),ze[a]=H(o,null,t,t,n,ze[a],!1,0,null,t,i),f(i,function(e){e()})},c.trust=function(e){return e=new String(e),e.$trusted=!0,e},c.prop=function(e){return(null!=e&&(r(e)||n(e))||"undefined"!=typeof Promise&&e instanceof Promise)&&n(e.then)?ve(e):ne(e)};var He,$e=[],Be=[],Je=[],Ke=null,Fe=0,Ge=null,Qe=null,Ye=16;c.component=function(e){for(var t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re(e,t)},c.mount=c.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var r=$e.indexOf(e);r<0&&(r=$e.length);var o=!1,i={preventDefault:function(){o=!0,Ge=Qe=null}};return f(De,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?f(De,function(e){e.controller.onunload=e.handler}):De=[],Je[r]&&n(Je[r].onunload)&&Je[r].onunload(i),oe(t,e,r,o)};var We=!1;c.redraw=function(t){if(!We){We=!0,t&&(Ie=!0);try{Ke&&!t?(Oe===e.requestAnimationFrame||new Date-Fe>Ye)&&(Ke>0&&Le(Ke),Ke=Oe(ae,Ye)):(ae(),Ke=Oe(function(){Ke=null},Ye))}finally{We=Ie=!1}}},c.redraw.strategy=c.prop(),c.withAttr=function(e,t,n){return function(r){r=r||window.event;var o=r.currentTarget||this,i=n||this,a=e in o?o[e]:o.getAttribute(e);t.call(i,a)}};var Xe,Ze,et={pathname:"",hash:"#",search:"?"},tt=i,nt=!1;c.route=function(t,n,r,i){if(0===arguments.length)return Ze;if(3===arguments.length&&o(n)){tt=function(e){var o=Ze=le(e);if(!se(t,r,o)){if(nt)throw new Error("Ensure the default route matches one of the routes defined in m.route");nt=!0,c.route(n,!0),nt=!1}};var a="hash"===c.route.mode?"onhashchange":"onpopstate";return e[a]=function(){var e=Ce[c.route.mode];"pathname"===c.route.mode&&(e+=Ce.search),Ze!==le(e)&&tt(e)},Ge=fe,void e[a]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==c.route.mode?Ce.pathname:"";return t.href=u+et[c.route.mode]+i.attrs.href,void(t.addEventListener?(t.removeEventListener("click",ce),t.addEventListener("click",ce)):(t.detachEvent("onclick",ce),t.attachEvent("onclick",ce)))}if(o(t)){var l=Ze;Ze=t;var s,f=n||{},d=Ze.indexOf("?");s=d>-1?he(Ze.slice(d+1)):{};for(var h in f)je.call(f,h)&&(s[h]=f[h]);var p,v=de(s);p=d>-1?Ze.slice(0,d):Ze,v&&(Ze=p+(p.indexOf("?")===-1?"?":"&")+v);var m=(3===arguments.length?r:n)===!0||l===t;if(e.history.pushState){var g=m?"replaceState":"pushState";Ge=fe,Qe=function(){try{e.history[g](null,Ae.title,et[c.route.mode]+Ze)}catch(t){Ce[c.route.mode]=Ze}},tt(et[c.route.mode]+Ze)}else Ce[c.route.mode]=Ze,tt(et[c.route.mode]+Ze)}},c.route.param=function(e){if(!Xe)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return e?Xe[e]:Xe},c.route.mode="search",c.route.buildQueryString=de,c.route.parseQueryString=he,c.deferred=function(){var e=new me;return e.promise=ve(e.promise),e};var rt=1,ot=2,it=3,at=4;return c.deferred.onerror=function(e){if("[object Error]"===Ne.call(e)&&!/ Error/.test(e.constructor.toString()))throw Me=0,e},c.sync=function(e){function t(e,t){return function(a){return o[e]=a,t||(i="reject"),0===--r&&(n.promise(o),n[i](o)),a}}var n=c.deferred(),r=e.length,o=[],i="resolve";return e.length>0?f(e,function(e,n){e.then(t(n,!0),t(n,!1))}):n.resolve([]),n.promise},c.request=function(e){e.background!==!0&&c.startComputation();var t,n,r,o=new me,i=e.dataType&&"jsonp"===e.dataType.toLowerCase();return i?(t=e.serialize=n=e.deserialize=ge,r=function(e){return e.responseText}):(t=e.serialize=e.serialize||JSON.stringify,n=e.deserialize=e.deserialize||JSON.parse,r=e.extract||function(e){return e.responseText.length||n!==JSON.parse?e.responseText:null}),e.method=(e.method||"GET").toUpperCase(),e.url=xe(e.url,e.data),Ee(e,e.data,t),e.onload=e.onerror=function(t){try{t=t||event;var i=n(r(t.target,e));"load"===t.type?(e.unwrapSuccess&&(i=e.unwrapSuccess(i,t.target)),ke(i)&&e.type?f(i,function(t,n){i[n]=new e.type(t)}):e.type&&(i=new e.type(i)),o.resolve(i)):(e.unwrapError&&(i=e.unwrapError(i,t.target)),o.reject(i))}catch(a){o.reject(a),c.deferred.onerror(a)}finally{e.background!==!0&&c.endComputation()}},be(e),o.promise=ve(o.promise,e.initialValue),o.promise},c})},{}],7:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,a=this,u=a.EventEmitter;i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,t){var n,o=this.getListenersAsObject(e),i="object"==typeof t;for(n in o)o.hasOwnProperty(n)&&r(o[n],t)===-1&&o[n].push(i?t:{listener:t,once:!1});return this},i.on=o("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=o("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,o,i=this.getListenersAsObject(e);for(o in i)i.hasOwnProperty(o)&&(n=r(i[o],t),n!==-1&&i[o].splice(n,1));return this},i.off=o("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=o("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,a,u=this.getListenersAsObject(e);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].slice(0),o=n.length;o--;)r=n[o],r.once===!0&&this.removeListener(e,r.listener),a=r.listener.apply(this,t||[]),a===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=o("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return a.EventEmitter=u,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:a.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function n(t,r,o){function i(u,l){if(!r[u]){if(!t[u]){var s="function"==typeof e&&e;if(!l&&s)return s(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return i(n?n:e)},f,f.exports,n,t,r,o)}return r[u].exports}for(var a="function"==typeof e&&e,u=0;u<o.length;u++)i(o[u]);return i}({1:[function(e,t,n){"use strict";var r=e("mithril"),o=e("wolfy87-eventemitter"),i=document.getElementById("mc4wp-admin"),a=new o,u=e("./admin/tabs.js")(i),l=e("./admin/helpers.js"),s=e("./admin/settings.js")(i,l,a);window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=l,window.mc4wp.events=a,window.mc4wp.settings=s,window.mc4wp.tabs=u},{"./admin/helpers.js":2,"./admin/settings.js":3,"./admin/tabs.js":4,mithril:6,"wolfy87-eventemitter":7}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("radio"!==this.getAttribute("type")||this.checked){var t="checkbox"===this.getAttribute("type")?this.checked:this.value,r=t==n.value;a?(e.style.display=r?"":"none",e.style.visibility=r?"":"hidden"):e.style.opacity=r?"":"0.4",Array.prototype.forEach.call(i,function(e){r?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),o=document.querySelectorAll('[name="'+n.element+'"]'),i=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(o,function(e){t.call(e)}),r.bindEventToElements(o,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){var r=function(e,t,n){"use strict";function r(e,t){return s.filter(function(n){return n[e]===t})}function o(){return s}function i(){return s=[],Array.prototype.forEach.call(u,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"==typeof l[e.value]&&s.push(l[e.value])}),n.trigger("selectedLists.change",[s]),s}function a(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){var t=e.getAttribute("data-list-id"),n=r("id",t).length>0;n?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var u=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),l=mc4wp_vars.mailchimp.lists,s=[];return n.on("selectedLists.change",a),t.bindEventToElements(u,"change",i),i(),{getSelectedLists:o}};t.exports=r},{}],4:[function(e,t,n){var r=function(t){"use strict";function n(e){for(var t=0;t<h.length;t++)if(h[t].id===e)return h[t]}function r(e,t){if("string"==typeof e&&(e=n(e)),!e)return!1;void 0==t&&(t=!0),c.removeClass("tab-active").css("display","none"),f.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var r=l.setParameter(window.location.href,"tab",e.id);return history.pushState&&t&&history.pushState(e.id,"",r),o(e),d.value=r,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function o(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function i(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var n=this.className.match(/nav-tab-(\w+)?/);n&&(t=n[1])}if(!t){var o=l.parse(this.href);if(!o.tab)return;t=o.tab}var i=r(t);return!i||(e.preventDefault(),e.returnValue=!1,!1)}function a(){if(history.pushState){var e=c.filter(":visible").get(0);if(e){var t=n(e.id.substring(4));t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),o(t))}}}var u=window.jQuery,l=e("./url.js"),s=u(t),c=s.find(".tab"),f=s.find(".nav-tab"),d=t.querySelector('input[name="_wp_http_referer"]'),h=[];return u.each(c,function(e,n){var o=n.id.substring(4),i=u(n).find("h2").first().text();h.push({id:o,title:i,element:n,nav:t.querySelectorAll(".nav-tab-"+o),open:function(){return r(o)}})}),f.click(i),u(document.body).on("click",".tab-link",i),a(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){if(!e.state)return!0;var t=e.state;return r(t,!1)}),{open:r,get:n}};t.exports=r},{"./url.js":5}],5:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var o=r.parse(e);return o[t]=n,r.build(o)}};t.exports=r},{}],6:[function(e,n,r){!function(e,r){"use strict";var o=r(e);"object"==typeof n&&null!=n&&n.exports?n.exports=o:"function"==typeof t&&t.amd?t(function(){return o}):e.m=o}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Object]"===ke.call(e)}function o(e){return"[object String]"===ke.call(e)}function i(){}function a(e){Ae=e.document,Ce=e.location,Le=e.cancelAnimationFrame||e.clearTimeout,Oe=e.requestAnimationFrame||e.setTimeout}function u(e,t){for(var n,r=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g;n=o.exec(t);)if(""===n[1]&&n[2])e.tag=n[2];else if("#"===n[1])e.attrs.id=n[2];else if("."===n[1])r.push(n[2]);else if("["===n[3][0]){var i=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(n[3]);e.attrs[i[1]]=i[3]||""}return r}function l(e,t){var n=t?e.slice(1):e;return 1===n.length&&Ne(n[0])?n[0]:n}function s(e,t,n){var r="class"in t?"class":"className";for(var o in t)je.call(t,o)&&(o===r&&null!=t[o]&&""!==t[o]?(n.push(t[o]),e[o]=""):e[o]=t[o]);n.length&&(e[r]=n.join(" "))}function c(e,t){for(var n=[],i=1,a=arguments.length;i<a;i++)n[i-1]=arguments[i];if(r(e))return re(e,n);if(!o(e))throw new Error("selector in m(selector, attrs, children) should be a string");var c=null!=t&&r(t)&&!("tag"in t||"view"in t||"subtree"in t),f=c?t:{},d={tag:"div",attrs:{},children:l(n,c)};return s(d.attrs,f,u(d,e)),d}function f(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function d(e,t){f(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function h(e){try{if(null!=e&&null!=e.toString())return e}catch(t){}return""}function p(e,t,n,r){try{m(e,t,n),t.nodeValue=r}catch(o){}}function v(e){for(var t=0;t<e.length;t++)Ne(e[t])&&(e=e.concat.apply([],e),t--);return e}function m(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function g(e,t,n,r){d(e,function(e,r){t[e=e.key]=t[e]?{action:_e,index:r,from:t[e].index,element:n.nodes[t[e].index]||Ae.createElement("div")}:{action:Re,index:r}});var o=[];for(var i in t)je.call(t,i)&&o.push(t[i]);var a=o.sort($),u=new Array(n.length);return u.nodes=n.nodes.slice(),f(a,function(t){var o=t.index;if(t.action===Te&&(G(n[o].nodes,n[o]),u.splice(o,1)),t.action===Re){var i=Ae.createElement("div");i.key=e[o].attrs.key,m(r,i,o),u.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),u.nodes[o]=i}if(t.action===_e){var a=t.element,l=r.childNodes[o];l!==a&&null!==a&&r.insertBefore(a,l||null),u[o]=n[t.from],u.nodes[o]=a}}),u}function y(e,t,n,r){var o=e.length!==t.length;return o||d(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?g(e,n,t,r):t}function w(e,t,n){f(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),f(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&G([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function b(e){var t=0;d(e,function(){return f(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function E(e,t,n){return e.tag!==t.tag||(n.sort().join()!==Object.keys(t.attrs).sort().join()||(e.attrs.id!==t.attrs.id||(e.attrs.key!==t.attrs.key||("all"===c.redraw.strategy()?!t.configContext||t.configContext.retain!==!0:"diff"===c.redraw.strategy()&&(t.configContext&&t.configContext.retain===!1)))))}function x(e,t,r){E(e,t,r)&&(t.nodes.length&&G(t.nodes),t.configContext&&n(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&f(t.controllers,function(e){e.onunload&&e.onunload({preventDefault:i})}))}function A(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function C(e,t,n){n.length&&(e.views=t,e.controllers=n,f(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Me&&e.onunload){var t=e.onunload;e.onunload=i,e.onunload.$old=t}}))}function O(e,t,r,o,i){if(n(t.attrs.config)){var a=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,r,!o,a,i)})}}function L(e,n,r,o,i,a,u,l){var s=e.nodes[0];return o&&F(s,n.tag,n.attrs,e.attrs,i),e.children=H(s,n.tag,t,t,n.children,e.children,!1,0,n.attrs.contenteditable?s:r,i,u),e.nodes.intact=!0,l.length&&(e.views=a,e.controllers=l),s}function j(e,t,n){var r;e.$trusted?r=Z(t,n,e):(r=[Ae.createTextNode(e)],t.nodeName in Se||m(t,r[0],n));var o;return o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e,o.nodes=r,o}function k(e,t,n,r,o,i){var a=t.nodes;return r&&r===Ae.activeElement||(e.$trusted?(G(a,t),a=Z(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===a[0].nodeType||a.length>1||a[0].nodeValue.trim&&!a[0].nodeValue.trim())&&(G(t.nodes,t),a=[Ae.createTextNode(e)]),p(n,a[0],o,e))),t=new e.constructor(e),t.nodes=a,t}function N(e,t,n,r,o,i,a){return e.nodes.length?e.valueOf()!==t.valueOf()||o?k(t,e,r,i,n,a):(e.nodes.intact=!0,e):j(t,r,n)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(Ne(e))return e.length;return 1}function T(e,n,r,o,i,a,u,l,s){e=v(e);var c=[],f=n.length===e.length,h=0,p={},m=!1;d(n,function(e,t){m=!0,p[n[t].attrs.key]={action:Te,index:t}}),b(e),m&&(n=y(e,n,p,r));for(var g=0,E=0,x=e.length;E<x;E++){var A=H(r,i,n,o,e[E],n[g],a,o+h||h,u,l,s);A!==t&&(f=f&&A.nodes.intact,h+=S(A),n[g++]=A)}return f||w(e,n,c),n}function R(e,t,n,r,o){if(null!=t){if(ke.call(t)===ke.call(e))return t;if(o&&o.nodes){var i=n-r,a=i+(Ne(e)?e:t.nodes).length;G(o.nodes.slice(i,a),o.slice(i,a))}else t.nodes&&G(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function _(e,t){return e.attrs.is?null==t?Ae.createElement(e.tag,e.attrs.is):Ae.createElementNS(t,e.tag,e.attrs.is):null==t?Ae.createElement(e.tag):Ae.createElementNS(t,e.tag)}function M(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function q(e,n,r,o,i,a){return null!=e.children&&e.children.length>0?H(n,e.tag,t,t,e.children,r.children,!0,0,e.attrs.contenteditable?n:o,i,a):e.children}function D(e,t,n,r,o,i,a){var u={tag:e.tag,attrs:t,children:n,nodes:[r]};return C(u,i,a),u.children&&!u.children.nodes&&(u.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),u}function I(e,t,r,o){var i;return i="diff"===c.redraw.strategy()&&e?e.indexOf(t):-1,i>-1?r[i]:n(o)?new o:{}}function P(e,t,n,r){null!=r.onunload&&De.map(function(e){return e.handler}).indexOf(r.onunload)<0&&De.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function U(e,t,n,r,o,i){var a=I(n.views,t,r,e.controller),u=e&&e.attrs&&e.attrs.key;return e=0===Me||Ie||r&&r.indexOf(a)>-1?e.view(a):{tag:"placeholder"},"retain"===e.subtree?e:(e.attrs=e.attrs||{},e.attrs.key=u,P(i,o,t,a),e)}function V(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=U(e,e.view.$original||e.view,t,o,r,n);return e}function z(e,t,n,r,i,a,u,l){var s=[],c=[];if(e=V(e,t,s,c),"retain"===e.subtree)return t;if(!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(x(e,t,f),o(e.tag)){var h=0===t.nodes.length;u=A(e,u);var p;if(h){p=_(e,u);var v=M(e,p,u,d);m(r,p,i);var g=q(e,p,t,n,u,l);t=D(e,v,g,p,u,s,c)}else p=L(t,e,n,d,u,s,l,c);return h||a!==!0||null==p||m(r,p,i),O(l,e,p,h,t),t}}function H(e,t,o,i,a,u,l,s,c,f,d){return a=h(a),"retain"===a.subtree?u:(u=R(a,u,s,i,o),Ne(a)?T(a,u,e,s,t,l,c,f,d):null!=a&&r(a)?z(a,u,c,e,s,l,f,d):n(a)?u:N(u,a,s,e,l,c,t))}function $(e,t){return e.action-t.action||e.index-t.index}function B(e,t,n){for(var r in t)je.call(t,r)&&(null!=n&&n[r]===t[r]||(e.style[r]=t[r]));for(r in n)je.call(n,r)&&(je.call(t,r)||(e.style[r]=""))}function J(e,t,o,i,a,u){if("config"===t||"key"===t)return!0;if(n(o)&&"on"===t.slice(0,2))e[t]=ee(o,e);else if("style"===t&&null!=o&&r(o))B(e,o,i);else if(null!=u)"href"===t?e.setAttributeNS("http://www.w3.org/1999/xlink","href",o):e.setAttribute("className"===t?"class":t,o);else if(t in e&&!Pe[t])try{"input"===a&&e[t]===o||(e[t]=o)}catch(l){e.setAttribute(t,o)}else e.setAttribute(t,o)}function K(e,t,n,r,o,i,a){if(t in o&&r===n&&Ae.activeElement!==e)"value"===t&&"input"===i&&e.value!==n&&(e.value=n);else{o[t]=n;try{return J(e,t,n,r,i,a)}catch(u){if(u.message.indexOf("Invalid argument")<0)throw u}}}function F(e,t,n,r,o){for(var i in n)!je.call(n,i)||!K(e,i,n[i],r[i],r,t,o);return r}function G(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Q(t[n])}e.length&&(e.length=0)}function Q(e){e.configContext&&n(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&f(e.controllers,function(e){n(e.onunload)&&e.onunload({preventDefault:i})}),e.children&&(Ne(e.children)?f(e.children,Q):e.children.tag&&Q(e.children))}function Y(e,t){try{e.appendChild(Ae.createRange().createContextualFragment(t))}catch(n){e.insertAdjacentHTML("beforeend",t),W(e)}}function W(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(X(e),e);else{var t=e.childNodes;if(t&&t.length)for(var n=0;n<t.length;n++)W(t[n])}return e}function X(e){for(var t=document.createElement("script"),n=e.attributes,r=0;r<n.length;r++)t.setAttribute(n[r].name,n[r].value);return t.text=e.innerHTML,t}function Z(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=Ae.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else Y(e,n);for(var a=[];e.childNodes[t]!==r;)a.push(e.childNodes[t]),t++;return a}function ee(e,t){return function(n){n=n||event,c.redraw.strategy("diff"),c.startComputation();try{return e.call(t,n)}finally{ue()}}}function te(e){var t=Ve.indexOf(e);return t<0?Ve.push(e)-1:t}function ne(e){function t(){return arguments.length&&(e=arguments[0]),e}return t.toJSON=function(){return e},t}function re(e,t){function n(){return(e.controller||i).apply(this,t)||this}function r(n){for(var r=[n].concat(t),o=1;o<arguments.length;o++)r.push(arguments[o]);return e.view.apply(e,r)}e.controller&&(n.prototype=e.controller.prototype),r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function oe(e,t,n,r){if(!r){c.redraw.strategy("all"),c.startComputation(),$e[n]=t;var o;o=He=e?e:e={controller:i};var a=new(e.controller||i);return o===He&&(Je[n]=a,Be[n]=e),ue(),null===e&&ie(t,n),Je[n]}null==e&&ie(t,n)}function ie(e,t){$e.splice(t,1),Je.splice(t,1),Be.splice(t,1),pe(e),Ve.splice(te(e),1)}function ae(){Ge&&(Ge(),Ge=null),f($e,function(e,t){var n=Be[t];if(Je[t]){var r=[Je[t]];c.render(e,n.view?n.view(Je[t],r):"")}}),Qe&&(Qe(),Qe=null),Ke=null,Fe=new Date,c.redraw.strategy("diff")}function ue(){"none"===c.redraw.strategy()?(Me--,c.redraw.strategy("diff")):c.endComputation()}function le(e){return e.slice(et[c.route.mode].length)}function se(e,t,n){Xe={};var r=n.indexOf("?");r!==-1&&(Xe=he(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(i!==-1)return c.mount(e,t[o[i]]),!0;for(var a in t)if(je.call(t,a)){if(a===n)return c.mount(e,t[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,function(){var n=a.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);f(n,function(e,t){Xe[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),c.mount(e,t[a])}),!0}}function ce(e){if(e=e||event,!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault?e.preventDefault():e.returnValue=!1;var t,n=e.currentTarget||e.srcElement;for(t="pathname"===c.route.mode&&n.search?he(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;Me=0,c.route(n[c.route.mode].slice(et[c.route.mode].length),t)}}function fe(){"hash"!==c.route.mode&&Ce.hash?Ce.hash=Ce.hash:e.scrollTo(0,0)}function de(e,n){var o={},i=[];for(var a in e)if(je.call(e,a)){var u=n?n+"["+a+"]":a,l=e[a];if(null===l)i.push(encodeURIComponent(u));else if(r(l))i.push(de(l,u));else if(Ne(l)){var s=[];o[u]=o[u]||{},f(l,function(e){o[u][e]||(o[u][e]=!0,s.push(encodeURIComponent(u)+"="+encodeURIComponent(e)))}),i.push(s.join("&"))}else l!==t&&i.push(encodeURIComponent(u)+"="+encodeURIComponent(l))}return i.join("&")}function he(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return f(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(Ne(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function pe(e){var n=te(e);G(e.childNodes,ze[n]),ze[n]=t}function ve(e,t){var n=c.prop(t);return e.then(n),n.then=function(n,r){return ve(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n}function me(e,t){function o(e){l=e||at,f.map(function(e){l===it?e.resolve(s):e.reject(s)})}function i(e,t,o,i){if((null!=s&&r(s)||n(s))&&n(e))try{var a=0;e.call(s,function(e){a++||(s=e,t())},function(e){a++||(s=e,o())})}catch(u){c.deferred.onerror(u),s=u,o()}else i()}function a(){var r;try{r=s&&s.then}catch(f){return c.deferred.onerror(f),s=f,l=ot,a()}l===ot&&c.deferred.onerror(s),i(r,function(){l=rt,a()},function(){l=ot,a()},function(){try{l===rt&&n(e)?s=e(s):l===ot&&n(t)&&(s=t(s),l=rt)}catch(a){return c.deferred.onerror(a),s=a,o()}s===u?(s=TypeError(),o()):i(r,function(){o(it)},o,function(){o(l===rt&&it)})})}var u=this,l=0,s=0,f=[];u.promise={},u.resolve=function(e){return l||(s=e,l=rt,a()),u},u.reject=function(e){return l||(s=e,l=ot,a()),u},u.promise.then=function(e,t){var n=new me(e,t);return l===it?n.resolve(s):l===at?n.reject(s):f.push(n),n.promise}}function ge(e){return e}function ye(n){var r=n.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=Ae.createElement("script");e[r]=function(i){o.parentNode.removeChild(o),n.onload({type:"load",target:{responseText:i}}),e[r]=t},o.onerror=function(){return o.parentNode.removeChild(o),n.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[r]=t,!1},o.onload=function(){return!1},o.src=n.url+(n.url.indexOf("?")>0?"&":"?")+(n.callbackKey?n.callbackKey:"callback")+"="+r+"&"+de(n.data||{}),Ae.body.appendChild(o)}function we(t){var r=new e.XMLHttpRequest;if(r.open(t.method,t.url,!0,t.user,t.password),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?t.onload({type:"load",target:r}):t.onerror({type:"error",target:r}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&r.setRequestHeader("Content-Type","application/json; charset=utf-8"),t.deserialize===JSON.parse&&r.setRequestHeader("Accept","application/json, text/*"),n(t.config)){var i=t.config(r,t);null!=i&&(r=i)}var a="GET"!==t.method&&t.data?t.data:"";if(a&&!o(a)&&a.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return r.send(a),r}function be(e){return e.dataType&&"jsonp"===e.dataType.toLowerCase()?ye(e):we(e)}function Ee(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=de(t);e.url+=o?r+o:""}else e.data=n(t)}function xe(e,t){return t&&(e=e.replace(/:[a-z]\w+/gi,function(e){var n=e.slice(1),r=t[n]||e;return delete t[n],r})),e}c.version=function(){return"v0.2.5"};var Ae,Ce,Oe,Le,je={}.hasOwnProperty,ke={}.toString,Ne=Array.isArray||function(e){return"[object Array]"===ke.call(e)},Se={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};c.deps=function(t){return a(e=t||window),e},c.deps(e);var Te=1,Re=2,_e=3,Me=0;c.startComputation=function(){Me++},c.endComputation=function(){Me>1?Me--:(Me=0,c.redraw())};var qe,De=[],Ie=!1,Pe={list:1,style:1,form:1,type:1,width:1,height:1},Ue={appendChild:function(e){qe===t&&(qe=Ae.createElement("html")),Ae.documentElement&&Ae.documentElement!==e?Ae.replaceChild(e,Ae.documentElement):Ae.appendChild(e),this.childNodes=Ae.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Ve=[],ze={};c.render=function(e,n,r){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,i=[],a=te(e),u=e===Ae;o=u||e===Ae.documentElement?Ue:e,u&&"html"!==n.tag&&(n={tag:"html",attrs:{},children:n}),ze[a]===t&&G(o.childNodes),r===!0&&pe(e),ze[a]=H(o,null,t,t,n,ze[a],!1,0,null,t,i),f(i,function(e){e()})},c.trust=function(e){return e=new String(e),e.$trusted=!0,e},c.prop=function(e){return(null!=e&&(r(e)||n(e))||"undefined"!=typeof Promise&&e instanceof Promise)&&n(e.then)?ve(e):ne(e)};var He,$e=[],Be=[],Je=[],Ke=null,Fe=0,Ge=null,Qe=null,Ye=16;c.component=function(e){for(var t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re(e,t)},c.mount=c.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var r=$e.indexOf(e);r<0&&(r=$e.length);var o=!1,i={preventDefault:function(){o=!0,Ge=Qe=null}};return f(De,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?f(De,function(e){e.controller.onunload=e.handler}):De=[],Je[r]&&n(Je[r].onunload)&&Je[r].onunload(i),oe(t,e,r,o)};var We=!1;c.redraw=function(t){if(!We){We=!0,t&&(Ie=!0);try{Ke&&!t?(Oe===e.requestAnimationFrame||new Date-Fe>Ye)&&(Ke>0&&Le(Ke),Ke=Oe(ae,Ye)):(ae(),Ke=Oe(function(){Ke=null},Ye))}finally{We=Ie=!1}}},c.redraw.strategy=c.prop(),c.withAttr=function(e,t,n){return function(r){r=r||window.event;var o=r.currentTarget||this,i=n||this,a=e in o?o[e]:o.getAttribute(e);t.call(i,a)}};var Xe,Ze,et={pathname:"",hash:"#",search:"?"},tt=i,nt=!1;c.route=function(t,n,r,i){if(0===arguments.length)return Ze;if(3===arguments.length&&o(n)){tt=function(e){var o=Ze=le(e);if(!se(t,r,o)){if(nt)throw new Error("Ensure the default route matches one of the routes defined in m.route");nt=!0,c.route(n,!0),nt=!1}};var a="hash"===c.route.mode?"onhashchange":"onpopstate";return e[a]=function(){var e=Ce[c.route.mode];"pathname"===c.route.mode&&(e+=Ce.search),Ze!==le(e)&&tt(e)},Ge=fe,void e[a]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==c.route.mode?Ce.pathname:"";return t.href=u+et[c.route.mode]+i.attrs.href,void(t.addEventListener?(t.removeEventListener("click",ce),t.addEventListener("click",ce)):(t.detachEvent("onclick",ce),t.attachEvent("onclick",ce)))}if(o(t)){var l=Ze;Ze=t;var s,f=n||{},d=Ze.indexOf("?");s=d>-1?he(Ze.slice(d+1)):{};for(var h in f)je.call(f,h)&&(s[h]=f[h]);var p,v=de(s);p=d>-1?Ze.slice(0,d):Ze,v&&(Ze=p+(p.indexOf("?")===-1?"?":"&")+v);var m=(3===arguments.length?r:n)===!0||l===t;if(e.history.pushState){var g=m?"replaceState":"pushState";Ge=fe,Qe=function(){try{e.history[g](null,Ae.title,et[c.route.mode]+Ze)}catch(t){Ce[c.route.mode]=Ze}},tt(et[c.route.mode]+Ze)}else Ce[c.route.mode]=Ze,tt(et[c.route.mode]+Ze)}},c.route.param=function(e){if(!Xe)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return e?Xe[e]:Xe},c.route.mode="search",c.route.buildQueryString=de,c.route.parseQueryString=he,c.deferred=function(){var e=new me;return e.promise=ve(e.promise),e};var rt=1,ot=2,it=3,at=4;return c.deferred.onerror=function(e){if("[object Error]"===ke.call(e)&&!/ Error/.test(e.constructor.toString()))throw Me=0,e},c.sync=function(e){function t(e,t){return function(a){return o[e]=a,t||(i="reject"),0===--r&&(n.promise(o),n[i](o)),a}}var n=c.deferred(),r=e.length,o=[],i="resolve";return e.length>0?f(e,function(e,n){e.then(t(n,!0),t(n,!1))}):n.resolve([]),n.promise},c.request=function(e){e.background!==!0&&c.startComputation();var t,n,r,o=new me,i=e.dataType&&"jsonp"===e.dataType.toLowerCase();return i?(t=e.serialize=n=e.deserialize=ge,r=function(e){return e.responseText}):(t=e.serialize=e.serialize||JSON.stringify,n=e.deserialize=e.deserialize||JSON.parse,r=e.extract||function(e){return e.responseText.length||n!==JSON.parse?e.responseText:null}),e.method=(e.method||"GET").toUpperCase(),e.url=xe(e.url,e.data),Ee(e,e.data,t),e.onload=e.onerror=function(t){try{t=t||event;var i=n(r(t.target,e));"load"===t.type?(e.unwrapSuccess&&(i=e.unwrapSuccess(i,t.target)),Ne(i)&&e.type?f(i,function(t,n){i[n]=new e.type(t)}):e.type&&(i=new e.type(i)),o.resolve(i)):(e.unwrapError&&(i=e.unwrapError(i,t.target)),o.reject(i))}catch(a){o.reject(a),c.deferred.onerror(a)}finally{e.background!==!0&&c.endComputation()}},be(e),o.promise=ve(o.promise,e.initialValue),o.promise},c})},{}],7:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,a=this,u=a.EventEmitter;i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,t){var n,o=this.getListenersAsObject(e),i="object"==typeof t;for(n in o)o.hasOwnProperty(n)&&r(o[n],t)===-1&&o[n].push(i?t:{listener:t,once:!1});return this},i.on=o("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=o("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,o,i=this.getListenersAsObject(e);for(o in i)i.hasOwnProperty(o)&&(n=r(i[o],t),n!==-1&&i[o].splice(n,1));return this},i.off=o("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=o("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,a,u=this.getListenersAsObject(e);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].slice(0),o=n.length;o--;)r=n[o],r.once===!0&&this.removeListener(e,r.listener),a=r.listener.apply(this,t||[]),a===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=o("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return a.EventEmitter=u,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:a.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=admin.min.js.map
|
assets/js/admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","m","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","window","mc4wp","deps","mithril","./admin/helpers.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter","2","toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","checked","conditionMet","value","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","getAttribute","parentElements","parentElement","3","Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","lists","push","trigger","toggleVisibleLists","rows","listId","isSelected","replace","querySelector","mc4wp_vars","mailchimp","on","4","Tabs","get","id","open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","className","blur","url","URL","setParameter","location","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","opened","preventDefault","returnValue","init","activeTab","substring","replaceState","state","$","jQuery","$context","find","each","first","text","click","body","./url.js","5","query","hasOwnProperty","b","decodeURIComponent","build","data","ret","d","encodeURIComponent","join","key","6","global","factory","amd","isFunction","object","isObject","type","isString","noop","initialize","mock","$document","$location","$cancelAnimationFrame","cancelAnimationFrame","$requestAnimationFrame","requestAnimationFrame","parseTagAttrs","cell","tag","classes","parser","exec","attrs","pair","getVirtualChildren","hasAttrs","children","slice","isArray","assignAttrs","target","classAttr","attrName","hasOwn","pairs","parameterize","list","forKeys","dataToString","toString","injectTextNode","index","insertNode","nodeValue","flatten","concat","node","insertBefore","childNodes","handleKeysDiffer","existing","cached","action","MOVE","from","nodes","createElement","INSERTION","actions","prop","changes","sort","sortChanges","newCached","change","DELETION","clear","splice","dummy","changeElement","maybeChanged","diffKeys","keysDiffer","cachedCell","diffArray","_","parentNode","indexOf","buildArrayKeys","guid","isDifferentEnough","dataAttrKeys","Object","keys","redraw","strategy","configContext","retain","maybeRecreateObject","onunload","controllers","controller","getObjectNamespace","namespace","xmlns","unloadCachedControllers","views","$old","pendingRequests","scheduleConfigsToBeCalled","configs","isNew","buildUpdatedNode","editable","hasKeys","setAttributes","contenteditable","intact","handleNonexistentNodes","$trusted","injectHTML","createTextNode","nodeName","voidElements","constructor","reattachNodes","parentTag","activeElement","innerHTML","nodeType","trim","handleTextNode","shouldReattach","valueOf","getSubArrayCount","item","buildArray","subArrayCount","shouldMaintainIdentities","cacheCount","len","makeCache","parentIndex","parentCache","offset","end","constructNode","is","createElementNS","constructAttrs","constructChildren","reconstructCached","getController","view","cachedControllers","controllerIndex","updateLists","unloaders","map","checkView","forcing","subtree","markViews","$original","buildObject","copyStyleAttrs","dataAttr","cachedAttr","rule","setSingleAttr","autoredraw","setAttributeNS","shouldUseSetAttribute","trySetAttr","cachedAttrs","message","dataAttrs","removeChild","unload","appendTextFragment","appendChild","createRange","createContextualFragment","insertAdjacentHTML","replaceScriptNodes","tagName","replaceChild","buildExecutableNode","scriptEl","attributes","name","nextSibling","isElement","placeholder","callback","startComputation","endFirstComputation","getCellCacheKey","nodeCache","gettersetter","store","toJSON","component","ctrl","currentArgs","output","checkPrevented","root","isPrevented","roots","currentComponent","topComponent","components","removeRootElement","reset","computePreRedrawHook","render","computePostRedrawHook","lastRedrawId","lastRedrawCallTime","Date","endComputation","normalizeRoute","route","modes","mode","routeByValue","router","path","routeParams","queryStart","parseQueryString","substr","mount","matcher","RegExp","test","values","routeUnobtrusive","ctrlKey","metaKey","shiftKey","which","currentTarget","srcElement","search","setScroll","hash","scrollTo","buildQueryString","prefix","duplicates","str","charAt","params","string","cacheKey","cellCache","propify","promise","initialValue","then","resolve","reject","bind","Deferred","onSuccess","onFailure","finish","REJECTED","next","deferred","RESOLVED","promiseValue","thennable","success","failure","notThennable","count","onerror","fire","REJECTING","RESOLVING","self","TypeError","identity","handleJsonp","options","callbackKey","callbackName","getTime","Math","round","random","script","resp","onload","responseText","status","stringify","error","src","createXhr","xhr","XMLHttpRequest","method","user","password","onreadystatechange","readyState","serialize","setRequestHeader","deserialize","maybeXhr","FormData","send","ajax","dataType","toLowerCase","bindData","querystring","parameterizeUrl","token","version","AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR","html","form","width","height","documentNode","documentElement","forceRecreation","isDocumentRoot","trust","String","Promise","FRAME_BUDGET","unloader","redrawing","force","withAttr","withAttrCallback","callbackThis","_this","currentRoute","pathname","redirect","isDefaultRoute","arg1","arg2","vdom","source","listener","base","removeEventListener","detachEvent","oldRoute","queryIndex","currentPath","replaceHistory","err","param","sync","synchronizer","pos","resolved","results","outstanding","arg","request","background","extract","isJSONP","jsonp","toUpperCase","ev","response","unwrapSuccess","res","unwrapError","7","indexOfListener","listeners","alias","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG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B,mBAAqB1B,EAAM,eAcjCC,EAAM0B,UAAY,SAAmBvB,EAAKxf,GACtC,GACImf,GACA9B,EACAzgB,EACAiK,EACAgY,EALAmC,EAAejhB,KAAK6f,qBAAqBJ,EAO7C,KAAK3Y,IAAOma,GACR,GAAIA,EAAa5a,eAAeS,GAI5B,IAHAsY,EAAY6B,EAAana,GAAK8B,MAAM,GACpC/L,EAAIuiB,EAAUhiB,OAEPP,KAGHygB,EAAW8B,EAAUviB,GAEjBygB,EAAS0C,QAAS,GAClBhgB,KAAKqgB,eAAeZ,EAAKnC,EAASA,UAGtCwB,EAAWxB,EAASA,SAASld,MAAMJ,KAAMC,OAErC6e,IAAa9e,KAAKkhB,uBAClBlhB,KAAKqgB,eAAeZ,EAAKnC,EAASA,SAMlD,OAAOtd,OAMXsf,EAAM/c,QAAU8c,EAAM,aAUtBC,EAAM6B,KAAO,SAAc1B,GACvB,GAAIxf,GAAOT,MAAMC,UAAUmJ,MAAMzL,KAAK+C,UAAW,EACjD,OAAOF,MAAKghB,UAAUvB,EAAKxf,IAW/Bqf,EAAM8B,mBAAqB,SAA4BzgB,GAEnD,MADAX,MAAKqhB,iBAAmB1gB,EACjBX,MAWXsf,EAAM4B,oBAAsB,WACxB,OAAIlhB,KAAKqG,eAAe,qBACbrG,KAAKqhB,kBAapB/B,EAAMI,WAAa,WACf,MAAO1f,MAAK8gB,UAAY9gB,KAAK8gB,aAQjCtjB,EAAa8jB,WAAa,WAEtB,MADApkB,GAAQM,aAAe+hB,EAChB/hB,GAIW,kBAAXpB,IAAyBA,EAAO8K,IACvC9K,EAAO,WACH,MAAOoB,KAGY,gBAAXF,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUM,EAGjBN,EAAQM,aAAeA,IAE7BL,KAAK6C,gBAEI","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\nvar m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require ('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n},{\"./admin/helpers.js\":2,\"./admin/settings.js\":3,\"./admin/tabs.js\":4,\"mithril\":6,\"wolfy87-eventemitter\":7}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function(selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor( var i=0; i<elements.length;i++){\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function(element,event,handler) {\n\tif ( element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function( elements, event, handler ) {\n\tArray.prototype.forEach.call( elements, function(element) {\n\t\thelpers.bindEventToElement(element,event,handler);\n\t});\n};\n\n\n// polling\nhelpers.debounce = function(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function() {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call( showIfElements, function(element) {\n\t\tvar config = JSON.parse( element.getAttribute('data-showif') );\n\t\tvar parentElements = document.querySelectorAll('[name=\"'+ config.element +'\"]');\n\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked elements\n\t\t\tif( typeof( this.checked ) === \"boolean\" && ! this.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// check if element value matches expected value\n\t\t\tvar conditionMet = ( this.value == config.value );\n\n\t\t\tif( hide ) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call( inputs, function(inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly','readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call( parentElements, function( parentElement ) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n},{}],3:[function(require,module,exports){\nvar Settings = function(context, helpers, events ) {\n\t'use strict';\n\n\t// vars\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey,searchValue) {\n\t\treturn selectedLists.filter(function(el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function(input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif( typeof( input.checked ) === \"boolean\" && ! input.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( typeof( lists[ input.value ] ) === \"object\" ){\n\t\t\t\tselectedLists.push( lists[ input.value ] );\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [ selectedLists ]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function(el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif( isSelected ) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden',''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\" );\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs,'change',updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t}\n\n};\n\nmodule.exports = Settings;\n},{}],4:[function(require,module,exports){\n// Tabs\nvar Tabs = function(context) {\n\t'use strict';\n\n\t// @todo last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar URL = require('./url.js');\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function(i,t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function() { return open(id); }\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor( var i=0; i<tabs.length; i++){\n\t\t\tif(tabs[i].id === id ) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction open( tab, updateState ) {\n\n\t\t// make sure we have a tab object\n\t\tif(typeof(tab) === \"string\"){\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif(!tab) { return false; }\n\n\t\t// should we update state?\n\t\tif( updateState == undefined ) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function(nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id );\n\n\t\t// update hash\n\t\tif( history.pushState && updateState ) {\n\t\t\thistory.pushState( tab.id, '', url );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif( typeof(tb_remove) === \"function\" ) {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple decouple decouple\n\t\tif( tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor ) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif( ! tabId ) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif( match ) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif( ! tabId ) {\n\t\t\tvar urlParams = URL.parse( this.href );\n\t\t\tif( ! urlParams.tab ) { return; }\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = open( tabId );\n\n\t\tif( opened ) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif(! history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif( ! activeTab ) { return; }\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif(!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif( history.replaceState && history.state === null) {\n\t\t\thistory.replaceState( tab.id, '' );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif(window.addEventListener && history.pushState ) {\n\t\twindow.addEventListener('popstate', function(e) {\n\t\t\tif(!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn open(tabId,false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: open,\n\t\tget: get\n\t}\n\n};\n\nmodule.exports = Tabs;\n},{\"./url.js\":5}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif(!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data)\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\treturn ret.join(\"&\");\n\t},\n\tsetParameter: function( url, key, value ) {\n\t\tvar data = URL.parse( url );\n\t\tdata[ key ] = value;\n\t\treturn URL.build( data );\n\t}\n};\n\nmodule.exports = URL;\n},{}],6:[function(require,module,exports){\n;(function (global, factory) { // eslint-disable-line\r\n\t\"use strict\"\r\n\t/* eslint-disable no-undef */\r\n\tvar m = factory(global)\r\n\tif (typeof module === \"object\" && module != null && module.exports) {\r\n\t\tmodule.exports = m\r\n\t} else if (typeof define === \"function\" && define.amd) {\r\n\t\tdefine(function () { return m })\r\n\t} else {\r\n\t\tglobal.m = m\r\n\t}\r\n\t/* eslint-enable no-undef */\r\n})(typeof window !== \"undefined\" ? window : this, function (global, undefined) { // eslint-disable-line\r\n\t\"use strict\"\r\n\r\n\tm.version = function () {\r\n\t\treturn \"v0.2.5\"\r\n\t}\r\n\r\n\tvar hasOwn = {}.hasOwnProperty\r\n\tvar type = {}.toString\r\n\r\n\tfunction isFunction(object) {\r\n\t\treturn typeof object === \"function\"\r\n\t}\r\n\r\n\tfunction isObject(object) {\r\n\t\treturn type.call(object) === \"[object Object]\"\r\n\t}\r\n\r\n\tfunction isString(object) {\r\n\t\treturn type.call(object) === \"[object String]\"\r\n\t}\r\n\r\n\tvar isArray = Array.isArray || function (object) {\r\n\t\treturn type.call(object) === \"[object Array]\"\r\n\t}\r\n\r\n\tfunction noop() {}\r\n\r\n\tvar voidElements = {\r\n\t\tAREA: 1,\r\n\t\tBASE: 1,\r\n\t\tBR: 1,\r\n\t\tCOL: 1,\r\n\t\tCOMMAND: 1,\r\n\t\tEMBED: 1,\r\n\t\tHR: 1,\r\n\t\tIMG: 1,\r\n\t\tINPUT: 1,\r\n\t\tKEYGEN: 1,\r\n\t\tLINK: 1,\r\n\t\tMETA: 1,\r\n\t\tPARAM: 1,\r\n\t\tSOURCE: 1,\r\n\t\tTRACK: 1,\r\n\t\tWBR: 1\r\n\t}\r\n\r\n\t// caching commonly used variables\r\n\tvar $document, $location, $requestAnimationFrame, $cancelAnimationFrame\r\n\r\n\t// self invoking function needed because of the way mocks work\r\n\tfunction initialize(mock) {\r\n\t\t$document = mock.document\r\n\t\t$location = mock.location\r\n\t\t$cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout\r\n\t\t$requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout\r\n\t}\r\n\r\n\t// testing API\r\n\tm.deps = function (mock) {\r\n\t\tinitialize(global = mock || window)\r\n\t\treturn global\r\n\t}\r\n\r\n\tm.deps(global)\r\n\r\n\t/**\r\n\t * @typedef {String} Tag\r\n\t * A string that looks like -> div.classname#id[param=one][param2=two]\r\n\t * Which describes a DOM node\r\n\t */\r\n\r\n\tfunction parseTagAttrs(cell, tag) {\r\n\t\tvar classes = []\r\n\t\tvar parser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[.+?\\])/g\r\n\t\tvar match\r\n\r\n\t\twhile ((match = parser.exec(tag))) {\r\n\t\t\tif (match[1] === \"\" && match[2]) {\r\n\t\t\t\tcell.tag = match[2]\r\n\t\t\t} else if (match[1] === \"#\") {\r\n\t\t\t\tcell.attrs.id = match[2]\r\n\t\t\t} else if (match[1] === \".\") {\r\n\t\t\t\tclasses.push(match[2])\r\n\t\t\t} else if (match[3][0] === \"[\") {\r\n\t\t\t\tvar pair = /\\[(.+?)(?:=(\"|'|)(.*?)\\2)?\\]/.exec(match[3])\r\n\t\t\t\tcell.attrs[pair[1]] = pair[3] || \"\"\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn classes\r\n\t}\r\n\r\n\tfunction getVirtualChildren(args, hasAttrs) {\r\n\t\tvar children = hasAttrs ? args.slice(1) : args\r\n\r\n\t\tif (children.length === 1 && isArray(children[0])) {\r\n\t\t\treturn children[0]\r\n\t\t} else {\r\n\t\t\treturn children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction assignAttrs(target, attrs, classes) {\r\n\t\tvar classAttr = \"class\" in attrs ? \"class\" : \"className\"\r\n\r\n\t\tfor (var attrName in attrs) {\r\n\t\t\tif (hasOwn.call(attrs, attrName)) {\r\n\t\t\t\tif (attrName === classAttr &&\r\n\t\t\t\t\t\tattrs[attrName] != null &&\r\n\t\t\t\t\t\tattrs[attrName] !== \"\") {\r\n\t\t\t\t\tclasses.push(attrs[attrName])\r\n\t\t\t\t\t// create key in correct iteration order\r\n\t\t\t\t\ttarget[attrName] = \"\"\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget[attrName] = attrs[attrName]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (classes.length) target[classAttr] = classes.join(\" \")\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param {Tag} The DOM node tag\r\n\t * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs\r\n\t * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,\r\n\t * or splat (optional)\r\n\t */\r\n\tfunction m(tag, pairs) {\r\n\t\tvar args = []\r\n\r\n\t\tfor (var i = 1, length = arguments.length; i < length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\tif (isObject(tag)) return parameterize(tag, args)\r\n\r\n\t\tif (!isString(tag)) {\r\n\t\t\tthrow new Error(\"selector in m(selector, attrs, children) should \" +\r\n\t\t\t\t\"be a string\")\r\n\t\t}\r\n\r\n\t\tvar hasAttrs = pairs != null && isObject(pairs) &&\r\n\t\t\t!(\"tag\" in pairs || \"view\" in pairs || \"subtree\" in pairs)\r\n\r\n\t\tvar attrs = hasAttrs ? pairs : {}\r\n\t\tvar cell = {\r\n\t\t\ttag: \"div\",\r\n\t\t\tattrs: {},\r\n\t\t\tchildren: getVirtualChildren(args, hasAttrs)\r\n\t\t}\r\n\r\n\t\tassignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))\r\n\t\treturn cell\r\n\t}\r\n\r\n\tfunction forEach(list, f) {\r\n\t\tfor (var i = 0; i < list.length && !f(list[i], i++);) {\r\n\t\t\t// function called in condition\r\n\t\t}\r\n\t}\r\n\r\n\tfunction forKeys(list, f) {\r\n\t\tforEach(list, function (attrs, i) {\r\n\t\t\treturn (attrs = attrs && attrs.attrs) &&\r\n\t\t\t\tattrs.key != null &&\r\n\t\t\t\tf(attrs, i)\r\n\t\t})\r\n\t}\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction dataToString(data) {\r\n\t\t// data.toString() might throw or return null if data is the return\r\n\t\t// value of Console.log in some versions of Firefox (behavior depends on\r\n\t\t// version)\r\n\t\ttry {\r\n\t\t\tif (data != null && data.toString() != null) return data\r\n\t\t} catch (e) {\r\n\t\t\t// silently ignore errors\r\n\t\t}\r\n\t\treturn \"\"\r\n\t}\r\n\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction injectTextNode(parentElement, first, index, data) {\r\n\t\ttry {\r\n\t\t\tinsertNode(parentElement, first, index)\r\n\t\t\tfirst.nodeValue = data\r\n\t\t} catch (e) {\r\n\t\t\t// IE erroneously throws error when appending an empty text node\r\n\t\t\t// after a null\r\n\t\t}\r\n\t}\r\n\r\n\tfunction flatten(list) {\r\n\t\t// recursively flatten array\r\n\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\tif (isArray(list[i])) {\r\n\t\t\t\tlist = list.concat.apply([], list)\r\n\t\t\t\t// check current index again and flatten until there are no more\r\n\t\t\t\t// nested arrays at that index\r\n\t\t\t\ti--\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list\r\n\t}\r\n\r\n\tfunction insertNode(parentElement, node, index) {\r\n\t\tparentElement.insertBefore(node,\r\n\t\t\tparentElement.childNodes[index] || null)\r\n\t}\r\n\r\n\tvar DELETION = 1\r\n\tvar INSERTION = 2\r\n\tvar MOVE = 3\r\n\r\n\tfunction handleKeysDiffer(data, existing, cached, parentElement) {\r\n\t\tforKeys(data, function (key, i) {\r\n\t\t\texisting[key = key.key] = existing[key] ? {\r\n\t\t\t\taction: MOVE,\r\n\t\t\t\tindex: i,\r\n\t\t\t\tfrom: existing[key].index,\r\n\t\t\t\telement: cached.nodes[existing[key].index] ||\r\n\t\t\t\t\t$document.createElement(\"div\")\r\n\t\t\t} : {action: INSERTION, index: i}\r\n\t\t})\r\n\r\n\t\tvar actions = []\r\n\t\tfor (var prop in existing) {\r\n\t\t\tif (hasOwn.call(existing, prop)) {\r\n\t\t\t\tactions.push(existing[prop])\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar changes = actions.sort(sortChanges)\r\n\t\tvar newCached = new Array(cached.length)\r\n\r\n\t\tnewCached.nodes = cached.nodes.slice()\r\n\r\n\t\tforEach(changes, function (change) {\r\n\t\t\tvar index = change.index\r\n\t\t\tif (change.action === DELETION) {\r\n\t\t\t\tclear(cached[index].nodes, cached[index])\r\n\t\t\t\tnewCached.splice(index, 1)\r\n\t\t\t}\r\n\t\t\tif (change.action === INSERTION) {\r\n\t\t\t\tvar dummy = $document.createElement(\"div\")\r\n\t\t\t\tdummy.key = data[index].attrs.key\r\n\t\t\t\tinsertNode(parentElement, dummy, index)\r\n\t\t\t\tnewCached.splice(index, 0, {\r\n\t\t\t\t\tattrs: {key: data[index].attrs.key},\r\n\t\t\t\t\tnodes: [dummy]\r\n\t\t\t\t})\r\n\t\t\t\tnewCached.nodes[index] = dummy\r\n\t\t\t}\r\n\r\n\t\t\tif (change.action === MOVE) {\r\n\t\t\t\tvar changeElement = change.element\r\n\t\t\t\tvar maybeChanged = parentElement.childNodes[index]\r\n\t\t\t\tif (maybeChanged !== changeElement && changeElement !== null) {\r\n\t\t\t\t\tparentElement.insertBefore(changeElement,\r\n\t\t\t\t\t\tmaybeChanged || null)\r\n\t\t\t\t}\r\n\t\t\t\tnewCached[index] = cached[change.from]\r\n\t\t\t\tnewCached.nodes[index] = changeElement\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn newCached\r\n\t}\r\n\r\n\tfunction diffKeys(data, cached, existing, parentElement) {\r\n\t\tvar keysDiffer = data.length !== cached.length\r\n\r\n\t\tif (!keysDiffer) {\r\n\t\t\tforKeys(data, function (attrs, i) {\r\n\t\t\t\tvar cachedCell = cached[i]\r\n\t\t\t\treturn keysDiffer = cachedCell &&\r\n\t\t\t\t\tcachedCell.attrs &&\r\n\t\t\t\t\tcachedCell.attrs.key !== attrs.key\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (keysDiffer) {\r\n\t\t\treturn handleKeysDiffer(data, existing, cached, parentElement)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction diffArray(data, cached, nodes) {\r\n\t\t// diff the array itself\r\n\r\n\t\t// update the list of DOM nodes by collecting the nodes from each item\r\n\t\tforEach(data, function (_, i) {\r\n\t\t\tif (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)\r\n\t\t})\r\n\t\t// remove items from the end of the array if the new array is shorter\r\n\t\t// than the old one. if errors ever happen here, the issue is most\r\n\t\t// likely a bug in the construction of the `cached` data structure\r\n\t\t// somewhere earlier in the program\r\n\t\tforEach(cached.nodes, function (node, i) {\r\n\t\t\tif (node.parentNode != null && nodes.indexOf(node) < 0) {\r\n\t\t\t\tclear([node], [cached[i]])\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tif (data.length < cached.length) cached.length = data.length\r\n\t\tcached.nodes = nodes\r\n\t}\r\n\r\n\tfunction buildArrayKeys(data) {\r\n\t\tvar guid = 0\r\n\t\tforKeys(data, function () {\r\n\t\t\tforEach(data, function (attrs) {\r\n\t\t\t\tif ((attrs = attrs && attrs.attrs) && attrs.key == null) {\r\n\t\t\t\t\tattrs.key = \"__mithril__\" + guid++\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn 1\r\n\t\t})\r\n\t}\r\n\r\n\tfunction isDifferentEnough(data, cached, dataAttrKeys) {\r\n\t\tif (data.tag !== cached.tag) return true\r\n\r\n\t\tif (dataAttrKeys.sort().join() !==\r\n\t\t\t\tObject.keys(cached.attrs).sort().join()) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.id !== cached.attrs.id) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.key !== cached.attrs.key) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"all\") {\r\n\t\t\treturn !cached.configContext || cached.configContext.retain !== true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\") {\r\n\t\t\treturn cached.configContext && cached.configContext.retain === false\r\n\t\t}\r\n\r\n\t\treturn false\r\n\t}\r\n\r\n\tfunction maybeRecreateObject(data, cached, dataAttrKeys) {\r\n\t\t// if an element is different enough from the one in cache, recreate it\r\n\t\tif (isDifferentEnough(data, cached, dataAttrKeys)) {\r\n\t\t\tif (cached.nodes.length) clear(cached.nodes)\r\n\r\n\t\t\tif (cached.configContext &&\r\n\t\t\t\t\tisFunction(cached.configContext.onunload)) {\r\n\t\t\t\tcached.configContext.onunload()\r\n\t\t\t}\r\n\r\n\t\t\tif (cached.controllers) {\r\n\t\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\t\tif (controller.onunload) {\r\n\t\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getObjectNamespace(data, namespace) {\r\n\t\tif (data.attrs.xmlns) return data.attrs.xmlns\r\n\t\tif (data.tag === \"svg\") return \"http://www.w3.org/2000/svg\"\r\n\t\tif (data.tag === \"math\") return \"http://www.w3.org/1998/Math/MathML\"\r\n\t\treturn namespace\r\n\t}\r\n\r\n\tvar pendingRequests = 0\r\n\tm.startComputation = function () { pendingRequests++ }\r\n\tm.endComputation = function () {\r\n\t\tif (pendingRequests > 1) {\r\n\t\t\tpendingRequests--\r\n\t\t} else {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tm.redraw()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unloadCachedControllers(cached, views, controllers) {\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t\tforEach(controllers, function (controller) {\r\n\t\t\t\tif (controller.onunload && controller.onunload.$old) {\r\n\t\t\t\t\tcontroller.onunload = controller.onunload.$old\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (pendingRequests && controller.onunload) {\r\n\t\t\t\t\tvar onunload = controller.onunload\r\n\t\t\t\t\tcontroller.onunload = noop\r\n\t\t\t\t\tcontroller.onunload.$old = onunload\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {\r\n\t\t// schedule configs to be called. They are called after `build` finishes\r\n\t\t// running\r\n\t\tif (isFunction(data.attrs.config)) {\r\n\t\t\tvar context = cached.configContext = cached.configContext || {}\r\n\r\n\t\t\t// bind\r\n\t\t\tconfigs.push(function () {\r\n\t\t\t\treturn data.attrs.config.call(data, node, !isNew, context,\r\n\t\t\t\t\tcached)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildUpdatedNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\teditable,\r\n\t\thasKeys,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tconfigs,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar node = cached.nodes[0]\r\n\r\n\t\tif (hasKeys) {\r\n\t\t\tsetAttributes(node, data.tag, data.attrs, cached.attrs, namespace)\r\n\t\t}\r\n\r\n\t\tcached.children = build(\r\n\t\t\tnode,\r\n\t\t\tdata.tag,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tdata.children,\r\n\t\t\tcached.children,\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\tnamespace,\r\n\t\t\tconfigs\r\n\t\t)\r\n\r\n\t\tcached.nodes.intact = true\r\n\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tfunction handleNonexistentNodes(data, parentElement, index) {\r\n\t\tvar nodes\r\n\t\tif (data.$trusted) {\r\n\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t} else {\r\n\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\tif (!(parentElement.nodeName in voidElements)) {\r\n\t\t\t\tinsertNode(parentElement, nodes[0], index)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cached\r\n\r\n\t\tif (typeof data === \"string\" ||\r\n\t\t\t\ttypeof data === \"number\" ||\r\n\t\t\t\ttypeof data === \"boolean\") {\r\n\t\t\tcached = new data.constructor(data)\r\n\t\t} else {\r\n\t\t\tcached = data\r\n\t\t}\r\n\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction reattachNodes(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\teditable,\r\n\t\tindex,\r\n\t\tparentTag\r\n\t) {\r\n\t\tvar nodes = cached.nodes\r\n\t\tif (!editable || editable !== $document.activeElement) {\r\n\t\t\tif (data.$trusted) {\r\n\t\t\t\tclear(nodes, cached)\r\n\t\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t\t} else if (parentTag === \"textarea\") {\r\n\t\t\t\t// <textarea> uses `value` instead of `nodeValue`.\r\n\t\t\t\tparentElement.value = data\r\n\t\t\t} else if (editable) {\r\n\t\t\t\t// contenteditable nodes use `innerHTML` instead of `nodeValue`.\r\n\t\t\t\teditable.innerHTML = data\r\n\t\t\t} else {\r\n\t\t\t\t// was a trusted string\r\n\t\t\t\tif (nodes[0].nodeType === 1 || nodes.length > 1 ||\r\n\t\t\t\t\t\t(nodes[0].nodeValue.trim &&\r\n\t\t\t\t\t\t\t!nodes[0].nodeValue.trim())) {\r\n\t\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinjectTextNode(parentElement, nodes[0], index, data)\r\n\t\t\t}\r\n\t\t}\r\n\t\tcached = new data.constructor(data)\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction handleTextNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\tindex,\r\n\t\tparentElement,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tparentTag\r\n\t) {\r\n\t\tif (!cached.nodes.length) {\r\n\t\t\treturn handleNonexistentNodes(data, parentElement, index)\r\n\t\t} else if (cached.valueOf() !== data.valueOf() || shouldReattach) {\r\n\t\t\treturn reattachNodes(data, cached, parentElement, editable, index,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn (cached.nodes.intact = true, cached)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getSubArrayCount(item) {\r\n\t\tif (item.$trusted) {\r\n\t\t\t// fix offset of next element if item was a trusted string w/ more\r\n\t\t\t// than one html element\r\n\t\t\t// the first clause in the regexp matches elements\r\n\t\t\t// the second clause (after the pipe) matches text nodes\r\n\t\t\tvar match = item.match(/<[^\\/]|\\>\\s*[^<]/g)\r\n\t\t\tif (match != null) return match.length\r\n\t\t} else if (isArray(item)) {\r\n\t\t\treturn item.length\r\n\t\t}\r\n\t\treturn 1\r\n\t}\r\n\r\n\tfunction buildArray(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tparentTag,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tdata = flatten(data)\r\n\t\tvar nodes = []\r\n\t\tvar intact = cached.length === data.length\r\n\t\tvar subArrayCount = 0\r\n\r\n\t\t// keys algorithm: sort elements without recreating them if keys are\r\n\t\t// present\r\n\t\t//\r\n\t\t// 1) create a map of all existing keys, and mark all for deletion\r\n\t\t// 2) add new keys to map and mark them for addition\r\n\t\t// 3) if key exists in new list, change action from deletion to a move\r\n\t\t// 4) for each key, handle its corresponding action as marked in\r\n\t\t// previous steps\r\n\r\n\t\tvar existing = {}\r\n\t\tvar shouldMaintainIdentities = false\r\n\r\n\t\tforKeys(cached, function (attrs, i) {\r\n\t\t\tshouldMaintainIdentities = true\r\n\t\t\texisting[cached[i].attrs.key] = {action: DELETION, index: i}\r\n\t\t})\r\n\r\n\t\tbuildArrayKeys(data)\r\n\t\tif (shouldMaintainIdentities) {\r\n\t\t\tcached = diffKeys(data, cached, existing, parentElement)\r\n\t\t}\r\n\t\t// end key algorithm\r\n\r\n\t\tvar cacheCount = 0\r\n\t\t// faster explicitly written\r\n\t\tfor (var i = 0, len = data.length; i < len; i++) {\r\n\t\t\t// diff each item in the array\r\n\t\t\tvar item = build(\r\n\t\t\t\tparentElement,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tcached,\r\n\t\t\t\tindex,\r\n\t\t\t\tdata[i],\r\n\t\t\t\tcached[cacheCount],\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tindex + subArrayCount || subArrayCount,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\r\n\t\t\tif (item !== undefined) {\r\n\t\t\t\tintact = intact && item.nodes.intact\r\n\t\t\t\tsubArrayCount += getSubArrayCount(item)\r\n\t\t\t\tcached[cacheCount++] = item\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intact) diffArray(data, cached, nodes)\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction makeCache(data, cached, index, parentIndex, parentCache) {\r\n\t\tif (cached != null) {\r\n\t\t\tif (type.call(cached) === type.call(data)) return cached\r\n\r\n\t\t\tif (parentCache && parentCache.nodes) {\r\n\t\t\t\tvar offset = index - parentIndex\r\n\t\t\t\tvar end = offset + (isArray(data) ? data : cached.nodes).length\r\n\t\t\t\tclear(\r\n\t\t\t\t\tparentCache.nodes.slice(offset, end),\r\n\t\t\t\t\tparentCache.slice(offset, end))\r\n\t\t\t} else if (cached.nodes) {\r\n\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcached = new data.constructor()\r\n\t\t// if constructor creates a virtual dom element, use a blank object as\r\n\t\t// the base cached node instead of copying the virtual el (#277)\r\n\t\tif (cached.tag) cached = {}\r\n\t\tcached.nodes = []\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction constructNode(data, namespace) {\r\n\t\tif (data.attrs.is) {\r\n\t\t\tif (namespace == null) {\r\n\t\t\t\treturn $document.createElement(data.tag, data.attrs.is)\r\n\t\t\t} else {\r\n\t\t\t\treturn $document.createElementNS(namespace, data.tag,\r\n\t\t\t\t\tdata.attrs.is)\r\n\t\t\t}\r\n\t\t} else if (namespace == null) {\r\n\t\t\treturn $document.createElement(data.tag)\r\n\t\t} else {\r\n\t\t\treturn $document.createElementNS(namespace, data.tag)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructAttrs(data, node, namespace, hasKeys) {\r\n\t\tif (hasKeys) {\r\n\t\t\treturn setAttributes(node, data.tag, data.attrs, {}, namespace)\r\n\t\t} else {\r\n\t\t\treturn data.attrs\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructChildren(\r\n\t\tdata,\r\n\t\tnode,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tif (data.children != null && data.children.length > 0) {\r\n\t\t\treturn build(\r\n\t\t\t\tnode,\r\n\t\t\t\tdata.tag,\r\n\t\t\t\tundefined,\r\n\t\t\t\tundefined,\r\n\t\t\t\tdata.children,\r\n\t\t\t\tcached.children,\r\n\t\t\t\ttrue,\r\n\t\t\t\t0,\r\n\t\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else {\r\n\t\t\treturn data.children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction reconstructCached(\r\n\t\tdata,\r\n\t\tattrs,\r\n\t\tchildren,\r\n\t\tnode,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar cached = {\r\n\t\t\ttag: data.tag,\r\n\t\t\tattrs: attrs,\r\n\t\t\tchildren: children,\r\n\t\t\tnodes: [node]\r\n\t\t}\r\n\r\n\t\tunloadCachedControllers(cached, views, controllers)\r\n\r\n\t\tif (cached.children && !cached.children.nodes) {\r\n\t\t\tcached.children.nodes = []\r\n\t\t}\r\n\r\n\t\t// edge case: setting value on <select> doesn't work before children\r\n\t\t// exist, so set it again after children have been created\r\n\t\tif (data.tag === \"select\" && \"value\" in data.attrs) {\r\n\t\t\tsetAttributes(node, data.tag, {value: data.attrs.value}, {},\r\n\t\t\t\tnamespace)\r\n\t\t}\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction getController(views, view, cachedControllers, controller) {\r\n\t\tvar controllerIndex\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\" && views) {\r\n\t\t\tcontrollerIndex = views.indexOf(view)\r\n\t\t} else {\r\n\t\t\tcontrollerIndex = -1\r\n\t\t}\r\n\r\n\t\tif (controllerIndex > -1) {\r\n\t\t\treturn cachedControllers[controllerIndex]\r\n\t\t} else if (isFunction(controller)) {\r\n\t\t\treturn new controller()\r\n\t\t} else {\r\n\t\t\treturn {}\r\n\t\t}\r\n\t}\r\n\r\n\tvar unloaders = []\r\n\r\n\tfunction updateLists(views, controllers, view, controller) {\r\n\t\tif (controller.onunload != null &&\r\n\t\t\t\tunloaders.map(function (u) { return u.handler })\r\n\t\t\t\t\t.indexOf(controller.onunload) < 0) {\r\n\t\t\tunloaders.push({\r\n\t\t\t\tcontroller: controller,\r\n\t\t\t\thandler: controller.onunload\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tviews.push(view)\r\n\t\tcontrollers.push(controller)\r\n\t}\r\n\r\n\tvar forcing = false\r\n\tfunction checkView(\r\n\t\tdata,\r\n\t\tview,\r\n\t\tcached,\r\n\t\tcachedControllers,\r\n\t\tcontrollers,\r\n\t\tviews\r\n\t) {\r\n\t\tvar controller = getController(\r\n\t\t\tcached.views,\r\n\t\t\tview,\r\n\t\t\tcachedControllers,\r\n\t\t\tdata.controller)\r\n\r\n\t\tvar key = data && data.attrs && data.attrs.key\r\n\r\n\t\tif (pendingRequests === 0 ||\r\n\t\t\t\tforcing ||\r\n\t\t\t\tcachedControllers &&\r\n\t\t\t\t\tcachedControllers.indexOf(controller) > -1) {\r\n\t\t\tdata = data.view(controller)\r\n\t\t} else {\r\n\t\t\tdata = {tag: \"placeholder\"}\r\n\t\t}\r\n\r\n\t\tif (data.subtree === \"retain\") return data\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tdata.attrs.key = key\r\n\t\tupdateLists(views, controllers, view, controller)\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction markViews(data, cached, views, controllers) {\r\n\t\tvar cachedControllers = cached && cached.controllers\r\n\r\n\t\twhile (data.view != null) {\r\n\t\t\tdata = checkView(\r\n\t\t\t\tdata,\r\n\t\t\t\tdata.view.$original || data.view,\r\n\t\t\t\tcached,\r\n\t\t\t\tcachedControllers,\r\n\t\t\t\tcontrollers,\r\n\t\t\t\tviews)\r\n\t\t}\r\n\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction buildObject( // eslint-disable-line max-statements\r\n\t\tdata,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tshouldReattach,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tvar views = []\r\n\t\tvar controllers = []\r\n\r\n\t\tdata = markViews(data, cached, views, controllers)\r\n\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\r\n\t\tif (!data.tag && controllers.length) {\r\n\t\t\tthrow new Error(\"Component template must return a virtual \" +\r\n\t\t\t\t\"element, not an array, string, etc.\")\r\n\t\t}\r\n\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tcached.attrs = cached.attrs || {}\r\n\r\n\t\tvar dataAttrKeys = Object.keys(data.attrs)\r\n\t\tvar hasKeys = dataAttrKeys.length > (\"key\" in data.attrs ? 1 : 0)\r\n\r\n\t\tmaybeRecreateObject(data, cached, dataAttrKeys)\r\n\r\n\t\tif (!isString(data.tag)) return\r\n\r\n\t\tvar isNew = cached.nodes.length === 0\r\n\r\n\t\tnamespace = getObjectNamespace(data, namespace)\r\n\r\n\t\tvar node\r\n\t\tif (isNew) {\r\n\t\t\tnode = constructNode(data, namespace)\r\n\t\t\t// set attributes first, then create children\r\n\t\t\tvar attrs = constructAttrs(data, node, namespace, hasKeys)\r\n\r\n\t\t\t// add the node to its parent before attaching children to it\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\r\n\t\t\tvar children = constructChildren(data, node, cached, editable,\r\n\t\t\t\tnamespace, configs)\r\n\r\n\t\t\tcached = reconstructCached(\r\n\t\t\t\tdata,\r\n\t\t\t\tattrs,\r\n\t\t\t\tchildren,\r\n\t\t\t\tnode,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tcontrollers)\r\n\t\t} else {\r\n\t\t\tnode = buildUpdatedNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\teditable,\r\n\t\t\t\thasKeys,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tconfigs,\r\n\t\t\t\tcontrollers)\r\n\t\t}\r\n\r\n\t\tif (!isNew && shouldReattach === true && node != null) {\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\t\t}\r\n\r\n\t\t// The configs are called after `build` finishes running\r\n\t\tscheduleConfigsToBeCalled(configs, data, node, isNew, cached)\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction build(\r\n\t\tparentElement,\r\n\t\tparentTag,\r\n\t\tparentCache,\r\n\t\tparentIndex,\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tshouldReattach,\r\n\t\tindex,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\t/*\r\n\t\t * `build` is a recursive function that manages creation/diffing/removal\r\n\t\t * of DOM elements based on comparison between `data` and `cached` the\r\n\t\t * diff algorithm can be summarized as this:\r\n\t\t *\r\n\t\t * 1 - compare `data` and `cached`\r\n\t\t * 2 - if they are different, copy `data` to `cached` and update the DOM\r\n\t\t * based on what the difference is\r\n\t\t * 3 - recursively apply this algorithm for every array and for the\r\n\t\t * children of every virtual element\r\n\t\t *\r\n\t\t * The `cached` data structure is essentially the same as the previous\r\n\t\t * redraw's `data` data structure, with a few additions:\r\n\t\t * - `cached` always has a property called `nodes`, which is a list of\r\n\t\t * DOM elements that correspond to the data represented by the\r\n\t\t * respective virtual element\r\n\t\t * - in order to support attaching `nodes` as a property of `cached`,\r\n\t\t * `cached` is *always* a non-primitive object, i.e. if the data was\r\n\t\t * a string, then cached is a String instance. If data was `null` or\r\n\t\t * `undefined`, cached is `new String(\"\")`\r\n\t\t * - `cached also has a `configContext` property, which is the state\r\n\t\t * storage object exposed by config(element, isInitialized, context)\r\n\t\t * - when `cached` is an Object, it represents a virtual element; when\r\n\t\t * it's an Array, it represents a list of elements; when it's a\r\n\t\t * String, Number or Boolean, it represents a text node\r\n\t\t *\r\n\t\t * `parentElement` is a DOM element used for W3C DOM API calls\r\n\t\t * `parentTag` is only used for handling a corner case for textarea\r\n\t\t * values\r\n\t\t * `parentCache` is used to remove nodes in some multi-node cases\r\n\t\t * `parentIndex` and `index` are used to figure out the offset of nodes.\r\n\t\t * They're artifacts from before arrays started being flattened and are\r\n\t\t * likely refactorable\r\n\t\t * `data` and `cached` are, respectively, the new and old nodes being\r\n\t\t * diffed\r\n\t\t * `shouldReattach` is a flag indicating whether a parent node was\r\n\t\t * recreated (if so, and if this node is reused, then this node must\r\n\t\t * reattach itself to the new parent)\r\n\t\t * `editable` is a flag that indicates whether an ancestor is\r\n\t\t * contenteditable\r\n\t\t * `namespace` indicates the closest HTML namespace as it cascades down\r\n\t\t * from an ancestor\r\n\t\t * `configs` is a list of config functions to run after the topmost\r\n\t\t * `build` call finishes running\r\n\t\t *\r\n\t\t * there's logic that relies on the assumption that null and undefined\r\n\t\t * data are equivalent to empty strings\r\n\t\t * - this prevents lifecycle surprises from procedural helpers that mix\r\n\t\t * implicit and explicit return statements (e.g.\r\n\t\t * function foo() {if (cond) return m(\"div\")}\r\n\t\t * - it simplifies diffing code\r\n\t\t */\r\n\t\tdata = dataToString(data)\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\t\tcached = makeCache(data, cached, index, parentIndex, parentCache)\r\n\r\n\t\tif (isArray(data)) {\r\n\t\t\treturn buildArray(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (data != null && isObject(data)) {\r\n\t\t\treturn buildObject(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (!isFunction(data)) {\r\n\t\t\treturn handleTextNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sortChanges(a, b) {\r\n\t\treturn a.action - b.action || a.index - b.index\r\n\t}\r\n\r\n\tfunction copyStyleAttrs(node, dataAttr, cachedAttr) {\r\n\t\tfor (var rule in dataAttr) {\r\n\t\t\tif (hasOwn.call(dataAttr, rule)) {\r\n\t\t\t\tif (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {\r\n\t\t\t\t\tnode.style[rule] = dataAttr[rule]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (rule in cachedAttr) {\r\n\t\t\tif (hasOwn.call(cachedAttr, rule)) {\r\n\t\t\t\tif (!hasOwn.call(dataAttr, rule)) node.style[rule] = \"\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar shouldUseSetAttribute = {\r\n\t\tlist: 1,\r\n\t\tstyle: 1,\r\n\t\tform: 1,\r\n\t\ttype: 1,\r\n\t\twidth: 1,\r\n\t\theight: 1\r\n\t}\r\n\r\n\tfunction setSingleAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (attrName === \"config\" || attrName === \"key\") {\r\n\t\t\t// `config` isn't a real attribute, so ignore it\r\n\t\t\treturn true\r\n\t\t} else if (isFunction(dataAttr) && attrName.slice(0, 2) === \"on\") {\r\n\t\t\t// hook event handlers to the auto-redrawing system\r\n\t\t\tnode[attrName] = autoredraw(dataAttr, node)\r\n\t\t} else if (attrName === \"style\" && dataAttr != null &&\r\n\t\t\t\tisObject(dataAttr)) {\r\n\t\t\t// handle `style: {...}`\r\n\t\t\tcopyStyleAttrs(node, dataAttr, cachedAttr)\r\n\t\t} else if (namespace != null) {\r\n\t\t\t// handle SVG\r\n\t\t\tif (attrName === \"href\") {\r\n\t\t\t\tnode.setAttributeNS(\"http://www.w3.org/1999/xlink\",\r\n\t\t\t\t\t\"href\", dataAttr)\r\n\t\t\t} else {\r\n\t\t\t\tnode.setAttribute(\r\n\t\t\t\t\tattrName === \"className\" ? \"class\" : attrName,\r\n\t\t\t\t\tdataAttr)\r\n\t\t\t}\r\n\t\t} else if (attrName in node && !shouldUseSetAttribute[attrName]) {\r\n\t\t\t// handle cases that are properties (but ignore cases where we\r\n\t\t\t// should use setAttribute instead)\r\n\t\t\t//\r\n\t\t\t// - list and form are typically used as strings, but are DOM\r\n\t\t\t// element references in js\r\n\t\t\t//\r\n\t\t\t// - when using CSS selectors (e.g. `m(\"[style='']\")`), style is\r\n\t\t\t// used as a string, but it's an object in js\r\n\t\t\t//\r\n\t\t\t// #348 don't set the value if not needed - otherwise, cursor\r\n\t\t\t// placement breaks in Chrome\r\n\t\t\ttry {\r\n\t\t\t\tif (tag !== \"input\" || node[attrName] !== dataAttr) {\r\n\t\t\t\t\tnode[attrName] = dataAttr\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tnode.setAttribute(attrName, dataAttr)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse node.setAttribute(attrName, dataAttr)\r\n\t}\r\n\r\n\tfunction trySetAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\tcachedAttrs,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) {\r\n\t\t\tcachedAttrs[attrName] = dataAttr\r\n\t\t\ttry {\r\n\t\t\t\treturn setSingleAttr(\r\n\t\t\t\t\tnode,\r\n\t\t\t\t\tattrName,\r\n\t\t\t\t\tdataAttr,\r\n\t\t\t\t\tcachedAttr,\r\n\t\t\t\t\ttag,\r\n\t\t\t\t\tnamespace)\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// swallow IE's invalid argument errors to mimic HTML's\r\n\t\t\t\t// fallback-to-doing-nothing-on-invalid-attributes behavior\r\n\t\t\t\tif (e.message.indexOf(\"Invalid argument\") < 0) throw e\r\n\t\t\t}\r\n\t\t} else if (attrName === \"value\" && tag === \"input\" &&\r\n\t\t\t\tnode.value !== dataAttr) {\r\n\t\t\t// #348 dataAttr may not be a string, so use loose comparison\r\n\t\t\tnode.value = dataAttr\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {\r\n\t\tfor (var attrName in dataAttrs) {\r\n\t\t\tif (hasOwn.call(dataAttrs, attrName)) {\r\n\t\t\t\tif (trySetAttr(\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\tattrName,\r\n\t\t\t\t\t\tdataAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs,\r\n\t\t\t\t\t\ttag,\r\n\t\t\t\t\t\tnamespace)) {\r\n\t\t\t\t\tcontinue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cachedAttrs\r\n\t}\r\n\r\n\tfunction clear(nodes, cached) {\r\n\t\tfor (var i = nodes.length - 1; i > -1; i--) {\r\n\t\t\tif (nodes[i] && nodes[i].parentNode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnodes[i].parentNode.removeChild(nodes[i])\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\t\t// ignore if this fails due to order of events (see\r\n\t\t\t\t\t// http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)\r\n\t\t\t\t\t/* eslint-enable max-len */\r\n\t\t\t\t}\r\n\t\t\t\tcached = [].concat(cached)\r\n\t\t\t\tif (cached[i]) unload(cached[i])\r\n\t\t\t}\r\n\t\t}\r\n\t\t// release memory if nodes is an array. This check should fail if nodes\r\n\t\t// is a NodeList (see loop above)\r\n\t\tif (nodes.length) {\r\n\t\t\tnodes.length = 0\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unload(cached) {\r\n\t\tif (cached.configContext && isFunction(cached.configContext.onunload)) {\r\n\t\t\tcached.configContext.onunload()\r\n\t\t\tcached.configContext.onunload = null\r\n\t\t}\r\n\t\tif (cached.controllers) {\r\n\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\tif (isFunction(controller.onunload)) {\r\n\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\tif (cached.children) {\r\n\t\t\tif (isArray(cached.children)) forEach(cached.children, unload)\r\n\t\t\telse if (cached.children.tag) unload(cached.children)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction appendTextFragment(parentElement, data) {\r\n\t\ttry {\r\n\t\t\tparentElement.appendChild(\r\n\t\t\t\t$document.createRange().createContextualFragment(data))\r\n\t\t} catch (e) {\r\n\t\t\tparentElement.insertAdjacentHTML(\"beforeend\", data)\r\n\t\t\treplaceScriptNodes(parentElement)\r\n\t\t}\r\n\t}\r\n\r\n\t// Replace script tags inside given DOM element with executable ones.\r\n\t// Will also check children recursively and replace any found script\r\n\t// tags in same manner.\r\n\tfunction replaceScriptNodes(node) {\r\n\t\tif (node.tagName === \"SCRIPT\") {\r\n\t\t\tnode.parentNode.replaceChild(buildExecutableNode(node), node)\r\n\t\t} else {\r\n\t\t\tvar children = node.childNodes\r\n\t\t\tif (children && children.length) {\r\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\treplaceScriptNodes(children[i])\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\t// Replace script element with one whose contents are executable.\r\n\tfunction buildExecutableNode(node){\r\n\t\tvar scriptEl = document.createElement(\"script\")\r\n\t\tvar attrs = node.attributes\r\n\r\n\t\tfor (var i = 0; i < attrs.length; i++) {\r\n\t\t\tscriptEl.setAttribute(attrs[i].name, attrs[i].value)\r\n\t\t}\r\n\r\n\t\tscriptEl.text = node.innerHTML\r\n\t\treturn scriptEl\r\n\t}\r\n\r\n\tfunction injectHTML(parentElement, index, data) {\r\n\t\tvar nextSibling = parentElement.childNodes[index]\r\n\t\tif (nextSibling) {\r\n\t\t\tvar isElement = nextSibling.nodeType !== 1\r\n\t\t\tvar placeholder = $document.createElement(\"span\")\r\n\t\t\tif (isElement) {\r\n\t\t\t\tparentElement.insertBefore(placeholder, nextSibling || null)\r\n\t\t\t\tplaceholder.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t\tparentElement.removeChild(placeholder)\r\n\t\t\t} else {\r\n\t\t\t\tnextSibling.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tappendTextFragment(parentElement, data)\r\n\t\t}\r\n\r\n\t\tvar nodes = []\r\n\r\n\t\twhile (parentElement.childNodes[index] !== nextSibling) {\r\n\t\t\tnodes.push(parentElement.childNodes[index])\r\n\t\t\tindex++\r\n\t\t}\r\n\r\n\t\treturn nodes\r\n\t}\r\n\r\n\tfunction autoredraw(callback, object) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || event\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t\tm.startComputation()\r\n\t\t\ttry {\r\n\t\t\t\treturn callback.call(object, e)\r\n\t\t\t} finally {\r\n\t\t\t\tendFirstComputation()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar html\r\n\tvar documentNode = {\r\n\t\tappendChild: function (node) {\r\n\t\t\tif (html === undefined) html = $document.createElement(\"html\")\r\n\t\t\tif ($document.documentElement &&\r\n\t\t\t\t\t$document.documentElement !== node) {\r\n\t\t\t\t$document.replaceChild(node, $document.documentElement)\r\n\t\t\t} else {\r\n\t\t\t\t$document.appendChild(node)\r\n\t\t\t}\r\n\r\n\t\t\tthis.childNodes = $document.childNodes\r\n\t\t},\r\n\r\n\t\tinsertBefore: function (node) {\r\n\t\t\tthis.appendChild(node)\r\n\t\t},\r\n\r\n\t\tchildNodes: []\r\n\t}\r\n\r\n\tvar nodeCache = []\r\n\tvar cellCache = {}\r\n\r\n\tm.render = function (root, cell, forceRecreation) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Ensure the DOM element being passed to \" +\r\n\t\t\t\t\"m.route/m.mount/m.render is not undefined.\")\r\n\t\t}\r\n\t\tvar configs = []\r\n\t\tvar id = getCellCacheKey(root)\r\n\t\tvar isDocumentRoot = root === $document\r\n\t\tvar node\r\n\r\n\t\tif (isDocumentRoot || root === $document.documentElement) {\r\n\t\t\tnode = documentNode\r\n\t\t} else {\r\n\t\t\tnode = root\r\n\t\t}\r\n\r\n\t\tif (isDocumentRoot && cell.tag !== \"html\") {\r\n\t\t\tcell = {tag: \"html\", attrs: {}, children: cell}\r\n\t\t}\r\n\r\n\t\tif (cellCache[id] === undefined) clear(node.childNodes)\r\n\t\tif (forceRecreation === true) reset(root)\r\n\r\n\t\tcellCache[id] = build(\r\n\t\t\tnode,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tcell,\r\n\t\t\tcellCache[id],\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tconfigs)\r\n\r\n\t\tforEach(configs, function (config) { config() })\r\n\t}\r\n\r\n\tfunction getCellCacheKey(element) {\r\n\t\tvar index = nodeCache.indexOf(element)\r\n\t\treturn index < 0 ? nodeCache.push(element) - 1 : index\r\n\t}\r\n\r\n\tm.trust = function (value) {\r\n\t\tvalue = new String(value) // eslint-disable-line no-new-wrappers\r\n\t\tvalue.$trusted = true\r\n\t\treturn value\r\n\t}\r\n\r\n\tfunction gettersetter(store) {\r\n\t\tfunction prop() {\r\n\t\t\tif (arguments.length) store = arguments[0]\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\tprop.toJSON = function () {\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\treturn prop\r\n\t}\r\n\r\n\tm.prop = function (store) {\r\n\t\tif ((store != null && (isObject(store) || isFunction(store)) || ((typeof Promise !== \"undefined\") && (store instanceof Promise))) &&\r\n\t\t\t\tisFunction(store.then)) {\r\n\t\t\treturn propify(store)\r\n\t\t}\r\n\r\n\t\treturn gettersetter(store)\r\n\t}\r\n\r\n\tvar roots = []\r\n\tvar components = []\r\n\tvar controllers = []\r\n\tvar lastRedrawId = null\r\n\tvar lastRedrawCallTime = 0\r\n\tvar computePreRedrawHook = null\r\n\tvar computePostRedrawHook = null\r\n\tvar topComponent\r\n\tvar FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms\r\n\r\n\tfunction parameterize(component, args) {\r\n\t\tfunction controller() {\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\treturn (component.controller || noop).apply(this, args) || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t}\r\n\r\n\t\tif (component.controller) {\r\n\t\t\tcontroller.prototype = component.controller.prototype\r\n\t\t}\r\n\r\n\t\tfunction view(ctrl) {\r\n\t\t\tvar currentArgs = [ctrl].concat(args)\r\n\t\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\t\tcurrentArgs.push(arguments[i])\r\n\t\t\t}\r\n\r\n\t\t\treturn component.view.apply(component, currentArgs)\r\n\t\t}\r\n\r\n\t\tview.$original = component.view\r\n\t\tvar output = {controller: controller, view: view}\r\n\t\tif (args[0] && args[0].key != null) output.attrs = {key: args[0].key}\r\n\t\treturn output\r\n\t}\r\n\r\n\tm.component = function (component) {\r\n\t\tvar args = new Array(arguments.length - 1)\r\n\r\n\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\treturn parameterize(component, args)\r\n\t}\r\n\r\n\tfunction checkPrevented(component, root, index, isPrevented) {\r\n\t\tif (!isPrevented) {\r\n\t\t\tm.redraw.strategy(\"all\")\r\n\t\t\tm.startComputation()\r\n\t\t\troots[index] = root\r\n\t\t\tvar currentComponent\r\n\r\n\t\t\tif (component) {\r\n\t\t\t\tcurrentComponent = topComponent = component\r\n\t\t\t} else {\r\n\t\t\t\tcurrentComponent = topComponent = component = {controller: noop}\r\n\t\t\t}\r\n\r\n\t\t\tvar controller = new (component.controller || noop)()\r\n\r\n\t\t\t// controllers may call m.mount recursively (via m.route redirects,\r\n\t\t\t// for example)\r\n\t\t\t// this conditional ensures only the last recursive m.mount call is\r\n\t\t\t// applied\r\n\t\t\tif (currentComponent === topComponent) {\r\n\t\t\t\tcontrollers[index] = controller\r\n\t\t\t\tcomponents[index] = component\r\n\t\t\t}\r\n\t\t\tendFirstComputation()\r\n\t\t\tif (component === null) {\r\n\t\t\t\tremoveRootElement(root, index)\r\n\t\t\t}\r\n\t\t\treturn controllers[index]\r\n\t\t} else if (component == null) {\r\n\t\t\tremoveRootElement(root, index)\r\n\t\t}\r\n\t}\r\n\r\n\tm.mount = m.module = function (root, component) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Please ensure the DOM element exists before \" +\r\n\t\t\t\t\"rendering a template into it.\")\r\n\t\t}\r\n\r\n\t\tvar index = roots.indexOf(root)\r\n\t\tif (index < 0) index = roots.length\r\n\r\n\t\tvar isPrevented = false\r\n\t\tvar event = {\r\n\t\t\tpreventDefault: function () {\r\n\t\t\t\tisPrevented = true\r\n\t\t\t\tcomputePreRedrawHook = computePostRedrawHook = null\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforEach(unloaders, function (unloader) {\r\n\t\t\tunloader.handler.call(unloader.controller, event)\r\n\t\t\tunloader.controller.onunload = null\r\n\t\t})\r\n\r\n\t\tif (isPrevented) {\r\n\t\t\tforEach(unloaders, function (unloader) {\r\n\t\t\t\tunloader.controller.onunload = unloader.handler\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tunloaders = []\r\n\t\t}\r\n\r\n\t\tif (controllers[index] && isFunction(controllers[index].onunload)) {\r\n\t\t\tcontrollers[index].onunload(event)\r\n\t\t}\r\n\r\n\t\treturn checkPrevented(component, root, index, isPrevented)\r\n\t}\r\n\r\n\tfunction removeRootElement(root, index) {\r\n\t\troots.splice(index, 1)\r\n\t\tcontrollers.splice(index, 1)\r\n\t\tcomponents.splice(index, 1)\r\n\t\treset(root)\r\n\t\tnodeCache.splice(getCellCacheKey(root), 1)\r\n\t}\r\n\r\n\tvar redrawing = false\r\n\tm.redraw = function (force) {\r\n\t\tif (redrawing) return\r\n\t\tredrawing = true\r\n\t\tif (force) forcing = true\r\n\r\n\t\ttry {\r\n\t\t\t// lastRedrawId is a positive number if a second redraw is requested\r\n\t\t\t// before the next animation frame\r\n\t\t\t// lastRedrawId is null if it's the first redraw and not an event\r\n\t\t\t// handler\r\n\t\t\tif (lastRedrawId && !force) {\r\n\t\t\t\t// when setTimeout: only reschedule redraw if time between now\r\n\t\t\t\t// and previous redraw is bigger than a frame, otherwise keep\r\n\t\t\t\t// currently scheduled timeout\r\n\t\t\t\t// when rAF: always reschedule redraw\r\n\t\t\t\tif ($requestAnimationFrame === global.requestAnimationFrame ||\r\n\t\t\t\t\t\tnew Date() - lastRedrawCallTime > FRAME_BUDGET) {\r\n\t\t\t\t\tif (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)\r\n\t\t\t\t\tlastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tredraw()\r\n\t\t\t\tlastRedrawId = $requestAnimationFrame(function () {\r\n\t\t\t\t\tlastRedrawId = null\r\n\t\t\t\t}, FRAME_BUDGET)\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tredrawing = forcing = false\r\n\t\t}\r\n\t}\r\n\r\n\tm.redraw.strategy = m.prop()\r\n\tfunction redraw() {\r\n\t\tif (computePreRedrawHook) {\r\n\t\t\tcomputePreRedrawHook()\r\n\t\t\tcomputePreRedrawHook = null\r\n\t\t}\r\n\t\tforEach(roots, function (root, i) {\r\n\t\t\tvar component = components[i]\r\n\t\t\tif (controllers[i]) {\r\n\t\t\t\tvar args = [controllers[i]]\r\n\t\t\t\tm.render(root,\r\n\t\t\t\t\tcomponent.view ? component.view(controllers[i], args) : \"\")\r\n\t\t\t}\r\n\t\t})\r\n\t\t// after rendering within a routed context, we need to scroll back to\r\n\t\t// the top, and fetch the document title for history.pushState\r\n\t\tif (computePostRedrawHook) {\r\n\t\t\tcomputePostRedrawHook()\r\n\t\t\tcomputePostRedrawHook = null\r\n\t\t}\r\n\t\tlastRedrawId = null\r\n\t\tlastRedrawCallTime = new Date()\r\n\t\tm.redraw.strategy(\"diff\")\r\n\t}\r\n\r\n\tfunction endFirstComputation() {\r\n\t\tif (m.redraw.strategy() === \"none\") {\r\n\t\t\tpendingRequests--\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t} else {\r\n\t\t\tm.endComputation()\r\n\t\t}\r\n\t}\r\n\r\n\tm.withAttr = function (prop, withAttrCallback, callbackThis) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || window.event\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\tvar currentTarget = e.currentTarget || this\r\n\t\t\tvar _this = callbackThis || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t\tvar target = prop in currentTarget ?\r\n\t\t\t\tcurrentTarget[prop] :\r\n\t\t\t\tcurrentTarget.getAttribute(prop)\r\n\t\t\twithAttrCallback.call(_this, target)\r\n\t\t}\r\n\t}\r\n\r\n\t// routing\r\n\tvar modes = {pathname: \"\", hash: \"#\", search: \"?\"}\r\n\tvar redirect = noop\r\n\tvar isDefaultRoute = false\r\n\tvar routeParams, currentRoute\r\n\r\n\tm.route = function (root, arg1, arg2, vdom) { // eslint-disable-line\r\n\t\t// m.route()\r\n\t\tif (arguments.length === 0) return currentRoute\r\n\t\t// m.route(el, defaultRoute, routes)\r\n\t\tif (arguments.length === 3 && isString(arg1)) {\r\n\t\t\tredirect = function (source) {\r\n\t\t\t\tvar path = currentRoute = normalizeRoute(source)\r\n\t\t\t\tif (!routeByValue(root, arg2, path)) {\r\n\t\t\t\t\tif (isDefaultRoute) {\r\n\t\t\t\t\t\tthrow new Error(\"Ensure the default route matches \" +\r\n\t\t\t\t\t\t\t\"one of the routes defined in m.route\")\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tisDefaultRoute = true\r\n\t\t\t\t\tm.route(arg1, true)\r\n\t\t\t\t\tisDefaultRoute = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar listener = m.route.mode === \"hash\" ?\r\n\t\t\t\t\"onhashchange\" :\r\n\t\t\t\t\"onpopstate\"\r\n\r\n\t\t\tglobal[listener] = function () {\r\n\t\t\t\tvar path = $location[m.route.mode]\r\n\t\t\t\tif (m.route.mode === \"pathname\") path += $location.search\r\n\t\t\t\tif (currentRoute !== normalizeRoute(path)) redirect(path)\r\n\t\t\t}\r\n\r\n\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\tglobal[listener]()\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// config: m.route\r\n\t\tif (root.addEventListener || root.attachEvent) {\r\n\t\t\tvar base = m.route.mode !== \"pathname\" ? $location.pathname : \"\"\r\n\t\t\troot.href = base + modes[m.route.mode] + vdom.attrs.href\r\n\t\t\tif (root.addEventListener) {\r\n\t\t\t\troot.removeEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t\troot.addEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t} else {\r\n\t\t\t\troot.detachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t\troot.attachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t}\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\t\t// m.route(route, params, shouldReplaceHistoryEntry)\r\n\t\tif (isString(root)) {\r\n\t\t\tvar oldRoute = currentRoute\r\n\t\t\tcurrentRoute = root\r\n\r\n\t\t\tvar args = arg1 || {}\r\n\t\t\tvar queryIndex = currentRoute.indexOf(\"?\")\r\n\t\t\tvar params\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tparams = parseQueryString(currentRoute.slice(queryIndex + 1))\r\n\t\t\t} else {\r\n\t\t\t\tparams = {}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i in args) {\r\n\t\t\t\tif (hasOwn.call(args, i)) {\r\n\t\t\t\t\tparams[i] = args[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar querystring = buildQueryString(params)\r\n\t\t\tvar currentPath\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tcurrentPath = currentRoute.slice(0, queryIndex)\r\n\t\t\t} else {\r\n\t\t\t\tcurrentPath = currentRoute\r\n\t\t\t}\r\n\r\n\t\t\tif (querystring) {\r\n\t\t\t\tcurrentRoute = currentPath +\r\n\t\t\t\t\t(currentPath.indexOf(\"?\") === -1 ? \"?\" : \"&\") +\r\n\t\t\t\t\tquerystring\r\n\t\t\t}\r\n\r\n\t\t\tvar replaceHistory =\r\n\t\t\t\t(arguments.length === 3 ? arg2 : arg1) === true ||\r\n\t\t\t\toldRoute === root\r\n\r\n\t\t\tif (global.history.pushState) {\r\n\t\t\t\tvar method = replaceHistory ? \"replaceState\" : \"pushState\"\r\n\t\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\t\tcomputePostRedrawHook = function () {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tglobal.history[method](null, $document.title,\r\n\t\t\t\t\t\t\tmodes[m.route.mode] + currentRoute)\r\n\t\t\t\t\t} catch (err) {\r\n\t\t\t\t\t\t// In the event of a pushState or replaceState failure,\r\n\t\t\t\t\t\t// fallback to a standard redirect. This is specifically\r\n\t\t\t\t\t\t// to address a Safari security error when attempting to\r\n\t\t\t\t\t\t// call pushState more than 100 times.\r\n\t\t\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t} else {\r\n\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tm.route.param = function (key) {\r\n\t\tif (!routeParams) {\r\n\t\t\tthrow new Error(\"You must call m.route(element, defaultRoute, \" +\r\n\t\t\t\t\"routes) before calling m.route.param()\")\r\n\t\t}\r\n\r\n\t\tif (!key) {\r\n\t\t\treturn routeParams\r\n\t\t}\r\n\r\n\t\treturn routeParams[key]\r\n\t}\r\n\r\n\tm.route.mode = \"search\"\r\n\r\n\tfunction normalizeRoute(route) {\r\n\t\treturn route.slice(modes[m.route.mode].length)\r\n\t}\r\n\r\n\tfunction routeByValue(root, router, path) {\r\n\t\trouteParams = {}\r\n\r\n\t\tvar queryStart = path.indexOf(\"?\")\r\n\t\tif (queryStart !== -1) {\r\n\t\t\trouteParams = parseQueryString(\r\n\t\t\t\tpath.substr(queryStart + 1, path.length))\r\n\t\t\tpath = path.substr(0, queryStart)\r\n\t\t}\r\n\r\n\t\t// Get all routes and check if there's\r\n\t\t// an exact match for the current path\r\n\t\tvar keys = Object.keys(router)\r\n\t\tvar index = keys.indexOf(path)\r\n\r\n\t\tif (index !== -1){\r\n\t\t\tm.mount(root, router[keys [index]])\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tfor (var route in router) {\r\n\t\t\tif (hasOwn.call(router, route)) {\r\n\t\t\t\tif (route === path) {\r\n\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar matcher = new RegExp(\"^\" + route\r\n\t\t\t\t\t.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\")\r\n\t\t\t\t\t.replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\r\n\r\n\t\t\t\tif (matcher.test(path)) {\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tpath.replace(matcher, function () {\r\n\t\t\t\t\t\tvar keys = route.match(/:[^\\/]+/g) || []\r\n\t\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\r\n\t\t\t\t\t\tforEach(keys, function (key, i) {\r\n\t\t\t\t\t\t\trouteParams[key.replace(/:|\\./g, \"\")] =\r\n\t\t\t\t\t\t\t\tdecodeURIComponent(values[i])\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\t})\r\n\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction routeUnobtrusive(e) {\r\n\t\te = e || event\r\n\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault()\r\n\t\t} else {\r\n\t\t\te.returnValue = false\r\n\t\t}\r\n\r\n\t\tvar currentTarget = e.currentTarget || e.srcElement\r\n\t\tvar args\r\n\r\n\t\tif (m.route.mode === \"pathname\" && currentTarget.search) {\r\n\t\t\targs = parseQueryString(currentTarget.search.slice(1))\r\n\t\t} else {\r\n\t\t\targs = {}\r\n\t\t}\r\n\r\n\t\twhile (currentTarget && !/a/i.test(currentTarget.nodeName)) {\r\n\t\t\tcurrentTarget = currentTarget.parentNode\r\n\t\t}\r\n\r\n\t\t// clear pendingRequests because we want an immediate route change\r\n\t\tpendingRequests = 0\r\n\t\tm.route(currentTarget[m.route.mode]\r\n\t\t\t.slice(modes[m.route.mode].length), args)\r\n\t}\r\n\r\n\tfunction setScroll() {\r\n\t\tif (m.route.mode !== \"hash\" && $location.hash) {\r\n\t\t\t$location.hash = $location.hash\r\n\t\t} else {\r\n\t\t\tglobal.scrollTo(0, 0)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildQueryString(object, prefix) {\r\n\t\tvar duplicates = {}\r\n\t\tvar str = []\r\n\r\n\t\tfor (var prop in object) {\r\n\t\t\tif (hasOwn.call(object, prop)) {\r\n\t\t\t\tvar key = prefix ? prefix + \"[\" + prop + \"]\" : prop\r\n\t\t\t\tvar value = object[prop]\r\n\r\n\t\t\t\tif (value === null) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key))\r\n\t\t\t\t} else if (isObject(value)) {\r\n\t\t\t\t\tstr.push(buildQueryString(value, key))\r\n\t\t\t\t} else if (isArray(value)) {\r\n\t\t\t\t\tvar keys = []\r\n\t\t\t\t\tduplicates[key] = duplicates[key] || {}\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tforEach(value, function (item) {\r\n\t\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\t\tif (!duplicates[key][item]) {\r\n\t\t\t\t\t\t\tduplicates[key][item] = true\r\n\t\t\t\t\t\t\tkeys.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\t\t\tencodeURIComponent(item))\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t\tstr.push(keys.join(\"&\"))\r\n\t\t\t\t} else if (value !== undefined) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\tencodeURIComponent(value))\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn str.join(\"&\")\r\n\t}\r\n\r\n\tfunction parseQueryString(str) {\r\n\t\tif (str === \"\" || str == null) return {}\r\n\t\tif (str.charAt(0) === \"?\") str = str.slice(1)\r\n\r\n\t\tvar pairs = str.split(\"&\")\r\n\t\tvar params = {}\r\n\r\n\t\tforEach(pairs, function (string) {\r\n\t\t\tvar pair = string.split(\"=\")\r\n\t\t\tvar key = decodeURIComponent(pair[0])\r\n\t\t\tvar value = pair.length === 2 ? decodeURIComponent(pair[1]) : null\r\n\t\t\tif (params[key] != null) {\r\n\t\t\t\tif (!isArray(params[key])) params[key] = [params[key]]\r\n\t\t\t\tparams[key].push(value)\r\n\t\t\t}\r\n\t\t\telse params[key] = value\r\n\t\t})\r\n\r\n\t\treturn params\r\n\t}\r\n\r\n\tm.route.buildQueryString = buildQueryString\r\n\tm.route.parseQueryString = parseQueryString\r\n\r\n\tfunction reset(root) {\r\n\t\tvar cacheKey = getCellCacheKey(root)\r\n\t\tclear(root.childNodes, cellCache[cacheKey])\r\n\t\tcellCache[cacheKey] = undefined\r\n\t}\r\n\r\n\tm.deferred = function () {\r\n\t\tvar deferred = new Deferred()\r\n\t\tdeferred.promise = propify(deferred.promise)\r\n\t\treturn deferred\r\n\t}\r\n\r\n\tfunction propify(promise, initialValue) {\r\n\t\tvar prop = m.prop(initialValue)\r\n\t\tpromise.then(prop)\r\n\t\tprop.then = function (resolve, reject) {\r\n\t\t\treturn propify(promise.then(resolve, reject), initialValue)\r\n\t\t}\r\n\r\n\t\tprop.catch = prop.then.bind(null, null)\r\n\t\treturn prop\r\n\t}\r\n\t// Promiz.mithril.js | Zolmeister | MIT\r\n\t// a modified version of Promiz.js, which does not conform to Promises/A+\r\n\t// for two reasons:\r\n\t//\r\n\t// 1) `then` callbacks are called synchronously (because setTimeout is too\r\n\t// slow, and the setImmediate polyfill is too big\r\n\t//\r\n\t// 2) throwing subclasses of Error cause the error to be bubbled up instead\r\n\t// of triggering rejection (because the spec does not account for the\r\n\t// important use case of default browser error handling, i.e. message w/\r\n\t// line number)\r\n\r\n\tvar RESOLVING = 1\r\n\tvar REJECTING = 2\r\n\tvar RESOLVED = 3\r\n\tvar REJECTED = 4\r\n\r\n\tfunction Deferred(onSuccess, onFailure) {\r\n\t\tvar self = this\r\n\t\tvar state = 0\r\n\t\tvar promiseValue = 0\r\n\t\tvar next = []\r\n\r\n\t\tself.promise = {}\r\n\r\n\t\tself.resolve = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = RESOLVING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.reject = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = REJECTING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.promise.then = function (onSuccess, onFailure) {\r\n\t\t\tvar deferred = new Deferred(onSuccess, onFailure)\r\n\r\n\t\t\tif (state === RESOLVED) {\r\n\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t} else if (state === REJECTED) {\r\n\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t} else {\r\n\t\t\t\tnext.push(deferred)\r\n\t\t\t}\r\n\r\n\t\t\treturn deferred.promise\r\n\t\t}\r\n\r\n\t\tfunction finish(type) {\r\n\t\t\tstate = type || REJECTED\r\n\t\t\tnext.map(function (deferred) {\r\n\t\t\t\tif (state === RESOLVED) {\r\n\t\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction thennable(then, success, failure, notThennable) {\r\n\t\t\tif (((promiseValue != null && isObject(promiseValue)) ||\r\n\t\t\t\t\tisFunction(promiseValue)) && isFunction(then)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// count protects against abuse calls from spec checker\r\n\t\t\t\t\tvar count = 0\r\n\t\t\t\t\tthen.call(promiseValue, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tsuccess()\r\n\t\t\t\t\t}, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tfailure()\r\n\t\t\t\t\t})\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\tfailure()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnotThennable()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction fire() {\r\n\t\t\t// check if it's a thenable\r\n\t\t\tvar then\r\n\t\t\ttry {\r\n\t\t\t\tthen = promiseValue && promiseValue.then\r\n\t\t\t} catch (e) {\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\tpromiseValue = e\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\treturn fire()\r\n\t\t\t}\r\n\r\n\t\t\tif (state === REJECTING) {\r\n\t\t\t\tm.deferred.onerror(promiseValue)\r\n\t\t\t}\r\n\r\n\t\t\tthennable(then, function () {\r\n\t\t\t\tstate = RESOLVING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (state === RESOLVING && isFunction(onSuccess)) {\r\n\t\t\t\t\t\tpromiseValue = onSuccess(promiseValue)\r\n\t\t\t\t\t} else if (state === REJECTING && isFunction(onFailure)) {\r\n\t\t\t\t\t\tpromiseValue = onFailure(promiseValue)\r\n\t\t\t\t\t\tstate = RESOLVING\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\treturn finish()\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (promiseValue === self) {\r\n\t\t\t\t\tpromiseValue = TypeError()\r\n\t\t\t\t\tfinish()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthennable(then, function () {\r\n\t\t\t\t\t\tfinish(RESOLVED)\r\n\t\t\t\t\t}, finish, function () {\r\n\t\t\t\t\t\tfinish(state === RESOLVING && RESOLVED)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tm.deferred.onerror = function (e) {\r\n\t\tif (type.call(e) === \"[object Error]\" &&\r\n\t\t\t\t!/ Error/.test(e.constructor.toString())) {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n\r\n\tm.sync = function (args) {\r\n\t\tvar deferred = m.deferred()\r\n\t\tvar outstanding = args.length\r\n\t\tvar results = []\r\n\t\tvar method = \"resolve\"\r\n\r\n\t\tfunction synchronizer(pos, resolved) {\r\n\t\t\treturn function (value) {\r\n\t\t\t\tresults[pos] = value\r\n\t\t\t\tif (!resolved) method = \"reject\"\r\n\t\t\t\tif (--outstanding === 0) {\r\n\t\t\t\t\tdeferred.promise(results)\r\n\t\t\t\t\tdeferred[method](results)\r\n\t\t\t\t}\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (args.length > 0) {\r\n\t\t\tforEach(args, function (arg, i) {\r\n\t\t\t\targ.then(synchronizer(i, true), synchronizer(i, false))\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tdeferred.resolve([])\r\n\t\t}\r\n\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\tfunction identity(value) { return value }\r\n\r\n\tfunction handleJsonp(options) {\r\n\t\tvar callbackKey = options.callbackName || \"mithril_callback_\" +\r\n\t\t\tnew Date().getTime() + \"_\" +\r\n\t\t\t(Math.round(Math.random() * 1e16)).toString(36)\r\n\r\n\t\tvar script = $document.createElement(\"script\")\r\n\r\n\t\tglobal[callbackKey] = function (resp) {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\t\t\toptions.onload({\r\n\t\t\t\ttype: \"load\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tresponseText: resp\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\t\t}\r\n\r\n\t\tscript.onerror = function () {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\r\n\t\t\toptions.onerror({\r\n\t\t\t\ttype: \"error\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tstatus: 500,\r\n\t\t\t\t\tresponseText: JSON.stringify({\r\n\t\t\t\t\t\terror: \"Error making jsonp request\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.onload = function () {\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.src = options.url +\r\n\t\t\t(options.url.indexOf(\"?\") > 0 ? \"&\" : \"?\") +\r\n\t\t\t(options.callbackKey ? options.callbackKey : \"callback\") +\r\n\t\t\t\"=\" + callbackKey +\r\n\t\t\t\"&\" + buildQueryString(options.data || {})\r\n\r\n\t\t$document.body.appendChild(script)\r\n\t}\r\n\r\n\tfunction createXhr(options) {\r\n\t\tvar xhr = new global.XMLHttpRequest()\r\n\t\txhr.open(options.method, options.url, true, options.user,\r\n\t\t\toptions.password)\r\n\r\n\t\txhr.onreadystatechange = function () {\r\n\t\t\tif (xhr.readyState === 4) {\r\n\t\t\t\tif (xhr.status >= 200 && xhr.status < 300) {\r\n\t\t\t\t\toptions.onload({type: \"load\", target: xhr})\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptions.onerror({type: \"error\", target: xhr})\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (options.serialize === JSON.stringify &&\r\n\t\t\t\toptions.data &&\r\n\t\t\t\toptions.method !== \"GET\") {\r\n\t\t\txhr.setRequestHeader(\"Content-Type\",\r\n\t\t\t\t\"application/json; charset=utf-8\")\r\n\t\t}\r\n\r\n\t\tif (options.deserialize === JSON.parse) {\r\n\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\r\n\t\t}\r\n\r\n\t\tif (isFunction(options.config)) {\r\n\t\t\tvar maybeXhr = options.config(xhr, options)\r\n\t\t\tif (maybeXhr != null) xhr = maybeXhr\r\n\t\t}\r\n\r\n\t\tvar data = options.method === \"GET\" || !options.data ? \"\" : options.data\r\n\r\n\t\tif (data && !isString(data) && data.constructor !== global.FormData) {\r\n\t\t\tthrow new Error(\"Request data should be either be a string or \" +\r\n\t\t\t\t\"FormData. Check the `serialize` option in `m.request`\")\r\n\t\t}\r\n\r\n\t\txhr.send(data)\r\n\t\treturn xhr\r\n\t}\r\n\r\n\tfunction ajax(options) {\r\n\t\tif (options.dataType && options.dataType.toLowerCase() === \"jsonp\") {\r\n\t\t\treturn handleJsonp(options)\r\n\t\t} else {\r\n\t\t\treturn createXhr(options)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction bindData(options, data, serialize) {\r\n\t\tif (options.method === \"GET\" && options.dataType !== \"jsonp\") {\r\n\t\t\tvar prefix = options.url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\r\n\t\t\tvar querystring = buildQueryString(data)\r\n\t\t\toptions.url += (querystring ? prefix + querystring : \"\")\r\n\t\t} else {\r\n\t\t\toptions.data = serialize(data)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parameterizeUrl(url, data) {\r\n\t\tif (data) {\r\n\t\t\turl = url.replace(/:[a-z]\\w+/gi, function (token){\r\n\t\t\t\tvar key = token.slice(1)\r\n\t\t\t\tvar value = data[key] || token\r\n\t\t\t\tdelete data[key]\r\n\t\t\t\treturn value\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn url\r\n\t}\r\n\r\n\tm.request = function (options) {\r\n\t\tif (options.background !== true) m.startComputation()\r\n\t\tvar deferred = new Deferred()\r\n\t\tvar isJSONP = options.dataType &&\r\n\t\t\toptions.dataType.toLowerCase() === \"jsonp\"\r\n\r\n\t\tvar serialize, deserialize, extract\r\n\r\n\t\tif (isJSONP) {\r\n\t\t\tserialize = options.serialize =\r\n\t\t\tdeserialize = options.deserialize = identity\r\n\r\n\t\t\textract = function (jsonp) { return jsonp.responseText }\r\n\t\t} else {\r\n\t\t\tserialize = options.serialize = options.serialize || JSON.stringify\r\n\r\n\t\t\tdeserialize = options.deserialize =\r\n\t\t\t\toptions.deserialize || JSON.parse\r\n\t\t\textract = options.extract || function (xhr) {\r\n\t\t\t\tif (xhr.responseText.length || deserialize !== JSON.parse) {\r\n\t\t\t\t\treturn xhr.responseText\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions.method = (options.method || \"GET\").toUpperCase()\r\n\t\toptions.url = parameterizeUrl(options.url, options.data)\r\n\t\tbindData(options, options.data, serialize)\r\n\t\toptions.onload = options.onerror = function (ev) {\r\n\t\t\ttry {\r\n\t\t\t\tev = ev || event\r\n\t\t\t\tvar response = deserialize(extract(ev.target, options))\r\n\t\t\t\tif (ev.type === \"load\") {\r\n\t\t\t\t\tif (options.unwrapSuccess) {\r\n\t\t\t\t\t\tresponse = options.unwrapSuccess(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (isArray(response) && options.type) {\r\n\t\t\t\t\t\tforEach(response, function (res, i) {\r\n\t\t\t\t\t\t\tresponse[i] = new options.type(res)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else if (options.type) {\r\n\t\t\t\t\t\tresponse = new options.type(response)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.resolve(response)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.unwrapError) {\r\n\t\t\t\t\t\tresponse = options.unwrapError(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.reject(response)\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tdeferred.reject(e)\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t} finally {\r\n\t\t\t\tif (options.background !== true) m.endComputation()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tajax(options)\r\n\t\tdeferred.promise = propify(deferred.promise, options.initialValue)\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\treturn m\r\n}); // eslint-disable-line\r\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
1 |
+
{"version":3,"sources":["admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","m","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","window","mc4wp","deps","mithril","./admin/helpers.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter","2","toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","getAttribute","checked","value","conditionMet","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","parentElements","parentElement","3","Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","lists","push","trigger","toggleVisibleLists","rows","listId","isSelected","replace","querySelector","mc4wp_vars","mailchimp","on","4","Tabs","get","id","open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","className","blur","url","URL","setParameter","location","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","opened","preventDefault","returnValue","init","activeTab","substring","replaceState","state","$","jQuery","$context","find","each","first","text","click","body","./url.js","5","query","hasOwnProperty","b","decodeURIComponent","build","data","ret","d","encodeURIComponent","join","key","6","global","factory","amd","isFunction","object","isObject","type","isString","noop","initialize","mock","$document","$location","$cancelAnimationFrame","cancelAnimationFrame","$requestAnimationFrame","requestAnimationFrame","parseTagAttrs","cell","tag","classes","parser","exec","attrs","pair","getVirtualChildren","hasAttrs","children","slice","isArray","assignAttrs","target","classAttr","attrName","hasOwn","pairs","parameterize","list","forKeys","dataToString","toString","injectTextNode","index","insertNode","nodeValue","flatten","concat","node","insertBefore","childNodes","handleKeysDiffer","existing","cached","action","MOVE","from","nodes","createElement","INSERTION","actions","prop","changes","sort","sortChanges","newCached","change","DELETION","clear","splice","dummy","changeElement","maybeChanged","diffKeys","keysDiffer","cachedCell","diffArray","_","parentNode","indexOf","buildArrayKeys","guid","isDifferentEnough","dataAttrKeys","Object","keys","redraw","strategy","configContext","retain","maybeRecreateObject","onunload","controllers","controller","getObjectNamespace","namespace","xmlns","unloadCachedControllers","views","$old","pendingRequests","scheduleConfigsToBeCalled","configs","isNew","buildUpdatedNode","editable","hasKeys","setAttributes","contenteditable","intact","handleNonexistentNodes","$trusted","injectHTML","createTextNode","nodeName","voidElements","constructor","reattachNodes","parentTag","activeElement","innerHTML","nodeType","trim","handleTextNode","shouldReattach","valueOf","getSubArrayCount","item","buildArray","subArrayCount","shouldMaintainIdentities","cacheCount","len","makeCache","parentIndex","parentCache","offset","end","constructNode","is","createElementNS","constructAttrs","constructChildren","reconstructCached","getController","view","cachedControllers","controllerIndex","updateLists","unloaders","map","checkView","forcing","subtree","markViews","$original","buildObject","copyStyleAttrs","dataAttr","cachedAttr","rule","setSingleAttr","autoredraw","setAttributeNS","shouldUseSetAttribute","trySetAttr","cachedAttrs","message","dataAttrs","removeChild","unload","appendTextFragment","appendChild","createRange","createContextualFragment","insertAdjacentHTML","replaceScriptNodes","tagName","replaceChild","buildExecutableNode","scriptEl","attributes","name","nextSibling","isElement","placeholder","callback","startComputation","endFirstComputation","getCellCacheKey","nodeCache","gettersetter","store","toJSON","component","ctrl","currentArgs","output","checkPrevented","root","isPrevented","roots","currentComponent","topComponent","components","removeRootElement","reset","computePreRedrawHook","render","computePostRedrawHook","lastRedrawId","lastRedrawCallTime","Date","endComputation","normalizeRoute","route","modes","mode","routeByValue","router","path","routeParams","queryStart","parseQueryString","substr","mount","matcher","RegExp","test","values","routeUnobtrusive","ctrlKey","metaKey","shiftKey","which","currentTarget","srcElement","search","setScroll","hash","scrollTo","buildQueryString","prefix","duplicates","str","charAt","params","string","cacheKey","cellCache","propify","promise","initialValue","then","resolve","reject","bind","Deferred","onSuccess","onFailure","finish","REJECTED","next","deferred","RESOLVED","promiseValue","thennable","success","failure","notThennable","count","onerror","fire","REJECTING","RESOLVING","self","TypeError","identity","handleJsonp","options","callbackKey","callbackName","getTime","Math","round","random","script","resp","onload","responseText","status","stringify","error","src","createXhr","xhr","XMLHttpRequest","method","user","password","onreadystatechange","readyState","serialize","setRequestHeader","deserialize","maybeXhr","FormData","send","ajax","dataType","toLowerCase","bindData","querystring","parameterizeUrl","token","version","AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR","html","form","width","height","documentNode","documentElement","forceRecreation","isDocumentRoot","trust","String","Promise","FRAME_BUDGET","unloader","redrawing","force","withAttr","withAttrCallback","callbackThis","_this","currentRoute","pathname","redirect","isDefaultRoute","arg1","arg2","vdom","source","listener","base","removeEventListener","detachEvent","oldRoute","queryIndex","currentPath","replaceHistory","err","param","sync","synchronizer","pos","resolved","results","outstanding","arg","request","background","extract","isJSONP","jsonp","toUpperCase","ev","response","unwrapSuccess","res","unwrapError","7","indexOfListener","listeners","alias","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EA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AAKqgB,eAAeZ,EAAKnC,EAASA,UAGtCwB,EAAWxB,EAASA,SAASld,MAAMJ,KAAMC,OAErC6e,IAAa9e,KAAKkhB,uBAClBlhB,KAAKqgB,eAAeZ,EAAKnC,EAASA,SAMlD,OAAOtd,OAMXsf,EAAM/c,QAAU8c,EAAM,aAUtBC,EAAM6B,KAAO,SAAc1B,GACvB,GAAIxf,GAAOT,MAAMC,UAAUmJ,MAAMzL,KAAK+C,UAAW,EACjD,OAAOF,MAAKghB,UAAUvB,EAAKxf,IAW/Bqf,EAAM8B,mBAAqB,SAA4BzgB,GAEnD,MADAX,MAAKqhB,iBAAmB1gB,EACjBX,MAWXsf,EAAM4B,oBAAsB,WACxB,OAAIlhB,KAAKqG,eAAe,qBACbrG,KAAKqhB,kBAapB/B,EAAMI,WAAa,WACf,MAAO1f,MAAK8gB,UAAY9gB,KAAK8gB,aAQjCtjB,EAAa8jB,WAAa,WAEtB,MADApkB,GAAQM,aAAe+hB,EAChB/hB,GAIW,kBAAXpB,IAAyBA,EAAO8K,IACvC9K,EAAO,WACH,MAAOoB,KAGY,gBAAXF,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUM,EAGjBN,EAAQM,aAAeA,IAE7BL,KAAK6C,gBAEI","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\nvar m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require ('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n},{\"./admin/helpers.js\":2,\"./admin/settings.js\":3,\"./admin/tabs.js\":4,\"mithril\":6,\"wolfy87-eventemitter\":7}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function(selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor( var i=0; i<elements.length;i++){\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function(element,event,handler) {\n\tif ( element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function( elements, event, handler ) {\n\tArray.prototype.forEach.call( elements, function(element) {\n\t\thelpers.bindEventToElement(element,event,handler);\n\t});\n};\n\n\n// polling\nhelpers.debounce = function(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function() {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call( showIfElements, function(element) {\n\t\tvar config = JSON.parse( element.getAttribute('data-showif') );\n\t\tvar parentElements = document.querySelectorAll('[name=\"'+ config.element +'\"]');\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked radio inputs\n\t\t\tif( this.getAttribute('type') === \"radio\" && ! this.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar value = ( this.getAttribute(\"type\") === \"checkbox\" ) ? this.checked : this.value;\n\t\t\tvar conditionMet = ( value == config.value );\n\n\t\t\tif( hide ) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call( inputs, function(inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly','readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call( parentElements, function( parentElement ) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n},{}],3:[function(require,module,exports){\nvar Settings = function(context, helpers, events ) {\n\t'use strict';\n\n\t// vars\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey,searchValue) {\n\t\treturn selectedLists.filter(function(el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function(input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif( typeof( input.checked ) === \"boolean\" && ! input.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( typeof( lists[ input.value ] ) === \"object\" ){\n\t\t\t\tselectedLists.push( lists[ input.value ] );\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [ selectedLists ]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function(el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif( isSelected ) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden',''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\" );\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs,'change',updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t}\n\n};\n\nmodule.exports = Settings;\n},{}],4:[function(require,module,exports){\n// Tabs\nvar Tabs = function(context) {\n\t'use strict';\n\n\t// @todo last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar URL = require('./url.js');\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function(i,t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function() { return open(id); }\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor( var i=0; i<tabs.length; i++){\n\t\t\tif(tabs[i].id === id ) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction open( tab, updateState ) {\n\n\t\t// make sure we have a tab object\n\t\tif(typeof(tab) === \"string\"){\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif(!tab) { return false; }\n\n\t\t// should we update state?\n\t\tif( updateState == undefined ) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function(nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id );\n\n\t\t// update hash\n\t\tif( history.pushState && updateState ) {\n\t\t\thistory.pushState( tab.id, '', url );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif( typeof(tb_remove) === \"function\" ) {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple decouple decouple\n\t\tif( tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor ) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif( ! tabId ) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif( match ) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif( ! tabId ) {\n\t\t\tvar urlParams = URL.parse( this.href );\n\t\t\tif( ! urlParams.tab ) { return; }\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = open( tabId );\n\n\t\tif( opened ) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif(! history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif( ! activeTab ) { return; }\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif(!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif( history.replaceState && history.state === null) {\n\t\t\thistory.replaceState( tab.id, '' );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif(window.addEventListener && history.pushState ) {\n\t\twindow.addEventListener('popstate', function(e) {\n\t\t\tif(!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn open(tabId,false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: open,\n\t\tget: get\n\t}\n\n};\n\nmodule.exports = Tabs;\n},{\"./url.js\":5}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif(!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data)\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\treturn ret.join(\"&\");\n\t},\n\tsetParameter: function( url, key, value ) {\n\t\tvar data = URL.parse( url );\n\t\tdata[ key ] = value;\n\t\treturn URL.build( data );\n\t}\n};\n\nmodule.exports = URL;\n},{}],6:[function(require,module,exports){\n;(function (global, factory) { // eslint-disable-line\r\n\t\"use strict\"\r\n\t/* eslint-disable no-undef */\r\n\tvar m = factory(global)\r\n\tif (typeof module === \"object\" && module != null && module.exports) {\r\n\t\tmodule.exports = m\r\n\t} else if (typeof define === \"function\" && define.amd) {\r\n\t\tdefine(function () { return m })\r\n\t} else {\r\n\t\tglobal.m = m\r\n\t}\r\n\t/* eslint-enable no-undef */\r\n})(typeof window !== \"undefined\" ? window : this, function (global, undefined) { // eslint-disable-line\r\n\t\"use strict\"\r\n\r\n\tm.version = function () {\r\n\t\treturn \"v0.2.5\"\r\n\t}\r\n\r\n\tvar hasOwn = {}.hasOwnProperty\r\n\tvar type = {}.toString\r\n\r\n\tfunction isFunction(object) {\r\n\t\treturn typeof object === \"function\"\r\n\t}\r\n\r\n\tfunction isObject(object) {\r\n\t\treturn type.call(object) === \"[object Object]\"\r\n\t}\r\n\r\n\tfunction isString(object) {\r\n\t\treturn type.call(object) === \"[object String]\"\r\n\t}\r\n\r\n\tvar isArray = Array.isArray || function (object) {\r\n\t\treturn type.call(object) === \"[object Array]\"\r\n\t}\r\n\r\n\tfunction noop() {}\r\n\r\n\tvar voidElements = {\r\n\t\tAREA: 1,\r\n\t\tBASE: 1,\r\n\t\tBR: 1,\r\n\t\tCOL: 1,\r\n\t\tCOMMAND: 1,\r\n\t\tEMBED: 1,\r\n\t\tHR: 1,\r\n\t\tIMG: 1,\r\n\t\tINPUT: 1,\r\n\t\tKEYGEN: 1,\r\n\t\tLINK: 1,\r\n\t\tMETA: 1,\r\n\t\tPARAM: 1,\r\n\t\tSOURCE: 1,\r\n\t\tTRACK: 1,\r\n\t\tWBR: 1\r\n\t}\r\n\r\n\t// caching commonly used variables\r\n\tvar $document, $location, $requestAnimationFrame, $cancelAnimationFrame\r\n\r\n\t// self invoking function needed because of the way mocks work\r\n\tfunction initialize(mock) {\r\n\t\t$document = mock.document\r\n\t\t$location = mock.location\r\n\t\t$cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout\r\n\t\t$requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout\r\n\t}\r\n\r\n\t// testing API\r\n\tm.deps = function (mock) {\r\n\t\tinitialize(global = mock || window)\r\n\t\treturn global\r\n\t}\r\n\r\n\tm.deps(global)\r\n\r\n\t/**\r\n\t * @typedef {String} Tag\r\n\t * A string that looks like -> div.classname#id[param=one][param2=two]\r\n\t * Which describes a DOM node\r\n\t */\r\n\r\n\tfunction parseTagAttrs(cell, tag) {\r\n\t\tvar classes = []\r\n\t\tvar parser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[.+?\\])/g\r\n\t\tvar match\r\n\r\n\t\twhile ((match = parser.exec(tag))) {\r\n\t\t\tif (match[1] === \"\" && match[2]) {\r\n\t\t\t\tcell.tag = match[2]\r\n\t\t\t} else if (match[1] === \"#\") {\r\n\t\t\t\tcell.attrs.id = match[2]\r\n\t\t\t} else if (match[1] === \".\") {\r\n\t\t\t\tclasses.push(match[2])\r\n\t\t\t} else if (match[3][0] === \"[\") {\r\n\t\t\t\tvar pair = /\\[(.+?)(?:=(\"|'|)(.*?)\\2)?\\]/.exec(match[3])\r\n\t\t\t\tcell.attrs[pair[1]] = pair[3] || \"\"\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn classes\r\n\t}\r\n\r\n\tfunction getVirtualChildren(args, hasAttrs) {\r\n\t\tvar children = hasAttrs ? args.slice(1) : args\r\n\r\n\t\tif (children.length === 1 && isArray(children[0])) {\r\n\t\t\treturn children[0]\r\n\t\t} else {\r\n\t\t\treturn children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction assignAttrs(target, attrs, classes) {\r\n\t\tvar classAttr = \"class\" in attrs ? \"class\" : \"className\"\r\n\r\n\t\tfor (var attrName in attrs) {\r\n\t\t\tif (hasOwn.call(attrs, attrName)) {\r\n\t\t\t\tif (attrName === classAttr &&\r\n\t\t\t\t\t\tattrs[attrName] != null &&\r\n\t\t\t\t\t\tattrs[attrName] !== \"\") {\r\n\t\t\t\t\tclasses.push(attrs[attrName])\r\n\t\t\t\t\t// create key in correct iteration order\r\n\t\t\t\t\ttarget[attrName] = \"\"\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget[attrName] = attrs[attrName]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (classes.length) target[classAttr] = classes.join(\" \")\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param {Tag} The DOM node tag\r\n\t * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs\r\n\t * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,\r\n\t * or splat (optional)\r\n\t */\r\n\tfunction m(tag, pairs) {\r\n\t\tvar args = []\r\n\r\n\t\tfor (var i = 1, length = arguments.length; i < length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\tif (isObject(tag)) return parameterize(tag, args)\r\n\r\n\t\tif (!isString(tag)) {\r\n\t\t\tthrow new Error(\"selector in m(selector, attrs, children) should \" +\r\n\t\t\t\t\"be a string\")\r\n\t\t}\r\n\r\n\t\tvar hasAttrs = pairs != null && isObject(pairs) &&\r\n\t\t\t!(\"tag\" in pairs || \"view\" in pairs || \"subtree\" in pairs)\r\n\r\n\t\tvar attrs = hasAttrs ? pairs : {}\r\n\t\tvar cell = {\r\n\t\t\ttag: \"div\",\r\n\t\t\tattrs: {},\r\n\t\t\tchildren: getVirtualChildren(args, hasAttrs)\r\n\t\t}\r\n\r\n\t\tassignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))\r\n\t\treturn cell\r\n\t}\r\n\r\n\tfunction forEach(list, f) {\r\n\t\tfor (var i = 0; i < list.length && !f(list[i], i++);) {\r\n\t\t\t// function called in condition\r\n\t\t}\r\n\t}\r\n\r\n\tfunction forKeys(list, f) {\r\n\t\tforEach(list, function (attrs, i) {\r\n\t\t\treturn (attrs = attrs && attrs.attrs) &&\r\n\t\t\t\tattrs.key != null &&\r\n\t\t\t\tf(attrs, i)\r\n\t\t})\r\n\t}\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction dataToString(data) {\r\n\t\t// data.toString() might throw or return null if data is the return\r\n\t\t// value of Console.log in some versions of Firefox (behavior depends on\r\n\t\t// version)\r\n\t\ttry {\r\n\t\t\tif (data != null && data.toString() != null) return data\r\n\t\t} catch (e) {\r\n\t\t\t// silently ignore errors\r\n\t\t}\r\n\t\treturn \"\"\r\n\t}\r\n\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction injectTextNode(parentElement, first, index, data) {\r\n\t\ttry {\r\n\t\t\tinsertNode(parentElement, first, index)\r\n\t\t\tfirst.nodeValue = data\r\n\t\t} catch (e) {\r\n\t\t\t// IE erroneously throws error when appending an empty text node\r\n\t\t\t// after a null\r\n\t\t}\r\n\t}\r\n\r\n\tfunction flatten(list) {\r\n\t\t// recursively flatten array\r\n\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\tif (isArray(list[i])) {\r\n\t\t\t\tlist = list.concat.apply([], list)\r\n\t\t\t\t// check current index again and flatten until there are no more\r\n\t\t\t\t// nested arrays at that index\r\n\t\t\t\ti--\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list\r\n\t}\r\n\r\n\tfunction insertNode(parentElement, node, index) {\r\n\t\tparentElement.insertBefore(node,\r\n\t\t\tparentElement.childNodes[index] || null)\r\n\t}\r\n\r\n\tvar DELETION = 1\r\n\tvar INSERTION = 2\r\n\tvar MOVE = 3\r\n\r\n\tfunction handleKeysDiffer(data, existing, cached, parentElement) {\r\n\t\tforKeys(data, function (key, i) {\r\n\t\t\texisting[key = key.key] = existing[key] ? {\r\n\t\t\t\taction: MOVE,\r\n\t\t\t\tindex: i,\r\n\t\t\t\tfrom: existing[key].index,\r\n\t\t\t\telement: cached.nodes[existing[key].index] ||\r\n\t\t\t\t\t$document.createElement(\"div\")\r\n\t\t\t} : {action: INSERTION, index: i}\r\n\t\t})\r\n\r\n\t\tvar actions = []\r\n\t\tfor (var prop in existing) {\r\n\t\t\tif (hasOwn.call(existing, prop)) {\r\n\t\t\t\tactions.push(existing[prop])\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar changes = actions.sort(sortChanges)\r\n\t\tvar newCached = new Array(cached.length)\r\n\r\n\t\tnewCached.nodes = cached.nodes.slice()\r\n\r\n\t\tforEach(changes, function (change) {\r\n\t\t\tvar index = change.index\r\n\t\t\tif (change.action === DELETION) {\r\n\t\t\t\tclear(cached[index].nodes, cached[index])\r\n\t\t\t\tnewCached.splice(index, 1)\r\n\t\t\t}\r\n\t\t\tif (change.action === INSERTION) {\r\n\t\t\t\tvar dummy = $document.createElement(\"div\")\r\n\t\t\t\tdummy.key = data[index].attrs.key\r\n\t\t\t\tinsertNode(parentElement, dummy, index)\r\n\t\t\t\tnewCached.splice(index, 0, {\r\n\t\t\t\t\tattrs: {key: data[index].attrs.key},\r\n\t\t\t\t\tnodes: [dummy]\r\n\t\t\t\t})\r\n\t\t\t\tnewCached.nodes[index] = dummy\r\n\t\t\t}\r\n\r\n\t\t\tif (change.action === MOVE) {\r\n\t\t\t\tvar changeElement = change.element\r\n\t\t\t\tvar maybeChanged = parentElement.childNodes[index]\r\n\t\t\t\tif (maybeChanged !== changeElement && changeElement !== null) {\r\n\t\t\t\t\tparentElement.insertBefore(changeElement,\r\n\t\t\t\t\t\tmaybeChanged || null)\r\n\t\t\t\t}\r\n\t\t\t\tnewCached[index] = cached[change.from]\r\n\t\t\t\tnewCached.nodes[index] = changeElement\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn newCached\r\n\t}\r\n\r\n\tfunction diffKeys(data, cached, existing, parentElement) {\r\n\t\tvar keysDiffer = data.length !== cached.length\r\n\r\n\t\tif (!keysDiffer) {\r\n\t\t\tforKeys(data, function (attrs, i) {\r\n\t\t\t\tvar cachedCell = cached[i]\r\n\t\t\t\treturn keysDiffer = cachedCell &&\r\n\t\t\t\t\tcachedCell.attrs &&\r\n\t\t\t\t\tcachedCell.attrs.key !== attrs.key\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (keysDiffer) {\r\n\t\t\treturn handleKeysDiffer(data, existing, cached, parentElement)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction diffArray(data, cached, nodes) {\r\n\t\t// diff the array itself\r\n\r\n\t\t// update the list of DOM nodes by collecting the nodes from each item\r\n\t\tforEach(data, function (_, i) {\r\n\t\t\tif (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)\r\n\t\t})\r\n\t\t// remove items from the end of the array if the new array is shorter\r\n\t\t// than the old one. if errors ever happen here, the issue is most\r\n\t\t// likely a bug in the construction of the `cached` data structure\r\n\t\t// somewhere earlier in the program\r\n\t\tforEach(cached.nodes, function (node, i) {\r\n\t\t\tif (node.parentNode != null && nodes.indexOf(node) < 0) {\r\n\t\t\t\tclear([node], [cached[i]])\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tif (data.length < cached.length) cached.length = data.length\r\n\t\tcached.nodes = nodes\r\n\t}\r\n\r\n\tfunction buildArrayKeys(data) {\r\n\t\tvar guid = 0\r\n\t\tforKeys(data, function () {\r\n\t\t\tforEach(data, function (attrs) {\r\n\t\t\t\tif ((attrs = attrs && attrs.attrs) && attrs.key == null) {\r\n\t\t\t\t\tattrs.key = \"__mithril__\" + guid++\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn 1\r\n\t\t})\r\n\t}\r\n\r\n\tfunction isDifferentEnough(data, cached, dataAttrKeys) {\r\n\t\tif (data.tag !== cached.tag) return true\r\n\r\n\t\tif (dataAttrKeys.sort().join() !==\r\n\t\t\t\tObject.keys(cached.attrs).sort().join()) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.id !== cached.attrs.id) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.key !== cached.attrs.key) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"all\") {\r\n\t\t\treturn !cached.configContext || cached.configContext.retain !== true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\") {\r\n\t\t\treturn cached.configContext && cached.configContext.retain === false\r\n\t\t}\r\n\r\n\t\treturn false\r\n\t}\r\n\r\n\tfunction maybeRecreateObject(data, cached, dataAttrKeys) {\r\n\t\t// if an element is different enough from the one in cache, recreate it\r\n\t\tif (isDifferentEnough(data, cached, dataAttrKeys)) {\r\n\t\t\tif (cached.nodes.length) clear(cached.nodes)\r\n\r\n\t\t\tif (cached.configContext &&\r\n\t\t\t\t\tisFunction(cached.configContext.onunload)) {\r\n\t\t\t\tcached.configContext.onunload()\r\n\t\t\t}\r\n\r\n\t\t\tif (cached.controllers) {\r\n\t\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\t\tif (controller.onunload) {\r\n\t\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getObjectNamespace(data, namespace) {\r\n\t\tif (data.attrs.xmlns) return data.attrs.xmlns\r\n\t\tif (data.tag === \"svg\") return \"http://www.w3.org/2000/svg\"\r\n\t\tif (data.tag === \"math\") return \"http://www.w3.org/1998/Math/MathML\"\r\n\t\treturn namespace\r\n\t}\r\n\r\n\tvar pendingRequests = 0\r\n\tm.startComputation = function () { pendingRequests++ }\r\n\tm.endComputation = function () {\r\n\t\tif (pendingRequests > 1) {\r\n\t\t\tpendingRequests--\r\n\t\t} else {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tm.redraw()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unloadCachedControllers(cached, views, controllers) {\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t\tforEach(controllers, function (controller) {\r\n\t\t\t\tif (controller.onunload && controller.onunload.$old) {\r\n\t\t\t\t\tcontroller.onunload = controller.onunload.$old\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (pendingRequests && controller.onunload) {\r\n\t\t\t\t\tvar onunload = controller.onunload\r\n\t\t\t\t\tcontroller.onunload = noop\r\n\t\t\t\t\tcontroller.onunload.$old = onunload\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {\r\n\t\t// schedule configs to be called. They are called after `build` finishes\r\n\t\t// running\r\n\t\tif (isFunction(data.attrs.config)) {\r\n\t\t\tvar context = cached.configContext = cached.configContext || {}\r\n\r\n\t\t\t// bind\r\n\t\t\tconfigs.push(function () {\r\n\t\t\t\treturn data.attrs.config.call(data, node, !isNew, context,\r\n\t\t\t\t\tcached)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildUpdatedNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\teditable,\r\n\t\thasKeys,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tconfigs,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar node = cached.nodes[0]\r\n\r\n\t\tif (hasKeys) {\r\n\t\t\tsetAttributes(node, data.tag, data.attrs, cached.attrs, namespace)\r\n\t\t}\r\n\r\n\t\tcached.children = build(\r\n\t\t\tnode,\r\n\t\t\tdata.tag,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tdata.children,\r\n\t\t\tcached.children,\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\tnamespace,\r\n\t\t\tconfigs\r\n\t\t)\r\n\r\n\t\tcached.nodes.intact = true\r\n\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tfunction handleNonexistentNodes(data, parentElement, index) {\r\n\t\tvar nodes\r\n\t\tif (data.$trusted) {\r\n\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t} else {\r\n\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\tif (!(parentElement.nodeName in voidElements)) {\r\n\t\t\t\tinsertNode(parentElement, nodes[0], index)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cached\r\n\r\n\t\tif (typeof data === \"string\" ||\r\n\t\t\t\ttypeof data === \"number\" ||\r\n\t\t\t\ttypeof data === \"boolean\") {\r\n\t\t\tcached = new data.constructor(data)\r\n\t\t} else {\r\n\t\t\tcached = data\r\n\t\t}\r\n\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction reattachNodes(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\teditable,\r\n\t\tindex,\r\n\t\tparentTag\r\n\t) {\r\n\t\tvar nodes = cached.nodes\r\n\t\tif (!editable || editable !== $document.activeElement) {\r\n\t\t\tif (data.$trusted) {\r\n\t\t\t\tclear(nodes, cached)\r\n\t\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t\t} else if (parentTag === \"textarea\") {\r\n\t\t\t\t// <textarea> uses `value` instead of `nodeValue`.\r\n\t\t\t\tparentElement.value = data\r\n\t\t\t} else if (editable) {\r\n\t\t\t\t// contenteditable nodes use `innerHTML` instead of `nodeValue`.\r\n\t\t\t\teditable.innerHTML = data\r\n\t\t\t} else {\r\n\t\t\t\t// was a trusted string\r\n\t\t\t\tif (nodes[0].nodeType === 1 || nodes.length > 1 ||\r\n\t\t\t\t\t\t(nodes[0].nodeValue.trim &&\r\n\t\t\t\t\t\t\t!nodes[0].nodeValue.trim())) {\r\n\t\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinjectTextNode(parentElement, nodes[0], index, data)\r\n\t\t\t}\r\n\t\t}\r\n\t\tcached = new data.constructor(data)\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction handleTextNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\tindex,\r\n\t\tparentElement,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tparentTag\r\n\t) {\r\n\t\tif (!cached.nodes.length) {\r\n\t\t\treturn handleNonexistentNodes(data, parentElement, index)\r\n\t\t} else if (cached.valueOf() !== data.valueOf() || shouldReattach) {\r\n\t\t\treturn reattachNodes(data, cached, parentElement, editable, index,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn (cached.nodes.intact = true, cached)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getSubArrayCount(item) {\r\n\t\tif (item.$trusted) {\r\n\t\t\t// fix offset of next element if item was a trusted string w/ more\r\n\t\t\t// than one html element\r\n\t\t\t// the first clause in the regexp matches elements\r\n\t\t\t// the second clause (after the pipe) matches text nodes\r\n\t\t\tvar match = item.match(/<[^\\/]|\\>\\s*[^<]/g)\r\n\t\t\tif (match != null) return match.length\r\n\t\t} else if (isArray(item)) {\r\n\t\t\treturn item.length\r\n\t\t}\r\n\t\treturn 1\r\n\t}\r\n\r\n\tfunction buildArray(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tparentTag,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tdata = flatten(data)\r\n\t\tvar nodes = []\r\n\t\tvar intact = cached.length === data.length\r\n\t\tvar subArrayCount = 0\r\n\r\n\t\t// keys algorithm: sort elements without recreating them if keys are\r\n\t\t// present\r\n\t\t//\r\n\t\t// 1) create a map of all existing keys, and mark all for deletion\r\n\t\t// 2) add new keys to map and mark them for addition\r\n\t\t// 3) if key exists in new list, change action from deletion to a move\r\n\t\t// 4) for each key, handle its corresponding action as marked in\r\n\t\t// previous steps\r\n\r\n\t\tvar existing = {}\r\n\t\tvar shouldMaintainIdentities = false\r\n\r\n\t\tforKeys(cached, function (attrs, i) {\r\n\t\t\tshouldMaintainIdentities = true\r\n\t\t\texisting[cached[i].attrs.key] = {action: DELETION, index: i}\r\n\t\t})\r\n\r\n\t\tbuildArrayKeys(data)\r\n\t\tif (shouldMaintainIdentities) {\r\n\t\t\tcached = diffKeys(data, cached, existing, parentElement)\r\n\t\t}\r\n\t\t// end key algorithm\r\n\r\n\t\tvar cacheCount = 0\r\n\t\t// faster explicitly written\r\n\t\tfor (var i = 0, len = data.length; i < len; i++) {\r\n\t\t\t// diff each item in the array\r\n\t\t\tvar item = build(\r\n\t\t\t\tparentElement,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tcached,\r\n\t\t\t\tindex,\r\n\t\t\t\tdata[i],\r\n\t\t\t\tcached[cacheCount],\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tindex + subArrayCount || subArrayCount,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\r\n\t\t\tif (item !== undefined) {\r\n\t\t\t\tintact = intact && item.nodes.intact\r\n\t\t\t\tsubArrayCount += getSubArrayCount(item)\r\n\t\t\t\tcached[cacheCount++] = item\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intact) diffArray(data, cached, nodes)\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction makeCache(data, cached, index, parentIndex, parentCache) {\r\n\t\tif (cached != null) {\r\n\t\t\tif (type.call(cached) === type.call(data)) return cached\r\n\r\n\t\t\tif (parentCache && parentCache.nodes) {\r\n\t\t\t\tvar offset = index - parentIndex\r\n\t\t\t\tvar end = offset + (isArray(data) ? data : cached.nodes).length\r\n\t\t\t\tclear(\r\n\t\t\t\t\tparentCache.nodes.slice(offset, end),\r\n\t\t\t\t\tparentCache.slice(offset, end))\r\n\t\t\t} else if (cached.nodes) {\r\n\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcached = new data.constructor()\r\n\t\t// if constructor creates a virtual dom element, use a blank object as\r\n\t\t// the base cached node instead of copying the virtual el (#277)\r\n\t\tif (cached.tag) cached = {}\r\n\t\tcached.nodes = []\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction constructNode(data, namespace) {\r\n\t\tif (data.attrs.is) {\r\n\t\t\tif (namespace == null) {\r\n\t\t\t\treturn $document.createElement(data.tag, data.attrs.is)\r\n\t\t\t} else {\r\n\t\t\t\treturn $document.createElementNS(namespace, data.tag,\r\n\t\t\t\t\tdata.attrs.is)\r\n\t\t\t}\r\n\t\t} else if (namespace == null) {\r\n\t\t\treturn $document.createElement(data.tag)\r\n\t\t} else {\r\n\t\t\treturn $document.createElementNS(namespace, data.tag)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructAttrs(data, node, namespace, hasKeys) {\r\n\t\tif (hasKeys) {\r\n\t\t\treturn setAttributes(node, data.tag, data.attrs, {}, namespace)\r\n\t\t} else {\r\n\t\t\treturn data.attrs\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructChildren(\r\n\t\tdata,\r\n\t\tnode,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tif (data.children != null && data.children.length > 0) {\r\n\t\t\treturn build(\r\n\t\t\t\tnode,\r\n\t\t\t\tdata.tag,\r\n\t\t\t\tundefined,\r\n\t\t\t\tundefined,\r\n\t\t\t\tdata.children,\r\n\t\t\t\tcached.children,\r\n\t\t\t\ttrue,\r\n\t\t\t\t0,\r\n\t\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else {\r\n\t\t\treturn data.children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction reconstructCached(\r\n\t\tdata,\r\n\t\tattrs,\r\n\t\tchildren,\r\n\t\tnode,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar cached = {\r\n\t\t\ttag: data.tag,\r\n\t\t\tattrs: attrs,\r\n\t\t\tchildren: children,\r\n\t\t\tnodes: [node]\r\n\t\t}\r\n\r\n\t\tunloadCachedControllers(cached, views, controllers)\r\n\r\n\t\tif (cached.children && !cached.children.nodes) {\r\n\t\t\tcached.children.nodes = []\r\n\t\t}\r\n\r\n\t\t// edge case: setting value on <select> doesn't work before children\r\n\t\t// exist, so set it again after children have been created\r\n\t\tif (data.tag === \"select\" && \"value\" in data.attrs) {\r\n\t\t\tsetAttributes(node, data.tag, {value: data.attrs.value}, {},\r\n\t\t\t\tnamespace)\r\n\t\t}\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction getController(views, view, cachedControllers, controller) {\r\n\t\tvar controllerIndex\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\" && views) {\r\n\t\t\tcontrollerIndex = views.indexOf(view)\r\n\t\t} else {\r\n\t\t\tcontrollerIndex = -1\r\n\t\t}\r\n\r\n\t\tif (controllerIndex > -1) {\r\n\t\t\treturn cachedControllers[controllerIndex]\r\n\t\t} else if (isFunction(controller)) {\r\n\t\t\treturn new controller()\r\n\t\t} else {\r\n\t\t\treturn {}\r\n\t\t}\r\n\t}\r\n\r\n\tvar unloaders = []\r\n\r\n\tfunction updateLists(views, controllers, view, controller) {\r\n\t\tif (controller.onunload != null &&\r\n\t\t\t\tunloaders.map(function (u) { return u.handler })\r\n\t\t\t\t\t.indexOf(controller.onunload) < 0) {\r\n\t\t\tunloaders.push({\r\n\t\t\t\tcontroller: controller,\r\n\t\t\t\thandler: controller.onunload\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tviews.push(view)\r\n\t\tcontrollers.push(controller)\r\n\t}\r\n\r\n\tvar forcing = false\r\n\tfunction checkView(\r\n\t\tdata,\r\n\t\tview,\r\n\t\tcached,\r\n\t\tcachedControllers,\r\n\t\tcontrollers,\r\n\t\tviews\r\n\t) {\r\n\t\tvar controller = getController(\r\n\t\t\tcached.views,\r\n\t\t\tview,\r\n\t\t\tcachedControllers,\r\n\t\t\tdata.controller)\r\n\r\n\t\tvar key = data && data.attrs && data.attrs.key\r\n\r\n\t\tif (pendingRequests === 0 ||\r\n\t\t\t\tforcing ||\r\n\t\t\t\tcachedControllers &&\r\n\t\t\t\t\tcachedControllers.indexOf(controller) > -1) {\r\n\t\t\tdata = data.view(controller)\r\n\t\t} else {\r\n\t\t\tdata = {tag: \"placeholder\"}\r\n\t\t}\r\n\r\n\t\tif (data.subtree === \"retain\") return data\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tdata.attrs.key = key\r\n\t\tupdateLists(views, controllers, view, controller)\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction markViews(data, cached, views, controllers) {\r\n\t\tvar cachedControllers = cached && cached.controllers\r\n\r\n\t\twhile (data.view != null) {\r\n\t\t\tdata = checkView(\r\n\t\t\t\tdata,\r\n\t\t\t\tdata.view.$original || data.view,\r\n\t\t\t\tcached,\r\n\t\t\t\tcachedControllers,\r\n\t\t\t\tcontrollers,\r\n\t\t\t\tviews)\r\n\t\t}\r\n\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction buildObject( // eslint-disable-line max-statements\r\n\t\tdata,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tshouldReattach,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tvar views = []\r\n\t\tvar controllers = []\r\n\r\n\t\tdata = markViews(data, cached, views, controllers)\r\n\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\r\n\t\tif (!data.tag && controllers.length) {\r\n\t\t\tthrow new Error(\"Component template must return a virtual \" +\r\n\t\t\t\t\"element, not an array, string, etc.\")\r\n\t\t}\r\n\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tcached.attrs = cached.attrs || {}\r\n\r\n\t\tvar dataAttrKeys = Object.keys(data.attrs)\r\n\t\tvar hasKeys = dataAttrKeys.length > (\"key\" in data.attrs ? 1 : 0)\r\n\r\n\t\tmaybeRecreateObject(data, cached, dataAttrKeys)\r\n\r\n\t\tif (!isString(data.tag)) return\r\n\r\n\t\tvar isNew = cached.nodes.length === 0\r\n\r\n\t\tnamespace = getObjectNamespace(data, namespace)\r\n\r\n\t\tvar node\r\n\t\tif (isNew) {\r\n\t\t\tnode = constructNode(data, namespace)\r\n\t\t\t// set attributes first, then create children\r\n\t\t\tvar attrs = constructAttrs(data, node, namespace, hasKeys)\r\n\r\n\t\t\t// add the node to its parent before attaching children to it\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\r\n\t\t\tvar children = constructChildren(data, node, cached, editable,\r\n\t\t\t\tnamespace, configs)\r\n\r\n\t\t\tcached = reconstructCached(\r\n\t\t\t\tdata,\r\n\t\t\t\tattrs,\r\n\t\t\t\tchildren,\r\n\t\t\t\tnode,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tcontrollers)\r\n\t\t} else {\r\n\t\t\tnode = buildUpdatedNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\teditable,\r\n\t\t\t\thasKeys,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tconfigs,\r\n\t\t\t\tcontrollers)\r\n\t\t}\r\n\r\n\t\tif (!isNew && shouldReattach === true && node != null) {\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\t\t}\r\n\r\n\t\t// The configs are called after `build` finishes running\r\n\t\tscheduleConfigsToBeCalled(configs, data, node, isNew, cached)\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction build(\r\n\t\tparentElement,\r\n\t\tparentTag,\r\n\t\tparentCache,\r\n\t\tparentIndex,\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tshouldReattach,\r\n\t\tindex,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\t/*\r\n\t\t * `build` is a recursive function that manages creation/diffing/removal\r\n\t\t * of DOM elements based on comparison between `data` and `cached` the\r\n\t\t * diff algorithm can be summarized as this:\r\n\t\t *\r\n\t\t * 1 - compare `data` and `cached`\r\n\t\t * 2 - if they are different, copy `data` to `cached` and update the DOM\r\n\t\t * based on what the difference is\r\n\t\t * 3 - recursively apply this algorithm for every array and for the\r\n\t\t * children of every virtual element\r\n\t\t *\r\n\t\t * The `cached` data structure is essentially the same as the previous\r\n\t\t * redraw's `data` data structure, with a few additions:\r\n\t\t * - `cached` always has a property called `nodes`, which is a list of\r\n\t\t * DOM elements that correspond to the data represented by the\r\n\t\t * respective virtual element\r\n\t\t * - in order to support attaching `nodes` as a property of `cached`,\r\n\t\t * `cached` is *always* a non-primitive object, i.e. if the data was\r\n\t\t * a string, then cached is a String instance. If data was `null` or\r\n\t\t * `undefined`, cached is `new String(\"\")`\r\n\t\t * - `cached also has a `configContext` property, which is the state\r\n\t\t * storage object exposed by config(element, isInitialized, context)\r\n\t\t * - when `cached` is an Object, it represents a virtual element; when\r\n\t\t * it's an Array, it represents a list of elements; when it's a\r\n\t\t * String, Number or Boolean, it represents a text node\r\n\t\t *\r\n\t\t * `parentElement` is a DOM element used for W3C DOM API calls\r\n\t\t * `parentTag` is only used for handling a corner case for textarea\r\n\t\t * values\r\n\t\t * `parentCache` is used to remove nodes in some multi-node cases\r\n\t\t * `parentIndex` and `index` are used to figure out the offset of nodes.\r\n\t\t * They're artifacts from before arrays started being flattened and are\r\n\t\t * likely refactorable\r\n\t\t * `data` and `cached` are, respectively, the new and old nodes being\r\n\t\t * diffed\r\n\t\t * `shouldReattach` is a flag indicating whether a parent node was\r\n\t\t * recreated (if so, and if this node is reused, then this node must\r\n\t\t * reattach itself to the new parent)\r\n\t\t * `editable` is a flag that indicates whether an ancestor is\r\n\t\t * contenteditable\r\n\t\t * `namespace` indicates the closest HTML namespace as it cascades down\r\n\t\t * from an ancestor\r\n\t\t * `configs` is a list of config functions to run after the topmost\r\n\t\t * `build` call finishes running\r\n\t\t *\r\n\t\t * there's logic that relies on the assumption that null and undefined\r\n\t\t * data are equivalent to empty strings\r\n\t\t * - this prevents lifecycle surprises from procedural helpers that mix\r\n\t\t * implicit and explicit return statements (e.g.\r\n\t\t * function foo() {if (cond) return m(\"div\")}\r\n\t\t * - it simplifies diffing code\r\n\t\t */\r\n\t\tdata = dataToString(data)\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\t\tcached = makeCache(data, cached, index, parentIndex, parentCache)\r\n\r\n\t\tif (isArray(data)) {\r\n\t\t\treturn buildArray(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (data != null && isObject(data)) {\r\n\t\t\treturn buildObject(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (!isFunction(data)) {\r\n\t\t\treturn handleTextNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sortChanges(a, b) {\r\n\t\treturn a.action - b.action || a.index - b.index\r\n\t}\r\n\r\n\tfunction copyStyleAttrs(node, dataAttr, cachedAttr) {\r\n\t\tfor (var rule in dataAttr) {\r\n\t\t\tif (hasOwn.call(dataAttr, rule)) {\r\n\t\t\t\tif (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {\r\n\t\t\t\t\tnode.style[rule] = dataAttr[rule]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (rule in cachedAttr) {\r\n\t\t\tif (hasOwn.call(cachedAttr, rule)) {\r\n\t\t\t\tif (!hasOwn.call(dataAttr, rule)) node.style[rule] = \"\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar shouldUseSetAttribute = {\r\n\t\tlist: 1,\r\n\t\tstyle: 1,\r\n\t\tform: 1,\r\n\t\ttype: 1,\r\n\t\twidth: 1,\r\n\t\theight: 1\r\n\t}\r\n\r\n\tfunction setSingleAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (attrName === \"config\" || attrName === \"key\") {\r\n\t\t\t// `config` isn't a real attribute, so ignore it\r\n\t\t\treturn true\r\n\t\t} else if (isFunction(dataAttr) && attrName.slice(0, 2) === \"on\") {\r\n\t\t\t// hook event handlers to the auto-redrawing system\r\n\t\t\tnode[attrName] = autoredraw(dataAttr, node)\r\n\t\t} else if (attrName === \"style\" && dataAttr != null &&\r\n\t\t\t\tisObject(dataAttr)) {\r\n\t\t\t// handle `style: {...}`\r\n\t\t\tcopyStyleAttrs(node, dataAttr, cachedAttr)\r\n\t\t} else if (namespace != null) {\r\n\t\t\t// handle SVG\r\n\t\t\tif (attrName === \"href\") {\r\n\t\t\t\tnode.setAttributeNS(\"http://www.w3.org/1999/xlink\",\r\n\t\t\t\t\t\"href\", dataAttr)\r\n\t\t\t} else {\r\n\t\t\t\tnode.setAttribute(\r\n\t\t\t\t\tattrName === \"className\" ? \"class\" : attrName,\r\n\t\t\t\t\tdataAttr)\r\n\t\t\t}\r\n\t\t} else if (attrName in node && !shouldUseSetAttribute[attrName]) {\r\n\t\t\t// handle cases that are properties (but ignore cases where we\r\n\t\t\t// should use setAttribute instead)\r\n\t\t\t//\r\n\t\t\t// - list and form are typically used as strings, but are DOM\r\n\t\t\t// element references in js\r\n\t\t\t//\r\n\t\t\t// - when using CSS selectors (e.g. `m(\"[style='']\")`), style is\r\n\t\t\t// used as a string, but it's an object in js\r\n\t\t\t//\r\n\t\t\t// #348 don't set the value if not needed - otherwise, cursor\r\n\t\t\t// placement breaks in Chrome\r\n\t\t\ttry {\r\n\t\t\t\tif (tag !== \"input\" || node[attrName] !== dataAttr) {\r\n\t\t\t\t\tnode[attrName] = dataAttr\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tnode.setAttribute(attrName, dataAttr)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse node.setAttribute(attrName, dataAttr)\r\n\t}\r\n\r\n\tfunction trySetAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\tcachedAttrs,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) {\r\n\t\t\tcachedAttrs[attrName] = dataAttr\r\n\t\t\ttry {\r\n\t\t\t\treturn setSingleAttr(\r\n\t\t\t\t\tnode,\r\n\t\t\t\t\tattrName,\r\n\t\t\t\t\tdataAttr,\r\n\t\t\t\t\tcachedAttr,\r\n\t\t\t\t\ttag,\r\n\t\t\t\t\tnamespace)\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// swallow IE's invalid argument errors to mimic HTML's\r\n\t\t\t\t// fallback-to-doing-nothing-on-invalid-attributes behavior\r\n\t\t\t\tif (e.message.indexOf(\"Invalid argument\") < 0) throw e\r\n\t\t\t}\r\n\t\t} else if (attrName === \"value\" && tag === \"input\" &&\r\n\t\t\t\tnode.value !== dataAttr) {\r\n\t\t\t// #348 dataAttr may not be a string, so use loose comparison\r\n\t\t\tnode.value = dataAttr\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {\r\n\t\tfor (var attrName in dataAttrs) {\r\n\t\t\tif (hasOwn.call(dataAttrs, attrName)) {\r\n\t\t\t\tif (trySetAttr(\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\tattrName,\r\n\t\t\t\t\t\tdataAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs,\r\n\t\t\t\t\t\ttag,\r\n\t\t\t\t\t\tnamespace)) {\r\n\t\t\t\t\tcontinue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cachedAttrs\r\n\t}\r\n\r\n\tfunction clear(nodes, cached) {\r\n\t\tfor (var i = nodes.length - 1; i > -1; i--) {\r\n\t\t\tif (nodes[i] && nodes[i].parentNode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnodes[i].parentNode.removeChild(nodes[i])\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\t\t// ignore if this fails due to order of events (see\r\n\t\t\t\t\t// http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)\r\n\t\t\t\t\t/* eslint-enable max-len */\r\n\t\t\t\t}\r\n\t\t\t\tcached = [].concat(cached)\r\n\t\t\t\tif (cached[i]) unload(cached[i])\r\n\t\t\t}\r\n\t\t}\r\n\t\t// release memory if nodes is an array. This check should fail if nodes\r\n\t\t// is a NodeList (see loop above)\r\n\t\tif (nodes.length) {\r\n\t\t\tnodes.length = 0\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unload(cached) {\r\n\t\tif (cached.configContext && isFunction(cached.configContext.onunload)) {\r\n\t\t\tcached.configContext.onunload()\r\n\t\t\tcached.configContext.onunload = null\r\n\t\t}\r\n\t\tif (cached.controllers) {\r\n\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\tif (isFunction(controller.onunload)) {\r\n\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\tif (cached.children) {\r\n\t\t\tif (isArray(cached.children)) forEach(cached.children, unload)\r\n\t\t\telse if (cached.children.tag) unload(cached.children)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction appendTextFragment(parentElement, data) {\r\n\t\ttry {\r\n\t\t\tparentElement.appendChild(\r\n\t\t\t\t$document.createRange().createContextualFragment(data))\r\n\t\t} catch (e) {\r\n\t\t\tparentElement.insertAdjacentHTML(\"beforeend\", data)\r\n\t\t\treplaceScriptNodes(parentElement)\r\n\t\t}\r\n\t}\r\n\r\n\t// Replace script tags inside given DOM element with executable ones.\r\n\t// Will also check children recursively and replace any found script\r\n\t// tags in same manner.\r\n\tfunction replaceScriptNodes(node) {\r\n\t\tif (node.tagName === \"SCRIPT\") {\r\n\t\t\tnode.parentNode.replaceChild(buildExecutableNode(node), node)\r\n\t\t} else {\r\n\t\t\tvar children = node.childNodes\r\n\t\t\tif (children && children.length) {\r\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\treplaceScriptNodes(children[i])\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\t// Replace script element with one whose contents are executable.\r\n\tfunction buildExecutableNode(node){\r\n\t\tvar scriptEl = document.createElement(\"script\")\r\n\t\tvar attrs = node.attributes\r\n\r\n\t\tfor (var i = 0; i < attrs.length; i++) {\r\n\t\t\tscriptEl.setAttribute(attrs[i].name, attrs[i].value)\r\n\t\t}\r\n\r\n\t\tscriptEl.text = node.innerHTML\r\n\t\treturn scriptEl\r\n\t}\r\n\r\n\tfunction injectHTML(parentElement, index, data) {\r\n\t\tvar nextSibling = parentElement.childNodes[index]\r\n\t\tif (nextSibling) {\r\n\t\t\tvar isElement = nextSibling.nodeType !== 1\r\n\t\t\tvar placeholder = $document.createElement(\"span\")\r\n\t\t\tif (isElement) {\r\n\t\t\t\tparentElement.insertBefore(placeholder, nextSibling || null)\r\n\t\t\t\tplaceholder.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t\tparentElement.removeChild(placeholder)\r\n\t\t\t} else {\r\n\t\t\t\tnextSibling.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tappendTextFragment(parentElement, data)\r\n\t\t}\r\n\r\n\t\tvar nodes = []\r\n\r\n\t\twhile (parentElement.childNodes[index] !== nextSibling) {\r\n\t\t\tnodes.push(parentElement.childNodes[index])\r\n\t\t\tindex++\r\n\t\t}\r\n\r\n\t\treturn nodes\r\n\t}\r\n\r\n\tfunction autoredraw(callback, object) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || event\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t\tm.startComputation()\r\n\t\t\ttry {\r\n\t\t\t\treturn callback.call(object, e)\r\n\t\t\t} finally {\r\n\t\t\t\tendFirstComputation()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar html\r\n\tvar documentNode = {\r\n\t\tappendChild: function (node) {\r\n\t\t\tif (html === undefined) html = $document.createElement(\"html\")\r\n\t\t\tif ($document.documentElement &&\r\n\t\t\t\t\t$document.documentElement !== node) {\r\n\t\t\t\t$document.replaceChild(node, $document.documentElement)\r\n\t\t\t} else {\r\n\t\t\t\t$document.appendChild(node)\r\n\t\t\t}\r\n\r\n\t\t\tthis.childNodes = $document.childNodes\r\n\t\t},\r\n\r\n\t\tinsertBefore: function (node) {\r\n\t\t\tthis.appendChild(node)\r\n\t\t},\r\n\r\n\t\tchildNodes: []\r\n\t}\r\n\r\n\tvar nodeCache = []\r\n\tvar cellCache = {}\r\n\r\n\tm.render = function (root, cell, forceRecreation) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Ensure the DOM element being passed to \" +\r\n\t\t\t\t\"m.route/m.mount/m.render is not undefined.\")\r\n\t\t}\r\n\t\tvar configs = []\r\n\t\tvar id = getCellCacheKey(root)\r\n\t\tvar isDocumentRoot = root === $document\r\n\t\tvar node\r\n\r\n\t\tif (isDocumentRoot || root === $document.documentElement) {\r\n\t\t\tnode = documentNode\r\n\t\t} else {\r\n\t\t\tnode = root\r\n\t\t}\r\n\r\n\t\tif (isDocumentRoot && cell.tag !== \"html\") {\r\n\t\t\tcell = {tag: \"html\", attrs: {}, children: cell}\r\n\t\t}\r\n\r\n\t\tif (cellCache[id] === undefined) clear(node.childNodes)\r\n\t\tif (forceRecreation === true) reset(root)\r\n\r\n\t\tcellCache[id] = build(\r\n\t\t\tnode,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tcell,\r\n\t\t\tcellCache[id],\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tconfigs)\r\n\r\n\t\tforEach(configs, function (config) { config() })\r\n\t}\r\n\r\n\tfunction getCellCacheKey(element) {\r\n\t\tvar index = nodeCache.indexOf(element)\r\n\t\treturn index < 0 ? nodeCache.push(element) - 1 : index\r\n\t}\r\n\r\n\tm.trust = function (value) {\r\n\t\tvalue = new String(value) // eslint-disable-line no-new-wrappers\r\n\t\tvalue.$trusted = true\r\n\t\treturn value\r\n\t}\r\n\r\n\tfunction gettersetter(store) {\r\n\t\tfunction prop() {\r\n\t\t\tif (arguments.length) store = arguments[0]\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\tprop.toJSON = function () {\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\treturn prop\r\n\t}\r\n\r\n\tm.prop = function (store) {\r\n\t\tif ((store != null && (isObject(store) || isFunction(store)) || ((typeof Promise !== \"undefined\") && (store instanceof Promise))) &&\r\n\t\t\t\tisFunction(store.then)) {\r\n\t\t\treturn propify(store)\r\n\t\t}\r\n\r\n\t\treturn gettersetter(store)\r\n\t}\r\n\r\n\tvar roots = []\r\n\tvar components = []\r\n\tvar controllers = []\r\n\tvar lastRedrawId = null\r\n\tvar lastRedrawCallTime = 0\r\n\tvar computePreRedrawHook = null\r\n\tvar computePostRedrawHook = null\r\n\tvar topComponent\r\n\tvar FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms\r\n\r\n\tfunction parameterize(component, args) {\r\n\t\tfunction controller() {\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\treturn (component.controller || noop).apply(this, args) || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t}\r\n\r\n\t\tif (component.controller) {\r\n\t\t\tcontroller.prototype = component.controller.prototype\r\n\t\t}\r\n\r\n\t\tfunction view(ctrl) {\r\n\t\t\tvar currentArgs = [ctrl].concat(args)\r\n\t\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\t\tcurrentArgs.push(arguments[i])\r\n\t\t\t}\r\n\r\n\t\t\treturn component.view.apply(component, currentArgs)\r\n\t\t}\r\n\r\n\t\tview.$original = component.view\r\n\t\tvar output = {controller: controller, view: view}\r\n\t\tif (args[0] && args[0].key != null) output.attrs = {key: args[0].key}\r\n\t\treturn output\r\n\t}\r\n\r\n\tm.component = function (component) {\r\n\t\tvar args = new Array(arguments.length - 1)\r\n\r\n\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\treturn parameterize(component, args)\r\n\t}\r\n\r\n\tfunction checkPrevented(component, root, index, isPrevented) {\r\n\t\tif (!isPrevented) {\r\n\t\t\tm.redraw.strategy(\"all\")\r\n\t\t\tm.startComputation()\r\n\t\t\troots[index] = root\r\n\t\t\tvar currentComponent\r\n\r\n\t\t\tif (component) {\r\n\t\t\t\tcurrentComponent = topComponent = component\r\n\t\t\t} else {\r\n\t\t\t\tcurrentComponent = topComponent = component = {controller: noop}\r\n\t\t\t}\r\n\r\n\t\t\tvar controller = new (component.controller || noop)()\r\n\r\n\t\t\t// controllers may call m.mount recursively (via m.route redirects,\r\n\t\t\t// for example)\r\n\t\t\t// this conditional ensures only the last recursive m.mount call is\r\n\t\t\t// applied\r\n\t\t\tif (currentComponent === topComponent) {\r\n\t\t\t\tcontrollers[index] = controller\r\n\t\t\t\tcomponents[index] = component\r\n\t\t\t}\r\n\t\t\tendFirstComputation()\r\n\t\t\tif (component === null) {\r\n\t\t\t\tremoveRootElement(root, index)\r\n\t\t\t}\r\n\t\t\treturn controllers[index]\r\n\t\t} else if (component == null) {\r\n\t\t\tremoveRootElement(root, index)\r\n\t\t}\r\n\t}\r\n\r\n\tm.mount = m.module = function (root, component) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Please ensure the DOM element exists before \" +\r\n\t\t\t\t\"rendering a template into it.\")\r\n\t\t}\r\n\r\n\t\tvar index = roots.indexOf(root)\r\n\t\tif (index < 0) index = roots.length\r\n\r\n\t\tvar isPrevented = false\r\n\t\tvar event = {\r\n\t\t\tpreventDefault: function () {\r\n\t\t\t\tisPrevented = true\r\n\t\t\t\tcomputePreRedrawHook = computePostRedrawHook = null\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforEach(unloaders, function (unloader) {\r\n\t\t\tunloader.handler.call(unloader.controller, event)\r\n\t\t\tunloader.controller.onunload = null\r\n\t\t})\r\n\r\n\t\tif (isPrevented) {\r\n\t\t\tforEach(unloaders, function (unloader) {\r\n\t\t\t\tunloader.controller.onunload = unloader.handler\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tunloaders = []\r\n\t\t}\r\n\r\n\t\tif (controllers[index] && isFunction(controllers[index].onunload)) {\r\n\t\t\tcontrollers[index].onunload(event)\r\n\t\t}\r\n\r\n\t\treturn checkPrevented(component, root, index, isPrevented)\r\n\t}\r\n\r\n\tfunction removeRootElement(root, index) {\r\n\t\troots.splice(index, 1)\r\n\t\tcontrollers.splice(index, 1)\r\n\t\tcomponents.splice(index, 1)\r\n\t\treset(root)\r\n\t\tnodeCache.splice(getCellCacheKey(root), 1)\r\n\t}\r\n\r\n\tvar redrawing = false\r\n\tm.redraw = function (force) {\r\n\t\tif (redrawing) return\r\n\t\tredrawing = true\r\n\t\tif (force) forcing = true\r\n\r\n\t\ttry {\r\n\t\t\t// lastRedrawId is a positive number if a second redraw is requested\r\n\t\t\t// before the next animation frame\r\n\t\t\t// lastRedrawId is null if it's the first redraw and not an event\r\n\t\t\t// handler\r\n\t\t\tif (lastRedrawId && !force) {\r\n\t\t\t\t// when setTimeout: only reschedule redraw if time between now\r\n\t\t\t\t// and previous redraw is bigger than a frame, otherwise keep\r\n\t\t\t\t// currently scheduled timeout\r\n\t\t\t\t// when rAF: always reschedule redraw\r\n\t\t\t\tif ($requestAnimationFrame === global.requestAnimationFrame ||\r\n\t\t\t\t\t\tnew Date() - lastRedrawCallTime > FRAME_BUDGET) {\r\n\t\t\t\t\tif (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)\r\n\t\t\t\t\tlastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tredraw()\r\n\t\t\t\tlastRedrawId = $requestAnimationFrame(function () {\r\n\t\t\t\t\tlastRedrawId = null\r\n\t\t\t\t}, FRAME_BUDGET)\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tredrawing = forcing = false\r\n\t\t}\r\n\t}\r\n\r\n\tm.redraw.strategy = m.prop()\r\n\tfunction redraw() {\r\n\t\tif (computePreRedrawHook) {\r\n\t\t\tcomputePreRedrawHook()\r\n\t\t\tcomputePreRedrawHook = null\r\n\t\t}\r\n\t\tforEach(roots, function (root, i) {\r\n\t\t\tvar component = components[i]\r\n\t\t\tif (controllers[i]) {\r\n\t\t\t\tvar args = [controllers[i]]\r\n\t\t\t\tm.render(root,\r\n\t\t\t\t\tcomponent.view ? component.view(controllers[i], args) : \"\")\r\n\t\t\t}\r\n\t\t})\r\n\t\t// after rendering within a routed context, we need to scroll back to\r\n\t\t// the top, and fetch the document title for history.pushState\r\n\t\tif (computePostRedrawHook) {\r\n\t\t\tcomputePostRedrawHook()\r\n\t\t\tcomputePostRedrawHook = null\r\n\t\t}\r\n\t\tlastRedrawId = null\r\n\t\tlastRedrawCallTime = new Date()\r\n\t\tm.redraw.strategy(\"diff\")\r\n\t}\r\n\r\n\tfunction endFirstComputation() {\r\n\t\tif (m.redraw.strategy() === \"none\") {\r\n\t\t\tpendingRequests--\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t} else {\r\n\t\t\tm.endComputation()\r\n\t\t}\r\n\t}\r\n\r\n\tm.withAttr = function (prop, withAttrCallback, callbackThis) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || window.event\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\tvar currentTarget = e.currentTarget || this\r\n\t\t\tvar _this = callbackThis || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t\tvar target = prop in currentTarget ?\r\n\t\t\t\tcurrentTarget[prop] :\r\n\t\t\t\tcurrentTarget.getAttribute(prop)\r\n\t\t\twithAttrCallback.call(_this, target)\r\n\t\t}\r\n\t}\r\n\r\n\t// routing\r\n\tvar modes = {pathname: \"\", hash: \"#\", search: \"?\"}\r\n\tvar redirect = noop\r\n\tvar isDefaultRoute = false\r\n\tvar routeParams, currentRoute\r\n\r\n\tm.route = function (root, arg1, arg2, vdom) { // eslint-disable-line\r\n\t\t// m.route()\r\n\t\tif (arguments.length === 0) return currentRoute\r\n\t\t// m.route(el, defaultRoute, routes)\r\n\t\tif (arguments.length === 3 && isString(arg1)) {\r\n\t\t\tredirect = function (source) {\r\n\t\t\t\tvar path = currentRoute = normalizeRoute(source)\r\n\t\t\t\tif (!routeByValue(root, arg2, path)) {\r\n\t\t\t\t\tif (isDefaultRoute) {\r\n\t\t\t\t\t\tthrow new Error(\"Ensure the default route matches \" +\r\n\t\t\t\t\t\t\t\"one of the routes defined in m.route\")\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tisDefaultRoute = true\r\n\t\t\t\t\tm.route(arg1, true)\r\n\t\t\t\t\tisDefaultRoute = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar listener = m.route.mode === \"hash\" ?\r\n\t\t\t\t\"onhashchange\" :\r\n\t\t\t\t\"onpopstate\"\r\n\r\n\t\t\tglobal[listener] = function () {\r\n\t\t\t\tvar path = $location[m.route.mode]\r\n\t\t\t\tif (m.route.mode === \"pathname\") path += $location.search\r\n\t\t\t\tif (currentRoute !== normalizeRoute(path)) redirect(path)\r\n\t\t\t}\r\n\r\n\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\tglobal[listener]()\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// config: m.route\r\n\t\tif (root.addEventListener || root.attachEvent) {\r\n\t\t\tvar base = m.route.mode !== \"pathname\" ? $location.pathname : \"\"\r\n\t\t\troot.href = base + modes[m.route.mode] + vdom.attrs.href\r\n\t\t\tif (root.addEventListener) {\r\n\t\t\t\troot.removeEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t\troot.addEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t} else {\r\n\t\t\t\troot.detachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t\troot.attachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t}\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\t\t// m.route(route, params, shouldReplaceHistoryEntry)\r\n\t\tif (isString(root)) {\r\n\t\t\tvar oldRoute = currentRoute\r\n\t\t\tcurrentRoute = root\r\n\r\n\t\t\tvar args = arg1 || {}\r\n\t\t\tvar queryIndex = currentRoute.indexOf(\"?\")\r\n\t\t\tvar params\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tparams = parseQueryString(currentRoute.slice(queryIndex + 1))\r\n\t\t\t} else {\r\n\t\t\t\tparams = {}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i in args) {\r\n\t\t\t\tif (hasOwn.call(args, i)) {\r\n\t\t\t\t\tparams[i] = args[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar querystring = buildQueryString(params)\r\n\t\t\tvar currentPath\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tcurrentPath = currentRoute.slice(0, queryIndex)\r\n\t\t\t} else {\r\n\t\t\t\tcurrentPath = currentRoute\r\n\t\t\t}\r\n\r\n\t\t\tif (querystring) {\r\n\t\t\t\tcurrentRoute = currentPath +\r\n\t\t\t\t\t(currentPath.indexOf(\"?\") === -1 ? \"?\" : \"&\") +\r\n\t\t\t\t\tquerystring\r\n\t\t\t}\r\n\r\n\t\t\tvar replaceHistory =\r\n\t\t\t\t(arguments.length === 3 ? arg2 : arg1) === true ||\r\n\t\t\t\toldRoute === root\r\n\r\n\t\t\tif (global.history.pushState) {\r\n\t\t\t\tvar method = replaceHistory ? \"replaceState\" : \"pushState\"\r\n\t\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\t\tcomputePostRedrawHook = function () {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tglobal.history[method](null, $document.title,\r\n\t\t\t\t\t\t\tmodes[m.route.mode] + currentRoute)\r\n\t\t\t\t\t} catch (err) {\r\n\t\t\t\t\t\t// In the event of a pushState or replaceState failure,\r\n\t\t\t\t\t\t// fallback to a standard redirect. This is specifically\r\n\t\t\t\t\t\t// to address a Safari security error when attempting to\r\n\t\t\t\t\t\t// call pushState more than 100 times.\r\n\t\t\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t} else {\r\n\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tm.route.param = function (key) {\r\n\t\tif (!routeParams) {\r\n\t\t\tthrow new Error(\"You must call m.route(element, defaultRoute, \" +\r\n\t\t\t\t\"routes) before calling m.route.param()\")\r\n\t\t}\r\n\r\n\t\tif (!key) {\r\n\t\t\treturn routeParams\r\n\t\t}\r\n\r\n\t\treturn routeParams[key]\r\n\t}\r\n\r\n\tm.route.mode = \"search\"\r\n\r\n\tfunction normalizeRoute(route) {\r\n\t\treturn route.slice(modes[m.route.mode].length)\r\n\t}\r\n\r\n\tfunction routeByValue(root, router, path) {\r\n\t\trouteParams = {}\r\n\r\n\t\tvar queryStart = path.indexOf(\"?\")\r\n\t\tif (queryStart !== -1) {\r\n\t\t\trouteParams = parseQueryString(\r\n\t\t\t\tpath.substr(queryStart + 1, path.length))\r\n\t\t\tpath = path.substr(0, queryStart)\r\n\t\t}\r\n\r\n\t\t// Get all routes and check if there's\r\n\t\t// an exact match for the current path\r\n\t\tvar keys = Object.keys(router)\r\n\t\tvar index = keys.indexOf(path)\r\n\r\n\t\tif (index !== -1){\r\n\t\t\tm.mount(root, router[keys [index]])\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tfor (var route in router) {\r\n\t\t\tif (hasOwn.call(router, route)) {\r\n\t\t\t\tif (route === path) {\r\n\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar matcher = new RegExp(\"^\" + route\r\n\t\t\t\t\t.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\")\r\n\t\t\t\t\t.replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\r\n\r\n\t\t\t\tif (matcher.test(path)) {\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tpath.replace(matcher, function () {\r\n\t\t\t\t\t\tvar keys = route.match(/:[^\\/]+/g) || []\r\n\t\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\r\n\t\t\t\t\t\tforEach(keys, function (key, i) {\r\n\t\t\t\t\t\t\trouteParams[key.replace(/:|\\./g, \"\")] =\r\n\t\t\t\t\t\t\t\tdecodeURIComponent(values[i])\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\t})\r\n\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction routeUnobtrusive(e) {\r\n\t\te = e || event\r\n\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault()\r\n\t\t} else {\r\n\t\t\te.returnValue = false\r\n\t\t}\r\n\r\n\t\tvar currentTarget = e.currentTarget || e.srcElement\r\n\t\tvar args\r\n\r\n\t\tif (m.route.mode === \"pathname\" && currentTarget.search) {\r\n\t\t\targs = parseQueryString(currentTarget.search.slice(1))\r\n\t\t} else {\r\n\t\t\targs = {}\r\n\t\t}\r\n\r\n\t\twhile (currentTarget && !/a/i.test(currentTarget.nodeName)) {\r\n\t\t\tcurrentTarget = currentTarget.parentNode\r\n\t\t}\r\n\r\n\t\t// clear pendingRequests because we want an immediate route change\r\n\t\tpendingRequests = 0\r\n\t\tm.route(currentTarget[m.route.mode]\r\n\t\t\t.slice(modes[m.route.mode].length), args)\r\n\t}\r\n\r\n\tfunction setScroll() {\r\n\t\tif (m.route.mode !== \"hash\" && $location.hash) {\r\n\t\t\t$location.hash = $location.hash\r\n\t\t} else {\r\n\t\t\tglobal.scrollTo(0, 0)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildQueryString(object, prefix) {\r\n\t\tvar duplicates = {}\r\n\t\tvar str = []\r\n\r\n\t\tfor (var prop in object) {\r\n\t\t\tif (hasOwn.call(object, prop)) {\r\n\t\t\t\tvar key = prefix ? prefix + \"[\" + prop + \"]\" : prop\r\n\t\t\t\tvar value = object[prop]\r\n\r\n\t\t\t\tif (value === null) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key))\r\n\t\t\t\t} else if (isObject(value)) {\r\n\t\t\t\t\tstr.push(buildQueryString(value, key))\r\n\t\t\t\t} else if (isArray(value)) {\r\n\t\t\t\t\tvar keys = []\r\n\t\t\t\t\tduplicates[key] = duplicates[key] || {}\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tforEach(value, function (item) {\r\n\t\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\t\tif (!duplicates[key][item]) {\r\n\t\t\t\t\t\t\tduplicates[key][item] = true\r\n\t\t\t\t\t\t\tkeys.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\t\t\tencodeURIComponent(item))\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t\tstr.push(keys.join(\"&\"))\r\n\t\t\t\t} else if (value !== undefined) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\tencodeURIComponent(value))\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn str.join(\"&\")\r\n\t}\r\n\r\n\tfunction parseQueryString(str) {\r\n\t\tif (str === \"\" || str == null) return {}\r\n\t\tif (str.charAt(0) === \"?\") str = str.slice(1)\r\n\r\n\t\tvar pairs = str.split(\"&\")\r\n\t\tvar params = {}\r\n\r\n\t\tforEach(pairs, function (string) {\r\n\t\t\tvar pair = string.split(\"=\")\r\n\t\t\tvar key = decodeURIComponent(pair[0])\r\n\t\t\tvar value = pair.length === 2 ? decodeURIComponent(pair[1]) : null\r\n\t\t\tif (params[key] != null) {\r\n\t\t\t\tif (!isArray(params[key])) params[key] = [params[key]]\r\n\t\t\t\tparams[key].push(value)\r\n\t\t\t}\r\n\t\t\telse params[key] = value\r\n\t\t})\r\n\r\n\t\treturn params\r\n\t}\r\n\r\n\tm.route.buildQueryString = buildQueryString\r\n\tm.route.parseQueryString = parseQueryString\r\n\r\n\tfunction reset(root) {\r\n\t\tvar cacheKey = getCellCacheKey(root)\r\n\t\tclear(root.childNodes, cellCache[cacheKey])\r\n\t\tcellCache[cacheKey] = undefined\r\n\t}\r\n\r\n\tm.deferred = function () {\r\n\t\tvar deferred = new Deferred()\r\n\t\tdeferred.promise = propify(deferred.promise)\r\n\t\treturn deferred\r\n\t}\r\n\r\n\tfunction propify(promise, initialValue) {\r\n\t\tvar prop = m.prop(initialValue)\r\n\t\tpromise.then(prop)\r\n\t\tprop.then = function (resolve, reject) {\r\n\t\t\treturn propify(promise.then(resolve, reject), initialValue)\r\n\t\t}\r\n\r\n\t\tprop.catch = prop.then.bind(null, null)\r\n\t\treturn prop\r\n\t}\r\n\t// Promiz.mithril.js | Zolmeister | MIT\r\n\t// a modified version of Promiz.js, which does not conform to Promises/A+\r\n\t// for two reasons:\r\n\t//\r\n\t// 1) `then` callbacks are called synchronously (because setTimeout is too\r\n\t// slow, and the setImmediate polyfill is too big\r\n\t//\r\n\t// 2) throwing subclasses of Error cause the error to be bubbled up instead\r\n\t// of triggering rejection (because the spec does not account for the\r\n\t// important use case of default browser error handling, i.e. message w/\r\n\t// line number)\r\n\r\n\tvar RESOLVING = 1\r\n\tvar REJECTING = 2\r\n\tvar RESOLVED = 3\r\n\tvar REJECTED = 4\r\n\r\n\tfunction Deferred(onSuccess, onFailure) {\r\n\t\tvar self = this\r\n\t\tvar state = 0\r\n\t\tvar promiseValue = 0\r\n\t\tvar next = []\r\n\r\n\t\tself.promise = {}\r\n\r\n\t\tself.resolve = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = RESOLVING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.reject = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = REJECTING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.promise.then = function (onSuccess, onFailure) {\r\n\t\t\tvar deferred = new Deferred(onSuccess, onFailure)\r\n\r\n\t\t\tif (state === RESOLVED) {\r\n\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t} else if (state === REJECTED) {\r\n\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t} else {\r\n\t\t\t\tnext.push(deferred)\r\n\t\t\t}\r\n\r\n\t\t\treturn deferred.promise\r\n\t\t}\r\n\r\n\t\tfunction finish(type) {\r\n\t\t\tstate = type || REJECTED\r\n\t\t\tnext.map(function (deferred) {\r\n\t\t\t\tif (state === RESOLVED) {\r\n\t\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction thennable(then, success, failure, notThennable) {\r\n\t\t\tif (((promiseValue != null && isObject(promiseValue)) ||\r\n\t\t\t\t\tisFunction(promiseValue)) && isFunction(then)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// count protects against abuse calls from spec checker\r\n\t\t\t\t\tvar count = 0\r\n\t\t\t\t\tthen.call(promiseValue, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tsuccess()\r\n\t\t\t\t\t}, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tfailure()\r\n\t\t\t\t\t})\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\tfailure()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnotThennable()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction fire() {\r\n\t\t\t// check if it's a thenable\r\n\t\t\tvar then\r\n\t\t\ttry {\r\n\t\t\t\tthen = promiseValue && promiseValue.then\r\n\t\t\t} catch (e) {\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\tpromiseValue = e\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\treturn fire()\r\n\t\t\t}\r\n\r\n\t\t\tif (state === REJECTING) {\r\n\t\t\t\tm.deferred.onerror(promiseValue)\r\n\t\t\t}\r\n\r\n\t\t\tthennable(then, function () {\r\n\t\t\t\tstate = RESOLVING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (state === RESOLVING && isFunction(onSuccess)) {\r\n\t\t\t\t\t\tpromiseValue = onSuccess(promiseValue)\r\n\t\t\t\t\t} else if (state === REJECTING && isFunction(onFailure)) {\r\n\t\t\t\t\t\tpromiseValue = onFailure(promiseValue)\r\n\t\t\t\t\t\tstate = RESOLVING\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\treturn finish()\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (promiseValue === self) {\r\n\t\t\t\t\tpromiseValue = TypeError()\r\n\t\t\t\t\tfinish()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthennable(then, function () {\r\n\t\t\t\t\t\tfinish(RESOLVED)\r\n\t\t\t\t\t}, finish, function () {\r\n\t\t\t\t\t\tfinish(state === RESOLVING && RESOLVED)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tm.deferred.onerror = function (e) {\r\n\t\tif (type.call(e) === \"[object Error]\" &&\r\n\t\t\t\t!/ Error/.test(e.constructor.toString())) {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n\r\n\tm.sync = function (args) {\r\n\t\tvar deferred = m.deferred()\r\n\t\tvar outstanding = args.length\r\n\t\tvar results = []\r\n\t\tvar method = \"resolve\"\r\n\r\n\t\tfunction synchronizer(pos, resolved) {\r\n\t\t\treturn function (value) {\r\n\t\t\t\tresults[pos] = value\r\n\t\t\t\tif (!resolved) method = \"reject\"\r\n\t\t\t\tif (--outstanding === 0) {\r\n\t\t\t\t\tdeferred.promise(results)\r\n\t\t\t\t\tdeferred[method](results)\r\n\t\t\t\t}\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (args.length > 0) {\r\n\t\t\tforEach(args, function (arg, i) {\r\n\t\t\t\targ.then(synchronizer(i, true), synchronizer(i, false))\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tdeferred.resolve([])\r\n\t\t}\r\n\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\tfunction identity(value) { return value }\r\n\r\n\tfunction handleJsonp(options) {\r\n\t\tvar callbackKey = options.callbackName || \"mithril_callback_\" +\r\n\t\t\tnew Date().getTime() + \"_\" +\r\n\t\t\t(Math.round(Math.random() * 1e16)).toString(36)\r\n\r\n\t\tvar script = $document.createElement(\"script\")\r\n\r\n\t\tglobal[callbackKey] = function (resp) {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\t\t\toptions.onload({\r\n\t\t\t\ttype: \"load\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tresponseText: resp\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\t\t}\r\n\r\n\t\tscript.onerror = function () {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\r\n\t\t\toptions.onerror({\r\n\t\t\t\ttype: \"error\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tstatus: 500,\r\n\t\t\t\t\tresponseText: JSON.stringify({\r\n\t\t\t\t\t\terror: \"Error making jsonp request\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.onload = function () {\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.src = options.url +\r\n\t\t\t(options.url.indexOf(\"?\") > 0 ? \"&\" : \"?\") +\r\n\t\t\t(options.callbackKey ? options.callbackKey : \"callback\") +\r\n\t\t\t\"=\" + callbackKey +\r\n\t\t\t\"&\" + buildQueryString(options.data || {})\r\n\r\n\t\t$document.body.appendChild(script)\r\n\t}\r\n\r\n\tfunction createXhr(options) {\r\n\t\tvar xhr = new global.XMLHttpRequest()\r\n\t\txhr.open(options.method, options.url, true, options.user,\r\n\t\t\toptions.password)\r\n\r\n\t\txhr.onreadystatechange = function () {\r\n\t\t\tif (xhr.readyState === 4) {\r\n\t\t\t\tif (xhr.status >= 200 && xhr.status < 300) {\r\n\t\t\t\t\toptions.onload({type: \"load\", target: xhr})\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptions.onerror({type: \"error\", target: xhr})\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (options.serialize === JSON.stringify &&\r\n\t\t\t\toptions.data &&\r\n\t\t\t\toptions.method !== \"GET\") {\r\n\t\t\txhr.setRequestHeader(\"Content-Type\",\r\n\t\t\t\t\"application/json; charset=utf-8\")\r\n\t\t}\r\n\r\n\t\tif (options.deserialize === JSON.parse) {\r\n\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\r\n\t\t}\r\n\r\n\t\tif (isFunction(options.config)) {\r\n\t\t\tvar maybeXhr = options.config(xhr, options)\r\n\t\t\tif (maybeXhr != null) xhr = maybeXhr\r\n\t\t}\r\n\r\n\t\tvar data = options.method === \"GET\" || !options.data ? \"\" : options.data\r\n\r\n\t\tif (data && !isString(data) && data.constructor !== global.FormData) {\r\n\t\t\tthrow new Error(\"Request data should be either be a string or \" +\r\n\t\t\t\t\"FormData. Check the `serialize` option in `m.request`\")\r\n\t\t}\r\n\r\n\t\txhr.send(data)\r\n\t\treturn xhr\r\n\t}\r\n\r\n\tfunction ajax(options) {\r\n\t\tif (options.dataType && options.dataType.toLowerCase() === \"jsonp\") {\r\n\t\t\treturn handleJsonp(options)\r\n\t\t} else {\r\n\t\t\treturn createXhr(options)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction bindData(options, data, serialize) {\r\n\t\tif (options.method === \"GET\" && options.dataType !== \"jsonp\") {\r\n\t\t\tvar prefix = options.url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\r\n\t\t\tvar querystring = buildQueryString(data)\r\n\t\t\toptions.url += (querystring ? prefix + querystring : \"\")\r\n\t\t} else {\r\n\t\t\toptions.data = serialize(data)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parameterizeUrl(url, data) {\r\n\t\tif (data) {\r\n\t\t\turl = url.replace(/:[a-z]\\w+/gi, function (token){\r\n\t\t\t\tvar key = token.slice(1)\r\n\t\t\t\tvar value = data[key] || token\r\n\t\t\t\tdelete data[key]\r\n\t\t\t\treturn value\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn url\r\n\t}\r\n\r\n\tm.request = function (options) {\r\n\t\tif (options.background !== true) m.startComputation()\r\n\t\tvar deferred = new Deferred()\r\n\t\tvar isJSONP = options.dataType &&\r\n\t\t\toptions.dataType.toLowerCase() === \"jsonp\"\r\n\r\n\t\tvar serialize, deserialize, extract\r\n\r\n\t\tif (isJSONP) {\r\n\t\t\tserialize = options.serialize =\r\n\t\t\tdeserialize = options.deserialize = identity\r\n\r\n\t\t\textract = function (jsonp) { return jsonp.responseText }\r\n\t\t} else {\r\n\t\t\tserialize = options.serialize = options.serialize || JSON.stringify\r\n\r\n\t\t\tdeserialize = options.deserialize =\r\n\t\t\t\toptions.deserialize || JSON.parse\r\n\t\t\textract = options.extract || function (xhr) {\r\n\t\t\t\tif (xhr.responseText.length || deserialize !== JSON.parse) {\r\n\t\t\t\t\treturn xhr.responseText\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions.method = (options.method || \"GET\").toUpperCase()\r\n\t\toptions.url = parameterizeUrl(options.url, options.data)\r\n\t\tbindData(options, options.data, serialize)\r\n\t\toptions.onload = options.onerror = function (ev) {\r\n\t\t\ttry {\r\n\t\t\t\tev = ev || event\r\n\t\t\t\tvar response = deserialize(extract(ev.target, options))\r\n\t\t\t\tif (ev.type === \"load\") {\r\n\t\t\t\t\tif (options.unwrapSuccess) {\r\n\t\t\t\t\t\tresponse = options.unwrapSuccess(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (isArray(response) && options.type) {\r\n\t\t\t\t\t\tforEach(response, function (res, i) {\r\n\t\t\t\t\t\t\tresponse[i] = new options.type(res)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else if (options.type) {\r\n\t\t\t\t\t\tresponse = new options.type(response)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.resolve(response)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.unwrapError) {\r\n\t\t\t\t\t\tresponse = options.unwrapError(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.reject(response)\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tdeferred.reject(e)\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t} finally {\r\n\t\t\t\tif (options.background !== true) m.endComputation()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tajax(options)\r\n\t\tdeferred.promise = propify(deferred.promise, options.initialValue)\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\treturn m\r\n}); // eslint-disable-line\r\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
assets/js/forms-api.js
CHANGED
@@ -16,36 +16,48 @@ var listeners = window.mc4wp && window.mc4wp.listeners ? window.mc4wp.listeners
|
|
16 |
var config = window.mc4wp_forms_config || {};
|
17 |
|
18 |
// funcs
|
19 |
-
function
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
forms.trigger('error', [form, errors]);
|
26 |
-
} else {
|
27 |
-
// form was successfully submitted
|
28 |
-
forms.trigger('success', [form, data]);
|
29 |
-
forms.trigger(action + "d", [form, data]);
|
30 |
-
}
|
31 |
}
|
32 |
|
33 |
function handleFormRequest(form, action, errors, data){
|
34 |
|
|
|
|
|
|
|
35 |
// re-populate form
|
36 |
if( errors ) {
|
37 |
form.setData(data);
|
38 |
}
|
39 |
|
40 |
if( config.auto_scroll ) {
|
41 |
-
|
42 |
-
var arg = animate ? { behavior: 'smooth' } : false;
|
43 |
-
form.element.scrollIntoView(arg);
|
44 |
}
|
45 |
|
46 |
// trigger events on window.load so all other scripts have loaded
|
47 |
-
window.addEventListener('load', function(){
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
});
|
50 |
}
|
51 |
|
@@ -54,15 +66,13 @@ for(var i=0; i<listeners.length;i++) {
|
|
54 |
forms.on(listeners[i].event, listeners[i].callback);
|
55 |
}
|
56 |
|
57 |
-
// Bind browser events to form events (using delegation
|
58 |
Gator(document.body).on('submit', '.mc4wp-form', function(event) {
|
59 |
-
event = event || window.event;
|
60 |
var form = forms.getByElement(event.target || event.srcElement);
|
61 |
forms.trigger('submit', [form, event]);
|
62 |
});
|
63 |
|
64 |
Gator(document.body).on('focus', '.mc4wp-form', function(event) {
|
65 |
-
event = event || window.event;
|
66 |
var form = forms.getByElement(event.target || event.srcElement);
|
67 |
|
68 |
if( ! form.started ) {
|
@@ -72,7 +82,6 @@ Gator(document.body).on('focus', '.mc4wp-form', function(event) {
|
|
72 |
});
|
73 |
|
74 |
Gator(document.body).on('change', '.mc4wp-form', function(event) {
|
75 |
-
event = event || window.event;
|
76 |
var form = forms.getByElement(event.target || event.srcElement);
|
77 |
forms.trigger('change', [form,event]);
|
78 |
});
|
16 |
var config = window.mc4wp_forms_config || {};
|
17 |
|
18 |
// funcs
|
19 |
+
function scrollToForm(form) {
|
20 |
+
var animate = config.auto_scroll === 'animated';
|
21 |
+
var args = {
|
22 |
+
behavior: animate ? "smooth" : "instant"
|
23 |
+
};
|
24 |
+
form.element.scrollIntoView(args);
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
|
27 |
function handleFormRequest(form, action, errors, data){
|
28 |
|
29 |
+
var pageHeight = document.body.clientHeight;
|
30 |
+
var timeStart = Date.now();
|
31 |
+
|
32 |
// re-populate form
|
33 |
if( errors ) {
|
34 |
form.setData(data);
|
35 |
}
|
36 |
|
37 |
if( config.auto_scroll ) {
|
38 |
+
scrollToForm(form);
|
|
|
|
|
39 |
}
|
40 |
|
41 |
// trigger events on window.load so all other scripts have loaded
|
42 |
+
window.addEventListener('load', function() {
|
43 |
+
var timeElapsed = Date.now() - timeStart;
|
44 |
+
|
45 |
+
// scroll to form again if page height changed since last scroll
|
46 |
+
// (only if load didn't take more than 0.8 seconds to prevent overtaking user scroll)
|
47 |
+
if( config.auto_scroll && timeElapsed < 800 && document.body.clientHeight != pageHeight ) {
|
48 |
+
scrollToForm(form);
|
49 |
+
}
|
50 |
+
|
51 |
+
// trigger events
|
52 |
+
forms.trigger( 'submitted', [form]);
|
53 |
+
|
54 |
+
if( errors ) {
|
55 |
+
forms.trigger('error', [form, errors]);
|
56 |
+
} else {
|
57 |
+
// form was successfully submitted
|
58 |
+
forms.trigger('success', [form, data]);
|
59 |
+
forms.trigger(action + "d", [form, data]);
|
60 |
+
}
|
61 |
});
|
62 |
}
|
63 |
|
66 |
forms.on(listeners[i].event, listeners[i].callback);
|
67 |
}
|
68 |
|
69 |
+
// Bind browser events to form events (using delegation)
|
70 |
Gator(document.body).on('submit', '.mc4wp-form', function(event) {
|
|
|
71 |
var form = forms.getByElement(event.target || event.srcElement);
|
72 |
forms.trigger('submit', [form, event]);
|
73 |
});
|
74 |
|
75 |
Gator(document.body).on('focus', '.mc4wp-form', function(event) {
|
|
|
76 |
var form = forms.getByElement(event.target || event.srcElement);
|
77 |
|
78 |
if( ! form.started ) {
|
82 |
});
|
83 |
|
84 |
Gator(document.body).on('change', '.mc4wp-form', function(event) {
|
|
|
85 |
var form = forms.getByElement(event.target || event.srcElement);
|
86 |
forms.trigger('change', [form,event]);
|
87 |
});
|
assets/js/forms-api.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function n(t,r,i){function o(a,c){if(!r[a]){if(!t[a]){var u="function"==typeof e&&e;if(!c&&u)return u(a,!0);if(s)return s(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,n,t,r,i)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,n){"use strict";function r(e,t,n,r){a.trigger("submitted",[e]),n?a.trigger("error",[e,n]):(a.trigger("success",[e,r]),a.trigger(t+"d",[e,r]))}function i(e,t,n,i){if(n&&e.setData(i),u.auto_scroll){var o="animated"===u.auto_scroll,s=!!o&&{behavior:"smooth"};e.element.scrollIntoView(s)}window.addEventListener("load",function(){r(e,t,n,i)})}var o=window.mc4wp||{};if(window.addEventListener){for(var s=e("gator"),a=e("./forms/forms.js"),c=window.mc4wp&&window.mc4wp.listeners?window.mc4wp.listeners:[],u=window.mc4wp_forms_config||{},f=0;f<c.length;f++)a.on(c[f].event,c[f].callback);if(s(document.body).on("submit",".mc4wp-form",function(e){e=e||window.event;var t=a.getByElement(e.target||e.srcElement);a.trigger("submit",[t,e])}),s(document.body).on("focus",".mc4wp-form",function(e){e=e||window.event;var t=a.getByElement(e.target||e.srcElement);t.started||(a.trigger("started",[t,e]),t.started=!0)}),s(document.body).on("change",".mc4wp-form",function(e){e=e||window.event;var t=a.getByElement(e.target||e.srcElement);a.trigger("change",[t,e])}),u.submitted_form){var l=u.submitted_form,h=document.getElementById(l.element_id),d=a.getByElement(h);i(d,l.action,l.errors,l.data)}o.forms=a,window.mc4wp=o}},{"./forms/forms.js":3,gator:6}],2:[function(e,t,n){"use strict";var r=e("../third-party/serialize.js"),i=e("populate.js"),o=e("../third-party/form2js.js"),s=function(e,t){var n=this;this.id=e,this.element=t||document.createElement("form"),this.name=this.element.getAttribute("data-name")||"Form #"+this.id,this.errors=[],this.started=!1,this.setData=function(e){try{i(n.element,e)}catch(t){console.error(t)}},this.getData=function(){return o(n.element)},this.getSerializedData=function(){return r(n.element)},this.setResponse=function(e){n.element.querySelector(".mc4wp-response").innerHTML=e},this.reset=function(){this.setResponse(""),n.element.querySelector(".mc4wp-form-fields").style.display="",n.element.reset()}};t.exports=s},{"../third-party/form2js.js":4,"../third-party/serialize.js":5,"populate.js":7}],3:[function(e,t,n){"use strict";function r(e){for(var t=0;t<d.length;t++)if(d[t].id==e)return d[t];var n=document.querySelector(".mc4wp-form-"+e);return o(n,e)}function i(e){for(var t=e.form||e,n=0;n<d.length;n++)if(d[n].element==t)return d[n];return o(t)}function o(e,t){t=t||parseInt(e.getAttribute("data-id"))||0;var n=new l(t,e);return d.push(n),n}function s(){return d}function a(e,t){return h.on(e,t)}function c(e,t){return h.trigger(e,t)}function u(e,t){return h.off(e,t)}var f=e("wolfy87-eventemitter"),l=e("./form.js"),h=new f,d=[];t.exports={all:s,get:r,getByElement:i,on:a,trigger:c,off:u}},{"./form.js":2,"wolfy87-eventemitter":8}],4:[function(e,n,r){!function(e,i){"undefined"!=typeof r&&"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof t&&t.amd?t(i):e.form2js=i()}(this,function(){"use strict";function e(e,r,i,o,s,a){a=!!a,"undefined"!=typeof i&&null!=i||(i=!0),"undefined"!=typeof r&&null!=r||(r="."),arguments.length<5&&(s=!1),e="string"==typeof e?document.getElementById(e):e;var c,u=[],f=0;if(e.constructor==Array||"undefined"!=typeof NodeList&&e.constructor==NodeList)for(;c=e[f++];)u=u.concat(n(c,o,s,a));else u=n(e,o,s,a);return t(u,i,r)}function t(e,t,n){var r,i,o,s,a,c,u,f,l,h,d,m,p,v={},g={};for(r=0;r<e.length;r++)if(a=e[r].value,!t||""!==a&&null!==a){for(m=e[r].name,p=m.split(n),c=[],u=v,f="",i=0;i<p.length;i++)if(d=p[i].split("]["),d.length>1)for(o=0;o<d.length;o++)if(0==o?d[o]=d[o]+"]":o==d.length-1?d[o]="["+d[o]:d[o]="["+d[o]+"]",h=d[o].match(/([a-z_]+)?\[([a-z_][a-z0-9_]+?)\]/i))for(s=1;s<h.length;s++)h[s]&&c.push(h[s]);else c.push(d[o]);else c=c.concat(d);for(i=0;i<c.length;i++)d=c[i],d.indexOf("[]")>-1&&i==c.length-1?(l=d.substr(0,d.indexOf("[")),f+=l,u[l]||(u[l]=[]),u[l].push(a)):d.indexOf("[")>-1?(l=d.substr(0,d.indexOf("[")),h=d.replace(/(^([a-z_]+)?\[)|(\]$)/gi,""),f+="_"+l+"_"+h,g[f]||(g[f]={}),""==l||u[l]||(u[l]=[]),i==c.length-1?""==l?(u.push(a),g[f][h]=u[u.length-1]):(u[l].push(a),g[f][h]=u[l][u[l].length-1]):g[f][h]||(/^[0-9a-z_]+\[?/i.test(c[i+1])?u[l].push({}):u[l].push([]),g[f][h]=u[l][u[l].length-1]),u=g[f][h]):(f+=d,i<c.length-1?(u[d]||(u[d]={}),u=u[d]):u[d]=a)}return v}function n(e,t,n,o){var s=i(e,t,n,o);return s.length>0?s:r(e,t,n,o)}function r(e,t,n,r){for(var o=[],s=e.firstChild;s;)o=o.concat(i(s,t,n,r)),s=s.nextSibling;return o}function i(e,t,n,i){if(e.disabled&&!i)return[];var a,c,u,f=o(e,n);return a=t&&t(e),a&&a.name?u=[a]:""!=f&&e.nodeName.match(/INPUT|TEXTAREA/i)?(c=s(e,i),u=null===c?[]:[{name:f,value:c}]):""!=f&&e.nodeName.match(/SELECT/i)?(c=s(e,i),u=[{name:f.replace(/\[\]$/,""),value:c}]):u=r(e,t,n,i),u}function o(e,t){return e.name&&""!=e.name?e.name:t&&e.id&&""!=e.id?e.id:""}function s(e,t){if(e.disabled&&!t)return null;switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":if(e.checked&&"false"===e.value)return!1;case"checkbox":if(e.checked&&"true"===e.value)return!0;if(!e.checked&&"true"===e.value)return!1;if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return a(e)}return null}function a(e){var t,n,r,i=e.multiple,o=[];if(!i)return e.value;for(t=e.getElementsByTagName("option"),n=0,r=t.length;n<r;n++)t[n].selected&&o.push(t[n].value);return o}return e})},{}],5:[function(e,t,n){function r(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var n=t.hash?{}:"",r=t.serializer||(t.hash?s:a),i=e&&e.elements?e.elements:[],o=Object.create(null),f=0;f<i.length;++f){var l=i[f];if((t.disabled||!l.disabled)&&l.name&&u.test(l.nodeName)&&!c.test(l.type)){var h=l.name,d=l.value;if("checkbox"!==l.type&&"radio"!==l.type||l.checked||(d=void 0),t.empty){if("checkbox"!==l.type||l.checked||(d=""),"radio"===l.type&&(o[l.name]||l.checked?l.checked&&(o[l.name]=!0):o[l.name]=!1),!d&&"radio"==l.type)continue}else if(!d)continue;if("select-multiple"!==l.type)n=r(n,h,d);else{d=[];for(var m=l.options,p=!1,v=0;v<m.length;++v){var g=m[v],y=t.empty&&!g.value,w=g.value||y;g.selected&&w&&(p=!0,n=t.hash&&"[]"!==h.slice(h.length-2)?r(n,h+"[]",g.value):r(n,h,g.value))}!p&&t.empty&&(n=r(n,h,""))}}}if(t.empty)for(var h in o)o[h]||(n=r(n,h,""));return n}function i(e){var t=[],n=/^([^\[\]]*)/,r=new RegExp(f),i=n.exec(e);for(i[1]&&t.push(i[1]);null!==(i=r.exec(e));)t.push(i[1]);return t}function o(e,t,n){if(0===t.length)return e=n;var r=t.shift(),i=r.match(/^\[(.+?)\]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(o(null,t,n)):(e._values=e._values||[],e._values.push(o(null,t,n))),e;if(i){var s=i[1],a=parseInt(s,10);isNaN(a)?(e=e||{},e[s]=o(e[s],t,n)):(e=e||[],e[a]=o(e[a],t,n))}else e[r]=o(e[r],t,n);return e}function s(e,t,n){var r=t.match(f);if(r){var s=i(t);o(e,s,n)}else{var a=e[t];a?(Array.isArray(a)||(e[t]=[a]),e[t].push(n)):e[t]=n}return e}function a(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=encodeURIComponent(n),n=n.replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}var c=/^(?:submit|button|image|reset|file)$/i,u=/^(?:input|select|textarea|keygen)/i,f=/(\[[^\[\]]*\])/g;t.exports=r},{}],6:[function(e,t,n){!function(){function e(e,t,n){var r="blur"==t||"focus"==t;e.element.addEventListener(t,n,r)}function n(e){e.preventDefault(),e.stopPropagation()}function r(e){return f?f:f=e.matches?e.matches:e.webkitMatchesSelector?e.webkitMatchesSelector:e.mozMatchesSelector?e.mozMatchesSelector:e.msMatchesSelector?e.msMatchesSelector:e.oMatchesSelector?e.oMatchesSelector:u.matchesSelector}function i(e,t,n){if("_root"==t)return n;if(e!==n)return r(e).call(e,t)?e:e.parentNode?(l++,i(e.parentNode,t,n)):void 0}function o(e,t,n,r){d[e.id]||(d[e.id]={}),d[e.id][t]||(d[e.id][t]={}),d[e.id][t][n]||(d[e.id][t][n]=[]),d[e.id][t][n].push(r)}function s(e,t,n,r){if(d[e.id])if(t){if(!r&&!n)return void(d[e.id][t]={});if(!r)return void delete d[e.id][t][n];if(d[e.id][t][n])for(var i=0;i<d[e.id][t][n].length;i++)if(d[e.id][t][n][i]===r){d[e.id][t][n].splice(i,1);break}}else for(var o in d[e.id])d[e.id].hasOwnProperty(o)&&(d[e.id][o]={})}function a(e,t,n){if(d[e][n]){var r,o,s=t.target||t.srcElement,a={},c=0,f=0;l=0;for(r in d[e][n])d[e][n].hasOwnProperty(r)&&(o=i(s,r,m[e].element),o&&u.matchesEvent(n,m[e].element,o,"_root"==r,t)&&(l++,d[e][n][r].match=o,a[l]=d[e][n][r]));for(t.stopPropagation=function(){t.cancelBubble=!0},c=0;c<=l;c++)if(a[c])for(f=0;f<a[c].length;f++){if(a[c][f].call(a[c].match,t)===!1)return void u.cancel(t);if(t.cancelBubble)return}}}function c(e,t,n,r){function i(e){return function(t){a(f,t,e)}}if(this.element){e instanceof Array||(e=[e]),n||"function"!=typeof t||(n=t,t="_root");var c,f=this.id;for(c=0;c<e.length;c++)r?s(this,e[c],t,n):(d[f]&&d[f][e[c]]||u.addEvent(this,e[c],i(e[c])),o(this,e[c],t,n));return this}}function u(e,t){if(!(this instanceof u)){for(var n in m)if(m[n].element===e)return m[n];return h++,m[h]=new u(e,h),m[h]}this.element=e,this.id=t}var f,l=0,h=0,d={},m={};u.prototype.on=function(e,t,n){return c.call(this,e,t,n)},u.prototype.off=function(e,t,n){return c.call(this,e,t,n,!0)},u.matchesSelector=function(){},u.cancel=n,u.addEvent=e,u.matchesEvent=function(){return!0},"undefined"!=typeof t&&t.exports&&(t.exports=u),window.Gator=u}()},{}],7:[function(e,n,r){!function(e){var r=function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){var o=i,s=t[i];if("undefined"!=typeof n&&(o=n+"["+i+"]"),s.constructor===Array)o+="[]";else if("object"==typeof s){r(e,s,o);continue}var a=e.elements.namedItem(o);if(a){var c=a.type||a[0].type;switch(c){default:a.value=s;break;case"radio":case"checkbox":for(var u=0;u<a.length;u++)a[u].checked=s.indexOf(a[u].value)>-1;break;case"select-multiple":for(var f=s.constructor==Array?s:[s],l=0;l<a.options.length;l++)a.options[l].selected|=f.indexOf(a.options[l].value)>-1;break;case"select":case"select-one":a.value=s.toString()||s}}}};"function"==typeof t&&"object"==typeof t.amd&&t.amd?t(function(){return r}):"undefined"!=typeof n&&n.exports?n.exports=r:e.populate=r}(this)},{}],8:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=e.prototype,s=this,a=s.EventEmitter;o.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},o.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},o.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},o.addListener=function(e,t){var n,i=this.getListenersAsObject(e),o="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&r(i[n],t)===-1&&i[n].push(o?t:{listener:t,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,t){var n,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&(n=r(o[i],t),n!==-1&&o[i].splice(n,1));return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,n){var r,i,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)o.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?o.call(this,r,i):s.call(this,r,i));return this},o.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var n,r,i,o,s,a=this.getListenersAsObject(e);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=n.length;i--;)r=n[i],r.once===!0&&this.removeListener(e,r.listener),s=r.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},o._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return s.EventEmitter=a,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:s.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=forms-api.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function n(t,r,i){function o(a,c){if(!r[a]){if(!t[a]){var u="function"==typeof e&&e;if(!c&&u)return u(a,!0);if(s)return s(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,n,t,r,i)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,n){"use strict";function r(e){var t="animated"===u.auto_scroll,n={behavior:t?"smooth":"instant"};e.element.scrollIntoView(n)}function i(e,t,n,i){var o=document.body.clientHeight,s=Date.now();n&&e.setData(i),u.auto_scroll&&r(e),window.addEventListener("load",function(){var c=Date.now()-s;u.auto_scroll&&c<800&&document.body.clientHeight!=o&&r(e),a.trigger("submitted",[e]),n?a.trigger("error",[e,n]):(a.trigger("success",[e,i]),a.trigger(t+"d",[e,i]))})}var o=window.mc4wp||{};if(window.addEventListener){for(var s=e("gator"),a=e("./forms/forms.js"),c=window.mc4wp&&window.mc4wp.listeners?window.mc4wp.listeners:[],u=window.mc4wp_forms_config||{},f=0;f<c.length;f++)a.on(c[f].event,c[f].callback);if(s(document.body).on("submit",".mc4wp-form",function(e){var t=a.getByElement(e.target||e.srcElement);a.trigger("submit",[t,e])}),s(document.body).on("focus",".mc4wp-form",function(e){var t=a.getByElement(e.target||e.srcElement);t.started||(a.trigger("started",[t,e]),t.started=!0)}),s(document.body).on("change",".mc4wp-form",function(e){var t=a.getByElement(e.target||e.srcElement);a.trigger("change",[t,e])}),u.submitted_form){var l=u.submitted_form,h=document.getElementById(l.element_id),d=a.getByElement(h);i(d,l.action,l.errors,l.data)}o.forms=a,window.mc4wp=o}},{"./forms/forms.js":3,gator:6}],2:[function(e,t,n){"use strict";var r=e("../third-party/serialize.js"),i=e("populate.js"),o=e("../third-party/form2js.js"),s=function(e,t){var n=this;this.id=e,this.element=t||document.createElement("form"),this.name=this.element.getAttribute("data-name")||"Form #"+this.id,this.errors=[],this.started=!1,this.setData=function(e){try{i(n.element,e)}catch(t){console.error(t)}},this.getData=function(){return o(n.element)},this.getSerializedData=function(){return r(n.element)},this.setResponse=function(e){n.element.querySelector(".mc4wp-response").innerHTML=e},this.reset=function(){this.setResponse(""),n.element.querySelector(".mc4wp-form-fields").style.display="",n.element.reset()}};t.exports=s},{"../third-party/form2js.js":4,"../third-party/serialize.js":5,"populate.js":7}],3:[function(e,t,n){"use strict";function r(e){for(var t=0;t<d.length;t++)if(d[t].id==e)return d[t];var n=document.querySelector(".mc4wp-form-"+e);return o(n,e)}function i(e){for(var t=e.form||e,n=0;n<d.length;n++)if(d[n].element==t)return d[n];return o(t)}function o(e,t){t=t||parseInt(e.getAttribute("data-id"))||0;var n=new l(t,e);return d.push(n),n}function s(){return d}function a(e,t){return h.on(e,t)}function c(e,t){return h.trigger(e,t)}function u(e,t){return h.off(e,t)}var f=e("wolfy87-eventemitter"),l=e("./form.js"),h=new f,d=[];t.exports={all:s,get:r,getByElement:i,on:a,trigger:c,off:u}},{"./form.js":2,"wolfy87-eventemitter":8}],4:[function(e,n,r){!function(e,i){"undefined"!=typeof r&&"undefined"!=typeof n&&n.exports?n.exports=i():"function"==typeof t&&t.amd?t(i):e.form2js=i()}(this,function(){"use strict";function e(e,r,i,o,s,a){a=!!a,"undefined"!=typeof i&&null!=i||(i=!0),"undefined"!=typeof r&&null!=r||(r="."),arguments.length<5&&(s=!1),e="string"==typeof e?document.getElementById(e):e;var c,u=[],f=0;if(e.constructor==Array||"undefined"!=typeof NodeList&&e.constructor==NodeList)for(;c=e[f++];)u=u.concat(n(c,o,s,a));else u=n(e,o,s,a);return t(u,i,r)}function t(e,t,n){var r,i,o,s,a,c,u,f,l,h,d,m,p,v={},g={};for(r=0;r<e.length;r++)if(a=e[r].value,!t||""!==a&&null!==a){for(m=e[r].name,p=m.split(n),c=[],u=v,f="",i=0;i<p.length;i++)if(d=p[i].split("]["),d.length>1)for(o=0;o<d.length;o++)if(0==o?d[o]=d[o]+"]":o==d.length-1?d[o]="["+d[o]:d[o]="["+d[o]+"]",h=d[o].match(/([a-z_]+)?\[([a-z_][a-z0-9_]+?)\]/i))for(s=1;s<h.length;s++)h[s]&&c.push(h[s]);else c.push(d[o]);else c=c.concat(d);for(i=0;i<c.length;i++)d=c[i],d.indexOf("[]")>-1&&i==c.length-1?(l=d.substr(0,d.indexOf("[")),f+=l,u[l]||(u[l]=[]),u[l].push(a)):d.indexOf("[")>-1?(l=d.substr(0,d.indexOf("[")),h=d.replace(/(^([a-z_]+)?\[)|(\]$)/gi,""),f+="_"+l+"_"+h,g[f]||(g[f]={}),""==l||u[l]||(u[l]=[]),i==c.length-1?""==l?(u.push(a),g[f][h]=u[u.length-1]):(u[l].push(a),g[f][h]=u[l][u[l].length-1]):g[f][h]||(/^[0-9a-z_]+\[?/i.test(c[i+1])?u[l].push({}):u[l].push([]),g[f][h]=u[l][u[l].length-1]),u=g[f][h]):(f+=d,i<c.length-1?(u[d]||(u[d]={}),u=u[d]):u[d]=a)}return v}function n(e,t,n,o){var s=i(e,t,n,o);return s.length>0?s:r(e,t,n,o)}function r(e,t,n,r){for(var o=[],s=e.firstChild;s;)o=o.concat(i(s,t,n,r)),s=s.nextSibling;return o}function i(e,t,n,i){if(e.disabled&&!i)return[];var a,c,u,f=o(e,n);return a=t&&t(e),a&&a.name?u=[a]:""!=f&&e.nodeName.match(/INPUT|TEXTAREA/i)?(c=s(e,i),u=null===c?[]:[{name:f,value:c}]):""!=f&&e.nodeName.match(/SELECT/i)?(c=s(e,i),u=[{name:f.replace(/\[\]$/,""),value:c}]):u=r(e,t,n,i),u}function o(e,t){return e.name&&""!=e.name?e.name:t&&e.id&&""!=e.id?e.id:""}function s(e,t){if(e.disabled&&!t)return null;switch(e.nodeName){case"INPUT":case"TEXTAREA":switch(e.type.toLowerCase()){case"radio":if(e.checked&&"false"===e.value)return!1;case"checkbox":if(e.checked&&"true"===e.value)return!0;if(!e.checked&&"true"===e.value)return!1;if(e.checked)return e.value;break;case"button":case"reset":case"submit":case"image":return"";default:return e.value}break;case"SELECT":return a(e)}return null}function a(e){var t,n,r,i=e.multiple,o=[];if(!i)return e.value;for(t=e.getElementsByTagName("option"),n=0,r=t.length;n<r;n++)t[n].selected&&o.push(t[n].value);return o}return e})},{}],5:[function(e,t,n){function r(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var n=t.hash?{}:"",r=t.serializer||(t.hash?s:a),i=e&&e.elements?e.elements:[],o=Object.create(null),f=0;f<i.length;++f){var l=i[f];if((t.disabled||!l.disabled)&&l.name&&u.test(l.nodeName)&&!c.test(l.type)){var h=l.name,d=l.value;if("checkbox"!==l.type&&"radio"!==l.type||l.checked||(d=void 0),t.empty){if("checkbox"!==l.type||l.checked||(d=""),"radio"===l.type&&(o[l.name]||l.checked?l.checked&&(o[l.name]=!0):o[l.name]=!1),!d&&"radio"==l.type)continue}else if(!d)continue;if("select-multiple"!==l.type)n=r(n,h,d);else{d=[];for(var m=l.options,p=!1,v=0;v<m.length;++v){var g=m[v],y=t.empty&&!g.value,w=g.value||y;g.selected&&w&&(p=!0,n=t.hash&&"[]"!==h.slice(h.length-2)?r(n,h+"[]",g.value):r(n,h,g.value))}!p&&t.empty&&(n=r(n,h,""))}}}if(t.empty)for(var h in o)o[h]||(n=r(n,h,""));return n}function i(e){var t=[],n=/^([^\[\]]*)/,r=new RegExp(f),i=n.exec(e);for(i[1]&&t.push(i[1]);null!==(i=r.exec(e));)t.push(i[1]);return t}function o(e,t,n){if(0===t.length)return e=n;var r=t.shift(),i=r.match(/^\[(.+?)\]$/);if("[]"===r)return e=e||[],Array.isArray(e)?e.push(o(null,t,n)):(e._values=e._values||[],e._values.push(o(null,t,n))),e;if(i){var s=i[1],a=parseInt(s,10);isNaN(a)?(e=e||{},e[s]=o(e[s],t,n)):(e=e||[],e[a]=o(e[a],t,n))}else e[r]=o(e[r],t,n);return e}function s(e,t,n){var r=t.match(f);if(r){var s=i(t);o(e,s,n)}else{var a=e[t];a?(Array.isArray(a)||(e[t]=[a]),e[t].push(n)):e[t]=n}return e}function a(e,t,n){return n=n.replace(/(\r)?\n/g,"\r\n"),n=encodeURIComponent(n),n=n.replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+n}var c=/^(?:submit|button|image|reset|file)$/i,u=/^(?:input|select|textarea|keygen)/i,f=/(\[[^\[\]]*\])/g;t.exports=r},{}],6:[function(e,t,n){!function(){function e(e,t,n){var r="blur"==t||"focus"==t;e.element.addEventListener(t,n,r)}function n(e){e.preventDefault(),e.stopPropagation()}function r(e){return f?f:f=e.matches?e.matches:e.webkitMatchesSelector?e.webkitMatchesSelector:e.mozMatchesSelector?e.mozMatchesSelector:e.msMatchesSelector?e.msMatchesSelector:e.oMatchesSelector?e.oMatchesSelector:u.matchesSelector}function i(e,t,n){if("_root"==t)return n;if(e!==n)return r(e).call(e,t)?e:e.parentNode?(l++,i(e.parentNode,t,n)):void 0}function o(e,t,n,r){d[e.id]||(d[e.id]={}),d[e.id][t]||(d[e.id][t]={}),d[e.id][t][n]||(d[e.id][t][n]=[]),d[e.id][t][n].push(r)}function s(e,t,n,r){if(d[e.id])if(t){if(!r&&!n)return void(d[e.id][t]={});if(!r)return void delete d[e.id][t][n];if(d[e.id][t][n])for(var i=0;i<d[e.id][t][n].length;i++)if(d[e.id][t][n][i]===r){d[e.id][t][n].splice(i,1);break}}else for(var o in d[e.id])d[e.id].hasOwnProperty(o)&&(d[e.id][o]={})}function a(e,t,n){if(d[e][n]){var r,o,s=t.target||t.srcElement,a={},c=0,f=0;l=0;for(r in d[e][n])d[e][n].hasOwnProperty(r)&&(o=i(s,r,m[e].element),o&&u.matchesEvent(n,m[e].element,o,"_root"==r,t)&&(l++,d[e][n][r].match=o,a[l]=d[e][n][r]));for(t.stopPropagation=function(){t.cancelBubble=!0},c=0;c<=l;c++)if(a[c])for(f=0;f<a[c].length;f++){if(a[c][f].call(a[c].match,t)===!1)return void u.cancel(t);if(t.cancelBubble)return}}}function c(e,t,n,r){function i(e){return function(t){a(f,t,e)}}if(this.element){e instanceof Array||(e=[e]),n||"function"!=typeof t||(n=t,t="_root");var c,f=this.id;for(c=0;c<e.length;c++)r?s(this,e[c],t,n):(d[f]&&d[f][e[c]]||u.addEvent(this,e[c],i(e[c])),o(this,e[c],t,n));return this}}function u(e,t){if(!(this instanceof u)){for(var n in m)if(m[n].element===e)return m[n];return h++,m[h]=new u(e,h),m[h]}this.element=e,this.id=t}var f,l=0,h=0,d={},m={};u.prototype.on=function(e,t,n){return c.call(this,e,t,n)},u.prototype.off=function(e,t,n){return c.call(this,e,t,n,!0)},u.matchesSelector=function(){},u.cancel=n,u.addEvent=e,u.matchesEvent=function(){return!0},"undefined"!=typeof t&&t.exports&&(t.exports=u),window.Gator=u}()},{}],7:[function(e,n,r){!function(e){var r=function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){var o=i,s=t[i];if("undefined"!=typeof n&&(o=n+"["+i+"]"),s.constructor===Array)o+="[]";else if("object"==typeof s){r(e,s,o);continue}var a=e.elements.namedItem(o);if(a){var c=a.type||a[0].type;switch(c){default:a.value=s;break;case"radio":case"checkbox":for(var u=0;u<a.length;u++)a[u].checked=s.indexOf(a[u].value)>-1;break;case"select-multiple":for(var f=s.constructor==Array?s:[s],l=0;l<a.options.length;l++)a.options[l].selected|=f.indexOf(a.options[l].value)>-1;break;case"select":case"select-one":a.value=s.toString()||s}}}};"function"==typeof t&&"object"==typeof t.amd&&t.amd?t(function(){return r}):"undefined"!=typeof n&&n.exports?n.exports=r:e.populate=r}(this)},{}],8:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=e.prototype,s=this,a=s.EventEmitter;o.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},o.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},o.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},o.addListener=function(e,t){var n,i=this.getListenersAsObject(e),o="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&r(i[n],t)===-1&&i[n].push(o?t:{listener:t,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,t){var n,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&(n=r(o[i],t),n!==-1&&o[i].splice(n,1));return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,n){var r,i,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)o.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?o.call(this,r,i):s.call(this,r,i));return this},o.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var n,r,i,o,s,a=this.getListenersAsObject(e);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=n.length;i--;)r=n[i],r.once===!0&&this.removeListener(e,r.listener),s=r.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},o._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return s.EventEmitter=a,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:s.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=forms-api.min.js.map
|
assets/js/forms-api.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-api.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","triggerFormEvents","form","action","errors","data","forms","trigger","handleFormRequest","setData","config","auto_scroll","animate","arg","behavior","element","scrollIntoView","window","addEventListener","mc4wp","Gator","listeners","mc4wp_forms_config","on","event","callback","document","body","getByElement","target","srcElement","started","submitted_form","formConfig","getElementById","element_id","./forms/forms.js","gator","2","serialize","populate","formToJson","Form","id","this","createElement","name","getAttribute","console","error","getData","getSerializedData","setResponse","msg","querySelector","innerHTML","reset","style","display","../third-party/form2js.js","../third-party/serialize.js","populate.js","3","get","formId","formElement","createFromElement","parseInt","push","all","events","args","off","EventEmitter","./form.js","wolfy87-eventemitter","4","root","factory","amd","form2js","rootNode","delimiter","skipEmpty","nodeCallback","useIdIfEmptyName","getDisabled","arguments","currNode","formValues","constructor","Array","NodeList","concat","getFormValues","processNameValues","nameValues","j","k","value","nameParts","currResult","arrNameFull","arrName","arrIdx","namePart","_nameParts","result","arrays","split","match","indexOf","substr","replace","test","extractNodeValues","getSubFormValues","currentNode","firstChild","nextSibling","node","disabled","callbackResult","fieldValue","fieldName","getFieldName","nodeName","getFieldValue","fieldNode","type","toLowerCase","checked","getSelectedOptionValue","selectNode","options","multiple","getElementsByTagName","selected","5","hash","serializer","hash_serializer","str_serialize","elements","radio_store","Object","create","k_r_success_contrls","k_r_submitter","key","val","empty","selectOptions","isSelectedOptions","option","allowedEmpty","hasValue","slice","parse_keys","string","keys","prefix","children","RegExp","brackets","exec","hash_assign","shift","between","isArray","_values","index","isNaN","matches","existing","encodeURIComponent","6","_addEvent","useCapture","_cancel","preventDefault","stopPropagation","_getMatcher","_matcher","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","matchesSelector","_matchesSelector","selector","boundElement","parentNode","_level","_addHandler","_handlers","_removeHandler","splice","hasOwnProperty","_handleEvent","_gatorInstances","matchesEvent","cancelBubble","cancel","_bind","remove","_getGlobalCallback","addEvent","_id","prototype","7","basename","namedItem","values","toString","8","indexOfListener","listener","alias","apply","proto","originalGlobalValue","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","addListeners","manipulateListeners","removeListeners","single","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,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,eAAejD,GAI5B,IAHAhI,EAAYgO,EAAahG,GAAKQ,MAAM,GACpCtK,EAAI8B,EAAUvB,OAEPP,KAGHkO,EAAWpM,EAAU9B,GAEjBkO,EAASc,QAAS,GAClB3L,KAAKgM,eAAeb,EAAKN,EAASA,UAGtCO,EAAWP,EAASA,SAASE,MAAM/K,KAAM2B,OAErCyJ,IAAapL,KAAK0M,uBAClB1M,KAAKgM,eAAeb,EAAKN,EAASA,SAMlD,OAAO7K,OAMXgL,EAAMrN,QAAUmN,EAAM,aAUtBE,EAAM2B,KAAO,SAAcxB,GACvB,GAAIxJ,GAAOoB,MAAMsH,UAAUpD,MAAMhK,KAAK0F,UAAW,EACjD,OAAO3C,MAAKwM,UAAUrB,EAAKxJ,IAW/BqJ,EAAM4B,mBAAqB,SAA4BrJ,GAEnD,MADAvD,MAAK6M,iBAAmBtJ,EACjBvD,MAWXgL,EAAM0B,oBAAsB,WACxB,OAAI1M,KAAK0J,eAAe,qBACb1J,KAAK6M,kBAapB7B,EAAMK,WAAa,WACf,MAAOrL,MAAKsM,UAAYtM,KAAKsM,aAQjCzK,EAAaiL,WAAa,WAEtB,MADA9P,GAAQ6E,aAAeoJ,EAChBpJ,GAIW,kBAAX3F,IAAyBA,EAAOiG,IACvCjG,EAAO,WACH,MAAO2F,KAGY,gBAAXzE,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAU6E,EAGjB7E,EAAQ6E,aAAeA,IAE7B5E,KAAK+C,gBAEI","file":"forms-api.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar mc4wp = window.mc4wp || {};\n\n// bail early if we're on IE8..\n// TODO: just don't load in IE8\nif( ! window.addEventListener ) {\n\treturn;\n}\n\n// deps & vars\nvar Gator = require('gator');\nvar forms = require('./forms/forms.js');\nvar listeners = window.mc4wp && window.mc4wp.listeners ? window.mc4wp.listeners : [];\nvar config = window.mc4wp_forms_config || {};\n\n// funcs\nfunction triggerFormEvents(form, action, errors, data) {\n\n\t// trigger events\n\tforms.trigger( 'submitted', [form]);\n\n\tif( errors ) {\n\t\tforms.trigger('error', [form, errors]);\n\t} else {\n\t\t// form was successfully submitted\n\t\tforms.trigger('success', [form, data]);\n\t\tforms.trigger(action + \"d\", [form, data]);\n\t}\n}\n\nfunction handleFormRequest(form, action, errors, data){\n\n\t// re-populate form\n\tif( errors ) {\n\t\tform.setData(data);\n\t}\n\n\tif( config.auto_scroll ) {\n\t\tvar animate = ( config.auto_scroll === 'animated' );\n\t\tvar arg = animate ? { behavior: 'smooth' } : false;\n\t\tform.element.scrollIntoView(arg);\n\t}\n\n\t// trigger events on window.load so all other scripts have loaded\n\twindow.addEventListener('load', function(){\n\t\ttriggerFormEvents(form, action, errors, data);\n\t});\n}\n\n// register early listeners\nfor(var i=0; i<listeners.length;i++) {\n\tforms.on(listeners[i].event, listeners[i].callback);\n}\n\n// Bind browser events to form events (using delegation to work with AJAX loaded forms as well)\nGator(document.body).on('submit', '.mc4wp-form', function(event) {\n\tevent = event || window.event;\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\tforms.trigger('submit', [form, event]);\n});\n\nGator(document.body).on('focus', '.mc4wp-form', function(event) {\n\tevent = event || window.event;\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\n\tif( ! form.started ) {\n\t\tforms.trigger('started', [form, event]);\n\t\tform.started = true;\n\t}\n});\n\nGator(document.body).on('change', '.mc4wp-form', function(event) {\n\tevent = event || window.event;\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\tforms.trigger('change', [form,event]);\n});\n\nif( config.submitted_form ) {\n\tvar formConfig = config.submitted_form,\n\t\telement = document.getElementById(formConfig.element_id),\n\t\tform = forms.getByElement(element);\n\n\thandleFormRequest(form, formConfig.action, formConfig.errors, formConfig.data);\n}\n\n// expose forms object\nmc4wp.forms = forms;\nwindow.mc4wp = mc4wp;\n\n},{\"./forms/forms.js\":3,\"gator\":6}],2:[function(require,module,exports){\n'use strict';\n\nvar serialize = require('../third-party/serialize.js');\nvar populate = require('populate.js');\nvar formToJson = require('../third-party/form2js.js');\n\nvar Form = function(id, element) {\n\n\tvar form = this;\n\n\tthis.id = id;\n\tthis.element = element || document.createElement('form');\n\tthis.name = this.element.getAttribute('data-name') || \"Form #\" + this.id;\n\tthis.errors = [];\n\tthis.started = false;\n\n\tthis.setData = function(data) {\n\t\ttry {\n\t\t\tpopulate(form.element, data);\n\t\t} catch(e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\tthis.getData = function() {\n\t\treturn formToJson(form.element);\n\t};\n\n\tthis.getSerializedData = function() {\n\t\treturn serialize(form.element);\n\t};\n\n\tthis.setResponse = function( msg ) {\n\t\tform.element.querySelector('.mc4wp-response').innerHTML = msg;\n\t};\n\n\t// revert back to original state\n\tthis.reset = function() {\n\t\tthis.setResponse('');\n\t\tform.element.querySelector('.mc4wp-form-fields').style.display = '';\n\t\tform.element.reset();\n\t}\n\n};\n\nmodule.exports = Form;\n\n},{\"../third-party/form2js.js\":4,\"../third-party/serialize.js\":5,\"populate.js\":7}],3:[function(require,module,exports){\n'use strict';\n\n// deps\nvar EventEmitter = require('wolfy87-eventemitter');\nvar Form = require('./form.js');\n\n// variables\nvar events = new EventEmitter();\nvar forms = [];\n\n// get form by its id\n// please note that this will get the FIRST occurence of the form with that ID on the page\nfunction get(formId) {\n\n\t// do we have form for this one already?\n\tfor(var i=0; i<forms.length;i++) {\n\t\tif(forms[i].id == formId) {\n\t\t\treturn forms[i];\n\t\t}\n\t}\n\n\t// try to create from first occurence of this element\n\tvar formElement = document.querySelector('.mc4wp-form-' + formId);\n\treturn createFromElement(formElement,formId);\n}\n\n// get form by <form> element (or any input in form)\nfunction getByElement(element) {\n\tvar formElement = element.form || element;\n\n\tfor(var i=0; i < forms.length; i++) {\n\t\tif(forms[i].element == formElement) {\n\t\t\treturn forms[i];\n\t\t}\n\t}\n\n\treturn createFromElement(formElement);\n}\n\n// create form object from <form> element\nfunction createFromElement(formElement, id) {\n\tid = id || parseInt( formElement.getAttribute('data-id') ) || 0;\n\tvar form = new Form(id, formElement);\n\tforms.push(form);\n\treturn form;\n}\n\nfunction all() {\n\treturn forms;\n}\n\nfunction on(event,callback) {\n\treturn events.on(event,callback);\n}\n\nfunction trigger(event,args) {\n\treturn events.trigger(event,args);\n}\n\nfunction off(event,callback) {\n\treturn events.off(event,callback);\n}\n\nmodule.exports = {\n\t\"all\": all,\n\t\"get\": get,\n\t\"getByElement\": getByElement,\n\t\"on\": on,\n\t\"trigger\": trigger,\n\t\"off\": off\n};\n\n\n},{\"./form.js\":2,\"wolfy87-eventemitter\":8}],4:[function(require,module,exports){\n/**\n * Copyright (c) 2010 Maxim Vasiliev\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * @author Maxim Vasiliev\n * Date: 09.09.2010\n * Time: 19:02:33\n */\n\n\n(function (root, factory)\n{\n\tif (typeof exports !== 'undefined' && typeof module !== 'undefined' && module.exports) {\n\t\t// NodeJS\n\t\tmodule.exports = factory();\n\t}\n\telse if (typeof define === 'function' && define.amd)\n\t{\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(factory);\n\t}\n\telse\n\t{\n\t\t// Browser globals\n\t\troot.form2js = factory();\n\t}\n}(this, function ()\n{\n\t\"use strict\";\n\n\t/**\n\t * Returns form values represented as Javascript object\n\t * \"name\" attribute defines structure of resulting object\n\t *\n\t * @param rootNode {Element|String} root form element (or it's id) or array of root elements\n\t * @param delimiter {String} structure parts delimiter defaults to '.'\n\t * @param skipEmpty {Boolean} should skip empty text values, defaults to true\n\t * @param nodeCallback {Function} custom function to get node value\n\t * @param useIdIfEmptyName {Boolean} if true value of id attribute of field will be used if name of field is empty\n\t */\n\tfunction form2js(rootNode, delimiter, skipEmpty, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tgetDisabled = getDisabled ? true : false;\n\t\tif (typeof skipEmpty == 'undefined' || skipEmpty == null) skipEmpty = true;\n\t\tif (typeof delimiter == 'undefined' || delimiter == null) delimiter = '.';\n\t\tif (arguments.length < 5) useIdIfEmptyName = false;\n\n\t\trootNode = typeof rootNode == 'string' ? document.getElementById(rootNode) : rootNode;\n\n\t\tvar formValues = [],\n\t\t\tcurrNode,\n\t\t\ti = 0;\n\n\t\t/* If rootNode is array - combine values */\n\t\tif (rootNode.constructor == Array || (typeof NodeList != \"undefined\" && rootNode.constructor == NodeList))\n\t\t{\n\t\t\twhile(currNode = rootNode[i++])\n\t\t\t{\n\t\t\t\tformValues = formValues.concat(getFormValues(currNode, nodeCallback, useIdIfEmptyName, getDisabled));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tformValues = getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\t}\n\n\t\treturn processNameValues(formValues, skipEmpty, delimiter);\n\t}\n\n\t/**\n\t * Processes collection of { name: 'name', value: 'value' } objects.\n\t * @param nameValues\n\t * @param skipEmpty if true skips elements with value == '' or value == null\n\t * @param delimiter\n\t */\n\tfunction processNameValues(nameValues, skipEmpty, delimiter)\n\t{\n\t\tvar result = {},\n\t\t\tarrays = {},\n\t\t\ti, j, k, l,\n\t\t\tvalue,\n\t\t\tnameParts,\n\t\t\tcurrResult,\n\t\t\tarrNameFull,\n\t\t\tarrName,\n\t\t\tarrIdx,\n\t\t\tnamePart,\n\t\t\tname,\n\t\t\t_nameParts;\n\n\t\tfor (i = 0; i < nameValues.length; i++)\n\t\t{\n\t\t\tvalue = nameValues[i].value;\n\n\t\t\tif (skipEmpty && (value === '' || value === null)) continue;\n\n\t\t\tname = nameValues[i].name;\n\t\t\t_nameParts = name.split(delimiter);\n\t\t\tnameParts = [];\n\t\t\tcurrResult = result;\n\t\t\tarrNameFull = '';\n\n\t\t\tfor(j = 0; j < _nameParts.length; j++)\n\t\t\t{\n\t\t\t\tnamePart = _nameParts[j].split('][');\n\t\t\t\tif (namePart.length > 1)\n\t\t\t\t{\n\t\t\t\t\tfor(k = 0; k < namePart.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (k == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = namePart[k] + ']';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k == namePart.length - 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = '[' + namePart[k];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = '[' + namePart[k] + ']';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarrIdx = namePart[k].match(/([a-z_]+)?\\[([a-z_][a-z0-9_]+?)\\]/i);\n\t\t\t\t\t\tif (arrIdx)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(l = 1; l < arrIdx.length; l++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (arrIdx[l]) nameParts.push(arrIdx[l]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tnameParts.push(namePart[k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tnameParts = nameParts.concat(namePart);\n\t\t\t}\n\n\t\t\tfor (j = 0; j < nameParts.length; j++)\n\t\t\t{\n\t\t\t\tnamePart = nameParts[j];\n\n\t\t\t\tif (namePart.indexOf('[]') > -1 && j == nameParts.length - 1)\n\t\t\t\t{\n\t\t\t\t\tarrName = namePart.substr(0, namePart.indexOf('['));\n\t\t\t\t\tarrNameFull += arrName;\n\n\t\t\t\t\tif (!currResult[arrName]) currResult[arrName] = [];\n\t\t\t\t\tcurrResult[arrName].push(value);\n\t\t\t\t}\n\t\t\t\telse if (namePart.indexOf('[') > -1)\n\t\t\t\t{\n\t\t\t\t\tarrName = namePart.substr(0, namePart.indexOf('['));\n\t\t\t\t\tarrIdx = namePart.replace(/(^([a-z_]+)?\\[)|(\\]$)/gi, '');\n\n\t\t\t\t\t/* Unique array name */\n\t\t\t\t\tarrNameFull += '_' + arrName + '_' + arrIdx;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Because arrIdx in field name can be not zero-based and step can be\n\t\t\t\t\t * other than 1, we can't use them in target array directly.\n\t\t\t\t\t * Instead we're making a hash where key is arrIdx and value is a reference to\n\t\t\t\t\t * added array element\n\t\t\t\t\t */\n\n\t\t\t\t\tif (!arrays[arrNameFull]) arrays[arrNameFull] = {};\n\t\t\t\t\tif (arrName != '' && !currResult[arrName]) currResult[arrName] = [];\n\n\t\t\t\t\tif (j == nameParts.length - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (arrName == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrResult.push(value);\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[currResult.length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrResult[arrName].push(value);\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!arrays[arrNameFull][arrIdx])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((/^[0-9a-z_]+\\[?/i).test(nameParts[j+1])) currResult[arrName].push({});\n\t\t\t\t\t\t\telse currResult[arrName].push([]);\n\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrResult = arrays[arrNameFull][arrIdx];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarrNameFull += namePart;\n\n\t\t\t\t\tif (j < nameParts.length - 1) /* Not the last part of name - means object */\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!currResult[namePart]) currResult[namePart] = {};\n\t\t\t\t\t\tcurrResult = currResult[namePart];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrResult[namePart] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tvar result = extractNodeValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\treturn result.length > 0 ? result : getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t}\n\n\tfunction getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tvar result = [],\n\t\t\tcurrentNode = rootNode.firstChild;\n\n\t\twhile (currentNode)\n\t\t{\n\t\t\tresult = result.concat(extractNodeValues(currentNode, nodeCallback, useIdIfEmptyName, getDisabled));\n\t\t\tcurrentNode = currentNode.nextSibling;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction extractNodeValues(node, nodeCallback, useIdIfEmptyName, getDisabled) {\n\t\tif (node.disabled && !getDisabled) return [];\n\n\t\tvar callbackResult, fieldValue, result, fieldName = getFieldName(node, useIdIfEmptyName);\n\n\t\tcallbackResult = nodeCallback && nodeCallback(node);\n\n\t\tif (callbackResult && callbackResult.name) {\n\t\t\tresult = [callbackResult];\n\t\t}\n\t\telse if (fieldName != '' && node.nodeName.match(/INPUT|TEXTAREA/i)) {\n\t\t\tfieldValue = getFieldValue(node, getDisabled);\n\t\t\tif (null === fieldValue) {\n\t\t\t\tresult = [];\n\t\t\t} else {\n\t\t\t\tresult = [ { name: fieldName, value: fieldValue} ];\n\t\t\t}\n\t\t}\n\t\telse if (fieldName != '' && node.nodeName.match(/SELECT/i)) {\n\t\t\tfieldValue = getFieldValue(node, getDisabled);\n\t\t\tresult = [ { name: fieldName.replace(/\\[\\]$/, ''), value: fieldValue } ];\n\t\t}\n\t\telse {\n\t\t\tresult = getSubFormValues(node, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction getFieldName(node, useIdIfEmptyName)\n\t{\n\t\tif (node.name && node.name != '') return node.name;\n\t\telse if (useIdIfEmptyName && node.id && node.id != '') return node.id;\n\t\telse return '';\n\t}\n\n\n\tfunction getFieldValue(fieldNode, getDisabled)\n\t{\n\t\tif (fieldNode.disabled && !getDisabled) return null;\n\n\t\tswitch (fieldNode.nodeName) {\n\t\t\tcase 'INPUT':\n\t\t\tcase 'TEXTAREA':\n\t\t\t\tswitch (fieldNode.type.toLowerCase()) {\n\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\tif (fieldNode.checked && fieldNode.value === \"false\") return false;\n\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\tif (fieldNode.checked && fieldNode.value === \"true\") return true;\n\t\t\t\t\t\tif (!fieldNode.checked && fieldNode.value === \"true\") return false;\n\t\t\t\t\t\tif (fieldNode.checked) return fieldNode.value;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'button':\n\t\t\t\t\tcase 'reset':\n\t\t\t\t\tcase 'submit':\n\t\t\t\t\tcase 'image':\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn fieldNode.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'SELECT':\n\t\t\t\treturn getSelectedOptionValue(fieldNode);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getSelectedOptionValue(selectNode)\n\t{\n\t\tvar multiple = selectNode.multiple,\n\t\t\tresult = [],\n\t\t\toptions,\n\t\t\ti, l;\n\n\t\tif (!multiple) return selectNode.value;\n\n\t\tfor (options = selectNode.getElementsByTagName(\"option\"), i = 0, l = options.length; i < l; i++)\n\t\t{\n\t\t\tif (options[i].selected) result.push(options[i].value);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\treturn form2js;\n\n}));\n},{}],5:[function(require,module,exports){\n// get successful control from form and assemble into object\n// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nfunction serialize(form, options) {\n\tif (typeof options != 'object') {\n\t\toptions = { hash: !!options };\n\t}\n\telse if (options.hash === undefined) {\n\t\toptions.hash = true;\n\t}\n\n\tvar result = (options.hash) ? {} : '';\n\tvar serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n\tvar elements = form && form.elements ? form.elements : [];\n\n\t//Object store each radio and set if it's empty or not\n\tvar radio_store = Object.create(null);\n\n\tfor (var i=0 ; i<elements.length ; ++i) {\n\t\tvar element = elements[i];\n\n\t\t// ingore disabled fields\n\t\tif ((!options.disabled && element.disabled) || !element.name) {\n\t\t\tcontinue;\n\t\t}\n\t\t// ignore anyhting that is not considered a success field\n\t\tif (!k_r_success_contrls.test(element.nodeName) ||\n\t\t\tk_r_submitter.test(element.type)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar key = element.name;\n\t\tvar val = element.value;\n\n\t\t// we can't just use element.value for checkboxes cause some browsers lie to us\n\t\t// they say \"on\" for value when the box isn't checked\n\t\tif ((element.type === 'checkbox' || element.type === 'radio') && !element.checked) {\n\t\t\tval = undefined;\n\t\t}\n\n\t\t// If we want empty elements\n\t\tif (options.empty) {\n\t\t\t// for checkbox\n\t\t\tif (element.type === 'checkbox' && !element.checked) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t\t// for radio\n\t\t\tif (element.type === 'radio') {\n\t\t\t\tif (!radio_store[element.name] && !element.checked) {\n\t\t\t\t\tradio_store[element.name] = false;\n\t\t\t\t}\n\t\t\t\telse if (element.checked) {\n\t\t\t\t\tradio_store[element.name] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if options empty is true, continue only if its radio\n\t\t\tif (!val && element.type == 'radio') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// value-less fields are ignored unless options.empty is true\n\t\t\tif (!val) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// multi select boxes\n\t\tif (element.type === 'select-multiple') {\n\t\t\tval = [];\n\n\t\t\tvar selectOptions = element.options;\n\t\t\tvar isSelectedOptions = false;\n\t\t\tfor (var j=0 ; j<selectOptions.length ; ++j) {\n\t\t\t\tvar option = selectOptions[j];\n\t\t\t\tvar allowedEmpty = options.empty && !option.value;\n\t\t\t\tvar hasValue = (option.value || allowedEmpty);\n\t\t\t\tif (option.selected && hasValue) {\n\t\t\t\t\tisSelectedOptions = true;\n\n\t\t\t\t\t// If using a hash serializer be sure to add the\n\t\t\t\t\t// correct notation for an array in the multi-select\n\t\t\t\t\t// context. Here the name attribute on the select element\n\t\t\t\t\t// might be missing the trailing bracket pair. Both names\n\t\t\t\t\t// \"foo\" and \"foo[]\" should be arrays.\n\t\t\t\t\tif (options.hash && key.slice(key.length - 2) !== '[]') {\n\t\t\t\t\t\tresult = serializer(result, key + '[]', option.value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult = serializer(result, key, option.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Serialize if no selected options and options.empty is true\n\t\t\tif (!isSelectedOptions && options.empty) {\n\t\t\t\tresult = serializer(result, key, '');\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tresult = serializer(result, key, val);\n\t}\n\n\t// Check for all empty radio buttons and serialize them with key=\"\"\n\tif (options.empty) {\n\t\tfor (var key in radio_store) {\n\t\t\tif (!radio_store[key]) {\n\t\t\t\tresult = serializer(result, key, '');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction parse_keys(string) {\n\tvar keys = [];\n\tvar prefix = /^([^\\[\\]]*)/;\n\tvar children = new RegExp(brackets);\n\tvar match = prefix.exec(string);\n\n\tif (match[1]) {\n\t\tkeys.push(match[1]);\n\t}\n\n\twhile ((match = children.exec(string)) !== null) {\n\t\tkeys.push(match[1]);\n\t}\n\n\treturn keys;\n}\n\nfunction hash_assign(result, keys, value) {\n\tif (keys.length === 0) {\n\t\tresult = value;\n\t\treturn result;\n\t}\n\n\tvar key = keys.shift();\n\tvar between = key.match(/^\\[(.+?)\\]$/);\n\n\tif (key === '[]') {\n\t\tresult = result || [];\n\n\t\tif (Array.isArray(result)) {\n\t\t\tresult.push(hash_assign(null, keys, value));\n\t\t}\n\t\telse {\n\t\t\t// This might be the result of bad name attributes like \"[][foo]\",\n\t\t\t// in this case the original `result` object will already be\n\t\t\t// assigned to an object literal. Rather than coerce the object to\n\t\t\t// an array, or cause an exception the attribute \"_values\" is\n\t\t\t// assigned as an array.\n\t\t\tresult._values = result._values || [];\n\t\t\tresult._values.push(hash_assign(null, keys, value));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Key is an attribute name and can be assigned directly.\n\tif (!between) {\n\t\tresult[key] = hash_assign(result[key], keys, value);\n\t}\n\telse {\n\t\tvar string = between[1];\n\t\tvar index = parseInt(string, 10);\n\n\t\t// If the characters between the brackets is not a number it is an\n\t\t// attribute name and can be assigned directly.\n\t\tif (isNaN(index)) {\n\t\t\tresult = result || {};\n\t\t\tresult[string] = hash_assign(result[string], keys, value);\n\t\t}\n\t\telse {\n\t\t\tresult = result || [];\n\t\t\tresult[index] = hash_assign(result[index], keys, value);\n\t\t}\n\t}\n\n\treturn result;\n}\n\n// Object/hash encoding serializer.\nfunction hash_serializer(result, key, value) {\n\tvar matches = key.match(brackets);\n\n\t// Has brackets? Use the recursive assignment function to walk the keys,\n\t// construct any missing objects in the result tree and make the assignment\n\t// at the end of the chain.\n\tif (matches) {\n\t\tvar keys = parse_keys(key);\n\t\thash_assign(result, keys, value);\n\t}\n\telse {\n\t\t// Non bracket notation can make assignments directly.\n\t\tvar existing = result[key];\n\n\t\t// If the value has been assigned already (for instance when a radio and\n\t\t// a checkbox have the same name attribute) convert the previous value\n\t\t// into an array before pushing into it.\n\t\t//\n\t\t// NOTE: If this requirement were removed all hash creation and\n\t\t// assignment could go through `hash_assign`.\n\t\tif (existing) {\n\t\t\tif (!Array.isArray(existing)) {\n\t\t\t\tresult[key] = [ existing ];\n\t\t\t}\n\n\t\t\tresult[key].push(value);\n\t\t}\n\t\telse {\n\t\t\tresult[key] = value;\n\t\t}\n\t}\n\n\treturn result;\n}\n\n// urlform encoding serializer\nfunction str_serialize(result, key, value) {\n\t// encode newlines as \\r\\n cause the html spec says so\n\tvalue = value.replace(/(\\r)?\\n/g, '\\r\\n');\n\tvalue = encodeURIComponent(value);\n\n\t// spaces should be '+' rather than '%20'.\n\tvalue = value.replace(/%20/g, '+');\n\treturn result + (result ? '&' : '') + encodeURIComponent(key) + '=' + value;\n}\n\nmodule.exports = serialize;\n},{}],6:[function(require,module,exports){\n/**\n * Copyright 2014 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * GATOR.JS\n * Simple Event Delegation\n *\n * @version 1.2.4\n *\n * Compatible with IE 9+, FF 3.6+, Safari 5+, Chrome\n *\n * Include legacy.js for compatibility with older browsers\n *\n * .-._ _ _ _ _ _ _ _ _\n * .-''-.__.-'00 '-' ' ' ' ' ' ' ' '-.\n * '.___ ' . .--_'-' '-' '-' _'-' '._\n * V: V 'vv-' '_ '. .' _..' '.'.\n * '=.____.=_.--' :_.__.__:_ '. : :\n * (((____.-' '-. / : :\n * (((-'\\ .' /\n * _____..' .'\n * '-._____.-'\n */\n(function() {\n var _matcher,\n _level = 0,\n _id = 0,\n _handlers = {},\n _gatorInstances = {};\n\n function _addEvent(gator, type, callback) {\n\n // blur and focus do not bubble up but if you use event capturing\n // then you will get them\n var useCapture = type == 'blur' || type == 'focus';\n gator.element.addEventListener(type, callback, useCapture);\n }\n\n function _cancel(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n /**\n * returns function to use for determining if an element\n * matches a query selector\n *\n * @returns {Function}\n */\n function _getMatcher(element) {\n if (_matcher) {\n return _matcher;\n }\n\n if (element.matches) {\n _matcher = element.matches;\n return _matcher;\n }\n\n if (element.webkitMatchesSelector) {\n _matcher = element.webkitMatchesSelector;\n return _matcher;\n }\n\n if (element.mozMatchesSelector) {\n _matcher = element.mozMatchesSelector;\n return _matcher;\n }\n\n if (element.msMatchesSelector) {\n _matcher = element.msMatchesSelector;\n return _matcher;\n }\n\n if (element.oMatchesSelector) {\n _matcher = element.oMatchesSelector;\n return _matcher;\n }\n\n // if it doesn't match a native browser method\n // fall back to the gator function\n _matcher = Gator.matchesSelector;\n return _matcher;\n }\n\n /**\n * determines if the specified element matches a given selector\n *\n * @param {Node} element - the element to compare against the selector\n * @param {string} selector\n * @param {Node} boundElement - the element the listener was attached to\n * @returns {void|Node}\n */\n function _matchesSelector(element, selector, boundElement) {\n\n // no selector means this event was bound directly to this element\n if (selector == '_root') {\n return boundElement;\n }\n\n // if we have moved up to the element you bound the event to\n // then we have come too far\n if (element === boundElement) {\n return;\n }\n\n // if this is a match then we are done!\n if (_getMatcher(element).call(element, selector)) {\n return element;\n }\n\n // if this element did not match but has a parent we should try\n // going up the tree to see if any of the parent elements match\n // for example if you are looking for a click on an <a> tag but there\n // is a <span> inside of the a tag that it is the target,\n // it should still work\n if (element.parentNode) {\n _level++;\n return _matchesSelector(element.parentNode, selector, boundElement);\n }\n }\n\n function _addHandler(gator, event, selector, callback) {\n if (!_handlers[gator.id]) {\n _handlers[gator.id] = {};\n }\n\n if (!_handlers[gator.id][event]) {\n _handlers[gator.id][event] = {};\n }\n\n if (!_handlers[gator.id][event][selector]) {\n _handlers[gator.id][event][selector] = [];\n }\n\n _handlers[gator.id][event][selector].push(callback);\n }\n\n function _removeHandler(gator, event, selector, callback) {\n\n // if there are no events tied to this element at all\n // then don't do anything\n if (!_handlers[gator.id]) {\n return;\n }\n\n // if there is no event type specified then remove all events\n // example: Gator(element).off()\n if (!event) {\n for (var type in _handlers[gator.id]) {\n if (_handlers[gator.id].hasOwnProperty(type)) {\n _handlers[gator.id][type] = {};\n }\n }\n return;\n }\n\n // if no callback or selector is specified remove all events of this type\n // example: Gator(element).off('click')\n if (!callback && !selector) {\n _handlers[gator.id][event] = {};\n return;\n }\n\n // if a selector is specified but no callback remove all events\n // for this selector\n // example: Gator(element).off('click', '.sub-element')\n if (!callback) {\n delete _handlers[gator.id][event][selector];\n return;\n }\n\n // if we have specified an event type, selector, and callback then we\n // need to make sure there are callbacks tied to this selector to\n // begin with. if there aren't then we can stop here\n if (!_handlers[gator.id][event][selector]) {\n return;\n }\n\n // if there are then loop through all the callbacks and if we find\n // one that matches remove it from the array\n for (var i = 0; i < _handlers[gator.id][event][selector].length; i++) {\n if (_handlers[gator.id][event][selector][i] === callback) {\n _handlers[gator.id][event][selector].splice(i, 1);\n break;\n }\n }\n }\n\n function _handleEvent(id, e, type) {\n if (!_handlers[id][type]) {\n return;\n }\n\n var target = e.target || e.srcElement,\n selector,\n match,\n matches = {},\n i = 0,\n j = 0;\n\n // find all events that match\n _level = 0;\n for (selector in _handlers[id][type]) {\n if (_handlers[id][type].hasOwnProperty(selector)) {\n match = _matchesSelector(target, selector, _gatorInstances[id].element);\n\n if (match && Gator.matchesEvent(type, _gatorInstances[id].element, match, selector == '_root', e)) {\n _level++;\n _handlers[id][type][selector].match = match;\n matches[_level] = _handlers[id][type][selector];\n }\n }\n }\n\n // stopPropagation() fails to set cancelBubble to true in Webkit\n // @see http://code.google.com/p/chromium/issues/detail?id=162270\n e.stopPropagation = function() {\n e.cancelBubble = true;\n };\n\n for (i = 0; i <= _level; i++) {\n if (matches[i]) {\n for (j = 0; j < matches[i].length; j++) {\n if (matches[i][j].call(matches[i].match, e) === false) {\n Gator.cancel(e);\n return;\n }\n\n if (e.cancelBubble) {\n return;\n }\n }\n }\n }\n }\n\n /**\n * binds the specified events to the element\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @param {boolean=} remove\n * @returns {Object}\n */\n function _bind(events, selector, callback, remove) {\n\n // fail silently if you pass null or undefined as an alement\n // in the Gator constructor\n if (!this.element) {\n return;\n }\n\n if (!(events instanceof Array)) {\n events = [events];\n }\n\n if (!callback && typeof(selector) == 'function') {\n callback = selector;\n selector = '_root';\n }\n\n var id = this.id,\n i;\n\n function _getGlobalCallback(type) {\n return function(e) {\n _handleEvent(id, e, type);\n };\n }\n\n for (i = 0; i < events.length; i++) {\n if (remove) {\n _removeHandler(this, events[i], selector, callback);\n continue;\n }\n\n if (!_handlers[id] || !_handlers[id][events[i]]) {\n Gator.addEvent(this, events[i], _getGlobalCallback(events[i]));\n }\n\n _addHandler(this, events[i], selector, callback);\n }\n\n return this;\n }\n\n /**\n * Gator object constructor\n *\n * @param {Node} element\n */\n function Gator(element, id) {\n\n // called as function\n if (!(this instanceof Gator)) {\n // only keep one Gator instance per node to make sure that\n // we don't create a ton of new objects if you want to delegate\n // multiple events from the same node\n //\n // for example: Gator(document).on(...\n for (var key in _gatorInstances) {\n if (_gatorInstances[key].element === element) {\n return _gatorInstances[key];\n }\n }\n\n _id++;\n _gatorInstances[_id] = new Gator(element, _id);\n\n return _gatorInstances[_id];\n }\n\n this.element = element;\n this.id = id;\n }\n\n /**\n * adds an event\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @returns {Object}\n */\n Gator.prototype.on = function(events, selector, callback) {\n return _bind.call(this, events, selector, callback);\n };\n\n /**\n * removes an event\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @returns {Object}\n */\n Gator.prototype.off = function(events, selector, callback) {\n return _bind.call(this, events, selector, callback, true);\n };\n\n Gator.matchesSelector = function() {};\n Gator.cancel = _cancel;\n Gator.addEvent = _addEvent;\n Gator.matchesEvent = function() {\n return true;\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Gator;\n }\n\n window.Gator = Gator;\n}) ();\n\n},{}],7:[function(require,module,exports){\n/*! populate.js v1.0.2 by @dannyvankooten | MIT license */\n;(function(root) {\n\n\t/**\n\t * Populate form fields from a JSON object.\n\t *\n\t * @param form object The form element containing your input fields.\n\t * @param data array JSON data to populate the fields with.\n\t * @param basename string Optional basename which is added to `name` attributes\n\t */\n\tvar populate = function( form, data, basename) {\n\n\t\tfor(var key in data) {\n\n\t\t\tif( ! data.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar name = key;\n\t\t\tvar value = data[key];\n\n\t\t\t// handle array name attributes\n\t\t\tif(typeof(basename) !== \"undefined\") {\n\t\t\t\tname = basename + \"[\" + key + \"]\";\n\t\t\t}\n\n\t\t\tif(value.constructor === Array) {\n\t\t\t\tname += '[]';\n\t\t\t} else if(typeof value == \"object\") {\n\t\t\t\tpopulate( form, value, name);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// only proceed if element is set\n\t\t\tvar element = form.elements.namedItem( name );\n\t\t\tif( ! element ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar type = element.type || element[0].type;\n\n\t\t\tswitch(type ) {\n\t\t\t\tdefault:\n\t\t\t\t\telement.value = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tfor( var j=0; j < element.length; j++ ) {\n\t\t\t\t\t\telement[j].checked = ( value.indexOf(element[j].value) > -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'select-multiple':\n\t\t\t\t\tvar values = value.constructor == Array ? value : [value];\n\n\t\t\t\t\tfor(var k = 0; k < element.options.length; k++) {\n\t\t\t\t\t\telement.options[k].selected |= (values.indexOf(element.options[k].value) > -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'select':\n\t\t\t\tcase 'select-one':\n\t\t\t\t\telement.value = value.toString() || value;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t// Play nice with AMD, CommonJS or a plain global object.\n\tif ( typeof define == 'function' && typeof define.amd == 'object' && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn populate;\n\t\t});\n\t}\telse if ( typeof module !== 'undefined' && module.exports ) {\n\t\tmodule.exports = populate;\n\t} else {\n\t\troot.populate = populate;\n\t}\n\n}(this));\n},{}],8:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
1 |
+
{"version":3,"sources":["forms-api.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","scrollToForm","form","animate","config","auto_scroll","args","behavior","element","scrollIntoView","handleFormRequest","action","errors","data","pageHeight","document","body","clientHeight","timeStart","Date","now","setData","window","addEventListener","timeElapsed","forms","trigger","mc4wp","Gator","listeners","mc4wp_forms_config","on","event","callback","getByElement","target","srcElement","started","submitted_form","formConfig","getElementById","element_id","./forms/forms.js","gator","2","serialize","populate","formToJson","Form","id","this","createElement","name","getAttribute","console","error","getData","getSerializedData","setResponse","msg","querySelector","innerHTML","reset","style","display","../third-party/form2js.js","../third-party/serialize.js","populate.js","3","get","formId","formElement","createFromElement","parseInt","push","all","events","off","EventEmitter","./form.js","wolfy87-eventemitter","4","root","factory","amd","form2js","rootNode","delimiter","skipEmpty","nodeCallback","useIdIfEmptyName","getDisabled","arguments","currNode","formValues","constructor","Array","NodeList","concat","getFormValues","processNameValues","nameValues","j","k","value","nameParts","currResult","arrNameFull","arrName","arrIdx","namePart","_nameParts","result","arrays","split","match","indexOf","substr","replace","test","extractNodeValues","getSubFormValues","currentNode","firstChild","nextSibling","node","disabled","callbackResult","fieldValue","fieldName","getFieldName","nodeName","getFieldValue","fieldNode","type","toLowerCase","checked","getSelectedOptionValue","selectNode","options","multiple","getElementsByTagName","selected","5","hash","serializer","hash_serializer","str_serialize","elements","radio_store","Object","create","k_r_success_contrls","k_r_submitter","key","val","empty","selectOptions","isSelectedOptions","option","allowedEmpty","hasValue","slice","parse_keys","string","keys","prefix","children","RegExp","brackets","exec","hash_assign","shift","between","isArray","_values","index","isNaN","matches","existing","encodeURIComponent","6","_addEvent","useCapture","_cancel","preventDefault","stopPropagation","_getMatcher","_matcher","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","matchesSelector","_matchesSelector","selector","boundElement","parentNode","_level","_addHandler","_handlers","_removeHandler","splice","hasOwnProperty","_handleEvent","_gatorInstances","matchesEvent","cancelBubble","cancel","_bind","remove","_getGlobalCallback","addEvent","_id","prototype","7","basename","namedItem","values","toString","8","indexOfListener","listener","alias","apply","proto","originalGlobalValue","getListeners","evt","response","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","addListeners","manipulateListeners","removeListeners","single","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGQ,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ASE,MAAM9K,KAAM5C,OAErC+N,IAAanL,KAAKyM,uBAClBzM,KAAK+L,eAAeb,EAAKN,EAASA,SAMlD,OAAO5K,OAMX+K,EAAMvM,QAAUqM,EAAM,aAUtBE,EAAM2B,KAAO,SAAcxB,GACvB,GAAI9N,GAAO0F,MAAMsH,UAAUpD,MAAMrK,KAAK+F,UAAW,EACjD,OAAO1C,MAAKuM,UAAUrB,EAAK9N,IAW/B2N,EAAM4B,mBAAqB,SAA4BrJ,GAEnD,MADAtD,MAAK4M,iBAAmBtJ,EACjBtD,MAWX+K,EAAM0B,oBAAsB,WACxB,OAAIzM,KAAKyJ,eAAe,qBACbzJ,KAAK4M,kBAapB7B,EAAMK,WAAa,WACf,MAAOpL,MAAKqM,UAAYrM,KAAKqM,aAQjCzK,EAAaiL,WAAa,WAEtB,MADAnQ,GAAQkF,aAAeoJ,EAChBpJ,GAIW,kBAAXhG,IAAyBA,EAAOsG,IACvCtG,EAAO,WACH,MAAOgG,KAGY,gBAAX9E,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUkF,EAGjBlF,EAAQkF,aAAeA,IAE7BjF,KAAKqD,gBAEI","file":"forms-api.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar mc4wp = window.mc4wp || {};\n\n// bail early if we're on IE8..\n// TODO: just don't load in IE8\nif( ! window.addEventListener ) {\n\treturn;\n}\n\n// deps & vars\nvar Gator = require('gator');\nvar forms = require('./forms/forms.js');\nvar listeners = window.mc4wp && window.mc4wp.listeners ? window.mc4wp.listeners : [];\nvar config = window.mc4wp_forms_config || {};\n\n// funcs\nfunction scrollToForm(form) {\n\tvar animate = config.auto_scroll === 'animated';\n\tvar args = {\n\t\tbehavior: animate ? \"smooth\" : \"instant\"\n\t};\n\tform.element.scrollIntoView(args);\n}\n\nfunction handleFormRequest(form, action, errors, data){\n\n\tvar pageHeight = document.body.clientHeight;\n\tvar timeStart = Date.now();\n\n\t// re-populate form\n\tif( errors ) {\n\t\tform.setData(data);\n\t}\n\n\tif( config.auto_scroll ) {\n\t\tscrollToForm(form);\n\t}\n\n\t// trigger events on window.load so all other scripts have loaded\n\twindow.addEventListener('load', function() {\n\t\tvar timeElapsed = Date.now() - timeStart;\n\n\t\t// scroll to form again if page height changed since last scroll\n\t\t// (only if load didn't take more than 0.8 seconds to prevent overtaking user scroll)\n\t\tif( config.auto_scroll && timeElapsed < 800 && document.body.clientHeight != pageHeight ) {\n\t\t\tscrollToForm(form);\n\t\t}\n\n\t\t// trigger events\n\t\tforms.trigger( 'submitted', [form]);\n\n\t\tif( errors ) {\n\t\t\tforms.trigger('error', [form, errors]);\n\t\t} else {\n\t\t\t// form was successfully submitted\n\t\t\tforms.trigger('success', [form, data]);\n\t\t\tforms.trigger(action + \"d\", [form, data]);\n\t\t}\n\t});\n}\n\n// register early listeners\nfor(var i=0; i<listeners.length;i++) {\n\tforms.on(listeners[i].event, listeners[i].callback);\n}\n\n// Bind browser events to form events (using delegation)\nGator(document.body).on('submit', '.mc4wp-form', function(event) {\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\tforms.trigger('submit', [form, event]);\n});\n\nGator(document.body).on('focus', '.mc4wp-form', function(event) {\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\n\tif( ! form.started ) {\n\t\tforms.trigger('started', [form, event]);\n\t\tform.started = true;\n\t}\n});\n\nGator(document.body).on('change', '.mc4wp-form', function(event) {\n\tvar form = forms.getByElement(event.target || event.srcElement);\n\tforms.trigger('change', [form,event]);\n});\n\nif( config.submitted_form ) {\n\tvar formConfig = config.submitted_form,\n\t\telement = document.getElementById(formConfig.element_id),\n\t\tform = forms.getByElement(element);\n\n\thandleFormRequest(form, formConfig.action, formConfig.errors, formConfig.data);\n}\n\n// expose forms object\nmc4wp.forms = forms;\nwindow.mc4wp = mc4wp;\n\n},{\"./forms/forms.js\":3,\"gator\":6}],2:[function(require,module,exports){\n'use strict';\n\nvar serialize = require('../third-party/serialize.js');\nvar populate = require('populate.js');\nvar formToJson = require('../third-party/form2js.js');\n\nvar Form = function(id, element) {\n\n\tvar form = this;\n\n\tthis.id = id;\n\tthis.element = element || document.createElement('form');\n\tthis.name = this.element.getAttribute('data-name') || \"Form #\" + this.id;\n\tthis.errors = [];\n\tthis.started = false;\n\n\tthis.setData = function(data) {\n\t\ttry {\n\t\t\tpopulate(form.element, data);\n\t\t} catch(e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t};\n\n\tthis.getData = function() {\n\t\treturn formToJson(form.element);\n\t};\n\n\tthis.getSerializedData = function() {\n\t\treturn serialize(form.element);\n\t};\n\n\tthis.setResponse = function( msg ) {\n\t\tform.element.querySelector('.mc4wp-response').innerHTML = msg;\n\t};\n\n\t// revert back to original state\n\tthis.reset = function() {\n\t\tthis.setResponse('');\n\t\tform.element.querySelector('.mc4wp-form-fields').style.display = '';\n\t\tform.element.reset();\n\t}\n\n};\n\nmodule.exports = Form;\n\n},{\"../third-party/form2js.js\":4,\"../third-party/serialize.js\":5,\"populate.js\":7}],3:[function(require,module,exports){\n'use strict';\n\n// deps\nvar EventEmitter = require('wolfy87-eventemitter');\nvar Form = require('./form.js');\n\n// variables\nvar events = new EventEmitter();\nvar forms = [];\n\n// get form by its id\n// please note that this will get the FIRST occurence of the form with that ID on the page\nfunction get(formId) {\n\n\t// do we have form for this one already?\n\tfor(var i=0; i<forms.length;i++) {\n\t\tif(forms[i].id == formId) {\n\t\t\treturn forms[i];\n\t\t}\n\t}\n\n\t// try to create from first occurence of this element\n\tvar formElement = document.querySelector('.mc4wp-form-' + formId);\n\treturn createFromElement(formElement,formId);\n}\n\n// get form by <form> element (or any input in form)\nfunction getByElement(element) {\n\tvar formElement = element.form || element;\n\n\tfor(var i=0; i < forms.length; i++) {\n\t\tif(forms[i].element == formElement) {\n\t\t\treturn forms[i];\n\t\t}\n\t}\n\n\treturn createFromElement(formElement);\n}\n\n// create form object from <form> element\nfunction createFromElement(formElement, id) {\n\tid = id || parseInt( formElement.getAttribute('data-id') ) || 0;\n\tvar form = new Form(id, formElement);\n\tforms.push(form);\n\treturn form;\n}\n\nfunction all() {\n\treturn forms;\n}\n\nfunction on(event,callback) {\n\treturn events.on(event,callback);\n}\n\nfunction trigger(event,args) {\n\treturn events.trigger(event,args);\n}\n\nfunction off(event,callback) {\n\treturn events.off(event,callback);\n}\n\nmodule.exports = {\n\t\"all\": all,\n\t\"get\": get,\n\t\"getByElement\": getByElement,\n\t\"on\": on,\n\t\"trigger\": trigger,\n\t\"off\": off\n};\n\n\n},{\"./form.js\":2,\"wolfy87-eventemitter\":8}],4:[function(require,module,exports){\n/**\n * Copyright (c) 2010 Maxim Vasiliev\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * @author Maxim Vasiliev\n * Date: 09.09.2010\n * Time: 19:02:33\n */\n\n\n(function (root, factory)\n{\n\tif (typeof exports !== 'undefined' && typeof module !== 'undefined' && module.exports) {\n\t\t// NodeJS\n\t\tmodule.exports = factory();\n\t}\n\telse if (typeof define === 'function' && define.amd)\n\t{\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(factory);\n\t}\n\telse\n\t{\n\t\t// Browser globals\n\t\troot.form2js = factory();\n\t}\n}(this, function ()\n{\n\t\"use strict\";\n\n\t/**\n\t * Returns form values represented as Javascript object\n\t * \"name\" attribute defines structure of resulting object\n\t *\n\t * @param rootNode {Element|String} root form element (or it's id) or array of root elements\n\t * @param delimiter {String} structure parts delimiter defaults to '.'\n\t * @param skipEmpty {Boolean} should skip empty text values, defaults to true\n\t * @param nodeCallback {Function} custom function to get node value\n\t * @param useIdIfEmptyName {Boolean} if true value of id attribute of field will be used if name of field is empty\n\t */\n\tfunction form2js(rootNode, delimiter, skipEmpty, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tgetDisabled = getDisabled ? true : false;\n\t\tif (typeof skipEmpty == 'undefined' || skipEmpty == null) skipEmpty = true;\n\t\tif (typeof delimiter == 'undefined' || delimiter == null) delimiter = '.';\n\t\tif (arguments.length < 5) useIdIfEmptyName = false;\n\n\t\trootNode = typeof rootNode == 'string' ? document.getElementById(rootNode) : rootNode;\n\n\t\tvar formValues = [],\n\t\t\tcurrNode,\n\t\t\ti = 0;\n\n\t\t/* If rootNode is array - combine values */\n\t\tif (rootNode.constructor == Array || (typeof NodeList != \"undefined\" && rootNode.constructor == NodeList))\n\t\t{\n\t\t\twhile(currNode = rootNode[i++])\n\t\t\t{\n\t\t\t\tformValues = formValues.concat(getFormValues(currNode, nodeCallback, useIdIfEmptyName, getDisabled));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tformValues = getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\t}\n\n\t\treturn processNameValues(formValues, skipEmpty, delimiter);\n\t}\n\n\t/**\n\t * Processes collection of { name: 'name', value: 'value' } objects.\n\t * @param nameValues\n\t * @param skipEmpty if true skips elements with value == '' or value == null\n\t * @param delimiter\n\t */\n\tfunction processNameValues(nameValues, skipEmpty, delimiter)\n\t{\n\t\tvar result = {},\n\t\t\tarrays = {},\n\t\t\ti, j, k, l,\n\t\t\tvalue,\n\t\t\tnameParts,\n\t\t\tcurrResult,\n\t\t\tarrNameFull,\n\t\t\tarrName,\n\t\t\tarrIdx,\n\t\t\tnamePart,\n\t\t\tname,\n\t\t\t_nameParts;\n\n\t\tfor (i = 0; i < nameValues.length; i++)\n\t\t{\n\t\t\tvalue = nameValues[i].value;\n\n\t\t\tif (skipEmpty && (value === '' || value === null)) continue;\n\n\t\t\tname = nameValues[i].name;\n\t\t\t_nameParts = name.split(delimiter);\n\t\t\tnameParts = [];\n\t\t\tcurrResult = result;\n\t\t\tarrNameFull = '';\n\n\t\t\tfor(j = 0; j < _nameParts.length; j++)\n\t\t\t{\n\t\t\t\tnamePart = _nameParts[j].split('][');\n\t\t\t\tif (namePart.length > 1)\n\t\t\t\t{\n\t\t\t\t\tfor(k = 0; k < namePart.length; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (k == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = namePart[k] + ']';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (k == namePart.length - 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = '[' + namePart[k];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnamePart[k] = '[' + namePart[k] + ']';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarrIdx = namePart[k].match(/([a-z_]+)?\\[([a-z_][a-z0-9_]+?)\\]/i);\n\t\t\t\t\t\tif (arrIdx)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor(l = 1; l < arrIdx.length; l++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (arrIdx[l]) nameParts.push(arrIdx[l]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tnameParts.push(namePart[k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tnameParts = nameParts.concat(namePart);\n\t\t\t}\n\n\t\t\tfor (j = 0; j < nameParts.length; j++)\n\t\t\t{\n\t\t\t\tnamePart = nameParts[j];\n\n\t\t\t\tif (namePart.indexOf('[]') > -1 && j == nameParts.length - 1)\n\t\t\t\t{\n\t\t\t\t\tarrName = namePart.substr(0, namePart.indexOf('['));\n\t\t\t\t\tarrNameFull += arrName;\n\n\t\t\t\t\tif (!currResult[arrName]) currResult[arrName] = [];\n\t\t\t\t\tcurrResult[arrName].push(value);\n\t\t\t\t}\n\t\t\t\telse if (namePart.indexOf('[') > -1)\n\t\t\t\t{\n\t\t\t\t\tarrName = namePart.substr(0, namePart.indexOf('['));\n\t\t\t\t\tarrIdx = namePart.replace(/(^([a-z_]+)?\\[)|(\\]$)/gi, '');\n\n\t\t\t\t\t/* Unique array name */\n\t\t\t\t\tarrNameFull += '_' + arrName + '_' + arrIdx;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Because arrIdx in field name can be not zero-based and step can be\n\t\t\t\t\t * other than 1, we can't use them in target array directly.\n\t\t\t\t\t * Instead we're making a hash where key is arrIdx and value is a reference to\n\t\t\t\t\t * added array element\n\t\t\t\t\t */\n\n\t\t\t\t\tif (!arrays[arrNameFull]) arrays[arrNameFull] = {};\n\t\t\t\t\tif (arrName != '' && !currResult[arrName]) currResult[arrName] = [];\n\n\t\t\t\t\tif (j == nameParts.length - 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (arrName == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrResult.push(value);\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[currResult.length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrResult[arrName].push(value);\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!arrays[arrNameFull][arrIdx])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((/^[0-9a-z_]+\\[?/i).test(nameParts[j+1])) currResult[arrName].push({});\n\t\t\t\t\t\t\telse currResult[arrName].push([]);\n\n\t\t\t\t\t\t\tarrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrResult = arrays[arrNameFull][arrIdx];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarrNameFull += namePart;\n\n\t\t\t\t\tif (j < nameParts.length - 1) /* Not the last part of name - means object */\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!currResult[namePart]) currResult[namePart] = {};\n\t\t\t\t\t\tcurrResult = currResult[namePart];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrResult[namePart] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tvar result = extractNodeValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\treturn result.length > 0 ? result : getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled);\n\t}\n\n\tfunction getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled)\n\t{\n\t\tvar result = [],\n\t\t\tcurrentNode = rootNode.firstChild;\n\n\t\twhile (currentNode)\n\t\t{\n\t\t\tresult = result.concat(extractNodeValues(currentNode, nodeCallback, useIdIfEmptyName, getDisabled));\n\t\t\tcurrentNode = currentNode.nextSibling;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction extractNodeValues(node, nodeCallback, useIdIfEmptyName, getDisabled) {\n\t\tif (node.disabled && !getDisabled) return [];\n\n\t\tvar callbackResult, fieldValue, result, fieldName = getFieldName(node, useIdIfEmptyName);\n\n\t\tcallbackResult = nodeCallback && nodeCallback(node);\n\n\t\tif (callbackResult && callbackResult.name) {\n\t\t\tresult = [callbackResult];\n\t\t}\n\t\telse if (fieldName != '' && node.nodeName.match(/INPUT|TEXTAREA/i)) {\n\t\t\tfieldValue = getFieldValue(node, getDisabled);\n\t\t\tif (null === fieldValue) {\n\t\t\t\tresult = [];\n\t\t\t} else {\n\t\t\t\tresult = [ { name: fieldName, value: fieldValue} ];\n\t\t\t}\n\t\t}\n\t\telse if (fieldName != '' && node.nodeName.match(/SELECT/i)) {\n\t\t\tfieldValue = getFieldValue(node, getDisabled);\n\t\t\tresult = [ { name: fieldName.replace(/\\[\\]$/, ''), value: fieldValue } ];\n\t\t}\n\t\telse {\n\t\t\tresult = getSubFormValues(node, nodeCallback, useIdIfEmptyName, getDisabled);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction getFieldName(node, useIdIfEmptyName)\n\t{\n\t\tif (node.name && node.name != '') return node.name;\n\t\telse if (useIdIfEmptyName && node.id && node.id != '') return node.id;\n\t\telse return '';\n\t}\n\n\n\tfunction getFieldValue(fieldNode, getDisabled)\n\t{\n\t\tif (fieldNode.disabled && !getDisabled) return null;\n\n\t\tswitch (fieldNode.nodeName) {\n\t\t\tcase 'INPUT':\n\t\t\tcase 'TEXTAREA':\n\t\t\t\tswitch (fieldNode.type.toLowerCase()) {\n\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\tif (fieldNode.checked && fieldNode.value === \"false\") return false;\n\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\tif (fieldNode.checked && fieldNode.value === \"true\") return true;\n\t\t\t\t\t\tif (!fieldNode.checked && fieldNode.value === \"true\") return false;\n\t\t\t\t\t\tif (fieldNode.checked) return fieldNode.value;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'button':\n\t\t\t\t\tcase 'reset':\n\t\t\t\t\tcase 'submit':\n\t\t\t\t\tcase 'image':\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn fieldNode.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'SELECT':\n\t\t\t\treturn getSelectedOptionValue(fieldNode);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfunction getSelectedOptionValue(selectNode)\n\t{\n\t\tvar multiple = selectNode.multiple,\n\t\t\tresult = [],\n\t\t\toptions,\n\t\t\ti, l;\n\n\t\tif (!multiple) return selectNode.value;\n\n\t\tfor (options = selectNode.getElementsByTagName(\"option\"), i = 0, l = options.length; i < l; i++)\n\t\t{\n\t\t\tif (options[i].selected) result.push(options[i].value);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\treturn form2js;\n\n}));\n},{}],5:[function(require,module,exports){\n// get successful control from form and assemble into object\n// http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nfunction serialize(form, options) {\n\tif (typeof options != 'object') {\n\t\toptions = { hash: !!options };\n\t}\n\telse if (options.hash === undefined) {\n\t\toptions.hash = true;\n\t}\n\n\tvar result = (options.hash) ? {} : '';\n\tvar serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n\tvar elements = form && form.elements ? form.elements : [];\n\n\t//Object store each radio and set if it's empty or not\n\tvar radio_store = Object.create(null);\n\n\tfor (var i=0 ; i<elements.length ; ++i) {\n\t\tvar element = elements[i];\n\n\t\t// ingore disabled fields\n\t\tif ((!options.disabled && element.disabled) || !element.name) {\n\t\t\tcontinue;\n\t\t}\n\t\t// ignore anyhting that is not considered a success field\n\t\tif (!k_r_success_contrls.test(element.nodeName) ||\n\t\t\tk_r_submitter.test(element.type)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvar key = element.name;\n\t\tvar val = element.value;\n\n\t\t// we can't just use element.value for checkboxes cause some browsers lie to us\n\t\t// they say \"on\" for value when the box isn't checked\n\t\tif ((element.type === 'checkbox' || element.type === 'radio') && !element.checked) {\n\t\t\tval = undefined;\n\t\t}\n\n\t\t// If we want empty elements\n\t\tif (options.empty) {\n\t\t\t// for checkbox\n\t\t\tif (element.type === 'checkbox' && !element.checked) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t\t// for radio\n\t\t\tif (element.type === 'radio') {\n\t\t\t\tif (!radio_store[element.name] && !element.checked) {\n\t\t\t\t\tradio_store[element.name] = false;\n\t\t\t\t}\n\t\t\t\telse if (element.checked) {\n\t\t\t\t\tradio_store[element.name] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if options empty is true, continue only if its radio\n\t\t\tif (!val && element.type == 'radio') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// value-less fields are ignored unless options.empty is true\n\t\t\tif (!val) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// multi select boxes\n\t\tif (element.type === 'select-multiple') {\n\t\t\tval = [];\n\n\t\t\tvar selectOptions = element.options;\n\t\t\tvar isSelectedOptions = false;\n\t\t\tfor (var j=0 ; j<selectOptions.length ; ++j) {\n\t\t\t\tvar option = selectOptions[j];\n\t\t\t\tvar allowedEmpty = options.empty && !option.value;\n\t\t\t\tvar hasValue = (option.value || allowedEmpty);\n\t\t\t\tif (option.selected && hasValue) {\n\t\t\t\t\tisSelectedOptions = true;\n\n\t\t\t\t\t// If using a hash serializer be sure to add the\n\t\t\t\t\t// correct notation for an array in the multi-select\n\t\t\t\t\t// context. Here the name attribute on the select element\n\t\t\t\t\t// might be missing the trailing bracket pair. Both names\n\t\t\t\t\t// \"foo\" and \"foo[]\" should be arrays.\n\t\t\t\t\tif (options.hash && key.slice(key.length - 2) !== '[]') {\n\t\t\t\t\t\tresult = serializer(result, key + '[]', option.value);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult = serializer(result, key, option.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Serialize if no selected options and options.empty is true\n\t\t\tif (!isSelectedOptions && options.empty) {\n\t\t\t\tresult = serializer(result, key, '');\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tresult = serializer(result, key, val);\n\t}\n\n\t// Check for all empty radio buttons and serialize them with key=\"\"\n\tif (options.empty) {\n\t\tfor (var key in radio_store) {\n\t\t\tif (!radio_store[key]) {\n\t\t\t\tresult = serializer(result, key, '');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction parse_keys(string) {\n\tvar keys = [];\n\tvar prefix = /^([^\\[\\]]*)/;\n\tvar children = new RegExp(brackets);\n\tvar match = prefix.exec(string);\n\n\tif (match[1]) {\n\t\tkeys.push(match[1]);\n\t}\n\n\twhile ((match = children.exec(string)) !== null) {\n\t\tkeys.push(match[1]);\n\t}\n\n\treturn keys;\n}\n\nfunction hash_assign(result, keys, value) {\n\tif (keys.length === 0) {\n\t\tresult = value;\n\t\treturn result;\n\t}\n\n\tvar key = keys.shift();\n\tvar between = key.match(/^\\[(.+?)\\]$/);\n\n\tif (key === '[]') {\n\t\tresult = result || [];\n\n\t\tif (Array.isArray(result)) {\n\t\t\tresult.push(hash_assign(null, keys, value));\n\t\t}\n\t\telse {\n\t\t\t// This might be the result of bad name attributes like \"[][foo]\",\n\t\t\t// in this case the original `result` object will already be\n\t\t\t// assigned to an object literal. Rather than coerce the object to\n\t\t\t// an array, or cause an exception the attribute \"_values\" is\n\t\t\t// assigned as an array.\n\t\t\tresult._values = result._values || [];\n\t\t\tresult._values.push(hash_assign(null, keys, value));\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Key is an attribute name and can be assigned directly.\n\tif (!between) {\n\t\tresult[key] = hash_assign(result[key], keys, value);\n\t}\n\telse {\n\t\tvar string = between[1];\n\t\tvar index = parseInt(string, 10);\n\n\t\t// If the characters between the brackets is not a number it is an\n\t\t// attribute name and can be assigned directly.\n\t\tif (isNaN(index)) {\n\t\t\tresult = result || {};\n\t\t\tresult[string] = hash_assign(result[string], keys, value);\n\t\t}\n\t\telse {\n\t\t\tresult = result || [];\n\t\t\tresult[index] = hash_assign(result[index], keys, value);\n\t\t}\n\t}\n\n\treturn result;\n}\n\n// Object/hash encoding serializer.\nfunction hash_serializer(result, key, value) {\n\tvar matches = key.match(brackets);\n\n\t// Has brackets? Use the recursive assignment function to walk the keys,\n\t// construct any missing objects in the result tree and make the assignment\n\t// at the end of the chain.\n\tif (matches) {\n\t\tvar keys = parse_keys(key);\n\t\thash_assign(result, keys, value);\n\t}\n\telse {\n\t\t// Non bracket notation can make assignments directly.\n\t\tvar existing = result[key];\n\n\t\t// If the value has been assigned already (for instance when a radio and\n\t\t// a checkbox have the same name attribute) convert the previous value\n\t\t// into an array before pushing into it.\n\t\t//\n\t\t// NOTE: If this requirement were removed all hash creation and\n\t\t// assignment could go through `hash_assign`.\n\t\tif (existing) {\n\t\t\tif (!Array.isArray(existing)) {\n\t\t\t\tresult[key] = [ existing ];\n\t\t\t}\n\n\t\t\tresult[key].push(value);\n\t\t}\n\t\telse {\n\t\t\tresult[key] = value;\n\t\t}\n\t}\n\n\treturn result;\n}\n\n// urlform encoding serializer\nfunction str_serialize(result, key, value) {\n\t// encode newlines as \\r\\n cause the html spec says so\n\tvalue = value.replace(/(\\r)?\\n/g, '\\r\\n');\n\tvalue = encodeURIComponent(value);\n\n\t// spaces should be '+' rather than '%20'.\n\tvalue = value.replace(/%20/g, '+');\n\treturn result + (result ? '&' : '') + encodeURIComponent(key) + '=' + value;\n}\n\nmodule.exports = serialize;\n},{}],6:[function(require,module,exports){\n/**\n * Copyright 2014 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * GATOR.JS\n * Simple Event Delegation\n *\n * @version 1.2.4\n *\n * Compatible with IE 9+, FF 3.6+, Safari 5+, Chrome\n *\n * Include legacy.js for compatibility with older browsers\n *\n * .-._ _ _ _ _ _ _ _ _\n * .-''-.__.-'00 '-' ' ' ' ' ' ' ' '-.\n * '.___ ' . .--_'-' '-' '-' _'-' '._\n * V: V 'vv-' '_ '. .' _..' '.'.\n * '=.____.=_.--' :_.__.__:_ '. : :\n * (((____.-' '-. / : :\n * (((-'\\ .' /\n * _____..' .'\n * '-._____.-'\n */\n(function() {\n var _matcher,\n _level = 0,\n _id = 0,\n _handlers = {},\n _gatorInstances = {};\n\n function _addEvent(gator, type, callback) {\n\n // blur and focus do not bubble up but if you use event capturing\n // then you will get them\n var useCapture = type == 'blur' || type == 'focus';\n gator.element.addEventListener(type, callback, useCapture);\n }\n\n function _cancel(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n /**\n * returns function to use for determining if an element\n * matches a query selector\n *\n * @returns {Function}\n */\n function _getMatcher(element) {\n if (_matcher) {\n return _matcher;\n }\n\n if (element.matches) {\n _matcher = element.matches;\n return _matcher;\n }\n\n if (element.webkitMatchesSelector) {\n _matcher = element.webkitMatchesSelector;\n return _matcher;\n }\n\n if (element.mozMatchesSelector) {\n _matcher = element.mozMatchesSelector;\n return _matcher;\n }\n\n if (element.msMatchesSelector) {\n _matcher = element.msMatchesSelector;\n return _matcher;\n }\n\n if (element.oMatchesSelector) {\n _matcher = element.oMatchesSelector;\n return _matcher;\n }\n\n // if it doesn't match a native browser method\n // fall back to the gator function\n _matcher = Gator.matchesSelector;\n return _matcher;\n }\n\n /**\n * determines if the specified element matches a given selector\n *\n * @param {Node} element - the element to compare against the selector\n * @param {string} selector\n * @param {Node} boundElement - the element the listener was attached to\n * @returns {void|Node}\n */\n function _matchesSelector(element, selector, boundElement) {\n\n // no selector means this event was bound directly to this element\n if (selector == '_root') {\n return boundElement;\n }\n\n // if we have moved up to the element you bound the event to\n // then we have come too far\n if (element === boundElement) {\n return;\n }\n\n // if this is a match then we are done!\n if (_getMatcher(element).call(element, selector)) {\n return element;\n }\n\n // if this element did not match but has a parent we should try\n // going up the tree to see if any of the parent elements match\n // for example if you are looking for a click on an <a> tag but there\n // is a <span> inside of the a tag that it is the target,\n // it should still work\n if (element.parentNode) {\n _level++;\n return _matchesSelector(element.parentNode, selector, boundElement);\n }\n }\n\n function _addHandler(gator, event, selector, callback) {\n if (!_handlers[gator.id]) {\n _handlers[gator.id] = {};\n }\n\n if (!_handlers[gator.id][event]) {\n _handlers[gator.id][event] = {};\n }\n\n if (!_handlers[gator.id][event][selector]) {\n _handlers[gator.id][event][selector] = [];\n }\n\n _handlers[gator.id][event][selector].push(callback);\n }\n\n function _removeHandler(gator, event, selector, callback) {\n\n // if there are no events tied to this element at all\n // then don't do anything\n if (!_handlers[gator.id]) {\n return;\n }\n\n // if there is no event type specified then remove all events\n // example: Gator(element).off()\n if (!event) {\n for (var type in _handlers[gator.id]) {\n if (_handlers[gator.id].hasOwnProperty(type)) {\n _handlers[gator.id][type] = {};\n }\n }\n return;\n }\n\n // if no callback or selector is specified remove all events of this type\n // example: Gator(element).off('click')\n if (!callback && !selector) {\n _handlers[gator.id][event] = {};\n return;\n }\n\n // if a selector is specified but no callback remove all events\n // for this selector\n // example: Gator(element).off('click', '.sub-element')\n if (!callback) {\n delete _handlers[gator.id][event][selector];\n return;\n }\n\n // if we have specified an event type, selector, and callback then we\n // need to make sure there are callbacks tied to this selector to\n // begin with. if there aren't then we can stop here\n if (!_handlers[gator.id][event][selector]) {\n return;\n }\n\n // if there are then loop through all the callbacks and if we find\n // one that matches remove it from the array\n for (var i = 0; i < _handlers[gator.id][event][selector].length; i++) {\n if (_handlers[gator.id][event][selector][i] === callback) {\n _handlers[gator.id][event][selector].splice(i, 1);\n break;\n }\n }\n }\n\n function _handleEvent(id, e, type) {\n if (!_handlers[id][type]) {\n return;\n }\n\n var target = e.target || e.srcElement,\n selector,\n match,\n matches = {},\n i = 0,\n j = 0;\n\n // find all events that match\n _level = 0;\n for (selector in _handlers[id][type]) {\n if (_handlers[id][type].hasOwnProperty(selector)) {\n match = _matchesSelector(target, selector, _gatorInstances[id].element);\n\n if (match && Gator.matchesEvent(type, _gatorInstances[id].element, match, selector == '_root', e)) {\n _level++;\n _handlers[id][type][selector].match = match;\n matches[_level] = _handlers[id][type][selector];\n }\n }\n }\n\n // stopPropagation() fails to set cancelBubble to true in Webkit\n // @see http://code.google.com/p/chromium/issues/detail?id=162270\n e.stopPropagation = function() {\n e.cancelBubble = true;\n };\n\n for (i = 0; i <= _level; i++) {\n if (matches[i]) {\n for (j = 0; j < matches[i].length; j++) {\n if (matches[i][j].call(matches[i].match, e) === false) {\n Gator.cancel(e);\n return;\n }\n\n if (e.cancelBubble) {\n return;\n }\n }\n }\n }\n }\n\n /**\n * binds the specified events to the element\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @param {boolean=} remove\n * @returns {Object}\n */\n function _bind(events, selector, callback, remove) {\n\n // fail silently if you pass null or undefined as an alement\n // in the Gator constructor\n if (!this.element) {\n return;\n }\n\n if (!(events instanceof Array)) {\n events = [events];\n }\n\n if (!callback && typeof(selector) == 'function') {\n callback = selector;\n selector = '_root';\n }\n\n var id = this.id,\n i;\n\n function _getGlobalCallback(type) {\n return function(e) {\n _handleEvent(id, e, type);\n };\n }\n\n for (i = 0; i < events.length; i++) {\n if (remove) {\n _removeHandler(this, events[i], selector, callback);\n continue;\n }\n\n if (!_handlers[id] || !_handlers[id][events[i]]) {\n Gator.addEvent(this, events[i], _getGlobalCallback(events[i]));\n }\n\n _addHandler(this, events[i], selector, callback);\n }\n\n return this;\n }\n\n /**\n * Gator object constructor\n *\n * @param {Node} element\n */\n function Gator(element, id) {\n\n // called as function\n if (!(this instanceof Gator)) {\n // only keep one Gator instance per node to make sure that\n // we don't create a ton of new objects if you want to delegate\n // multiple events from the same node\n //\n // for example: Gator(document).on(...\n for (var key in _gatorInstances) {\n if (_gatorInstances[key].element === element) {\n return _gatorInstances[key];\n }\n }\n\n _id++;\n _gatorInstances[_id] = new Gator(element, _id);\n\n return _gatorInstances[_id];\n }\n\n this.element = element;\n this.id = id;\n }\n\n /**\n * adds an event\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @returns {Object}\n */\n Gator.prototype.on = function(events, selector, callback) {\n return _bind.call(this, events, selector, callback);\n };\n\n /**\n * removes an event\n *\n * @param {string|Array} events\n * @param {string} selector\n * @param {Function} callback\n * @returns {Object}\n */\n Gator.prototype.off = function(events, selector, callback) {\n return _bind.call(this, events, selector, callback, true);\n };\n\n Gator.matchesSelector = function() {};\n Gator.cancel = _cancel;\n Gator.addEvent = _addEvent;\n Gator.matchesEvent = function() {\n return true;\n };\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Gator;\n }\n\n window.Gator = Gator;\n}) ();\n\n},{}],7:[function(require,module,exports){\n/*! populate.js v1.0.2 by @dannyvankooten | MIT license */\n;(function(root) {\n\n\t/**\n\t * Populate form fields from a JSON object.\n\t *\n\t * @param form object The form element containing your input fields.\n\t * @param data array JSON data to populate the fields with.\n\t * @param basename string Optional basename which is added to `name` attributes\n\t */\n\tvar populate = function( form, data, basename) {\n\n\t\tfor(var key in data) {\n\n\t\t\tif( ! data.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar name = key;\n\t\t\tvar value = data[key];\n\n\t\t\t// handle array name attributes\n\t\t\tif(typeof(basename) !== \"undefined\") {\n\t\t\t\tname = basename + \"[\" + key + \"]\";\n\t\t\t}\n\n\t\t\tif(value.constructor === Array) {\n\t\t\t\tname += '[]';\n\t\t\t} else if(typeof value == \"object\") {\n\t\t\t\tpopulate( form, value, name);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// only proceed if element is set\n\t\t\tvar element = form.elements.namedItem( name );\n\t\t\tif( ! element ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar type = element.type || element[0].type;\n\n\t\t\tswitch(type ) {\n\t\t\t\tdefault:\n\t\t\t\t\telement.value = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'radio':\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tfor( var j=0; j < element.length; j++ ) {\n\t\t\t\t\t\telement[j].checked = ( value.indexOf(element[j].value) > -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'select-multiple':\n\t\t\t\t\tvar values = value.constructor == Array ? value : [value];\n\n\t\t\t\t\tfor(var k = 0; k < element.options.length; k++) {\n\t\t\t\t\t\telement.options[k].selected |= (values.indexOf(element.options[k].value) > -1 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'select':\n\t\t\t\tcase 'select-one':\n\t\t\t\t\telement.value = value.toString() || value;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t// Play nice with AMD, CommonJS or a plain global object.\n\tif ( typeof define == 'function' && typeof define.amd == 'object' && define.amd ) {\n\t\tdefine(function() {\n\t\t\treturn populate;\n\t\t});\n\t}\telse if ( typeof module !== 'undefined' && module.exports ) {\n\t\tmodule.exports = populate;\n\t} else {\n\t\troot.populate = populate;\n\t}\n\n}(this));\n},{}],8:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
includes/admin/class-admin.php
CHANGED
@@ -157,16 +157,11 @@ class MC4WP_Admin {
|
|
157 |
// Only run if db option is at older version than code constant
|
158 |
$previous_version = get_option( 'mc4wp_version', 0 );
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
// This means someone did a rollback.
|
166 |
-
if( version_compare( $previous_version, MC4WP_VERSION, '>' ) ) {
|
167 |
-
update_option( 'mc4wp_version', MC4WP_VERSION );
|
168 |
-
return false;
|
169 |
-
}
|
170 |
|
171 |
// This means we're good!
|
172 |
if( version_compare( $previous_version, MC4WP_VERSION ) > -1 ) {
|
157 |
// Only run if db option is at older version than code constant
|
158 |
$previous_version = get_option( 'mc4wp_version', 0 );
|
159 |
|
160 |
+
// Installing or rollback?
|
161 |
+
if( empty( $previous_version ) || version_compare( $previous_version, MC4WP_VERSION, '>' ) ) {
|
162 |
+
update_option( 'mc4wp_version', MC4WP_VERSION );
|
163 |
+
return false;
|
164 |
+
}
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
// This means we're good!
|
167 |
if( version_compare( $previous_version, MC4WP_VERSION ) > -1 ) {
|
includes/class-api.php
CHANGED
@@ -529,10 +529,12 @@ class MC4WP_API {
|
|
529 |
* @return array
|
530 |
*/
|
531 |
private function get_headers() {
|
|
|
532 |
|
533 |
$headers = array(
|
534 |
-
'Accept' => 'application/json'
|
535 |
-
|
|
|
536 |
|
537 |
// Copy Accept-Language from browser headers
|
538 |
if( ! empty( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) {
|
529 |
* @return array
|
530 |
*/
|
531 |
private function get_headers() {
|
532 |
+
global $wp_version;
|
533 |
|
534 |
$headers = array(
|
535 |
+
'Accept' => 'application/json',
|
536 |
+
'User-Agent' => 'mc4wp/' . MC4WP_VERSION . '; WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
|
537 |
+
);
|
538 |
|
539 |
// Copy Accept-Language from browser headers
|
540 |
if( ! empty( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ) {
|
includes/class-field-map.php
CHANGED
@@ -135,12 +135,8 @@ class MC4WP_Field_Map {
|
|
135 |
$this->list_fields[ $list->id ]['GROUPINGS'] = array_filter( $this->list_fields[ $list->id ]['GROUPINGS'] );
|
136 |
$this->list_fields[ $list->id ] = array_filter( $this->list_fields[ $list->id ] );
|
137 |
|
138 |
-
//
|
139 |
-
|
140 |
-
// add global fields (fields belong to ALL lists automatically)
|
141 |
-
$this->list_fields[ $list->id ] = $this->merge( $this->list_fields[ $list->id ], $this->global_fields );
|
142 |
-
}
|
143 |
-
|
144 |
}
|
145 |
|
146 |
/**
|
@@ -231,11 +227,17 @@ class MC4WP_Field_Map {
|
|
231 |
|
232 |
foreach( $global_field_names as $field_name ) {
|
233 |
if( isset( $this->raw_data[ $field_name ] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
|
235 |
-
$this->global_fields[ $field_name ] = $
|
236 |
-
|
237 |
|
238 |
-
|
239 |
}
|
240 |
}
|
241 |
}
|
135 |
$this->list_fields[ $list->id ]['GROUPINGS'] = array_filter( $this->list_fields[ $list->id ]['GROUPINGS'] );
|
136 |
$this->list_fields[ $list->id ] = array_filter( $this->list_fields[ $list->id ] );
|
137 |
|
138 |
+
// add global fields (fields belong to ALL lists automatically)
|
139 |
+
$this->list_fields[ $list->id ] = $this->merge( $this->list_fields[ $list->id ], $this->global_fields );
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
/**
|
227 |
|
228 |
foreach( $global_field_names as $field_name ) {
|
229 |
if( isset( $this->raw_data[ $field_name ] ) ) {
|
230 |
+
$value = $this->raw_data[ $field_name ];
|
231 |
+
|
232 |
+
// MC_LANGUAGE expects a 2 char code.
|
233 |
+
if( $field_name === 'MC_LANGUAGE' ) {
|
234 |
+
$value = substr( $value, 0, 2 );
|
235 |
+
}
|
236 |
|
237 |
+
$this->global_fields[ $field_name ] = $value;
|
238 |
+
$this->formatted_data[ $field_name ] = $value;
|
239 |
|
240 |
+
unset( $this->custom_fields[ $field_name ] );
|
241 |
}
|
242 |
}
|
243 |
}
|
includes/forms/class-admin.php
CHANGED
@@ -222,7 +222,7 @@ class MC4WP_Forms_Admin {
|
|
222 |
|
223 |
// strip tags from messages
|
224 |
foreach( $data['messages'] as $key => $message ) {
|
225 |
-
$data['messages'][$key] = strip_tags( $message, '<strong><b><br><a><script><u><em><i><span>' );
|
226 |
}
|
227 |
|
228 |
// make sure lists is an array
|
222 |
|
223 |
// strip tags from messages
|
224 |
foreach( $data['messages'] as $key => $message ) {
|
225 |
+
$data['messages'][$key] = strip_tags( $message, '<strong><b><br><a><script><u><em><i><span><img>' );
|
226 |
}
|
227 |
|
228 |
// make sure lists is an array
|
includes/forms/class-asset-manager.php
CHANGED
@@ -9,28 +9,25 @@
|
|
9 |
class MC4WP_Form_Asset_Manager {
|
10 |
|
11 |
/**
|
12 |
-
* @var
|
13 |
*/
|
14 |
-
protected $
|
15 |
|
16 |
/**
|
17 |
* @var bool
|
18 |
*/
|
19 |
-
protected $
|
20 |
|
21 |
/**
|
22 |
* @var string
|
23 |
*/
|
24 |
-
protected $filename_suffix;
|
25 |
|
26 |
/**
|
27 |
-
*
|
28 |
-
*
|
29 |
-
* @param MC4WP_Form_Output_Manager $output_manager
|
30 |
*/
|
31 |
-
public function __construct(
|
32 |
-
$this->
|
33 |
-
$this->filename_suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
34 |
}
|
35 |
|
36 |
/**
|
@@ -39,8 +36,8 @@ class MC4WP_Form_Asset_Manager {
|
|
39 |
public function hook() {
|
40 |
// load checkbox css if necessary
|
41 |
add_action( 'wp_enqueue_scripts', array( $this, 'load_stylesheets' ) );
|
42 |
-
add_action( 'mc4wp_output_form', array( $this, '
|
43 |
-
add_action( 'wp_footer', array( $this, '
|
44 |
|
45 |
$this->register_assets();
|
46 |
}
|
@@ -95,7 +92,8 @@ class MC4WP_Form_Asset_Manager {
|
|
95 |
return '';
|
96 |
}
|
97 |
|
98 |
-
|
|
|
99 |
}
|
100 |
|
101 |
/**
|
@@ -194,31 +192,19 @@ class MC4WP_Form_Asset_Manager {
|
|
194 |
* Load JavaScript files
|
195 |
* @return bool
|
196 |
*/
|
197 |
-
public function
|
198 |
-
global $wp_scripts;
|
199 |
|
200 |
-
|
201 |
-
|
|
|
202 |
}
|
203 |
|
204 |
// print dummy JS
|
205 |
$this->print_dummy_javascript();
|
206 |
|
207 |
-
//
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
// load placeholder polyfill if browser is Internet Explorer
|
212 |
-
wp_enqueue_script( 'mc4wp-forms-placeholders', MC4WP_PLUGIN_URL . 'assets/js/third-party/placeholders.min.js', array(), MC4WP_VERSION, true );
|
213 |
-
$wp_scripts->add_data( 'mc4wp-forms-placeholders', 'conditional', 'lte IE 9' );
|
214 |
-
|
215 |
-
/**
|
216 |
-
* @ignore
|
217 |
-
*/
|
218 |
-
do_action( 'mc4wp_load_form_scripts' );
|
219 |
-
|
220 |
-
$this->scripts_loaded = true;
|
221 |
-
return true;
|
222 |
}
|
223 |
|
224 |
/**
|
@@ -234,44 +220,37 @@ class MC4WP_Form_Asset_Manager {
|
|
234 |
/**
|
235 |
* Outputs the inline JavaScript that is used to enhance forms
|
236 |
*/
|
237 |
-
public function
|
|
|
|
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
242 |
}
|
243 |
|
|
|
|
|
244 |
// make sure scripts are loaded
|
245 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
// print inline scripts depending on printed fields
|
248 |
echo '<script type="text/javascript">';
|
249 |
echo '(function() {';
|
250 |
-
|
251 |
-
|
252 |
-
include
|
253 |
-
|
254 |
-
// include url fix
|
255 |
-
if( in_array( 'url', $this->output_manager->printed_field_types ) ) {
|
256 |
-
include dirname( __FILE__ ) . '/views/js/url-fields.js';
|
257 |
-
}
|
258 |
-
|
259 |
-
// include date polyfill?
|
260 |
-
if( in_array( 'date', $this->output_manager->printed_field_types ) ) {
|
261 |
-
include dirname( __FILE__ ) . '/views/js/date-fields.js';
|
262 |
-
}
|
263 |
-
|
264 |
echo '})();';
|
265 |
echo '</script>';
|
266 |
|
267 |
-
/**
|
268 |
-
|
269 |
-
*
|
270 |
-
* This function will only run if the current page contains at least one form.
|
271 |
-
*
|
272 |
-
* @ignore
|
273 |
-
*/
|
274 |
-
do_action( 'mc4wp_print_forms_javascript' );
|
275 |
}
|
276 |
|
277 |
|
9 |
class MC4WP_Form_Asset_Manager {
|
10 |
|
11 |
/**
|
12 |
+
* @var bool
|
13 |
*/
|
14 |
+
protected $dummy_printed = false;
|
15 |
|
16 |
/**
|
17 |
* @var bool
|
18 |
*/
|
19 |
+
protected $load_scripts = false;
|
20 |
|
21 |
/**
|
22 |
* @var string
|
23 |
*/
|
24 |
+
protected $filename_suffix = '';
|
25 |
|
26 |
/**
|
27 |
+
* MC4WP_Form_Asset_Manager constructor.
|
|
|
|
|
28 |
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->filename_suffix =( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
36 |
public function hook() {
|
37 |
// load checkbox css if necessary
|
38 |
add_action( 'wp_enqueue_scripts', array( $this, 'load_stylesheets' ) );
|
39 |
+
add_action( 'mc4wp_output_form', array( $this, 'before_output_form' ) );
|
40 |
+
add_action( 'wp_footer', array( $this, 'load_scripts' ) );
|
41 |
|
42 |
$this->register_assets();
|
43 |
}
|
92 |
return '';
|
93 |
}
|
94 |
|
95 |
+
$suffix = $this->filename_suffix;
|
96 |
+
return MC4WP_PLUGIN_URL . 'assets/css/form-' . $stylesheet . $suffix . '.css';
|
97 |
}
|
98 |
|
99 |
/**
|
192 |
* Load JavaScript files
|
193 |
* @return bool
|
194 |
*/
|
195 |
+
public function before_output_form() {
|
|
|
196 |
|
197 |
+
// only run once
|
198 |
+
if( $this->dummy_printed ) {
|
199 |
+
return;
|
200 |
}
|
201 |
|
202 |
// print dummy JS
|
203 |
$this->print_dummy_javascript();
|
204 |
|
205 |
+
// set flags
|
206 |
+
$this->load_scripts = true;
|
207 |
+
$this->dummy_printed = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
|
210 |
/**
|
220 |
/**
|
221 |
* Outputs the inline JavaScript that is used to enhance forms
|
222 |
*/
|
223 |
+
public function load_scripts() {
|
224 |
+
|
225 |
+
$load_scripts = $this->load_scripts;
|
226 |
|
227 |
+
/** @ignore */
|
228 |
+
$load_scripts = apply_filters( 'mc4wp_load_form_scripts', $load_scripts );
|
229 |
+
if( ! $load_scripts ) {
|
230 |
+
return;
|
231 |
}
|
232 |
|
233 |
+
global $wp_scripts;
|
234 |
+
|
235 |
// make sure scripts are loaded
|
236 |
+
wp_enqueue_script( 'mc4wp-forms-api', MC4WP_PLUGIN_URL . 'assets/js/forms-api'. $this->filename_suffix .'.js', array(), MC4WP_VERSION, true );
|
237 |
+
wp_localize_script( 'mc4wp-forms-api', 'mc4wp_forms_config', $this->get_javascript_config() );
|
238 |
+
|
239 |
+
// load placeholder polyfill if browser is Internet Explorer
|
240 |
+
wp_enqueue_script( 'mc4wp-forms-placeholders', MC4WP_PLUGIN_URL . 'assets/js/third-party/placeholders.min.js', array(), MC4WP_VERSION, true );
|
241 |
+
$wp_scripts->add_data( 'mc4wp-forms-placeholders', 'conditional', 'lte IE 9' );
|
242 |
|
243 |
// print inline scripts depending on printed fields
|
244 |
echo '<script type="text/javascript">';
|
245 |
echo '(function() {';
|
246 |
+
include dirname( __FILE__ ) . '/views/js/general-form-enhancements.js';
|
247 |
+
include dirname( __FILE__ ) . '/views/js/url-fields.js';
|
248 |
+
include dirname( __FILE__ ) . '/views/js/date-fields.js';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
echo '})();';
|
250 |
echo '</script>';
|
251 |
|
252 |
+
/** @ignore */
|
253 |
+
do_action( 'mc4wp_load_form_scripts' );
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
|
256 |
|
includes/forms/class-form-listener.php
CHANGED
@@ -32,7 +32,7 @@ class MC4WP_Form_Listener {
|
|
32 |
}
|
33 |
|
34 |
try {
|
35 |
-
$form = mc4wp_get_form( $request->
|
36 |
} catch( Exception $e ) {
|
37 |
return false;
|
38 |
}
|
@@ -91,7 +91,9 @@ class MC4WP_Form_Listener {
|
|
91 |
// do stuff on failure
|
92 |
if( ! $result ) {
|
93 |
|
94 |
-
|
|
|
|
|
95 |
$form->errors[] = 'previously_unsubscribed';
|
96 |
$this->get_log()->warning( sprintf( 'Form %d > %s has unsubscribed before and cannot be resubscribed by the plugin.', $form->ID, $form->data['EMAIL'] ) );
|
97 |
} elseif( $api->get_error_code() == 214 ) {
|
@@ -100,7 +102,7 @@ class MC4WP_Form_Listener {
|
|
100 |
$this->get_log()->warning( sprintf( "Form %d > %s is already subscribed to the selected list(s)", $form->ID, mc4wp_obfuscate_string( $form->data['EMAIL'] ) ) );
|
101 |
} else {
|
102 |
// log error
|
103 |
-
$this->get_log()->error( sprintf( 'Form %d > MailChimp API error: %s', $form->ID, $api->get_error_message() ) );
|
104 |
|
105 |
// add error code to form object
|
106 |
$form->errors[] = 'error';
|
32 |
}
|
33 |
|
34 |
try {
|
35 |
+
$form = mc4wp_get_form( $request->post->get( '_mc4wp_form_id' ) );
|
36 |
} catch( Exception $e ) {
|
37 |
return false;
|
38 |
}
|
91 |
// do stuff on failure
|
92 |
if( ! $result ) {
|
93 |
|
94 |
+
$error_code_unsubscribed = 212;
|
95 |
+
$error_code_bounced = 213;
|
96 |
+
if( $api->get_error_code() == $error_code_unsubscribed || $api->get_error_code() == $error_code_bounced ) {
|
97 |
$form->errors[] = 'previously_unsubscribed';
|
98 |
$this->get_log()->warning( sprintf( 'Form %d > %s has unsubscribed before and cannot be resubscribed by the plugin.', $form->ID, $form->data['EMAIL'] ) );
|
99 |
} elseif( $api->get_error_code() == 214 ) {
|
102 |
$this->get_log()->warning( sprintf( "Form %d > %s is already subscribed to the selected list(s)", $form->ID, mc4wp_obfuscate_string( $form->data['EMAIL'] ) ) );
|
103 |
} else {
|
104 |
// log error
|
105 |
+
$this->get_log()->error( sprintf( 'Form %d > MailChimp API error: %s %s', $form->ID, $api->get_error_code(), $api->get_error_message() ) );
|
106 |
|
107 |
// add error code to form object
|
108 |
$form->errors[] = 'error';
|
includes/forms/class-form-manager.php
CHANGED
@@ -99,7 +99,7 @@ class MC4WP_Form_Manager {
|
|
99 |
* @hooked `template_redirect`
|
100 |
*/
|
101 |
public function init_asset_manager() {
|
102 |
-
$assets = new MC4WP_Form_Asset_Manager(
|
103 |
$assets->hook();
|
104 |
}
|
105 |
|
99 |
* @hooked `template_redirect`
|
100 |
*/
|
101 |
public function init_asset_manager() {
|
102 |
+
$assets = new MC4WP_Form_Asset_Manager();
|
103 |
$assets->hook();
|
104 |
}
|
105 |
|
includes/forms/class-form-tags.php
CHANGED
@@ -162,7 +162,8 @@ class MC4WP_Form_Tags {
|
|
162 |
*/
|
163 |
public function get_subscriber_count() {
|
164 |
$mailchimp = new MC4WP_MailChimp();
|
165 |
-
|
|
|
166 |
}
|
167 |
|
168 |
/**
|
162 |
*/
|
163 |
public function get_subscriber_count() {
|
164 |
$mailchimp = new MC4WP_MailChimp();
|
165 |
+
$count = $mailchimp->get_subscriber_count( $this->form->get_lists() );
|
166 |
+
return number_format( $count );
|
167 |
}
|
168 |
|
169 |
/**
|
includes/forms/views/parts/dynamic-content-tags.php
CHANGED
@@ -14,7 +14,7 @@ $tags = mc4wp('forms')->get_tags();
|
|
14 |
<tr>
|
15 |
<td>
|
16 |
<input type="text" class="widefat" value="<?php echo esc_attr( sprintf( '{%s}', $tag ) ); ?>" readonly="readonly" onfocus="this.select();" />
|
17 |
-
<p class="help" style="margin-bottom:0;"><?php echo
|
18 |
</td>
|
19 |
</tr>
|
20 |
<?php } ?>
|
14 |
<tr>
|
15 |
<td>
|
16 |
<input type="text" class="widefat" value="<?php echo esc_attr( sprintf( '{%s}', $tag ) ); ?>" readonly="readonly" onfocus="this.select();" />
|
17 |
+
<p class="help" style="margin-bottom:0;"><?php echo strip_tags( $config['description'], '<strong><b><em><i><a><code>' ); ?></p>
|
18 |
</td>
|
19 |
</tr>
|
20 |
<?php } ?>
|
includes/functions.php
CHANGED
@@ -10,9 +10,13 @@
|
|
10 |
*
|
11 |
* When no service parameter is given, the entire container will be returned.
|
12 |
*
|
|
|
|
|
|
|
13 |
* @param string $service (optional)
|
14 |
-
* @throws Exception when service is not found
|
15 |
* @return object
|
|
|
|
|
16 |
*/
|
17 |
function mc4wp( $service = null ) {
|
18 |
static $mc4wp;
|
10 |
*
|
11 |
* When no service parameter is given, the entire container will be returned.
|
12 |
*
|
13 |
+
* @ignore
|
14 |
+
* @access private
|
15 |
+
*
|
16 |
* @param string $service (optional)
|
|
|
17 |
* @return object
|
18 |
+
*
|
19 |
+
* @throws Exception when service is not found
|
20 |
*/
|
21 |
function mc4wp( $service = null ) {
|
22 |
static $mc4wp;
|
includes/views/parts/update-4.x-notice.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
|
3 |
echo '<div class="notice is-dismissible updated">';
|
4 |
echo '<h4>' . __( 'Version 4.0 of MailChimp for WordPress is available for you', 'mailchimp-for-wp' ) . '</h4>';
|
5 |
-
|
6 |
-
|
7 |
echo '<p>' . __( 'This version updates the plugin to use the new MailChimp API (a server the plugin "talks" to).', 'mailchimp-for-wp' ) . '</p>';
|
8 |
|
9 |
echo '<p>';
|
2 |
|
3 |
echo '<div class="notice is-dismissible updated">';
|
4 |
echo '<h4>' . __( 'Version 4.0 of MailChimp for WordPress is available for you', 'mailchimp-for-wp' ) . '</h4>';
|
|
|
|
|
5 |
echo '<p>' . __( 'This version updates the plugin to use the new MailChimp API (a server the plugin "talks" to).', 'mailchimp-for-wp' ) . '</p>';
|
6 |
|
7 |
echo '<p>';
|
languages/mailchimp-for-wp-el_GR.mo
CHANGED
Binary file
|
languages/mailchimp-for-wp-el_GR.po
CHANGED
@@ -1,2102 +1,882 @@
|
|
1 |
-
# Copyright (C) 2015
|
2 |
-
# This file is distributed under the
|
3 |
# Translators:
|
4 |
# Dimitris Lioris <lioris.dim@gmail.com>, 2015
|
|
|
5 |
# Katie Aggelakou <e.ecodress@gmail.com>, 2015
|
6 |
# Michael Kotsarinis <mk73628@gmail.com>, 2015
|
7 |
# Spyros Tzortzis <spytzo@gmail.com>, 2015
|
8 |
msgid ""
|
9 |
msgstr ""
|
10 |
"Project-Id-Version: MailChimp for WordPress\n"
|
11 |
-
"Report-Msgid-Bugs-To:
|
12 |
-
"POT-Creation-Date: 2015-
|
13 |
-
"PO-Revision-Date:
|
14 |
-
"Last-Translator:
|
15 |
"Language-Team: Greek (Greece) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/el_GR/)\n"
|
16 |
"MIME-Version: 1.0\n"
|
17 |
"Content-Type: text/plain; charset=UTF-8\n"
|
18 |
"Content-Transfer-Encoding: 8bit\n"
|
19 |
"Language: el_GR\n"
|
20 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
21 |
-
|
22 |
-
|
23 |
-
"
|
24 |
-
"
|
25 |
-
|
26 |
-
|
27 |
-
"
|
28 |
-
"
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
msgid "Settings"
|
34 |
msgstr "Ρυθμίσεις"
|
35 |
|
36 |
-
#:
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
#:
|
42 |
msgid "MailChimp API Settings"
|
43 |
msgstr "Ρυθμίσεις MailChimp API"
|
44 |
|
45 |
-
#:
|
|
|
46 |
msgid "MailChimp"
|
47 |
msgstr "MailChimp"
|
48 |
|
49 |
-
#:
|
50 |
-
|
51 |
-
|
52 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:11
|
53 |
-
msgid "Checkbox Settings"
|
54 |
-
msgstr "Ρυθμίσεις Πλαισίου Ελέγχου"
|
55 |
-
|
56 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:186
|
57 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:507
|
58 |
-
msgid "Checkboxes"
|
59 |
-
msgstr "Πλαίσια Ελέγχου"
|
60 |
-
|
61 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:191
|
62 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:9
|
63 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:364
|
64 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:512
|
65 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:91
|
66 |
-
msgid "Form Settings"
|
67 |
-
msgstr "Ρυθμίσεις φόρμας"
|
68 |
|
69 |
-
#:
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
msgstr "
|
74 |
|
75 |
-
#:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
#:
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
msgstr "Κείμενο στο κουμπί"
|
95 |
-
|
96 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:287
|
97 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:39
|
98 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:611
|
99 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:59
|
100 |
-
msgid "Initial value"
|
101 |
-
msgstr "Αρχική τιμή"
|
102 |
-
|
103 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:288
|
104 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:29
|
105 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:34
|
106 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:39
|
107 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:612
|
108 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:49
|
109 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:54
|
110 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:59
|
111 |
-
msgid "(optional)"
|
112 |
-
msgstr "(προαιρετικό)"
|
113 |
-
|
114 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:289
|
115 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:613
|
116 |
-
msgid "Label for"
|
117 |
-
msgstr "Ετικέτα για"
|
118 |
-
|
119 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:290
|
120 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:614
|
121 |
-
msgid "(or leave empty)"
|
122 |
-
msgstr "(ή αφήστε κενό)"
|
123 |
-
|
124 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:291
|
125 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:615
|
126 |
msgid "Subscribe"
|
127 |
msgstr "Εγγραφή"
|
128 |
|
129 |
-
#:
|
130 |
-
|
131 |
-
|
132 |
-
msgstr "Κατάργηση εγγραφής"
|
133 |
-
|
134 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:316
|
135 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:654
|
136 |
-
msgid "Comment form"
|
137 |
-
msgstr "Φόρμα σχολίου"
|
138 |
-
|
139 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:317
|
140 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:655
|
141 |
-
msgid "Registration form"
|
142 |
-
msgstr "Φόρμα εγγραφής"
|
143 |
-
|
144 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:321
|
145 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:659
|
146 |
-
msgid "MultiSite forms"
|
147 |
-
msgstr "Φόρμες MultiSite"
|
148 |
-
|
149 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:325
|
150 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:663
|
151 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:337
|
152 |
-
msgid "BuddyPress registration"
|
153 |
-
msgstr "Εγγραφή BuddyPress"
|
154 |
-
|
155 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:333
|
156 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:337
|
157 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:671
|
158 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:675
|
159 |
-
msgid "%s checkout"
|
160 |
-
msgstr "%s ολοκλήρωσης"
|
161 |
-
|
162 |
-
#: mailchimp-for-wordpress/includes/admin/class-admin.php:365
|
163 |
-
msgid ""
|
164 |
-
"The plugin can only fetch a maximum of 100 lists from MailChimp, only your "
|
165 |
-
"first 100 lists are shown."
|
166 |
-
msgstr "Το πρόσθετο μπορεί να πάρει το πολύ 100 λίστες από το MailChimp, μόνο οι πρώτες 100 λίστες φαίνονται."
|
167 |
|
168 |
-
#:
|
169 |
-
|
170 |
-
|
171 |
-
msgstr "Ανανεωμένη προσωρινή μνήμη MailChimp."
|
172 |
|
173 |
-
#:
|
174 |
-
|
175 |
-
|
176 |
-
msgstr "Αποτυχία να ανανεωθεί η cache του MailChimp - παρακαλώ δοκιμάστε ξανά αργότερα."
|
177 |
|
178 |
-
#:
|
179 |
-
|
180 |
-
|
|
|
181 |
|
182 |
-
#:
|
183 |
-
msgid "
|
184 |
-
msgstr "
|
185 |
|
186 |
-
#:
|
187 |
-
|
188 |
-
|
189 |
-
msgstr "Newsletter"
|
190 |
|
191 |
-
#:
|
192 |
-
|
193 |
-
|
194 |
-
msgstr "Τίτλος:"
|
195 |
|
196 |
-
#:
|
197 |
-
msgid ""
|
198 |
-
|
199 |
-
" form settings</a>."
|
200 |
-
msgstr "Μπορείτε να τροποποιήσετε την φόρμα εγγραφής σας στις <a href=\"%s\">Ρυθμίσεις φόρμας του MailChimp για Wordpress</a>."
|
201 |
|
202 |
-
#:
|
203 |
-
|
204 |
-
|
205 |
-
msgid "Email address"
|
206 |
-
msgstr "Διεύθυνση email"
|
207 |
|
208 |
-
#:
|
209 |
-
|
210 |
-
|
211 |
-
msgid "Your email address"
|
212 |
-
msgstr "Η ηλεκτρονική σας διεύθυνση"
|
213 |
|
214 |
-
#:
|
215 |
-
|
216 |
-
|
217 |
-
msgid "Sign up"
|
218 |
-
msgstr "Εγγραφή"
|
219 |
|
220 |
-
#:
|
221 |
-
#:
|
222 |
-
msgid "
|
223 |
-
msgstr "
|
224 |
|
225 |
-
#:
|
226 |
-
msgid ""
|
227 |
-
"
|
228 |
-
"inbox."
|
229 |
-
msgstr "Σας ευχαριστούμε, το αίτημά σας για εγγραφή ήταν επιτυχές! Παρακαλώ ελέγξτε τα εισερχόμενα του email σας."
|
230 |
|
231 |
-
#:
|
232 |
-
|
233 |
-
|
234 |
-
msgstr "Ωχ. Κάτι πήγε λάθος. Παρακαλώ δοκιμάστε αργότερα."
|
235 |
|
236 |
-
#:
|
237 |
-
|
238 |
-
|
239 |
-
msgstr "Παρακαλώ δώστε μας μία έγκυρη ηλεκτρονική διεύθυνση."
|
240 |
|
241 |
-
#:
|
242 |
-
|
243 |
-
|
244 |
-
msgstr "Η διεύθυνση email που δώσατε έχει ήδη εγγραφεί, σας ευχαριστούμε!"
|
245 |
|
246 |
-
#:
|
247 |
-
|
248 |
-
|
249 |
-
msgstr "Παρακαλώ συμπληρώστε το CAPTCHA."
|
250 |
|
251 |
-
#:
|
252 |
-
|
253 |
-
|
254 |
-
msgstr "Παρακαλώ συμπληρώστε τα απαιτούμενα πεδία."
|
255 |
|
256 |
-
#:
|
257 |
-
|
258 |
-
|
259 |
-
msgstr "Απεγγραφήκατε επιτυχώς."
|
260 |
|
261 |
-
#:
|
262 |
-
|
263 |
-
|
264 |
-
msgstr "Η διεύθυνση email που δώσατε δεν έχει εγγραφεί."
|
265 |
|
266 |
-
#:
|
267 |
-
|
268 |
-
|
269 |
-
#: mailchimp-for-wordpress/includes/views/checkbox-settings.php:96
|
270 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:106
|
271 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:121
|
272 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:134
|
273 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:145
|
274 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:164
|
275 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:178
|
276 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-cf7.php:57
|
277 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:17
|
278 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:37
|
279 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:56
|
280 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:75
|
281 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:98
|
282 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:116
|
283 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:139
|
284 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:52
|
285 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:60
|
286 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:71
|
287 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:113
|
288 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:118
|
289 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:59
|
290 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:72
|
291 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:82
|
292 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:97
|
293 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:115
|
294 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:123
|
295 |
-
msgid "Yes"
|
296 |
-
msgstr "Ναι"
|
297 |
|
298 |
-
#:
|
299 |
-
|
300 |
-
|
301 |
-
#: mailchimp-for-wordpress/includes/views/checkbox-settings.php:96
|
302 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:27
|
303 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:110
|
304 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:125
|
305 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:136
|
306 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:149
|
307 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:168
|
308 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:182
|
309 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-cf7.php:57
|
310 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:21
|
311 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:41
|
312 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:60
|
313 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:79
|
314 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:102
|
315 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:120
|
316 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:140
|
317 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:52
|
318 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:62
|
319 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:75
|
320 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:113
|
321 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:118
|
322 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:22
|
323 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:63
|
324 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:73
|
325 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:86
|
326 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:101
|
327 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:116
|
328 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:124
|
329 |
-
msgid "No"
|
330 |
-
msgstr "Όχι"
|
331 |
|
332 |
-
#:
|
333 |
-
|
334 |
-
|
335 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:309
|
336 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:235
|
337 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:238
|
338 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:300
|
339 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:309
|
340 |
-
msgid "MailChimp for WordPress - Error"
|
341 |
-
msgstr "MailChimp για WordPress - Σφάλμα"
|
342 |
-
|
343 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:236
|
344 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:236
|
345 |
-
msgid ""
|
346 |
-
"Please select a list to subscribe to in the <a href=\"%s\">checkbox "
|
347 |
-
"settings</a>."
|
348 |
-
msgstr "Παρακαλούμε επιλέξτε μια λίστα για εγγραφή στις <a href=\"%s\">ρυθμίσεις για checkbox</a>."
|
349 |
-
|
350 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:237
|
351 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:308
|
352 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:237
|
353 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:308
|
354 |
-
msgid "This message is only visible to administrators for debugging purposes."
|
355 |
-
msgstr "Αυτό το μήνυμα εμφανίζεται μόνο στους διαχειριστές για ανάγκες αποσφαλμάτωσης."
|
356 |
-
|
357 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:301
|
358 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:301
|
359 |
-
msgid ""
|
360 |
-
"The MailChimp server returned the following error message as a response to "
|
361 |
-
"our sign-up request:"
|
362 |
-
msgstr "Ο διακομιστής του MailChimp επέστρεψε το παρακάτω μήνυμα σφάλματος ως απάντηση στο αίτημά μας για εγγραφή:"
|
363 |
-
|
364 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:303
|
365 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:303
|
366 |
-
msgid "This is the data that was sent to MailChimp:"
|
367 |
-
msgstr "Αυτά είναι τα δεδομένα που στάλθηκαν στο MailChimp:"
|
368 |
-
|
369 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:304
|
370 |
-
#: mailchimp-for-wordpress-pro/includes/class-subscribe-request.php:216
|
371 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:304
|
372 |
-
msgid "Email address:"
|
373 |
-
msgstr "Διεύθυνση email:"
|
374 |
-
|
375 |
-
#: mailchimp-for-wordpress/includes/integrations/class-integration.php:306
|
376 |
-
#: mailchimp-for-wordpress-pro/includes/integrations/class-integration.php:306
|
377 |
-
msgid "Merge variables:"
|
378 |
-
msgstr "Μεταβλητές συγχώνευσης:"
|
379 |
|
380 |
-
|
381 |
-
msgid "MailChimp for WordPress"
|
382 |
-
msgstr "MailChimp για
|
383 |
|
384 |
-
#:
|
385 |
-
|
386 |
-
|
387 |
-
msgid "MailChimp Settings"
|
388 |
-
msgstr "Ρυθμίσεις MailChimp"
|
389 |
|
390 |
-
#:
|
391 |
-
|
392 |
-
|
393 |
-
|
|
|
394 |
|
395 |
-
#:
|
396 |
-
|
397 |
-
|
398 |
-
msgstr "ΣΥΝΔΕΔΕΜΕΝΟ"
|
399 |
|
400 |
-
#:
|
401 |
-
|
402 |
-
|
403 |
-
msgstr "ΜΗ ΣΥΝΔΕΔΕΜΕΝΟ"
|
404 |
|
405 |
-
#:
|
406 |
-
|
407 |
-
|
408 |
-
msgstr "Κλειδί API"
|
409 |
|
410 |
-
#:
|
411 |
-
|
412 |
-
|
413 |
-
msgstr "Το κλειδί API του MailChimp"
|
414 |
|
415 |
-
#:
|
416 |
-
|
417 |
-
|
418 |
-
msgstr "Πάρτε το κλειδί API εδώ."
|
419 |
|
420 |
-
#:
|
421 |
-
|
422 |
-
|
423 |
-
msgstr "Δεδομένα MailChimp"
|
424 |
|
425 |
-
#:
|
426 |
-
|
427 |
-
|
428 |
-
"The table below shows your MailChimp lists data. If you applied changes to "
|
429 |
-
"your MailChimp lists, please use the following button to renew your cached "
|
430 |
-
"data."
|
431 |
-
msgstr "Ο παρακάτω πίνακας παρουσιάζει τα δεδομένα των λιστών σας στο MailChimp. Αν πραγματοποιήσατε αλλαγές στις λίστες σας στο MailChimp, παρακαλώ χρησιμοποιήστε το παρακάτω κουμπί για να ανανεώσετε τα δεδομένα προσωρινής μνήμης."
|
432 |
-
|
433 |
-
#: mailchimp-for-wordpress/includes/views/api-settings.php:54
|
434 |
-
#: mailchimp-for-wordpress/includes/views/api-settings.php:125
|
435 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-general-settings.php:55
|
436 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-general-settings.php:126
|
437 |
-
msgid "Renew MailChimp lists"
|
438 |
-
msgstr "Ανανέωση λιστών MailChimp"
|
439 |
|
440 |
-
#:
|
441 |
-
msgid "
|
442 |
-
msgstr "
|
443 |
|
444 |
-
#:
|
445 |
-
#:
|
446 |
-
|
447 |
-
|
448 |
-
"
|
449 |
-
msgstr "
|
450 |
|
451 |
-
#:
|
452 |
-
|
453 |
-
|
454 |
-
msgstr "Ρυθμίσεις του MailChimp για checkbox"
|
455 |
|
456 |
-
#:
|
457 |
-
|
458 |
-
|
459 |
-
"If you want to use sign-up checkboxes, select at least one MailChimp list to"
|
460 |
-
" subscribe people to."
|
461 |
-
msgstr "Αν θέλετε να χρησιμοποιήσετε checkbox εγγραφής, επιλέξτε τουλάχιστον μία λίστα στην οποία θα εγγράφονται οι ενδιαφερόμενοι."
|
462 |
|
463 |
-
#:
|
464 |
-
|
465 |
-
|
466 |
-
msgstr "Λίστες MailChimp"
|
467 |
|
468 |
-
#:
|
469 |
-
|
470 |
-
|
471 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:38
|
472 |
-
msgid "No lists found, <a href=\"%s\">are you connected to MailChimp</a>?"
|
473 |
-
msgstr "Δεν βρέθηκαν λίστες, <a href=\"%s\">είστε συνδεδεμένοι στο MailChimp</a>;"
|
474 |
|
475 |
-
#:
|
476 |
-
|
477 |
-
|
478 |
-
"Select the list(s) to which people who check the checkbox should be "
|
479 |
-
"subscribed."
|
480 |
-
msgstr "Επιλέξτε τη λίστα(ες) στην οποία θα εγγράφονται όσοι επιλέγουν το checkbox."
|
481 |
|
482 |
-
#:
|
483 |
-
#:
|
484 |
-
|
485 |
-
|
486 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:55
|
487 |
-
msgid "Double opt-in?"
|
488 |
-
msgstr "Διπλή επιβεβαίωση (double opt-in);"
|
489 |
|
490 |
-
#:
|
491 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:113
|
492 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:28
|
493 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:53
|
494 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:66
|
495 |
msgid ""
|
496 |
-
"
|
497 |
-
"
|
498 |
-
msgstr "
|
499 |
|
500 |
-
#:
|
501 |
-
|
502 |
-
|
503 |
-
msgstr "Ρυθμίσεις checkbox"
|
504 |
|
505 |
-
#:
|
506 |
-
|
507 |
-
|
508 |
-
msgstr "Προσθέστε το checkbox σε αυτές τις φόρμες"
|
509 |
|
510 |
-
#:
|
511 |
-
|
512 |
-
|
513 |
-
msgstr "Η επιλογή μια φόρμας θα προσθέσει αυτόματα το checkbox εγγραφής σε αυτή."
|
514 |
|
515 |
-
#:
|
516 |
-
|
517 |
-
|
518 |
-
msgstr "Κείμενο ετικέτας checkbox"
|
519 |
|
520 |
-
#:
|
521 |
-
|
522 |
-
|
523 |
-
msgid "HTML tags like %s are allowed in the label text."
|
524 |
-
msgstr "Οι ετικέτες HTML όπως %s επιτρέπονται στο κείμενο της ετικέτας."
|
525 |
|
526 |
-
#:
|
527 |
-
|
528 |
-
|
529 |
-
|
|
|
530 |
|
531 |
-
#:
|
532 |
-
#:
|
533 |
-
msgid "
|
534 |
-
msgstr "
|
535 |
|
536 |
-
#:
|
537 |
-
|
538 |
-
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
540 |
|
541 |
-
#:
|
542 |
-
|
543 |
-
|
544 |
-
msgstr "Θέση checkbox του WooCommerce"
|
545 |
|
546 |
-
#:
|
547 |
-
|
548 |
-
|
549 |
-
msgstr "Μετά τις λεπτομέρειες χρέωσης"
|
550 |
|
551 |
-
#:
|
552 |
-
|
553 |
-
|
554 |
-
msgstr "Μετά τις πρόσθετες πληροφορίες"
|
555 |
|
556 |
-
#:
|
557 |
-
|
558 |
-
|
559 |
-
"Choose the position for the checkbox in your WooCommerce checkout form."
|
560 |
-
msgstr "Αλλάξτε τη θέση του checkbox στην φόρμα της σελίδας ολοκλήρωσης παραγγελίας του WooCommerce"
|
561 |
|
562 |
-
#:
|
563 |
-
msgid ""
|
564 |
-
"To use the MailChimp sign-up form, configure the form below and then either "
|
565 |
-
"paste %s in the content of a post or page or use the widget."
|
566 |
-
msgstr "Για να χρησιμοποιήσετε τη φόρμα εγγραφής του MailChimp, προσαρμόστε τη φόρμα παρακάτω και μετά είτε επικολλήστε το %s στο περιεχόμενο ενός άρθρου ή σελίδας ή χρησιμοποιήστε το widget."
|
567 |
-
|
568 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:20
|
569 |
-
msgid "Required form settings"
|
570 |
-
msgstr "Απαραίτητες ρυθμίσεις φόρμας"
|
571 |
-
|
572 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:24
|
573 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:19
|
574 |
-
msgid "Load form styles (CSS)?"
|
575 |
-
msgstr "Να φορτωθούν τα στυλ CSS της φόρμας;"
|
576 |
-
|
577 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:28
|
578 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:23
|
579 |
-
msgid "Yes, load basic form styles"
|
580 |
-
msgstr "Ναι, να φορτωθούν τα βασικά στυλ της φόρμας"
|
581 |
-
|
582 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:29
|
583 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:24
|
584 |
-
msgid "Yes, load my custom form styles"
|
585 |
-
msgstr "Ναι, να φορτωθούν τα προσαρμοσμένα μου στυλ φόρμας"
|
586 |
-
|
587 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:30
|
588 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:25
|
589 |
-
msgid "Yes, load default form theme"
|
590 |
-
msgstr "Ναι, να φορτωθεί η προεπιλεγμένη φόρμα του θέματος"
|
591 |
-
|
592 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:31
|
593 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:26
|
594 |
msgid "Light Theme"
|
595 |
msgstr "Ανοιχτόχρωμο Θέμα"
|
596 |
|
597 |
-
#:
|
598 |
-
|
|
|
|
|
|
|
599 |
msgid "Red Theme"
|
600 |
msgstr "Κόκκινο Θέμα"
|
601 |
|
602 |
-
#:
|
603 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:28
|
604 |
msgid "Green Theme"
|
605 |
msgstr "Πράσινο Θέμα"
|
606 |
|
607 |
-
#:
|
608 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:29
|
609 |
msgid "Blue Theme"
|
610 |
msgstr "Μπλε Θέμα"
|
611 |
|
612 |
-
#:
|
613 |
-
|
614 |
-
|
615 |
-
msgstr "Σκούρο Θέμα"
|
616 |
|
617 |
-
#:
|
618 |
-
|
619 |
-
|
620 |
-
msgstr "Προσαρμοσμένο Θέμα Χρώματος"
|
621 |
|
622 |
-
#:
|
623 |
msgid ""
|
624 |
"If you want to load some default CSS styles, select \"basic formatting "
|
625 |
"styles\" or choose one of the color themes"
|
626 |
msgstr "Αν θέλετε να φορτώσετε μερικά προκαθορισμένα στυλ CSS, επιλέξτε \"βασικά στυλ μορφοποίησης\" ή επιλέξτε ένα από χρωματικά θέματα"
|
627 |
|
628 |
-
#:
|
629 |
-
|
630 |
-
|
631 |
-
msgstr "Λίστες στις οποίες γίνεται εγγραφή από αυτή τη φόρμα"
|
632 |
|
633 |
-
#:
|
634 |
-
msgid ""
|
635 |
-
"
|
636 |
-
"subscribed."
|
637 |
-
msgstr "Επιλέξτε τη λίστα(ες) στην οποία θα εγγράφονται όσοι υποβάλλουν αυτή τη φόρμα."
|
638 |
|
639 |
-
#:
|
640 |
-
msgid "
|
641 |
-
msgstr "
|
642 |
-
|
643 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:79
|
644 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:91
|
645 |
-
msgid ""
|
646 |
-
"Use the shortcode %s to display this form inside a post, page or text "
|
647 |
-
"widget."
|
648 |
-
msgstr "Χρησιμοποιήστε το shortcode %s για να εμφανίσετε αυτή τη φόρμα μέσα σε ένα άρθρο, μία σελίδα ή μία μονάδα κειμένου."
|
649 |
|
650 |
-
#:
|
651 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/missing-fields-notice.php:4
|
652 |
msgid "Your form is missing the following (required) form fields:"
|
653 |
msgstr "Από την φόρμα σας απουσιάζουν τα παρακάτω (απαιτούμενα) πεδία:"
|
654 |
|
655 |
-
#:
|
656 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:71
|
657 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:57
|
658 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:70
|
659 |
-
msgid "Send Welcome Email?"
|
660 |
-
msgstr "Να αποσταλεί email καλωσορίσματος;"
|
661 |
-
|
662 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:128
|
663 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:86
|
664 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:64
|
665 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:75
|
666 |
msgid ""
|
667 |
-
"
|
668 |
-
"
|
669 |
-
msgstr "
|
670 |
-
|
671 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:131
|
672 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:33
|
673 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-checkbox-settings.php:67
|
674 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:78
|
675 |
-
msgid "Update existing subscribers?"
|
676 |
-
msgstr "Να ενημερωθούν τα στοιχεία των ήδη εγγεγραμμένων;"
|
677 |
-
|
678 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:138
|
679 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:47
|
680 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:89
|
681 |
-
msgid ""
|
682 |
-
"Select \"yes\" if you want to update existing subscribers (instead of "
|
683 |
-
"showing the \"already subscribed\" message)."
|
684 |
-
msgstr "Επιλέξτε \"ναι\" εάν θέλετε να ενημερωθούν τα στοιχεία των ήδη εγγεγραμμένων (αντί να εμφανιστεί μήνυμα ότι \"έχετε ήδη εγγραφεί\")."
|
685 |
-
|
686 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:141
|
687 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:52
|
688 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:93
|
689 |
-
msgid "Replace interest groups?"
|
690 |
-
msgstr "Να αντικατασταθούν οι ομάδες ενδιαφερόντων;"
|
691 |
-
|
692 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:152
|
693 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:66
|
694 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:104
|
695 |
-
msgid ""
|
696 |
-
"Select \"yes\" if you want to replace the interest groups with the groups "
|
697 |
-
"provided instead of adding the provided groups to the member's interest "
|
698 |
-
"groups (only when updating a subscriber)."
|
699 |
-
msgstr "Επιλέξτε \"ναι\" εάν θέλετε να αντικατασταθούν οι ομάδες ενδιαφερόντων με τις ομάδες που παρέχονται αντί να προστεθούν οι ομάδες που παρέχονται στις ομάδες ενδιαφερόντων του μέλους (μόνο όταν γίνεται ενημέρωση ενός εγγεγραμμένου συνδρομητή). "
|
700 |
-
|
701 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:156
|
702 |
-
msgid "Form Settings & Messages"
|
703 |
-
msgstr "Ρυθμίσεις & Μηνύματα Φόρμας"
|
704 |
-
|
705 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:160
|
706 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:94
|
707 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:113
|
708 |
-
msgid "Enable AJAX form submission?"
|
709 |
-
msgstr "Να επιτραπεί η χρήση AJAX στην καταχώριση της φόρμας;"
|
710 |
-
|
711 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:171
|
712 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:108
|
713 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:118
|
714 |
-
msgid "Select \"yes\" if you want to use AJAX (JavaScript) to submit forms."
|
715 |
-
msgstr "Επιλέξτε \"ναι\" εάν επιθυμείτε τη χρήση AJAX (JavaScript) στις φόρμες εγγραφής."
|
716 |
-
|
717 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:174
|
718 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:112
|
719 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:121
|
720 |
-
msgid "Hide form after a successful sign-up?"
|
721 |
-
msgstr "Να κρύβεται η φόρμα έπειτα από μία επιτυχημένη εγγραφή;"
|
722 |
-
|
723 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:185
|
724 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:126
|
725 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:126
|
726 |
-
msgid "Select \"yes\" to hide the form fields after a successful sign-up."
|
727 |
-
msgstr "Επιλέξτε \"ναι\" ώστε να κρύβεται η φόρμα έπειτα από μία επιτυχημένη εγγραφή."
|
728 |
-
|
729 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:188
|
730 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:130
|
731 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:129
|
732 |
-
msgid "Redirect to URL after successful sign-ups"
|
733 |
-
msgstr "Ανακατεύθυνση σε URL έπειτα από επιτυχημένες εγγραφές"
|
734 |
|
735 |
-
#:
|
736 |
-
msgid "
|
737 |
-
msgstr "
|
738 |
|
739 |
-
#:
|
740 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:133
|
741 |
-
msgid ""
|
742 |
-
"Leave empty or enter <code>0</code> for no redirect. Otherwise, use complete"
|
743 |
-
" (absolute) URLs, including <code>http://</code>."
|
744 |
-
msgstr "Αφήστε το κενό ή εισάγετε <code>0</code> εάν δεν θέλετε να γίνεται ανακατεύθυνση. Διαφορετικά, χρησιμοποιήστε πλήρη (απόλυτα) URL, συμπεριλαμβανομένου του <code>http://</code>."
|
745 |
-
|
746 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:195
|
747 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:140
|
748 |
msgid "Successfully subscribed"
|
749 |
msgstr "Εγγραφήκατε επιτυχώς"
|
750 |
|
751 |
-
#:
|
752 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:156
|
753 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:143
|
754 |
msgid ""
|
755 |
"The text that shows when an email address is successfully subscribed to the "
|
756 |
"selected list(s)."
|
757 |
msgstr "Το κείμενο που εμφανίζεται όταν μια διεύθυνση ηλ. ταχυδρομείου εγγράφεται επιτυχώς στην επιλεγμένη λίστα (ή λίστες)."
|
758 |
|
759 |
-
#:
|
760 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:160
|
761 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:147
|
762 |
msgid "Invalid email address"
|
763 |
msgstr "Η διεύθυνση e-mail δεν είναι έγκυρη"
|
764 |
|
765 |
-
#:
|
766 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:163
|
767 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:150
|
768 |
msgid "The text that shows when an invalid email address is given."
|
769 |
msgstr "Το κείμενο που εμφανίζεται όταν μια διεύθυνση ηλ. ταχυδρομείου που επιχειρεί εγγραφή δεν είναι έγκυρη."
|
770 |
|
771 |
-
#:
|
772 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:167
|
773 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:154
|
774 |
msgid "Required field missing"
|
775 |
msgstr "Δεν έχει συμπληρωθεί κάποιο απαραίτητο πεδίο"
|
776 |
|
777 |
-
#:
|
778 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:170
|
779 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:157
|
780 |
msgid ""
|
781 |
"The text that shows when a required field for the selected list(s) is "
|
782 |
"missing."
|
783 |
msgstr "Το κείμενο που εμφανίζεται όταν ένα υποχρεωτικό πεδίο για την επιλεγμένη λίστα (ή λίστες) δεν έχει συμπληρωθεί."
|
784 |
|
785 |
-
#:
|
786 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:174
|
787 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:161
|
788 |
msgid "Already subscribed"
|
789 |
msgstr "Έχετε ήδη εγγραφεί"
|
790 |
|
791 |
-
#:
|
792 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:177
|
793 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:164
|
794 |
msgid ""
|
795 |
"The text that shows when the given email is already subscribed to the "
|
796 |
"selected list(s)."
|
797 |
msgstr "Το κείμενο που εμφανίζεται όταν η διεύθυνση ηλ. ταχυδρομείου που επιχειρεί εγγραφή είναι εγγεγραμμένη στην επιλεγμένη λίστα (ή λίστες)."
|
798 |
|
799 |
-
#:
|
800 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:182
|
801 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:169
|
802 |
-
msgid "Invalid CAPTCHA"
|
803 |
-
msgstr "Λάθος στο CAPTCHA"
|
804 |
-
|
805 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:229
|
806 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:174
|
807 |
msgid "General error"
|
808 |
msgstr "Γενικό σφάλμα"
|
809 |
|
810 |
-
#:
|
811 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:193
|
812 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:177
|
813 |
msgid "The text that shows when a general error occured."
|
814 |
msgstr "Το κείμενο που εμφανίζεται όταν προκύπτει κάποιο γενικό σφάλμα."
|
815 |
|
816 |
-
#:
|
817 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:197
|
818 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:181
|
819 |
msgid "Unsubscribed"
|
820 |
msgstr "Απεγγραφή"
|
821 |
|
822 |
-
#:
|
823 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:200
|
824 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:184
|
825 |
msgid ""
|
826 |
"When using the unsubscribe method, this is the text that shows when the "
|
827 |
"given email address is successfully unsubscribed from the selected list(s)."
|
828 |
msgstr "Όταν γίνεται χρήση της μεθόδου κατάργησης εγγραφής, αυτό είναι το κείμενο που εμφανίζεται όταν η συγκεκριμένη διεύθυνση e-mail έχει απεγγραφεί επιτυχώς από την επιλεγμένη λίστα (ή λίστες)."
|
829 |
|
830 |
-
#:
|
831 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:204
|
832 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:188
|
833 |
msgid "Not subscribed"
|
834 |
msgstr "Μη εγγεγραμμένη"
|
835 |
|
836 |
-
#:
|
837 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:207
|
838 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:191
|
839 |
msgid ""
|
840 |
"When using the unsubscribe method, this is the text that shows when the "
|
841 |
"given email address is not on the selected list(s)."
|
842 |
msgstr "Όταν γίνεται χρήση της μεθόδου κατάργησης εγγραφής, αυτό είναι το κείμενο που εμφανίζεται όταν η συγκεκριμένη διεύθυνση e-mail δεν υπάρχει στην επιλεγμένη λίστα (ή λίστες)."
|
843 |
|
844 |
-
#:
|
845 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:213
|
846 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:197
|
847 |
msgid "HTML tags like %s are allowed in the message fields."
|
848 |
msgstr "Οι ετικέτες HTML όπως %s επιτρέπονται στα πεδία του μηνύματος."
|
849 |
|
850 |
-
#:
|
851 |
-
msgid "Form
|
852 |
-
msgstr "
|
853 |
-
|
854 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:267
|
855 |
-
msgid "Alter the visual appearance of the form by applying CSS rules to %s."
|
856 |
-
msgstr "Τροποποιήστε την οπτική εμφάνιση της φόρμας εφαρμόζοντας κανόνες CSS στο %s."
|
857 |
-
|
858 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:268
|
859 |
-
msgid ""
|
860 |
-
"You can add the CSS rules to your theme stylesheet using the <a "
|
861 |
-
"href=\"%s\">Theme Editor</a> or by using a plugin like %s"
|
862 |
-
msgstr "Μπορείτε να προσθέστε τους κανόνες CSS στο φύλλο στυλ του θέματός σας χρησιμοποιώντας τον <a href=\"%s\">Διορθωτή</a> ή με τη χρήση ενός πρόσθετου όπως το %s"
|
863 |
-
|
864 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:269
|
865 |
-
msgid ""
|
866 |
-
"The <a href=\"%s\" target=\"_blank\">plugin FAQ</a> lists the various CSS "
|
867 |
-
"selectors you can use to target the different form elements."
|
868 |
-
msgstr "Το <a href=\"%s\" target=\"_blank\">FAQ του πρόσθετου</a> απαριθμεί τους διάφορους επιλογείς CSS που μπορείτε να χρησιμοποιήσετε για να επιλέξετε τα διάφορα στοιχεία της φόρμας."
|
869 |
-
|
870 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:270
|
871 |
-
msgid ""
|
872 |
-
"If you need an easier way to style your forms, consider <a "
|
873 |
-
"href=\"%s\">upgrading to MailChimp for WordPress Pro</a> which comes with an"
|
874 |
-
" easy Styles Builder."
|
875 |
-
msgstr "Αν χρειάζεστε έναν ευκολότερο τρόπο για να διαμορφώσετε τις φόρμες σας, σκεφτείτε να <a href=\"%s\">αναβαθμίσετε στο MailChimp for WordPress Pro</a> που διαθέτει έναν εύχρηστο Κατασκευαστή Στυλ."
|
876 |
-
|
877 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:272
|
878 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:366
|
879 |
-
msgid "Variables"
|
880 |
-
msgstr "Μεταβλητές"
|
881 |
-
|
882 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:274
|
883 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:11
|
884 |
-
msgid ""
|
885 |
-
"The following list of variables can be used to <a href=\"%s\">add some "
|
886 |
-
"dynamic content to your form or success and error messages</a>."
|
887 |
-
msgstr "Η ακόλουθη λίστα μεταβλητών μπορεί να χρησιμοποιηθεί για <a href=\"%s\">να προσθέσετε κάποιο δυναμικό περιεχόμενο στη φόρμα επιτυχίας και στα μηνύματα σφάλματος</a>."
|
888 |
-
|
889 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:274
|
890 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:11
|
891 |
-
msgid "This allows you to personalise your form or response messages."
|
892 |
-
msgstr "Αυτό σας επιτρέπει να προσωποποιήσετε τη φόρμα σας ή τα απαντητικά μηνύματα."
|
893 |
-
|
894 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:282
|
895 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:16
|
896 |
-
msgid "Replaced with the visitor's email (if set in URL or cookie)."
|
897 |
-
msgstr "Αντικαθίσταται με το email του επισκέπτη (αν ορίζεται στο URL ή σε cookie)."
|
898 |
-
|
899 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:286
|
900 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:20
|
901 |
-
msgid "Replaced with the form response (error or success messages)."
|
902 |
-
msgstr "Αντικαθίσταται με τη φόρμα απάντησης (μηνύματα επιτυχίας ή σφάλματος)."
|
903 |
-
|
904 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:291
|
905 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:25
|
906 |
-
msgid "Replaced with a captcha field."
|
907 |
-
msgstr "Αντικαθίσταται με ένα πεδίο captcha."
|
908 |
-
|
909 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:296
|
910 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:30
|
911 |
-
msgid "Replaced with the number of subscribers on the selected list(s)"
|
912 |
-
msgstr "Αντικαθίσταται με τον αριθμό συνδρομητών στην επιλεγμένη λίστα(ες)"
|
913 |
-
|
914 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:300
|
915 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:34
|
916 |
-
msgid "Replaced with the current site language, eg: %s"
|
917 |
-
msgstr "Αντικαθίσταται με την τρέχουσα γλώσσα του ιστότοπου, πχ: "
|
918 |
-
|
919 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:304
|
920 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:38
|
921 |
-
msgid "Replaced with the visitor's IP address"
|
922 |
-
msgstr "Αντικαθίσταται με την IP του επισκέπτη"
|
923 |
-
|
924 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:308
|
925 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:42
|
926 |
-
msgid "Replaced with the current date (yyyy/mm/dd eg: %s)"
|
927 |
-
msgstr "Αντικαθίσταται με την τρέχουσα ημερομηνία (yyyy/mm/dd πχ: %s)"
|
928 |
-
|
929 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:312
|
930 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:46
|
931 |
-
msgid "Replaced with the current time (hh:mm:ss eg: %s)"
|
932 |
-
msgstr "Αντικαθίσταται με την τρέχουσα ώρα (hh:mm:ss πχ: %s)"
|
933 |
-
|
934 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:316
|
935 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:50
|
936 |
-
msgid ""
|
937 |
-
"Replaced with the logged in user's email (or nothing, if there is no logged "
|
938 |
-
"in user)"
|
939 |
-
msgstr "Αντικαθίσταται με το email του συνδεδεμένου χρήστη (ή τίποτα, αν δεν υπάρχει συνδεδεμένος χρήστης)"
|
940 |
-
|
941 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:320
|
942 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:54
|
943 |
-
msgid "First name of the current user"
|
944 |
-
msgstr "Όνομα του τρέχοντος χρήστη"
|
945 |
-
|
946 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:324
|
947 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:58
|
948 |
-
msgid "Last name of the current user"
|
949 |
-
msgstr "Επώνυμο του τρέχοντος χρήστη"
|
950 |
-
|
951 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:328
|
952 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:62
|
953 |
-
msgid "Current user ID"
|
954 |
-
msgstr "ID του τρέχοντος χρήστη"
|
955 |
-
|
956 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:332
|
957 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:66
|
958 |
-
msgid "Current URL"
|
959 |
-
msgstr "Τρέχον URL"
|
960 |
-
|
961 |
-
#: mailchimp-for-wordpress/includes/views/form-settings.php:336
|
962 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-text-variables.php:70
|
963 |
-
msgid "The value of the <strong>FNAME</strong> field, if set."
|
964 |
-
msgstr "Η τιμή του πεδίου <strong>FNAME</strong>, αν έχει οριστεί."
|
965 |
-
|
966 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:10
|
967 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:31
|
968 |
-
msgid "Add a new field"
|
969 |
-
msgstr "Προσθήκη ενός νέου πεδίου"
|
970 |
-
|
971 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:12
|
972 |
-
msgid "Use the tool below to generate the HTML for your form fields."
|
973 |
-
msgstr "Χρησιμοποιήστε το παρακάτω εργαλείο για να παράξετε την HTML για τα πεδία της φόρμας σας."
|
974 |
-
|
975 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:15
|
976 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:35
|
977 |
-
msgid "Select MailChimp field.."
|
978 |
-
msgstr "Επιλέξτε πεδίο από το MailChimp.."
|
979 |
-
|
980 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:19
|
981 |
-
msgid "Submit Button"
|
982 |
-
msgstr "Κουμπί Υποβολής"
|
983 |
-
|
984 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:20
|
985 |
-
msgid "Subscribe / unsubscribe choice"
|
986 |
-
msgstr "Επιλογή Εγγραφής/Απεγγραφής"
|
987 |
-
|
988 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:21
|
989 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:40
|
990 |
-
msgid "List choice"
|
991 |
-
msgstr "Επιλογή λίστας"
|
992 |
-
|
993 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:29
|
994 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:49
|
995 |
-
msgid "Label"
|
996 |
-
msgstr "Ετικέτα"
|
997 |
-
|
998 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:34
|
999 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:54
|
1000 |
-
msgid "Placeholder"
|
1001 |
-
msgstr "Κείμενο υποκατάστασης (placeholder)"
|
1002 |
-
|
1003 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:44
|
1004 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:64
|
1005 |
-
msgid "Labels"
|
1006 |
-
msgstr "Ετικέτες"
|
1007 |
-
|
1008 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:44
|
1009 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:64
|
1010 |
-
msgid "(leave empty to hide)"
|
1011 |
-
msgstr "(αφήστε κενό για να κρυφτεί)"
|
1012 |
-
|
1013 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:49
|
1014 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:69
|
1015 |
-
msgid "Wrap in paragraph %s tags?"
|
1016 |
-
msgstr "Αναδίπλωση στις ετικέτες της παραγράφου %s;"
|
1017 |
-
|
1018 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:54
|
1019 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:73
|
1020 |
-
msgid "Required field?"
|
1021 |
-
msgstr "Απαραίτητο πεδίο;"
|
1022 |
-
|
1023 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:58
|
1024 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:77
|
1025 |
-
msgid "Add to form"
|
1026 |
-
msgstr "Προσθήκη στη φόρμα"
|
1027 |
-
|
1028 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:62
|
1029 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:81
|
1030 |
-
msgid "Generated HTML"
|
1031 |
-
msgstr "Παραγόμενη HTML"
|
1032 |
-
|
1033 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-field-wizard.php:69
|
1034 |
-
msgid "Select at least one list first."
|
1035 |
-
msgstr "Επιλέξτε τουλάχιστον μία λίστα πρώτα."
|
1036 |
-
|
1037 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-footer.php:11
|
1038 |
-
msgid ""
|
1039 |
-
"MailChimp for WordPress is in need of translations. Is the plugin not "
|
1040 |
-
"translated in your language or do you spot errors with the current "
|
1041 |
-
"translations? Helping out is easy! Head over to <a href=\"%s\">the "
|
1042 |
-
"translation project and click \"help translate\"</a>."
|
1043 |
-
msgstr "Το MailChimp για WordPress έχει ανάγκη από μεταφραστές. Δεν έχει μεταφραστεί το πρόσθετο στη γλώσσα σας ή βλέπετε σφάλματα στην υπάρχουσα μετάφραση; Είναι εύκολο να βοηθήσετε! Πηγαίνετε στο <a href=\"%s\">project της μετάφρασης και κλικάρετε \"help translate\"</a>."
|
1044 |
-
|
1045 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-footer.php:14
|
1046 |
-
msgid ""
|
1047 |
-
"Enjoying this plugin? <a href=\"%s\">Upgrade to MailChimp for WordPress "
|
1048 |
-
"Pro</a> for an even better plugin, you will love it."
|
1049 |
-
msgstr "Σας αρέσει αυτό το πρόσθετο; <a href=\"%s\">Αναβαθμίστε στο MailChimp for WordPress Pro</a> για ένα ακόμα καλύτερο πρόσθετο, θα το αγαπήσετε."
|
1050 |
-
|
1051 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-footer.php:20
|
1052 |
-
#: mailchimp-for-wordpress-pro/includes/views/parts/admin-footer.php:13
|
1053 |
-
msgid ""
|
1054 |
-
"This plugin is not developed by or affiliated with MailChimp in any way."
|
1055 |
-
msgstr "Αυτό το πρόσθετο δεν έχει αναπτυχθεί ή δεν είναι με κανένα τρόπο συνδεδεμένο με το MailChimp."
|
1056 |
-
|
1057 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:9
|
1058 |
-
msgid "Looking for help?"
|
1059 |
-
msgstr "Ψάχνετε για βοήθεια;"
|
1060 |
-
|
1061 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:10
|
1062 |
-
msgid ""
|
1063 |
-
"Make sure to look at the <a href=\"%s\">MailChimp for WordPress "
|
1064 |
-
"documentation</a>, the plugin <a href=\"%s\">FAQ</a> or use the <a "
|
1065 |
-
"href=\"%s\">support forums</a> on WordPress.org."
|
1066 |
-
msgstr "Κοιτάξτε στην <a href=\"%s\">τεκμηρίωση του MailChimp for WordPress</a>, στο <a href=\"%s\">FAQ</a> του πρόσθετου ή χρησιμοποιήστε τα <a href=\"%s\">φόρουμ υποστήριξης</a> στο "
|
1067 |
-
|
1068 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:14
|
1069 |
-
msgid "Do you enjoy this plugin?"
|
1070 |
-
msgstr "Σας αρέσει αυτό το πρόσθετο;"
|
1071 |
-
|
1072 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:17
|
1073 |
-
msgid "Leave a %s plugin review on WordPress.org"
|
1074 |
-
msgstr "Αφήστε μία %s κριτική για το πρόσθετο στο WordPress.org"
|
1075 |
-
|
1076 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:18
|
1077 |
-
msgid "I am using MailChimp for WordPress by @DannyvanKooten - it is great!"
|
1078 |
-
msgstr "Χρησιμοποιώ το MailChimp για WordPress του @DannyvanKooten - είναι υπέροχο!"
|
1079 |
-
|
1080 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-need-support.php:18
|
1081 |
-
msgid "Tweet about MailChimp for WordPress"
|
1082 |
-
msgstr "Τουιτάρετε για το MailChimp για WordPress"
|
1083 |
|
1084 |
-
#:
|
1085 |
-
msgid ""
|
1086 |
-
|
1087 |
-
"page</a>."
|
1088 |
-
msgstr "Αφήστε μία κριτική για το πρόσθετο στο ιστολόγιό σας και βάλτε σύνδεσμο προς <a href=\"%s\">τη σελίδα του πρόσθετου</a>."
|
1089 |
|
1090 |
-
#:
|
1091 |
-
msgid "
|
1092 |
-
msgstr "
|
1093 |
|
1094 |
-
#:
|
1095 |
-
|
1096 |
-
|
|
|
1097 |
|
1098 |
-
#:
|
1099 |
msgid ""
|
1100 |
-
"
|
1101 |
-
|
1102 |
-
|
1103 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:11
|
1104 |
-
msgid "Some differences with this free version of the plugin:"
|
1105 |
-
msgstr "Μερικές διαφορές με τη δωρεάν έκδοση του πρόσθετου:"
|
1106 |
-
|
1107 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:14
|
1108 |
-
msgid "Multiple forms"
|
1109 |
-
msgstr "Πολλαπλές φόρμες"
|
1110 |
-
|
1111 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:15
|
1112 |
-
msgid "Each subscribing to one or multiple MailChimp lists."
|
1113 |
-
msgstr "Κάθε μια εγγράφει σε μία ή πολλές λίστες του MailChimp."
|
1114 |
-
|
1115 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:18
|
1116 |
-
msgid "AJAX forms"
|
1117 |
-
msgstr "Φόρμες "
|
1118 |
-
|
1119 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:19
|
1120 |
-
msgid "Forms do not require a full page reload."
|
1121 |
-
msgstr "Οι φόρμες δεν απαιτούν πλήρη επαναφόρτωση της σελίδας."
|
1122 |
-
|
1123 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:22
|
1124 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-reports.php:14
|
1125 |
-
msgid "Statistics"
|
1126 |
-
msgstr "Στατιστικά"
|
1127 |
-
|
1128 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:23
|
1129 |
-
msgid "Every form interaction is logged and visualised in insightful charts."
|
1130 |
-
msgstr "Κάθε αλληλεπίδραση με τη φόρμα καταγράφετε και απεικονίζεται σε κατανοητά γραφήματα."
|
1131 |
-
|
1132 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:26
|
1133 |
-
msgid "Styles Builder"
|
1134 |
-
msgstr "Κατασκευαστής Στυλ"
|
1135 |
-
|
1136 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:27
|
1137 |
-
msgid "Create beautiful form themes with ease."
|
1138 |
-
msgstr "Δημιουργήστε όμορφα θέματα για τις φόρμες με ευκολία."
|
1139 |
-
|
1140 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:31
|
1141 |
-
msgid "Upgrade Now"
|
1142 |
-
msgstr "Αναβάθμιση Τώρα"
|
1143 |
-
|
1144 |
-
#: mailchimp-for-wordpress/includes/views/parts/admin-upgrade-to-pro.php:32
|
1145 |
-
msgid "View Demo"
|
1146 |
-
msgstr "Δείτε μια Επίδειξη"
|
1147 |
-
|
1148 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:176
|
1149 |
-
msgid "Documentation"
|
1150 |
-
msgstr "Τεκμηρίωση"
|
1151 |
-
|
1152 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:240
|
1153 |
-
msgid "Save Form"
|
1154 |
-
msgstr "Αποθηκεύστε τη Φόρμα"
|
1155 |
-
|
1156 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:244
|
1157 |
-
msgid "Update Form"
|
1158 |
-
msgstr "Ανανεώστε τη Φόρμα"
|
1159 |
-
|
1160 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:295
|
1161 |
-
msgid "Back to general form settings"
|
1162 |
-
msgstr "Πίσω στις γενικές ρυθμίσεις φόρμας"
|
1163 |
-
|
1164 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:297
|
1165 |
-
msgid "Form updated."
|
1166 |
-
msgstr "Η φόρμα ανανεώθηκε."
|
1167 |
-
|
1168 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:298
|
1169 |
-
msgid "Form saved."
|
1170 |
-
msgstr "Η φόρμα αποθηκεύτηκε."
|
1171 |
-
|
1172 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:365
|
1173 |
-
msgid "Optional Settings"
|
1174 |
-
msgstr "Προαιρετικές Ρυθμίσεις"
|
1175 |
-
|
1176 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-admin.php:500
|
1177 |
-
msgid "MailChimp & Plugin License Settings"
|
1178 |
-
msgstr "Ρυθμίσεις αδειών του MailChimp & του πρόσθετου"
|
1179 |
|
1180 |
-
#:
|
1181 |
-
msgid "
|
1182 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
|
1184 |
-
#:
|
1185 |
-
#:
|
1186 |
-
#:
|
1187 |
-
|
1188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1189 |
|
1190 |
-
#:
|
|
|
1191 |
msgid ""
|
1192 |
-
"
|
1193 |
-
"
|
1194 |
-
msgstr "
|
1195 |
|
1196 |
-
#:
|
1197 |
-
msgid ""
|
1198 |
-
"
|
1199 |
-
"page."
|
1200 |
-
msgstr "Απενεργοποιήσατε την καταγραφή με το φίλτρο %s. Ενεργοποιήστε το ξανά για να χρησιμοποιήσετε τη σελίδα Αναφορών."
|
1201 |
|
1202 |
-
#:
|
|
|
1203 |
msgid ""
|
1204 |
-
"
|
1205 |
-
"
|
1206 |
-
"
|
1207 |
-
msgstr "<strong>Καλωσήλθατε στο MailChimp for WordPress Pro!</strong> Μεταφέραμε τις ρυθμίσεις που έχετε ορίσει στη Lite έκδοση, μπορείτε με ασφάλεια να την <a href=\"%s\">απενεργοποιήσετε τώρα</a>."
|
1208 |
|
1209 |
-
#:
|
1210 |
-
|
1211 |
-
|
|
|
1212 |
|
1213 |
-
#:
|
|
|
1214 |
msgid ""
|
1215 |
-
"
|
1216 |
-
"
|
1217 |
-
msgstr "
|
1218 |
-
|
1219 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-styles-builder.php:437
|
1220 |
-
msgid "%sShow generated CSS%s"
|
1221 |
-
msgstr "%sΕμφάνιση δημιουργηθέντος CSS%s"
|
1222 |
-
|
1223 |
-
#: mailchimp-for-wordpress-pro/includes/admin/class-styles-builder.php:447
|
1224 |
-
msgid "The %sCSS Stylesheet%s has been created."
|
1225 |
-
msgstr "Το %sΦύλλο στυλ CSS%s έχει δημιουργηθεί."
|
1226 |
|
1227 |
-
#:
|
1228 |
-
|
1229 |
-
|
|
|
1230 |
|
1231 |
-
#:
|
|
|
1232 |
msgid ""
|
1233 |
-
"
|
1234 |
-
"
|
1235 |
-
msgstr "
|
1236 |
-
|
1237 |
-
#: mailchimp-for-wordpress-pro/includes/class-mailchimp.php:140
|
1238 |
-
msgid "IP Address"
|
1239 |
-
msgstr "Διεύθυνση IP"
|
1240 |
-
|
1241 |
-
#: mailchimp-for-wordpress-pro/includes/class-subscribe-request.php:199
|
1242 |
-
msgid "New MailChimp Sign-Up"
|
1243 |
-
msgstr "Νέα εγγραφή στο "
|
1244 |
-
|
1245 |
-
#: mailchimp-for-wordpress-pro/includes/class-subscribe-request.php:207
|
1246 |
-
msgid "New Sign-Up"
|
1247 |
-
msgstr "Νέα Εγγραφή"
|
1248 |
|
1249 |
-
#:
|
1250 |
-
|
1251 |
-
|
|
|
1252 |
|
1253 |
-
#:
|
1254 |
-
|
1255 |
-
|
1256 |
-
msgstr "Λίστα"
|
1257 |
|
1258 |
-
#:
|
1259 |
-
msgid "
|
1260 |
-
msgstr "
|
1261 |
-
|
1262 |
-
#: mailchimp-for-wordpress-pro/includes/class-subscribe-request.php:275
|
1263 |
-
msgid ""
|
1264 |
-
"Note that you've enabled double opt-in for the \"%s\" form. The user won't "
|
1265 |
-
"be added to the selected MailChimp lists until they confirm their email "
|
1266 |
-
"address."
|
1267 |
-
msgstr "Σημειώστε ότι έχετε ενεργοποιήσει τη διπλή επιβεβαίωση για τη φόρμα \"%s\". Ο χρήστης δεν θα προστεθεί στις επιλεγμένες λίστες του MailChimp μέχρι να επιβεβαιώσουν τη διεύθυνση ηλ. ταχυδρομείου τους."
|
1268 |
|
1269 |
-
#:
|
1270 |
-
msgid "
|
1271 |
-
msgstr "
|
1272 |
|
1273 |
-
#:
|
1274 |
-
msgid "
|
1275 |
-
msgstr "
|
1276 |
|
1277 |
-
#:
|
1278 |
-
msgid "
|
1279 |
-
msgstr "
|
1280 |
|
1281 |
-
#:
|
1282 |
msgid ""
|
1283 |
-
"
|
1284 |
-
"
|
1285 |
-
msgstr "
|
1286 |
|
1287 |
-
#:
|
1288 |
-
|
1289 |
-
|
|
|
|
|
|
|
|
|
1290 |
|
1291 |
-
#:
|
1292 |
-
msgid "
|
1293 |
-
msgstr "
|
1294 |
|
1295 |
-
#:
|
1296 |
-
msgid "
|
1297 |
-
msgstr "
|
1298 |
|
1299 |
-
#:
|
1300 |
msgid ""
|
1301 |
-
"
|
1302 |
-
"
|
1303 |
-
msgstr "Σας ευχαριστούμε, το αίτημά σας για εγγραφή ήταν επιτυχές! Παρακαλούμε ελέγξτε τα εισερχόμενα του email σας για την επιβεβαίωση."
|
1304 |
|
1305 |
-
#:
|
1306 |
-
msgid "
|
1307 |
-
msgstr "
|
1308 |
|
1309 |
-
#:
|
1310 |
msgid ""
|
1311 |
-
"
|
1312 |
-
"
|
1313 |
-
msgstr "
|
1314 |
-
|
1315 |
-
#: mailchimp-for-wordpress-pro/includes/license/class-license-manager.php:205
|
1316 |
-
msgid "Your %s license has been activated. You have an unlimited license. "
|
1317 |
-
msgstr "Η %s άδειά σας έχει ενεργοποιηθεί. Έχετε απεριόριστη άδεια."
|
1318 |
-
|
1319 |
-
#: mailchimp-for-wordpress-pro/includes/license/class-license-manager.php:207
|
1320 |
-
msgid "Your %s license has been activated. You have used %d/%d activations. "
|
1321 |
-
msgstr "Η %s άδειά σας έχει ενεργοποιηθεί. Έχετε χρησιμοποιήσει %d/%d ενεργοποιήσεις."
|
1322 |
|
1323 |
-
#:
|
1324 |
-
msgid "
|
1325 |
-
msgstr "
|
1326 |
-
|
1327 |
-
#: mailchimp-for-wordpress-pro/includes/license/class-license-manager.php:216
|
1328 |
-
msgid ""
|
1329 |
-
"<a href=\"%s\">Your license is expiring in %d days, would you like to extend"
|
1330 |
-
" it?</a>"
|
1331 |
-
msgstr "<a href=\"%s\">Η άδειά σας λήγει σε %d ημέρες, θα θέλατε να την επεκτείνετε;</a>"
|
1332 |
|
1333 |
-
#:
|
1334 |
msgid ""
|
1335 |
-
"
|
1336 |
-
"
|
1337 |
-
msgstr "
|
1338 |
|
1339 |
-
#:
|
1340 |
-
msgid ""
|
1341 |
-
|
1342 |
-
"you want to use it again."
|
1343 |
-
msgstr "Η άδειά σας έχει λήξει. Πρέπει να <a href=\"%s\">ανανεώσετε την άδειά σας</a> αν θέλετε να τη χρησιμοποιήσετε ξανά."
|
1344 |
|
1345 |
-
#:
|
1346 |
-
msgid "
|
1347 |
-
msgstr "
|
1348 |
|
1349 |
-
#:
|
1350 |
-
msgid "
|
1351 |
-
msgstr "
|
1352 |
|
1353 |
-
#:
|
1354 |
-
|
1355 |
-
|
1356 |
-
msgid ""
|
1357 |
-
"Your plugin license has expired. You will no longer have access to plugin "
|
1358 |
-
"updates unless you <a href=\"%s\">renew your license</a>."
|
1359 |
-
msgstr "Η άδεια του προσθέτου σας έχει λήξει. Δεν θα έχετε πλέον ενημερώσεις του πρόσθετου εκτός αν <a href=\"%s\">ανανεώσετε την άδειά σας</a>."
|
1360 |
|
1361 |
-
#:
|
1362 |
-
msgid "
|
1363 |
-
msgstr "
|
1364 |
|
1365 |
-
#:
|
1366 |
-
msgid "
|
1367 |
-
msgstr "
|
1368 |
|
1369 |
-
#:
|
1370 |
-
msgid "
|
1371 |
-
msgstr "
|
1372 |
|
1373 |
-
#:
|
1374 |
-
msgid ""
|
1375 |
-
"
|
1376 |
-
"the license."
|
1377 |
-
msgstr "%s ενεργοποιείται μέσω διαδικτύου, παρακαλούμε επικοινωνήστε με το διαχειριστή του ιστοτόπου σας για να διαχιεριστείτε την άδεια."
|
1378 |
|
1379 |
-
#:
|
1380 |
msgid ""
|
1381 |
-
"
|
1382 |
-
|
|
|
1383 |
|
1384 |
-
#:
|
1385 |
msgid ""
|
1386 |
-
"
|
1387 |
-
"
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
msgid "License status"
|
1392 |
-
msgstr "Κατάστασης άδειας"
|
1393 |
-
|
1394 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:26
|
1395 |
-
msgid "ACTIVE"
|
1396 |
-
msgstr "ΕΝΕΡΓΗ"
|
1397 |
-
|
1398 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:26
|
1399 |
-
msgid "you are receiving updates"
|
1400 |
-
msgstr "λαμβάνετε ενημερώσεις"
|
1401 |
-
|
1402 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:28
|
1403 |
-
msgid "EXPIRED"
|
1404 |
-
msgstr "ΕΛΗΞΕ"
|
1405 |
-
|
1406 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:28
|
1407 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:30
|
1408 |
-
msgid "you are <strong>not</strong> receiving updates."
|
1409 |
-
msgstr "<strong>δεν</strong> λαμβάνετε ενημερώσεις."
|
1410 |
|
1411 |
-
#:
|
1412 |
-
msgid "
|
1413 |
-
msgstr "
|
1414 |
|
1415 |
-
#:
|
1416 |
-
msgid "
|
1417 |
-
msgstr "
|
1418 |
|
1419 |
-
#:
|
1420 |
-
msgid "
|
1421 |
-
msgstr "
|
1422 |
|
1423 |
-
#:
|
1424 |
msgid ""
|
1425 |
-
"
|
1426 |
-
|
|
|
1427 |
|
1428 |
-
#:
|
1429 |
-
msgid "
|
1430 |
-
msgstr "
|
1431 |
|
1432 |
-
#:
|
1433 |
-
msgid "
|
1434 |
-
msgstr "
|
1435 |
-
|
1436 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:54
|
1437 |
-
msgid "License Key"
|
1438 |
-
msgstr "Κλειδί Άδειας"
|
1439 |
-
|
1440 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:56
|
1441 |
-
msgid "Paste your license key here, as found in the email receipt."
|
1442 |
-
msgstr "Επικολλήστε το κλειδί της άδειάς σας εδώ, όπως ακριβώς είναι στην απόδειξη στο μήνυμα."
|
1443 |
-
|
1444 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:78
|
1445 |
-
msgid "Your %s license will expire on %s."
|
1446 |
-
msgstr "Η %s άδειά σας θα λήξει στις "
|
1447 |
-
|
1448 |
-
#: mailchimp-for-wordpress-pro/includes/license/views/form.php:82
|
1449 |
-
msgid "%sRenew your license now%s."
|
1450 |
-
msgstr "%sΑνανεώστε την άδειά σας τώρα%s."
|
1451 |
-
|
1452 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:49
|
1453 |
-
msgid "ID"
|
1454 |
-
msgstr "ID"
|
1455 |
|
1456 |
-
#:
|
1457 |
-
|
1458 |
-
|
1459 |
-
msgid "Form"
|
1460 |
-
msgstr "Φόρμα"
|
1461 |
|
1462 |
-
#:
|
1463 |
-
msgid "
|
1464 |
-
msgstr "
|
1465 |
-
|
1466 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:52
|
1467 |
-
msgid "List(s)"
|
1468 |
-
msgstr "Λίστα(ες)"
|
1469 |
-
|
1470 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:53
|
1471 |
-
msgid "Last edited"
|
1472 |
-
msgstr "Τελευταία επεξεργασία"
|
1473 |
-
|
1474 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:104
|
1475 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:108
|
1476 |
-
msgid "Edit Form"
|
1477 |
-
msgstr "Αλλαγή Φόρμας"
|
1478 |
-
|
1479 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:105
|
1480 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:290
|
1481 |
-
msgid "Delete"
|
1482 |
-
msgstr "Διαγραφή"
|
1483 |
-
|
1484 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:137
|
1485 |
-
msgid "No MailChimp list(s) selected yet."
|
1486 |
-
msgstr "Δεν έχουν επιλεγεί ακόμα λίστες του MailChimp."
|
1487 |
-
|
1488 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-forms-table.php:147
|
1489 |
-
msgid "You have not created any sign-up forms yet. Time to do so!"
|
1490 |
-
msgstr "Δεν έχετε δημιουργήσει ακόμα φόρμες εγγραφής. Καιρός να το κάνετε!"
|
1491 |
-
|
1492 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:46
|
1493 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-reports.php:15
|
1494 |
-
msgid "Log"
|
1495 |
-
msgstr "Καταγραφή"
|
1496 |
-
|
1497 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:47
|
1498 |
-
msgid "Log Items"
|
1499 |
-
msgstr "Στοιχεία Καταγραφής"
|
1500 |
-
|
1501 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:76
|
1502 |
-
msgid "Email"
|
1503 |
-
msgstr "Email"
|
1504 |
-
|
1505 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:78
|
1506 |
-
msgid "Data"
|
1507 |
-
msgstr "Δεδομένα"
|
1508 |
-
|
1509 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:79
|
1510 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:153
|
1511 |
-
msgid "Success"
|
1512 |
-
msgstr "Επιτυχία"
|
1513 |
-
|
1514 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:80
|
1515 |
-
msgid "Type"
|
1516 |
-
msgstr "Τύπος"
|
1517 |
-
|
1518 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:81
|
1519 |
-
msgid "Source"
|
1520 |
-
msgstr "Πηγή"
|
1521 |
-
|
1522 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:82
|
1523 |
-
msgid "Subscribed"
|
1524 |
-
msgstr "Εγγεγραμμένοι"
|
1525 |
-
|
1526 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:150
|
1527 |
-
msgid "Log items deleted."
|
1528 |
-
msgstr "Τα στοιχεία καταγραφής διαγράφηκαν."
|
1529 |
-
|
1530 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:324
|
1531 |
-
msgid "Registration"
|
1532 |
-
msgstr "Εγγραφή"
|
1533 |
-
|
1534 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:333
|
1535 |
-
msgid "Top Bar"
|
1536 |
-
msgstr "Μπάρα Κορυφής"
|
1537 |
-
|
1538 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:341
|
1539 |
-
msgid "MultiSite registration"
|
1540 |
-
msgstr "Εγγραφή MultiSite"
|
1541 |
-
|
1542 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:354
|
1543 |
-
msgid "Contact Form 7"
|
1544 |
-
msgstr "Contact Form 7"
|
1545 |
-
|
1546 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:358
|
1547 |
-
msgid "bbPress: New Topic"
|
1548 |
-
msgstr "bbPress: Νέο Θέμα"
|
1549 |
-
|
1550 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:362
|
1551 |
-
msgid "bbPress: New Reply"
|
1552 |
-
msgstr "bbPress: Νέα Απάντηση"
|
1553 |
-
|
1554 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:368
|
1555 |
-
msgid "Other Form"
|
1556 |
-
msgstr "Άλλη Φόρμα"
|
1557 |
-
|
1558 |
-
#: mailchimp-for-wordpress-pro/includes/tables/class-log-table.php:434
|
1559 |
-
msgid "No subscribe requests found."
|
1560 |
-
msgstr "Δεν βρέθηκαν αιτήματα εγγραφής."
|
1561 |
|
1562 |
-
#:
|
1563 |
-
msgid "
|
1564 |
-
msgstr "
|
1565 |
|
1566 |
-
#:
|
1567 |
-
msgid "
|
1568 |
-
msgstr "
|
1569 |
|
1570 |
-
#:
|
1571 |
-
|
1572 |
-
|
1573 |
-
msgstr "Σειρά"
|
1574 |
|
1575 |
-
#:
|
1576 |
-
|
1577 |
-
|
1578 |
-
msgstr "Ολοκλήρωση"
|
1579 |
|
1580 |
-
#:
|
1581 |
-
|
1582 |
-
|
1583 |
-
msgstr "Σχόλιο"
|
1584 |
|
1585 |
-
#:
|
1586 |
-
msgid "
|
1587 |
-
msgstr "
|
1588 |
|
1589 |
-
#:
|
1590 |
-
msgid ""
|
1591 |
-
"Any settings you specify here will override the <a href=\"%s\">general form "
|
1592 |
-
"settings</a>. If no setting is specified, the corresponding general setting "
|
1593 |
-
"value will be used."
|
1594 |
-
msgstr "Όποιες ρυθμίσεις κάνετε εδώ θα υπερισχύσουν των <a href=\"%s\">γενικών ρυθμίσεων φορμών</a>. Αν δεν καθορισθεί κάποια ρύθμιση εδώ, θα χρησιμοποιηθεί η αντίστοιχη τιμή από τις γενικές ρυθμίσεις."
|
1595 |
-
|
1596 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:25
|
1597 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:45
|
1598 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:64
|
1599 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:83
|
1600 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:106
|
1601 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:124
|
1602 |
-
msgid "Inherit"
|
1603 |
-
msgstr "Κληρονόμηση"
|
1604 |
-
|
1605 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:137
|
1606 |
-
msgid "Send an email copy of the form data?"
|
1607 |
-
msgstr "Αποστολή με e-mail ενός αντιγράφου των δεδομένων της φόρμας;"
|
1608 |
-
|
1609 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:141
|
1610 |
msgid ""
|
1611 |
-
"
|
1612 |
-
"
|
1613 |
-
msgstr "
|
1614 |
-
|
1615 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:144
|
1616 |
-
msgid "Send the copy to this email:"
|
1617 |
-
msgstr "Αποστολή του αντιγράφου σε αυτό το e-mail:"
|
1618 |
-
|
1619 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:150
|
1620 |
-
msgid "Messages"
|
1621 |
-
msgstr "Μηνύματα"
|
1622 |
-
|
1623 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/optional-form-settings.php:190
|
1624 |
-
msgid "Other errors"
|
1625 |
-
msgstr "Άλλα σφάλματα"
|
1626 |
-
|
1627 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:39
|
1628 |
-
msgid "Submit button"
|
1629 |
-
msgstr "Κουμπί υποβολής"
|
1630 |
-
|
1631 |
-
#: mailchimp-for-wordpress-pro/includes/views/metaboxes/required-form-settings.php:41
|
1632 |
-
msgid "Subscribe / unsubscribe action"
|
1633 |
-
msgstr "Ενέργεια Εγγραφής/Απεγγραφής"
|
1634 |
|
1635 |
-
#:
|
1636 |
-
msgid "
|
1637 |
-
msgstr "
|
1638 |
|
1639 |
-
#:
|
1640 |
msgid ""
|
1641 |
-
"
|
1642 |
-
"
|
1643 |
-
|
|
|
|
|
1644 |
|
1645 |
-
#:
|
1646 |
msgid ""
|
1647 |
-
"
|
1648 |
-
"
|
1649 |
-
msgstr "Χρησιμοποιήστε %s στον κώδικα της Contact Form 7 σας για να προσθέστε ένα checkbox εγγραφής στις CF7 φόρμες σας."
|
1650 |
|
1651 |
-
#:
|
1652 |
-
msgid "
|
1653 |
-
msgstr "
|
1654 |
|
1655 |
-
#:
|
1656 |
msgid ""
|
1657 |
-
"
|
1658 |
-
"
|
1659 |
-
|
1660 |
-
|
1661 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-form-settings.php:13
|
1662 |
-
msgid "Forms & Settings"
|
1663 |
-
msgstr "Φόρμες και ρυθμίσεις"
|
1664 |
-
|
1665 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-form-settings.php:14
|
1666 |
-
msgid "CSS Styles Builder"
|
1667 |
-
msgstr "Κατασκευαστής Στυλ CSS"
|
1668 |
|
1669 |
-
#:
|
1670 |
-
msgid "
|
1671 |
-
msgstr "Ρυθμίσεις Άδειας & API"
|
1672 |
-
|
1673 |
-
#: mailchimp-for-wordpress-pro/includes/views/pages/admin-general-settings.php:113
|
1674 |
-
msgid "No lists were found in your MailChimp account."
|
1675 |
msgstr "Δεν βρέθηκαν λίστες στον λογαριασμό σας στο MailChimp."
|
1676 |
|
1677 |
-
#:
|
1678 |
-
msgid ""
|
1679 |
-
"
|
1680 |
-
"email us directly at <a href=\"%s\">support@mc4wp.com</a>."
|
1681 |
-
msgstr "Χρειάζεστε βοήθεια; Ρίξτε μια ματιά στην <a href=\"%s\">τεκμηρίωση του πρόσθετου</a> ή επικοινωνήστε απευθείας μαζί μας στο <a href=\"%s\">support@mc4wp.com</a>."
|
1682 |
|
1683 |
-
#:
|
1684 |
-
msgid ""
|
1685 |
-
"
|
1686 |
-
msgstr "Παρακαλούμε χρησιμοποιήστε την ίδια διεύθυνση ηλ. ταχυδρομείου με την οποία αγοράσατε το πρόσθετο."
|
1687 |
-
|
1688 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:11
|
1689 |
-
msgid "Use the fields below to create custom styling rules for your forms."
|
1690 |
-
msgstr "Χρησιμοποιήστε τα παρακάτω πεδία για να δημιουρφήσετε προσαρμοσμένου κανόνες διαμόρφωσης στυλ για τις φόρμες σας."
|
1691 |
-
|
1692 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:16
|
1693 |
-
msgid ""
|
1694 |
-
"Tip: have a look at our <a href=\"%s\">knowledge base</a> articles on <a "
|
1695 |
-
"href=\"%s\">creating an inline form</a> or <a href=\"%s\">styling your "
|
1696 |
-
"form</a> in general."
|
1697 |
-
msgstr "Συμβουλή: ρίξτε μια ματιά στα άρθρα της <a href=\"%s\">γνωσιακής μας βάσης</a> για <a href=\"%s\">δημιουργία inline φόρμας</a> ή γενικά <a href=\"%s\">διαμόρφωση στυλ της φόρμας σας</a>."
|
1698 |
|
1699 |
-
#:
|
1700 |
-
msgid ""
|
1701 |
-
|
1702 |
-
"styles on your site, select \"load custom form styles\" in the <a "
|
1703 |
-
"href=\"%s\">MailChimp for WordPress form settings</a>."
|
1704 |
-
msgstr "Δεν γίνεται φόρτωση των προσαρμοσμένων σας φύλλων στυλ αυτή τη στιγμή. Για να εφαρμοστούν αυτά τα στυλ στον ιστότοπό σας, επιλέξτε \"φόρτωση προσαρμοσμένων στυλ φόρμας\" στις <a href=\"%s\">ρυθμίσεις φόρμας του MailChimp for WordPress</a>."
|
1705 |
-
|
1706 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:30
|
1707 |
-
msgid "Select form to build styles for:"
|
1708 |
-
msgstr "Επιλέξτε τη φόρμα για την οποία θα φτιάξετε στυλ:"
|
1709 |
-
|
1710 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:41
|
1711 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:285
|
1712 |
-
msgid "Create at least one form first."
|
1713 |
-
msgstr "Δημιουργήστε τουλάχιστον μία φόρμα πρώτα."
|
1714 |
-
|
1715 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:57
|
1716 |
-
msgid "You need to have JavaScript enabled to see a preview of your form."
|
1717 |
-
msgstr "Πρέπει να είναι ενεργοποιημένη η JavaScript για να δείτε μια προεπισκόπηση της φόρμας σας."
|
1718 |
-
|
1719 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:62
|
1720 |
-
msgid "Form container style"
|
1721 |
-
msgstr "Στυλ περιέκτη φόρμας"
|
1722 |
-
|
1723 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:66
|
1724 |
-
msgid "Form width"
|
1725 |
-
msgstr "Πλάτος φόρμας"
|
1726 |
-
|
1727 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:66
|
1728 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:118
|
1729 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:160
|
1730 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:202
|
1731 |
-
msgid "px or %"
|
1732 |
-
msgstr "px ή %"
|
1733 |
-
|
1734 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:70
|
1735 |
-
msgid "Text alignment"
|
1736 |
-
msgstr "Ευθυγράμμιση κειμένου"
|
1737 |
-
|
1738 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:73
|
1739 |
-
msgid "Choose alignment"
|
1740 |
-
msgstr "Επιλέξτε ευθυγράμμιση"
|
1741 |
-
|
1742 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:74
|
1743 |
-
msgid "Left"
|
1744 |
-
msgstr "Αριστερά"
|
1745 |
-
|
1746 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:75
|
1747 |
-
msgid "Center"
|
1748 |
-
msgstr "Κεντραρισμένο"
|
1749 |
-
|
1750 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:76
|
1751 |
-
msgid "Right"
|
1752 |
-
msgstr "Δεξιά"
|
1753 |
-
|
1754 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:81
|
1755 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:210
|
1756 |
-
msgid "Background color"
|
1757 |
-
msgstr "Χρώμα φόντου"
|
1758 |
-
|
1759 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:83
|
1760 |
-
msgid "Padding"
|
1761 |
-
msgstr "Απόσταση"
|
1762 |
-
|
1763 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:89
|
1764 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:168
|
1765 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:219
|
1766 |
-
msgid "Border color"
|
1767 |
-
msgstr "Χρώμα περιγράμματος"
|
1768 |
-
|
1769 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:91
|
1770 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:170
|
1771 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:215
|
1772 |
-
msgid "Border width"
|
1773 |
-
msgstr "Πλάτος περιγράμματος"
|
1774 |
-
|
1775 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:95
|
1776 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:126
|
1777 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:228
|
1778 |
-
msgid "Text color"
|
1779 |
-
msgstr "Χρώμα κειμένου"
|
1780 |
-
|
1781 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:97
|
1782 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:128
|
1783 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:230
|
1784 |
-
msgid "Text size"
|
1785 |
-
msgstr "Μέγεθος κειμένου"
|
1786 |
-
|
1787 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:101
|
1788 |
-
msgid "Background image"
|
1789 |
-
msgstr "Εικόνα φόντου"
|
1790 |
-
|
1791 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:114
|
1792 |
-
msgid "Label styles"
|
1793 |
-
msgstr "Στυλ Ετικετών"
|
1794 |
-
|
1795 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:118
|
1796 |
-
msgid "Label width"
|
1797 |
-
msgstr "Πλάτος ετικέτας"
|
1798 |
-
|
1799 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:132
|
1800 |
-
msgid "Text style"
|
1801 |
-
msgstr "Στυλ Κειμένου"
|
1802 |
-
|
1803 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:135
|
1804 |
-
msgid "Choose text style.."
|
1805 |
-
msgstr "Επιλέξτε το στυλ του κειμένου.."
|
1806 |
-
|
1807 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:136
|
1808 |
-
msgid "Normal"
|
1809 |
-
msgstr "Κανονικά"
|
1810 |
-
|
1811 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:137
|
1812 |
-
msgid "Bold"
|
1813 |
-
msgstr "Έντονα"
|
1814 |
-
|
1815 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:138
|
1816 |
-
msgid "Italic"
|
1817 |
-
msgstr "Πλάγια"
|
1818 |
-
|
1819 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:139
|
1820 |
-
msgid "Bold & Italic"
|
1821 |
-
msgstr "Έντονα και πλάγια"
|
1822 |
-
|
1823 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:142
|
1824 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:174
|
1825 |
-
msgid "Display"
|
1826 |
-
msgstr "Εμφάνιση"
|
1827 |
-
|
1828 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:146
|
1829 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:178
|
1830 |
-
msgid "Inline"
|
1831 |
-
msgstr "Εντός γραμμής"
|
1832 |
-
|
1833 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:147
|
1834 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:179
|
1835 |
-
msgid "New line"
|
1836 |
-
msgstr "Νέα γραμμή"
|
1837 |
-
|
1838 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:156
|
1839 |
-
msgid "Field styles"
|
1840 |
-
msgstr "Στυλ πεδίων"
|
1841 |
-
|
1842 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:160
|
1843 |
-
msgid "Field width"
|
1844 |
-
msgstr "Πλάτος πεδίου"
|
1845 |
-
|
1846 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:164
|
1847 |
-
msgid "Field height"
|
1848 |
-
msgstr "Ύψος πεδίου"
|
1849 |
-
|
1850 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:182
|
1851 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:224
|
1852 |
-
msgid "Border radius"
|
1853 |
-
msgstr "Ακτίνα περιγράμματος"
|
1854 |
-
|
1855 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:186
|
1856 |
-
msgid "Focus outline"
|
1857 |
-
msgstr "Εστίαση περιγράμματος"
|
1858 |
-
|
1859 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:198
|
1860 |
-
msgid "Button styles"
|
1861 |
-
msgstr "Στυλ κουμπιών"
|
1862 |
-
|
1863 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:202
|
1864 |
-
msgid "Button width"
|
1865 |
-
msgstr "Πλάτος κουμπιού"
|
1866 |
-
|
1867 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:206
|
1868 |
-
msgid "Button height"
|
1869 |
-
msgstr "Ύψος κουμπιού"
|
1870 |
-
|
1871 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:238
|
1872 |
-
msgid "Error and success messages"
|
1873 |
-
msgstr "Μηνύματα επιτυχίας και σφάλματος"
|
1874 |
-
|
1875 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:242
|
1876 |
-
msgid "Success text color"
|
1877 |
-
msgstr "Χρώμα κειμένου επιτυχίας"
|
1878 |
-
|
1879 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:244
|
1880 |
-
msgid "Error text color"
|
1881 |
-
msgstr "Χρώμα κειμένου σφάλματος"
|
1882 |
-
|
1883 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:252
|
1884 |
-
msgid "Advanced"
|
1885 |
-
msgstr "Προχωρημένες"
|
1886 |
-
|
1887 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:256
|
1888 |
-
msgid "CSS Selector Prefix"
|
1889 |
-
msgstr "Πρόσημο Επιλογέα CSS"
|
1890 |
-
|
1891 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:258
|
1892 |
-
msgid ""
|
1893 |
-
"Use this to create a more specific (and thus more \"important\") CSS "
|
1894 |
-
"selector."
|
1895 |
-
msgstr "Επιλέξτε το για να δημιουργήσετε έναν πιο εξειδικευμένο (άρα και πιο \"σημαντικό\") επιλογέα CSS."
|
1896 |
-
|
1897 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:261
|
1898 |
-
msgid "Manual CSS"
|
1899 |
-
msgstr "Χειροκίνητο CSS"
|
1900 |
-
|
1901 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:261
|
1902 |
-
msgid ""
|
1903 |
-
"The CSS rules you enter here will be appended to the custom stylesheet."
|
1904 |
-
msgstr "Οι κανόνες CSS που εισάγετε εδώ θα προστεθούν στο προσαρμοσμένο φύλλο στυλ."
|
1905 |
-
|
1906 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:269
|
1907 |
-
msgid "Copy styles from other form"
|
1908 |
-
msgstr "Αντιγραφή στυλ από άλλη φόρμα"
|
1909 |
-
|
1910 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:283
|
1911 |
-
msgid "Copy Styles"
|
1912 |
-
msgstr "Αντιγραφή Στυλ"
|
1913 |
-
|
1914 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:283
|
1915 |
-
msgid ""
|
1916 |
-
"Are you sure you want to copy form styles from another form? This will "
|
1917 |
-
"overwrite current styles for this form."
|
1918 |
-
msgstr "Είστε σίγουροι ότι θέλετε να αντιγράψετε τα στυλ φόρμας από άλλη φόρμα; Αυτό θα αντικαταστήσει τα υπάρχοντα στυλ σε αυτή τη φόρμα."
|
1919 |
-
|
1920 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-css-builder.php:298
|
1921 |
-
msgid "Are you sure you want to delete all custom styles for this form?"
|
1922 |
-
msgstr "Είστε σίγουροι ότι θέλετε να διαγράψετε όλα τα προσαρμοσμένα στυλ για αυτή τη φόρμα;"
|
1923 |
|
1924 |
-
#:
|
1925 |
-
msgid "
|
1926 |
-
msgstr "
|
1927 |
|
1928 |
-
#:
|
1929 |
-
msgid "
|
1930 |
-
msgstr "
|
1931 |
|
1932 |
-
#:
|
1933 |
-
msgid "
|
1934 |
-
msgstr "
|
1935 |
|
1936 |
-
#:
|
1937 |
-
msgid "
|
1938 |
-
msgstr "
|
1939 |
|
1940 |
-
#:
|
1941 |
-
msgid "General form settings"
|
1942 |
-
msgstr "Γενικές ρυθμίσεις φόρμας"
|
1943 |
-
|
1944 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:36
|
1945 |
msgid ""
|
1946 |
-
"
|
1947 |
-
"
|
1948 |
-
"
|
1949 |
-
msgstr "Αν έχετε %sδημιουργήσει ένα προσαρμοσμένο φύλλο στυλ%s και θέλετε να φορτωθεί, επιλέξτε \"προσαρμοσμένα στυλ φόρμας\". Αλλιώς, επιλέξτε τα βασικά στυλ μορφοποίησης ή ένα από τα προκαθορισμένα θέματα."
|
1950 |
-
|
1951 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:40
|
1952 |
-
msgid "Select Color"
|
1953 |
-
msgstr "Επέλεξε χρώμα"
|
1954 |
-
|
1955 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:48
|
1956 |
-
msgid "Save all changes"
|
1957 |
-
msgstr "Σώσε όλες τις αλλαγές"
|
1958 |
|
1959 |
-
#:
|
1960 |
-
msgid "Default MailChimp settings"
|
1961 |
-
msgstr "Προεπιλεγμένες ρυθμίσεις του MailChimp "
|
1962 |
-
|
1963 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:51
|
1964 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:109
|
1965 |
msgid ""
|
1966 |
-
"
|
1967 |
-
"
|
1968 |
-
msgstr "
|
1969 |
|
1970 |
-
#:
|
1971 |
-
msgid "
|
1972 |
-
msgstr "
|
1973 |
|
1974 |
-
|
1975 |
-
msgid ""
|
1976 |
-
"
|
1977 |
-
"including <code>http://</code>."
|
1978 |
-
msgstr "Αφήστε το κενό εάν δεν θέλετε να γίνεται ανακατεύθυνση. Διαφορετικά, χρησιμοποιήστε πλήρη (απόλυτα) URL, συμπεριλαμβανομένου <code>http://</code>."
|
1979 |
-
|
1980 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-forms-general-settings.php:137
|
1981 |
-
msgid "Default Messages"
|
1982 |
-
msgstr "Προεπιλεγμένα Μηνύματα"
|
1983 |
-
|
1984 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:15
|
1985 |
-
msgid "Today"
|
1986 |
-
msgstr "Σήμερα"
|
1987 |
-
|
1988 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:16
|
1989 |
-
msgid "Yesterday"
|
1990 |
-
msgstr "Χθες"
|
1991 |
-
|
1992 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:17
|
1993 |
-
msgid "Last Week"
|
1994 |
-
msgstr "Προηγούμενη εβδομάδα"
|
1995 |
-
|
1996 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:18
|
1997 |
-
msgid "Last Month"
|
1998 |
-
msgstr "Προηγούμενος μήνας"
|
1999 |
-
|
2000 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:19
|
2001 |
-
msgid "Last Quarter"
|
2002 |
-
msgstr "Προηγούμενο τρίμηνο"
|
2003 |
-
|
2004 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:20
|
2005 |
-
msgid "Last Year"
|
2006 |
-
msgstr "Προηγούμενο έτος"
|
2007 |
-
|
2008 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:21
|
2009 |
-
msgid "Custom"
|
2010 |
-
msgstr "Προσαρμοσμένο"
|
2011 |
-
|
2012 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:25
|
2013 |
-
msgid "From"
|
2014 |
-
msgstr "Από"
|
2015 |
-
|
2016 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:32
|
2017 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:57
|
2018 |
-
msgid "Jan"
|
2019 |
-
msgstr "Ιανουάριος"
|
2020 |
-
|
2021 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:33
|
2022 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:58
|
2023 |
-
msgid "Feb"
|
2024 |
-
msgstr "Φεβρουάριος"
|
2025 |
-
|
2026 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:34
|
2027 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:59
|
2028 |
-
msgid "Mar"
|
2029 |
-
msgstr "Μάρτιος"
|
2030 |
-
|
2031 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:35
|
2032 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:60
|
2033 |
-
msgid "Apr"
|
2034 |
-
msgstr "Απρίλιος"
|
2035 |
-
|
2036 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:36
|
2037 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:61
|
2038 |
-
msgid "May"
|
2039 |
-
msgstr "Μάιος"
|
2040 |
-
|
2041 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:37
|
2042 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:62
|
2043 |
-
msgid "Jun"
|
2044 |
-
msgstr "Ιούνιος"
|
2045 |
-
|
2046 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:38
|
2047 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:63
|
2048 |
-
msgid "Jul"
|
2049 |
-
msgstr "Ιούλιος"
|
2050 |
-
|
2051 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:39
|
2052 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:64
|
2053 |
-
msgid "Aug"
|
2054 |
-
msgstr "Αύγουστος"
|
2055 |
-
|
2056 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:40
|
2057 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:65
|
2058 |
-
msgid "Sep"
|
2059 |
-
msgstr "Σεπτέμβριος"
|
2060 |
-
|
2061 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:41
|
2062 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:66
|
2063 |
-
msgid "Oct"
|
2064 |
-
msgstr "Οκτώβριος"
|
2065 |
-
|
2066 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:42
|
2067 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:67
|
2068 |
-
msgid "Nov"
|
2069 |
-
msgstr "Νοέμβριος"
|
2070 |
-
|
2071 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:43
|
2072 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:68
|
2073 |
-
msgid "Dec"
|
2074 |
-
msgstr "Δεκέμβριος"
|
2075 |
-
|
2076 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:50
|
2077 |
-
msgid "To"
|
2078 |
-
msgstr "Προς"
|
2079 |
-
|
2080 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:76
|
2081 |
-
msgid "Filter"
|
2082 |
-
msgstr "Φίλτρο"
|
2083 |
-
|
2084 |
-
#: mailchimp-for-wordpress-pro/includes/views/tabs/admin-reports-statistics.php:83
|
2085 |
-
msgid "Show these lines:"
|
2086 |
-
msgstr "Εμφάνιση αυτών των γραμμών:"
|
2087 |
|
2088 |
#. Plugin URI of the plugin/theme
|
2089 |
-
msgid "
|
2090 |
-
|
|
|
|
|
2091 |
|
2092 |
#. Description of the plugin/theme
|
2093 |
-
msgid "
|
2094 |
-
|
|
|
|
|
2095 |
|
2096 |
#. Author of the plugin/theme
|
2097 |
-
msgid "
|
2098 |
-
msgstr "
|
2099 |
|
2100 |
#. Author URI of the plugin/theme
|
2101 |
-
msgid "
|
2102 |
-
msgstr "
|
1 |
+
# Copyright (C) 2015 MailChimp for WordPress
|
2 |
+
# This file is distributed under the same license as the MailChimp for WordPress package.
|
3 |
# Translators:
|
4 |
# Dimitris Lioris <lioris.dim@gmail.com>, 2015
|
5 |
+
# Ilias Pesmatzoglou <ipesmatzoglou@theknittingclub.gr>, 2016
|
6 |
# Katie Aggelakou <e.ecodress@gmail.com>, 2015
|
7 |
# Michael Kotsarinis <mk73628@gmail.com>, 2015
|
8 |
# Spyros Tzortzis <spytzo@gmail.com>, 2015
|
9 |
msgid ""
|
10 |
msgstr ""
|
11 |
"Project-Id-Version: MailChimp for WordPress\n"
|
12 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-wp\n"
|
13 |
+
"POT-Creation-Date: 2015-11-30 10:15:18+00:00\n"
|
14 |
+
"PO-Revision-Date: 2016-07-19 22:38+0000\n"
|
15 |
+
"Last-Translator: Ilias Pesmatzoglou <ipesmatzoglou@theknittingclub.gr>\n"
|
16 |
"Language-Team: Greek (Greece) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/el_GR/)\n"
|
17 |
"MIME-Version: 1.0\n"
|
18 |
"Content-Type: text/plain; charset=UTF-8\n"
|
19 |
"Content-Transfer-Encoding: 8bit\n"
|
20 |
"Language: el_GR\n"
|
21 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
22 |
+
|
23 |
+
#: config/default-form-content.php:3
|
24 |
+
msgid "Email address"
|
25 |
+
msgstr "Διεύθυνση email"
|
26 |
+
|
27 |
+
#: config/default-form-content.php:4
|
28 |
+
msgid "Your email address"
|
29 |
+
msgstr "Η ηλεκτρονική σας διεύθυνση"
|
30 |
+
|
31 |
+
#: config/default-form-content.php:5
|
32 |
+
msgid "Sign up"
|
33 |
+
msgstr "Εγγραφή"
|
34 |
+
|
35 |
+
#: config/default-form-messages.php:5
|
36 |
+
msgid ""
|
37 |
+
"Thank you, your sign-up request was successful! Please check your email "
|
38 |
+
"inbox to confirm."
|
39 |
+
msgstr "Σας ευχαριστούμε, το αίτημά σας για εγγραφή ήταν επιτυχές! Παρακαλούμε ελέγξτε τα εισερχόμενα του email σας για την επιβεβαίωση."
|
40 |
+
|
41 |
+
#: config/default-form-messages.php:9
|
42 |
+
msgid "Oops. Something went wrong. Please try again later."
|
43 |
+
msgstr "Ωχ. Κάτι πήγε λάθος. Παρακαλώ δοκιμάστε αργότερα."
|
44 |
+
|
45 |
+
#: config/default-form-messages.php:13
|
46 |
+
msgid "Please provide a valid email address."
|
47 |
+
msgstr "Παρακαλώ δώστε μας μία έγκυρη ηλεκτρονική διεύθυνση."
|
48 |
+
|
49 |
+
#: config/default-form-messages.php:17
|
50 |
+
msgid "Given email address is already subscribed, thank you!"
|
51 |
+
msgstr "Η διεύθυνση email που δώσατε έχει ήδη εγγραφεί, σας ευχαριστούμε!"
|
52 |
+
|
53 |
+
#: config/default-form-messages.php:21
|
54 |
+
msgid "Please fill in the required fields."
|
55 |
+
msgstr "Παρακαλώ συμπληρώστε τα απαιτούμενα πεδία."
|
56 |
+
|
57 |
+
#: config/default-form-messages.php:25
|
58 |
+
msgid "You were successfully unsubscribed."
|
59 |
+
msgstr "Απεγγραφήκατε επιτυχώς."
|
60 |
+
|
61 |
+
#: config/default-form-messages.php:29
|
62 |
+
msgid "Given email address is not subscribed."
|
63 |
+
msgstr "Η διεύθυνση email που δώσατε δεν έχει εγγραφεί."
|
64 |
+
|
65 |
+
#: config/default-form-messages.php:33
|
66 |
+
msgid "Please select at least one list."
|
67 |
+
msgstr "Παρακαλώ επιλέξτε τουλάχιστον μία λίστα."
|
68 |
+
|
69 |
+
#: config/default-integration-options.php:5
|
70 |
+
msgid "Sign me up for the newsletter!"
|
71 |
+
msgstr "Να εγγραφώ στο newsletter!"
|
72 |
+
|
73 |
+
#: includes/admin/class-admin-texts.php:62
|
74 |
+
#: includes/forms/views/edit-form.php:6
|
75 |
msgid "Settings"
|
76 |
msgstr "Ρυθμίσεις"
|
77 |
|
78 |
+
#: includes/admin/class-admin-texts.php:80
|
79 |
+
msgid "Documentation"
|
80 |
+
msgstr "Τεκμηρίωση"
|
81 |
+
|
82 |
+
#: includes/admin/class-admin.php:167
|
83 |
+
msgid ""
|
84 |
+
"Success! The cached configuration for your MailChimp lists has been renewed."
|
85 |
+
msgstr "Επιτυχία! Η αποθηκευμένη διαμόρφωση για τις MailChimp λίστες σας έχει ανανεωθεί."
|
86 |
+
|
87 |
+
#: includes/admin/class-admin.php:257
|
88 |
+
msgid ""
|
89 |
+
"This is a pro-only feature. Please upgrade to the premium version to be able"
|
90 |
+
" to use it."
|
91 |
+
msgstr "Αυτή είναι μία αναβαθμισμένη λειτουργία. Παρακαλούμε αναβαθμίστε στην premium έκδοση για να μπορείτε να την χρησιμοποιείτε."
|
92 |
|
93 |
+
#: includes/admin/class-admin.php:323 includes/views/general-settings.php:28
|
94 |
msgid "MailChimp API Settings"
|
95 |
msgstr "Ρυθμίσεις MailChimp API"
|
96 |
|
97 |
+
#: includes/admin/class-admin.php:324
|
98 |
+
#: integrations/ninja-forms/class-ninja-forms.php:34
|
99 |
msgid "MailChimp"
|
100 |
msgstr "MailChimp"
|
101 |
|
102 |
+
#: includes/admin/class-ads.php:33
|
103 |
+
msgid "Upgrade to MailChimp for WordPress Pro"
|
104 |
+
msgstr "Αναβαθμίστε σε MailChimp για Wordpress Pro"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
#: includes/admin/class-ads.php:41
|
107 |
+
msgid ""
|
108 |
+
"Enjoying this plugin? <a href=\"%s\">Purchase our bundle of premium "
|
109 |
+
"features</a> for an even better plugin."
|
110 |
+
msgstr "Σας αρέσει αυτό το πρόσθετο; <a href=\"%s\">Αγοράστε το πακέτο των αναβαθμισμένων, premium χαρακτηριστικών</a> για ένα ακόμη καλύτερο πρόσθετο."
|
111 |
|
112 |
+
#: includes/admin/class-ads.php:62
|
113 |
+
msgid "More subscribers, better newsletters."
|
114 |
+
msgstr "Περισσότεροι συνδρομητές, καλύτερα ενημερωτικά δελτία."
|
115 |
+
|
116 |
+
#: includes/admin/class-ads.php:63
|
117 |
+
msgid ""
|
118 |
+
"Learn how to best grow your lists & write better emails by subscribing to "
|
119 |
+
"our monthly tips."
|
120 |
+
msgstr "Εγγραφείτε στις μηνιαίες συμβουλές μας και μάθετε τον καλύτερο τρόπο να μεγαλώσετε τις λίστες σας καθώς και πως να γράφετε καλύτερα emails."
|
121 |
+
|
122 |
+
#: includes/admin/class-ads.php:66
|
123 |
+
msgid "Email Address"
|
124 |
+
msgstr "Διεύθυνση Email"
|
125 |
+
|
126 |
+
#: includes/admin/class-ads.php:70
|
127 |
+
msgid "First Name"
|
128 |
+
msgstr "Όνομα"
|
129 |
+
|
130 |
+
#: includes/admin/class-ads.php:77
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
msgid "Subscribe"
|
132 |
msgstr "Εγγραφή"
|
133 |
|
134 |
+
#: includes/admin/class-usage-tracking.php:57
|
135 |
+
msgid "Once a month"
|
136 |
+
msgstr "Μία φορά το μήνα"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
#: includes/admin/migrations/3.0-form-1-post-type.php:35
|
139 |
+
msgid "Default sign-up form"
|
140 |
+
msgstr "Προεπιλεγμένη φόρμα εγγραφής"
|
|
|
141 |
|
142 |
+
#: includes/class-api.php:83
|
143 |
+
msgid "Read more about common connectivity issues."
|
144 |
+
msgstr "Διαβάστε περισσότερα για τα συνήθη προβλήματα συνδεσιμότητας."
|
|
|
145 |
|
146 |
+
#: includes/forms/class-admin.php:71 includes/forms/class-admin.php:72
|
147 |
+
#: includes/forms/views/edit-form.php:17
|
148 |
+
msgid "Forms"
|
149 |
+
msgstr "Φόρμες"
|
150 |
|
151 |
+
#: includes/forms/class-admin.php:101 includes/forms/class-admin.php:176
|
152 |
+
msgid "<strong>Success!</strong> Form successfully saved."
|
153 |
+
msgstr "<strong>Επιτυχία!</strong> Η φόρμα αποθηκεύτηκε επιτυχώς."
|
154 |
|
155 |
+
#: includes/forms/class-admin.php:176
|
156 |
+
msgid "Preview form"
|
157 |
+
msgstr "Προβολή φόρμας"
|
|
|
158 |
|
159 |
+
#: includes/forms/class-admin.php:279
|
160 |
+
msgid "Form not found."
|
161 |
+
msgstr "Η φόρμα δεν βρέθηκε."
|
|
|
162 |
|
163 |
+
#: includes/forms/class-admin.php:281
|
164 |
+
msgid "Go back"
|
165 |
+
msgstr "Πίσω"
|
|
|
|
|
166 |
|
167 |
+
#: includes/forms/class-form-previewer.php:162
|
168 |
+
msgid "Form preview"
|
169 |
+
msgstr "Προβολή φόρμας"
|
|
|
|
|
170 |
|
171 |
+
#: includes/forms/class-form-tags.php:51
|
172 |
+
msgid "Replaced with the form response (error or success messages)."
|
173 |
+
msgstr "Αντικαθίσταται με τη φόρμα απάντησης (μηνύματα επιτυχίας ή σφάλματος)."
|
|
|
|
|
174 |
|
175 |
+
#: includes/forms/class-form-tags.php:56
|
176 |
+
msgid "Data from the URL or a submitted form."
|
177 |
+
msgstr "Δεδομένα από το URL ή από μία υποβληθείσα φόρμα."
|
|
|
|
|
178 |
|
179 |
+
#: includes/forms/class-form-tags.php:62
|
180 |
+
#: includes/integrations/class-integration-tags.php:45
|
181 |
+
msgid "Replaced with the number of subscribers on the selected list(s)"
|
182 |
+
msgstr "Αντικαθίσταται με τον αριθμό συνδρομητών στην επιλεγμένη λίστα(ες)"
|
183 |
|
184 |
+
#: includes/forms/class-form-tags.php:67
|
185 |
+
msgid "The email address of the current visitor (if known)."
|
186 |
+
msgstr "Η διεύθυνση email του τρέχοντα επισκέπτη (εάν είναι γωνστή)."
|
|
|
|
|
187 |
|
188 |
+
#: includes/forms/class-form-tags.php:72
|
189 |
+
msgid "The URL of the page."
|
190 |
+
msgstr "Το URL της σελίδας."
|
|
|
191 |
|
192 |
+
#: includes/forms/class-form-tags.php:77
|
193 |
+
msgid "The path of the page."
|
194 |
+
msgstr "Η διαδρομή της σελίδας."
|
|
|
195 |
|
196 |
+
#: includes/forms/class-form-tags.php:82
|
197 |
+
msgid "The current date. Example: %s."
|
198 |
+
msgstr "Η τρέχουσα ημερομηνία. Παράδειγμα: %s."
|
|
|
199 |
|
200 |
+
#: includes/forms/class-form-tags.php:87
|
201 |
+
msgid "The current time. Example: %s."
|
202 |
+
msgstr "Η τρέχουσα ώρα. Παράδειγμα: %s."
|
|
|
203 |
|
204 |
+
#: includes/forms/class-form-tags.php:92
|
205 |
+
msgid "The site's language. Example: %s."
|
206 |
+
msgstr "Η γλώσσα της ιστοσελίδας. Παράδειγμα: %s."
|
|
|
207 |
|
208 |
+
#: includes/forms/class-form-tags.php:97
|
209 |
+
msgid "The visitor's IP address. Example: %s."
|
210 |
+
msgstr "Η διεύθυνση IP του επισκέπτη. Παράδειγμα: %s."
|
|
|
211 |
|
212 |
+
#: includes/forms/class-form-tags.php:102
|
213 |
+
msgid "The property of the currently logged-in user."
|
214 |
+
msgstr "Η ιδιότητα του τρέχοντος συνδεδεμένου χρήστη."
|
|
|
215 |
|
216 |
+
#: includes/forms/class-form.php:128
|
217 |
+
msgid "There is no form with ID %d, perhaps it was deleted?"
|
218 |
+
msgstr "Η φόρμα με ID %d δεν υπάρχει, μήπως έχει διαγραφεί;"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
+
#: includes/forms/class-widget.php:26
|
221 |
+
msgid "Newsletter"
|
222 |
+
msgstr "Newsletter"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
+
#: includes/forms/class-widget.php:30
|
225 |
+
msgid "MailChimp Sign-Up Form"
|
226 |
+
msgstr "Φόρμα Εγγραφής MailChimp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
+
#: includes/forms/class-widget.php:32
|
229 |
+
msgid "Displays your MailChimp for WordPress sign-up form"
|
230 |
+
msgstr "Εμφανίζει την φόρμα εγγραφής του MailChimp για WordPress"
|
231 |
|
232 |
+
#: includes/forms/class-widget.php:75
|
233 |
+
msgid "Title:"
|
234 |
+
msgstr "Τίτλος:"
|
|
|
|
|
235 |
|
236 |
+
#: includes/forms/class-widget.php:92
|
237 |
+
msgid ""
|
238 |
+
"You can edit your sign-up form in the <a href=\"%s\">MailChimp for WordPress"
|
239 |
+
" form settings</a>."
|
240 |
+
msgstr "Μπορείτε να τροποποιήσετε την φόρμα εγγραφής σας στις <a href=\"%s\">Ρυθμίσεις φόρμας του MailChimp για Wordpress</a>."
|
241 |
|
242 |
+
#: includes/forms/views/add-form.php:10 includes/forms/views/add-form.php:60
|
243 |
+
msgid "Add new form"
|
244 |
+
msgstr "Προσθήκη νέας φόρμας"
|
|
|
245 |
|
246 |
+
#: includes/forms/views/add-form.php:27
|
247 |
+
msgid "What is the name of this form?"
|
248 |
+
msgstr "Ποια είναι η ονομασία αυτής της φόρμας;"
|
|
|
249 |
|
250 |
+
#: includes/forms/views/add-form.php:30
|
251 |
+
msgid "Enter your form title.."
|
252 |
+
msgstr "Εισάγετε τον τίτλο της φόρμας σας..."
|
|
|
253 |
|
254 |
+
#: includes/forms/views/add-form.php:37
|
255 |
+
msgid "To which MailChimp lists should this form subscribe?"
|
256 |
+
msgstr "Σε ποιες MailChimp λίστες θα εγγράφει αυτή η φόρμα;"
|
|
|
257 |
|
258 |
+
#: includes/forms/views/add-form.php:54
|
259 |
+
msgid "No lists found. Did you <a href=\"%s\">connect with MailChimp</a>?"
|
260 |
+
msgstr "Δεν βρέθηκαν λίστες. <a href=\"%s\"> συνδεθήκατε με το MailChimp;"
|
|
|
261 |
|
262 |
+
#: includes/forms/views/edit-form.php:4
|
263 |
+
msgid "Fields"
|
264 |
+
msgstr "Πεδία"
|
|
|
265 |
|
266 |
+
#: includes/forms/views/edit-form.php:5
|
267 |
+
msgid "Messages"
|
268 |
+
msgstr "Μηνύματα"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
+
#: includes/forms/views/edit-form.php:7
|
271 |
+
msgid "Appearance"
|
272 |
+
msgstr "Εμφάνιση:"
|
273 |
|
274 |
+
#: includes/forms/views/edit-form.php:15
|
275 |
+
#: includes/integrations/views/integration-settings.php:8
|
276 |
+
#: includes/integrations/views/integrations.php:7
|
277 |
+
#: includes/views/general-settings.php:7
|
278 |
+
msgid "You are here: "
|
279 |
+
msgstr "Είστε εδώ:"
|
280 |
|
281 |
+
#: includes/forms/views/edit-form.php:27
|
282 |
+
msgid "Edit Form"
|
283 |
+
msgstr "Αλλαγή Φόρμας"
|
|
|
284 |
|
285 |
+
#: includes/forms/views/edit-form.php:45
|
286 |
+
msgid "Enter form title here"
|
287 |
+
msgstr "Εισάγετε εδώ τον τίτλο της φόρμας"
|
|
|
|
|
|
|
288 |
|
289 |
+
#: includes/forms/views/edit-form.php:46
|
290 |
+
msgid "Enter the title of your sign-up form"
|
291 |
+
msgstr "Εισάγετε τον τίτλο της φόρμας εγγραφής σας"
|
|
|
292 |
|
293 |
+
#: includes/forms/views/edit-form.php:54
|
294 |
+
msgid "Get shortcode"
|
295 |
+
msgstr "Πάρτε τον σύντομο κωδικό shortcode"
|
|
|
|
|
|
|
296 |
|
297 |
+
#: includes/forms/views/edit-form.php:59
|
298 |
+
msgid "Preview this form"
|
299 |
+
msgstr "Προβολή αυτής της φόρμας"
|
|
|
|
|
|
|
300 |
|
301 |
+
#: includes/forms/views/parts/add-fields-help.php:4
|
302 |
+
#: includes/forms/views/tabs/form-fields.php:10
|
303 |
+
msgid "Add more fields"
|
304 |
+
msgstr "Προσθήκη περισσότερων πεδίων"
|
|
|
|
|
|
|
305 |
|
306 |
+
#: includes/forms/views/parts/add-fields-help.php:9
|
|
|
|
|
|
|
|
|
307 |
msgid ""
|
308 |
+
"To add more fields to your form, you will need to create those fields in "
|
309 |
+
"MailChimp first."
|
310 |
+
msgstr "Για να προσθέσετε περισσότερα πεδία στην φόρμα σας, θα πρέπει πρώτα να τα δημιουργήσετε στο MailChimp."
|
311 |
|
312 |
+
#: includes/forms/views/parts/add-fields-help.php:12
|
313 |
+
msgid "Here's how:"
|
314 |
+
msgstr "Δείτε εδώ πως:"
|
|
|
315 |
|
316 |
+
#: includes/forms/views/parts/add-fields-help.php:17
|
317 |
+
msgid "Log in to your MailChimp account."
|
318 |
+
msgstr "Συνδεθείτε στον MailChimp λογαριασμό σας."
|
|
|
319 |
|
320 |
+
#: includes/forms/views/parts/add-fields-help.php:22
|
321 |
+
msgid "Add list fields to any of your selected lists."
|
322 |
+
msgstr "Προσθέστε πεδία λίστας σε οποιεσδήποτε απο τις επιλεγμένες σας λίστες."
|
|
|
323 |
|
324 |
+
#: includes/forms/views/parts/add-fields-help.php:23
|
325 |
+
msgid "Clicking the following links will take you to the right screen."
|
326 |
+
msgstr "Πατώντας στους ακόλουθους συνδέσμους θα μεταβείτε στην σωστή οθόνη."
|
|
|
327 |
|
328 |
+
#: includes/forms/views/parts/add-fields-help.php:29
|
329 |
+
msgid "Edit list fields for"
|
330 |
+
msgstr "Μεταβολή πεδίων φόρμας για"
|
|
|
|
|
331 |
|
332 |
+
#: includes/forms/views/parts/add-fields-help.php:38
|
333 |
+
msgid ""
|
334 |
+
"Click the following button to have MailChimp for WordPress pick up on your "
|
335 |
+
"changes."
|
336 |
+
msgstr "Πατήστε το παρακάτω για να επιτρέψετε στο MailChimp για WordPress να εφαρμόσει τις αλλαγές σας."
|
337 |
|
338 |
+
#: includes/forms/views/parts/add-fields-help.php:43
|
339 |
+
#: includes/views/parts/lists-overview.php:8
|
340 |
+
msgid "Renew MailChimp lists"
|
341 |
+
msgstr "Ανανέωση λιστών MailChimp"
|
342 |
|
343 |
+
#: includes/forms/views/parts/dynamic-content-tags.php:6
|
344 |
+
msgid "Add dynamic form variable"
|
345 |
+
msgstr "Προσθέστε δυναμική μεταβλητή φόρμας"
|
346 |
+
|
347 |
+
#: includes/forms/views/parts/dynamic-content-tags.php:8
|
348 |
+
msgid ""
|
349 |
+
"The following list of variables can be used to <a href=\"%s\">add some "
|
350 |
+
"dynamic content to your form or success and error messages</a>."
|
351 |
+
msgstr "Η ακόλουθη λίστα μεταβλητών μπορεί να χρησιμοποιηθεί για <a href=\"%s\">να προσθέσετε κάποιο δυναμικό περιεχόμενο στη φόρμα σας ή στα μηνύματα επιτυχίας και σφάλματος</a>."
|
352 |
|
353 |
+
#: includes/forms/views/parts/dynamic-content-tags.php:8
|
354 |
+
msgid "This allows you to personalise your form or response messages."
|
355 |
+
msgstr "Αυτό σας επιτρέπει να προσωποποιήσετε τη φόρμα σας ή τα απαντητικά μηνύματα."
|
|
|
356 |
|
357 |
+
#: includes/forms/views/tabs/form-appearance.php:5
|
358 |
+
msgid "Inherit from %s theme"
|
359 |
+
msgstr "Πρόσληψη από το θέμα %s"
|
|
|
360 |
|
361 |
+
#: includes/forms/views/tabs/form-appearance.php:6
|
362 |
+
msgid "Basic"
|
363 |
+
msgstr "Βασικά"
|
|
|
364 |
|
365 |
+
#: includes/forms/views/tabs/form-appearance.php:7
|
366 |
+
msgid "Form Themes"
|
367 |
+
msgstr "Θέμα Φόρμας"
|
|
|
|
|
368 |
|
369 |
+
#: includes/forms/views/tabs/form-appearance.php:8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
msgid "Light Theme"
|
371 |
msgstr "Ανοιχτόχρωμο Θέμα"
|
372 |
|
373 |
+
#: includes/forms/views/tabs/form-appearance.php:9
|
374 |
+
msgid "Dark Theme"
|
375 |
+
msgstr "Σκούρο Θέμα"
|
376 |
+
|
377 |
+
#: includes/forms/views/tabs/form-appearance.php:10
|
378 |
msgid "Red Theme"
|
379 |
msgstr "Κόκκινο Θέμα"
|
380 |
|
381 |
+
#: includes/forms/views/tabs/form-appearance.php:11
|
|
|
382 |
msgid "Green Theme"
|
383 |
msgstr "Πράσινο Θέμα"
|
384 |
|
385 |
+
#: includes/forms/views/tabs/form-appearance.php:12
|
|
|
386 |
msgid "Blue Theme"
|
387 |
msgstr "Μπλε Θέμα"
|
388 |
|
389 |
+
#: includes/forms/views/tabs/form-appearance.php:25
|
390 |
+
msgid "Form Appearance"
|
391 |
+
msgstr "Εμφάνιση Φόρμας"
|
|
|
392 |
|
393 |
+
#: includes/forms/views/tabs/form-appearance.php:29
|
394 |
+
msgid "Form Style"
|
395 |
+
msgstr "Στυλ Φόρμας"
|
|
|
396 |
|
397 |
+
#: includes/forms/views/tabs/form-appearance.php:48
|
398 |
msgid ""
|
399 |
"If you want to load some default CSS styles, select \"basic formatting "
|
400 |
"styles\" or choose one of the color themes"
|
401 |
msgstr "Αν θέλετε να φορτώσετε μερικά προκαθορισμένα στυλ CSS, επιλέξτε \"βασικά στυλ μορφοποίησης\" ή επιλέξτε ένα από χρωματικά θέματα"
|
402 |
|
403 |
+
#: includes/forms/views/tabs/form-fields.php:6
|
404 |
+
msgid "Form variables"
|
405 |
+
msgstr "Μεταβλητές φόρμας"
|
|
|
406 |
|
407 |
+
#: includes/forms/views/tabs/form-fields.php:13
|
408 |
+
msgid "Form Fields"
|
409 |
+
msgstr "Πεδία Φόρμας"
|
|
|
|
|
410 |
|
411 |
+
#: includes/forms/views/tabs/form-fields.php:19
|
412 |
+
msgid "Enter the HTML code for your form fields.."
|
413 |
+
msgstr "Εισάγετε τον HTML κώδικα για τα πεδία της φόρμας σας."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
|
415 |
+
#: includes/forms/views/tabs/form-fields.php:27
|
|
|
416 |
msgid "Your form is missing the following (required) form fields:"
|
417 |
msgstr "Από την φόρμα σας απουσιάζουν τα παρακάτω (απαιτούμενα) πεδία:"
|
418 |
|
419 |
+
#: includes/forms/views/tabs/form-fields.php:34
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
msgid ""
|
421 |
+
"Use the shortcode %s to display this form inside a post, page or text "
|
422 |
+
"widget."
|
423 |
+
msgstr "Χρησιμοποιήστε το shortcode %s για να εμφανίσετε αυτή τη φόρμα μέσα σε ένα άρθρο, μία σελίδα ή μία μονάδα κειμένου."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
|
425 |
+
#: includes/forms/views/tabs/form-messages.php:3
|
426 |
+
msgid "Form Messages"
|
427 |
+
msgstr "Μηνύματα Φόρμας"
|
428 |
|
429 |
+
#: includes/forms/views/tabs/form-messages.php:10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
msgid "Successfully subscribed"
|
431 |
msgstr "Εγγραφήκατε επιτυχώς"
|
432 |
|
433 |
+
#: includes/forms/views/tabs/form-messages.php:13
|
|
|
|
|
434 |
msgid ""
|
435 |
"The text that shows when an email address is successfully subscribed to the "
|
436 |
"selected list(s)."
|
437 |
msgstr "Το κείμενο που εμφανίζεται όταν μια διεύθυνση ηλ. ταχυδρομείου εγγράφεται επιτυχώς στην επιλεγμένη λίστα (ή λίστες)."
|
438 |
|
439 |
+
#: includes/forms/views/tabs/form-messages.php:17
|
|
|
|
|
440 |
msgid "Invalid email address"
|
441 |
msgstr "Η διεύθυνση e-mail δεν είναι έγκυρη"
|
442 |
|
443 |
+
#: includes/forms/views/tabs/form-messages.php:20
|
|
|
|
|
444 |
msgid "The text that shows when an invalid email address is given."
|
445 |
msgstr "Το κείμενο που εμφανίζεται όταν μια διεύθυνση ηλ. ταχυδρομείου που επιχειρεί εγγραφή δεν είναι έγκυρη."
|
446 |
|
447 |
+
#: includes/forms/views/tabs/form-messages.php:24
|
|
|
|
|
448 |
msgid "Required field missing"
|
449 |
msgstr "Δεν έχει συμπληρωθεί κάποιο απαραίτητο πεδίο"
|
450 |
|
451 |
+
#: includes/forms/views/tabs/form-messages.php:27
|
|
|
|
|
452 |
msgid ""
|
453 |
"The text that shows when a required field for the selected list(s) is "
|
454 |
"missing."
|
455 |
msgstr "Το κείμενο που εμφανίζεται όταν ένα υποχρεωτικό πεδίο για την επιλεγμένη λίστα (ή λίστες) δεν έχει συμπληρωθεί."
|
456 |
|
457 |
+
#: includes/forms/views/tabs/form-messages.php:31
|
|
|
|
|
458 |
msgid "Already subscribed"
|
459 |
msgstr "Έχετε ήδη εγγραφεί"
|
460 |
|
461 |
+
#: includes/forms/views/tabs/form-messages.php:34
|
|
|
|
|
462 |
msgid ""
|
463 |
"The text that shows when the given email is already subscribed to the "
|
464 |
"selected list(s)."
|
465 |
msgstr "Το κείμενο που εμφανίζεται όταν η διεύθυνση ηλ. ταχυδρομείου που επιχειρεί εγγραφή είναι εγγεγραμμένη στην επιλεγμένη λίστα (ή λίστες)."
|
466 |
|
467 |
+
#: includes/forms/views/tabs/form-messages.php:38
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
msgid "General error"
|
469 |
msgstr "Γενικό σφάλμα"
|
470 |
|
471 |
+
#: includes/forms/views/tabs/form-messages.php:41
|
|
|
|
|
472 |
msgid "The text that shows when a general error occured."
|
473 |
msgstr "Το κείμενο που εμφανίζεται όταν προκύπτει κάποιο γενικό σφάλμα."
|
474 |
|
475 |
+
#: includes/forms/views/tabs/form-messages.php:45
|
|
|
|
|
476 |
msgid "Unsubscribed"
|
477 |
msgstr "Απεγγραφή"
|
478 |
|
479 |
+
#: includes/forms/views/tabs/form-messages.php:48
|
|
|
|
|
480 |
msgid ""
|
481 |
"When using the unsubscribe method, this is the text that shows when the "
|
482 |
"given email address is successfully unsubscribed from the selected list(s)."
|
483 |
msgstr "Όταν γίνεται χρήση της μεθόδου κατάργησης εγγραφής, αυτό είναι το κείμενο που εμφανίζεται όταν η συγκεκριμένη διεύθυνση e-mail έχει απεγγραφεί επιτυχώς από την επιλεγμένη λίστα (ή λίστες)."
|
484 |
|
485 |
+
#: includes/forms/views/tabs/form-messages.php:52
|
|
|
|
|
486 |
msgid "Not subscribed"
|
487 |
msgstr "Μη εγγεγραμμένη"
|
488 |
|
489 |
+
#: includes/forms/views/tabs/form-messages.php:55
|
|
|
|
|
490 |
msgid ""
|
491 |
"When using the unsubscribe method, this is the text that shows when the "
|
492 |
"given email address is not on the selected list(s)."
|
493 |
msgstr "Όταν γίνεται χρήση της μεθόδου κατάργησης εγγραφής, αυτό είναι το κείμενο που εμφανίζεται όταν η συγκεκριμένη διεύθυνση e-mail δεν υπάρχει στην επιλεγμένη λίστα (ή λίστες)."
|
494 |
|
495 |
+
#: includes/forms/views/tabs/form-messages.php:64
|
|
|
|
|
496 |
msgid "HTML tags like %s are allowed in the message fields."
|
497 |
msgstr "Οι ετικέτες HTML όπως %s επιτρέπονται στα πεδία του μηνύματος."
|
498 |
|
499 |
+
#: includes/forms/views/tabs/form-settings.php:1
|
500 |
+
msgid "Form Settings"
|
501 |
+
msgstr "Ρυθμίσεις φόρμας"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
|
503 |
+
#: includes/forms/views/tabs/form-settings.php:5
|
504 |
+
msgid "MailChimp specific settings"
|
505 |
+
msgstr "Ρυθμίσεις MailChimp"
|
|
|
|
|
506 |
|
507 |
+
#: includes/forms/views/tabs/form-settings.php:12
|
508 |
+
msgid "Lists this form subscribes to"
|
509 |
+
msgstr "Λίστες στις οποίες γίνεται εγγραφή από αυτή τη φόρμα"
|
510 |
|
511 |
+
#: includes/forms/views/tabs/form-settings.php:15
|
512 |
+
#: includes/integrations/views/integration-settings.php:93
|
513 |
+
msgid "No lists found, <a href=\"%s\">are you connected to MailChimp</a>?"
|
514 |
+
msgstr "Δεν βρέθηκαν λίστες, <a href=\"%s\">είστε συνδεδεμένοι στο MailChimp</a>;"
|
515 |
|
516 |
+
#: includes/forms/views/tabs/form-settings.php:29
|
517 |
msgid ""
|
518 |
+
"Select the list(s) to which people who submit this form should be "
|
519 |
+
"subscribed."
|
520 |
+
msgstr "Επιλέξτε τη λίστα(ες) στην οποία θα εγγράφονται όσοι υποβάλλουν αυτή τη φόρμα."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
|
522 |
+
#: includes/forms/views/tabs/form-settings.php:35
|
523 |
+
msgid "Use double opt-in?"
|
524 |
+
msgstr "Χρήση διπλής επιβεβαίωσης (double opt-in);"
|
525 |
+
|
526 |
+
#: includes/forms/views/tabs/form-settings.php:39
|
527 |
+
#: includes/forms/views/tabs/form-settings.php:54
|
528 |
+
#: includes/forms/views/tabs/form-settings.php:69
|
529 |
+
#: includes/forms/views/tabs/form-settings.php:85
|
530 |
+
#: includes/forms/views/tabs/form-settings.php:115
|
531 |
+
#: includes/integrations/views/integration-settings.php:53
|
532 |
+
#: includes/integrations/views/integration-settings.php:66
|
533 |
+
#: includes/integrations/views/integration-settings.php:117
|
534 |
+
#: includes/integrations/views/integration-settings.php:129
|
535 |
+
#: includes/integrations/views/integration-settings.php:142
|
536 |
+
#: includes/integrations/views/integration-settings.php:163
|
537 |
+
#: includes/integrations/views/integration-settings.php:180
|
538 |
+
#: includes/integrations/views/integration-settings.php:199
|
539 |
+
#: integrations/contact-form-7/class-contact-form-7.php:69
|
540 |
+
msgid "Yes"
|
541 |
+
msgstr "Ναι"
|
542 |
|
543 |
+
#: includes/forms/views/tabs/form-settings.php:43
|
544 |
+
#: includes/forms/views/tabs/form-settings.php:58
|
545 |
+
#: includes/forms/views/tabs/form-settings.php:73
|
546 |
+
#: includes/forms/views/tabs/form-settings.php:89
|
547 |
+
#: includes/forms/views/tabs/form-settings.php:119
|
548 |
+
#: includes/integrations/views/integration-settings.php:54
|
549 |
+
#: includes/integrations/views/integration-settings.php:67
|
550 |
+
#: includes/integrations/views/integration-settings.php:118
|
551 |
+
#: includes/integrations/views/integration-settings.php:130
|
552 |
+
#: includes/integrations/views/integration-settings.php:146
|
553 |
+
#: includes/integrations/views/integration-settings.php:167
|
554 |
+
#: includes/integrations/views/integration-settings.php:184
|
555 |
+
#: includes/integrations/views/integration-settings.php:203
|
556 |
+
#: integrations/contact-form-7/class-contact-form-7.php:69
|
557 |
+
msgid "No"
|
558 |
+
msgstr "Όχι"
|
559 |
|
560 |
+
#: includes/forms/views/tabs/form-settings.php:45
|
561 |
+
#: includes/integrations/views/integration-settings.php:149
|
562 |
msgid ""
|
563 |
+
"Select \"yes\" if you want people to confirm their email address before "
|
564 |
+
"being subscribed (recommended)"
|
565 |
+
msgstr "Επιλέξτε \"ναι\" εάν θέλετε οι χρήστες να επιβεβαιώνουν την ηλεκτρονική τους διεύθυνση προτού εγγραφούν (προτείνεται)"
|
566 |
|
567 |
+
#: includes/forms/views/tabs/form-settings.php:50
|
568 |
+
msgid "Send final welcome email?"
|
569 |
+
msgstr "Αποστολή τελικού email καλωσορίσματος;"
|
|
|
|
|
570 |
|
571 |
+
#: includes/forms/views/tabs/form-settings.php:60
|
572 |
+
#: includes/integrations/views/integration-settings.php:169
|
573 |
msgid ""
|
574 |
+
"Select \"yes\" if you want to send your lists Welcome Email if a subscribe "
|
575 |
+
"succeeds (only when double opt-in is disabled)."
|
576 |
+
msgstr "Επιλέξτε \"ναι\" εάν θέλετε να στείλετε email καλωσορίσματος στις λίστες σας όταν μία εγγραφή είναι επιτυχής (μόνο όταν η διπλή επιβεβαίωση είναι απενεργοποιημένη)."
|
|
|
577 |
|
578 |
+
#: includes/forms/views/tabs/form-settings.php:65
|
579 |
+
#: includes/integrations/views/integration-settings.php:176
|
580 |
+
msgid "Update existing subscribers?"
|
581 |
+
msgstr "Να ενημερωθούν τα στοιχεία των ήδη εγγεγραμμένων;"
|
582 |
|
583 |
+
#: includes/forms/views/tabs/form-settings.php:75
|
584 |
+
#: includes/integrations/views/integration-settings.php:186
|
585 |
msgid ""
|
586 |
+
"Select \"yes\" if you want to update existing subscribers with the data that"
|
587 |
+
" is sent."
|
588 |
+
msgstr "Επιλέξτε \"ναι\" αν θέλετε να ενημερώσετε τους υπάρχοντες συνδρομητές με τα δεδομένα που στάλθηκαν."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
+
#: includes/forms/views/tabs/form-settings.php:81
|
591 |
+
#: includes/integrations/views/integration-settings.php:195
|
592 |
+
msgid "Replace interest groups?"
|
593 |
+
msgstr "Να αντικατασταθούν οι ομάδες ενδιαφερόντων;"
|
594 |
|
595 |
+
#: includes/forms/views/tabs/form-settings.php:92
|
596 |
+
#: includes/integrations/views/integration-settings.php:206
|
597 |
msgid ""
|
598 |
+
"Select \"no\" if you want to add the selected groupings to any previously "
|
599 |
+
"selected groupings when updating a subscriber."
|
600 |
+
msgstr "Επιλέξτε \"όχι\" εάν θέλετε να προσθέσετε την επιλεγμένη ομαδοποίηση σε οποιαδήποτε από τις προγουμένως επιλεγμένες ομαδοποιήσεις όταν αναβαθμίζετε έναν συνδρομήτη."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
|
602 |
+
#: includes/forms/views/tabs/form-settings.php:93
|
603 |
+
#: includes/integrations/views/integration-settings.php:207
|
604 |
+
msgid "What does this do?"
|
605 |
+
msgstr "Τι κάνει αυτό;"
|
606 |
|
607 |
+
#: includes/forms/views/tabs/form-settings.php:104
|
608 |
+
msgid "Form behaviour"
|
609 |
+
msgstr "Συμπεριφορά φόρμας"
|
|
|
610 |
|
611 |
+
#: includes/forms/views/tabs/form-settings.php:111
|
612 |
+
msgid "Hide form after a successful sign-up?"
|
613 |
+
msgstr "Να κρύβεται η φόρμα έπειτα από μία επιτυχημένη εγγραφή;"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
|
615 |
+
#: includes/forms/views/tabs/form-settings.php:122
|
616 |
+
msgid "Select \"yes\" to hide the form fields after a successful sign-up."
|
617 |
+
msgstr "Επιλέξτε \"ναι\" ώστε να κρύβεται η φόρμα έπειτα από μία επιτυχημένη εγγραφή."
|
618 |
|
619 |
+
#: includes/forms/views/tabs/form-settings.php:127
|
620 |
+
msgid "Redirect to URL after successful sign-ups"
|
621 |
+
msgstr "Ανακατεύθυνση σε URL έπειτα από επιτυχημένες εγγραφές"
|
622 |
|
623 |
+
#: includes/forms/views/tabs/form-settings.php:129
|
624 |
+
msgid "Example: %s"
|
625 |
+
msgstr "Παράδειγμα: %s"
|
626 |
|
627 |
+
#: includes/forms/views/tabs/form-settings.php:130
|
628 |
msgid ""
|
629 |
+
"Leave empty or enter <code>0</code> for no redirect. Otherwise, use complete"
|
630 |
+
" (absolute) URLs, including <code>http://</code>."
|
631 |
+
msgstr "Αφήστε το κενό ή εισάγετε <code>0</code> εάν δεν θέλετε να γίνεται ανακατεύθυνση. Διαφορετικά, χρησιμοποιήστε πλήρη (απόλυτα) URL, συμπεριλαμβανομένου του <code>http://</code>."
|
632 |
|
633 |
+
#: includes/integrations/class-admin.php:79
|
634 |
+
#: includes/integrations/class-admin.php:80
|
635 |
+
#: includes/integrations/views/integration-settings.php:10
|
636 |
+
#: includes/integrations/views/integrations.php:9
|
637 |
+
#: includes/integrations/views/integrations.php:17
|
638 |
+
msgid "Integrations"
|
639 |
+
msgstr "Ενσωματώσεις"
|
640 |
|
641 |
+
#: includes/integrations/views/integration-settings.php:20
|
642 |
+
msgid "%s integration"
|
643 |
+
msgstr "%s ενσωμάτωση"
|
644 |
|
645 |
+
#: includes/integrations/views/integration-settings.php:51
|
646 |
+
msgid "Enabled?"
|
647 |
+
msgstr "Ενεργοποιημένο;"
|
648 |
|
649 |
+
#: includes/integrations/views/integration-settings.php:55
|
650 |
msgid ""
|
651 |
+
"Enable the %s integration? This will add a sign-up checkbox to the form."
|
652 |
+
msgstr "Ενεργοποίηση της ενσωμάτωσης %s; Αυτό θα προσθέσει ένα πεδίο εγγραφής στη φόρμα."
|
|
|
653 |
|
654 |
+
#: includes/integrations/views/integration-settings.php:64
|
655 |
+
msgid "Implicit?"
|
656 |
+
msgstr "Σιωπηρά;"
|
657 |
|
658 |
+
#: includes/integrations/views/integration-settings.php:68
|
659 |
msgid ""
|
660 |
+
"Select \"no\" if you want to ask your visitors before they are subscribed "
|
661 |
+
"(recommended)."
|
662 |
+
msgstr "Επιλέξτε \"όχι\" εάν θέλετε να ερωτώνται οι επισκέπτες σας πριν να εγγραφούν (συνίσταται)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
|
664 |
+
#: includes/integrations/views/integration-settings.php:78
|
665 |
+
msgid "MailChimp Lists"
|
666 |
+
msgstr "Λίστες MailChimp"
|
|
|
|
|
|
|
|
|
|
|
|
|
667 |
|
668 |
+
#: includes/integrations/views/integration-settings.php:89
|
669 |
msgid ""
|
670 |
+
"Select the list(s) to which people who check the checkbox should be "
|
671 |
+
"subscribed."
|
672 |
+
msgstr "Επιλέξτε τη λίστα(ες) στην οποία θα εγγράφονται όσοι επιλέγουν το checkbox."
|
673 |
|
674 |
+
#: includes/integrations/views/integration-settings.php:102
|
675 |
+
msgid "Checkbox label text"
|
676 |
+
msgstr "Κείμενο ετικέτας checkbox"
|
|
|
|
|
677 |
|
678 |
+
#: includes/integrations/views/integration-settings.php:105
|
679 |
+
msgid "HTML tags like %s are allowed in the label text."
|
680 |
+
msgstr "Οι ετικέτες HTML όπως %s επιτρέπονται στο κείμενο της ετικέτας."
|
681 |
|
682 |
+
#: includes/integrations/views/integration-settings.php:115
|
683 |
+
msgid "Pre-check the checkbox?"
|
684 |
+
msgstr "Να είναι το checkbox προεπιλεγμένο;"
|
685 |
|
686 |
+
#: includes/integrations/views/integration-settings.php:119
|
687 |
+
msgid "Select \"yes\" if the checkbox should be pre-checked."
|
688 |
+
msgstr "Επιλέξτε \"ναι\" εάν θέλετε να έρχεται προεπιλεγμένο το πεδίο."
|
|
|
|
|
|
|
|
|
689 |
|
690 |
+
#: includes/integrations/views/integration-settings.php:127
|
691 |
+
msgid "Load some default CSS?"
|
692 |
+
msgstr "Να φορτωθεί κάποιο προεπιλεγμένο CSS;"
|
693 |
|
694 |
+
#: includes/integrations/views/integration-settings.php:131
|
695 |
+
msgid "Select \"yes\" if the checkbox appears in a weird place."
|
696 |
+
msgstr "Επιλέξτε \"ναι\" αν το checkbox εμφανίζεται σε ένα περίεργο σημείο."
|
697 |
|
698 |
+
#: includes/integrations/views/integration-settings.php:138
|
699 |
+
msgid "Double opt-in?"
|
700 |
+
msgstr "Διπλή επιβεβαίωση (double opt-in);"
|
701 |
|
702 |
+
#: includes/integrations/views/integration-settings.php:159
|
703 |
+
msgid "Send Welcome Email?"
|
704 |
+
msgstr "Να αποσταλεί email καλωσορίσματος;"
|
|
|
|
|
705 |
|
706 |
+
#: includes/integrations/views/integration-settings.php:244
|
707 |
msgid ""
|
708 |
+
"The selected MailChimp lists require non-default fields, which may prevent "
|
709 |
+
"this integration from working."
|
710 |
+
msgstr "Οι επιλεγμένες MailChimp λίστες απαιτούν μη προκαθορισμένα πεδία, τα οποία μπορεί να προκαλέσουν την μη λειτουργία της ενσωμάτωσης."
|
711 |
|
712 |
+
#: includes/integrations/views/integration-settings.php:245
|
713 |
msgid ""
|
714 |
+
"Please ensure you <a href=\"%s\">configure the plugin to send all required "
|
715 |
+
"fields</a> or <a href=\"%s\">log into your MailChimp account</a> and make "
|
716 |
+
"sure only the email & name fields are marked as required fields for the "
|
717 |
+
"selected list(s)."
|
718 |
+
msgstr "Παρακαλώ διασφαλίστε ότι εσείς <a href=\"%s\">θα διαμορφώσετε το πρόσθετο να στέλνει όλα τα υποχρεωτικά πεδία</a> ή <a href=\"%s\">το αρχείο καταγραφής στον MailChimp λογαριασμό σας</a> και βεβαιωθείτε ότι μόνο τα πεδία email & όνομα είναι χαρακτηρισμένα ως υποχρεωτικά για την επιλεγμένη λίστα(ες)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
|
720 |
+
#: includes/integrations/views/integrations.php:30
|
721 |
+
msgid "Enabled"
|
722 |
+
msgstr "Ενεργοποιημένο"
|
723 |
|
724 |
+
#: includes/integrations/views/integrations.php:31
|
725 |
+
msgid "Name"
|
726 |
+
msgstr "Όνομα"
|
727 |
|
728 |
+
#: includes/integrations/views/integrations.php:32
|
729 |
+
msgid "Description"
|
730 |
+
msgstr "Περιγραφή"
|
731 |
|
732 |
+
#: includes/integrations/views/integrations.php:50
|
733 |
msgid ""
|
734 |
+
"This integration is enabled by default as it requires manual actions to "
|
735 |
+
"work."
|
736 |
+
msgstr "Αυτή η ενσωμάτωση είναι ενεργοποιημένη από προεπιλογή, καθώς απαιτούνται χειροκίνητες ενέργειες για την λειτουργία της."
|
737 |
|
738 |
+
#: includes/integrations/views/integrations.php:57
|
739 |
+
msgid "Configure this integration"
|
740 |
+
msgstr "Διαμόρφωση αυτής της ενσωμάτωσης"
|
741 |
|
742 |
+
#: includes/views/general-settings.php:18
|
743 |
+
msgid "General Settings"
|
744 |
+
msgstr "Γενικές Ρυθμίσεις"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
|
746 |
+
#: includes/views/general-settings.php:35
|
747 |
+
msgid "Status"
|
748 |
+
msgstr "Κατάσταση"
|
|
|
|
|
749 |
|
750 |
+
#: includes/views/general-settings.php:39
|
751 |
+
msgid "CONNECTED"
|
752 |
+
msgstr "ΣΥΝΔΕΔΕΜΕΝΟ"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
|
754 |
+
#: includes/views/general-settings.php:41
|
755 |
+
msgid "NOT CONNECTED"
|
756 |
+
msgstr "ΜΗ ΣΥΝΔΕΔΕΜΕΝΟ"
|
757 |
|
758 |
+
#: includes/views/general-settings.php:48
|
759 |
+
msgid "API Key"
|
760 |
+
msgstr "Κλειδί API"
|
761 |
|
762 |
+
#: includes/views/general-settings.php:50
|
763 |
+
msgid "Your MailChimp API key"
|
764 |
+
msgstr "Το κλειδί API του MailChimp"
|
|
|
765 |
|
766 |
+
#: includes/views/general-settings.php:52
|
767 |
+
msgid "The API key for connecting with your MailChimp account."
|
768 |
+
msgstr "Το κλειδί API για την σύνδεση με τον MailChimp λογαριασμό σας."
|
|
|
769 |
|
770 |
+
#: includes/views/general-settings.php:53
|
771 |
+
msgid "Get your API key here."
|
772 |
+
msgstr "Πάρτε το κλειδί API εδώ."
|
|
|
773 |
|
774 |
+
#: includes/views/general-settings.php:65
|
775 |
+
msgid "Usage Tracking"
|
776 |
+
msgstr "Εντοπισμός Χρήσης"
|
777 |
|
778 |
+
#: includes/views/general-settings.php:71
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
msgid ""
|
780 |
+
"Allow us to anonymously track how this plugin is used to help us make it "
|
781 |
+
"better fit your needs."
|
782 |
+
msgstr "Επιτρέψτε μας να εντοπίζουμε ανώνυμα, την χρήση αυτού του πρόσθετου, ώστε να μπορέσουμε να το προσαρμόσουμε καλύτερα στις ανάγκες σας."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
|
784 |
+
#: includes/views/general-settings.php:73
|
785 |
+
msgid "This is what we track."
|
786 |
+
msgstr "Αυτό είναι που εντοπίζουμε."
|
787 |
|
788 |
+
#: includes/views/parts/admin-footer.php:11
|
789 |
msgid ""
|
790 |
+
"MailChimp for WordPress is in need of translations. Is the plugin not "
|
791 |
+
"translated in your language or do you spot errors with the current "
|
792 |
+
"translations? Helping out is easy! Head over to <a href=\"%s\">the "
|
793 |
+
"translation project and click \"help translate\"</a>."
|
794 |
+
msgstr "Το MailChimp για WordPress έχει ανάγκη από μεταφραστές. Δεν έχει μεταφραστεί το πρόσθετο στη γλώσσα σας ή βλέπετε σφάλματα στην υπάρχουσα μετάφραση; Είναι εύκολο να βοηθήσετε! Πηγαίνετε στο <a href=\"%s\">project της μετάφρασης και κλικάρετε \"help translate\"</a>."
|
795 |
|
796 |
+
#: includes/views/parts/admin-footer.php:31
|
797 |
msgid ""
|
798 |
+
"This plugin is not developed by or affiliated with MailChimp in any way."
|
799 |
+
msgstr "Αυτό το πρόσθετο δεν έχει αναπτυχθεί ή δεν είναι με κανένα τρόπο συνδεδεμένο με το MailChimp."
|
|
|
800 |
|
801 |
+
#: includes/views/parts/lists-overview.php:1
|
802 |
+
msgid "Your MailChimp Account"
|
803 |
+
msgstr "Ο MailChimp Λογαριασμός σας"
|
804 |
|
805 |
+
#: includes/views/parts/lists-overview.php:2
|
806 |
msgid ""
|
807 |
+
"The table below shows your MailChimp lists and their details. If you just "
|
808 |
+
"applied changes to your MailChimp lists, please use the following button to "
|
809 |
+
"renew the cached lists configuration."
|
810 |
+
msgstr "Ο παρακάτω πίνακας παρουσιάζει τα δεδομένα των λιστών σας στο MailChimp και τις λεπτομέρειές τους. Αν μόλις πραγματοποιήσατε αλλαγές στις λίστες σας στο MailChimp, παρακαλώ χρησιμοποιήστε το παρακάτω κουμπί για να ανανεώσετε τα δεδομένα προσωρινής μνήμης."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
|
812 |
+
#: includes/views/parts/lists-overview.php:14
|
813 |
+
msgid "No lists were found in your MailChimp account"
|
|
|
|
|
|
|
|
|
814 |
msgstr "Δεν βρέθηκαν λίστες στον λογαριασμό σας στο MailChimp."
|
815 |
|
816 |
+
#: includes/views/parts/lists-overview.php:16
|
817 |
+
msgid "A total of %d lists were found in your MailChimp account."
|
818 |
+
msgstr "Συνολικά %d λίστες βρέθηκαν στον MailChimp λογαριασμό σας"
|
|
|
|
|
819 |
|
820 |
+
#: includes/views/parts/lists-overview.php:21
|
821 |
+
msgid "List Name"
|
822 |
+
msgstr "Όνομα Λίστας"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
|
824 |
+
#: includes/views/parts/lists-overview.php:22
|
825 |
+
msgid "ID"
|
826 |
+
msgstr "ID"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
827 |
|
828 |
+
#: includes/views/parts/lists-overview.php:23
|
829 |
+
msgid "Subscribers"
|
830 |
+
msgstr "Συνδρομητές"
|
831 |
|
832 |
+
#: includes/views/parts/lists-overview.php:45
|
833 |
+
msgid "Edit this list in MailChimp"
|
834 |
+
msgstr "Μεταβολή αυτής της λίστας στο MailChimp"
|
835 |
|
836 |
+
#: includes/views/parts/lists-overview.php:59
|
837 |
+
msgid "%s (%s) with field type %s."
|
838 |
+
msgstr "%s (%s) με τύπο πεδίου %s."
|
839 |
|
840 |
+
#: includes/views/parts/lists-overview.php:83
|
841 |
+
msgid "%s (ID: %s) with type %s."
|
842 |
+
msgstr "%s (ID: %s) με τύπο %s."
|
843 |
|
844 |
+
#: integrations/contact-form-7/admin-before.php:2
|
|
|
|
|
|
|
|
|
845 |
msgid ""
|
846 |
+
"To integrate with Contact Form 7, configure the settings below and then add "
|
847 |
+
"%s to your CF7 form mark-up."
|
848 |
+
msgstr "Για ενσωμάτωση με Contact Form 7, διαμορφώστε τις παρακάτω ρυθμίσεις και μετά προσθέστε το %s στο CF7 mark-up της φόρμας."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
|
850 |
+
#: integrations/custom/admin-before.php:2
|
|
|
|
|
|
|
|
|
|
|
851 |
msgid ""
|
852 |
+
"To get a custom integration to work, include the following HTML in the form "
|
853 |
+
"you are trying to integrate with."
|
854 |
+
msgstr "Για να κάνετε μία προσαρμοσμένη ενσωμάτωση να λειτουργήσει, συμπεριλάβετε τον ακόλουθο HTML κώδικα στην φόρμα την οποία προσπαθείτε να ενσωματώσετε."
|
855 |
|
856 |
+
#: integrations/woocommerce/class-woocommerce.php:102
|
857 |
+
msgid "Order #%d"
|
858 |
+
msgstr "Παραγγελία #%d"
|
859 |
|
860 |
+
#. Plugin Name of the plugin/theme
|
861 |
+
msgid "MailChimp for WordPress"
|
862 |
+
msgstr "MailChimp για το WordPress"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
863 |
|
864 |
#. Plugin URI of the plugin/theme
|
865 |
+
msgid ""
|
866 |
+
"https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-"
|
867 |
+
"wp&utm_campaign=plugins-page"
|
868 |
+
msgstr "https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page"
|
869 |
|
870 |
#. Description of the plugin/theme
|
871 |
+
msgid ""
|
872 |
+
"MailChimp for WordPress by ibericode. Adds various highly effective sign-up "
|
873 |
+
"methods to your site."
|
874 |
+
msgstr "MailChimp για WordPress από την ibericode. Προσθέτει ποικίλες και υψηλής απόδοσης μεθόδους εγγραφής στον ιστότοπό σας."
|
875 |
|
876 |
#. Author of the plugin/theme
|
877 |
+
msgid "ibericode"
|
878 |
+
msgstr "ibericode"
|
879 |
|
880 |
#. Author URI of the plugin/theme
|
881 |
+
msgid "https://ibericode.com/"
|
882 |
+
msgstr "https://ibericode.com/"
|
languages/mailchimp-for-wp-fr_FR.mo
CHANGED
Binary file
|
languages/mailchimp-for-wp-fr_FR.po
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
# fgerber <gerber.francois@gmail.com>, 2014-2015
|
13 |
# Juliette Mouquod <juliette@lapinblanc.co.uk>, 2015
|
14 |
# Lydie Lardoux <lafelilycouturiere@gmail.com>, 2015
|
|
|
15 |
# sleininger <stef.leininger@gmail.com>, 2014
|
16 |
# Yan Chardard <ychardard@gmail.com>, 2016
|
17 |
msgid ""
|
@@ -19,8 +20,8 @@ msgstr ""
|
|
19 |
"Project-Id-Version: MailChimp for WordPress\n"
|
20 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-wp\n"
|
21 |
"POT-Creation-Date: 2015-11-30 10:15:18+00:00\n"
|
22 |
-
"PO-Revision-Date: 2016-
|
23 |
-
"Last-Translator:
|
24 |
"Language-Team: French (France) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/fr_FR/)\n"
|
25 |
"MIME-Version: 1.0\n"
|
26 |
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -30,7 +31,7 @@ msgstr ""
|
|
30 |
|
31 |
#: config/default-form-content.php:3
|
32 |
msgid "Email address"
|
33 |
-
msgstr "Adresse
|
34 |
|
35 |
#: config/default-form-content.php:4
|
36 |
msgid "Your email address"
|
@@ -44,7 +45,7 @@ msgstr "Abonnez-vous"
|
|
44 |
msgid ""
|
45 |
"Thank you, your sign-up request was successful! Please check your email "
|
46 |
"inbox to confirm."
|
47 |
-
msgstr "Merci, votre inscription
|
48 |
|
49 |
#: config/default-form-messages.php:9
|
50 |
msgid "Oops. Something went wrong. Please try again later."
|
@@ -68,7 +69,7 @@ msgstr "Vous avez bien été désinscrit."
|
|
68 |
|
69 |
#: config/default-form-messages.php:29
|
70 |
msgid "Given email address is not subscribed."
|
71 |
-
msgstr "L'adresse
|
72 |
|
73 |
#: config/default-form-messages.php:33
|
74 |
msgid "Please select at least one list."
|
12 |
# fgerber <gerber.francois@gmail.com>, 2014-2015
|
13 |
# Juliette Mouquod <juliette@lapinblanc.co.uk>, 2015
|
14 |
# Lydie Lardoux <lafelilycouturiere@gmail.com>, 2015
|
15 |
+
# Marie Chausse <mariechausse83@gmail.com>, 2016
|
16 |
# sleininger <stef.leininger@gmail.com>, 2014
|
17 |
# Yan Chardard <ychardard@gmail.com>, 2016
|
18 |
msgid ""
|
20 |
"Project-Id-Version: MailChimp for WordPress\n"
|
21 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mailchimp-for-wp\n"
|
22 |
"POT-Creation-Date: 2015-11-30 10:15:18+00:00\n"
|
23 |
+
"PO-Revision-Date: 2016-07-11 10:58+0000\n"
|
24 |
+
"Last-Translator: Marie Chausse <mariechausse83@gmail.com>\n"
|
25 |
"Language-Team: French (France) (http://www.transifex.com/ibericode/mailchimp-for-wordpress/language/fr_FR/)\n"
|
26 |
"MIME-Version: 1.0\n"
|
27 |
"Content-Type: text/plain; charset=UTF-8\n"
|
31 |
|
32 |
#: config/default-form-content.php:3
|
33 |
msgid "Email address"
|
34 |
+
msgstr "Adresse e-mail"
|
35 |
|
36 |
#: config/default-form-content.php:4
|
37 |
msgid "Your email address"
|
45 |
msgid ""
|
46 |
"Thank you, your sign-up request was successful! Please check your email "
|
47 |
"inbox to confirm."
|
48 |
+
msgstr "Merci, votre inscription est réussie! Veuillez regarder votre boite mail, et cliquer sur le lien de confirmation."
|
49 |
|
50 |
#: config/default-form-messages.php:9
|
51 |
msgid "Oops. Something went wrong. Please try again later."
|
69 |
|
70 |
#: config/default-form-messages.php:29
|
71 |
msgid "Given email address is not subscribed."
|
72 |
+
msgstr "L'adresse e-mail donnée n'est pas inscrite."
|
73 |
|
74 |
#: config/default-form-messages.php:33
|
75 |
msgid "Please select at least one list."
|
mailchimp-for-wp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MailChimp for WordPress
|
4 |
Plugin URI: https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
|
5 |
Description: MailChimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
|
6 |
-
Version: 3.1.
|
7 |
Author: ibericode
|
8 |
Author URI: https://ibericode.com/
|
9 |
Text Domain: mailchimp-for-wp
|
@@ -47,7 +47,7 @@ function __mc4wp_load_plugin() {
|
|
47 |
}
|
48 |
|
49 |
// bootstrap the core plugin
|
50 |
-
define( 'MC4WP_VERSION', '3.1.
|
51 |
define( 'MC4WP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
52 |
define( 'MC4WP_PLUGIN_URL', plugins_url( '/' , __FILE__ ) );
|
53 |
define( 'MC4WP_PLUGIN_FILE', __FILE__ );
|
3 |
Plugin Name: MailChimp for WordPress
|
4 |
Plugin URI: https://mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
|
5 |
Description: MailChimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
|
6 |
+
Version: 3.1.12
|
7 |
Author: ibericode
|
8 |
Author URI: https://ibericode.com/
|
9 |
Text Domain: mailchimp-for-wp
|
47 |
}
|
48 |
|
49 |
// bootstrap the core plugin
|
50 |
+
define( 'MC4WP_VERSION', '3.1.12' );
|
51 |
define( 'MC4WP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
52 |
define( 'MC4WP_PLUGIN_URL', plugins_url( '/' , __FILE__ ) );
|
53 |
define( 'MC4WP_PLUGIN_FILE', __FILE__ );
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Ibericode, DvanKooten, hchouhan, lapzor
|
|
3 |
Donate link: https://mc4wp.com/#utm_source=wp-plugin-repo&utm_medium=mailchimp-for-wp&utm_campaign=donate-link
|
4 |
Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mailchimp forms, mailchimp integrations
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -188,6 +188,18 @@ MailChimp for WordPress is being developed on GitHub. If you want to collaborate
|
|
188 |
== Changelog ==
|
189 |
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
#### 3.1.11 - July 5, 2016
|
192 |
|
193 |
**Improvements**
|
3 |
Donate link: https://mc4wp.com/#utm_source=wp-plugin-repo&utm_medium=mailchimp-for-wp&utm_campaign=donate-link
|
4 |
Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mailchimp forms, mailchimp integrations
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.6
|
7 |
+
Stable tag: 3.1.12
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
188 |
== Changelog ==
|
189 |
|
190 |
|
191 |
+
#### 3.1.12 - July 28. 2016
|
192 |
+
|
193 |
+
**Improvements**
|
194 |
+
|
195 |
+
- Smarter scrolling after submitting form & reloading page.
|
196 |
+
- Format output of `{subscriber_count}` tag.
|
197 |
+
- You can now use `<img>` in your form messages.
|
198 |
+
- Add MailChimp API error code to debug log lines.
|
199 |
+
- Add plugin name + version to User-Agent header for all MailChimp API requests.
|
200 |
+
- Make sure value of MC_LANGUAGE field is limited to 2 characters.
|
201 |
+
|
202 |
+
|
203 |
#### 3.1.11 - July 5, 2016
|
204 |
|
205 |
**Improvements**
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitb932e8d856f1c2bd26739f04432f9a2c::getLoader();
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit8bc957e284097098537f4d863c9f1a01 {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInitb932e8d856f1c2bd26739f04432f9a2c {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitb932e8d856f1c2bd26739f04432f9a2c', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb932e8d856f1c2bd26739f04432f9a2c', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|