diff --git a/README.md b/README.md index d43fc49..cef6c44 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,15 @@ Enhance and extend the WordPress Customize in your themes. **Tags:** [wordpress](https://wordpress.org/plugins/tags/wordpress), [customizer](https://wordpress.org/plugins/tags/customizer), [options framework](https://wordpress.org/plugins/tags/options-framework), [theme](https://wordpress.org/plugins/tags/theme) **Requires at least:** 4.9.4 **Tested up to:** 4.9.4 -**Stable tag:** 1.0.22 -**License:** [GPLv3](http://www.gnu.org/licenses/gpl-3.0.html) +**Stable tag:** 1.1.1 +**License:** [GPLv3+](http://www.gnu.org/licenses/gpl-3.0.html) **Requires PHP:** 5.2.4 **Donate link:** https://liberapay.com/knitkode/donate ## Description ## -[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/customize-plus.svg)]() -[![GitHub release](https://img.shields.io/github/release/knitkode/customize-plus.svg)]() +[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/customize-plus.svg)](https://wordpress.org/plugins/customize-plus) +[![GitHub release](https://img.shields.io/github/release/knitkode/customize-plus.svg)](https://github.com/knitkode/customize-plus/releases/latest) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/facc393563dd4ef49ff3b2dea2bd2f7c)](https://www.codacy.com/app/knitkode/customize-plus?utm_source=customize-plus&utm_medium=github&utm_content=badge_codacy&utm_campaign=readme) Customize Plus brings powerful custom controls fully integrated in the WordPress Customize. The code, the admin UI and the API totally looks like WordPress, as it should be. Customize Plus extends the WordPress API to create all the controls you need leveraging the JavaScript API. All the `theme_mods` or `options` managed by Customize Plus controls are automatically validated and sanitized. You do not even need to define the fallback value when retrieving them. End users will also benefit from this plugin, for instance they will be able to separately reset the control values of each control to the initial session or factory value. This and many other features are extended in [Customize Plus Premium](https://knitkode.com/products/customize-plus-premium/) enriching the Customize experience not only for developers but also for users. Developers will also find useful the plugin [Customize Plus Builder](https://knitkode.com/products/customize-plus-builder/) to further improve their development experience. @@ -83,7 +83,7 @@ Log into WordPress admin and activate the ‘Loco Translate’ plugin through th Go to Loco Translate > Home in the left-hand menu to start translating ### Theme integration ### -Checkout the [documentation here](https://knitkode.com/docs/customize-plus/getting-started/integration?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). A tool to facilitate this task is [Customize Plus Builder](https://knitkode.com/products/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme), you can [try it here](https://knitkode.com/customize-plus-builder). +Checkout the [documentation here](https://knitkode.com/docs/customize-plus/getting-started/integration?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). A tool to facilitate this task is [Customize Plus Builder](https://knitkode.com/products/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme), you can [try it here](https://knitkode.com/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). ### Translations ### * English - default @@ -98,11 +98,20 @@ Checkout the [documentation here](https://knitkode.com/docs/customize-plus/getti Documentation can be found at [knitkode.com/docs/customize-plus](https://knitkode.com/docs/customize-plus?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=faq&utm_campaign=readme) ### How do I get help? ### -Help is provided via the plugin support forum only. Please visit the [support page](https://knitkode.com/support) to see other options. +Help is provided via the plugin support forum only. Please visit the [support page](https://knitkode.com/support?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=faq&utm_campaign=readme) to see other options. + +### Can I see a quick demo? ### +Yes, try out the always up to date [official demo theme](https://github.com/knitkode/customize-plus-demo). ## Changelog ## +### 1.1.1: 24/02/2017 ### +* Bugfixing +* Moved control templates to JavaScript control's classes +* Control's classes use now a React ready methods naming and lifecycle style +* Support warnings in $validity notifications + ### 1.0.21: 22/02/2017 ### * Fix 'dancing char' on Base Input Control diff --git a/assets/js/customize.min.js b/assets/js/customize.min.js deleted file mode 100644 index fbb4b54..0000000 --- a/assets/js/customize.min.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - * classList.js: Cross-browser full element.classList implementation. - * 1.2.20171210 - * - * By Eli Grey, http://eligrey.com - * License: Dedicated to the public domain. - * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md - */ -var t,i,e,n,r,s,o;"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){"use strict";if("Element"in t){var i="classList",e="prototype",n=t.Element[e],r=Object,s=String[e].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[e].indexOf||function(t){for(var i=0,e=this.length;i/gm,">")}function e(t){return t.nodeName.toLowerCase()}function n(t,i){var e=t&&t.exec(i);return e&&0==e.index}function r(t){return/no-?highlight|plain|text/.test(t)}function s(t,i){var e,n={};for(e in t)n[e]=t[e];if(i)for(e in i)n[e]=i[e];return n}function o(t){var i=[];return function t(n,r){for(var s=n.firstChild;s;s=s.nextSibling)3==s.nodeType?r+=s.nodeValue.length:1==s.nodeType&&(i.push({event:"start",offset:r,node:s}),r=t(s,r),e(s).match(/br|hr|img|input/)||i.push({event:"stop",offset:r,node:s}));return r}(t,0),i}function a(t,e,r,o){function c(t,i,e,n){var r='')+i+(e?"":"")}function l(){return void 0!==b.sL?function(){var t="string"==typeof b.sL;if(t&&!p[b.sL])return i(w);var e=t?a(b.sL,w,!0,_[b.sL]):u(w,b.sL.length?b.sL:void 0);return b.r>0&&(k+=e.r),t&&(_[b.sL]=e.top),c(e.language,e.value,!1,!0)}():function(){if(!b.k)return i(w);var t,e,n,r="",s=0;b.lR.lastIndex=0;for(var o=b.lR.exec(w);o;){r+=i(w.substr(s,o.index-s));var a=(t=b,e=o,n=g.cI?e[0].toLowerCase():e[0],t.k.hasOwnProperty(n)&&t.k[n]);a?(k+=a[1],r+=c(a[0],i(o[0]))):r+=i(o[0]),s=b.lR.lastIndex,o=b.lR.exec(w)}return r+i(w.substr(s))}()}function h(t,e){var n=t.cN?c(t.cN,"",!0):"";t.rB?(y+=n,w=""):t.eB?(y+=i(e)+n,w=""):(y+=n,w=e),b=Object.create(t,{parent:{value:b}})}function v(t,e){if(w+=t,void 0===e)return y+=l(),0;var s=function(t,i){for(var e=0;e"),k+=b.r,b=b.parent}while(b!=a.parent);return u.eE&&(y+=i(e)),w="",a.starts&&h(a.starts,""),u.rE?0:e.length}if(o=e,!r&&n(b.iR,o))throw Error('Illegal lexeme "'+e+'" for mode "'+(b.cN||"")+'"');return w+=e,e.length||1}var g=f(t);if(!g)throw Error('Unknown language: "'+t+'"');!function(t){function i(t){return t&&t.source||t}function e(e,n){return RegExp(i(e),"m"+(t.cI?"i":"")+(n?"g":""))}!function n(r,o){if(!r.compiled){if(r.compiled=!0,r.k=r.k||r.bK,r.k){var a={},u=function(i,e){t.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(t){var e=t.split("|");a[e[0]]=[i,e[1]?+e[1]:1]})};"string"==typeof r.k?u("keyword",r.k):Object.keys(r.k).forEach(function(t){u(t,r.k[t])}),r.k=a}r.lR=e(r.l||/\b\w+\b/,!0),o&&(r.bK&&(r.b="\\b("+r.bK.split(" ").join("|")+")\\b"),r.b||(r.b=/\B|\b/),r.bR=e(r.b),r.e||r.eW||(r.e=/\B|\b/),r.e&&(r.eR=e(r.e)),r.tE=i(r.e)||"",r.eW&&o.tE&&(r.tE+=(r.e?"|":"")+o.tE)),r.i&&(r.iR=e(r.i)),void 0===r.r&&(r.r=1),r.c||(r.c=[]);var c=[];r.c.forEach(function(t){t.v?t.v.forEach(function(i){c.push(s(t,i))}):c.push("self"==t?r:t)}),r.c=c,r.c.forEach(function(t){n(t,r)}),r.starts&&n(r.starts,o);var l=r.c.map(function(t){return t.bK?"\\.?("+t.b+")\\.?":t.b}).concat([r.tE,r.i]).map(i).filter(Boolean);r.t=l.length?e(l.join("|"),!0):{exec:function(){return null}}}}(t)}(g);var m,b=o||g,_={},y="";for(m=b;m!=g;m=m.parent)m.cN&&(y=c(m.cN,"",!0)+y);var w="",k=0;try{for(var x,S,F=0;b.t.lastIndex=F,x=b.t.exec(e);)S=v(e.substr(F,x.index-F),x[0]),F=x.index+S;for(v(e.substr(F)),m=b;m.parent;m=m.parent)m.cN&&(y+="");return{r:k,value:y,language:t,top:b}}catch(t){if(-1!=t.message.indexOf("Illegal"))return{r:0,value:i(e)};throw t}}function u(t,e){e=e||d.languages||Object.keys(p);var n={r:0,value:i(t)},r=n;return e.forEach(function(i){if(f(i)){var e=a(i,t,!1);e.language=i,e.r>r.r&&(r=e),e.r>n.r&&(r=n,n=e)}}),r.language&&(n.second_best=r),n}function c(t){return d.tabReplace&&(t=t.replace(/^((<[^>]+>|\t)+)/gm,function(t,i){return i.replace(/\t/g,d.tabReplace)})),d.useBR&&(t=t.replace(/\n/g,"
")),t}function l(t){var n,s,l,h,p,g=function(t){var i,e,n,s=t.className+" ";if(s+=t.parentNode?t.parentNode.className:"",e=/\blang(?:uage)?-([\w-]+)\b/.exec(s))return f(e[1])?e[1]:"no-highlight";for(i=0,n=(s=s.split(/\s+/)).length;n>i;i++)if(f(s[i])||r(s[i]))return s[i]}(t);if(!r(g)){var m;d.useBR?(m=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=t.innerHTML.replace(/\n/g,"").replace(//g,"\n"):m=t;var b=m.textContent,_=g?a(g,b,!0):u(b),y=o(m);if(y.length){var w=document.createElementNS("http://www.w3.org/1999/xhtml","div");w.innerHTML=_.value,_.value=function(t,n,r){function s(){return t.length&&n.length?t[0].offset!=n[0].offset?t[0].offset"}function a(t){l+=""}function u(t){("start"==t.event?o:a)(t.node)}for(var c=0,l="",h=[];t.length||n.length;){var f=s();if(l+=i(r.substr(c,f[0].offset-c)),c=f[0].offset,f==t){h.reverse().forEach(a);do{u(f.splice(0,1)[0]),f=s()}while(f==t&&f.length&&f[0].offset==c);h.reverse().forEach(o)}else"start"==f[0].event?h.push(f[0].node):h.pop(),u(f.splice(0,1)[0])}return l+i(r.substr(c))}(y,o(w),b)}_.value=c(_.value),t.innerHTML=_.value,t.className=(n=t.className,s=g,l=_.language,h=s?v[s]:l,p=[n.trim()],n.match(/\bhljs\b/)||p.push("hljs"),-1===n.indexOf(h)&&p.push(h),p.join(" ").trim()),t.result={language:_.language,re:_.r},_.second_best&&(t.second_best={language:_.second_best.language,re:_.second_best.r})}}function h(){if(!h.called){h.called=!0;var t=document.querySelectorAll("pre code");Array.prototype.forEach.call(t,l)}}function f(t){return p[t]||p[v[t]]}var d={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},p={},v={};return t.highlight=a,t.highlightAuto=u,t.fixMarkup=c,t.highlightBlock=l,t.configure=function(t){d=s(d,t)},t.initHighlighting=h,t.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)},t.registerLanguage=function(i,e){var n=p[i]=e(t);n.aliases&&n.aliases.forEach(function(t){v[t]=i})},t.listLanguages=function(){return Object.keys(p)},t.getLanguage=f,t.inherit=s,t.IR="[a-zA-Z]\\w*",t.UIR="[a-zA-Z_]\\w*",t.NR="\\b\\d+(\\.\\d+)?",t.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",t.BNR="\\b(0b[01]+)",t.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",t.BE={b:"\\\\[\\s\\S]",r:0},t.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[t.BE]},t.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[t.BE]},t.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},t.C=function(i,e,n){var r=t.inherit({cN:"comment",b:i,e:e,c:[]},n||{});return r.c.push(t.PWM),r.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),r},t.CLCM=t.C("//","$"),t.CBCM=t.C("/\\*","\\*/"),t.HCM=t.C("#","$"),t.NM={cN:"number",b:t.NR,r:0},t.CNM={cN:"number",b:t.CNR,r:0},t.BNM={cN:"number",b:t.BNR,r:0},t.CSSNM={cN:"number",b:t.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},t.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[t.BE,{b:/\[/,e:/\]/,r:0,c:[t.BE]}]},t.TM={cN:"title",b:t.IR,r:0},t.UTM={cN:"title",b:t.UIR,r:0},t},"undefined"!=typeof exports?t(exports):(window.hljs=t({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs})),hljs.registerLanguage("javascript",function(t){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"pi",r:10,b:/^\s*['"]use (strict|asm)['"]/},t.ASM,t.QSM,{cN:"string",b:"`",e:"`",c:[t.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},t.CLCM,t.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:t.CNR}],r:0},{b:"("+t.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[t.CLCM,t.CBCM,t.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[t.inherit(t.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[t.CLCM,t.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+t.IR,r:0},{bK:"import",e:"[;$]",k:"import from as",c:[t.ASM,t.QSM]},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},t.UTM]}],i:/#/}}),hljs.registerLanguage("php",function(t){var i={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},e={cN:"preprocessor",b:/<\?(php)?|\?>/},n={cN:"string",c:[t.BE,e],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},t.inherit(t.ASM,{i:null}),t.inherit(t.QSM,{i:null})]},r={v:[t.BNM,t.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[t.CLCM,t.HCM,t.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},e]}),t.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:t.UIR}),{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[t.BE]},e,i,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[t.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",i,t.CBCM,n,r]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},t.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[t.UTM]},{bK:"use",e:";",c:[t.UTM]},{b:"=>"},n,r]}}),hljs.registerLanguage("xml",function(t){var i={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},e={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},t.C("\x3c!--","--\x3e",{r:10}),{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[e],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[e],starts:{e:"<\/script>",rE:!0,sL:["actionscript","javascript","handlebars"]}},i,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},e]}]}}),hljs.registerLanguage("sql",function(t){var i=t.C("--","$");return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release|0 unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last|0 last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link|0 list|0 listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock|0 locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop|0 low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise|0 rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release|0 release_lock relies_on relocate rely rem remainder repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[t.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[t.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[t.BE]},t.CNM,t.CBCM,i]},t.CBCM,i]}}),hljs.registerLanguage("css",function(t){var i="[a-zA-Z-][a-zA-Z0-9_-]*",e={cN:"function",b:i+"\\(",rB:!0,eE:!0,e:"\\("},n={cN:"rule",b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{cN:"value",eW:!0,eE:!0,c:[e,t.CSSNM,t.QSM,t.ASM,t.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[t.CBCM,n,{cN:"id",b:/\#[A-Za-z0-9_-]+/},{cN:"class",b:/\.[A-Za-z0-9_-]+/},{cN:"attr_selector",b:/\[/,e:/\]/,i:"$"},{cN:"pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e,t.ASM,t.QSM,t.CSSNM]}]},{cN:"tag",b:i,r:0},{cN:"rules",b:"{",e:"}",i:/\S/,c:[t.CBCM,n]}]}}),hljs.registerLanguage("json",function(t){var i={literal:"true false null"},e=[t.QSM,t.CNM],n={cN:"value",e:",",eW:!0,eE:!0,c:e,k:i},r={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[t.BE],i:"\\n",starts:n}],i:"\\S"},s={b:"\\[",e:"\\]",c:[t.inherit(n,{cN:null})],i:"\\S"};return e.splice(e.length,0,r,s),{c:e,k:i,i:"\\S"}}),function(){"use strict";var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:h,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:h,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:h,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function i(i){this.tokens=[],this.tokens.links={},this.options=i||d.defaults,this.rules=t.normal,this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=a(t.item,"gm")(/bull/g,t.bullet)(),t.list=a(t.list)(/bull/g,t.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+t.def.source+")")(),t.blockquote=a(t.blockquote)("def",t.def)(),t.M="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",t.html=a(t.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,t.M)(),t.paragraph=a(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t.M)("def",t.def)(),t.normal=f({},t),t.gfm=f({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=a(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|")(),t.tables=f({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),i.rules=t,i.lex=function(t,e){return new i(e).lex(t)},i.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},i.prototype.token=function(i,e,n){var r,s,o,a,u,c,l,h,f;for(i=i.replace(/^ +$/gm,"");i;)if((o=this.rules.newline.exec(i))&&(i=i.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(i))i=i.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(i))i=i.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(i))i=i.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(e&&(o=this.rules.nptable.exec(i))){for(i=i.substring(o[0].length),c={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},h=0;h ?/gm,""),this.token(o,e,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(i)){for(i=i.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),r=!1,f=(o=o[0].match(this.rules.item)).length,h=0;h1&&u.length>1||(i=o.slice(h+1).join("\n")+i,h=f-1)),s=r||/\n\n(?!\s*$)/.test(c),h!==f-1&&(r="\n"===c.charAt(c.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(c,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(i))i=i.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&e&&(o=this.rules.def.exec(i)))i=i.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(e&&(o=this.rules.table.exec(i))){for(i=i.substring(o[0].length),c={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},h=0;h])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:h,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:h,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,i){return t=t.source,i=i||"",function e(n,r){return n?(r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(n,r),e):RegExp(t,i)}}function u(t,i){return c[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?c[" "+t]=t+"/":c[" "+t]=t.replace(/[^/]*$/,"")),t=c[" "+t],"//"===i.slice(0,2)?t.replace(/:[\s\S]*/,":")+i:"/"===i.charAt(0)?t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+i:t+i}e.I=/(?:\[[^\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,e.T=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,e.link=a(e.link)("inside",e.I)("href",e.T)(),e.reflink=a(e.reflink)("inside",e.I)(),e.normal=f({},e),e.pedantic=f({},e.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),e.gfm=f({},e.normal,{escape:a(e.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(e.text)("]|","~]|")("|","|https?://|")()}),e.breaks=f({},e.gfm,{br:a(e.br)("{2,}","*")(),text:a(e.gfm.text)("{2,}","*")()}),n.rules=e,n.output=function(t,i,e){return new n(i,e).output(t)},n.prototype.output=function(t){for(var i,e,n,r,s="";t;)if(r=this.rules.escape.exec(t))t=t.substring(r[0].length),s+=r[1];else if(r=this.rules.autolink.exec(t))t=t.substring(r[0].length),"@"===r[2]?(e=o(":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1])),n=this.mangle("mailto:")+e):n=e=o(r[1]),s+=this.renderer.link(n,null,e);else if(this.inLink||!(r=this.rules.url.exec(t))){if(r=this.rules.tag.exec(t))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),t=t.substring(r[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):o(r[0]):r[0];else if(r=this.rules.link.exec(t))t=t.substring(r[0].length),this.inLink=!0,s+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(t))||(r=this.rules.nolink.exec(t))){if(t=t.substring(r[0].length),i=(r[2]||r[1]).replace(/\s+/g," "),!(i=this.links[i.toLowerCase()])||!i.href){s+=r[0].charAt(0),t=r[0].substring(1)+t;continue}this.inLink=!0,s+=this.outputLink(r,i),this.inLink=!1}else if(r=this.rules.strong.exec(t))t=t.substring(r[0].length),s+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(t))t=t.substring(r[0].length),s+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(t))t=t.substring(r[0].length),s+=this.renderer.codespan(o(r[2].trim(),!0));else if(r=this.rules.br.exec(t))t=t.substring(r[0].length),s+=this.renderer.br();else if(r=this.rules.del.exec(t))t=t.substring(r[0].length),s+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(t))t=t.substring(r[0].length),s+=this.renderer.text(o(this.smartypants(r[0])));else if(t)throw Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(r[0].length),n=e=o(r[1]),s+=this.renderer.link(n,null,e);return s},n.prototype.outputLink=function(t,i){var e=o(i.href),n=i.title?o(i.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(e,n,this.output(t[1])):this.renderer.image(e,n,o(t[1]))},n.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},n.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var i,e="",n=t.length,r=0;r.5&&(i="x"+i.toString(16)),e+="&#"+i+";";return e},r.prototype.code=function(t,i,e){if(this.options.highlight){var n=this.options.highlight(t,i);null!=n&&n!==t&&(e=!0,t=n)}return i?'
'+(e?t:o(t,!0))+"\n
\n":"
"+(e?t:o(t,!0))+"\n
"},r.prototype.blockquote=function(t){return"
\n"+t+"
\n"},r.prototype.html=function(t){return t},r.prototype.heading=function(t,i,e){return"'+t+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(t,i){var e=i?"ol":"ul";return"<"+e+">\n"+t+"\n"},r.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},r.prototype.paragraph=function(t){return"

    "+t+"

    \n"},r.prototype.table=function(t,i){return"\n\n"+t+"\n\n"+i+"\n
    \n"},r.prototype.tablerow=function(t){return"\n"+t+"\n"},r.prototype.tablecell=function(t,i){var e=i.header?"th":"td";return(i.align?"<"+e+' style="text-align:'+i.align+'">':"<"+e+">")+t+"\n"},r.prototype.strong=function(t){return""+t+""},r.prototype.em=function(t){return""+t+""},r.prototype.codespan=function(t){return""+t+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(t){return""+t+""},r.prototype.link=function(t,i,e){if(this.options.sanitize){try{var n=decodeURIComponent((r=t,r.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,i){return"colon"===(i=i.toLowerCase())?":":"#"===i.charAt(0)?"x"===i.charAt(1)?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return e}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return e}var r;this.options.baseUrl&&!l.test(t)&&(t=u(this.options.baseUrl,t));var s='
    "},r.prototype.image=function(t,i,e){this.options.baseUrl&&!l.test(t)&&(t=u(this.options.baseUrl,t));var n=''+e+'":">"},r.prototype.text=function(t){return t},s.parse=function(t,i,e){return new s(i,e).parse(t)},s.prototype.parse=function(t){this.inline=new n(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var i="";this.next();)i+=this.tok();return i},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,i,e,n,r="",s="";for(e="",t=0;tAn error occurred:

    "+o(t.message+"",!0)+"
    ";throw t}}h.exec=h,d.options=d.setOptions=function(t){return f(d.defaults,t),d},d.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new r,xhtml:!1,baseUrl:null},d.Parser=s,d.parser=s.parse,d.Renderer=r,d.Lexer=i,d.lexer=i.lex,d.InlineLexer=n,d.inlineLexer=n.output,d.parse=d,"undefined"!=typeof module&&"object"==typeof exports?module.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):this.marked=d}.call(function(){return this||("undefined"!=typeof window?window:global)}()), -/*! jQuery-ui-Slider-Pips - v1.11.4 - 2016-09-04 -* Copyright (c) 2016 Simon Goellner ; Licensed MIT */ -function(t){"use strict";var i={pips:function(i){var e,n,r,s,o,a=this,u="",c=a._valueMin(),l=(a._valueMax()-c)/a.options.step,h=a.element.find(".ui-slider-handle"),f={first:"label",last:"label",rest:"pip",labels:!1,prefix:"",suffix:"",step:l>100?Math.floor(.05*l):1,formatLabel:function(t){return this.prefix+t+this.suffix}};if("object"===t.type(i)||"undefined"===t.type(i)){t.extend(f,i),a.element.data("pips-options",f),a.options.pipStep=Math.abs(Math.round(f.step))||1,a.element.off(".selectPip").addClass("ui-slider-pips").find(".ui-slider-pip").remove();var d={single:function(i){this.resetClasses(),o.filter(".ui-slider-pip-"+this.classLabel(i)).addClass("ui-slider-pip-selected"),a.options.range&&o.each(function(e,n){var r=t(n).children(".ui-slider-label").data("value");("min"===a.options.range&&ri)&&t(n).addClass("ui-slider-pip-inrange")})},range:function(i){for(this.resetClasses(),e=0;ei[0]&&rr[1]?c=u[1]:iv[0]&&sp)&&(d+=" ui-slider-pip-inrange");return''+f.formatLabel(n)+""}},float:function(i){var e,n=this,r=n._valueMin(),s=n._valueMax(),o=n._value(),a=n._values(),u=[],c=n.element.find(".ui-slider-handle"),l={handle:!0,pips:!1,labels:!1,prefix:"",suffix:"",event:"slidechange slide",formatLabel:function(t){return this.prefix+t+this.suffix}};if("object"===t.type(i)||"undefined"===t.type(i)){if(t.extend(l,i),n.element.data("float-options",l),os&&(o=s),a&&a.length)for(e=0;es&&(a[e]=s);if(n.element.addClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove(),l.handle)for(u=n.values()&&n.values().length?h(a):h([o]),e=0;e'+l.formatLabel(u[e])+""));l.pips&&n.element.find(".ui-slider-label").each(function(i,e){var n,r=t(e),s=[r.data("value")];n=l.formatLabel(h(s)[0]),t(''+n+"").insertAfter(r)}),"slide"!==l.event&&"slidechange"!==l.event&&"slide slidechange"!==l.event&&"slidechange slide"!==l.event&&(l.event="slidechange slide"),n.element.off(".sliderFloat").on(l.event+".sliderFloat",function(i,e){var n="array"===t.type(e.value)?e.value:[e.value],r=l.formatLabel(h(n)[0]);t(e.handle).find(".ui-slider-tip").html(r)})}else"destroy"===i?n.element.off(".sliderFloat").removeClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove():"refresh"===i&&n.element.slider("float",n.element.data("float-options"));function h(i){var o=[],a=t.map(i,function(t){return Math.ceil((t-r)/n.options.step)});if("array"===t.type(l.labels))for(e=0;e - */ -i=this,e=function(){var t=function(t,i){this.items=t,this.settings=i||{diacritics:!0}};t.prototype.tokenize=function(t){if(!(t=r(((t||"")+"").toLowerCase()))||!t.length)return[];var i,e,n,o,u=[],c=t.split(/ +/);for(i=0,e=c.length;i0)&&n.items.push({score:e,id:r})}):this.iterator(this.items,function(t,i){n.items.push({score:1,id:i})}),(r=this.getSortFunction(n,i))&&n.items.sort(r),n.total=n.items.length,"number"==typeof i.limit&&(n.items=n.items.slice(0,i.limit)),n};var i=function(t,i){return"number"==typeof t&&"number"==typeof i?t>i?1:t(i=u((i||"")+""))?1:i>t?-1:0},e=function(t,i){var e,n,r,s;for(e=1,n=arguments.length;e - */ -n=this,r=function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var e,n,r,s=[];if(this.plugins={names:[],settings:{},requested:{},loaded:{}},i.isArray(t))for(e=0,n=t.length;e - */ -s=this,o=function(t,i,e){"use strict";var n=function(t,i){if("string"!=typeof i||i.length){var e="string"==typeof i?RegExp(i,"i"):i,n=function(t){var i=0;if(3===t.nodeType){var r=t.data.search(e);if(r>=0&&t.data.length>0){var s=t.data.match(e),o=document.createElement("span");o.className="highlight";var a=t.splitText(r),u=(a.splitText(s[0].length),a.cloneNode(!0));o.appendChild(u),a.parentNode.replaceChild(o,a),i=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var c=0;c/g,">").replace(/"/g,""")},f={};f.before=function(t,i,e){var n=t[i];t[i]=function(){return e.apply(t,arguments),n.apply(t,arguments)}},f.after=function(t,i,e){var n=t[i];t[i]=function(){var i=n.apply(t,arguments);return e.apply(t,arguments),i}};var d=function(t,i,e){var n,r=t.trigger,s={};t.trigger=function(){var e=arguments[0];if(-1===i.indexOf(e))return r.apply(t,arguments);s[e]=arguments},e.call(t),t.trigger=r;for(n in s)s.hasOwnProperty(n)&&r.apply(t,s[n])},p=function(t){var i={};if("selectionStart"in t)i.start=t.selectionStart,i.length=t.selectionEnd-i.start;else if(document.selection){t.focus();var e=document.selection.createRange(),n=document.selection.createRange().text.length;e.moveStart("character",-t.value.length),i.start=e.text.length-n,i.length=n}return i},v=function(i){var e=null,n=function(n,r){var s,o,a,u,c,l,h,f;n=n||window.event||{},r=r||{},n.metaKey||n.altKey||(r.force||!1!==i.data("grow"))&&(s=i.val(),n.type&&"keydown"===n.type.toLowerCase()&&(a=(o=n.keyCode)>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||32===o,46===o||8===o?(f=p(i[0])).length?s=s.substring(0,f.start)+s.substring(f.start+f.length):8===o&&f.start?s=s.substring(0,f.start-1)+s.substring(f.start+1):46===o&&void 0!==f.start&&(s=s.substring(0,f.start)+s.substring(f.start+1)):a&&(l=n.shiftKey,h=String.fromCharCode(n.keyCode),s+=h=l?h.toUpperCase():h.toLowerCase())),u=i.attr("placeholder"),!s&&u&&(s=u),(c=function(i,e){if(!i)return 0;var n=t("").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(i).appendTo("body");!function(t,i,e){var n,r,s={};if(e)for(n=0,r=e.length;n").addClass(w.wrapperClass).addClass(f).addClass(h),e=t("
    ").addClass(w.inputClass).addClass("items").appendTo(i),n=t('').appendTo(e).attr("tabindex",F.is(":disabled")?"-1":y.tabIndex),l=t(w.dropdownParent||i),r=t("
    ").addClass(w.dropdownClass).addClass(h).hide().appendTo(l),c=t("
    ").addClass(w.dropdownContentClass).appendTo(r),(p=F.attr("id"))&&(n.attr("id",p+"-selectized"),t("label[for='"+p+"']").attr("for",p+"-selectized")),y.settings.copyClassesToDropdown&&r.addClass(f),i.css({width:F[0].style.width}),y.plugins.names.length&&(d="plugin-"+y.plugins.names.join(" plugin-"),i.addClass(d),r.addClass(d)),(null===w.maxItems||w.maxItems>1)&&1===y.tagType&&F.attr("multiple","multiple"),y.settings.placeholder&&n.attr("placeholder",w.placeholder),!y.settings.splitOn&&y.settings.delimiter){var z=y.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");y.settings.splitOn=RegExp("\\s*"+z+"+\\s*")}F.attr("autocorrect")&&n.attr("autocorrect",F.attr("autocorrect")),F.attr("autocapitalize")&&n.attr("autocapitalize",F.attr("autocapitalize")),y.$wrapper=i,y.$control=e,y.$control_input=n,y.$dropdown=r,y.$dropdown_content=c,r.on("mouseenter","[data-selectable]",function(){return y.onOptionHover.apply(y,arguments)}),r.on("mousedown click","[data-selectable]",function(){return y.onOptionSelect.apply(y,arguments)}),m="mousedown",b="*:not(input)",_=function(){return y.onItemSelect.apply(y,arguments)},(g=e).on(m,b,function(t){for(var i=t.target;i&&i.parentNode!==g[0];)i=i.parentNode;return t.currentTarget=i,_.call(this,t)}),v(n),e.on({mousedown:function(){return y.onMouseDown.apply(y,arguments)},click:function(){return y.onClick.apply(y,arguments)}}),n.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return y.onKeyDown.apply(y,arguments)},keyup:function(){return y.onKeyUp.apply(y,arguments)},keypress:function(){return y.onKeyPress.apply(y,arguments)},resize:function(){y.positionDropdown.call(y)},blur:function(){return y.onBlur.apply(y,arguments)},focus:function(){return y.ignoreBlur=!1,y.onFocus.apply(y,arguments)},paste:function(){return y.onPaste.apply(y,arguments)}}),S.on("keydown"+k,function(t){y.isCmdDown=t[s?"metaKey":"ctrlKey"],y.isCtrlDown=t[s?"altKey":"ctrlKey"],y.isShiftDown=t.shiftKey}),S.on("keyup"+k,function(t){t.keyCode===a&&(y.isCtrlDown=!1),16===t.keyCode&&(y.isShiftDown=!1),t.keyCode===o&&(y.isCmdDown=!1)}),S.on("mousedown"+k,function(t){if(y.isFocused){if(t.target===y.$dropdown[0]||t.target.parentNode===y.$dropdown[0])return!1;y.$control.has(t.target).length||t.target===y.$control[0]||y.blur(t.target)}}),x.on(["scroll"+k,"resize"+k].join(" "),function(){y.isOpen&&y.positionDropdown.apply(y,arguments)}),x.on("mousemove"+k,function(){y.ignoreHover=!1}),this.revertSettings={$children:F.children().detach(),tabindex:F.attr("tabindex")},F.attr("tabindex",-1).hide().after(y.$wrapper),t.isArray(w.items)&&(y.setValue(w.items),delete w.items),u&&F.on("invalid"+k,function(t){t.preventDefault(),y.isInvalid=!0,y.refreshState()}),y.updateOriginalInput(),y.refreshItems(),y.refreshState(),y.updatePlaceholder(),y.isSetup=!0,F.is(":disabled")&&y.disable(),y.on("change",this.onChange),F.data("selectize",y),F.addClass("selectized"),y.trigger("initialize"),!0===w.preload&&y.onSearchChange("")},setupTemplates:function(){var i=this.settings.labelField,e=this.settings.optgroupLabelField,n={optgroup:function(t){return'
    '+t.html+"
    "},optgroup_header:function(t,i){return'
    '+i(t[e])+"
    "},option:function(t,e){return'
    '+e(t[i])+"
    "},item:function(t,e){return'
    '+e(t[i])+"
    "},option_create:function(t,i){return'
    Add '+i(t.input)+"
    "}};this.settings.render=t.extend({},n,this.settings.render)},setupCallbacks:function(){var t,i,e={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in e)e.hasOwnProperty(t)&&(i=this.settings[e[t]])&&this.on(t,i)},onClick:function(t){this.isFocused||(this.focus(),t.preventDefault())},onMouseDown:function(i){var e=this,n=i.isDefaultPrevented();t(i.target);if(e.isFocused){if(i.target!==e.$control_input[0])return"single"===e.settings.mode?e.isOpen?e.close():e.open():n||e.setActiveItem(null),!1}else n||window.setTimeout(function(){e.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(i){var e=this;e.isFull()||e.isInputHidden||e.isLocked?i.preventDefault():e.settings.splitOn&&setTimeout(function(){var i=e.$control_input.val();if(i.match(e.settings.splitOn))for(var n=t.trim(i).split(e.settings.splitOn),r=0,s=n.length;r(a=Array.prototype.indexOf.call(this.$control[0].childNodes,i[0]))&&(c=o,o=a,a=c),r=o;r<=a;r++)u=this.$control[0].childNodes[r],-1===this.$activeItems.indexOf(u)&&(t(u).addClass("active"),this.$activeItems.push(u));e.preventDefault()}else"mousedown"===n&&this.isCtrlDown||"keydown"===n&&this.isShiftDown?i.hasClass("active")?(s=this.$activeItems.indexOf(i[0]),this.$activeItems.splice(s,1),i.removeClass("active")):this.$activeItems.push(i.addClass("active")[0]):(t(this.$activeItems).removeClass("active"),this.$activeItems=[i.addClass("active")[0]]);this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function(i,e,n){var r,s,o,a,u;this.$activeOption&&this.$activeOption.removeClass("active"),this.$activeOption=null,(i=t(i)).length&&(this.$activeOption=i.addClass("active"),!e&&c(e)||(r=this.$dropdown_content.height(),s=this.$activeOption.outerHeight(!0),e=this.$dropdown_content.scrollTop()||0,a=o=this.$activeOption.offset().top-this.$dropdown_content.offset().top+e,u=o-r+s,o+s>r+e?this.$dropdown_content.stop().animate({scrollTop:u},n?this.settings.scrollDuration:0):o=0;e--)-1!==this.items.indexOf(l(n.items[e].id))&&n.items.splice(e,1);return n},refreshOptions:function(i){var e,r,s,o,a,u,c,h,f,d,p,v,g,m,b,_;void 0===i&&(i=!0);var y,w,k=this,x=t.trim(k.$control_input.val()),S=k.search(x),F=k.$dropdown_content,z=k.$activeOption&&l(k.$activeOption.attr("data-value"));for(o=S.items.length,"number"==typeof k.settings.maxOptions&&(o=Math.min(o,k.settings.maxOptions)),a={},u=[],e=0;e0||g,k.hasOptions?(S.items.length>0?((b=z&&k.getOption(z))&&b.length?m=b:"single"===k.settings.mode&&k.items.length&&(m=k.getOption(k.items[0])),m&&m.length||(m=_&&!k.settings.addPrecedence?k.getAdjacentOption(_,1):F.find("[data-selectable]:first"))):m=_,k.setActiveOption(m),i&&!k.isOpen&&k.open()):(k.setActiveOption(null),i&&k.isOpen&&k.close())},addOption:function(i){var e,n,r;if(t.isArray(i))for(e=0,n=i.length;e=0&&r0),this.$control_input.data("grow",!i&&!e)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var i,e,n,r;if(t=t||{},1===this.tagType){for(n=[],i=0,e=this.items.length;i'+h(r)+"");n.length||this.$input.attr("multiple")||n.push(''),this.$input.html(n.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&(t.silent||this.trigger("change",this.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var t=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.$control_input.blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),t&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var t=this.$control,i="body"===this.settings.dropdownParent?t.offset():t.position();i.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:i.top,left:i.left})},clear:function(t){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:t}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function(i){var e=Math.min(this.caretPos,this.items.length);0===e?this.$control.prepend(i):t(this.$control[0].childNodes[e]).before(i),this.setCaret(e+1)},deleteSelection:function(i){var e,n,r,s,o,a,u,c,l;if(r=i&&8===i.keyCode?-1:1,s=p(this.$control_input[0]),this.$activeOption&&!this.settings.hideSelected&&(u=this.getAdjacentOption(this.$activeOption,-1).attr("data-value")),o=[],this.$activeItems.length){for(l=this.$control.children(".active:"+(r>0?"last":"first")),a=this.$control.children(":not(input)").index(l),r>0&&a++,e=0,n=this.$activeItems.length;e0&&s.start===this.$control_input.val().length&&o.push(this.items[this.caretPos]));if(!o.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,o))return!1;for(void 0!==a&&this.setCaret(a);o.length;)this.removeItem(o.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),u&&(c=this.getOption(u)).length&&this.setActiveOption(c),!0},advanceSelection:function(t,i){var e,n,r,s,o;0!==t&&(this.rtl&&(t*=-1),e=t>0?"last":"first",n=p(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(s=this.$control_input.val().length,(t<0?0===n.start&&0===n.length:n.start===s)&&!s&&this.advanceCaret(t,i)):(o=this.$control.children(".active:"+e)).length&&(r=this.$control.children(":not(input)").index(o),this.setActiveItem(null),this.setCaret(t>0?r+1:r)))},advanceCaret:function(t,i){var e,n;0!==t&&(e=t>0?"next":"prev",this.isShiftDown?(n=this.$control_input[e]()).length&&(this.hideInput(),this.setActiveItem(n),i&&i.preventDefault()):this.setCaret(this.caretPos+t))},setCaret:function(i){var e,n,r,s;if(i="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,i)),!this.isPending)for(e=0,n=(r=this.$control.children(":not(input)")).length;e
    '}},i),n.setup=(e=n.setup,function(){e.apply(n,arguments),n.$dropdown_header=t(i.html(i)),n.$dropdown.prepend(n.$dropdown_header)})}),g.define("optgroup_columns",function(i){var e,n=this;i=t.extend({equalizeWidth:!0,equalizeHeight:!0},i),this.getAdjacentOption=function(i,e){var n=i.closest("[data-group]").find("[data-selectable]"),r=n.index(i)+e;return r>=0&&r
    ',t=t.firstChild,e.body.appendChild(t),i=r.width=t.offsetWidth-t.clientWidth,e.body.removeChild(t)),i},s=function(){var e,s,o,a,u,c,l;if((s=(l=t("[data-group]",n.$dropdown_content)).length)&&n.$dropdown_content.width()){if(i.equalizeHeight){for(o=0,e=0;e1&&(u=c-a*(s-1),l.eq(s-1).css({width:u})))}};(i.equalizeHeight||i.equalizeWidth)&&(f.after(this,"positionDropdown",s),f.after(this,"refreshOptions",s))}),g.define("remove_button",function(i){i=t.extend({label:"×",title:"Remove",className:"remove",append:!0},i);var e,n,r,s,o;"single"!==this.settings.mode?(s=e=this,o=''+n.label+"",e.setup=(r=s.setup,function(){if(n.append){var i=s.settings.render.item;s.settings.render.item=function(t){return n=i.apply(e,arguments),r=o,s=n.search(/(<\/[^>]+>\s*)$/),n.substring(0,s)+r+n.substring(s);var n,r,s}}r.apply(e,arguments),e.$control.on("click","."+n.className,function(i){if(i.preventDefault(),!s.isLocked){var e=t(i.currentTarget).parent();s.setActiveItem(e),s.deleteSelection()&&s.setCaret(s.items.length)}})})):function(i,e){e.className="remove-single";var n,r=i,s=''+e.label+"";i.setup=(n=r.setup,function(){if(e.append){var o=t(r.$input.context).attr("id"),a=(t("#"+o),r.settings.render.item);r.settings.render.item=function(t){return a.apply(i,arguments)+s}}n.apply(i,arguments),i.$control.on("click","."+e.className,function(t){t.preventDefault(),r.isLocked||r.clear()})})}(this,i)}),g.define("restore_on_backspace",function(t){var i,e=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(i=e.onKeyDown,function(e){var n,r;return 8===e.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(n=this.caretPos-1)>=0&&n
    ";return"
    "+t+"
    "}();function u(i,e,n,r){for(var o=[],a=0;a')}else{o.push(t("
    ").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
    "+o.join("")+"
    "}function c(c,l){var v,g,m,b,_,y,w,k=(_=l,y=c,(w=t.extend({},e,_)).callbacks={move:f(w.move,y),change:f(w.change,y),show:f(w.show,y),hide:f(w.hide,y),beforeShow:f(w.beforeShow,y)},w),x=k.flat,S=k.showSelectionPalette,F=k.localStorageKey,z=k.theme,A=k.callbacks,O=(v=Zt,g=10,function(){var t=this,i=arguments;m&&clearTimeout(b),!m&&b||(b=setTimeout(function(){b=null,v.apply(t,i)},g))}),$=!1,N=!1,j=0,E=0,M=0,C=0,q=0,I=0,T=0,R=0,P=0,D=0,L=1,U=[],B=[],H={},W=k.selectionPalette.slice(0),Z=k.maxSelectionSize,G="sp-dragging",K=null,V=c.ownerDocument,X=(V.body,t(c)),J=!1,Q=t(a,V).addClass(z),Y=Q.find(".sp-picker-container"),tt=Q.find(".sp-color"),it=Q.find(".sp-dragger"),et=Q.find(".sp-hue"),nt=Q.find(".sp-slider"),rt=Q.find(".sp-alpha-inner"),st=Q.find(".sp-alpha"),ot=Q.find(".sp-alpha-handle"),at=Q.find(".sp-input"),ut=Q.find(".sp-palette"),ct=Q.find(".sp-initial"),lt=Q.find(".sp-cancel"),ht=Q.find(".sp-clear"),ft=Q.find(".sp-choose"),dt=Q.find(".sp-palette-toggle"),pt=X.is("input"),vt=pt&&"color"===X.attr("type")&&p(),gt=pt&&!x,mt=gt?t(o).addClass(z).addClass(k.className).addClass(k.replacerClassName):t([]),bt=gt?mt:X,_t=mt.find(".sp-preview-inner"),yt=k.color||pt&&X.val(),wt=!1,kt=k.preferredFormat,xt=!k.showButtons||k.clickoutFiresChange,St=!yt,Ft=k.allowEmpty&&!vt;function zt(){if(k.showPaletteOnly&&(k.showPalette=!0),dt.text(k.showPaletteOnly?k.togglePaletteMoreText:k.togglePaletteLessText),k.palette){U=k.palette.slice(0),B=t.isArray(U[0])?U:[U],H={};for(var i=0;i1&&(delete window.localStorage[F],t.each(i,function(t,i){Ot(i)}))}catch(t){}try{W=window.localStorage[F].split(";")}catch(t){}}}function Ot(i){if(S){var e=tinycolor(i).toRgbString();if(!H[e]&&-1===t.inArray(e,W))for(W.push(e);W.length>Z;)W.shift();if(F&&window.localStorage)try{window.localStorage[F]=W.join(";")}catch(t){}}}function $t(){var i=Lt(),e=t.map(B,function(t,e){return u(t,i,"sp-palette-row sp-palette-row-"+e,k)});At(),W&&e.push(u(function(){var t=[];if(k.showPalette)for(var i=0;iu&&u>n?Math.abs(l.left+n-u):0),l.top-=Math.min(l.top,l.top+r>c&&c>r?Math.abs(r+s-0):0),l))),Ht(),k.showPalette&&$t(),X.trigger("reflow.spectrum"))}function Gt(){Rt(),J=!0,X.attr("disabled",!0),bt.addClass("sp-disabled")}!function(){if(r&&Q.find("*:not(input)").attr("unselectable","on"),zt(),gt&&X.after(mt).hide(),Ft||ht.hide(),x)X.after(Q).hide();else{var i="parent"===k.appendTo?X.parent():t(k.appendTo);1!==i.length&&(i=t("body")),i.append(Q)}function e(i){return i.data&&i.data.ignore?(Dt(t(i.target).closest(".sp-thumb-el").data("color")),Ut()):(Dt(t(i.target).closest(".sp-thumb-el").data("color")),Ut(),Wt(!0),k.hideAfterPaletteSelect&&Rt()),!1}At(),bt.bind("click.spectrum touchstart.spectrum",function(i){J||Ct(),i.stopPropagation(),t(i.target).is("input")||i.preventDefault()}),(X.is(":disabled")||!0===k.disabled)&&Gt(),Q.click(h),at.change(Mt),at.bind("paste",function(){setTimeout(Mt,1)}),at.keydown(function(t){13==t.keyCode&&Mt()}),lt.text(k.cancelText),lt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Pt(),Rt()}),ht.attr("title",k.clearText),ht.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),St=!0,Ut(),x&&Wt(!0)}),ft.text(k.chooseText),ft.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),r&&at.is(":focus")&&at.trigger("change"),at.hasClass("sp-validation-error")||(Wt(!0),Rt())}),dt.text(k.showPaletteOnly?k.togglePaletteMoreText:k.togglePaletteLessText),dt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),k.showPaletteOnly=!k.showPaletteOnly,k.showPaletteOnly||x||Q.css("left","-="+(Y.outerWidth(!0)+5)),zt()}),d(st,function(t,i,e){L=t/q,St=!1,e.shiftKey&&(L=Math.round(10*L)/10),Ut()},jt,Et),d(et,function(t,i){R=parseFloat(i/C),St=!1,k.showAlpha||(L=1),Ut()},jt,Et),d(tt,function(t,i,e){if(e.shiftKey){if(!K){var n=E-D*E,r=Math.abs(t-P*j)>Math.abs(i-n);K=r?"x":"y"}}else K=null;var s=!K||"y"===K;(!K||"x"===K)&&(P=parseFloat(t/j)),s&&(D=parseFloat((E-i)/E)),St=!1,k.showAlpha||(L=1),Ut()},jt,Et),yt?(Dt(yt),Bt(),kt=k.preferredFormat||tinycolor(yt).format,Ot(yt)):Bt(),x&&qt();var n=r?"mousedown.spectrum":"click.spectrum touchstart.spectrum";ut.delegate(".sp-thumb-el",n,e),ct.delegate(".sp-thumb-el:nth-child(1)",n,{ignore:!0},e)}();var Kt={show:qt,hide:Rt,toggle:Ct,reflow:Zt,option:function(e,n){return e===i?t.extend({},k):n===i?k[e]:(k[e]=n,"preferredFormat"===e&&(kt=k.preferredFormat),void zt())},enable:function(){J=!1,X.attr("disabled",!1),bt.removeClass("sp-disabled")},disable:Gt,offset:function(t){k.offset=t,Zt()},set:function(t){Dt(t),Wt()},get:Lt,destroy:function(){X.show(),bt.unbind("click.spectrum touchstart.spectrum"),Q.remove(),mt.remove(),n[Kt.id]=null},container:Q};return Kt.id=n.push(Kt)-1,Kt}function l(){}function h(t){t.stopPropagation()}function f(t,i){var e=Array.prototype.slice,n=e.call(arguments,2);return function(){return t.apply(i,n.concat(e.call(arguments)))}}function d(i,e,n,s){e=e||function(){},n=n||function(){},s=s||function(){};var o=document,a=!1,u={},c=0,l=0,h="ontouchstart"in window,f={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(a){if(r&&o.documentMode<9&&!t.button)return v();var n=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],s=n&&n.pageX||t.pageX,f=n&&n.pageY||t.pageY,p=Math.max(0,Math.min(s-u.left,l)),g=Math.max(0,Math.min(f-u.top,c));h&&d(t),e.call(i,p,g,t)}}function v(){a&&(t(o).unbind(f),t(o.body).removeClass("sp-dragging"),setTimeout(function(){s.apply(i,arguments)},0)),a=!1}f.selectstart=d,f.dragstart=d,f["touchmove mousemove"]=p,f["touchend mouseup"]=v,t(i).bind("touchstart mousedown",function(e){(e.which?3==e.which:2==e.button)||a||!1!==n.apply(i,arguments)&&(a=!0,c=t(i).height(),l=t(i).width(),u=t(i).offset(),t(o).bind(f),t(o.body).addClass("sp-dragging"),p(e),d(e))})}function p(){return t.fn.spectrum.inputTypeColorSupport()}var v="spectrum.id";t.fn.spectrum=function(i,e){if("string"==typeof i){var r=this,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=n[t(this).data(v)];if(e){var o=e[i];if(!o)throw Error("Spectrum: no such method: '"+i+"'");"get"==i?r=e.get():"container"==i?r=e.container:"option"==i?r=e.option.apply(e,s):"destroy"==i?(e.destroy(),t(this).removeData(v)):o.apply(e,s)}}),r}return this.spectrum("destroy").each(function(){var e=c(this,t.extend({},i,t(this).data()));t(this).data(v,e.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=d,t.fn.spectrum.defaults=e,t.fn.spectrum.inputTypeColorSupport=function i(){if(void 0===i.H){var e=t("")[0];i.H="color"===e.type&&""!==e.value}return i.H},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var i=t("input[type=color]");i.length&&!p()&&i.spectrum({preferredFormat:"hex6"})}, -// Brian Grinstead, MIT License -function(){var t=/^[\s,#]+/,i=/\s+$/,e=0,n=Math,r=n.round,s=n.min,o=n.max,a=n.random,u=function(a,c){if(a=a||"",c=c||{},a instanceof u)return a;if(!(this instanceof u))return new u(a,c);var l=function(e){var r={r:0,g:0,b:0},a=1,u=!1,c=!1;"string"==typeof e&&(e=function(e){e=e.replace(t,"").replace(i,"").toLowerCase();var n,r=!1;if(z[e])e=z[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(e))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(e))return{a:(s=n[1],j(s)/255),r:j(n[2]),g:j(n[3]),b:j(n[4]),format:r?"name":"hex8"};var s;if(n=T.hex6.exec(e))return{r:j(n[1]),g:j(n[2]),b:j(n[3]),format:r?"name":"hex"};if(n=T.hex3.exec(e))return{r:j(n[1]+""+n[1]),g:j(n[2]+""+n[2]),b:j(n[3]+""+n[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&(e.hasOwnProperty("r")&&e.hasOwnProperty("g")&&e.hasOwnProperty("b")?(l=e.r,h=e.g,f=e.b,r={r:255*$(l,255),g:255*$(h,255),b:255*$(f,255)},u=!0,c="%"===(e.r+"").substr(-1)?"prgb":"rgb"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("v")?(e.s=M(e.s),e.v=M(e.v),r=function(t,i,e){t=6*$(t,360),i=$(i,100),e=$(e,100);var r=n.floor(t),s=t-r,o=e*(1-i),a=e*(1-s*i),u=e*(1-(1-s)*i),c=r%6;return{r:255*[e,a,o,o,u,e][c],g:255*[u,e,e,a,o,o][c],b:255*[o,o,u,e,e,a][c]}}(e.h,e.s,e.v),u=!0,c="hsv"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("l")&&(e.s=M(e.s),e.l=M(e.l),r=function(t,i,e){var n,r,s;function o(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t}if(t=$(t,360),i=$(i,100),e=$(e,100),0===i)n=r=s=e;else{var a=e<.5?e*(1+i):e+i-e*i,u=2*e-a;n=o(u,a,t+1/3),r=o(u,a,t),s=o(u,a,t-1/3)}return{r:255*n,g:255*r,b:255*s}}(e.h,e.s,e.l),u=!0,c="hsl"),e.hasOwnProperty("a")&&(a=e.a));var l,h,f;return a=O(a),{ok:u,format:e.format||c,r:s(255,o(r.r,0)),g:s(255,o(r.g,0)),b:s(255,o(r.b,0)),a:a}}(a);this.W=a,this.Z=l.r,this.G=l.g,this.K=l.b,this.V=l.a,this.X=r(100*this.V)/100,this._format=c.format||l.format,this.J=c.gradientType,this.Z<1&&(this.Z=r(this.Z)),this.G<1&&(this.G=r(this.G)),this.K<1&&(this.K=r(this.K)),this.Q=l.ok,this.Y=e++};function c(t,i,e){t=$(t,255),i=$(i,255),e=$(e,255);var n,r,a=o(t,i,e),u=s(t,i,e),c=(a+u)/2;if(a==u)n=r=0;else{var l=a-u;switch(r=c>.5?l/(2-a-u):l/(a+u),a){case t:n=(i-e)/l+(i>1)+720)%360;--i;)n.h=(n.h+r)%360,s.push(u(n));return s}function F(t,i){i=i||6;for(var e=u(t).toHsv(),n=e.h,r=e.s,s=e.v,o=[],a=1/i;i--;)o.push(u({h:n,s:r,v:s})),s=(s+a)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this.Q},getOriginalInput:function(){return this.W},getFormat:function(){return this._format},getAlpha:function(){return this.V},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this.V=O(t),this.X=r(100*this.V)/100,this},toHsv:function(){var t=l(this.Z,this.G,this.K);return{h:360*t.h,s:t.s,v:t.v,a:this.V}},toHsvString:function(){var t=l(this.Z,this.G,this.K),i=r(360*t.h),e=r(100*t.s),n=r(100*t.v);return 1==this.V?"hsv("+i+", "+e+"%, "+n+"%)":"hsva("+i+", "+e+"%, "+n+"%, "+this.X+")"},toHsl:function(){var t=c(this.Z,this.G,this.K);return{h:360*t.h,s:t.s,l:t.l,a:this.V}},toHslString:function(){var t=c(this.Z,this.G,this.K),i=r(360*t.h),e=r(100*t.s),n=r(100*t.l);return 1==this.V?"hsl("+i+", "+e+"%, "+n+"%)":"hsla("+i+", "+e+"%, "+n+"%, "+this.X+")"},toHex:function(t){return h(this.Z,this.G,this.K,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return f(this.Z,this.G,this.K,this.V)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:r(this.Z),g:r(this.G),b:r(this.K),a:this.V}},toRgbString:function(){return 1==this.V?"rgb("+r(this.Z)+", "+r(this.G)+", "+r(this.K)+")":"rgba("+r(this.Z)+", "+r(this.G)+", "+r(this.K)+", "+this.X+")"},toPercentageRgb:function(){return{r:r(100*$(this.Z,255))+"%",g:r(100*$(this.G,255))+"%",b:r(100*$(this.K,255))+"%",a:this.V}},toPercentageRgbString:function(){return 1==this.V?"rgb("+r(100*$(this.Z,255))+"%, "+r(100*$(this.G,255))+"%, "+r(100*$(this.K,255))+"%)":"rgba("+r(100*$(this.Z,255))+"%, "+r(100*$(this.G,255))+"%, "+r(100*$(this.K,255))+"%, "+this.X+")"},toName:function(){return 0===this.V?"transparent":!(this.V<1)&&(A[h(this.Z,this.G,this.K,!0)]||!1)},toFilter:function(t){var i="#"+f(this.Z,this.G,this.K,this.V),e=i,n=this.J?"GradientType = 1, ":"";t&&(e=u(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+i+",endColorstr="+e+")"},toString:function(t){var i=!!t;t=t||this._format;var e=!1,n=this.V<1&&this.V>=0;return i||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this.V?this.toName():this.toRgbString()},tt:function(t,i){var e=t.apply(null,[this].concat([].slice.call(i)));return this.Z=e.Z,this.G=e.G,this.K=e.K,this.setAlpha(e.V),this},lighten:function(){return this.tt(g,arguments)},brighten:function(){return this.tt(m,arguments)},darken:function(){return this.tt(b,arguments)},desaturate:function(){return this.tt(d,arguments)},saturate:function(){return this.tt(p,arguments)},greyscale:function(){return this.tt(v,arguments)},spin:function(){return this.tt(_,arguments)},it:function(t,i){return t.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this.it(S,arguments)},complement:function(){return this.it(y,arguments)},monochromatic:function(){return this.it(F,arguments)},splitcomplement:function(){return this.it(x,arguments)},triad:function(){return this.it(w,arguments)},tetrad:function(){return this.it(k,arguments)}},u.fromRatio=function(t,i){if("object"==typeof t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]="a"===n?t[n]:M(t[n]));t=e}return u(t,i)},u.equals=function(t,i){return!(!t||!i)&&u(t).toRgbString()==u(i).toRgbString()},u.random=function(){return u.fromRatio({r:a(),g:a(),b:a()})},u.mix=function(t,i,e){e=0===e?0:e||50;var n,r=u(t).toRgb(),s=u(i).toRgb(),o=e/100,a=2*o-1,c=s.a-r.a,l=1-(n=((n=a*c==-1?a:(a+c)/(1+a*c))+1)/2),h={r:s.r*n+r.r*l,g:s.g*n+r.g*l,b:s.b*n+r.b*l,a:s.a*o+r.a*(1-o)};return u(h)},u.readability=function(t,i){var e=u(t),n=u(i),r=e.toRgb(),s=n.toRgb(),o=e.getBrightness(),a=n.getBrightness(),c=Math.max(r.r,s.r)-Math.min(r.r,s.r)+Math.max(r.g,s.g)-Math.min(r.g,s.g)+Math.max(r.b,s.b)-Math.min(r.b,s.b);return{brightness:Math.abs(o-a),color:c}},u.isReadable=function(t,i){var e=u.readability(t,i);return e.brightness>125&&e.color>500},u.mostReadable=function(t,i){for(var e=null,n=0,r=!1,s=0;s125&&o.color>500,c=o.brightness/125*3+o.color/500;(a&&!r||a&&r&&c>n||!a&&!r&&c>n)&&(r=a,n=c,e=u(i[s]))}return e};var z=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A=u.hexNames=function(t){var i={};for(var e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}(z);function O(t){return(isNaN(t=parseFloat(t))||t<0||t>1)&&(t=1),t}function $(t,i){var e;"string"==typeof(e=t)&&-1!=e.indexOf(".")&&1===parseFloat(e)&&(t="100%");var r,a="string"==typeof(r=t)&&-1!=r.indexOf("%");return t=s(i,o(0,parseFloat(t))),a&&(t=parseInt(t*i,10)/100),n.abs(t-i)<1e-6?1:t%i/parseFloat(i)}function N(t){return s(1,o(0,t))}function j(t){return parseInt(t,16)}function E(t){return 1==t.length?"0"+t:""+t}function M(t){return t<=1&&(t=100*t+"%"),t}var C,q,I,T=(I="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{rgb:RegExp("rgb"+(q="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?")),rgba:RegExp("rgba"+I),hsl:RegExp("hsl"+q),hsla:RegExp("hsla"+I),hsv:RegExp("hsv"+q),hsva:RegExp("hsva"+I),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=u}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}), -/*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) - * Enhance and extend the WordPress Customize in your themes. - * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) - */function(t,i,e,n,r,s,o,a,u){"use strict";s.core=s.core||{},s.components=s.components||{},s.settings=s.settings||{},s.controls=s.controls||{},s.sections=s.sections||{},s.panels=s.panels||{},s.l10n=s.l10n||{},s.constants=s.constants||{};var c=s,l=r.customize,h=(e(t),e(i)),f=i.getElementsByTagName("body")[0],d=e.Deferred(),p=e.Deferred();e.when(p,d);l.bind("ready",function(){d.resolve()});var v;if(v=function(){p.resolve()},"loading"!==i.readyState?v():i.addEventListener("DOMContentLoaded",v),!r)throw Error("Missing crucial object `wp`");if(!s)throw Error("Missing crucial object `kkcp`");e.fx.speeds._default=180,function(){if(o&&a){var t=new o.Renderer;t.link=function(t,i,e){var n='"+e+""},o.setOptions({renderer:t,highlight:function(t){return a.highlightAuto(t).value}}),f.classList.add("kkcp-markdown-supported")}}();var g=RegExp(c.constants.OPTIONS_PREFIX+"\\[.*\\]"),m=c.core.Regexes={et:/\s+/g,nt:/(px|%|em|rem|vh|vw|vmin|vmax|cm|mm|in|pt|pc|ch|ex)/,rt:/(\+|-)?((\d+(\.\d+)?)|(\.\d+))/,st:g,ot:/^(?:[a-z]+:)?\/\//i,ut:/[a-z-A-Z-0-9_]{1}(\/\/+)/g},b=c.constants.IMAGES_BASE_URL,y=c.constants.DOCS_BASE_URL;function w(t){return m.ot.test(t)}function k(t){return t.replace(m.ut,"/")}function x(t,i){var e=t;if(!w(t))switch(i){case"img":e=b+t;break;case"docs":e=y+t}return k(e)}function S(t){try{t.inflate(!0),c.components.Search.disable()}catch(t){}t.focus(),t.container.addClass("kkcp-control-focused"),setTimeout(function(){t.container.removeClass("kkcp-control-focused")},2e3)}var F=c.core.Utils={ct:b,lt:y,ht:w,ft:k,dt:x,pt:function(t){var i=l.control;for(var e in l.settings.controls)t(i(e))},vt:function(t){return!m.st.test(t)},gt:function(t){return m.st.test(t)},mt:function(t){var e=i.styleSheets;try{for(var n=0,r=e.length;n=0;u--)n[u].classList.remove(t.It);this.className+=" "+t.It;for(var l=r.length-1;l>=0;l--){var h=r[l],f=e("input, .ui-slider-handle",h);h.getAttribute(o)===a?(h.classList.add(t.It),f.attr("tabIndex","0")):(h.classList.remove(t.It),f.attr("tabIndex","-1"))}if(s)try{c.components.Screenpreview.setDevice(a)}catch(t){}})},O.prototype.Pt=function(t,i){var n=this;e(".kkcp-screen-picker",i).each(function(){var i=e(this),r=i.find(n.Tt),s=i.find(n.Rt),o=function(){return this.getAttribute("data-screen")===t},a=r.filter(o),u=s.filter(o);r.removeClass(n.It),s.removeClass(n.It),a.addClass(n.It),u.addClass(n.It)})},O.prototype.changeSize=function(t){this.Pt(t,i)},O.prototype.syncSize=function(t){try{this.Pt(c.components.Screenpreview.getSize(),t)}catch(t){}},c.core.tabs=new O;var N=function(){this.Dt=".kkcpui-tooltip",this.Lt=[{Ut:"top",Bt:h,Ht:{my:"center bottom-2",at:"center top-5"}},{Ut:"bottom",Bt:e(f),Ht:{my:"center top+2",at:"center bottom+5"}}],this.Wt={show:!1,hide:!1},p.then(this.Et.bind(this))};N.prototype.Et=function(){for(var t=this.Lt.length-1;t>=0;t--){var i=this.Lt[t],e=n.defaults({items:this.Dt+"--"+i.Ut,classes:{"ui-tooltip":i.Ut},tooltipClass:i.Ut,position:i.Ht},this.Wt);e.position.collision="flipfit",i.Bt.tooltip(e)}},c.core.tooltips=new N;var j=function(){var t=arguments,i=0,e=function(t,i,e,n){e||(e=" ");var r=t.length>=i?"":Array(1+i-t.length>>>0).join(e);return n?t+r:r+t},n=function(t,i,n,r,s,o){var a=r-t.length;return a>0&&(t=n||!s?e(t,r,o,n):""+t.slice(0,i.length)+e("",a,"0",!0)+t.slice(i.length)),t},r=function(t,i,r,s,o,a,u){var c=t>>>0;return t=(r=r&&c&&{2:"0b",8:"0",16:"0x"}[i]||"")+e(c.toString(i),a||0,"0",!1),n(t,r,s,o,u)},s=function(t,i,e,r,s,o){return null!==r&&void 0!==r&&(t=t.slice(0,r)),n(t,"",i,e,s,o)};return t[i++].replace(/%%|%(\d+\$)?([-+'#0 ]*)(\*\d+\$|\*|\d+)?(?:\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,function(o,a,u,c,l,h){var f,d,p,v,g;if("%%"===o)return"%";var m,b=!1,_="",y=!1,w=!1,k=" ",x=u.length;for(m=0;m-1?6:"d"===h?0:void 0,g=a?t[a.slice(0,-1)]:t[i++],h){case"s":return s(g+"",b,c,l,y,k);case"c":return s(String.fromCharCode(+g),b,c,l,y);case"b":return r(g,2,w,b,c,l,y);case"o":return r(g,8,w,b,c,l,y);case"x":return r(g,16,w,b,c,l,y);case"X":return r(g,16,w,b,c,l,y).toUpperCase();case"u":return r(g,10,w,b,c,l,y);case"i":case"d":return g=(d=(f=Math.round((f=+g||0)-f%1))<0?"-":_)+e(Math.abs(f)+"",l,"0",!1),n(g,d,b,c,y);case"e":case"E":case"f":case"F":case"g":case"G":return d=(f=+g)<0?"-":_,p=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],v=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],g=d+Math.abs(f)[p](l),n(g,d,b,c,y)[v]();default:return o}})},E=function(t){return t===+t&&isFinite(t)&&!(t%1)},M=function(t){return!(+t!==t||isFinite(t)&&!(t%1))},C=function(t){return("number"==typeof t||"string"==typeof t&&-1===" \n\r\t\f\v            ​\u2028\u2029 ".indexOf(t.slice(-1)))&&""!==t&&!isNaN(t)},q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I=function(t){var i,e,n=[void 0,null,!1,0,"","0"];for(e=0,6;e<6;e++)if(t===n[e])return!0;if("object"===(void 0===t?"undefined":q(t))){for(i in t)if(t.hasOwnProperty(i))return!1;return!0}return!1};function T(t){return t&&t.Zt&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function R(t,i){return t(i={exports:{}},i.exports),i.exports}var P=R(function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(t){if(!("string"==typeof t||t instanceof String))throw new TypeError("This library (validator.js) validates strings only")},t.exports=i.default});T(P);var D=R(function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1];for(var e in i)void 0===t[e]&&(t[e]=i[e]);return t},t.exports=i.default});T(D);var L=R(function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(t,i){(0,e.default)(t),(i=(0,n.default)(i,s)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var r=t.split(".");if(i.require_tld){var o=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var a,u=0;u1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(i);e+="";{if(!e)return t(i,4)||t(i,6);if("4"===e){if(!r.test(i))return!1;var o=i.split(".").sort(function(t,i){return t-i});return o[3]<=255}if("6"===e){var a=i.split(":"),u=!1,c=t(a[a.length-1],4),l=c?7:8;if(a.length>l)return!1;if("::"===i)return!0;"::"===i.substr(0,2)?(a.shift(),a.shift(),u=!0):"::"===i.substr(i.length-2)&&(a.pop(),a.pop(),u=!0);for(var h=0;h0&&h=1:a.length===l}}return!1};var e,n=(e=P)&&e.Zt?e:{default:e};var r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;t.exports=i.default});T(U);var B=T(R(function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(t,i){if((0,e.default)(t),!t||t.length>=2083||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;i=(0,s.default)(i,a);var o=void 0,l=void 0,h=void 0,f=void 0,d=void 0,p=void 0,v=void 0,g=void 0;if(v=t.split("#"),t=v.shift(),v=t.split("?"),t=v.shift(),(v=t.split("://")).length>1){if(o=v.shift(),i.require_valid_protocol&&-1===i.protocols.indexOf(o))return!1}else{if(i.require_protocol)return!1;i.allow_protocol_relative_urls&&"//"===t.substr(0,2)&&(v[0]=t.substr(2))}if(""===(t=v.join("://")))return!1;if(v=t.split("/"),""===(t=v.shift())&&!i.require_host)return!0;if((v=t.split("@")).length>1&&(l=v.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;f=v.join("@"),p=null,g=null;var m=f.match(u);m?(h="",g=m[1],p=m[2]||null):(v=f.split(":"),h=v.shift(),v.length&&(p=v.join(":")));if(null!==p&&(d=parseInt(p,10),!/^[0-9]+$/.test(p)||d<=0||d>65535))return!1;if(!((0,r.default)(h)||(0,n.default)(h,i)||g&&(0,r.default)(g,6)))return!1;if(h=h||g,i.host_whitelist&&!c(h,i.host_whitelist))return!1;if(i.host_blacklist&&c(h,i.host_blacklist))return!1;return!0};var e=o(P),n=o(L),r=o(U),s=o(D);function o(t){return t&&t.Zt?t:{default:t}}var a={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},u=/^\[([^\]]+)\](?::([0-9]+))?$/;function c(t,i){for(var e=0;e=n&&(void 0===s||o<=s)};var n,r=(n=P)&&n.Zt?n:{default:n};t.exports=i.default});T(H);var W=T(R(function(t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(t,i){if((0,e.default)(t),(i=(0,n.default)(i,a)).require_display_name||i.allow_display_name){var o=t.match(u);if(o)t=o[1];else if(i.require_display_name)return!1}var d=t.split("@"),p=d.pop(),v=d.join("@"),g=p.toLowerCase();"gmail.com"!==g&&"googlemail.com"!==g||(v=v.replace(/\./g,"").toLowerCase());if(!(0,r.default)(v,{max:64})||!(0,r.default)(p,{max:254}))return!1;if(!(0,s.default)(p,{require_tld:i.require_tld}))return!1;if('"'===v[0])return v=v.slice(1,v.length-1),i.allow_utf8_local_part?f.test(v):l.test(v);for(var m=i.allow_utf8_local_part?h:c,b=v.split("."),_=0;_$/i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,l=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;t.exports=i.default})),Z=function(t,i,e){var n=(t+"").indexOf(i,e||0);return-1!==n&&n};function G(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function K(t){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(t)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(t)}function V(t){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)}function X(t,i){return void 0===i&&(i=!0),i?tinycolor.toRgbString(t):tinycolor.toRgb(t)}function J(t){return"'"+(t=t.replace(/'/g,"").replace(/"/g,"")).trim()+"'"}function Q(t){return"boolean"==typeof t?t:!!parseInt(t,10)}var Y={isEmpty:function(t){if(null===t||void 0===t||""===t)return!0;try{t=JSON.parse(t)}catch(t){}return!(!_.isArray(t)&&!_.isObject(t)||!_.isEmpty(t))},isHex:G,isRgb:K,isRgba:V,isColor:function(t,i){for(var e=0;en?e:n;return parseInt(t.toFixed(r).replace(".",""))%parseInt(i.toFixed(r).replace(".",""))/Math.pow(10,r)},numberToBoolean:Q,stripHTML:function(t){return $(document.createElement("div")).html(t).text()},hasHTML:function(t){return/<[a-z][\s\S]*>/i.test(t)}};function tt(t,i,e,r){void 0===t&&(t={});var s=r.Gt,o=s&&s.length?s:r.params.choices;return n.isArray(o)&&-1===o.indexOf(i)&&(t=r.Kt(t,"vNotAChoice",i)),t}function it(t,i,e,r,s){void 0===t&&(t={}),void 0===s&&(s=!1);var o=r.Gt,a=r.params,u=o&&o.length?o:a.choices;if(n.isArray(i)){s&&u.length!==i.length&&(t=r.Kt(t,"vNotExactLengthArray",u.length)),E(a.min)&&i.lengtha.max&&(t=r.Kt(t,"vNotMaxLengthArray",a.max));for(var c=0;cr.max&&(t=n.Kt(t,"vNumberHigh",r.max))),t):t=n.Kt(t,"vNotAnumber")}function nt(t,i,e){return I(e)||i?!I(e)&&i&&-1===e.indexOf(i)?t=$control.Kt(t,"vSliderInvalidUnit",i):I(e)&&i&&(t=$control.Kt(t,"vSliderNoUnit")):t=$control.Kt(t,"vSliderMissingUnit"),t}var rt=c.core.Validate={required:function(t,i,e,n){return void 0===t&&(t={}),n.params.optional||Y.isEmpty(i)&&(t=n.Kt(t,"vRequired")),t},singleChoice:tt,multipleChoices:it,oneOrMoreChoices:function(t,i,e,r){return void 0===t&&(t={}),n.isString(i)?tt(t,i,0,r):it(t,i,0,r)},fontFamily:function(t,i,e,r){return n.isString(i)&&(i=i.split(",")),n.isArray(i)&&(i=n.map(i,function(t){return Y.normalizeFontFamily(t)})),it(t,i,0,r)},checkbox:function(t,i,e,n){return void 0===t&&(t={}),1!=i&&0!=i&&(t=n.Kt(t,"vCheckbox")),t},tags:function(t,i,e,r){void 0===t&&(t={});var s=r.params;return n.isString(i)||(t=r.Kt(t,"vTagsType")),n.isArray(i)||(i=i.split(",")),E(s.min)&&i.lengths.max&&(t=r.Kt(t,"vTagsMax",s.max)),t},text:function(t,i,e,r){void 0===t&&(t={});var s=r.params.attrs||{},o=s.type||"text";return n.isString(i)||(t=r.Kt(t,"vTextType")),"url"!==o||B(i,{require_tld:!1,allow_trailing_dot:!0})?"email"!==o||W(i)||(t=r.Kt(t,"vInvalidEmail")):t=r.Kt(t,"vInvalidUrl"),E(s.maxlength)&&i.length>s.maxlength&&(t=r.Kt(t,"vTextTooLong",s.maxlength)),E(s.minlength)&&i.length0|-(t<0)),r=Math.floor(t),s)switch(e){case"PHP_ROUND_HALF_DOWN":t=r+(o<0);break;case"PHP_ROUND_HALF_EVEN":t=r+r%2*o;break;case"PHP_ROUND_HALF_ODD":t=r+!(r%2);break;default:t=r+(o>0)}return(s?t:Math.round(t))/n};function pt(t){return n.isString(t)?t:JSON.stringify(t)}function vt(t,i,e){var r=e.Gt,s=r&&r.length?r:e.params.choices;return n.isArray(s)&&-1!==s.indexOf(t)?Y.stripHTML(t):null}function gt(t,i,e,r){void 0===r&&(r=!1);var s=e.Gt,o=e.params,a=s&&s.length?s:o.choices;n.isArray(t)||(t=[t]);for(var u=[],c=0;co.max&&(t=t.slice(0,o.max)),t}function mt(t,i,e){var r=e.params.attrs||{},s=Y.extractNumber(t,r.float);return null===s?null:(M(s)&&!r.float&&(s=dt(s)),n.isNumber(r.step)&&0!==Y.modulus(s,r.step)&&(s=dt(s/r.step)*r.step),n.isNumber(r.min)&&sr.max?r.max:s)}function bt(t,i){return(i=i||[]).length?i.length&&!t?i[0]:i.length&&t&&-1===i.indexOf(t)?i[0]:i.length&&t&&-1!==i.indexOf(t)?t:"":""}var _t={singleChoice:vt,multipleChoices:gt,oneOrMoreChoices:function(t,i,e){return n.isString(t)?vt(t,0,e):n.isArray(t)?gt(t,0,e):null},fontFamily:function(t,i,e){return t=Y.normalizeFontFamilies(t),n.isString(t)&&(t=t.split(",")),t=gt(t,0,e),n.isArray(t)?t.join(","):null},checkbox:function(t,i,e){return t?"1":"0"},tags:function(t,i,e){var r=e.params;return n.isString(t)&&(t=t.split(",")),n.isArray(t)||(t=[pt(t)]),t=n.map(t,function(t){return t.trim()}),E(r.max)&&t.length>r.max&&(t=t.slice(0,r.max)),Y.stripHTML(t.join(","))},text:function(t,i,e){var r=e.params.attrs||{},s=r.type||"text";return t=pt(t),"url"===s?t=t.trim():"email"===s&&(t=t.trim()),E(r.maxlength)&&t.length>r.maxlength&&(t=t.substr(0,r.maxlength)),E(r.minlength)&&t.length'+n.escape(i)+"
    "},i.prototype.wi=function(t){var i=t.value.replace(/'/g,"").replace(/"/g,"");return'
    '+n.escape(i)+"
    "},i.prototype.ki=function(t){return'
    '+n.escape(t.label)+"
    "},i}(xt);l.controlConstructor.kkcp_font_family=c.controls.FontFamily=$t;var Nt=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.yi=function(t){return'
    \n \n
    '},i.prototype.wi=function(t){return'
    \n \n
    '},i.prototype.ki=function(t){return'
    '+n.escape(t.label)+"
    "},i.prototype.Ni=function(t){return t.set+" "+t.set+"-"+t.value},i}(xt);l.controlConstructor.kkcp_icon=c.controls.Icon=Nt;var jt=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.validate=function(t){return rt.multipleChoices({},t,this.setting,this)},i.prototype.sanitize=function(t){return _t.multipleChoices(t,this.setting,this)},i.prototype.syncUI=function(t){n.isEqual(t,this.fi())||(this.ji(),this.params.sortable&&this.Ei())},i.prototype.ready=function(){var t=this;this.oi=this.Bt.getElementsByTagName("input"),this.params.sortable&&(this.container.sortable({items:"> label",cursor:"move",update:function(){t.setting.set(t.fi())}}),this.Mi()),this.ji(!0)},i.prototype.Mi=function(){var t=this.Bt.getElementsByTagName("label");this.Ci={};for(var i=0,e=t.length;i1){var o=t.Zi;o.on("click",function(){o.removeClass("kkcp-current"),this.className+=" kkcp-current",t.Ui({Vi:this.value})})}e.onchange=s,e.onkeyup=s;var a=i.attrs||{};r.slider(n.extend(a,{value:t.Xi(),slide:function(i,n){e.value=n.value,t.Ui({Ki:n.value})},change:function(i,e){i.originalEvent&&t.Ui({Ki:e.value})}}))},i.prototype.Ji=function(t){var i=t||this.setting(),e=m.nt.exec(i);return e&&e[0]?e[0]:null},i.prototype.Xi=function(t){var i=t||this.setting(),e=m.rt.exec(i);return e&&e[0]?e[0]:null},i.prototype.fi=function(t){var i;return i=t&&t.Ki?""+t.Ki:this.Wi.value,this.params.units&&(t&&t.Vi?i+=t.Vi:i+=this.Zi.filter(".kkcp-current").val()),i},i.prototype.$i=function(t){var i=this.params,e=this.Xi(t),n=this.Ji(t);this.Wi.value=e,this.Gi.slider("value",e),i.units&&this.Zi.removeClass("kkcp-current").filter(function(){return this.value===n}).addClass("kkcp-current")},i.prototype.Ui=function(t,i){"API"===i?this.$i(t):this.setting.set(this.fi(t))},i}(ut);l.controlConstructor.kkcp_slider=c.controls.Slider=Dt;var Lt=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.validate=function(t){return rt.multipleChoices({},t,this.setting,this,!0)},i.prototype.sanitize=function(t){return _t.multipleChoices(t,this.setting,this,!0)},i.prototype.syncUI=function(t){n.isEqual(t,this.params.lastValue)||(this.Ei(),this.params.lastValue=t)},i.prototype.ready=function(){var t=this.setting,i=this.container;this.Mi(),this.params.lastValue=this.setting(),i.sortable({items:".kkcp-sortable",cursor:"move",update:function(){var e=i.sortable("toArray",{attribute:"data-value"});t.set(e)}})},i.prototype.Mi=function(){var t=this.Bt.getElementsByClassName("kkcp-sortable");this.Ci={};for(var i=0,e=t.length;i (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) */ /** * Variables: WordPress diff --git a/assets/css/admin.min.css b/css/admin.min.css similarity index 92% rename from assets/css/admin.min.css rename to css/admin.min.css index 387977b..df05683 100644 --- a/assets/css/admin.min.css +++ b/css/admin.min.css @@ -1,6 +1,6 @@ /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) */.kkcp-logo{position:absolute;top:0;right:20px;width:110px;height:110px;background:url(../images/logo.png) center 100% no-repeat}.kkcp-badge{color:#c6c5c5;font-size:13px;text-align:center;font-weight:400;margin:5px 0 0;padding-top:115px;height:45px;display:inline-block;width:150px;text-rendering:optimizeLegibility;box-shadow:0 1px 3px rgba(0,0,0,.2);background:url(../images/logo-white.png) center 24px/85px 85px no-repeat #464646}.kkcp-badge:before{content:"Customize Plus";display:block;color:#f9f8f8;font-size:15px;font-weight:600}.about-wrap .kkcp-badge{position:absolute;top:0;right:20px}.kkcp-title{font-weight:400}.kkcp-features li{position:relative;padding:10px 0 10px 40px;margin:0}.kkcp-features li>i{position:absolute;top:20px;left:0;width:40px;opacity:.4;transition:font-size .18s ease}.kkcp-features li.kkcp-premium>i{opacity:.8;text-shadow:0 0 6px #e8d43d}.kkcp-features:hover li:hover>i{font-size:30px}.kkcp-features b{font-size:17px;font-weight:400}.kkcp-features em:before{font-family:dashicons;font-style:normal;content:"\f155";margin-right:3px;color:#f9f25f;text-shadow:-1px 1px 1px rgba(0,0,0,.3)}.kkcp-features a{font-style:normal}.kkcp-video{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;background:#ccc}.kkcp-video>iframe{position:absolute;top:0;left:0;width:100%;height:100%}.kkcp-video-container{max-width:500px;margin-bottom:30px}@media (min-width:769px){.about-wrap .kkcp-logo{position:static;float:left;margin:0 20px 20px 0}} \ No newline at end of file diff --git a/assets/css/customize.css b/css/customize.css similarity index 99% rename from assets/css/customize.css rename to css/customize.css index 79df34b..f69e9f8 100644 --- a/assets/css/customize.css +++ b/css/customize.css @@ -1998,10 +1998,10 @@ input[type=text].sp-input.sp-validation-error { } /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) */ /** * Shadow on sidebar diff --git a/assets/css/customize.min.css b/css/customize.min.css similarity index 99% rename from assets/css/customize.min.css rename to css/customize.min.css index c75df5b..ef7e752 100644 --- a/assets/css/customize.min.css +++ b/css/customize.min.css @@ -83,8 +83,8 @@ */.sp-container{z-index:1;position:relative;width:100%;box-sizing:border-box;padding:0 8px;max-width:270px}.sp-palette-container,.sp-picker-container{width:100%;padding:8px 0 0}.sp-preview,.sp-thumb-el{position:relative}.sp-alpha-inner,.sp-preview-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-dd,.sp-replacer{display:none}.sp-fill{padding-top:70%}input[type=text].sp-input{width:100%;box-sizing:border-box}input[type=text].sp-input.sp-validation-error{background:#fee;border-color:#eb9b9b}.sp-alpha,.sp-color,.sp-sat{border-radius:3px;border:0}.sp-alpha-inner,.sp-clear,.sp-hue,.sp-val{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);border:0}.sp-val{cursor:crosshair}.sp-hue{cursor:pointer}.sp-dragger{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:hsla(0,0%,50%,.5);box-shadow:none;width:8px;height:8px;margin-top:4px;margin-left:4px;cursor:move;opacity:.5}.sp-dragger:hover{border-color:#999;opacity:.8;box-shadow:0 0 2px rgba(0,0,0,.75)}.sp-dragger:after{content:" ";position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:hsla(0,0%,100%,.8);border-radius:50%}.sp-dragger:hover:after{border-color:#fff}.sp-alpha,.sp-clear-display{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);cursor:pointer}.sp-slider{background:0;margin:0;right:-3px;left:-3px;border-style:solid;border-color:#aaa;border-width:4px 3px;width:auto;height:4px;margin-top:-2px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;cursor:ns-resize}.sp-slider:before{content:"";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.sp-alpha{top:104%;height:15%;max-height:24px}.sp-alpha-handle{background:0;margin:0;top:-3px;bottom:-3px;border-style:solid;border-color:#aaa;border-width:3px 4px;height:auto;width:4px;margin-left:-4px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;cursor:ew-resize}.sp-alpha-handle:before{content:"";position:absolute;top:-2px;bottom:-2px;left:-3px;right:-3px;border:2px solid #fff;border-radius:3px}.sp-clear-enabled .sp-clear{top:85%;height:15%}.sp-clear-enabled .sp-hue{top:0;height:81%}.sp-clear-enabled.sp-alpha-enabled .sp-clear{top:104%}.sp-clear-enabled.sp-alpha-enabled .sp-hue{height:100%}.sp-clear-enabled.sp-alpha-enabled .sp-alpha{width:85%}.sp-color{right:15%}.sp-clear-enabled .sp-clear,.sp-hue{left:89%}.sp-top{margin-bottom:1%}.sp-alpha-enabled .sp-top{margin-bottom:15%}.sp-thumb-el:first-child{margin-left:0}.sp-thumb-el:last-child{margin-right:0}.sp-palette{max-width:none}.sp-palette .sp-thumb-active .sp-thumb-inner:before{content:"\f147";font-family:dashicons;text-align:center;font-size:20px;line-height:100%;color:#222}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner:before{color:#fff}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:9%;height:22px;margin:1px;border:2px solid transparent;cursor:pointer}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:#0099d5}.sp-palette-toggle{display:block;width:100%;padding:8px 0 0;background:0;border:0;box-shadow:none;color:#0099d5;text-align:center;outline:none;cursor:pointer}.sp-palette-toggle:hover{color:#2ea2cc;text-decoration:underline}.sp-show-initial .sp-input-container{float:right;width:auto}.sp-initial{overflow:hidden}.sp-initial .sp-palette-row-initial .sp-thumb-el:first-child .sp-thumb-inner{border-radius:3px 0 0 3px}.sp-initial .sp-thumb-el{display:block;float:left;height:27px;width:50%;border:0;cursor:pointer} /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) */.wp-full-overlay.expanded .wp-full-overlay-sidebar{transition:box-shadow .3s ease-in-out;box-shadow:0 0 0 0 transparent}.wp-full-overlay.expanded .wp-full-overlay-sidebar:hover{box-shadow:50px 0 85px -65px rgba(0,0,0,.15)}.kkcp-if-filereader,.kkcp-if-no-filereader{display:none}.filereader .kkcp-if-filereader,.no-filereader .kkcp-if-no-filereader{display:block}#customize-theme-controls .customize-pane-child.open{min-height:100%;overflow-y:visible}.accordion-section-title:focus,.customize-controls-close:focus,.customize-panel-back:focus,.customize-section-back:focus,.kkcpui-header-toggle:focus{box-shadow:inset 0 0 0 1px rgba(30,140,190,.5),inset 0 0 6px 1px rgba(30,140,190,.2)}.kkcp-control{position:relative}.kkcp-extras-btn{top:6px;left:1px}.kkcp-extras-open .kkcp-extras-btn{color:#333;opacity:1}.kkcp-extras-list{z-index:11;display:none;position:absolute;top:29px;left:20px;width:256px;margin:0 0 6px;padding:6px;background:#fff;border:1px solid #ddd;border:1px solid rgba(0,0,0,.2);box-shadow:0 10px 10px rgba(0,0,0,.1);box-sizing:border-box}.kkcp-has-scrollbar .kkcp-extras-list{width:240px}.kkcp-extras-open .kkcp-extras-list{display:block}.kkcp-extras-list li{padding:6px 9px;margin:0;border-bottom:1px solid #eee}.kkcp-extras-list li:last-child{border-bottom:0}.kkcp-extras-list li:hover{margin:0 -6px;padding:6px 15px;background:#f6f6f6;cursor:pointer}.kkcp-extras-list li.kkcp-disabled{cursor:default;opacity:.5}.kkcp-extras-list li:before{font-size:14px;font-weight:400;font-family:dashicons;margin-right:3px}.kkcp-extras-reset_last:before{content:"\f474"}.kkcp-extras-reset_initial:before{content:"\f321"}.kkcp-extras-reset_factory:before{content:"\f308"}.kkcp-extras-hide:before{content:"\f177"}#customize-preview.wp-full-overlay-main{display:none}#customize-preview.wp-full-overlay-main.iframe-ready{display:block}.kkcp-overlay--preview,.kkcp-overlay--sidebar{z-index:1;left:0;right:0;width:auto;background:#eee}.kkcp-overlay--preview .kkcp-text,.kkcp-overlay--sidebar .kkcp-text{font-weight:200}.kkcp-overlay--preview h1,.kkcp-overlay--sidebar h1{font-size:45px}.kkcp-overlay--preview .spinner,.kkcp-overlay--sidebar .spinner{float:none;display:inline-block;visibility:visible;margin:-3px 5px 0 0}.kkcp-overlay--sidebar{z-index:10;position:fixed;left:0;width:300px;top:46px;bottom:46px;background-color:#eee;background-color:hsla(0,0%,98%,.88)}.kkcp-loading #customize-header-actions .spinner{visibility:visible;display:block}.kkcp-show-on-loading{display:none}.kkcp-loading .kkcp-show-on-loading{display:inline-block}#accordion-panel-widgets .panel-title:before,#accordion-panel-widgets>h3:before{content:"";position:relative;top:4px;left:-2px;opacity:.4;font-size:20px;font-weight:400;font-family:dashicons}#accordion-panel-nav_menus .panel-title:before,#accordion-panel-nav_menus>h3:before{content:"";position:relative;top:4px;left:-2px;opacity:.4;font-size:20px;font-weight:400;font-family:dashicons}#accordion-section-posts>h3:before{content:"";position:relative;top:4px;left:-2px;opacity:.4;font-size:20px;font-weight:400;font-family:dashicons}.accordion-section-title .dashicons{opacity:.4}.panel-title:before{line-height:0}.kkcp-markdown-supported .customize-control-description p:first-child,.kkcp-markdown-supported .customize-control-title>p{margin:0}.kkcp-markdown-supported .kkcp-control code{font-size:12px;font-weight:400}.kkcp-markdown-supported .kkcp-control .description code{font-style:normal;color:#c7254e}.kkcp-markdown{font-style:normal}.kkcp-markdown h1,.kkcp-markdown h2,.kkcp-markdown h3{font-weight:400}.kkcp-markdown h1{font-size:30px}.kkcp-markdown h2{font-size:23px}.kkcp-markdown h3{font-size:17px!important}.kkcp-markdown ul{list-style:disc;margin:0 0 1em 1em}.kkcp-markdown ul ol,.kkcp-markdown ul ul{margin-top:0;margin-bottom:0}.kkcp-markdown li>ol,.kkcp-markdown li>ul{margin-top:6px}.kkcp-markdown ol{list-style:decimal;margin:0 0 1em 1em}.kkcp-markdown ol ol,.kkcp-markdown ol ul{margin-bottom:1em}.kkcp-markdown code{font-size:12px;color:#c7254e;background:rgba(0,0,0,.07)}.kkcp-markdown table{margin:1.3em 0;width:100%;background:#f9f9f9;border-collapse:collapse}.kkcp-markdown th{background:#fdfdfd}.kkcp-markdown td,.kkcp-markdown th{padding:4px 8px;border:1px solid #eee}.kkcp-markdown pre{word-wrap:normal;background:rgba(0,0,0,.07);padding:6px 8px;line-height:1.4em}.kkcp-markdown pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.kkcp-markdown blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #e1e1e1}.kkcp-markdown hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #e1e1e1}.kkcp-markdown hr:after,.kkcp-markdown hr:before{display:table;content:""}.kkcp-markdown hr:after{clear:both}.kkcp-notification.notice p{margin:0;padding:0}#customize-controls .kkcp-control .customize-control-notifications-container{margin-top:9px}#customize-controls ::-webkit-scrollbar{width:10px;height:10px}#customize-controls ::-webkit-scrollbar-button{display:none;height:0;width:0}#customize-controls ::-webkit-scrollbar-corner{background:transparent}#customize-controls ::-webkit-scrollbar-track{border-top:0 solid transparent;border-bottom:0 solid transparent;background-clip:padding-box}#customize-controls ::-webkit-scrollbar-track:vertical:hover{background-color:rgba(0,0,0,.035);-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,.16),inset -1px -1px 0 rgba(0,0,0,.08)}#customize-controls ::-webkit-scrollbar-track:horizontal:hover{background-color:rgba(0,0,0,.035);-webkit-box-shadow:inset -1px 1px 0 rgba(0,0,0,.16),inset 1px -1px 0 rgba(0,0,0,.08)}#customize-controls ::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.16);-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,.16),inset 0 -1px 0 rgba(0,0,0,.08)}#customize-controls ::-webkit-scrollbar-thumb:horizontal{-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,.16),inset -1px 0 0 rgba(0,0,0,.08)}#customize-controls ::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.32);-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.24)}#customize-controls ::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0,.48);-webkit-box-shadow:inset 1px 1px 3px rgba(0,0,0,.32)}.kkcp-tabs{margin:10px 0 0}.kkcp-tabs>ul{float:left;width:100%;border-bottom:1px solid #dfdfdf}.kkcp-tabs>ul>li{border-color:transparent;border-style:solid;border-width:1px 1px 0;color:#999;float:left;margin:0;padding:3px 8px;outline:0}.kkcp-tabs>ul>li.kkcp-tab{cursor:pointer}.kkcp-tabs>ul>li.selected{background:#fdfdfd;border-color:#dfdfdf;color:#777;margin-bottom:-1px;padding-bottom:4px}.kkcp-tabs>div{display:none;float:left;width:100%;box-sizing:border-box;padding:8px;padding-top:12px;font-size:13px}.kkcp-tabs>div.selected{display:block}.kkcpui-spinner{display:inline-block;width:45px;height:14px;background:url(data:image/gif;base64,R0lGODlhLQAOAOMAANTS1Ozq7Nze3PT29Nza3PTy9OTm5Pz+/NTW1Ozu7OTi5Pz6/P///wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBgAMACwAAAAALQAOAAAEh5AtI4i9RC3GWVLYJSRHN1WhYGwLAbxwDAxcIN8GtyC3PBg9mYAx4AVhNODxJRAsYYfC82U4uJ6I63OQmAKqxqd2eehOq+NjOsj1gr3hZXuqOMSPzulg4LZ61z1zT3V3QYA3ZX2HMkpPRF4BDHlLCHxPCRyNRyWWS5gDkzeYHAeaQiUcRUeYEQAh+QQJBgAUACwAAAAALQAOAISsrqzc2tzExsTs7uy8urzk5uT8+vzU0tS0trTk4uT09vTEwsS0srTc3tzMzsz08vS8vrzs6uz8/vzU1tT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF0yClTAtUmqajUCz1NEEsB80gtUYBz3RhUAYCgAEoEo2MB6twODicz+ihwDJMnNCsY2ItGr1HgEBilZqxK+bZnFgMvXAjwfBYY6O2wH0fDbjjgAwGA3yFeXZSExBvgF5zdYVmERIBiFgkcURHmoORewMGlZ5PmI1hDBKQlg6HoweKp4xvgqqjoKKWpYFgdKtNk7ieurNgAI+uDqyUyHqNcAwLBgauTUoJvg0KQsTPESwRqwk3I6MTK3UEDOnrBAveVRExEwHz8wEFNywKCfX0/gkrQgAAIfkECQYAGAAsAAAAAC0ADgCEjIqM1NLUrKqs7OrsnJqc3N7cvLq89Pb0lJaU3NrctLa09PL0pKak5ObkxMLE/P78jI6M1NbUrK6s7O7snJ6c5OLkvL68/Pr8////AAAAAAAAAAAAAAAAAAAAAAAAAAAABfggdjhMaZbGhK3YUiRwnBTTw17NK8/NJVIACGBIDCIGq0FgyWwGGqtLxEkdFa9EyePCdCy9junygGl0A+BvpCIIuoXwIeEyoQbE3sDkklDf/0wRDFhFQgh0aGphYV81Yl0Ri1OCb5VDEId1j39TYRE1fZKPkRGUhEJDCA91aJ2kfw6Oga1OlHGob5l2pJ6grZ6/k4NXuKmIwU2dspOtzGGDcZe5x0uutJ8PfbSKpabSWKp1jJ7AYbKQnGgFFtG3QQxbpbXNemXXyBEFCwjfxFD240h1amDjAJ5RjMhMUEABQUMKDyX8w7CqQCmLFvPVYHEAY7eLBciEAAAh+QQJBgAbACwAAAAALQAOAIRsamzU0tSUkpTs6ux8fnykpqTc3tz09vR0dnSkoqSMiozc2tycmpz08vS0srTk5uT8/vxsbmzU1tSUlpTs7uyEgoSsqqzk4uT8+vx8enyMjoz///8AAAAAAAAAAAAAAAAFzuDWOJpSKaaiFcPmbtS1zPRiUNCLPUY9Gw+MiAAoGo+Ih2sQaDqfAeUGI4FaD46j1jiBYKzgw+YBhho02y0CQylDH5CF21GVKNJaxKHxpAf8fnByTQ6EdU12eEgHbVZVAY84j0+TTneKRXp8bk5wlW6XmHqNfmWCc4+hipqIToCPnoZ/n4mYABEQjWCTsZCtVmi2rJxNp8QSFrYAGhAHrp+zYgZgpZAUCLYSLmS+spAGOQeP1YZiDwkI6erpGgYvjBLx8QbycO/09PLxD2IhACH5BAkGABsALAAAAAAtAA4AhIyKjMTGxOTm5KyqrNTW1PT29Ly6vJyanOzu7LSytNze3JSWlNTS1Pz+/MTCxKSmpIyOjMzKzOzq7KyurNza3Pz6/Ly+vJyenPTy9LS2tOTi5P///wAAAAAAAAAAAAAAAAX+4FY4T2mWBrKtmxBZjgXLkdawlaBQfK8IFdEFAAEYj8SFZEWZOCcJZ9TJuFUIjAgju9VGCBUHcnycNArRqXMgHSRUAm6WoN1uFQOivsg3HioSTwluhE8TNhRfdV1yBA9kSEULOVBshoNTChUUdlmKdKCPfX1GEJMCgoWpCg2JXJ+fjpB6RqeDl6oJFK1doLAMsqNHfKdtt21Ou65zsKFkRUjFx5XGysy+oMCitHtJlMjUT5pY182yw5ALDQJqx5hurJzlvsAWpMIQD2dpbNNSSxq8YPukAMOCUpAgCFjBwFCldxFuFCDX7AuBAhsQZLiwgOMFjxMWrmigwIGBkxkQUFqgEGRFAQUKCMScKRNjCAAh+QQJBgAbACwAAAAALQAOAISMiozExsTk5uSsrqzU1tT09vScmpy8urzMzszs7uzc3tyUkpS0trT8/vykoqTEwsSMjozMyszs6uy0srTc2tz8+vy8vrzU0tT08vTk4uSkpqT///8AAAAAAAAAAAAAAAAF8OBWEI9VmiZSbGxDTZoTzwPRsFslKFTvK4JK7jCYDI5G5ATDigCe0CjEcqsQLghsFrElWI9IcHIQaGAWAEh6rX5CJBsBdr6lZx5FsB55qCiigGpqFy51hnMke4pFFRSCbIAACIV0lVkEFnmLR30UkZBqkxSHh4l6RkmojY9tgaKklaaKYxMugZBPr5axFrSaeRN+uFJpurCXeIsTDqqeUKxRxrvIp0XMSX1/rcShlMcXV8p6DxUJaKBSAhsZ31kKBUTAYkVwGw+fjww3I98EKxgRDhyYIHDggQf1ciDQYKChw4ZlcBTIQIBCxYsU3m0IAQAh+QQJBgAaACwAAAAALQAOAIRsamy8urzc3tyUlpT09vTU0tR8fnzs6uysqqzExsR0cnTk5uScnpz8/vzc2tyEhoRsbmzEwsTk4uScmpz8+vzU1tTs7uysrqzMysyMioz///8AAAAAAAAAAAAAAAAAAAAF26BGLYJjno5EaWxTTE8Wz1PSsCKJmsKyUo4CpiAkDgsVAisAaDqfAMSNUilah5jK6Fo5FgUaiwJKhkg0i6PXWxAIiHCjsFtpVMj4SCMYVxcrDlhCWYRVdRh4ZAF2RRiFWUQVb3OPXUguiVCLVXOUXUOAanSVFIiZTot8lZBZk6t0dQWnqIyvhYGej0gEsrMAm0ajwpLBr4e+v4y5w0G2dHbINm/OWQvFwq1oEL4VGtPYdG0EVc5KDRezAzfjy4VKBAsVkvMCkkotAQ8GCvv9Bhf3NMCjN6/CAiUhAAAh+QQJBgAaACwAAAAALQAOAISMiozMyszk5uSsrqzc2tz09vScmpy8urzU0tTs7uyUkpS0trTk4uT8/vykoqTEwsSMjozMzszs6uy0srTc3tz8+vy8vrzU1tT08vSkpqT///8AAAAAAAAAAAAAAAAAAAAF/qBWCRRhngRTaWxDTJkTz8PVsFqBPBbf94iCiBBBRIpHY+Qi1AQggKhUCrHcKoeBdjDZag8YgRExRpIjDA1GEYW6AVC4RBPRdrfde4Bi7o9tFHBTg1EIDRZ3Xl4TBwRlj0gXFYFtgm9QEYeKmwMLRJCPkgSChFSZiIubBxSgfTajlrFxmVl4dreNfn6SlKWmDQ+cXHiOumWvsrFRERUWtonDua1/k76VEKfQwxMOeazGkQ2Bl6RSmcG3A93DAwcC4GMUGglshJcCTqmJXQ8VF9NFmlggNwXCghUYJkDj1sXBgTmTCFyQSPECgyYiImQwYEABx48PbrBIEOAAowMoBVEGmBMCACH5BAkGABwALAAAAAAtAA4AhIyKjMTGxKyqrOTm5JyanNTW1Ly6vPT29LSytOzu7KSipNze3JSSlNTS1MTCxPz+/MzKzKyurOzq7JyenNza3Ly+vPz6/LS2tPTy9KSmpOTi5JSWlP///wAAAAAAAAAAAAX+IGcNC2WelGZxLDdAlVPFM6Q9LVYJStb3mQpGRGlAGkbksVE4sCiRaAQRpUYbOAwBwO16CYlB0lhYJhecA9UqiLYRAkSCU/Hau5cFcq8kQwoPElJwa1JRKgp3dxMUR45/kAVMDwNTbW6WcBELDxOKdht6fmWkRwUjVXGqgxEUD4mfXYxLkbWAA5qGhJcLFp6xXKFKpcSnlZmXgwK9sMCzo7WTuMm7mgiuv86itpFNx7mGEW2uzbGM0MR/geLI1RGIXhuKE2LokWgYCODhUxIcF8C4RDggiRspJxwapKrWBgKOBPJibRiQZkCBAgswalyAkMODBQ4uGDAgkqQDCisMWCS4MKGly5YXKIYAACH5BAkGABkALAAAAAAtAA4AhGxqbNTS1IyOjOzq7Hx+fNze3KSipPT29HR2dNza3JyanPTy9ISGhOTm5KyqrPz+/HRydNTW1Ozu7OTi5Pz6/Hx6fJyenIyKjKyurP///wAAAAAAAAAAAAAAAAAAAAAAAAW8YEY1RWKeyURlbCZN6FlIT7s4wsXouuBIokRgSCwGDqyBcdlgSSqAqHSKGDSWy0LmEMEakY6pWGopeI2PxbnYeDDGY4JwPTxI6MP2G06dDzFEgEQPd0WCf3lufH14R4V0eotSCF14hI2RkgAIZnh2gWcNFHuSCH6gaI9GhwGZpX6ClUUHB5iKmghXZ4BatXhAFpoAAr5nEUgZnahEETUNEJpNB2ZdshEFyBkPDZXXEdUFNSwNCgjm5+YCTSEAIfkECQYAGAAsAAAAAC0ADgCEjIqM1NLUpKak7OrsnJqc3N7ctLa09Pb0lJKU3NrctLK09PL0pKKk5ObkvL68/P781NbUrKqs7O7snJ6c5OLkvLq8/Pr8lJaU////AAAAAAAAAAAAAAAAAAAAAAAAAAAABd8gZjVFYp4JZWEsJlHoWUhPuzgRI+i64CyiRGBILAYOrIFx2WAtCICodEqQNIgOLIRYwBy2SyOyMi1LDYWwFvJYDLMBuBwisTDM5onQAeYvHxJqRg0PE3hlF0JhfkOAS4xENIaHUnqCRY5xRFt+fIR3lFGJb6RvYAeBRX5gQ5KhUZaPEKyZi2CEhgihsaYBrHyZc0Osn68AE2lxs1q+bG5FnNEBrlMXeVdGfKxdB6pbYGASGA7GBt1rWkgY2NmchC7WlBdNBwWz9rOzDepeEvn59mbUYCHBwISDCA8aaBICACH5BAkGABQALAAAAAAtAA4AhKyurNza3MzKzOzu7Ly6vOTm5Pz6/NTS1LS2tOTi5PT29MTCxLSytNze3MzOzPTy9Ly+vOzq7Pz+/NTW1P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXcIGUUTWCeQWJQLDUk6NkMUqscC5Tr+qGIAcfBISQOHZMfJXJsFg8FloEAqAIY1irhURgevM9hgqKYPM/en6OKtWLbggYaPZE8wPgnbZHtswkBeXl1A4JoEQYQbX5WCEGGXhMGD3N5NBB9i1YEDZBFdZSeQ3tZbaYAgJVPkoWqXoiYjIsMga5IdrajEnxsV6Woj66Soa4HERJUmb5snbaguQ6kvpq+BAW5DSKiQj8C1NQLBhOiSl2uCTUPs34MDyIlEwHx8wlKIgMm8/ImBTUsDwIIEGAwsKCACBRCAAA7) 50% no-repeat}.kkcpui-toggle{display:inline-block;vertical-align:top;padding:0 9px;line-height:22px;border-radius:0;border:1px solid #ccc;background:#f7f7f7;box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);color:#555;font-size:11px;text-decoration:none;cursor:pointer}.kkcpui-toggle:focus,.kkcpui-toggle:hover{background:#fafafa;border-color:#999;color:#222}.kkcpui-textarea{width:100%}.kkcpui-control-btn{z-index:3;position:absolute;width:20px;height:20px;line-height:21px;font-size:15px;color:#aaa;opacity:0;transition:opacity .18s ease,color .18s ease;cursor:pointer}.kkcp-control:hover .kkcpui-control-btn{opacity:1}.kkcpui-midpoint{vertical-align:middle;display:inline-block}.kkcpui-midpoint-wrap{text-align:center;vertical-align:middle;height:100%}.kkcpui-midpoint-wrap:before{content:"";display:inline-block;height:100%;vertical-align:middle}.kkcpui-hidden{display:none}.kkcpui-light{color:#666}.kkcpui-lighter{color:#bbb}.kkcpui-alert{border:1px solid transparent;padding:10px 15px;box-shadow:0 8px 14px -12px rgba(0,0,0,.18);border-radius:3px}.kkcpui-alert.light{background-color:#fff;border-color:#d9d9d9;color:#333}.kkcpui-alert.danger{background-color:#fee;border-color:#eb9b9b;color:#3b0000}.kkcpui-alert.warning{background-color:#ffffe6;border-color:#eaea95;color:#330}.kkcpui-alert.success{background-color:#ecffe7;border-color:#a8ea95;color:#0b3400}.kkcpui-alert.info{background-color:#e7f5ff;border-color:#95c8ea;color:#001f34}.kkcpui-alert p{margin:5px 0}.kkcpui-alert span.description{font-style:normal}#customize-theme-controls .accordion-section-content,#customize-theme-controls .customize-pane-child.accordion-section-content{padding:0}.customize-section-title{margin:0}.customize-control,.customize-section-description{padding-left:20px;padding-right:12px}.customize-section-description-container+#customize-control-custom_css:last-child{margin-bottom:0}.customize-control{box-sizing:border-box;margin:0;padding-top:6px;padding-bottom:6px;border-color:transparent;border-style:solid;border-width:1px 0;transition:background-color .18s ease}.customize-control:hover{background-color:#f3f3f3;border-color:#f1f1f1}.customize-control:last-of-type{border-bottom:none;margin-bottom:24px}.customize-control.has-error .selectize-dropdown,.customize-control.has-error .selectize-input,.customize-control.has-error input,.customize-control.has-error select,.customize-control.has-error textarea{border-color:#eb9b9b}.customize-control.has-error .selectize-dropdown:focus,.customize-control.has-error .selectize-input:focus,.customize-control.has-error input:focus,.customize-control.has-error select:focus,.customize-control.has-error textarea:focus{box-shadow:0 0 4px #eb9b9b}.kkcp-control-focused{-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation:focus-control 2s ease;animation:focus-control 2s ease}.kkcp-control-focused .no-cssanimations{background:#ffc}@-webkit-keyframes focus-control{0%{box-shadow:0 0 0 transparent;background:#eee;-webkit-transform:scale(1);transform:scale(1)}70%{box-shadow:0 0 80px rgba(0,0,0,.38);background:#ffc;-webkit-transform:scale(1.1);transform:scale(1.1)}to{box-shadow:0 0 0 transparent;background:#eee;-webkit-transform:scale(1);transform:scale(1)}}@keyframes focus-control{0%{box-shadow:0 0 0 transparent;background:#eee;-webkit-transform:scale(1);transform:scale(1)}70%{box-shadow:0 0 80px rgba(0,0,0,.38);background:#ffc;-webkit-transform:scale(1.1);transform:scale(1.1)}to{box-shadow:0 0 0 transparent;background:#eee;-webkit-transform:scale(1);transform:scale(1)}}.customize-section-description-container{background:linear-gradient(#fff 45%,transparent)}#customize-theme-controls #sub-accordion-section-custom_css.accordion-section-content.open,#customize-theme-controls #sub-accordion-section-custom_css.customize-pane-child.accordion-section-content.open,#customize-theme-controls .control-section-nav_menu.accordion-section-content.open,#customize-theme-controls .control-section-nav_menu.customize-pane-child.accordion-section-content.open,#customize-theme-controls .kkcp--reset-style.accordion-section-content.open,#customize-theme-controls .kkcp--reset-style.customize-pane-child.accordion-section-content.open{padding:12px}#sub-accordion-section-custom_css .customize-section-title,.control-section-nav_menu .customize-section-title,.kkcp--reset-style .customize-section-title{margin:-12px -12px 0}#sub-accordion-section-custom_css .customize-control,.control-section-nav_menu .customize-control,.kkcp--reset-style .customize-control{padding:0;margin-bottom:12px;border:0}#sub-accordion-section-custom_css .customize-control:hover,.control-section-nav_menu .customize-control:hover,.kkcp--reset-style .customize-control:hover{background:transparent}#sub-accordion-section-custom_css #customize-control-custom_css,.control-section-nav_menu #customize-control-custom_css,.kkcp--reset-style #customize-control-custom_css{margin-bottom:-12px}.control-section-nav_menu .customize-control{margin-bottom:inherit}.kkcpcolor-toggle{margin-left:-1px;border-radius:0 3px 3px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kkcpcolor-current{display:inline-block;width:26px;height:22px;border:1px solid #ccc;border-radius:3px 0 0 3px;box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);margin-left:4px}.kkcpcolor-current-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.kkcpcolor-current-overlay{position:relative;box-shadow:none;left:-37px;margin-right:-40px}.kkcpcolor-input{display:none}.customize-control .iris-border{background-color:transparent;border:0}.customize-control-kkcp_content:hover{background:inherit}.customize-control-kkcp_content .kkcpui-alert{margin-left:-7px}.customize-control-kkcp_font_family .selectize-control{margin-top:6px}.customize-control-kkcp_font_family .selectize-input{border-color:transparent;box-shadow:none}.customize-control-kkcp_font_family:hover .selectize-input{border-color:#ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.customize-control-kkcp_font_family .selectize-input.focus,.customize-control-kkcp_font_family:hover .selectize-input.focus{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.customize-control-kkcp_icon .selectize-input{background:transparent;border:0;box-shadow:none}.selectize-control .selectize-input>div.kkcp-icon-selectItem{padding:9px!important;background:#fff;border:0}.selectize-control .selectize-input>div.kkcp-icon-selectItem>.remove{width:100%;height:100%;color:transparent}[data-selectable].kkcp-icon-selectOption{display:inline-block;box-sizing:border-box;width:14.2857142857%;padding:10px;overflow:visible;text-align:center;opacity:.8}[data-selectable].kkcp-icon-selectOption.active{opacity:1;color:#000;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.selectize-control.plugin-remove_button .kkcp-icon-selectOption{padding:10px!important}.kkcp-icon-selectHeader{margin:4px 10px;padding-top:8px;border-top:1px solid #eee;text-align:center;color:#888}.optgroup:first-child .kkcp-icon-selectHeader{border-top:0}.selectize-control.plugin-remove_button [data-value] .remove{border-left-color:#eee;color:#999}.selectize-control.plugin-remove_button [data-value] .remove:hover{color:#333}.customize-control-kkcp_multicheck.ui-sortable{overflow-x:hidden}.customize-control-kkcp_multicheck .description{margin-bottom:9px}.customize-control-kkcp_multicheck label{display:block;margin:3px 0 6px}.customize-control-kkcp_multicheck label:hover{color:#333}.customize-control-kkcp_multicheck label:hover input[type=checkbox]{border-color:#333}.customize-control-kkcp_multicheck input[type=checkbox]{margin-right:9px}.customize-control-kkcp_multicheck.ui-sortable>label:after{content:"\f156";font-family:dashicons;float:right;opacity:.6}.customize-control-kkcp_multicheck.ui-sortable>label:hover:after{cursor:move;opacity:1}.customize-control-kkcp_multicheck.ui-sortable .ui-sortable-placeholder{background:#dbdbdb;box-shadow:inset 0 0 8px 5px #eee;border-radius:5px;visibility:visible!important}.customize-control-kkcp_password .kkcp-password{display:block;position:relative}.customize-control-kkcp_password .kkcp-password__preview,.customize-control-kkcp_password .kkcp-password input[type=password]{padding-right:36px}.customize-control-kkcp_password .kkcp-password__toggle{position:absolute;top:0;right:0;border:0;background:transparent;color:#aaa;height:100%;width:40px;cursor:pointer}.customize-control-kkcp_password .kkcp-password__toggle:focus,.customize-control-kkcp_password .kkcp-password__toggle:hover{color:#333;box-shadow:none;outline:none}.customize-control-kkcp_password .kkcp-password__show,.customize-control-kkcp_password .kkcp-password input[type=password]{display:block}.customize-control-kkcp_password.kkcp-password-visible .kkcp-password__show,.customize-control-kkcp_password.kkcp-password-visible input[type=password],.customize-control-kkcp_password .kkcp-password__hide,.customize-control-kkcp_password .kkcp-password__preview{display:none}.customize-control-kkcp_password.kkcp-password-visible .kkcp-password__hide,.customize-control-kkcp_password.kkcp-password-visible .kkcp-password__preview{display:block}.customize-control-kkcp_radio_image img{margin-right:3px;border:1px solid transparent;opacity:.4}.customize-control-kkcp_radio_image img:hover{border-color:#222}input[type=radio].kkcp-radio-image{position:absolute;clip:rect(0,0,0,0);pointer-events:none}input[type=radio].kkcp-radio-image:checked+label img{border-color:#aaa;opacity:1;cursor:default}input[type=radio].kkcp-radio-image:focus+label img{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.customize-control-kkcp_radio label{position:relative;display:block;padding:5px 0}.customize-control-kkcp_radio label:hover{color:#333}.customize-control-kkcp_radio label:hover input[type=radio]{border-color:#333}.customize-control-kkcp_radio small{opacity:.8;font-style:italic}.customize-control-kkcp_radio small:hover{opacity:1}.customize-control-kkcp_select select{width:99%}.kkcp-slider-wrap{overflow:hidden;padding:0 10.6666666667px;margin-right:-8px}.kkcp-inputs-wrap{float:right}.kkcp-unit-wrap{float:right;margin-top:1px}.kkcp-slider-number,input[type=number].kkcp-slider-number{float:right;width:auto;max-width:32px;padding:3px 0;border:0;box-shadow:none;font-weight:700;background:transparent;margin:0;text-align:right;-moz-appearance:textfield}.kkcp-inputs-wrap .kkcp-slider-number,.kkcp-inputs-wrap input[type=number].kkcp-slider-number{float:none;display:inline}.kkcp-slider-number::-webkit-inner-spin-button,.kkcp-slider-number::-webkit-outer-spin-button,input[type=number].kkcp-slider-number::-webkit-inner-spin-button,input[type=number].kkcp-slider-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.kkcp-unit,input[type=text].kkcp-unit{display:inline-block;width:24px;height:28px;line-height:28px;margin-right:-1px;padding:0 3px;border:1px solid #dbdbdb;background:#f7f7f7;box-shadow:inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08);font-size:11px;text-align:center;cursor:pointer}.kkcp-unit:last-child,input[type=text].kkcp-unit:last-child{border-right-width:1px}.kkcp-unit:hover,input[type=text].kkcp-unit:hover{background:#fbfbfb;border-color:#c8c8c8}.kkcp-unit.kkcp-current,input[type=text].kkcp-unit.kkcp-current{float:left;padding:0;border-color:transparent;background:transparent;box-shadow:none;font-weight:700;cursor:default;font-size:12px}.customize-control-kkcp_sortable.ui-sortable{overflow-x:hidden}.customize-control-kkcp_sortable .kkcp-sortable{cursor:move}.kkcp-sortable{padding:4px 7px;border-bottom:1px solid #dbdbdb;margin-bottom:4px;background:#fbfbfb;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kkcp-sortable:after{content:"\f156";font-family:dashicons;float:right;opacity:.6}.kkcp-sortable:hover:after{cursor:move;opacity:1}.kkcp-sortable.ui-sortable-helper{font-weight:700;background:#ffc}.kkcp-sortable.ui-sortable-placeholder{background:#dbdbdb;box-shadow:inset 0 0 8px 5px #eee;border-radius:5px;visibility:visible!important;border-color:transparent}.kkcp-sortable.ui-sortable-placeholder:after{content:""}.customize-control-kkcp_textarea .wp-editor-container textarea{margin-bottom:-5px;margin-top:1px;background:transparent;border-color:transparent;box-shadow:none}.mce-floatpanel{z-index:999990!important}#wp-link-backdrop{z-index:999991!important}#wp-link-wrap{z-index:999992!important}@media only screen{.switch-light{position:relative;display:block}.switch-light:after{clear:both;content:"";display:table}.switch-light *,.switch-light :after,.switch-light :before{box-sizing:border-box}.switch-light a{transition:all .2s ease-out}.switch-light>span,.switch-light label{line-height:2em;vertical-align:middle}.switch-light input:focus+label,.switch-light input:focus~span a{outline-width:2px;outline-style:solid;outline-color:Highlight}.switch-light input{position:absolute;opacity:0;z-index:3}.switch-light input:checked~span a{right:0}.switch-light strong{font-weight:inherit}.switch-light>span{position:relative;overflow:hidden;display:block;min-height:2em;padding:0;text-align:left}.switch-light span span{position:relative;z-index:2;display:block;float:left;width:50%;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch-light a{position:absolute;right:50%;top:0;z-index:1;display:block;width:50%;height:100%;padding:0}.switch-toggle{position:relative;display:block;padding:0!important}.switch-toggle:after{clear:both;content:"";display:table}.switch-toggle *,.switch-toggle :after,.switch-toggle :before{box-sizing:border-box}.switch-toggle a{display:block;transition:all .2s ease-out}.switch-toggle>span,.switch-toggle label{line-height:2em;vertical-align:middle}.switch-toggle input:focus+label,.switch-toggle input:focus~span a{outline-width:2px;outline-style:solid;outline-color:Highlight}.switch-toggle input{position:absolute;left:0;opacity:0}.switch-toggle input+label{position:relative;z-index:2;display:block;float:left;padding:0 8px;margin:0;text-align:center}.switch-toggle a{position:absolute;top:0;left:0;padding:0;z-index:1;width:10px;height:100%}.switch-toggle label:nth-child(2):nth-last-child(4),.switch-toggle label:nth-child(2):nth-last-child(4)~a,.switch-toggle label:nth-child(2):nth-last-child(4)~label{width:50%}.switch-toggle label:nth-child(2):nth-last-child(4)~input:checked:nth-child(3)+label~a{left:50%}.switch-toggle label:nth-child(2):nth-last-child(6),.switch-toggle label:nth-child(2):nth-last-child(6)~a,.switch-toggle label:nth-child(2):nth-last-child(6)~label{width:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(3)+label~a{left:33.33%}.switch-toggle label:nth-child(2):nth-last-child(6)~input:checked:nth-child(5)+label~a{left:66.66%}.switch-toggle label:nth-child(2):nth-last-child(8),.switch-toggle label:nth-child(2):nth-last-child(8)~a,.switch-toggle label:nth-child(2):nth-last-child(8)~label{width:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(3)+label~a{left:25%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(5)+label~a{left:50%}.switch-toggle label:nth-child(2):nth-last-child(8)~input:checked:nth-child(7)+label~a{left:75%}.switch-toggle label:nth-child(2):nth-last-child(10),.switch-toggle label:nth-child(2):nth-last-child(10)~a,.switch-toggle label:nth-child(2):nth-last-child(10)~label{width:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(3)+label~a{left:20%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(5)+label~a{left:40%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(7)+label~a{left:60%}.switch-toggle label:nth-child(2):nth-last-child(10)~input:checked:nth-child(9)+label~a{left:80%}.switch-toggle label:nth-child(2):nth-last-child(12),.switch-toggle label:nth-child(2):nth-last-child(12)~a,.switch-toggle label:nth-child(2):nth-last-child(12)~label{width:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(3)+label~a{left:16.6%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(5)+label~a{left:33.2%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(7)+label~a{left:49.8%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(9)+label~a{left:66.4%}.switch-toggle label:nth-child(2):nth-last-child(12)~input:checked:nth-child(11)+label~a{left:83%}}@media only screen and (-webkit-min-device-pixel-ratio:0){.switch-light input:focus+label,.switch-light input:focus~span a,.switch-toggle input:focus+label,.switch-toggle input:focus~span a{outline-color:-webkit-focus-ring-color;outline-style:auto}}@media (max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}@media (max-width:782px){.sp-initial .sp-thumb-el{height:31px}} \ No newline at end of file diff --git a/assets/index.php b/css/index.php similarity index 100% rename from assets/index.php rename to css/index.php diff --git a/customize-plus.php b/customize-plus.php index b500513..9b5a50e 100644 --- a/customize-plus.php +++ b/customize-plus.php @@ -1,43 +1,53 @@ . + * + * @package Customize_Plus */ define( 'KKCP_PLUGIN_FILE', __FILE__ ); -define( 'KKCP_PLUGIN_VERSION', '1.0.22' ); +define( 'KKCP_PLUGIN_VERSION', '1.1.1' ); define( 'KKCP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'KKCP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-requirements.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-data.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-helper.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-singleton.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-core.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-sanitizejs.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-customize.php' ); -require_once( KKCP_PLUGIN_DIR . 'includes/class-theme.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-requirements.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-data.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-helper.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-singleton.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-core.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-sanitizejs.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-customize.php' ); +require_once( KKCP_PLUGIN_DIR . 'php/class-theme.php' ); if ( is_admin() ) { - require_once( KKCP_PLUGIN_DIR . 'includes/class-validate.php' ); - require_once( KKCP_PLUGIN_DIR . 'includes/class-sanitize.php' ); - require_once( KKCP_PLUGIN_DIR . 'includes/class-admin.php' ); - require_once( KKCP_PLUGIN_DIR . 'includes/class-admin-about.php' ); + require_once( KKCP_PLUGIN_DIR . 'php/class-validate.php' ); + require_once( KKCP_PLUGIN_DIR . 'php/class-sanitize.php' ); + require_once( KKCP_PLUGIN_DIR . 'php/class-admin.php' ); + require_once( KKCP_PLUGIN_DIR . 'php/class-admin-about.php' ); } do_action( 'kkcp_after_requires' ); \ No newline at end of file diff --git a/includes/index.php b/images/index.php similarity index 100% rename from includes/index.php rename to images/index.php diff --git a/assets/images/logo-white.png b/images/logo-white.png similarity index 100% rename from assets/images/logo-white.png rename to images/logo-white.png diff --git a/assets/images/logo.png b/images/logo.png similarity index 100% rename from assets/images/logo.png rename to images/logo.png diff --git a/assets/images/sidebar-both.png b/images/sidebar-both.png similarity index 100% rename from assets/images/sidebar-both.png rename to images/sidebar-both.png diff --git a/assets/images/sidebar-left.png b/images/sidebar-left.png similarity index 100% rename from assets/images/sidebar-left.png rename to images/sidebar-left.png diff --git a/assets/images/sidebar-less.png b/images/sidebar-less.png similarity index 100% rename from assets/images/sidebar-less.png rename to images/sidebar-less.png diff --git a/assets/images/sidebar-right.png b/images/sidebar-right.png similarity index 100% rename from assets/images/sidebar-right.png rename to images/sidebar-right.png diff --git a/assets/js/customize-preview.js b/js/customize-preview.js similarity index 94% rename from assets/js/customize-preview.js rename to js/customize-preview.js index a474615..7ae196c 100644 --- a/assets/js/customize-preview.js +++ b/js/customize-preview.js @@ -1,8 +1,8 @@ /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) *//* jshint unused: false */ (function (window, document, $, wp, api) { diff --git a/assets/js/customize-preview.min.js b/js/customize-preview.min.js similarity index 93% rename from assets/js/customize-preview.min.js rename to js/customize-preview.min.js index c22ad53..48dc96c 100644 --- a/assets/js/customize-preview.min.js +++ b/js/customize-preview.min.js @@ -1,8 +1,8 @@ /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) */ /* jshint unused: false */ !function(e,t,n,i,r){"use strict"; // be sure to have what we need, bail otherwise diff --git a/assets/js/customize.js b/js/customize.js similarity index 90% rename from assets/js/customize.js rename to js/customize.js index 70c31e2..c84f5c1 100644 --- a/assets/js/customize.js +++ b/js/customize.js @@ -9772,11 +9772,11 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /*! - * Customize Plus v1.0.22 (https://knitkode.com/products/customize-plus) + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) * Enhance and extend the WordPress Customize in your themes. * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) - * @license SEE LICENSE IN license.txt (Last change on: 22-1-2018) - */(function (window$1,document$1,$$1,_$1,wp$1,pluginApi,marked,hljs,Modernizr) { + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) + */(function (window$1,document$1,$$1,_$1,wp,pluginApi,marked,hljs,Modernizr) { 'use strict'; var DEBUG = !!window.kkcp.DEBUG; @@ -9821,9 +9821,17 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @typedef {(number|string|Array.|Object.)} mixed */ + /** + * A $validity notification representation + * @typedef {Object.} ValidityNotification + * @property {string} code + * @property {string} type + * @property {string} msg + */ + /** * Shim type for WordPress `WP_Error` - * @typedef {Object.} WP_Error + * @typedef {Array.} WP_Error */ /** @@ -9933,7 +9941,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @access package * @type {Object} */ - var wpApi = wp$1.customize; + var wpApi = wp.customize; /** * Reuse the same jQuery wrapped `window` object @@ -10003,7 +10011,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { _readyDOM(function () { $readyDOM.resolve(); }); // be sure to have what we need - if (!wp$1) { + if (!wp) { throw new Error('Missing crucial object `wp`'); $readyWP.reject(); $readyDOM.reject(); @@ -10090,98 +10098,31 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { })(); /** - * @fileOverview A wrapper to contain all regexes used. - * It might be that we need a regex that matches a list of words, in that case - * we might want to define the words in an array (coming from php perhaps?). - * So for array to regex conversion do: - * ``` - * new RegExp(MY_VAR.join('|'), 'g')` - * ``` - * See {@link http://stackoverflow.com/q/28280920/1938970 stackoverflow}. - * - * @module Regexes - */ - /** - * Whitespaces global match - * - * To clean user input (most often when writing custom expressions) - * so that it would later on be more easily parsable by our validation - * regexes. Use this as follow: `string.replace(Regexes._whitespaces, '')`. - * - * {@link http://stackoverflow.com/a/5963202/1938970} - * - * @const - * @type {RegExp} - */ - var _whitespaces = /\s+/g; - - /** - * Extract unit, it returns the first matched, so the units are sorted by - * popularity (approximately). - * - * @see http://www.w3schools.com/cssref/css_units.asp List of the css units - * @const - * @type {RegExp} - */ - var _extractUnit = /(px|%|em|rem|vh|vw|vmin|vmax|cm|mm|in|pt|pc|ch|ex)/; - - /** - * Extract number from string (both integers or float) - * - * @see http://stackoverflow.com/a/17885985/1938970 - * @const - * @type {RegExp} - */ - var _extractNumber = /(\+|-)?((\d+(\.\d+)?)|(\.\d+))/; - - /** - * Detects if the shape of the string is that of a setting saved or to be - * saved through the options API, e.g. `mytheme[a_setting_id]`` + * @fileOverview An helper class containing helper methods. This has its PHP + * equivalent in `class-helper.php` * - * @type {RegExp} + * @module Utils */ - var _optionsApi = new RegExp(api$1.constants['OPTIONS_PREFIX'] + '\\[.*\\]'); - /** - * Helps to understand if a url is absolute or relative + * Customize Plus base url * - * @const - * @type {RegExp} + * @since 1.1.0 + * @type {string} */ - var _absoluteUrl = /^(?:[a-z]+:)?\/\//i; + var _CP_URL = api$1.constants['CP_URL']; /** - * Multiple slashes + * Customize Plus images url * - * @const - * @type {RegExp} - */ - var _multipleSlashes = /[a-z-A-Z-0-9_]{1}(\/\/+)/g; - - /** - * @alias core.Regexes - * @description Exposed module Regexes - * @access package + * @since 1.1.0 + * @type {string} */ - var Regexes = api$1.core.Regexes = { - _whitespaces: _whitespaces, - _extractUnit: _extractUnit, - _extractNumber: _extractNumber, - _optionsApi: _optionsApi, - _absoluteUrl: _absoluteUrl, - _multipleSlashes: _multipleSlashes, - } + var _CP_URL_IMAGES = _CP_URL + "images/"; - /** - * @fileOverview An helper class containing helper methods. This has its PHP - * equivalent in `class-helper.php` - * - * @module Utils - * @requires Regexes - */ /** * Images base url * + * @since 1.0.0 * @type {string} */ var _IMAGES_BASE_URL = api$1.constants['IMAGES_BASE_URL']; @@ -10189,6 +10130,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Docs base url * + * @since 1.0.0 * @type {string} */ var _DOCS_BASE_URL = api$1.constants['DOCS_BASE_URL']; @@ -10197,12 +10139,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * Is it an absolute URL? * * @see {@link http://stackoverflow.com/a/19709846/1938970} + * @since 1.0.0 * * @param {string} url The URL to test * @return {boolean} Whether is absolute or relative */ function _isAbsoluteUrl (url) { - return Regexes._absoluteUrl.test(url); + return /^(?:[a-z]+:)?\/\//i._absoluteUrl.test(url); } /** @@ -10210,11 +10153,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * * Strips possible multiple slashes caused by the string concatenation or dev errors * + * @since 1.0.0 + * * @param {string} url * @return {string} */ function _cleanUrlFromMultipleSlashes (url) { - return url.replace(Regexes._multipleSlashes, '/'); + return url.replace(/[a-z-A-Z-0-9_]{1}(\/\/+)/g, '/'); } /** @@ -10223,6 +10168,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * If an absolute URL is passed we just strip multiple slashes, * if a relative URL is passed we also prepend the right base url. * + * @since 1.0.0 + * * @param {string} url * @param {string} type * @return {string} @@ -10248,7 +10195,9 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Each control execute callback with control as argument * - * @param {function} callback + * @since 1.0.0 + * + * @param {function(WP_Customize_Control)} callback */ function _eachControl (callback) { var wpApiControl = wpApi.control; @@ -10258,14 +10207,26 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } } + /** + * Options API regex + * + * @since 1.1.0 + * + * @param {string} controlId The control id + * @return {boolean} + */ + var _optionsApiRegex = new RegExp(api$1.constants['OPTIONS_PREFIX'] + '\\[.*\\]'); + /** * Is the control's setting using the `theme_mods` API? * + * @since 1.0.0 + * * @param {string} controlId The control id * @return {boolean} */ function _isThemeModsApi (controlId) { - return !Regexes._optionsApi.test(controlId); + return !_optionsApiRegex.test(controlId); } /** @@ -10273,17 +10234,20 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * Deduced by checking that the control id is structured as: * `themeprefix[setting-id]` * + * @since 1.0.0 + * * @param {string} controlId The control id * @return {boolean} */ function _isOptionsApi (controlId) { - return Regexes._optionsApi.test(controlId); + return _optionsApiRegex.test(controlId); } /** * Get stylesheet by Node id * - * @abstract + * @since 1.0.0 + * * @param {string} nodeId * @return {?HTMLElement} */ @@ -10303,7 +10267,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Get rules from stylesheet for the given selector * - * @abstract + * @since 1.0.0 + * * @param {HTMLElement} stylesheet * @param {string} selector * @return {string} @@ -10328,6 +10293,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * Basically it just clean the `rules` string removing the selector and * the brackets. * + * @since 1.0.0 + * * @param {string} rules * @param {string} selector * @return {string} @@ -10342,6 +10309,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Get image url * + * @since 1.0.0 + * * @param {string} url The image URL, relative or absolute * @return {string} The absolute URL of the image */ @@ -10352,6 +10321,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Get docs url * + * @since 1.0.0 + * * @param {string} url The docs URL, relative or absolute * @return {string} The absolute URL of the docs */ @@ -10362,6 +10333,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Bind a link element or directly link to a specific control to focus * + * @since 1.0.0 + * * @param {HTMLElement} linkEl The link DOM element `` * @param {string} controlId The control id to link to */ @@ -10383,13 +10356,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * Wrap WordPress control focus with some custom stuff * + * @since 1.0.0 + * * @param {WP_Customize_Control} control */ function focus (control) { try { // try this so it become possible to use this function even // with WordPress native controls which don't have this method - control.inflate(true); + control._mount(true); // always disable search, it could be that we click on this // link from a search result try/catch because search is not @@ -10403,12 +10378,55 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }, 2000); } + /** + * Template + * + * Similar to WordPress one but using a JavaScript string directly instead of + * a DOM id to pass the template content. + * + * @since 1.1.0 + * + * @param {string} tpl A template string + * @return {function} A function that lazily-compiles the template requested. + */ + var template = _$1.memoize(function (tpl) { + var compiled; + + return function ( data ) { + compiled = compiled || _$1.template(tpl, templateOptions); + return compiled( data ); + }; + }); + + /** + * Template options + * + * Similar to WordPress one but using `{%` instead of `<#` for logic, more like + * Jinja or Twig. + * + * @since 1.1.0 + * @see WordPress Core `wp-includes/js/wp-utils.js`. + * + * @return {Object} + */ + var templateOptions = { + // evaluate: /{%([\s\S]+?)%}/g, + evaluate: /<#([\s\S]+?)#>/g, + interpolate: /\{\{\{([\s\S]+?)\}\}\}/g, + escape: /\{\{([^\}]+?)\}\}(?!\})/g, + variable: 'data' + }; + /** * @alias core.Utils * @description Exposed module Utils * @access package + * + * @since 1.0.0 */ var Utils = api$1.core.Utils = { + _CP_URL: _CP_URL, + _CP_URL_IMAGES: _CP_URL_IMAGES, _IMAGES_BASE_URL: _IMAGES_BASE_URL, _DOCS_BASE_URL: _DOCS_BASE_URL, _isAbsoluteUrl: _isAbsoluteUrl, @@ -10424,6 +10442,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { getDocsUrl: getDocsUrl, linkControl: linkControl, focus: focus, + template: template, } /** @@ -11696,19 +11715,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var isEmail = unwrapExports(isEmail_1); - var strpos = function strpos(haystack, needle, offset) { - // discuss at: http://locutus.io/php/strpos/ - // original by: Kevin van Zonneveld (http://kvz.io) - // improved by: Onno Marsman (https://twitter.com/onnomarsman) - // improved by: Brett Zamir (http://brett-zamir.me) - // bugfixed by: Daniel Esteban - // example 1: strpos('Kevin van Zonneveld', 'e', 5) - // returns 1: 14 - - var i = (haystack + '').indexOf(needle, offset || 0); - return i === -1 ? false : i; - }; - /** * @fileOverview An helper class containing helper methods. This has its PHP * equivalent in `class-helper.php` @@ -11919,49 +11925,43 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } /** - * Extract number from value, returns 0 otherwise + * Extract number (either integers or float) + * + * @see http://stackoverflow.com/a/17885985/1938970 * * @since 1.0.0 * @param {string} $value The value from to extract from - * @param {bool|null} $allowed_float Whether float numbers are allowed - * @return {int|float|null} The extracted number or null if the value does not - * contain any digit. + * @return {number|null} The extracted number or null if the value does not + * contain any digit. */ - function extractNumber( $value, $allowed_float ) { - var $number_extracted; + function extractNumber( $value ) { + var matches = /(\+|-)?((\d+(\.\d+)?)|(\.\d+))/.exec( $value ); - if ( is_int( $value ) || ( is_float( $value ) && $allowed_float ) ) { - return $value; - } - if ( $allowed_float ) { - $number_extracted = parseFloat( $value ); // filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ); - } else { - $number_extracted = parseInt( $value, 10 ); // filter_var( $value, FILTER_SANITIZE_NUMBER_INT ); - } - if ( $number_extracted || 0 === $number_extracted ) { - return $number_extracted; + if (matches && is_numeric( matches[0] ) ) { + return Number( matches[0] ); } + return null; } /** - * Extract unit (like `px`, `em`, `%`, etc.) from an array of allowed units + * Extract size unit + * + * It returns the first matched, so the units are kind of sorted by popularity. + * @see http://www.w3schools.com/cssref/css_units.asp List of the css units * * @since 1.0.0 * @param {string} $value The value from to extract from * @param {null|array} $allowed_units An array of allowed units - * @return {string} The first valid unit found. + * @return {string|null} The first valid unit found. */ function extractSizeUnit( $value, $allowed_units ) { - if ( _.isArray( $allowed_units ) ) { - for (var i = 0; i < $allowed_units.length; i++) { - if ( strpos( $value, $allowed_units[i] ) ) { - return $allowed_units[i]; - } - } - return $allowed_units[0] || ''; + var matches = /(px|%|em|rem|vh|vw|vmin|vmax|cm|mm|in|pt|pc|ch|ex)/.exec( $value ); + + if (matches && matches[0] ) { + return matches[0]; } - return ''; + return null; } /** @@ -12097,8 +12097,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function required( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - if ( !$control.params.optional ) { if ( Helper.isEmpty( $value ) ) { $validity = $control._addError( $validity, 'vRequired' ); @@ -12119,8 +12117,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function singleChoice( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - var _validChoices = $control._validChoices; var $choices = _validChoices && _validChoices.length ? _validChoices : $control.params.choices; @@ -12147,7 +12143,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function multipleChoices( $validity, $value, $setting, $control, $check_length ) { - if ( $validity === void 0 ) $validity={}; if ( $check_length === void 0 ) $check_length = false; var _validChoices = $control._validChoices; @@ -12196,14 +12191,27 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function oneOrMoreChoices( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - if ( _$1.isString( $value ) ) { return singleChoice( $validity, $value, $setting, $control ); } return multipleChoices( $validity, $value, $setting, $control ); } + /** + * Validate sortable + * + * @since 1.1.0 + * + * @param {WP_Error} $validity + * @param {mixed} $value The value to validate. + * @param {WP_Customize_Setting} $setting Setting instance. + * @param {WP_Customize_Control} $control Control instance. + * @return {WP_Error} + */ + function sortable( $validity, $value, $setting, $control ) { + return multipleChoices( $validity, $value, $setting, $control, true ); + } + /** * Validate font family * @@ -12238,8 +12246,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function checkbox( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - if ( $value != 1 && $value != 0 ) { $validity = $control._addError( $validity, 'vCheckbox' ); } @@ -12258,8 +12264,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function tags( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - var params = $control.params; if ( !_$1.isString( $value ) ) { @@ -12293,8 +12297,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function text( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - var $attrs = $control.params['attrs'] || {}; var $type = $attrs.type || 'text'; @@ -12326,13 +12328,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { // html must be escaped if ( $control.params.html === 'escape' ) { - // if ( Helper.hasHTML( $value ) ) { - // $validity = $control._addWarning( $validity, 'vTextEscaped' ); - // } + if ( Helper.hasHTML( $value ) ) { + $validity = $control._addWarning( $validity, 'vTextEscaped' ); + } } // html is dangerously completely allowed else if ( $control.params.html === 'dangerous' ) { - // $validity = $control._addWarning( $validity, 'vTextDangerousHtml' ); + $validity = $control._addWarning( $validity, 'vTextDangerousHtml' ); } // html is not allowed at all else if ( ! $control.params.html ) { @@ -12357,8 +12359,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function number( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - var $attrs = $control.params.attrs || {}; // coerce to number @@ -12402,21 +12402,24 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @since 1.0.0 * * @param {WP_Error} $validity - * @param {mixed} $unit The unit to validate. - * @param {mixed} $allowed_units The allowed units + * @param {mixed} $value The value to validate. + * @param {WP_Customize_Setting} $setting Setting instance. + * @param {WP_Customize_Control} $control Control instance. * @return {WP_Error} */ - function sizeUnit( $validity, $unit, $allowed_units ) { + function sizeUnit( $validity, $unit, $setting, $control ) { + var params = $control.params; + // if it needs a unit and it is missing - if ( ! empty( $allowed_units ) && ! $unit ) { + if ( ! empty( params['units'] ) && ! $unit ) { $validity = $control._addError( $validity, 'vSliderMissingUnit' ); } // if the unit specified is not in the allowed ones - else if ( ! empty( $allowed_units ) && $unit && $allowed_units.indexOf( $unit ) === -1 ) { - $validity = $control._addError( $validity, 'vSliderInvalidUnit', $unit ); + else if ( ! empty( params['units'] ) && $unit && params['units'].indexOf( $unit ) === -1 ) { + $validity = $control._addError( $validity, 'vSliderUnitNotAllowed', $unit ); } // if a unit is specified but none is allowed - else if ( empty( $allowed_units ) && $unit ) { + else if ( empty( params['units'] ) && $unit ) { $validity = $control._addError( $validity, 'vSliderNoUnit' ); } @@ -12435,16 +12438,11 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function slider( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - - var params = $control.params; - var $attrs = params.attrs || {}; - - var $number = Helper.extractNumber( $value, !!$attrs['float'] ); - var $unit = Helper.extractSizeUnit( $value, params['units'] ); + var $number = Helper.extractNumber( $value ); + var $unit = Helper.extractSizeUnit( $value ); $validity = number( $validity, $number, $setting, $control ); - $validity = sizeUnit( $validity, $unit, params['units'] ); + $validity = sizeUnit( $validity, $unit, $setting, $control ); return $validity; } @@ -12462,8 +12460,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {WP_Error} */ function color( $validity, $value, $setting, $control ) { - if ( $validity === void 0 ) $validity={}; - var params = $control.params; if (!_$1.isString($value)) { @@ -12504,6 +12500,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { singleChoice: singleChoice, multipleChoices: multipleChoices, oneOrMoreChoices: oneOrMoreChoices, + sortable: sortable, fontFamily: fontFamily, checkbox: checkbox, tags: tags, @@ -12523,18 +12520,62 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @class Notification * @extends wp.customize.Notification * @augments wp.customize.Class + * + * @requires Utils */ var Notification = (function (superclass) { - function Notification (code, params) { - params.templateId = 'customize-notification-kkcp'; - - superclass.prototype.initialize.call(this, code, params); + function Notification () { + superclass.apply(this, arguments); } if ( superclass ) Notification.__proto__ = superclass; Notification.prototype = Object.create( superclass && superclass.prototype ); Notification.prototype.constructor = Notification; + Notification.prototype.render = function render () { + var notification = this, container, data; + if ( ! notification.template ) { + // @note tweak is done here, template string instead of an id + notification.template = Utils.template( this._tpl() ); + } + data = _.extend( {}, notification, { + alt: notification.parent && notification.parent.alt + } ); + container = $( notification.template( data ) ); + + if ( notification.dismissible ) { + container.find( '.notice-dismiss' ).on( 'click keydown', function( event ) { + if ( 'keydown' === event.type && 13 !== event.which ) { + return; + } + + if ( notification.parent ) { + notification.parent.remove( notification.code ); + } else { + container.remove(); + } + }); + } + + return container; + }; + + /** + * Template + * + * For now it's the same as the WordPress default one plus markdown support + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * + * @return {string} + */ + Notification.prototype._tpl = function _tpl () { + return "\n\t\t\t
  • \n\t\t\t\t<# if (marked) { #>{{{ marked(data.message || data.code) }}}<# } else { #>
    {{{ data.message || data.code }}}
    <# } #>\n\t\t\t\t<# if ( data.dismissible ) { #>\n\t\t\t\t\t\n\t\t\t\t<# } #>\n\t\t\t
  • \n\t\t" + }; + return Notification; }(wpApi.Notification)); @@ -12562,14 +12603,26 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate */ var Base = (function (superclass) { - function Base () { - superclass.apply(this, arguments); + function Base (id, options) { + this.initialize(id, options); + this.componentInit(); + this._customInitialize(); } if ( superclass ) Base.__proto__ = superclass; Base.prototype = Object.create( superclass && superclass.prototype ); Base.prototype.constructor = Base; + /** + * {@inheritDoc} + * + * Tweak the initialize method. + * + * @since 1.0.0 + * + * @memberof! controls.Base# + * @override + */ Base.prototype.initialize = function initialize (id, options) { var control = this, deferredSettingIds = [], settings, gatherSettings; @@ -12599,8 +12652,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } ); } - // @note `control.params.content` is managed differently in `inflate` and - // `deflate` methods + // @note `control.params.content` is managed differently in `_mount` and + // `_unmount` methods // if ( ! control.params.content ) { // control.params.content = $( '
  • ', { // id: 'customize-control-' + id.replace( /]/g, '' ).replace( /\[/g, '-' ), @@ -12633,11 +12686,12 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { // used by methods which we don't override) control._container = container; - if ( control.params.templateId ) { - control.templateSelector = control.params.templateId; - } else { - control.templateSelector = 'customize-control-' + control.params.type + '-content'; - } + // @note this is disabled, template are defined in Javascript control classes + // if ( control.params.templateId ) { + // control.templateSelector = control.params.templateId; + // } else { + // control.templateSelector = 'customize-control-' + control.params.type + '-content'; + // } control.deferred = _$1.extend( control.deferred || {}, { embedded: new $$1.Deferred() @@ -12719,38 +12773,51 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } else { wpApi.apply( wpApi, deferredSettingIds.concat( gatherSettings ) ); } + }; - // @note call custom private initialization (not overridable by subclasses) - this._initialize(); + /** + * Component init + * + * This is the methods that subclasses could override with their custom init + * logic (no DOM is available at this point) + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * @abstract + * @return {void} + */ + Base.prototype.componentInit = function componentInit () { }; /** - * Private Initialize + * Custom initialization * * Collect here the custom initialization additions of Customize Plus controls * * @since 1.0.0 * * @memberof! controls.Base# - * @access package + * @access private * @return {void} */ - Base.prototype._initialize = function _initialize () { + Base.prototype._customInitialize = function _customInitialize () { var this$1 = this; - // an @abstract method to override (this needs to be called here, before than - // the `ready` method) - this.onInit(); + // alias for ready method React like + this.ready = this.componentDidMount; // After the control is embedded on the page, invoke the "ready" method. this.deferred.embedded.done(function () { // @note this way of managing controls is disabled // this.linkElements(); + this$1.setupNotifications(); + + // this.ready(); // @note ready is called within `_mount` called here below if (!api$1.constants['DYNAMIC_CONTROLS_RENDERING']) { - this$1.inflate(); + this$1._mount(); } - this$1.setupNotifications(); - // this.ready(); // @note ready is called within inflate }); if (api$1.constants['DYNAMIC_CONTROLS_RENDERING']) { @@ -12758,15 +12825,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { // light,to make this work no data must be stored in the DOM wpApi.section(this.section()).expanded.bind(function (expanded) { - // either deflate and re-inflate dom each time... + // either unmount and mount dom each time... if (expanded) { - _$1.defer(this$1.inflate.bind(this$1)); + _$1.defer(this$1._mount.bind(this$1)); } else { - this$1.deflate(); + this$1._unmount(); } // ...or just do it the first time a control is expanded // if (expanded && !this.rendered) { - // _.defer(this.inflate.bind(this)); + // _.defer(this._mount.bind(this)); // } }); } @@ -12780,9 +12847,11 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { this.setting.validate = this._validate.bind(this); } - // add sanitization of the value `postMessag`ed to the preview + // add sanitization of the value `postMessage`d to the preview if (!this.params['noLiveSanitization'] && !this.params['loose']) { - this.setting.sanitize = this.sanitize.bind(this); + this.setting.sanitize = function (value) { + return this$1.sanitize(value, this$1.setting, this$1); + }; } // bind setting change to this method to reflect a programmatic @@ -12791,8 +12860,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var sectionId = this$1.section(); if ( ! sectionId || ( wpApi.section.has( sectionId ) && wpApi.section( sectionId ).expanded() ) ) { - if (this$1.rendered) { - this$1.syncUI.call(this$1, value); + if (this$1.rendered && this$1.shouldComponentUpdate(value)) { + this$1.componentDidUpdate(value); } } }); @@ -12858,7 +12927,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {string} The value validated or the last setting value. */ Base.prototype._validate = function _validate (value) { - var $validity = {}; + var $validity = []; // immediately check a required value validity $validity = Validate.required($validity, value, this.setting, this); @@ -12867,13 +12936,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { if (!_$1.keys($validity).length) { // otherwise apply the specific control/setting validation - $validity = this.validate(value); + $validity = this.validate($validity, value, this.setting, this); } this._manageValidityNotifications($validity); // if there are no errors return the given new value - if (!_$1.keys($validity).length) { + if (!$validity.length) { return value; } @@ -12889,187 +12958,394 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @memberof! controls.Base# * @access package * @abstract - * @param {object>} $validity + * @param {WP_Error} $validity */ Base.prototype._manageValidityNotifications = function _manageValidityNotifications ($validity) { var this$1 = this; var notifications = this.setting.notifications.get(); - var currentNotificationCodes = []; + var newCodes = _$1.pluck($validity, 'code'); + var currentCodes = []; // flag used somewhere else (see below) - this._currentValueHasError = !!_$1.keys($validity).length; + this._currentValueHasError = !!$validity.length; for (var i = 0; i < notifications.length; i++) { var code = notifications[i]['code']; - currentNotificationCodes.push(code); + currentCodes.push(code); // if an existing notification is now valid remove it - if (!$validity[code]) { + if (newCodes.indexOf(code) === -1) { this$1.setting.notifications.remove(code); } } - for (var code$1 in $validity) { - if ($validity.hasOwnProperty(code$1)) { - // if the notification is not there already add it - if (currentNotificationCodes.indexOf(code$1) === -1) { - - this$1.setting.notifications.add(new Notification$1( - code$1, { message: $validity[code$1] || api$1.l10n['vInvalid'] } - )); - } + for (var j = 0; j < $validity.length; j++) { + var ref = $validity[j]; + var code$1 = ref.code; + var type = ref.type; + var msg = ref.msg; + + // if the notification is not there already add it + if (currentCodes.indexOf(code$1) === -1) { + this$1.setting.notifications.add( + new Notification$1(code$1, { + type: type, + message: msg || api$1.l10n['vInvalid'], + } + )); } } }; /** - * Add error - * - * Shortcut to manage the $validity object during validation + * Add validity notitification * * @see PHP KKcp_Customize_Control_Base->add_error() - * @since 1.0.0 + * @since 1.1.0 * * @memberof! controls.Base# * @access package + * @param {string} $type * @param {WP_Error} $validity * @param {string} $msg_id - * @param {mixed|array|null} $msg_arguments + * @param {mixed|array|null} $msg_arguments * @return {WP_Error} */ - Base.prototype._addError = function _addError ( $validity, $msg_id, $msg_arguments ) { + Base.prototype._addValidityNotification = function _addValidityNotification ( $type, $validity, $msg_id, $msg_arguments ) { var $msg = this._l10n( $msg_id ); // if there is an array of message arguments if ( _$1.isArray( $msg_arguments ) ) { - $validity[$msg_id] = vsprintf( $msg, $msg_arguments ); + $msg = vsprintf( $msg, $msg_arguments ); } // if there is just one message argument else if ( $msg_arguments ) { - $validity[$msg_id] = sprintf( $msg, $msg_arguments ); - // if it is a simple string message - } else { - $validity[$msg_id] = $msg; + $msg = sprintf( $msg, $msg_arguments ); } + // if it is a simple string message leave it as it is + + $validity.push({ + code: $msg_id, + type: $type, + msg: $msg + }); + return $validity; }; /** - * Validate control's default setting value + * Add error * + * Shortcut to manage $validity during validation + * + * @see PHP KKcp_Customize_Control_Base->add_error() * @since 1.0.0 * * @memberof! controls.Base# - * @access public - * @abstract - * @param {string} value - * @return {string} The value validated + * @access package + * @param {WP_Error} $validity + * @param {string} $msg_id + * @param {mixed|array|null} $msg_arguments + * @return {WP_Error} */ - Base.prototype.validate = function validate (value) { - return value; + Base.prototype._addError = function _addError ( $validity, $msg_id, $msg_arguments ) { + return this._addValidityNotification( 'error', $validity, $msg_id, $msg_arguments ); }; /** - * Sanitize control's default setting value + * Add warning * - * @since 1.0.0 + * Shortcut to manage $validity during validation + * + * @since 1.1.0 * * @memberof! controls.Base# - * @access public - * @abstract - * @param {string} value - * @return {string} The value sanitized + * @access package + * @param {WP_Error} $validity + * @param {string} $msg_id + * @param {mixed|array|null} $msg_arguments + * @return {WP_Error} */ - Base.prototype.sanitize = function sanitize (value) { - return value; + Base.prototype._addWarning = function _addWarning ( $validity, $msg_id, $msg_arguments ) { + return this._addValidityNotification( 'warning', $validity, $msg_id, $msg_arguments ); }; /** - * Sync UI with value coming from API, a programmatic change like a reset. + * Add info * - * @since 1.0.0 + * Shortcut to manage $validity during validation + * + * @since 1.1.0 * * @memberof! controls.Base# - * @access protected - * @abstract - * @param {string} value The new setting value. + * @access package + * @param {WP_Error} $validity + * @param {string} $msg_id + * @param {mixed|array|null} $msg_arguments + * @return {WP_Error} */ - Base.prototype.syncUI = function syncUI (value) {}; + Base.prototype._addInfo = function _addInfo ( $validity, $msg_id, $msg_arguments ) { + return this._addValidityNotification( 'info', $validity, $msg_id, $msg_arguments ); + }; /** - * Triggered when the control has been initialized + * Validate control's default setting value * * @since 1.0.0 * * @memberof! controls.Base# - * @access protected + * @access public * @abstract + * @param {WP_Error} $validity + * @param {mixed} $value The value to validate. + * @param {WP_Customize_Setting} $setting Setting instance. + * @param {WP_Customize_Control} $control Control instance. + * @return {WP_Error} */ - Base.prototype.onInit = function onInit () {}; + Base.prototype.validate = function validate ( $validity, $value, $setting, $control ) { + if ( $validity === void 0 ) $validity=[]; + + return $validity; + }; /** - * Render the control from its JS template, if it exists. + * Sanitize control's default setting value * * @since 1.0.0 * * @memberof! controls.Base# - * @access protected - * @override + * @access public + * @abstract + * + * @param {string} $value The value to sanitize. + * @param {WP_Customize_Setting} $setting Setting instance. + * @param {WP_Customize_Control} $control Control instance. + * @return {string|null} The sanitized value. */ - Base.prototype.renderContent = function renderContent () { - var ref = this; - var _container = ref._container; - var templateSelector = ref.templateSelector; - - // replaces the container element's content with the control. - if (document$1.getElementById(("tmpl-" + templateSelector))) { - var template = wp.template(templateSelector); - if (template && _container) { - - /* jshint funcscope: true */ - if (DEBUG.performances) { var t = performance.now(); } - - // render and store it in the params - this.params.content = _container.innerHTML = template(this.params).trim(); - - // var frag = document.createDocumentFragment(); - // var tplNode = document.createElement('div'); - // tplNode.innerHTML = template( this.params ).trim(); - // frag.appendChild(tplNode); - // this.params.content = frag; - // _container.appendChild(frag); - - if (DEBUG.performances) { console.log('%c renderContent of ' + this.params.type + '(' + - this.id + ') took ' + (performance.now() - t) + ' ms.', 'background: #EF9CD7'); } - } - } - - this._rerenderNotifications(); + Base.prototype.sanitize = function sanitize ( $value, $setting, $control ) { + return $value; }; /** - * Triggered just before the control get deflated from DOM + * Template * - * @since 1.0.0 + * Returns the control's complete template, either a simple string or a more + * complex and composed method. This method is publicly accessible and should + * be overrided by controls that extend but are outside Customize Plus. + * + * @since 1.1.0 * * @memberof! controls.Base# - * @access protected + * @access public + * @abstract + * + * @return {string} + */ + Base.prototype.template = function template$$1 () { + var tpl = ''; + tpl += this._tplExtras(); + tpl += this._tpl(); + tpl += this._tplNotifications(); + + return tpl; + }; + + /** + * Template + * + * + * Subclasses within Customize Plus must have their own '_tpl' template + * overriding this method. This cannot be ovverided through public API, that + * is why the method is underscore prefixed and mangled during minification. + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * @abstract + */ + Base.prototype._tpl = function _tpl () { + return ""; + }; + + /** + * Control's specific header template + * + * Subclasses should call this method themselves in the appropriate template + * position, according to their specific needs. By default (if not overriden) + * this template partial prints the label and description as markdown if the + * markdown js plugin is available. This cannot be called or ovverided through + * public API, that is why the method is underscore prefixed and mangled + * during minification. + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * @abstract + * + * @return {string} + */ + Base.prototype._tplHeader = function _tplHeader () { + return"\n <# if (data.label) { #>\n
    \n <# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #>\n
    \n <# } if (data.description) { #>\n
    \n <# if (marked) { #>{{{ marked(data.description) }}}\n <# } else { #>{{{ data.description }}}<# } #>\n
    \n <# } #>\n "; + }; + + /** + * Control's specific notification template + * + * Subclasses within Customize Plus can have their own 'notification' template + * overriding this method. This cannot be ovverided through public API, that + * is why the method is underscore prefixed and mangled during minification. + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package * @abstract + * + * @return {string} */ - Base.prototype.onDeflate = function onDeflate () {}; + Base.prototype._tplNotifications = function _tplNotifications () { + return '
    '; + }; /** - * Removes the DOM of the control. + * Control's extras menu template * - * In case the DOM store is empty (the first time this method get called) it - * fills it. + * Subclasses within Customize Plus can have their own 'extras' template + * overriding this method. This cannot be ovverided through public API, that + * is why the method is underscore prefixed and mangled during minification. + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * @abstract + * + * @return {string} + */ + Base.prototype._tplExtras = function _tplExtras () { + return ("\n
    \n \n
      \n
    • " + (api$1.l10n['resetLastSaved']) + "
    • \n
    • " + (api$1.l10n['resetInitial']) + "
    • \n
    • " + (api$1.l10n['resetFactory']) + "
    • \n
    \n
    \n "); + }; + + /** + * Render the control from its JS template, uses custom template utility. * * @since 1.0.0 * * @memberof! controls.Base# + * @access protected + * @override + */ + Base.prototype.renderContent = function renderContent () { + var ref = this; + var _container = ref._container; + var templateSelector = ref.templateSelector; + + // replaces the container element's content with the control. + var template$$1 = Utils.template(this.template()); + if (template$$1 && _container) { + + /* jshint funcscope: true */ + if (DEBUG.performances) { var t = performance.now(); } + + // render and store it in the params + this.params.content = _container.innerHTML = template$$1(this.params); + + if (DEBUG.performances) { console.log('%c renderContent of ' + this.params.type + '(' + + this.id + ') took ' + (performance.now() - t) + ' ms.', 'background: #EF9CD7'); } + } + + this._rerenderNotifications(); + }; + + /** + * Destroy + * + * Unmounts the component and remove also the `
  • ` container. + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @alias controls.Base._unmount * @access public */ - Base.prototype.deflate = function deflate () { + Base.prototype.destroy = function destroy () { + this._unmount(true); + this._container.parentNode.removeChild(this._container); + }; + + /** + * Should component update (React like) + * + * @see https://reactjs.org/docs/react-component.html#shouldcomponentupdate + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access protected + * @abstract + * @param {mixed} $value The new setting value + * @return {boolean} + */ + Base.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return true; + }; + + /** + * Component did update (React like) + * + * This is usually called by a programmatic change like a reset of the control + * default setting value. + * + * @see https://reactjs.org/docs/react-component.html#componentdidupdate + * @since 1.0.0 + * + * @memberof! controls.Base# + * @access protected + * @abstract + * @param {mixed} $value The new setting value + */ + Base.prototype.componentDidUpdate = function componentDidUpdate ($value) {}; + + /** + * Component did mount (React like) + * + * @see https://reactjs.org/docs/react-component.html#componentdidunmount + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access protected + * @abstract + */ + Base.prototype.componentDidMount = function componentDidMount () {}; + + /** + * Component will unmount (React like) + * + * @see https://reactjs.org/docs/react-component.html#componentwillunmount + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access protected + * @abstract + */ + Base.prototype.componentWillUnmount = function componentWillUnmount () {}; + + /** + * Unmount (React current substitute) + * + * Removes the DOM of the control. In case the DOM store is empty (the first + * time this method get called) it fills it. This could removed once React is + * implemented + * + * @since 1.1.0 + * + * @memberof! controls.Base# + * @access package + * + * @param {boolean} force + */ + Base.prototype._unmount = function _unmount (force) { var this$1 = this; /* jshint funcscope: true */ @@ -13082,13 +13358,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } // call the abstract method - this.onDeflate(); + if (this.rendered) { + this.componentWillUnmount(); + } // and empty the DOM from the container deferred // the slide out animation of the section doesn't freeze _$1.defer(function () { // due to the timeout we need to be sure that the section is not expanded - if (!wpApi.section(this$1.section.get()).expanded.get()) { + if (force || !wpApi.section(this$1.section.get()).expanded.get()) { /* jshint funcscope: true */ if (DEBUG.performances) { var t = performance.now(); } @@ -13102,7 +13380,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { container.innerHTML = ''; - if (DEBUG.performances) { console.log('%c deflate of ' + this$1.params.type + '(' + this$1.id + + if (DEBUG.performances) { console.log('%c unmount of ' + this$1.params.type + '(' + this$1.id + ') took ' + (performance.now() - t) + ' ms.', 'background: #D2FFF1'); } // flag control that it's not rendered @@ -13112,49 +13390,48 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }; /** - * Inflate + * Mount (React current substitute) * - * Render or 'inflate' the template of the control. The first time render it - * from the js template, afterward retrieve the DOM string from the `template` - * param store. After the template has been rendered call the `ready` method, - * overridden in each control with their own specific logic. Also put a flag - * `rendered` on the control instance to indicate whether the control is - * rendered or not. + * The first time renders from the js template, afterward retrieve the DOM + * string from the `template` param store. After the template has been + * rendered call the `componentDidMount` method, overridden in each control + * with their own specific DOM initialization. Also put a flag `rendered` on + * the control instance to indicate whether the control is rendered or not. * - * @since 1.0.0 + * @since 1.1.0 * * @memberof! controls.Base# - * @access public + * @access package * * @param {boolean} resolveEmbeddedDeferred Sometimes (i.e. for the * `control.focus()` method) we need * to resolve the deffered embed. */ - Base.prototype.inflate = function inflate (resolveEmbeddedDeferred) { + Base.prototype._mount = function _mount (resolveEmbeddedDeferred) { /* jshint funcscope: true */ if (DEBUG.performances) { var t = performance.now(); } if (!this.params.content) { this.renderContent(); - if (DEBUG.performances) { console.log('%c inflate DOM of ' + this.params.type + + if (DEBUG.performances) { console.log('%c mount DOM of ' + this.params.type + ' took ' + (performance.now() - t) + ' ms.', 'background: #EF9CD7'); } } else { if (!this.rendered) { this._container.innerHTML = this.params.content; this._rerenderNotifications(); - if (DEBUG.performances) { console.log('%c inflate DOM of ' + this.params.type + + if (DEBUG.performances) { console.log('%c mount DOM of ' + this.params.type + ' took ' + (performance.now() - t) + ' ms.', 'background: #EF9CD7'); } } } this.rendered = true; - this.ready(); + this.componentDidMount(); if (resolveEmbeddedDeferred) { this.deferred.embedded.resolve(); } this._extras(); - // if (DEBUG.performances) console.log('%c inflate of ' + this.params.type + + // if (DEBUG.performances) console.log('%c mount of ' + this.params.type + // ' took ' + (performance.now() - t) + ' ms.', 'background: #D2FFF1'); }; @@ -13162,7 +13439,8 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * Re-render notifications after content has been re-rendered. * * This is taken as it is from the core base control class - * (`wp.customize.Control`)in the end of the `renderContent` method + * (`wp.customize.Control`)in the end of the `renderContent` method. + * We extract it in a method to reuse on component DOM recreation. * * @since 1.0.0 * @@ -13378,7 +13656,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var Base$1 = api$1.controls.Base = Base; - // import './regexes'; // import './utils'; // import './_banner'; @@ -13403,14 +13680,12 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { BaseChoices.prototype = Object.create( Base && Base.prototype ); BaseChoices.prototype.constructor = BaseChoices; - BaseChoices.prototype.onInit = function onInit () { - Base.prototype.onInit.call(this); - + BaseChoices.prototype.componentInit = function componentInit () { this._validChoices = this._getValidChoices(this.params.choices); }; /** - * Get valid choicesvalues from given choices + * Get valid choices values from given choices * * @since 1.0.0 * @memberof! controls.BaseChoices# @@ -13434,11 +13709,90 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { return []; }; + /** + * {@inheritdoc}. Choice supports both a string if you only want to pass a + * label or an array with `label`, `sublabel`, `tooltip`, `popover_title`, + * `popover_txt`, etc. + * + * @since 1.1.0 + * @override + */ + BaseChoices.prototype._tpl = function _tpl () { + return ("\n <# var choices = data.choices, idx = 0;\n if (!_.isEmpty(choices)) { #>\n " + (this._tplHeader()) + "\n " + (this._tplAboveChoices()) + "\n " + (this._tplChoicesLoop()) + "\n " + (this._tplBelowChoices()) + "\n <# } #>\n ") + }; + + /** + * Ouput the choices template in a loop. Override this in subclasses + * to change behavior, for instance in sortable controls. + * + * @since 1.1.0 + * @memberof! controls.BaseChoices# + * + * @access package + * @return {string} + */ + BaseChoices.prototype._tplChoicesLoop = function _tplChoicesLoop () { + return ("<# for (var val in choices) { #>" + (this._tplChoice()) + "<#} #>") + }; + + /** + * Ouput the js to configure each choice template data and its UI + * + * @since 1.1.0 + * @memberof! controls.BaseChoices# + * + * @access package + * @return {string} + */ + BaseChoices.prototype._tplChoice = function _tplChoice () { + return ("\n <# if (choices.hasOwnProperty(val)) {\n var label;\n var choice = choices[val];\n var classes = '';\n var attributes = '';\n var tooltip = '';\n var id = data.id + idx++;\n if (!_.isUndefined(choice.label)) {\n label = choice.label;\n if (choice.popover) {\n classes += 'kkcpui-popover ';\n if (choice.popover.title) attributes += ' data-title=\"' + choice.popover.title + '\"';\n if (choice.popover.img) attributes += ' data-img=\"' + choice.popover.img + '\"';\n if (choice.popover.text) attributes += ' data-text=\"' + choice.popover.text + '\"';\n if (choice.popover.video) attributes += ' data-video=\"' + choice.popover.video + '\"';\n }\n if (choice.tooltip) {\n classes += 'kkcpui-tooltip--top ';\n attributes += ' title=\"' + choice.tooltip + '\"';\n tooltip = choice.tooltip;\n }\n } else {\n label = choice;\n }\n if (!tooltip) {\n tooltip = label;\n }\n #>\n " + (this._tplChoiceUi()) + "\n <# } #>\n ") + }; + + /** + * Custom choice template UI + * + * @since 1.1.0 + * @memberof! controls.BaseChoices# + * + * @abstract + * @access package + * @return {string} + */ + BaseChoices.prototype._tplChoiceUi = function _tplChoiceUi () { + return "" + }; + + /** + * Add a part of template just before the choices loop + * + * @since 1.1.0 + * @memberof! controls.BaseChoices# + * + * @abstract + * @access package + * @return {string} + */ + BaseChoices.prototype._tplAboveChoices = function _tplAboveChoices () { + return "" + }; + + /** + * Add a part of template just after the choices loop + * + * @since 1.1.0 + * @memberof! controls.BaseChoices# + * + * @abstract + * @access package + * @return {string} + */ + BaseChoices.prototype._tplBelowChoices = function _tplBelowChoices () { + return "" + }; + return BaseChoices; }(Base$1)); - var BaseChoices$1 = api$1.controls.BaseChoices = BaseChoices; - /** * Control Base Input class * @@ -13460,16 +13814,21 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { BaseInput.prototype = Object.create( Base && Base.prototype ); BaseInput.prototype.constructor = BaseInput; - BaseInput.prototype.syncUI = function syncUI (value) { - if (value && this.__input.value !== value) { - this.__input.value = value; - } + BaseInput.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return this.__input.value !== $value; + }; + + /** + * @override + */ + BaseInput.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this.__input.value = $value; }; /** * @override */ - BaseInput.prototype.ready = function ready () { + BaseInput.prototype.componentDidMount = function componentDidMount () { var self = this; self.__input = self._container.getElementsByTagName('input')[0]; @@ -13481,11 +13840,41 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }); }; + /** + * {@inheritDoc}. Note that the `tooltip` input_attr is printed in a wrapping + * span instead of directly on the input field. + * + * @since 1.1.0 + * @override + */ + BaseInput.prototype._tpl = function _tpl () { + return ("\n \n ") + }; + + /** + * Js template for the actual input element area, override this e.g. in the + * Password Control + * + * @since 1.1.0 + * @abstract + */ + BaseInput.prototype._tplInner = function _tplInner () { + return this._tplInput(); + }; + + /** + * Js template for the actual input element + * + * @since 1.1.0 + * @abstract + */ + BaseInput.prototype._tplInput = function _tplInput () { + return "\n {{ key }}=\"{{ attrs[key] }}\" <# } } #>\n >\n " + }; + return BaseInput; }(Base$1)); - var BaseInput$1 = api$1.controls.BaseInput = BaseInput; - var round = function round(value, precision, mode) { // discuss at: http://locutus.io/php/round/ // original by: Philip Peterson @@ -13673,6 +14062,19 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { return null; } + /** + * Sanitize sortable + * + * @since 1.1.0 + * @param {mixed} $value The value to sanitize. + * @param {WP_Customize_Setting} $setting Setting instance. + * @param {WP_Customize_Control} $control Control instance. + * @return {array|null} The sanitized value. + */ + function sortable$1 ( $value, $setting, $control ) { + return multipleChoices$1( $value, $setting, $control, true ); + } + /** * Sanitize font family * @@ -13802,31 +14204,31 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { */ function number$1( $value, $setting, $control ) { var $attrs = $control.params['attrs'] || {}; - var $number = Helper.extractNumber( $value, $attrs['float'] ); + $value = Helper.extractNumber( $value, $attrs['float'] ); - if ( $number === null ) { + if ( ! is_numeric( $value ) ) { return null; } // if it's a float but it is not allowed to be it round it - if ( is_float( $number ) && !$attrs['float'] ) { - $number = round( $number ); + if ( is_float( $value ) && !$attrs['float'] ) { + $value = round( $value ); } // if doesn't respect the step given round it to the closest // then do the min and max checks - if ( _$1.isNumber( $attrs['step'] ) && Helper.modulus($number, $attrs['step']) !== 0 ) { - $number = round( $number / $attrs['step'] ) * $attrs['step']; + if ( _$1.isNumber( $attrs['step'] ) && Helper.modulus($value, $attrs['step']) !== 0 ) { + $value = round( $value / $attrs['step'] ) * $attrs['step']; } // if it's lower than the minimum return the minimum - if ( _$1.isNumber( $attrs['min'] ) && $number < $attrs['min'] ) { + if ( _$1.isNumber( $attrs['min'] ) && $value < $attrs['min'] ) { return $attrs['min']; } // if it's higher than the maxmimum return the maximum - if ( _$1.isNumber( $attrs['max'] ) && $number > $attrs['max'] ) { + if ( _$1.isNumber( $attrs['max'] ) && $value > $attrs['max'] ) { return $attrs['max']; } - return $number; + return $value; } /** @@ -13870,14 +14272,11 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @return {string|number|null} The sanitized value. */ function slider$1( $value, $setting, $control ) { - var params = $control.params; - var $attrs = params.attrs || {}; - - var $number = Helper.extractNumber( $value, !!$attrs['float'] ); - var $unit = Helper.extractSizeUnit( $value, params['units'] ); + var $number = Helper.extractNumber( $value ); + var $unit = Helper.extractSizeUnit( $value ); $number = number$1( $number, $setting, $control ); - $unit = sizeUnit$1( $unit, params['units'] ); + $unit = sizeUnit$1( $unit, $control.params['units'] ); if ( $number === null ) { return null; @@ -13935,6 +14334,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { singleChoice: singleChoice$1, multipleChoices: multipleChoices$1, oneOrMoreChoices: oneOrMoreChoices$1, + sortable: sortable$1, fontFamily: fontFamily$1, checkbox: checkbox$1, tags: tags$1, @@ -13961,63 +14361,56 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate * @requires Sanitize */ - var BaseRadio = (function (BaseChoices) { - function BaseRadio () { - BaseChoices.apply(this, arguments); + var BaseRadio = (function (BaseChoices$$1) { + function BaseRadio (id, args) { + BaseChoices$$1.call(this, id, args); + + this.validate = Validate.singleChoice; + this.sanitize = Sanitize.singleChoice; } - if ( BaseChoices ) BaseRadio.__proto__ = BaseChoices; - BaseRadio.prototype = Object.create( BaseChoices && BaseChoices.prototype ); + if ( BaseChoices$$1 ) BaseRadio.__proto__ = BaseChoices$$1; + BaseRadio.prototype = Object.create( BaseChoices$$1 && BaseChoices$$1.prototype ); BaseRadio.prototype.constructor = BaseRadio; - BaseRadio.prototype.validate = function validate (value) { - return Validate.singleChoice({}, value, this.setting, this); - }; - /** - * @since 1.0.0 * @override */ - BaseRadio.prototype.sanitize = function sanitize (value) { - return Sanitize.singleChoice(value, this.setting, this); + BaseRadio.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return $value.toString() !== this._getValueFromUI(); }; /** - * @since 1.0.0 * @override */ - BaseRadio.prototype.syncUI = function syncUI () { - this._syncRadios(); + BaseRadio.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); }; /** - * @since 1.0.0 * @override */ - BaseRadio.prototype.ready = function ready () { + BaseRadio.prototype.componentDidMount = function componentDidMount () { this.__inputs = this._container.getElementsByTagName('input'); - // sync checked state on radios on ready and bind (argument `true`) - this._syncRadios(true); + this._updateUI(this.setting(), true); }; /** * Sync radios and maybe bind change event - * We need to be fast here, use vanilla js. * * @since 1.0.0 * @memberof! controls.BaseRadio# * - * @param {boolean} bindAsWell Bind on change? + * @param {mixed} $value + * @param {boolean} bind */ - BaseRadio.prototype._syncRadios = function _syncRadios (bindAsWell) { + BaseRadio.prototype._updateUI = function _updateUI ($value, bind) { var this$1 = this; - var value = this.setting(); - for (var i = 0, l = this.__inputs.length; i < l; i++) { var input = this$1.__inputs[i]; - input.checked = value === input.value; - if (bindAsWell) { + input.checked = $value === input.value; + if (bind) { input.onchange = function (event) { this$1.setting.set(event.target.value); }; @@ -14025,14 +14418,36 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } }; - return BaseRadio; - }(BaseChoices$1)); + /** + * Get value from UI + * + * @since 1.1.0 + * @memberof! controls.BaseRadio# + * + * @return {?string} + */ + BaseRadio.prototype._getValueFromUI = function _getValueFromUI () { + var this$1 = this; + + for (var i = 0, l = this.__inputs.length; i < l; i++) { + if (this$1.__inputs[i].checked) { + return this$1.__inputs[i].value; + } + } + return null; + }; - var BaseRadio$1 = api$1.controls.BaseRadio = BaseRadio; + return BaseRadio; + }(BaseChoices)); /** * Control Base Set class * + * Unlike its PHP respective class KKcp_Customize_Control_Base_Set this does not + * extends the BaseChoices class because we don't actually share anything with + * it. In fact the data `min`, `max`, `choices` come from PHP anyway and the + * population of the valid choices uses a different approach here. + * * @since 1.0.0 * * @memberof controls @@ -14046,36 +14461,27 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Sanitize */ var BaseSet = (function (Base) { - function BaseSet () { - Base.apply(this, arguments); + function BaseSet (id, args) { + Base.call(this, id, args); + + this.validate = Validate.oneOrMoreChoices; + this.sanitize = Sanitize.oneOrMoreChoices; + } if ( Base ) BaseSet.__proto__ = Base; BaseSet.prototype = Object.create( Base && Base.prototype ); BaseSet.prototype.constructor = BaseSet; - BaseSet.prototype.validate = function validate (value) { - return Validate.oneOrMoreChoices({}, value, this.setting, this); - }; - - /** - * @since 1.0.0 - * @override - */ - BaseSet.prototype.sanitize = function sanitize (value) { - return Sanitize.oneOrMoreChoices(value, this.setting, this); - }; - /** * @see KKcp_Customize_Control_Base_Set->populate_valid_choices where we do * kind of the same extraction but a bit differently because we don't need * to extract data for the `` field too, and also * because in php arrays are just arrays. * - * @since 1.0.0 * @override */ - BaseSet.prototype.onInit = function onInit () { + BaseSet.prototype.componentInit = function componentInit () { var filteredSets = this._getFilteredSets(this.params.choices); var data = this._getSelectDataFromSets(filteredSets); this._options = data._options; @@ -14085,33 +14491,35 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }; /** - * @since 1.0.0 * @override */ - BaseSet.prototype.syncUI = function syncUI (value) { - if (_$1.isString(value)) { - value = [value]; - } - if (!_$1.isEqual(value, this._getValueFromUI())) { - this._updateUI(value); + BaseSet.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + if (_$1.isString($value)) { + $value = [$value]; } + return !_$1.isEqual(value, this._getValueFromUI()); + }; + + /** + * @override + */ + BaseSet.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); }; /** - * @since 1.0.0 * @override */ - BaseSet.prototype.onDeflate = function onDeflate () { + BaseSet.prototype.componentWillUnmount = function componentWillUnmount () { if (this.__input && this.__input.selectize) { this.__input.selectize.destroy(); } }; /** - * @since 1.0.0 * @override */ - BaseSet.prototype.ready = function ready () { + BaseSet.prototype.componentDidMount = function componentDidMount () { this.__input = this._container.getElementsByClassName('kkcp-select')[0]; this._initUI(); this._updateUI(this.setting()); @@ -14451,8 +14859,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { return BaseSet; }(Base$1)); - var BaseSet$1 = api$1.controls.BaseSet = BaseSet; - /** * Control Buttonset * @@ -14469,17 +14875,37 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Control * @augments wp.customize.Class */ - var Buttonset = (function (BaseRadio) { + var Buttonset = (function (BaseRadio$$1) { function Buttonset () { - BaseRadio.apply(this, arguments); - }if ( BaseRadio ) Buttonset.__proto__ = BaseRadio; - Buttonset.prototype = Object.create( BaseRadio && BaseRadio.prototype ); + BaseRadio$$1.apply(this, arguments); + } + + if ( BaseRadio$$1 ) Buttonset.__proto__ = BaseRadio$$1; + Buttonset.prototype = Object.create( BaseRadio$$1 && BaseRadio$$1.prototype ); Buttonset.prototype.constructor = Buttonset; - + Buttonset.prototype._tplChoiceUi = function _tplChoiceUi () { + return "\n\t\t\t\n\t\t\t\n\t\t" + }; + + /** + * @since 1.1.0 + * @override + */ + Buttonset.prototype._tplAboveChoices = function _tplAboveChoices () { + return "\n\t\t\t
    \n\t\t" + }; + + /** + * @since 1.1.0 + * @override + */ + Buttonset.prototype._tplBelowChoices = function _tplBelowChoices () { + return "\n\t\t\t\n\t\t\t
    \n\t\t" + }; return Buttonset; - }(BaseRadio$1)); + }(BaseRadio)); wpApi.controlConstructor['kkcp_buttonset'] = api$1.controls.Buttonset = Buttonset; @@ -14501,55 +14927,52 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Sanitize */ var Checkbox = (function (Base) { - function Checkbox () { - Base.apply(this, arguments); + function Checkbox (id, args) { + Base.call(this, id, args); + + this.validate = Validate.checkbox; + this.sanitize = Sanitize.checkbox; } if ( Base ) Checkbox.__proto__ = Base; Checkbox.prototype = Object.create( Base && Base.prototype ); Checkbox.prototype.constructor = Checkbox; - Checkbox.prototype.softenize = function softenize (value) { - return (value === 0 || value === 1) ? value.toString() : value; - }; - /** + * We need this to fix situations like: `'1' === 1` returning false. + * * @override */ - Checkbox.prototype.validate = function validate (value) { - return Validate.checkbox({}, value, this.setting, this); + Checkbox.prototype.softenize = function softenize ($value) { + return ($value === 0 || $value === 1) ? $value.toString() : $value; }; /** * @override */ - Checkbox.prototype.sanitize = function sanitize (value) { - return Sanitize.checkbox(value, this.setting, this); + Checkbox.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + var $uiValue = numberToBoolean(this.__input.checked); + + return this.softenize($uiValue) !== this.softenize($value); }; /** * @override */ - Checkbox.prototype.syncUI = function syncUI (value) { - var valueClean = numberToBoolean(value); - var inputStatus = numberToBoolean(this.__input.checked); - if (inputStatus !== valueClean) { - this.__input.checked = valueClean; - } + Checkbox.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this.__input.checked = numberToBoolean($value); }; /** * @override */ - Checkbox.prototype.ready = function ready () { + Checkbox.prototype.componentDidMount = function componentDidMount () { var this$1 = this; this.__input = this._container.getElementsByTagName('input')[0]; - // sync input value on ready this.__input.checked = numberToBoolean(this.setting()); - // bind input on ready this.__input.onchange = function (event) { event.preventDefault(); var value = event.target.checked ? 1 : 0; @@ -14557,6 +14980,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }; }; + /** + * @override + */ + Checkbox.prototype._tpl = function _tpl () { + return ("\n " + (this._tplHeader()) + "\n \n ") + }; + return Checkbox; }(Base$1)); @@ -14583,58 +15013,56 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Sanitize */ var Color = (function (Base) { - function Color () { - Base.apply(this, arguments); + function Color (id, args) { + Base.call(this, id, args); + + this.validate = Validate.color; + this.sanitize = Sanitize.color; } if ( Base ) Color.__proto__ = Base; Color.prototype = Object.create( Base && Base.prototype ); Color.prototype.constructor = Color; - Color.prototype.softenize = function softenize (value) { - try { - var anyColor = tinycolor(value); - if (!anyColor['_format']) { // whitelisted from uglify \\ - return value; - } else { - return anyColor.toRgbString(); - } - } catch(e) { - if (DEBUG) { - console.warn('Control->Color->softenize: tinycolor conversion failed', e); - } - return value; - } - }; - /** + * Use tinycolor (included in spectrum.js) to always convert colors to the + * same format, so to have the same output result when the input is `red` or + * `#f00` or `#ff0000` or `rgba(255, 0, 0, 1)`. If it is not an actual color + * but an expression or a variable tinycolor won't recognize a `_format` + * (such as hex, name, rgba, etc..), we rely on this do decide what to return + * * @override + * @requires tinycolor.toRgbString */ - Color.prototype.validate = function validate (value) { - return Validate.color({}, value, this.setting, this); + Color.prototype.softenize = function softenize ($value) { + var anyColor = tinycolor($value); + + if (!anyColor['_format']) { // whitelisted from uglify \\ + return $value; + } else { + return anyColor.toRgbString(); + } }; /** * @override */ - Color.prototype.sanitize = function sanitize (value) { - return Sanitize.color(value, this.setting, this); + Color.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return this.softenize(this._getValueFromUi()) !== this.softenize($value); }; /** * @override */ - Color.prototype.syncUI = function syncUI (value) { - this._apply(value, 'API'); + Color.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); }; /** - * Destroy `spectrum` instances if any. - * * @override */ - Color.prototype.onDeflate = function onDeflate () { - if (this.__$picker && this.rendered) { + Color.prototype.componentWillUnmount = function componentWillUnmount () { + if (this.__$picker) { this.__$picker.spectrum('destroy'); } }; @@ -14642,22 +15070,17 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * @override */ - Color.prototype.ready = function ready () { + Color.prototype.componentDidMount = function componentDidMount () { var this$1 = this; - /** @type {HTMLElement} */ var container = this._container; - /** @type {HTMLElement} */ var btnCustom = container.getElementsByClassName('kkcpui-toggle')[0]; - /** @type {HTMLElement} */ this.__preview = container.getElementsByClassName('kkcpcolor-current-overlay')[0]; - /** @type {JQuery} */ this.__$picker = $$1(container.getElementsByClassName('kkcpcolor-input')[0]); - /** @type {JQuery} */ this.__$expander = $$1(container.getElementsByClassName('kkcp-expander')[0]).hide(); - this._updateUIpreview(this.setting()); + this._updateUI(this.setting()); var isOpen = false; var pickerIsInitialized = false; @@ -14726,9 +15149,11 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }, move: function (tinycolor) { var color$$1 = tinycolor ? tinycolor.toString() : 'transparent'; - this$1._apply(color$$1); + this$1.setting.set(color$$1); }, change: function (tinycolor) { + var color$$1 = tinycolor ? tinycolor.toString() : 'transparent'; + this$1.setting.set(color$$1); if (!tinycolor) { $container.find('.sp-input').val('transparent'); } @@ -14737,55 +15162,40 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { }; /** - * Update UI preview (the color box on the left hand side) + * Get value from UI * - * @since 1.0.0 + * @since 1.1.0 * @memberof! controls.Color# - * @access protected - */ - Color.prototype._updateUIpreview = function _updateUIpreview (newValue) { - this.__preview.style.background = newValue; - }; - - /** - * Update UI control (the spectrum color picker) * - * @since 1.0.0 - * @memberof! controls.Color# * @access protected + * @return {string} */ - Color.prototype._updateUIcustomControl = function _updateUIcustomControl (newValue) { - this.__$picker.spectrum('set', newValue); + Color.prototype._getValueFromUi = function _getValueFromUi () { + return this.__preview.style.background; }; /** - * Apply, wrap the `setting.set()` function - * doing some additional stuff. + * Update UI * - * @since 1.0.0 + * @since 1.1.0 * @memberof! controls.Color# * * @access protected - * @param {string} value - * @param {string} from Where the value come from (could be from the UI: - * picker, dynamic fields, expr field) or from the - * API (on programmatic value change). + * @param {string} $value */ - Color.prototype._apply = function _apply (value, from) { - this.params.valueCSS = value; - - if (this.rendered) { - this._updateUIpreview(value); + Color.prototype._updateUI = function _updateUI ($value) { + this.__preview.style.background = $value; - if (from === 'API') { - this._updateUIcustomControl(value); - } + if (this.__$picker && this.__$picker.spectrum) { + this.__$picker.spectrum('set', $value); } + }; - if (from !== 'API') { - // set new value - this.setting.set(value); - } + /** + * @override + */ + Color.prototype._tpl = function _tpl () { + return ("\n " + (this._tplHeader()) + "\n \n \n \n
    \n \n
    \n ") }; return Color; @@ -14810,11 +15220,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var Content = (function (Base) { function Content () { Base.apply(this, arguments); - }if ( Base ) Content.__proto__ = Base; + } + + if ( Base ) Content.__proto__ = Base; Content.prototype = Object.create( Base && Base.prototype ); Content.prototype.constructor = Content; - + Content.prototype.template = function template () { + return "\n <# if (data.alert) { #>
    <# } #>\n <# if (data.label) { #><# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #><# } #>\n <# if (data.description) { #> class=\"description customize-control-description\"<# } #>><# if (marked) { #>{{{ marked(data.description) }}}<# } else { #>{{{ data.description }}}<# } #><# } #>\n <# if (marked && data.markdown) { #>
    {{{ marked(data.markdown) }}}
    <# } #>\n <# if (data.alert) { #>
    <# } #>\n " + }; return Content; }(Base$1)); @@ -14840,33 +15254,25 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Sanitize * @requires Helper */ - var FontFamily = (function (BaseSet) { - function FontFamily () { - BaseSet.apply(this, arguments); + var FontFamily = (function (BaseSet$$1) { + function FontFamily (id, args) { + BaseSet$$1.call(this, id, args); + + this.validate = Validate.fontFamily; + this.sanitize = Sanitize.fontFamily; } - if ( BaseSet ) FontFamily.__proto__ = BaseSet; - FontFamily.prototype = Object.create( BaseSet && BaseSet.prototype ); + if ( BaseSet$$1 ) FontFamily.__proto__ = BaseSet$$1; + FontFamily.prototype = Object.create( BaseSet$$1 && BaseSet$$1.prototype ); FontFamily.prototype.constructor = FontFamily; - FontFamily.prototype.validate = function validate (value) { - return Validate.fontFamily({}, value, this.setting, this); - }; - - /** - * @override - */ - FontFamily.prototype.sanitize = function sanitize (value) { - return Sanitize.fontFamily(value, this.setting, this); - }; - /** * Always quote all font families * * @override */ - FontFamily.prototype.onInit = function onInit () { - BaseSet.prototype.onInit.call(this); + FontFamily.prototype.componentInit = function componentInit () { + BaseSet$$1.prototype.componentInit.call(this); this._options = _$1.map(this._options, function (option) { option.value = Helper.normalizeFontFamily(option.value); @@ -14878,27 +15284,39 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * @override */ - FontFamily.prototype.syncUI = function syncUI (value) { - if (_$1.isArray(value)) { - value = value.join(','); - } - if (!_$1.isEqual(value, this.__input.selectize.getValue())) { - this._initUI(value); + FontFamily.prototype.softenize = function softenize ($value) { + if (_$1.isArray($value)) { + $value = $value.join(','); } + return $value; + }; + + /** + * @override + */ + FontFamily.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return !_$1.isEqual(this.softenize($value), this.__input.selectize.getValue()); }; /** * @override */ - FontFamily.prototype.ready = function ready () { + FontFamily.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); + }; + + /** + * @override + */ + FontFamily.prototype.componentDidMount = function componentDidMount () { this.__input = this._container.getElementsByClassName('kkcp-select')[0]; - this._initUI(this.setting()); + this._updateUI(this.setting()); }; /** * @override */ - FontFamily.prototype._initUI = function _initUI (value) { + FontFamily.prototype._updateUI = function _updateUI (value) { // this is due to a bug, we should use: // this.__input.selectize.setValue(value, true); // @see https://github.com/brianreavis/selectize.js/issues/568 @@ -14949,8 +15367,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { return ("
    " + (_$1.escape(data.label)) + "
    "); }; + /** + * @override + */ + FontFamily.prototype._tpl = function _tpl () { + return ("\n \n \n "); + }; + return FontFamily; - }(BaseSet$1)); + }(BaseSet)); wpApi.controlConstructor['kkcp_font_family'] = api$1.controls.FontFamily = FontFamily; @@ -14969,13 +15394,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Control * @augments wp.customize.Class */ - var Icon = (function (BaseSet) { + var Icon = (function (BaseSet$$1) { function Icon () { - BaseSet.apply(this, arguments); + BaseSet$$1.apply(this, arguments); } - if ( BaseSet ) Icon.__proto__ = BaseSet; - Icon.prototype = Object.create( BaseSet && BaseSet.prototype ); + if ( BaseSet$$1 ) Icon.__proto__ = BaseSet$$1; + Icon.prototype = Object.create( BaseSet$$1 && BaseSet$$1.prototype ); Icon.prototype.constructor = Icon; Icon.prototype._renderItem = function _renderItem (data) { @@ -15010,8 +15435,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { return ((data.set) + " " + (data.set) + "-" + (data.value)); }; + /** + * @override + */ + Icon.prototype._tpl = function _tpl () { + return ("\n \n \n ") + }; + return Icon; - }(BaseSet$1)); + }(BaseSet)); wpApi.controlConstructor['kkcp_icon'] = api$1.controls.Icon = Icon; @@ -15033,14 +15465,14 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } /** - * Control Multicheck + * Control Sortable * - * Accessible globally on `wp.customize.controlConstructor.kkcp_multicheck` + * Accessible globally on `wp.customize.controlConstructor.kkcp_sortable` * * @since 1.0.0 * * @memberof controls - * @class Multicheck + * @class Sortable * * @extends controls.BaseChoices * @augments controls.Base @@ -15050,181 +15482,154 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate * @requires Sanitize */ - var Multicheck = (function (BaseChoices) { - function Multicheck () { - BaseChoices.apply(this, arguments); - } + var Sortable = (function (BaseChoices$$1) { + function Sortable (id, args) { + BaseChoices$$1.call(this, id, args); - if ( BaseChoices ) Multicheck.__proto__ = BaseChoices; - Multicheck.prototype = Object.create( BaseChoices && BaseChoices.prototype ); - Multicheck.prototype.constructor = Multicheck; + this.validate = Validate.sortable; + this.sanitize = Sanitize.sortable; + } - Multicheck.prototype.validate = function validate (value) { - return Validate.multipleChoices({}, value, this.setting, this); - }; + if ( BaseChoices$$1 ) Sortable.__proto__ = BaseChoices$$1; + Sortable.prototype = Object.create( BaseChoices$$1 && BaseChoices$$1.prototype ); + Sortable.prototype.constructor = Sortable; /** * @override */ - Multicheck.prototype.sanitize = function sanitize (value) { - return Sanitize.multipleChoices(value, this.setting, this); + Sortable.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return !_$1.isEqual($value, this._getValueFromUI()); }; /** * @override */ - Multicheck.prototype.syncUI = function syncUI (value) { - if (!_$1.isEqual(value, this._getValueFromUI())) { - this._syncCheckboxes(); - - if (this.params.sortable) { - this._reorder(); - } - } + Sortable.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); }; /** * @override */ - Multicheck.prototype.ready = function ready () { + Sortable.prototype.componentDidMount = function componentDidMount () { var this$1 = this; - this.__inputs = this._container.getElementsByTagName('input'); - - // special stuff for sortable multicheck controls - if (this.params.sortable) { - this.container.sortable({ - items: '> label', - cursor: 'move', - update: function () { - this$1.setting.set(this$1._getValueFromUI()); - } - }); - - this._buildItemsMap(); - } + this._buildItemsMap(); - // sync checked state on checkboxes on ready and bind (argument `true`) - this._syncCheckboxes(true); + this.container.sortable({ + items: '.kkcp-sortable', + cursor: 'move', + update: function () { + var value = this$1._getValueFromUI(); + this$1.setting.set(value); + } + }); }; /** * Build items map * + * It creates a sortable items map, a key (grabbed from the `data-value` + * attribute) with the corresponding DOM element + * * @since 1.0.0 - * @memberof! controls.Multicheck# + * @memberof! controls.Sortable# * @access protected */ - Multicheck.prototype._buildItemsMap = function _buildItemsMap () { + Sortable.prototype._buildItemsMap = function _buildItemsMap () { var this$1 = this; - var items = this._container.getElementsByTagName('label'); + var items = this._container.getElementsByClassName('kkcp-sortable'); this.__itemsMap = {}; for (var i = 0, l = items.length; i < l; i++) { - this$1.__itemsMap[items[i].title] = { - _sortable: items[i], - _input: items[i].getElementsByTagName('input')[0] + var itemKey = items[i].getAttribute('data-value'); + this$1.__itemsMap[itemKey] = { + _sortable: items[i] }; } }; /** - * @override - */ - Multicheck.prototype._reorder = function _reorder () { - var this$1 = this; - - // sort first the checked ones - api$1.controls['Sortable'].prototype._reorder.apply(this); - - // then sort the unchecked ones - var value = this.setting(); - - for (var itemValueAsKey in this$1.params.choices) { - var item = this$1.__itemsMap[itemValueAsKey]; - - if (item) { - if (value.indexOf(itemValueAsKey) === -1) { - var itemSortableDOM = item._sortable; - itemSortableDOM.parentNode.removeChild(itemSortableDOM); - this$1._container.appendChild(itemSortableDOM); - } - } else { - logError('controls.Multicheck->_reorder', ("item '" + itemValueAsKey + "' has no '_sortable' DOM in 'this.__itemsMap'")); - } - } - }; - - /** - * Get sorted value, reading checkboxes status from the DOM + * Get value from UI * - * @since 1.0.0 - * @memberof! controls.Multicheck# + * @since 1.1.0 + * @memberof! controls.Sortable# * @access protected * * @return {Array} */ - Multicheck.prototype._getValueFromUI = function _getValueFromUI () { - var this$1 = this; - - var valueSorted = []; - - for (var i = 0, l = this.__inputs.length; i < l; i++) { - var input = this$1.__inputs[i]; - if (input.checked) { - valueSorted.push(input.value); - } - } - return valueSorted; + Sortable.prototype._getValueFromUI = function _getValueFromUI () { + return this.container.sortable('toArray', { attribute: 'data-value' }); }; /** - * Sync checkboxes and maybe bind change event - * We need to be fast here, use vanilla js. + * Update UI + * + * Manually reorder the sortable list, needed when a programmatic change + * is triggered. Unfortunately jQuery UI sortable does not have a method + * to keep in sync the order of an array and its corresponding DOM. * * @since 1.0.0 - * @memberof! controls.Multicheck# + * @memberof! controls.Sortable# * @access protected * - * @param {boolean} bindAsWell Bind on change? + * @param {mixed} $value */ - Multicheck.prototype._syncCheckboxes = function _syncCheckboxes (bindAsWell) { + Sortable.prototype._updateUI = function _updateUI ($value) { var this$1 = this; var value = this.setting(); - if (!_$1.isArray(value)) { - return logError('controls.Multicheck->_syncCheckboxes', "setting.value must be an array"); + if (!_$1.isArray($value)) { + return logError('controls.Sortable->_updateUI', "setting.value must be an array"); } - for (var i = 0, l = this.__inputs.length; i < l; i++) { - var input = this$1.__inputs[i]; - input.checked = value.indexOf(input.value) !== -1; - if (bindAsWell) { - input.onchange = function () { - this$1.setting.set(this$1._getValueFromUI()); - }; + for (var i = 0, l = $value.length; i < l; i++) { + var itemValueAsKey = $value[i]; + var item = this$1.__itemsMap[itemValueAsKey]; + if (item) { + var itemSortableDOM = item._sortable; + itemSortableDOM.parentNode.removeChild(itemSortableDOM); + this$1._container.appendChild(itemSortableDOM); + } else { + logError('controls.Sortable->_updateUI', ("item '" + itemValueAsKey + "' has no '_sortable' DOM in 'this.__itemsMap'")); } } + + this.container.sortable('refresh'); }; - return Multicheck; - }(BaseChoices$1)); + /** + * @override + */ + Sortable.prototype._tplChoicesLoop = function _tplChoicesLoop () { + return ("\n <# if (_.isArray(data.choicesOrdered)) { for (var i = 0; i < data.choicesOrdered.length; i++) {\n var val = data.choicesOrdered[i]; #>\n " + (this._tplChoice()) + "\n <# } } #>\n "); + }; - wpApi.controlConstructor['kkcp_multicheck'] = api$1.controls.Multicheck = Multicheck; + /** + * @override + */ + Sortable.prototype._tplChoiceUi = function _tplChoiceUi () { + return "
    {{ label }}
    "; + }; + + return Sortable; + }(BaseChoices)); + + var Sortable$1 = wpApi.controlConstructor['kkcp_sortable'] = api$1.controls.Sortable = Sortable; /** - * Control Number + * Control Multicheck * - * Accessible globally on `wp.customize.controlConstructor.kkcp_number` + * Accessible globally on `wp.customize.controlConstructor.kkcp_multicheck` * * @since 1.0.0 * * @memberof controls - * @class Number + * @class Multicheck * - * @extends controls.BaseInput + * @extends controls.BaseChoices * @augments controls.Base * @augments wp.customize.Control * @augments wp.customize.Class @@ -15232,52 +15637,192 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate * @requires Sanitize */ - var Number$1 = (function (BaseInput) { - function Number () { - BaseInput.apply(this, arguments); - } + var Multicheck = (function (BaseChoices$$1) { + function Multicheck (id, args) { + BaseChoices$$1.call(this, id, args); - if ( BaseInput ) Number.__proto__ = BaseInput; - Number.prototype = Object.create( BaseInput && BaseInput.prototype ); - Number.prototype.constructor = Number; + this.validate = Validate.multipleChoices; + this.sanitize = Sanitize.multipleChoices; + } - Number.prototype.validate = function validate (value) { - return Validate.number({}, value, this.setting, this); - }; + if ( BaseChoices$$1 ) Multicheck.__proto__ = BaseChoices$$1; + Multicheck.prototype = Object.create( BaseChoices$$1 && BaseChoices$$1.prototype ); + Multicheck.prototype.constructor = Multicheck; /** * @override */ - Number.prototype.sanitize = function sanitize (value) { - return Sanitize.number(value, this.setting, this); + Multicheck.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return !_$1.isEqual($value, this._getValueFromUI()); }; /** - * We just neet to convert the value to string for the check, for the rest - * is the same as in the base input control - * * @override */ - Number.prototype.syncUI = function syncUI (value) { - if (value && this.__input.value !== value.toString()) { - this.__input.value = value; + Multicheck.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUIcheckboxes($value); + + if (this.params.sortable) { + this._updateUIreorder($value); } }; - return Number; - }(BaseInput$1)); + /** + * @override + */ + Multicheck.prototype.componentDidMount = function componentDidMount () { + var this$1 = this; - wpApi.controlConstructor['kkcp_number'] = api$1.controls.Number = Number$1; + this.__inputs = this._container.getElementsByTagName('input'); - /** - * Control Text class - * - * Accessible globally on `wp.customize.controlConstructor.kkcp_text` + // special stuff for sortable multicheck controls + if (this.params.sortable) { + this.container.sortable({ + items: '> label', + cursor: 'move', + update: function () { + this$1.setting.set(this$1._getValueFromUI()); + } + }); + + this._buildItemsMap(); + } + + // sync checked state on checkboxes and bind (argument `true`) + this._updateUIcheckboxes(this.setting(), true); + }; + + /** + * Build items map + * + * @since 1.0.0 + * @memberof! controls.Multicheck# + * @access protected + */ + Multicheck.prototype._buildItemsMap = function _buildItemsMap () { + var this$1 = this; + + var items = this._container.getElementsByTagName('label'); + this.__itemsMap = {}; + + for (var i = 0, l = items.length; i < l; i++) { + this$1.__itemsMap[items[i].title] = { + _sortable: items[i], + _input: items[i].getElementsByTagName('input')[0] + }; + } + }; + + /** + * Get sorted value, reading checkboxes status from the DOM + * + * @since 1.0.0 + * @memberof! controls.Multicheck# + * @access protected + * + * @return {Array} + */ + Multicheck.prototype._getValueFromUI = function _getValueFromUI () { + var this$1 = this; + + var valueSorted = []; + + for (var i = 0, l = this.__inputs.length; i < l; i++) { + var input = this$1.__inputs[i]; + if (input.checked) { + valueSorted.push(input.value); + } + } + return valueSorted; + }; + + /** + * @override + */ + Multicheck.prototype._updateUIreorder = function _updateUIreorder ($value) { + var this$1 = this; + + // sort first the checked ones + Sortable$1.prototype._updateUI.apply(this); + + // then sort the unchecked ones + for (var itemValueAsKey in this$1.params.choices) { + var item = this$1.__itemsMap[itemValueAsKey]; + + if (item) { + if ($value.indexOf(itemValueAsKey) === -1) { + var itemSortableDOM = item._sortable; + itemSortableDOM.parentNode.removeChild(itemSortableDOM); + this$1._container.appendChild(itemSortableDOM); + } + } else { + logError('controls.Multicheck->_reorder', ("item '" + itemValueAsKey + "' has no '_sortable' DOM in 'this.__itemsMap'")); + } + } + }; + + /** + * Update UI checkboxes and maybe bind change event + * + * @since 1.0.0 + * @memberof! controls.Multicheck# + * @access protected + * + * @param {mixed} $value + * @param {boolean} bind + */ + Multicheck.prototype._updateUIcheckboxes = function _updateUIcheckboxes ($value, bind) { + var this$1 = this; + + if (!_$1.isArray($value)) { + return logError('controls.Multicheck->_updateUIcheckboxes', "setting.value must be an array"); + } + + for (var i = 0, l = this.__inputs.length; i < l; i++) { + var input = this$1.__inputs[i]; + input.checked = $value.indexOf(input.value) !== -1; + if (bind) { + input.onchange = function () { + this$1.setting.set(this$1._getValueFromUI()); + }; + } + } + }; + + /** + * If the control is sortable we first show the ordered choices (the ones + * stored as value in the DB, gathered with `$this->value()`) and then the + * other choices, that's why the double loop with the `indexOf` condition. + * + * @override + */ + Multicheck.prototype._tplChoicesLoop = function _tplChoicesLoop () { + var tplChoice = this._tplChoice(); + + return ("\n <# if (data.sortable) {\n if (_.isArray(data.choicesOrdered)) {\n for (var i = 0; i < data.choicesOrdered.length; i++) {\n var val = data.choicesOrdered[i]; #>\n " + tplChoice + "\n <# }\n for (var val in choices) {\n if (data.choicesOrdered.indexOf(val) === -1) { #>\n " + tplChoice + "\n <# }\n }\n }\n } else {\n for (var val in choices) { #>\n " + tplChoice + "\n <# }\n } #>\n ") + }; + + /** + * @override + */ + Multicheck.prototype._tplChoiceUi = function _tplChoiceUi () { + return "\n \n " + }; + + return Multicheck; + }(BaseChoices)); + + wpApi.controlConstructor['kkcp_multicheck'] = api$1.controls.Multicheck = Multicheck; + + /** + * Control Number + * + * Accessible globally on `wp.customize.controlConstructor.kkcp_number` * * @since 1.0.0 * * @memberof controls - * @class Text + * @class Number * * @extends controls.BaseInput * @augments controls.Base @@ -15287,28 +15832,65 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate * @requires Sanitize */ - var Text = (function (BaseInput) { - function Text () { - BaseInput.apply(this, arguments); - } + var Number$1 = (function (BaseInput$$1) { + function Number (id, args) { + BaseInput$$1.call(this, id, args); - if ( BaseInput ) Text.__proto__ = BaseInput; - Text.prototype = Object.create( BaseInput && BaseInput.prototype ); - Text.prototype.constructor = Text; + this.validate = Validate.number; + this.sanitize = Sanitize.number; + } - Text.prototype.validate = function validate (value) { - return Validate.text({}, value, this.setting, this); - }; + if ( BaseInput$$1 ) Number.__proto__ = BaseInput$$1; + Number.prototype = Object.create( BaseInput$$1 && BaseInput$$1.prototype ); + Number.prototype.constructor = Number; /** + * We just neet to convert the value to string for the check, for the rest + * is the same as in the base input control + * * @override */ - Text.prototype.sanitize = function sanitize (value) { - return Sanitize.text(value, this.setting, this); + Number.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return this.__input.value !== $value.toString(); }; + return Number; + }(BaseInput)); + + wpApi.controlConstructor['kkcp_number'] = api$1.controls.Number = Number$1; + + /** + * Control Text class + * + * Accessible globally on `wp.customize.controlConstructor.kkcp_text` + * + * @since 1.0.0 + * + * @memberof controls + * @class Text + * + * @extends controls.BaseInput + * @augments controls.Base + * @augments wp.customize.Control + * @augments wp.customize.Class + * + * @requires Validate + * @requires Sanitize + */ + var Text = (function (BaseInput$$1) { + function Text (id, args) { + BaseInput$$1.call(this, id, args); + + this.validate = Validate.text; + this.sanitize = Sanitize.text; + } + + if ( BaseInput$$1 ) Text.__proto__ = BaseInput$$1; + Text.prototype = Object.create( BaseInput$$1 && BaseInput$$1.prototype ); + Text.prototype.constructor = Text; + return Text; - }(BaseInput$1)); + }(BaseInput)); var Text$1 = wpApi.controlConstructor['kkcp_text'] = api$1.controls.Text = Text; @@ -15340,17 +15922,18 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { Password.prototype = Object.create( Text && Text.prototype ); Password.prototype.constructor = Password; - Password.prototype.syncUI = function syncUI (value) { - if (value && this.__input.value !== value) { - this.__input.value = value; - this.__text.value = value; + Password.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this.__input.value = $value; + + if (this.__text) { + this.__text.value = $value; } }; /** * @override */ - Password.prototype.ready = function ready (value) { + Password.prototype.componentDidMount = function componentDidMount () { var self = this; var ref = this; var setting = ref.setting; @@ -15411,6 +15994,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } }; + /** + * @override + */ + Password.prototype._tplInner = function _tplInner () { + var tplInput = this._tplInput(); + + return ("\n \n <# if (data.attrs && data.attrs.visibility) { #>\n " + tplInput + "\n {{ key }}=\"{{ attrs[key] }}\" <# } } #>>\n \n <# } else { #>\n " + tplInput + "\n <# } #>\n \n ") + }; + return Password; }(Text$1)); @@ -15432,17 +16024,21 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Control * @augments wp.customize.Class */ - var Radio = (function (BaseRadio) { + var Radio = (function (BaseRadio$$1) { function Radio () { - BaseRadio.apply(this, arguments); - }if ( BaseRadio ) Radio.__proto__ = BaseRadio; - Radio.prototype = Object.create( BaseRadio && BaseRadio.prototype ); + BaseRadio$$1.apply(this, arguments); + } + + if ( BaseRadio$$1 ) Radio.__proto__ = BaseRadio$$1; + Radio.prototype = Object.create( BaseRadio$$1 && BaseRadio$$1.prototype ); Radio.prototype.constructor = Radio; - + Radio.prototype._tplChoiceUi = function _tplChoiceUi () { + return "\n\t\t\t\n\t\t" + }; return Radio; - }(BaseRadio$1)); + }(BaseRadio)); wpApi.controlConstructor['kkcp_radio'] = api$1.controls.Radio = Radio; @@ -15462,17 +16058,21 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Control * @augments wp.customize.Class */ - var RadioImage = (function (BaseRadio) { + var RadioImage = (function (BaseRadio$$1) { function RadioImage () { - BaseRadio.apply(this, arguments); - }if ( BaseRadio ) RadioImage.__proto__ = BaseRadio; - RadioImage.prototype = Object.create( BaseRadio && BaseRadio.prototype ); + BaseRadio$$1.apply(this, arguments); + } + + if ( BaseRadio$$1 ) RadioImage.__proto__ = BaseRadio$$1; + RadioImage.prototype = Object.create( BaseRadio$$1 && BaseRadio$$1.prototype ); RadioImage.prototype.constructor = RadioImage; - + RadioImage.prototype._tplChoiceUi = function _tplChoiceUi () { + return ("\n\t\t\t\n\t\t\t\n\t\t") + }; return RadioImage; - }(BaseRadio$1)); + }(BaseRadio)); wpApi.controlConstructor['kkcp_radio_image'] = api$1.controls.RadioImage = RadioImage; @@ -15494,31 +16094,23 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Validate * @requires Sanitize */ - var Select = (function (BaseChoices) { - function Select () { - BaseChoices.apply(this, arguments); + var Select = (function (BaseChoices$$1) { + function Select (id, args) { + BaseChoices$$1.call(this, id, args); + + this.validate = Validate.oneOrMoreChoices; + this.sanitize = Sanitize.oneOrMoreChoices; } - if ( BaseChoices ) Select.__proto__ = BaseChoices; - Select.prototype = Object.create( BaseChoices && BaseChoices.prototype ); + if ( BaseChoices$$1 ) Select.__proto__ = BaseChoices$$1; + Select.prototype = Object.create( BaseChoices$$1 && BaseChoices$$1.prototype ); Select.prototype.constructor = Select; - Select.prototype.validate = function validate (value) { - return Validate.oneOrMoreChoices({}, value, this.setting, this); - }; - - /** - * @override - */ - Select.prototype.sanitize = function sanitize (value) { - return Sanitize.oneOrMoreChoices(value, this.setting, this); - }; - /** * @override */ - Select.prototype.onDeflate = function onDeflate () { - if (this.__select && this.__select.selectize) { + Select.prototype.componentWillUnmount = function componentWillUnmount () { + if (this.__select.selectize) { this.__select.selectize.destroy(); } }; @@ -15526,20 +16118,25 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * We do a comparison with two equals `==` because sometimes we want to * compare `500` to `'500'` (like in the font-weight dropdown) and return - * true from that. + * true from that * * @override */ - Select.prototype.syncUI = function syncUI (value) { - if (!_$1.isEqual(value, this._getValueFromUI())) { - this._updateUI(value); - } + Select.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return this._getValueFromUI() != $value; }; /** * @override */ - Select.prototype.ready = function ready () { + Select.prototype.componentDidUpdate = function componentDidUpdate (value) { + this._updateUI(value); + }; + + /** + * @override + */ + Select.prototype.componentDidMount = function componentDidMount () { var attrs = this.params['attrs'] || {}; var setting = this.setting; @@ -15632,8 +16229,29 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { } }; + /** + * @override + */ + Select.prototype._tplChoiceUi = function _tplChoiceUi () { + return "\n \n " + }; + + /** + * @override + */ + Select.prototype._tplAboveChoices = function _tplAboveChoices () { + return "" + }; + return Select; - }(BaseChoices$1)); + }(BaseChoices)); var Select$1 = wpApi.controlConstructor['kkcp_select'] = api$1.controls.Select = Select; @@ -15681,57 +16299,54 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Control * @augments wp.customize.Class * - * @requires Regexes * @requires Validate * @requires Sanitize + * @requires Helper */ var Slider = (function (Base) { - function Slider () { - Base.apply(this, arguments); + function Slider (id, args) { + Base.call(this, id, args); + + this.validate = Validate.slider; + this.sanitize = Sanitize.slider; } if ( Base ) Slider.__proto__ = Base; Slider.prototype = Object.create( Base && Base.prototype ); Slider.prototype.constructor = Slider; - Slider.prototype.validate = function validate (value) { - return Validate.slider({}, value, this.setting, this); - }; - /** + * Let's consider '44' to be equal to 44. * @override */ - Slider.prototype.sanitize = function sanitize (value) { - return Sanitize.slider(value, this.setting, this); + Slider.prototype.softenize = function softenize ($value) { + return $value.toString(); }; /** - * Let's consider '44' to be equal to 44. * @override */ - Slider.prototype.softenize = function softenize (value) { - return value.toString(); + Slider.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return !_$1.isEqual(this.softenize($value), this._getValueFromUI()); }; /** * @override */ - Slider.prototype.syncUI = function syncUI (value) { - if (value !== this._getValueFromUI()) { - this._setPartialValue(value, 'API'); - } + Slider.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._setPartialValue($value, 'API'); }; /** - * This function is divided in subfunction to make it easy to reuse part of - * this control in other controls that extend this, such as `size_dynamic`. + * This function is divided in subfunctions to make it easy to reuse part of + * this control in other controls that extends this, such as `size_dynamic`. * * @override */ - Slider.prototype.ready = function ready () { - this._setDOMelements(); + Slider.prototype.componentDidMount = function componentDidMount () { + this._setDOMrefs(); this._initSliderAndBindInputs(); - this._updateUIcustomControl(this.setting()); + this._updateUI(this.setting()); }; /** @@ -15741,13 +16356,10 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @memberof! controls.Slider# * @access protected */ - Slider.prototype._setDOMelements = function _setDOMelements () { + Slider.prototype._setDOMrefs = function _setDOMrefs () { var container = this._container; - /** @type {HTMLElement} */ this.__inputNumber = container.getElementsByClassName('kkcp-slider-number')[0]; - /** @type {JQuery} */ this.__$inputUnits = $$1(container.getElementsByClassName('kkcp-unit')); - /** @type {JQuery} */ this.__$inputSlider = $$1(container.getElementsByClassName('kkcp-slider')[0]); }; @@ -15787,7 +16399,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { // Init Slider var sliderOptions = params['attrs'] || {}; $inputSlider.slider(_$1.extend(sliderOptions, { - value: self._extractFirstNumber(), + value: Helper.extractNumber(this.setting()), slide: function(event, ui) { inputNumber.value = ui.value; self._setPartialValue({ _number: ui.value }); @@ -15802,44 +16414,6 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { })); }; - /** - * Extract first found unit from value - * - * @since 1.0.0 - * @memberof! controls.Slider# - * @access protected - * - * @param {?string} value - * @return {?string} - */ - Slider.prototype._extractFirstUnit = function _extractFirstUnit (value) { - var valueOrigin = value || this.setting(); - var matchesUnit = Regexes._extractUnit.exec(valueOrigin); - if (matchesUnit && matchesUnit[0]) { - return matchesUnit[0]; - } - return null; - }; - - /** - * Extract first number found in value - * - * @since 1.0.0 - * @memberof! controls.Slider# - * @access protected - * - * @param {?string|number} value - * @return {?string} - */ - Slider.prototype._extractFirstNumber = function _extractFirstNumber (value) { - var valueOrigin = value || this.setting(); - var matchesNumber = Regexes._extractNumber.exec(valueOrigin); - if (matchesNumber && matchesNumber[0]) { - return matchesNumber[0]; - } - return null; - }; - /** * Get current `setting` value from DOM or from given arg * @@ -15881,10 +16455,10 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @param {?string} value Optional, the value from where to extract number and unit, * uses `this.setting()` if a `null` value is passed. */ - Slider.prototype._updateUIcustomControl = function _updateUIcustomControl (value) { + Slider.prototype._updateUI = function _updateUI (value) { var params = this.params; - var number$$1 = this._extractFirstNumber(value); - var unit = this._extractFirstUnit(value); + var number$$1 = Helper.extractNumber(value); + var unit = Helper.extractSizeUnit(value); // update number input this.__inputNumber.value = number$$1; @@ -15914,147 +16488,32 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { */ Slider.prototype._setPartialValue = function _setPartialValue (value, from) { if (from === 'API') { - this._updateUIcustomControl(value); + this._updateUI(value); } else { this.setting.set(this._getValueFromUI(value)); } }; - return Slider; - }(Base$1)); - - wpApi.controlConstructor['kkcp_slider'] = api$1.controls.Slider = Slider; - - /** - * Control Sortable - * - * Accessible globally on `wp.customize.controlConstructor.kkcp_sortable` - * - * @since 1.0.0 - * - * @memberof controls - * @class Sortable - * - * @extends controls.BaseChoices - * @augments controls.Base - * @augments wp.customize.Control - * @augments wp.customize.Class - * - * @requires Validate - * @requires Sanitize - */ - var Sortable = (function (BaseChoices) { - function Sortable () { - BaseChoices.apply(this, arguments); - } - - if ( BaseChoices ) Sortable.__proto__ = BaseChoices; - Sortable.prototype = Object.create( BaseChoices && BaseChoices.prototype ); - Sortable.prototype.constructor = Sortable; - - Sortable.prototype.validate = function validate (value) { - return Validate.multipleChoices({}, value, this.setting, this, true); - }; - - /** - * @override - */ - Sortable.prototype.sanitize = function sanitize (value) { - return Sanitize.multipleChoices(value, this.setting, this, true); - }; - /** + * Separate the slider template to make it reusable by child classes + * * @override */ - Sortable.prototype.syncUI = function syncUI (value) { - if (!_$1.isEqual(value, this.params.lastValue)) { - this._reorder(); - this.params.lastValue = value; - } + Slider.prototype._tplSlider = function _tplSlider () { + return "\n <# if (data.units) { #>\n
    \n {{ key }}=\"{{ data.attrs[key] }}\" <# } } #>>\n
    <# for (var i = 0, l = data.units.length; i < l; i++) { #><# } #>
    \n
    \n <# } else { #>\n {{ key }}=\"{{ data.attrs[key] }}\" <# } } #>>\n <# } #>\n
    \n
    \n
    \n " }; /** * @override */ - Sortable.prototype.ready = function ready () { - var setting = this.setting; - var container = this.container; - - this._buildItemsMap(); - - this.params.lastValue = this.setting(); - - container.sortable({ - items: '.kkcp-sortable', - cursor: 'move', - update: function () { - var newValue = container.sortable('toArray', { attribute: 'data-value' }); - setting.set(newValue); - } - }); - }; - - /** - * Build items map - * - * It creates a sortable items map, a key (grabbed from the `data-value` - * attribute) with the corresponding DOM element - * - * @since 1.0.0 - * @memberof! controls.Sortable# - * @access protected - */ - Sortable.prototype._buildItemsMap = function _buildItemsMap () { - var this$1 = this; - - var items = this._container.getElementsByClassName('kkcp-sortable'); - this.__itemsMap = {}; - - for (var i = 0, l = items.length; i < l; i++) { - var itemKey = items[i].getAttribute('data-value'); - this$1.__itemsMap[itemKey] = { - _sortable: items[i] - }; - } - }; - - /** - * Manually reorder the sortable list, needed when a programmatic change - * is triggered. Unfortunately jQuery UI sortable does not have a method - * to keep in sync the order of an array and its corresponding DOM. - * - * @since 1.0.0 - * @memberof! controls.Sortable# - * @access protected - */ - Sortable.prototype._reorder = function _reorder () { - var this$1 = this; - - var value = this.setting(); - - if (!_$1.isArray(value)) { - return logError('controls.Sortable->_reorder', "setting.value must be an array"); - } - - for (var i = 0, l = value.length; i < l; i++) { - var itemValueAsKey = value[i]; - var item = this$1.__itemsMap[itemValueAsKey]; - if (item) { - var itemSortableDOM = item._sortable; - itemSortableDOM.parentNode.removeChild(itemSortableDOM); - this$1._container.appendChild(itemSortableDOM); - } else { - logError('controls.Sortable->_reorder', ("item '" + itemValueAsKey + "' has no '_sortable' DOM in 'this.__itemsMap'")); - } - } - - this.container.sortable('refresh'); + Slider.prototype._tpl = function _tpl () { + return ("" + (this._tplHeader()) + (this._tplSlider())) }; - return Sortable; - }(BaseChoices$1)); + return Slider; + }(Base$1)); - wpApi.controlConstructor['kkcp_sortable'] = api$1.controls.Sortable = Sortable; + wpApi.controlConstructor['kkcp_slider'] = api$1.controls.Slider = Slider; /** * Control Tags class @@ -16074,70 +16533,21 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @requires Sanitize */ var Tags = (function (Base) { - function Tags () { - Base.apply(this, arguments); + function Tags (id, args) { + Base.call(this, id, args); + + this.validate = Validate.tags; + this.sanitize = Sanitize.tags; } if ( Base ) Tags.__proto__ = Base; Tags.prototype = Object.create( Base && Base.prototype ); Tags.prototype.constructor = Tags; - Tags.prototype.validate = function validate (value) { - return Validate.tags({}, value, this.setting, this); - }; - - /** - * @override - */ - Tags.prototype.sanitize = function sanitize (value) { - return Sanitize.tags(value, this.setting, this); - }; - - /** - * @override - */ - Tags.prototype.onDeflate = function onDeflate () { - if (this.__input && this.__input.selectize) { - this.__input.selectize.destroy(); - } - }; - - /** - * @override - */ - Tags.prototype.syncUI = function syncUI (value) { - var selectize = this.__input.selectize; - - if (selectize && selectize.getValue() !== value) { - // this is due to a bug, we should use: - // selectize.setValue(value, true); - // @see https://github.com/brianreavis/selectize.js/issues/568 - // instead here first we have to destroy thene to reinitialize, this - // happens only through a programmatic change such as a reset action - selectize.destroy(); - this._initUI(value); - } - }; - /** * @override */ - Tags.prototype.ready = function ready () { - this.__input = this._container.getElementsByTagName('input')[0]; - - this._initUI(this.setting()); - }; - - /** - * Init select plugin on text input - * - * @since 1.0.0 - * @memberof! controls.Tags# - * @access protected - * - * @param {string} value - */ - Tags.prototype._initUI = function _initUI (value) { + Tags.prototype.componentInit = function componentInit () { var this$1 = this; var attrs = this.params['attrs'] || {}; @@ -16169,9 +16579,65 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { pluginOptions.plugins.push('restore_on_backspace'); } - this.__input.value = value; + this._pluginOptions = pluginOptions; + }; + + /** + * @override + */ + Tags.prototype.componentWillUnmount = function componentWillUnmount () { + this.__input.selectize.destroy(); + }; - $$1(this.__input).selectize(pluginOptions); + /** + * @override + */ + Tags.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return this.__input.selectize.getValue() !== $value; + }; + + /** + * @override + */ + Tags.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); + }; + + /** + * @override + */ + Tags.prototype.componentDidMount = function componentDidMount () { + this.__input = this._container.getElementsByTagName('input')[0]; + + this._updateUI(this.setting()); + }; + + /** + * Update UI + * + * @since 1.0.0 + * @memberof! controls.Tags# + * @access protected + * + * @param {string} $value + */ + Tags.prototype._updateUI = function _updateUI ($value) { + // here we should not destroy and recreate, but this is a plugin bug: + // @see https://github.com/brianreavis/selectize.js/issues/568 + if (this.__input.selectize) { + this.__input.selectize.destroy(); + } + this.__input.value = $value; + $$1(this.__input).selectize(this._pluginOptions); + + // this.__input.selectize.setValue($value, true); + }; + + /** + * @override + */ + Tags.prototype._tpl = function _tpl () { + return ("\n \n ") }; return Tags; @@ -16208,19 +16674,17 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { Textarea.prototype = Object.create( Text && Text.prototype ); Textarea.prototype.constructor = Textarea; - Textarea.prototype.onInit = function onInit () { - if (this.params.wp_editor) { + Textarea.prototype.componentInit = function componentInit () { + if (this.params['wp_editor']) { this._wpEditorID = this._getWpEditorId(); } }; /** - * Destroy tinyMCE instance - * * @override */ - Textarea.prototype.onDeflate = function onDeflate () { - if (this.params.wp_editor) { + Textarea.prototype.componentWillUnmount = function componentWillUnmount () { + if (this.params['wp_editor']) { // it might be that this method is called too soon, even before tinyMCE // has been loaded, so try it and don't break. try { @@ -16235,67 +16699,84 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { /** * @override */ - Textarea.prototype.syncUI = function syncUI (value) { - var lastValue; - var wpEditorInstance; - if (this.params.wp_editor) { - wpEditorInstance = window$1.tinyMCE.get(this._wpEditorID); - lastValue = wpEditorInstance.getContent(); - // lastValue = window.wp.editor.getContent(this._wpEditorID);; - } else { - lastValue = this.__textarea.value; - } - if (value && lastValue !== value) { - if (this.params.wp_editor) { - wpEditorInstance.setContent(value); - } else { - this.__textarea.value = value; - } - } + Textarea.prototype.shouldComponentUpdate = function shouldComponentUpdate ($value) { + return $value !== this._getValueFromUI(); }; /** * @override */ - Textarea.prototype.ready = function ready () { + Textarea.prototype.componentDidUpdate = function componentDidUpdate ($value) { + this._updateUI($value); + }; + + /** + * @override + */ + Textarea.prototype.componentDidMount = function componentDidMount () { this.__textarea = this._container.getElementsByTagName('textarea')[0]; // params.wp_editor can be either a boolean or an object with options - if (this.params.wp_editor && !this._wpEditorIsActive) { + if (this.params['wp_editor'] && !this._wpEditorIsActive) { this._initWpEditor(); } else { - this._syncAndListen(); + var self = this; + + this._updateUI(self.setting()); + + $$1(self.__textarea).on('change keyup paste', function () { + self.setting.set(this.value); + }); } }; /** - * Get textarea id, add a suffix and replace dashes with underscores - * as suggested by WordPress Codex. + * Get value from UI * - * @see https://codex.wordpress.org/Function_Reference/wp_editor -> $editor_id + * @since 1.1.0 + * @memberof! controls.Textarea# + * @access protected + */ + Textarea.prototype._getValueFromUI = function _getValueFromUI () { + if (this.params['wp_editor']) { + wpEditorInstance = window$1.tinyMCE.get(this._wpEditorID); + return wpEditorInstance.getContent(); + // returnwindow.wp.editor.getContent(this._wpEditorID);; + } else { + return this.__textarea.value; + } + }; + + /** + * Update UI * - * @since 1.0.0 + * @since 1.1.0 * @memberof! controls.Textarea# * @access protected + * + * @param {$value} */ - Textarea.prototype._getWpEditorId = function _getWpEditorId () { - return ((this.id.replace(/-/g, '_')) + "__textarea"); + Textarea.prototype._updateUI = function _updateUI ($value) { + if (this.params['wp_editor']) { + var wpEditorInstance = window$1.tinyMCE.get(this._wpEditorID); + wpEditorInstance.setContent($value); + } else { + this.__textarea.value = $value; + } }; /** - * Sync textarea and listen for changes + * Get textarea id, add a suffix and replace dashes with underscores + * as suggested by WordPress Codex. + * + * @see https://codex.wordpress.org/Function_Reference/wp_editor -> $editor_id * * @since 1.0.0 * @memberof! controls.Textarea# * @access protected */ - Textarea.prototype._syncAndListen = function _syncAndListen () { - var self = this; - $$1(self.__textarea) - .val(self.setting()) - .on('change keyup paste', function () { - self.setting.set(this.value); - }); + Textarea.prototype._getWpEditorId = function _getWpEditorId () { + return ((this.id.replace(/-/g, '_')) + "__textarea"); }; /** @@ -16322,7 +16803,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var setting = this.setting; // get wp_editor custom options defined by the developer through the php API - var optionsCustom = _$1.isObject(this.params.wp_editor) ? this.params.wp_editor : {}; + var optionsCustom = _$1.isObject(this.params['wp_editor']) ? this.params['wp_editor'] : {}; // set default options var optionsDefaults = $$1.extend(true, {}, window$1.wp.editor.getDefaultSettings(), { @@ -16359,6 +16840,13 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { this._wpEditorIsActive = true; }; + /** + * @override + */ + Textarea.prototype._tpl = function _tpl () { + return ("\n \n ") + }; + return Textarea; }(Text$1)); @@ -16382,11 +16870,15 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { var Toggle = (function (Checkbox) { function Toggle () { Checkbox.apply(this, arguments); - }if ( Checkbox ) Toggle.__proto__ = Checkbox; + } + + if ( Checkbox ) Toggle.__proto__ = Checkbox; Toggle.prototype = Object.create( Checkbox && Checkbox.prototype ); Toggle.prototype.constructor = Toggle; - + Toggle.prototype._tpl = function _tpl () { + return ("\n\t\t\t" + (this._tplHeader()) + "\n\t\t\t<# var labelFalse = data.attrs ? data.attrs.label_false : ''; labelTrue = data.attrs ? data.attrs.label_true : ''; #>\n\t\t\t\n\t\t"); + }; return Toggle; }(Checkbox$1)); @@ -16409,8 +16901,9 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * @augments wp.customize.Class */ var Base$2 = wpApi.Setting.extend({ + /** - * {@inheritDoc}. Add the initial and lastSave values for reset value actions. + * {@inheritdoc}. Add the initial and lastSave values for reset value actions. * The `factory` value is added in the PHP Setting class constructor. * * @memberof! settings.Base# @@ -16432,8 +16925,9 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { this.vInitial = this(); this.vLastSaved = this.vInitial; }, + /** - * {@inheritDoc}. Sanitize value before sending it to the preview via + * {@inheritcoc}. Sanitize value before sending it to the preview via * `postMessage`. * * @memberof! settings.Base# @@ -16456,6 +16950,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { setting.previewer.refresh(); } }, + /** * Sanitize setting * @@ -16471,6 +16966,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { sanitize: function (value) { return value; }, + /** * Force `set`. * @@ -16485,12 +16981,12 @@ if (typeof module !== 'undefined' && typeof exports === 'object') { * setting could stay the same. Despite this make sense, the input field * gets out of sync, it becomes empty, while the setting value remains the * latest valid value). - * The callback that should be called on reset (the `syncUI` method) + * The callback that should be called on reset (the `componentDidUpdate` method) * in this scenario doesn't get called because in the WordPress * `customize-base.js#187` there is a check that return the function if the * setting has been set with the same value as the last one, preventing so * to fire the callbacks binded to the setting and, with these, also our - * `syncUIfromAPI` that would update the UI, that is our input field with + * `componentDidUpdatefromAPI` that would update the UI, that is our input field with * the resetted value. To overcome this problem we can force the setting to * set anyway by temporarily set the private property `_value` to a dummy * value and then re-setting the setting to the desired value, in this way diff --git a/js/customize.min.js b/js/customize.min.js new file mode 100644 index 0000000..045c492 --- /dev/null +++ b/js/customize.min.js @@ -0,0 +1,85 @@ +/* + * classList.js: Cross-browser full element.classList implementation. + * 1.2.20171210 + * + * By Eli Grey, http://eligrey.com + * License: Dedicated to the public domain. + * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md + */ +var t,e,i,n,r,s,o;"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){"use strict";if("Element"in t){var e="classList",i="prototype",n=t.Element[i],r=Object,s=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[i].indexOf||function(t){for(var e=0,i=this.length;e/gm,">")}function i(t){return t.nodeName.toLowerCase()}function n(t,e){var i=t&&t.exec(e);return i&&0==i.index}function r(t){return/no-?highlight|plain|text/.test(t)}function s(t,e){var i,n={};for(i in t)n[i]=t[i];if(e)for(i in e)n[i]=e[i];return n}function o(t){var e=[];return function t(n,r){for(var s=n.firstChild;s;s=s.nextSibling)3==s.nodeType?r+=s.nodeValue.length:1==s.nodeType&&(e.push({event:"start",offset:r,node:s}),r=t(s,r),i(s).match(/br|hr|img|input/)||e.push({event:"stop",offset:r,node:s}));return r}(t,0),e}function a(t,i,r,o){function u(t,e,i,n){var r='')+e+(i?"":"")}function l(){return void 0!==g.sL?function(){var t="string"==typeof g.sL;if(t&&!p[g.sL])return e(k);var i=t?a(g.sL,k,!0,y[g.sL]):c(k,g.sL.length?g.sL:void 0);return g.r>0&&(w+=i.r),t&&(y[g.sL]=i.top),u(i.language,i.value,!1,!0)}():function(){if(!g.k)return e(k);var t,i,n,r="",s=0;g.lR.lastIndex=0;for(var o=g.lR.exec(k);o;){r+=e(k.substr(s,o.index-s));var a=(t=g,i=o,n=b.cI?i[0].toLowerCase():i[0],t.k.hasOwnProperty(n)&&t.k[n]);a?(w+=a[1],r+=u(a[0],e(o[0]))):r+=e(o[0]),s=g.lR.lastIndex,o=g.lR.exec(k)}return r+e(k.substr(s))}()}function h(t,i){var n=t.cN?u(t.cN,"",!0):"";t.rB?(_+=n,k=""):t.eB?(_+=e(i)+n,k=""):(_+=n,k=i),g=Object.create(t,{parent:{value:g}})}function v(t,i){if(k+=t,void 0===i)return _+=l(),0;var s=function(t,e){for(var i=0;i"),w+=g.r,g=g.parent}while(g!=a.parent);return c.eE&&(_+=e(i)),k="",a.starts&&h(a.starts,""),c.rE?0:i.length}if(o=i,!r&&n(g.iR,o))throw Error('Illegal lexeme "'+i+'" for mode "'+(g.cN||"")+'"');return k+=i,i.length||1}var b=f(t);if(!b)throw Error('Unknown language: "'+t+'"');!function(t){function e(t){return t&&t.source||t}function i(i,n){return RegExp(e(i),"m"+(t.cI?"i":"")+(n?"g":""))}!function n(r,o){if(!r.compiled){if(r.compiled=!0,r.k=r.k||r.bK,r.k){var a={},c=function(e,i){t.cI&&(i=i.toLowerCase()),i.split(" ").forEach(function(t){var i=t.split("|");a[i[0]]=[e,i[1]?+i[1]:1]})};"string"==typeof r.k?c("keyword",r.k):Object.keys(r.k).forEach(function(t){c(t,r.k[t])}),r.k=a}r.lR=i(r.l||/\b\w+\b/,!0),o&&(r.bK&&(r.b="\\b("+r.bK.split(" ").join("|")+")\\b"),r.b||(r.b=/\B|\b/),r.bR=i(r.b),r.e||r.eW||(r.e=/\B|\b/),r.e&&(r.eR=i(r.e)),r.tE=e(r.e)||"",r.eW&&o.tE&&(r.tE+=(r.e?"|":"")+o.tE)),r.i&&(r.iR=i(r.i)),void 0===r.r&&(r.r=1),r.c||(r.c=[]);var u=[];r.c.forEach(function(t){t.v?t.v.forEach(function(e){u.push(s(t,e))}):u.push("self"==t?r:t)}),r.c=u,r.c.forEach(function(t){n(t,r)}),r.starts&&n(r.starts,o);var l=r.c.map(function(t){return t.bK?"\\.?("+t.b+")\\.?":t.b}).concat([r.tE,r.i]).map(e).filter(Boolean);r.t=l.length?i(l.join("|"),!0):{exec:function(){return null}}}}(t)}(b);var m,g=o||b,y={},_="";for(m=g;m!=b;m=m.parent)m.cN&&(_=u(m.cN,"",!0)+_);var k="",w=0;try{for(var x,S,F=0;g.t.lastIndex=F,x=g.t.exec(i);)S=v(i.substr(F,x.index-F),x[0]),F=x.index+S;for(v(i.substr(F)),m=g;m.parent;m=m.parent)m.cN&&(_+="");return{r:w,value:_,language:t,top:g}}catch(t){if(-1!=t.message.indexOf("Illegal"))return{r:0,value:e(i)};throw t}}function c(t,i){i=i||d.languages||Object.keys(p);var n={r:0,value:e(t)},r=n;return i.forEach(function(e){if(f(e)){var i=a(e,t,!1);i.language=e,i.r>r.r&&(r=i),i.r>n.r&&(r=n,n=i)}}),r.language&&(n.second_best=r),n}function u(t){return d.tabReplace&&(t=t.replace(/^((<[^>]+>|\t)+)/gm,function(t,e){return e.replace(/\t/g,d.tabReplace)})),d.useBR&&(t=t.replace(/\n/g,"
    ")),t}function l(t){var n,s,l,h,p,b=function(t){var e,i,n,s=t.className+" ";if(s+=t.parentNode?t.parentNode.className:"",i=/\blang(?:uage)?-([\w-]+)\b/.exec(s))return f(i[1])?i[1]:"no-highlight";for(e=0,n=(s=s.split(/\s+/)).length;n>e;e++)if(f(s[e])||r(s[e]))return s[e]}(t);if(!r(b)){var m;d.useBR?(m=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=t.innerHTML.replace(/\n/g,"").replace(//g,"\n"):m=t;var g=m.textContent,y=b?a(b,g,!0):c(g),_=o(m);if(_.length){var k=document.createElementNS("http://www.w3.org/1999/xhtml","div");k.innerHTML=y.value,y.value=function(t,n,r){function s(){return t.length&&n.length?t[0].offset!=n[0].offset?t[0].offset"}function a(t){l+=""}function c(t){("start"==t.event?o:a)(t.node)}for(var u=0,l="",h=[];t.length||n.length;){var f=s();if(l+=e(r.substr(u,f[0].offset-u)),u=f[0].offset,f==t){h.reverse().forEach(a);do{c(f.splice(0,1)[0]),f=s()}while(f==t&&f.length&&f[0].offset==u);h.reverse().forEach(o)}else"start"==f[0].event?h.push(f[0].node):h.pop(),c(f.splice(0,1)[0])}return l+e(r.substr(u))}(_,o(k),g)}y.value=u(y.value),t.innerHTML=y.value,t.className=(n=t.className,s=b,l=y.language,h=s?v[s]:l,p=[n.trim()],n.match(/\bhljs\b/)||p.push("hljs"),-1===n.indexOf(h)&&p.push(h),p.join(" ").trim()),t.result={language:y.language,re:y.r},y.second_best&&(t.second_best={language:y.second_best.language,re:y.second_best.r})}}function h(){if(!h.called){h.called=!0;var t=document.querySelectorAll("pre code");Array.prototype.forEach.call(t,l)}}function f(t){return p[t]||p[v[t]]}var d={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},p={},v={};return t.highlight=a,t.highlightAuto=c,t.fixMarkup=u,t.highlightBlock=l,t.configure=function(t){d=s(d,t)},t.initHighlighting=h,t.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)},t.registerLanguage=function(e,i){var n=p[e]=i(t);n.aliases&&n.aliases.forEach(function(t){v[t]=e})},t.listLanguages=function(){return Object.keys(p)},t.getLanguage=f,t.inherit=s,t.IR="[a-zA-Z]\\w*",t.UIR="[a-zA-Z_]\\w*",t.NR="\\b\\d+(\\.\\d+)?",t.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",t.BNR="\\b(0b[01]+)",t.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",t.BE={b:"\\\\[\\s\\S]",r:0},t.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[t.BE]},t.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[t.BE]},t.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},t.C=function(e,i,n){var r=t.inherit({cN:"comment",b:e,e:i,c:[]},n||{});return r.c.push(t.PWM),r.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),r},t.CLCM=t.C("//","$"),t.CBCM=t.C("/\\*","\\*/"),t.HCM=t.C("#","$"),t.NM={cN:"number",b:t.NR,r:0},t.CNM={cN:"number",b:t.CNR,r:0},t.BNM={cN:"number",b:t.BNR,r:0},t.CSSNM={cN:"number",b:t.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},t.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[t.BE,{b:/\[/,e:/\]/,r:0,c:[t.BE]}]},t.TM={cN:"title",b:t.IR,r:0},t.UTM={cN:"title",b:t.UIR,r:0},t},"undefined"!=typeof exports?t(exports):(window.hljs=t({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs})),hljs.registerLanguage("javascript",function(t){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"pi",r:10,b:/^\s*['"]use (strict|asm)['"]/},t.ASM,t.QSM,{cN:"string",b:"`",e:"`",c:[t.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},t.CLCM,t.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:t.CNR}],r:0},{b:"("+t.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[t.CLCM,t.CBCM,t.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[t.inherit(t.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[t.CLCM,t.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+t.IR,r:0},{bK:"import",e:"[;$]",k:"import from as",c:[t.ASM,t.QSM]},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},t.UTM]}],i:/#/}}),hljs.registerLanguage("php",function(t){var e={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"preprocessor",b:/<\?(php)?|\?>/},n={cN:"string",c:[t.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},t.inherit(t.ASM,{i:null}),t.inherit(t.QSM,{i:null})]},r={v:[t.BNM,t.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[t.CLCM,t.HCM,t.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},i]}),t.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:t.UIR}),{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[t.BE]},i,e,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[t.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,t.CBCM,n,r]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},t.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[t.UTM]},{bK:"use",e:";",c:[t.UTM]},{b:"=>"},n,r]}}),hljs.registerLanguage("xml",function(t){var e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},i={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},t.C("\x3c!--","--\x3e",{r:10}),{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[i],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[i],starts:{e:"<\/script>",rE:!0,sL:["actionscript","javascript","handlebars"]}},e,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},i]}]}}),hljs.registerLanguage("sql",function(t){var e=t.C("--","$");return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release|0 unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last|0 last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link|0 list|0 listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock|0 locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop|0 low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise|0 rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release|0 release_lock relies_on relocate rely rem remainder repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[t.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[t.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[t.BE]},t.CNM,t.CBCM,e]},t.CBCM,e]}}),hljs.registerLanguage("css",function(t){var e="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"function",b:e+"\\(",rB:!0,eE:!0,e:"\\("},n={cN:"rule",b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{cN:"value",eW:!0,eE:!0,c:[i,t.CSSNM,t.QSM,t.ASM,t.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[t.CBCM,n,{cN:"id",b:/\#[A-Za-z0-9_-]+/},{cN:"class",b:/\.[A-Za-z0-9_-]+/},{cN:"attr_selector",b:/\[/,e:/\]/,i:"$"},{cN:"pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[i,t.ASM,t.QSM,t.CSSNM]}]},{cN:"tag",b:e,r:0},{cN:"rules",b:"{",e:"}",i:/\S/,c:[t.CBCM,n]}]}}),hljs.registerLanguage("json",function(t){var e={literal:"true false null"},i=[t.QSM,t.CNM],n={cN:"value",e:",",eW:!0,eE:!0,c:i,k:e},r={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[t.BE],i:"\\n",starts:n}],i:"\\S"},s={b:"\\[",e:"\\]",c:[t.inherit(n,{cN:null})],i:"\\S"};return i.splice(i.length,0,r,s),{c:i,k:e,i:"\\S"}}),function(){"use strict";var t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:h,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:h,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:h,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};function e(e){this.tokens=[],this.tokens.links={},this.options=e||d.defaults,this.rules=t.normal,this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=a(t.item,"gm")(/bull/g,t.bullet)(),t.list=a(t.list)(/bull/g,t.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+t.def.source+")")(),t.blockquote=a(t.blockquote)("def",t.def)(),t.M="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",t.html=a(t.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,t.M)(),t.paragraph=a(t.paragraph)("hr",t.hr)("heading",t.heading)("lheading",t.lheading)("blockquote",t.blockquote)("tag","<"+t.M)("def",t.def)(),t.normal=f({},t),t.gfm=f({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=a(t.paragraph)("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|")(),t.tables=f({},t.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=t,e.lex=function(t,i){return new e(i).lex(t)},e.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},e.prototype.token=function(e,i,n){var r,s,o,a,c,u,l,h,f;for(e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(i&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),u={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},h=0;h ?/gm,""),this.token(o,i,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),r=!1,f=(o=o[0].match(this.rules.item)).length,h=0;h1&&c.length>1||(e=o.slice(h+1).join("\n")+e,h=f-1)),s=r||/\n\n(?!\s*$)/.test(u),h!==f-1&&(r="\n"===u.charAt(u.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&i&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(i&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),u={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},h=0;h])/,autolink:/^<([^ <>]+(@|:\/)[^ <>]+)>/,url:h,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^<'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:h,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(t,e){return t=t.source,e=e||"",function i(n,r){return n?(r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(n,r),i):RegExp(t,e)}}function c(t,e){return u[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?u[" "+t]=t+"/":u[" "+t]=t.replace(/[^/]*$/,"")),t=u[" "+t],"//"===e.slice(0,2)?t.replace(/:[\s\S]*/,":")+e:"/"===e.charAt(0)?t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+e:t+e}i.I=/(?:\[[^\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,i.T=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,i.link=a(i.link)("inside",i.I)("href",i.T)(),i.reflink=a(i.reflink)("inside",i.I)(),i.normal=f({},i),i.pedantic=f({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),i.gfm=f({},i.normal,{escape:a(i.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:a(i.text)("]|","~]|")("|","|https?://|")()}),i.breaks=f({},i.gfm,{br:a(i.br)("{2,}","*")(),text:a(i.gfm.text)("{2,}","*")()}),n.rules=i,n.output=function(t,e,i){return new n(e,i).output(t)},n.prototype.output=function(t){for(var e,i,n,r,s="";t;)if(r=this.rules.escape.exec(t))t=t.substring(r[0].length),s+=r[1];else if(r=this.rules.autolink.exec(t))t=t.substring(r[0].length),"@"===r[2]?(i=o(":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1])),n=this.mangle("mailto:")+i):n=i=o(r[1]),s+=this.renderer.link(n,null,i);else if(this.inLink||!(r=this.rules.url.exec(t))){if(r=this.rules.tag.exec(t))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),t=t.substring(r[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):o(r[0]):r[0];else if(r=this.rules.link.exec(t))t=t.substring(r[0].length),this.inLink=!0,s+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(t))||(r=this.rules.nolink.exec(t))){if(t=t.substring(r[0].length),e=(r[2]||r[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){s+=r[0].charAt(0),t=r[0].substring(1)+t;continue}this.inLink=!0,s+=this.outputLink(r,e),this.inLink=!1}else if(r=this.rules.strong.exec(t))t=t.substring(r[0].length),s+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(t))t=t.substring(r[0].length),s+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(t))t=t.substring(r[0].length),s+=this.renderer.codespan(o(r[2].trim(),!0));else if(r=this.rules.br.exec(t))t=t.substring(r[0].length),s+=this.renderer.br();else if(r=this.rules.del.exec(t))t=t.substring(r[0].length),s+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(t))t=t.substring(r[0].length),s+=this.renderer.text(o(this.smartypants(r[0])));else if(t)throw Error("Infinite loop on byte: "+t.charCodeAt(0))}else t=t.substring(r[0].length),n=i=o(r[1]),s+=this.renderer.link(n,null,i);return s},n.prototype.outputLink=function(t,e){var i=o(e.href),n=e.title?o(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(i,n,this.output(t[1])):this.renderer.image(i,n,o(t[1]))},n.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},n.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,i="",n=t.length,r=0;r.5&&(e="x"+e.toString(16)),i+="&#"+e+";";return i},r.prototype.code=function(t,e,i){if(this.options.highlight){var n=this.options.highlight(t,e);null!=n&&n!==t&&(i=!0,t=n)}return e?'
    '+(i?t:o(t,!0))+"\n
    \n":"
    "+(i?t:o(t,!0))+"\n
    "},r.prototype.blockquote=function(t){return"
    \n"+t+"
    \n"},r.prototype.html=function(t){return t},r.prototype.heading=function(t,e,i){return"'+t+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(t,e){var i=e?"ol":"ul";return"<"+i+">\n"+t+"\n"},r.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},r.prototype.paragraph=function(t){return"

    "+t+"

    \n"},r.prototype.table=function(t,e){return"\n\n"+t+"\n\n"+e+"\n
    \n"},r.prototype.tablerow=function(t){return"\n"+t+"\n"},r.prototype.tablecell=function(t,e){var i=e.header?"th":"td";return(e.align?"<"+i+' style="text-align:'+e.align+'">':"<"+i+">")+t+"\n"},r.prototype.strong=function(t){return""+t+""},r.prototype.em=function(t){return""+t+""},r.prototype.codespan=function(t){return""+t+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(t){return""+t+""},r.prototype.link=function(t,e,i){if(this.options.sanitize){try{var n=decodeURIComponent((r=t,r.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return i}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return i}var r;this.options.baseUrl&&!l.test(t)&&(t=c(this.options.baseUrl,t));var s='
    "},r.prototype.image=function(t,e,i){this.options.baseUrl&&!l.test(t)&&(t=c(this.options.baseUrl,t));var n=''+i+'":">"},r.prototype.text=function(t){return t},s.parse=function(t,e,i){return new s(e,i).parse(t)},s.prototype.parse=function(t){this.inline=new n(t.links,this.options,this.renderer),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,i,n,r="",s="";for(i="",t=0;tAn error occurred:

    "+o(t.message+"",!0)+"
    ";throw t}}h.exec=h,d.options=d.setOptions=function(t){return f(d.defaults,t),d},d.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new r,xhtml:!1,baseUrl:null},d.Parser=s,d.parser=s.parse,d.Renderer=r,d.Lexer=e,d.lexer=e.lex,d.InlineLexer=n,d.inlineLexer=n.output,d.parse=d,"undefined"!=typeof module&&"object"==typeof exports?module.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):this.marked=d}.call(function(){return this||("undefined"!=typeof window?window:global)}()), +/*! jQuery-ui-Slider-Pips - v1.11.4 - 2016-09-04 +* Copyright (c) 2016 Simon Goellner ; Licensed MIT */ +function(t){"use strict";var e={pips:function(e){var i,n,r,s,o,a=this,c="",u=a._valueMin(),l=(a._valueMax()-u)/a.options.step,h=a.element.find(".ui-slider-handle"),f={first:"label",last:"label",rest:"pip",labels:!1,prefix:"",suffix:"",step:l>100?Math.floor(.05*l):1,formatLabel:function(t){return this.prefix+t+this.suffix}};if("object"===t.type(e)||"undefined"===t.type(e)){t.extend(f,e),a.element.data("pips-options",f),a.options.pipStep=Math.abs(Math.round(f.step))||1,a.element.off(".selectPip").addClass("ui-slider-pips").find(".ui-slider-pip").remove();var d={single:function(e){this.resetClasses(),o.filter(".ui-slider-pip-"+this.classLabel(e)).addClass("ui-slider-pip-selected"),a.options.range&&o.each(function(i,n){var r=t(n).children(".ui-slider-label").data("value");("min"===a.options.range&&re)&&t(n).addClass("ui-slider-pip-inrange")})},range:function(e){for(this.resetClasses(),i=0;ie[0]&&rr[1]?u=c[1]:ev[0]&&sp)&&(d+=" ui-slider-pip-inrange");return''+f.formatLabel(n)+""}},float:function(e){var i,n=this,r=n._valueMin(),s=n._valueMax(),o=n._value(),a=n._values(),c=[],u=n.element.find(".ui-slider-handle"),l={handle:!0,pips:!1,labels:!1,prefix:"",suffix:"",event:"slidechange slide",formatLabel:function(t){return this.prefix+t+this.suffix}};if("object"===t.type(e)||"undefined"===t.type(e)){if(t.extend(l,e),n.element.data("float-options",l),os&&(o=s),a&&a.length)for(i=0;is&&(a[i]=s);if(n.element.addClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove(),l.handle)for(c=n.values()&&n.values().length?h(a):h([o]),i=0;i'+l.formatLabel(c[i])+""));l.pips&&n.element.find(".ui-slider-label").each(function(e,i){var n,r=t(i),s=[r.data("value")];n=l.formatLabel(h(s)[0]),t(''+n+"").insertAfter(r)}),"slide"!==l.event&&"slidechange"!==l.event&&"slide slidechange"!==l.event&&"slidechange slide"!==l.event&&(l.event="slidechange slide"),n.element.off(".sliderFloat").on(l.event+".sliderFloat",function(e,i){var n="array"===t.type(i.value)?i.value:[i.value],r=l.formatLabel(h(n)[0]);t(i.handle).find(".ui-slider-tip").html(r)})}else"destroy"===e?n.element.off(".sliderFloat").removeClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove():"refresh"===e&&n.element.slider("float",n.element.data("float-options"));function h(e){var o=[],a=t.map(e,function(t){return Math.ceil((t-r)/n.options.step)});if("array"===t.type(l.labels))for(i=0;i + */ +e=this,i=function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(!(t=r(((t||"")+"").toLowerCase()))||!t.length)return[];var e,i,n,o,c=[],u=t.split(/ +/);for(e=0,i=u.length;e0)&&n.items.push({score:i,id:r})}):this.iterator(this.items,function(t,e){n.items.push({score:1,id:e})}),(r=this.getSortFunction(n,e))&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:t(e=c((e||"")+""))?1:e>t?-1:0},i=function(t,e){var i,n,r,s;for(i=1,n=arguments.length;i + */ +n=this,r=function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var i,n,r,s=[];if(this.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(i=0,n=t.length;i + */ +s=this,o=function(t,e,i){"use strict";var n=function(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var r=t.data.search(i);if(r>=0&&t.data.length>0){var s=t.data.match(i),o=document.createElement("span");o.className="highlight";var a=t.splitText(r),c=(a.splitText(s[0].length),a.cloneNode(!0));o.appendChild(c),a.parentNode.replaceChild(o,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var u=0;u/g,">").replace(/"/g,""")},f={};f.before=function(t,e,i){var n=t[e];t[e]=function(){return i.apply(t,arguments),n.apply(t,arguments)}},f.after=function(t,e,i){var n=t[e];t[e]=function(){var e=n.apply(t,arguments);return i.apply(t,arguments),e}};var d=function(t,e,i){var n,r=t.trigger,s={};t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return r.apply(t,arguments);s[i]=arguments},i.call(t),t.trigger=r;for(n in s)s.hasOwnProperty(n)&&r.apply(t,s[n])},p=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var i=document.selection.createRange(),n=document.selection.createRange().text.length;i.moveStart("character",-t.value.length),e.start=i.text.length-n,e.length=n}return e},v=function(e){var i=null,n=function(n,r){var s,o,a,c,u,l,h,f;n=n||window.event||{},r=r||{},n.metaKey||n.altKey||(r.force||!1!==e.data("grow"))&&(s=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(a=(o=n.keyCode)>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||32===o,46===o||8===o?(f=p(e[0])).length?s=s.substring(0,f.start)+s.substring(f.start+f.length):8===o&&f.start?s=s.substring(0,f.start-1)+s.substring(f.start+1):46===o&&void 0!==f.start&&(s=s.substring(0,f.start)+s.substring(f.start+1)):a&&(l=n.shiftKey,h=String.fromCharCode(n.keyCode),s+=h=l?h.toUpperCase():h.toLowerCase())),c=e.attr("placeholder"),!s&&c&&(s=c),(u=function(e,i){if(!e)return 0;var n=t("").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(e).appendTo("body");!function(t,e,i){var n,r,s={};if(i)for(n=0,r=i.length;n").addClass(k.wrapperClass).addClass(f).addClass(h),i=t("
    ").addClass(k.inputClass).addClass("items").appendTo(e),n=t('').appendTo(i).attr("tabindex",F.is(":disabled")?"-1":_.tabIndex),l=t(k.dropdownParent||e),r=t("
    ").addClass(k.dropdownClass).addClass(h).hide().appendTo(l),u=t("
    ").addClass(k.dropdownContentClass).appendTo(r),(p=F.attr("id"))&&(n.attr("id",p+"-selectized"),t("label[for='"+p+"']").attr("for",p+"-selectized")),_.settings.copyClassesToDropdown&&r.addClass(f),e.css({width:F[0].style.width}),_.plugins.names.length&&(d="plugin-"+_.plugins.names.join(" plugin-"),e.addClass(d),r.addClass(d)),(null===k.maxItems||k.maxItems>1)&&1===_.tagType&&F.attr("multiple","multiple"),_.settings.placeholder&&n.attr("placeholder",k.placeholder),!_.settings.splitOn&&_.settings.delimiter){var z=_.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");_.settings.splitOn=RegExp("\\s*"+z+"+\\s*")}F.attr("autocorrect")&&n.attr("autocorrect",F.attr("autocorrect")),F.attr("autocapitalize")&&n.attr("autocapitalize",F.attr("autocapitalize")),_.$wrapper=e,_.$control=i,_.$control_input=n,_.$dropdown=r,_.$dropdown_content=u,r.on("mouseenter","[data-selectable]",function(){return _.onOptionHover.apply(_,arguments)}),r.on("mousedown click","[data-selectable]",function(){return _.onOptionSelect.apply(_,arguments)}),m="mousedown",g="*:not(input)",y=function(){return _.onItemSelect.apply(_,arguments)},(b=i).on(m,g,function(t){for(var e=t.target;e&&e.parentNode!==b[0];)e=e.parentNode;return t.currentTarget=e,y.call(this,t)}),v(n),i.on({mousedown:function(){return _.onMouseDown.apply(_,arguments)},click:function(){return _.onClick.apply(_,arguments)}}),n.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return _.onKeyDown.apply(_,arguments)},keyup:function(){return _.onKeyUp.apply(_,arguments)},keypress:function(){return _.onKeyPress.apply(_,arguments)},resize:function(){_.positionDropdown.call(_)},blur:function(){return _.onBlur.apply(_,arguments)},focus:function(){return _.ignoreBlur=!1,_.onFocus.apply(_,arguments)},paste:function(){return _.onPaste.apply(_,arguments)}}),S.on("keydown"+w,function(t){_.isCmdDown=t[s?"metaKey":"ctrlKey"],_.isCtrlDown=t[s?"altKey":"ctrlKey"],_.isShiftDown=t.shiftKey}),S.on("keyup"+w,function(t){t.keyCode===a&&(_.isCtrlDown=!1),16===t.keyCode&&(_.isShiftDown=!1),t.keyCode===o&&(_.isCmdDown=!1)}),S.on("mousedown"+w,function(t){if(_.isFocused){if(t.target===_.$dropdown[0]||t.target.parentNode===_.$dropdown[0])return!1;_.$control.has(t.target).length||t.target===_.$control[0]||_.blur(t.target)}}),x.on(["scroll"+w,"resize"+w].join(" "),function(){_.isOpen&&_.positionDropdown.apply(_,arguments)}),x.on("mousemove"+w,function(){_.ignoreHover=!1}),this.revertSettings={$children:F.children().detach(),tabindex:F.attr("tabindex")},F.attr("tabindex",-1).hide().after(_.$wrapper),t.isArray(k.items)&&(_.setValue(k.items),delete k.items),c&&F.on("invalid"+w,function(t){t.preventDefault(),_.isInvalid=!0,_.refreshState()}),_.updateOriginalInput(),_.refreshItems(),_.refreshState(),_.updatePlaceholder(),_.isSetup=!0,F.is(":disabled")&&_.disable(),_.on("change",this.onChange),F.data("selectize",_),F.addClass("selectized"),_.trigger("initialize"),!0===k.preload&&_.onSearchChange("")},setupTemplates:function(){var e=this.settings.labelField,i=this.settings.optgroupLabelField,n={optgroup:function(t){return'
    '+t.html+"
    "},optgroup_header:function(t,e){return'
    '+e(t[i])+"
    "},option:function(t,i){return'
    '+i(t[e])+"
    "},item:function(t,i){return'
    '+i(t[e])+"
    "},option_create:function(t,e){return'
    Add '+e(t.input)+"
    "}};this.settings.render=t.extend({},n,this.settings.render)},setupCallbacks:function(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)i.hasOwnProperty(t)&&(e=this.settings[i[t]])&&this.on(t,e)},onClick:function(t){this.isFocused||(this.focus(),t.preventDefault())},onMouseDown:function(e){var i=this,n=e.isDefaultPrevented();t(e.target);if(i.isFocused){if(e.target!==i.$control_input[0])return"single"===i.settings.mode?i.isOpen?i.close():i.open():n||i.setActiveItem(null),!1}else n||window.setTimeout(function(){i.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var i=this;i.isFull()||i.isInputHidden||i.isLocked?e.preventDefault():i.settings.splitOn&&setTimeout(function(){var e=i.$control_input.val();if(e.match(i.settings.splitOn))for(var n=t.trim(e).split(i.settings.splitOn),r=0,s=n.length;r(a=Array.prototype.indexOf.call(this.$control[0].childNodes,e[0]))&&(u=o,o=a,a=u),r=o;r<=a;r++)c=this.$control[0].childNodes[r],-1===this.$activeItems.indexOf(c)&&(t(c).addClass("active"),this.$activeItems.push(c));i.preventDefault()}else"mousedown"===n&&this.isCtrlDown||"keydown"===n&&this.isShiftDown?e.hasClass("active")?(s=this.$activeItems.indexOf(e[0]),this.$activeItems.splice(s,1),e.removeClass("active")):this.$activeItems.push(e.addClass("active")[0]):(t(this.$activeItems).removeClass("active"),this.$activeItems=[e.addClass("active")[0]]);this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function(e,i,n){var r,s,o,a,c;this.$activeOption&&this.$activeOption.removeClass("active"),this.$activeOption=null,(e=t(e)).length&&(this.$activeOption=e.addClass("active"),!i&&u(i)||(r=this.$dropdown_content.height(),s=this.$activeOption.outerHeight(!0),i=this.$dropdown_content.scrollTop()||0,a=o=this.$activeOption.offset().top-this.$dropdown_content.offset().top+i,c=o-r+s,o+s>r+i?this.$dropdown_content.stop().animate({scrollTop:c},n?this.settings.scrollDuration:0):o=0;i--)-1!==this.items.indexOf(l(n.items[i].id))&&n.items.splice(i,1);return n},refreshOptions:function(e){var i,r,s,o,a,c,u,h,f,d,p,v,b,m,g,y;void 0===e&&(e=!0);var _,k,w=this,x=t.trim(w.$control_input.val()),S=w.search(x),F=w.$dropdown_content,z=w.$activeOption&&l(w.$activeOption.attr("data-value"));for(o=S.items.length,"number"==typeof w.settings.maxOptions&&(o=Math.min(o,w.settings.maxOptions)),a={},c=[],i=0;i0||b,w.hasOptions?(S.items.length>0?((g=z&&w.getOption(z))&&g.length?m=g:"single"===w.settings.mode&&w.items.length&&(m=w.getOption(w.items[0])),m&&m.length||(m=y&&!w.settings.addPrecedence?w.getAdjacentOption(y,1):F.find("[data-selectable]:first"))):m=y,w.setActiveOption(m),e&&!w.isOpen&&w.open()):(w.setActiveOption(null),e&&w.isOpen&&w.close())},addOption:function(e){var i,n,r;if(t.isArray(e))for(i=0,n=e.length;i=0&&r0),this.$control_input.data("grow",!e&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,i,n,r;if(t=t||{},1===this.tagType){for(n=[],e=0,i=this.items.length;e'+h(r)+"");n.length||this.$input.attr("multiple")||n.push(''),this.$input.html(n.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&(t.silent||this.trigger("change",this.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var t=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.$control_input.blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),t&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:e.top,left:e.left})},clear:function(t){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:t}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function(e){var i=Math.min(this.caretPos,this.items.length);0===i?this.$control.prepend(e):t(this.$control[0].childNodes[i]).before(e),this.setCaret(i+1)},deleteSelection:function(e){var i,n,r,s,o,a,c,u,l;if(r=e&&8===e.keyCode?-1:1,s=p(this.$control_input[0]),this.$activeOption&&!this.settings.hideSelected&&(c=this.getAdjacentOption(this.$activeOption,-1).attr("data-value")),o=[],this.$activeItems.length){for(l=this.$control.children(".active:"+(r>0?"last":"first")),a=this.$control.children(":not(input)").index(l),r>0&&a++,i=0,n=this.$activeItems.length;i0&&s.start===this.$control_input.val().length&&o.push(this.items[this.caretPos]));if(!o.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,o))return!1;for(void 0!==a&&this.setCaret(a);o.length;)this.removeItem(o.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),c&&(u=this.getOption(c)).length&&this.setActiveOption(u),!0},advanceSelection:function(t,e){var i,n,r,s,o;0!==t&&(this.rtl&&(t*=-1),i=t>0?"last":"first",n=p(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(s=this.$control_input.val().length,(t<0?0===n.start&&0===n.length:n.start===s)&&!s&&this.advanceCaret(t,e)):(o=this.$control.children(".active:"+i)).length&&(r=this.$control.children(":not(input)").index(o),this.setActiveItem(null),this.setCaret(t>0?r+1:r)))},advanceCaret:function(t,e){var i,n;0!==t&&(i=t>0?"next":"prev",this.isShiftDown?(n=this.$control_input[i]()).length&&(this.hideInput(),this.setActiveItem(n),e&&e.preventDefault()):this.setCaret(this.caretPos+t))},setCaret:function(e){var i,n,r,s;if(e="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,e)),!this.isPending)for(i=0,n=(r=this.$control.children(":not(input)")).length;i
    '}},e),n.setup=(i=n.setup,function(){i.apply(n,arguments),n.$dropdown_header=t(e.html(e)),n.$dropdown.prepend(n.$dropdown_header)})}),b.define("optgroup_columns",function(e){var i,n=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,i){var n=e.closest("[data-group]").find("[data-selectable]"),r=n.index(e)+i;return r>=0&&r
    ',t=t.firstChild,i.body.appendChild(t),e=r.width=t.offsetWidth-t.clientWidth,i.body.removeChild(t)),e},s=function(){var i,s,o,a,c,u,l;if((s=(l=t("[data-group]",n.$dropdown_content)).length)&&n.$dropdown_content.width()){if(e.equalizeHeight){for(o=0,i=0;i1&&(c=u-a*(s-1),l.eq(s-1).css({width:c})))}};(e.equalizeHeight||e.equalizeWidth)&&(f.after(this,"positionDropdown",s),f.after(this,"refreshOptions",s))}),b.define("remove_button",function(e){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var i,n,r,s,o;"single"!==this.settings.mode?(s=i=this,o=''+n.label+"",i.setup=(r=s.setup,function(){if(n.append){var e=s.settings.render.item;s.settings.render.item=function(t){return n=e.apply(i,arguments),r=o,s=n.search(/(<\/[^>]+>\s*)$/),n.substring(0,s)+r+n.substring(s);var n,r,s}}r.apply(i,arguments),i.$control.on("click","."+n.className,function(e){if(e.preventDefault(),!s.isLocked){var i=t(e.currentTarget).parent();s.setActiveItem(i),s.deleteSelection()&&s.setCaret(s.items.length)}})})):function(e,i){i.className="remove-single";var n,r=e,s=''+i.label+"";e.setup=(n=r.setup,function(){if(i.append){var o=t(r.$input.context).attr("id"),a=(t("#"+o),r.settings.render.item);r.settings.render.item=function(t){return a.apply(e,arguments)+s}}n.apply(e,arguments),e.$control.on("click","."+i.className,function(t){t.preventDefault(),r.isLocked||r.clear()})})}(this,e)}),b.define("restore_on_backspace",function(t){var e,i=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(e=i.onKeyDown,function(i){var n,r;return 8===i.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(n=this.caretPos-1)>=0&&n
    ";return"
    "+t+"
    "}();function c(e,i,n,r){for(var o=[],a=0;a')}else{o.push(t("
    ").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
    "+o.join("")+"
    "}function u(u,l){var v,b,m,g,y,_,k,w=(y=l,_=u,(k=t.extend({},i,y)).callbacks={move:f(k.move,_),change:f(k.change,_),show:f(k.show,_),hide:f(k.hide,_),beforeShow:f(k.beforeShow,_)},k),x=w.flat,S=w.showSelectionPalette,F=w.localStorageKey,z=w.theme,O=w.callbacks,A=(v=Zt,b=10,function(){var t=this,e=arguments;m&&clearTimeout(g),!m&&g||(g=setTimeout(function(){g=null,v.apply(t,e)},b))}),N=!1,j=!1,$=0,E=0,C=0,M=0,q=0,I=0,T=0,R=0,P=0,D=0,L=1,U=[],H=[],B={},W=w.selectionPalette.slice(0),Z=w.maxSelectionSize,G="sp-dragging",K=null,V=u.ownerDocument,X=(V.body,t(u)),J=!1,Q=t(a,V).addClass(z),Y=Q.find(".sp-picker-container"),tt=Q.find(".sp-color"),et=Q.find(".sp-dragger"),it=Q.find(".sp-hue"),nt=Q.find(".sp-slider"),rt=Q.find(".sp-alpha-inner"),st=Q.find(".sp-alpha"),ot=Q.find(".sp-alpha-handle"),at=Q.find(".sp-input"),ct=Q.find(".sp-palette"),ut=Q.find(".sp-initial"),lt=Q.find(".sp-cancel"),ht=Q.find(".sp-clear"),ft=Q.find(".sp-choose"),dt=Q.find(".sp-palette-toggle"),pt=X.is("input"),vt=pt&&"color"===X.attr("type")&&p(),bt=pt&&!x,mt=bt?t(o).addClass(z).addClass(w.className).addClass(w.replacerClassName):t([]),gt=bt?mt:X,yt=mt.find(".sp-preview-inner"),_t=w.color||pt&&X.val(),kt=!1,wt=w.preferredFormat,xt=!w.showButtons||w.clickoutFiresChange,St=!_t,Ft=w.allowEmpty&&!vt;function zt(){if(w.showPaletteOnly&&(w.showPalette=!0),dt.text(w.showPaletteOnly?w.togglePaletteMoreText:w.togglePaletteLessText),w.palette){U=w.palette.slice(0),H=t.isArray(U[0])?U:[U],B={};for(var e=0;e1&&(delete window.localStorage[F],t.each(e,function(t,e){At(e)}))}catch(t){}try{W=window.localStorage[F].split(";")}catch(t){}}}function At(e){if(S){var i=tinycolor(e).toRgbString();if(!B[i]&&-1===t.inArray(i,W))for(W.push(i);W.length>Z;)W.shift();if(F&&window.localStorage)try{window.localStorage[F]=W.join(";")}catch(t){}}}function Nt(){var e=Lt(),i=t.map(H,function(t,i){return c(t,e,"sp-palette-row sp-palette-row-"+i,w)});Ot(),W&&i.push(c(function(){var t=[];if(w.showPalette)for(var e=0;ec&&c>n?Math.abs(l.left+n-c):0),l.top-=Math.min(l.top,l.top+r>u&&u>r?Math.abs(r+s-0):0),l))),Bt(),w.showPalette&&Nt(),X.trigger("reflow.spectrum"))}function Gt(){Rt(),J=!0,X.attr("disabled",!0),gt.addClass("sp-disabled")}!function(){if(r&&Q.find("*:not(input)").attr("unselectable","on"),zt(),bt&&X.after(mt).hide(),Ft||ht.hide(),x)X.after(Q).hide();else{var e="parent"===w.appendTo?X.parent():t(w.appendTo);1!==e.length&&(e=t("body")),e.append(Q)}function i(e){return e.data&&e.data.ignore?(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ut()):(Dt(t(e.target).closest(".sp-thumb-el").data("color")),Ut(),Wt(!0),w.hideAfterPaletteSelect&&Rt()),!1}Ot(),gt.bind("click.spectrum touchstart.spectrum",function(e){J||Mt(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(X.is(":disabled")||!0===w.disabled)&&Gt(),Q.click(h),at.change(Ct),at.bind("paste",function(){setTimeout(Ct,1)}),at.keydown(function(t){13==t.keyCode&&Ct()}),lt.text(w.cancelText),lt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Pt(),Rt()}),ht.attr("title",w.clearText),ht.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),St=!0,Ut(),x&&Wt(!0)}),ft.text(w.chooseText),ft.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),r&&at.is(":focus")&&at.trigger("change"),at.hasClass("sp-validation-error")||(Wt(!0),Rt())}),dt.text(w.showPaletteOnly?w.togglePaletteMoreText:w.togglePaletteLessText),dt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),w.showPaletteOnly=!w.showPaletteOnly,w.showPaletteOnly||x||Q.css("left","-="+(Y.outerWidth(!0)+5)),zt()}),d(st,function(t,e,i){L=t/q,St=!1,i.shiftKey&&(L=Math.round(10*L)/10),Ut()},$t,Et),d(it,function(t,e){R=parseFloat(e/M),St=!1,w.showAlpha||(L=1),Ut()},$t,Et),d(tt,function(t,e,i){if(i.shiftKey){if(!K){var n=E-D*E,r=Math.abs(t-P*$)>Math.abs(e-n);K=r?"x":"y"}}else K=null;var s=!K||"y"===K;(!K||"x"===K)&&(P=parseFloat(t/$)),s&&(D=parseFloat((E-e)/E)),St=!1,w.showAlpha||(L=1),Ut()},$t,Et),_t?(Dt(_t),Ht(),wt=w.preferredFormat||tinycolor(_t).format,At(_t)):Ht(),x&&qt();var n=r?"mousedown.spectrum":"click.spectrum touchstart.spectrum";ct.delegate(".sp-thumb-el",n,i),ut.delegate(".sp-thumb-el:nth-child(1)",n,{ignore:!0},i)}();var Kt={show:qt,hide:Rt,toggle:Mt,reflow:Zt,option:function(i,n){return i===e?t.extend({},w):n===e?w[i]:(w[i]=n,"preferredFormat"===i&&(wt=w.preferredFormat),void zt())},enable:function(){J=!1,X.attr("disabled",!1),gt.removeClass("sp-disabled")},disable:Gt,offset:function(t){w.offset=t,Zt()},set:function(t){Dt(t),Wt()},get:Lt,destroy:function(){X.show(),gt.unbind("click.spectrum touchstart.spectrum"),Q.remove(),mt.remove(),n[Kt.id]=null},container:Q};return Kt.id=n.push(Kt)-1,Kt}function l(){}function h(t){t.stopPropagation()}function f(t,e){var i=Array.prototype.slice,n=i.call(arguments,2);return function(){return t.apply(e,n.concat(i.call(arguments)))}}function d(e,i,n,s){i=i||function(){},n=n||function(){},s=s||function(){};var o=document,a=!1,c={},u=0,l=0,h="ontouchstart"in window,f={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function p(t){if(a){if(r&&o.documentMode<9&&!t.button)return v();var n=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],s=n&&n.pageX||t.pageX,f=n&&n.pageY||t.pageY,p=Math.max(0,Math.min(s-c.left,l)),b=Math.max(0,Math.min(f-c.top,u));h&&d(t),i.call(e,p,b,t)}}function v(){a&&(t(o).unbind(f),t(o.body).removeClass("sp-dragging"),setTimeout(function(){s.apply(e,arguments)},0)),a=!1}f.selectstart=d,f.dragstart=d,f["touchmove mousemove"]=p,f["touchend mouseup"]=v,t(e).bind("touchstart mousedown",function(i){(i.which?3==i.which:2==i.button)||a||!1!==n.apply(e,arguments)&&(a=!0,u=t(e).height(),l=t(e).width(),c=t(e).offset(),t(o).bind(f),t(o.body).addClass("sp-dragging"),p(i),d(i))})}function p(){return t.fn.spectrum.inputTypeColorSupport()}var v="spectrum.id";t.fn.spectrum=function(e,i){if("string"==typeof e){var r=this,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=n[t(this).data(v)];if(i){var o=i[e];if(!o)throw Error("Spectrum: no such method: '"+e+"'");"get"==e?r=i.get():"container"==e?r=i.container:"option"==e?r=i.option.apply(i,s):"destroy"==e?(i.destroy(),t(this).removeData(v)):o.apply(i,s)}}),r}return this.spectrum("destroy").each(function(){var i=u(this,t.extend({},e,t(this).data()));t(this).data(v,i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=d,t.fn.spectrum.defaults=i,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e.B){var i=t("")[0];e.B="color"===i.type&&""!==i.value}return e.B},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!p()&&e.spectrum({preferredFormat:"hex6"})}, +// Brian Grinstead, MIT License +function(){var t=/^[\s,#]+/,e=/\s+$/,i=0,n=Math,r=n.round,s=n.min,o=n.max,a=n.random,c=function(a,u){if(a=a||"",u=u||{},a instanceof c)return a;if(!(this instanceof c))return new c(a,u);var l=function(i){var r={r:0,g:0,b:0},a=1,c=!1,u=!1;"string"==typeof i&&(i=function(i){i=i.replace(t,"").replace(e,"").toLowerCase();var n,r=!1;if(z[i])i=z[i],r=!0;else if("transparent"==i)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(i))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(i))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(i))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(i))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(i))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(i))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(i))return{a:(s=n[1],$(s)/255),r:$(n[2]),g:$(n[3]),b:$(n[4]),format:r?"name":"hex8"};var s;if(n=T.hex6.exec(i))return{r:$(n[1]),g:$(n[2]),b:$(n[3]),format:r?"name":"hex"};if(n=T.hex3.exec(i))return{r:$(n[1]+""+n[1]),g:$(n[2]+""+n[2]),b:$(n[3]+""+n[3]),format:r?"name":"hex"};return!1}(i));"object"==typeof i&&(i.hasOwnProperty("r")&&i.hasOwnProperty("g")&&i.hasOwnProperty("b")?(l=i.r,h=i.g,f=i.b,r={r:255*N(l,255),g:255*N(h,255),b:255*N(f,255)},c=!0,u="%"===(i.r+"").substr(-1)?"prgb":"rgb"):i.hasOwnProperty("h")&&i.hasOwnProperty("s")&&i.hasOwnProperty("v")?(i.s=C(i.s),i.v=C(i.v),r=function(t,e,i){t=6*N(t,360),e=N(e,100),i=N(i,100);var r=n.floor(t),s=t-r,o=i*(1-e),a=i*(1-s*e),c=i*(1-(1-s)*e),u=r%6;return{r:255*[i,a,o,o,c,i][u],g:255*[c,i,i,a,o,o][u],b:255*[o,o,c,i,i,a][u]}}(i.h,i.s,i.v),c=!0,u="hsv"):i.hasOwnProperty("h")&&i.hasOwnProperty("s")&&i.hasOwnProperty("l")&&(i.s=C(i.s),i.l=C(i.l),r=function(t,e,i){var n,r,s;function o(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(t=N(t,360),e=N(e,100),i=N(i,100),0===e)n=r=s=i;else{var a=i<.5?i*(1+e):i+e-i*e,c=2*i-a;n=o(c,a,t+1/3),r=o(c,a,t),s=o(c,a,t-1/3)}return{r:255*n,g:255*r,b:255*s}}(i.h,i.s,i.l),c=!0,u="hsl"),i.hasOwnProperty("a")&&(a=i.a));var l,h,f;return a=A(a),{ok:c,format:i.format||u,r:s(255,o(r.r,0)),g:s(255,o(r.g,0)),b:s(255,o(r.b,0)),a:a}}(a);this.W=a,this.Z=l.r,this.G=l.g,this.K=l.b,this.V=l.a,this.X=r(100*this.V)/100,this._format=u.format||l.format,this.J=u.gradientType,this.Z<1&&(this.Z=r(this.Z)),this.G<1&&(this.G=r(this.G)),this.K<1&&(this.K=r(this.K)),this.Q=l.ok,this.Y=i++};function u(t,e,i){t=N(t,255),e=N(e,255),i=N(i,255);var n,r,a=o(t,e,i),c=s(t,e,i),u=(a+c)/2;if(a==c)n=r=0;else{var l=a-c;switch(r=u>.5?l/(2-a-c):l/(a+c),a){case t:n=(e-i)/l+(e>1)+720)%360;--e;)n.h=(n.h+r)%360,s.push(c(n));return s}function F(t,e){e=e||6;for(var i=c(t).toHsv(),n=i.h,r=i.s,s=i.v,o=[],a=1/e;e--;)o.push(c({h:n,s:r,v:s})),s=(s+a)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this.Q},getOriginalInput:function(){return this.W},getFormat:function(){return this._format},getAlpha:function(){return this.V},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this.V=A(t),this.X=r(100*this.V)/100,this},toHsv:function(){var t=l(this.Z,this.G,this.K);return{h:360*t.h,s:t.s,v:t.v,a:this.V}},toHsvString:function(){var t=l(this.Z,this.G,this.K),e=r(360*t.h),i=r(100*t.s),n=r(100*t.v);return 1==this.V?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this.X+")"},toHsl:function(){var t=u(this.Z,this.G,this.K);return{h:360*t.h,s:t.s,l:t.l,a:this.V}},toHslString:function(){var t=u(this.Z,this.G,this.K),e=r(360*t.h),i=r(100*t.s),n=r(100*t.l);return 1==this.V?"hsl("+e+", "+i+"%, "+n+"%)":"hsla("+e+", "+i+"%, "+n+"%, "+this.X+")"},toHex:function(t){return h(this.Z,this.G,this.K,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return f(this.Z,this.G,this.K,this.V)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:r(this.Z),g:r(this.G),b:r(this.K),a:this.V}},toRgbString:function(){return 1==this.V?"rgb("+r(this.Z)+", "+r(this.G)+", "+r(this.K)+")":"rgba("+r(this.Z)+", "+r(this.G)+", "+r(this.K)+", "+this.X+")"},toPercentageRgb:function(){return{r:r(100*N(this.Z,255))+"%",g:r(100*N(this.G,255))+"%",b:r(100*N(this.K,255))+"%",a:this.V}},toPercentageRgbString:function(){return 1==this.V?"rgb("+r(100*N(this.Z,255))+"%, "+r(100*N(this.G,255))+"%, "+r(100*N(this.K,255))+"%)":"rgba("+r(100*N(this.Z,255))+"%, "+r(100*N(this.G,255))+"%, "+r(100*N(this.K,255))+"%, "+this.X+")"},toName:function(){return 0===this.V?"transparent":!(this.V<1)&&(O[h(this.Z,this.G,this.K,!0)]||!1)},toFilter:function(t){var e="#"+f(this.Z,this.G,this.K,this.V),i=e,n=this.J?"GradientType = 1, ":"";t&&(i=c(t).toHex8String());return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},toString:function(t){var e=!!t;t=t||this._format;var i=!1,n=this.V<1&&this.V>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this.V?this.toName():this.toRgbString()},tt:function(t,e){var i=t.apply(null,[this].concat([].slice.call(e)));return this.Z=i.Z,this.G=i.G,this.K=i.K,this.setAlpha(i.V),this},lighten:function(){return this.tt(b,arguments)},brighten:function(){return this.tt(m,arguments)},darken:function(){return this.tt(g,arguments)},desaturate:function(){return this.tt(d,arguments)},saturate:function(){return this.tt(p,arguments)},greyscale:function(){return this.tt(v,arguments)},spin:function(){return this.tt(y,arguments)},et:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this.et(S,arguments)},complement:function(){return this.et(_,arguments)},monochromatic:function(){return this.et(F,arguments)},splitcomplement:function(){return this.et(x,arguments)},triad:function(){return this.et(k,arguments)},tetrad:function(){return this.et(w,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]="a"===n?t[n]:C(t[n]));t=i}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:a(),g:a(),b:a()})},c.mix=function(t,e,i){i=0===i?0:i||50;var n,r=c(t).toRgb(),s=c(e).toRgb(),o=i/100,a=2*o-1,u=s.a-r.a,l=1-(n=((n=a*u==-1?a:(a+u)/(1+a*u))+1)/2),h={r:s.r*n+r.r*l,g:s.g*n+r.g*l,b:s.b*n+r.b*l,a:s.a*o+r.a*(1-o)};return c(h)},c.readability=function(t,e){var i=c(t),n=c(e),r=i.toRgb(),s=n.toRgb(),o=i.getBrightness(),a=n.getBrightness(),u=Math.max(r.r,s.r)-Math.min(r.r,s.r)+Math.max(r.g,s.g)-Math.min(r.g,s.g)+Math.max(r.b,s.b)-Math.min(r.b,s.b);return{brightness:Math.abs(o-a),color:u}},c.isReadable=function(t,e){var i=c.readability(t,e);return i.brightness>125&&i.color>500},c.mostReadable=function(t,e){for(var i=null,n=0,r=!1,s=0;s125&&o.color>500,u=o.brightness/125*3+o.color/500;(a&&!r||a&&r&&u>n||!a&&!r&&u>n)&&(r=a,n=u,i=c(e[s]))}return i};var z=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=c.hexNames=function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(z);function A(t){return(isNaN(t=parseFloat(t))||t<0||t>1)&&(t=1),t}function N(t,e){var i;"string"==typeof(i=t)&&-1!=i.indexOf(".")&&1===parseFloat(i)&&(t="100%");var r,a="string"==typeof(r=t)&&-1!=r.indexOf("%");return t=s(e,o(0,parseFloat(t))),a&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function j(t){return s(1,o(0,t))}function $(t){return parseInt(t,16)}function E(t){return 1==t.length?"0"+t:""+t}function C(t){return t<=1&&(t=100*t+"%"),t}var M,q,I,T=(I="[\\s|\\(]+("+(M="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+M+")[,|\\s]+("+M+")[,|\\s]+("+M+")\\s*\\)?",{rgb:RegExp("rgb"+(q="[\\s|\\(]+("+M+")[,|\\s]+("+M+")[,|\\s]+("+M+")\\s*\\)?")),rgba:RegExp("rgba"+I),hsl:RegExp("hsl"+q),hsla:RegExp("hsla"+I),hsv:RegExp("hsv"+q),hsva:RegExp("hsva"+I),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=c}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}), +/*! + * Customize Plus v1.1.1 (https://knitkode.com/products/customize-plus) + * Enhance and extend the WordPress Customize in your themes. + * Copyright (c) 2014-2018 KnitKode (https://knitkode.com/) + * @license SEE LICENSE IN license.txt (Last change on: 24-1-2018) + */function(t,e,i,n,r,s,o,a,c){"use strict";s.core=s.core||{},s.components=s.components||{},s.settings=s.settings||{},s.controls=s.controls||{},s.sections=s.sections||{},s.panels=s.panels||{},s.l10n=s.l10n||{},s.constants=s.constants||{};var u=s,l=r.customize,h=(i(t),i(e)),f=e.getElementsByTagName("body")[0],d=i.Deferred(),p=i.Deferred();i.when(p,d);l.bind("ready",function(){d.resolve()});var v;if(v=function(){p.resolve()},"loading"!==e.readyState?v():e.addEventListener("DOMContentLoaded",v),!r)throw Error("Missing crucial object `wp`");if(!s)throw Error("Missing crucial object `kkcp`");i.fx.speeds._default=180,function(){if(o&&a){var t=new o.Renderer;t.link=function(t,e,i){var n='"+i+""},o.setOptions({renderer:t,highlight:function(t){return a.highlightAuto(t).value}}),f.classList.add("kkcp-markdown-supported")}}();var b=u.constants.CP_URL,m=b+"images/",g=u.constants.IMAGES_BASE_URL,y=u.constants.DOCS_BASE_URL;function k(t){return/^(?:[a-z]+:)?\/\//i.it.test(t)}function w(t){return t.replace(/[a-z-A-Z-0-9_]{1}(\/\/+)/g,"/")}function x(t,e){var i=t;if(!k(t))switch(e){case"img":i=g+t;break;case"docs":i=y+t}return w(i)}var S=RegExp(u.constants.OPTIONS_PREFIX+"\\[.*\\]");function F(t){try{t.nt(!0),u.components.Search.disable()}catch(t){}t.focus(),t.container.addClass("kkcp-control-focused"),setTimeout(function(){t.container.removeClass("kkcp-control-focused")},2e3)}var z=n.memoize(function(t){var e;return function(i){return(e=e||n.template(t,O))(i)}}),O={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},A=u.core.Utils={rt:b,st:m,ot:g,ct:y,ut:k,lt:w,ht:x,ft:function(t){var e=l.control;for(var i in l.settings.controls)t(e(i))},dt:function(t){return!S.test(t)},pt:function(t){return S.test(t)},vt:function(t){var i=e.styleSheets;try{for(var n=0,r=i.length;n=0;c--)n[c].classList.remove(t.Mt);this.className+=" "+t.Mt;for(var l=r.length-1;l>=0;l--){var h=r[l],f=i("input, .ui-slider-handle",h);h.getAttribute(o)===a?(h.classList.add(t.Mt),f.attr("tabIndex","0")):(h.classList.remove(t.Mt),f.attr("tabIndex","-1"))}if(s)try{u.components.Screenpreview.setDevice(a)}catch(t){}})},E.prototype.Tt=function(t,e){var n=this;i(".kkcp-screen-picker",e).each(function(){var e=i(this),r=e.find(n.qt),s=e.find(n.It),o=function(){return this.getAttribute("data-screen")===t},a=r.filter(o),c=s.filter(o);r.removeClass(n.Mt),s.removeClass(n.Mt),a.addClass(n.Mt),c.addClass(n.Mt)})},E.prototype.changeSize=function(t){this.Tt(t,e)},E.prototype.syncSize=function(t){try{this.Tt(u.components.Screenpreview.getSize(),t)}catch(t){}},u.core.tabs=new E;var C=function(){this.Rt=".kkcpui-tooltip",this.Pt=[{Dt:"top",Lt:h,Ut:{my:"center bottom-2",at:"center top-5"}},{Dt:"bottom",Lt:i(f),Ut:{my:"center top+2",at:"center bottom+5"}}],this.Ht={show:!1,hide:!1},p.then(this.jt.bind(this))};C.prototype.jt=function(){for(var t=this.Pt.length-1;t>=0;t--){var e=this.Pt[t],i=n.defaults({items:this.Rt+"--"+e.Dt,classes:{"ui-tooltip":e.Dt},tooltipClass:e.Dt,position:e.Ut},this.Ht);i.position.collision="flipfit",e.Lt.tooltip(i)}},u.core.tooltips=new C;var M=function(){var t=arguments,e=0,i=function(t,e,i,n){i||(i=" ");var r=t.length>=e?"":Array(1+e-t.length>>>0).join(i);return n?t+r:r+t},n=function(t,e,n,r,s,o){var a=r-t.length;return a>0&&(t=n||!s?i(t,r,o,n):""+t.slice(0,e.length)+i("",a,"0",!0)+t.slice(e.length)),t},r=function(t,e,r,s,o,a,c){var u=t>>>0;return t=(r=r&&u&&{2:"0b",8:"0",16:"0x"}[e]||"")+i(u.toString(e),a||0,"0",!1),n(t,r,s,o,c)},s=function(t,e,i,r,s,o){return null!==r&&void 0!==r&&(t=t.slice(0,r)),n(t,"",e,i,s,o)};return t[e++].replace(/%%|%(\d+\$)?([-+'#0 ]*)(\*\d+\$|\*|\d+)?(?:\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,function(o,a,c,u,l,h){var f,d,p,v,b;if("%%"===o)return"%";var m,g=!1,y="",_=!1,k=!1,w=" ",x=c.length;for(m=0;m-1?6:"d"===h?0:void 0,b=a?t[a.slice(0,-1)]:t[e++],h){case"s":return s(b+"",g,u,l,_,w);case"c":return s(String.fromCharCode(+b),g,u,l,_);case"b":return r(b,2,k,g,u,l,_);case"o":return r(b,8,k,g,u,l,_);case"x":return r(b,16,k,g,u,l,_);case"X":return r(b,16,k,g,u,l,_).toUpperCase();case"u":return r(b,10,k,g,u,l,_);case"i":case"d":return b=(d=(f=Math.round((f=+b||0)-f%1))<0?"-":y)+i(Math.abs(f)+"",l,"0",!1),n(b,d,g,u,_);case"e":case"E":case"f":case"F":case"g":case"G":return d=(f=+b)<0?"-":y,p=["toExponential","toFixed","toPrecision"]["efg".indexOf(h.toLowerCase())],v=["toString","toUpperCase"]["eEfFgG".indexOf(h)%2],b=d+Math.abs(f)[p](l),n(b,d,g,u,_)[v]();default:return o}})},q=function(t){return t===+t&&isFinite(t)&&!(t%1)},I=function(t){return!(+t!==t||isFinite(t)&&!(t%1))},T=function(t){return("number"==typeof t||"string"==typeof t&&-1===" \n\r\t\f\v            ​\u2028\u2029 ".indexOf(t.slice(-1)))&&""!==t&&!isNaN(t)},R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P=function(t){var e,i,n=[void 0,null,!1,0,"","0"];for(i=0,6;i<6;i++)if(t===n[i])return!0;if("object"===(void 0===t?"undefined":R(t))){for(e in t)if(t.hasOwnProperty(e))return!1;return!0}return!1};function D(t){return t&&t.Bt&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function L(t,e){return t(e={exports:{}},e.exports),e.exports}var U=L(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String))throw new TypeError("This library (validator.js) validates strings only")},t.exports=e.default});D(U);var H=L(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];for(var i in e)void 0===t[i]&&(t[i]=e[i]);return t},t.exports=e.default});D(H);var B=L(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,i.default)(t),(e=(0,n.default)(e,s)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var r=t.split(".");if(e.require_tld){var o=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var a,c=0;c1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(e);i+="";{if(!i)return t(e,4)||t(e,6);if("4"===i){if(!r.test(e))return!1;var o=e.split(".").sort(function(t,e){return t-e});return o[3]<=255}if("6"===i){var a=e.split(":"),c=!1,u=t(a[a.length-1],4),l=u?7:8;if(a.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(a.shift(),a.shift(),c=!0):"::"===e.substr(e.length-2)&&(a.pop(),a.pop(),c=!0);for(var h=0;h0&&h=1:a.length===l}}return!1};var i,n=(i=U)&&i.Bt?i:{default:i};var r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;t.exports=e.default});D(W);var Z=D(L(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,i.default)(t),!t||t.length>=2083||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;e=(0,s.default)(e,a);var o=void 0,l=void 0,h=void 0,f=void 0,d=void 0,p=void 0,v=void 0,b=void 0;if(v=t.split("#"),t=v.shift(),v=t.split("?"),t=v.shift(),(v=t.split("://")).length>1){if(o=v.shift(),e.require_valid_protocol&&-1===e.protocols.indexOf(o))return!1}else{if(e.require_protocol)return!1;e.allow_protocol_relative_urls&&"//"===t.substr(0,2)&&(v[0]=t.substr(2))}if(""===(t=v.join("://")))return!1;if(v=t.split("/"),""===(t=v.shift())&&!e.require_host)return!0;if((v=t.split("@")).length>1&&(l=v.shift()).indexOf(":")>=0&&l.split(":").length>2)return!1;f=v.join("@"),p=null,b=null;var m=f.match(c);m?(h="",b=m[1],p=m[2]||null):(v=f.split(":"),h=v.shift(),v.length&&(p=v.join(":")));if(null!==p&&(d=parseInt(p,10),!/^[0-9]+$/.test(p)||d<=0||d>65535))return!1;if(!((0,r.default)(h)||(0,n.default)(h,e)||b&&(0,r.default)(b,6)))return!1;if(h=h||b,e.host_whitelist&&!u(h,e.host_whitelist))return!1;if(e.host_blacklist&&u(h,e.host_blacklist))return!1;return!0};var i=o(U),n=o(B),r=o(W),s=o(H);function o(t){return t&&t.Bt?t:{default:t}}var a={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function u(t,e){for(var i=0;i=n&&(void 0===s||o<=s)};var n,r=(n=U)&&n.Bt?n:{default:n};t.exports=e.default});D(G);var K=D(L(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,i.default)(t),(e=(0,n.default)(e,a)).require_display_name||e.allow_display_name){var o=t.match(c);if(o)t=o[1];else if(e.require_display_name)return!1}var d=t.split("@"),p=d.pop(),v=d.join("@"),b=p.toLowerCase();"gmail.com"!==b&&"googlemail.com"!==b||(v=v.replace(/\./g,"").toLowerCase());if(!(0,r.default)(v,{max:64})||!(0,r.default)(p,{max:254}))return!1;if(!(0,s.default)(p,{require_tld:e.require_tld}))return!1;if('"'===v[0])return v=v.slice(1,v.length-1),e.allow_utf8_local_part?f.test(v):l.test(v);for(var m=e.allow_utf8_local_part?h:u,g=v.split("."),y=0;y$/i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,l=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;t.exports=e.default}));function V(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function X(t){return/^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/.test(t)||/^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(t)}function J(t){return/^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)||/^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(t)}function Q(t,e){return void 0===e&&(e=!0),e?tinycolor.toRgbString(t):tinycolor.toRgb(t)}function Y(t){return"'"+(t=t.replace(/'/g,"").replace(/"/g,"")).trim()+"'"}function tt(t){return"boolean"==typeof t?t:!!parseInt(t,10)}var et={isEmpty:function(t){if(null===t||void 0===t||""===t)return!0;try{t=JSON.parse(t)}catch(t){}return!(!_.isArray(t)&&!_.isObject(t)||!_.isEmpty(t))},isHex:V,isRgb:X,isRgba:J,isColor:function(t,e){for(var i=0;in?i:n;return parseInt(t.toFixed(r).replace(".",""))%parseInt(e.toFixed(r).replace(".",""))/Math.pow(10,r)},numberToBoolean:tt,stripHTML:function(t){return $(document.createElement("div")).html(t).text()},hasHTML:function(t){return/<[a-z][\s\S]*>/i.test(t)}};function it(t,e,i,r){var s=r.Wt,o=s&&s.length?s:r.params.choices;return n.isArray(o)&&-1===o.indexOf(e)&&(t=r.Zt(t,"vNotAChoice",e)),t}function nt(t,e,i,r,s){void 0===s&&(s=!1);var o=r.Wt,a=r.params,c=o&&o.length?o:a.choices;if(n.isArray(e)){s&&c.length!==e.length&&(t=r.Zt(t,"vNotExactLengthArray",c.length)),q(a.min)&&e.lengtha.max&&(t=r.Zt(t,"vNotMaxLengthArray",a.max));for(var u=0;ur.max&&(t=n.Zt(t,"vNumberHigh",r.max))),t):t=n.Zt(t,"vNotAnumber")}function st(t,e,i,n){var r=n.params;return P(r.units)||e?!P(r.units)&&e&&-1===r.units.indexOf(e)?t=n.Zt(t,"vSliderUnitNotAllowed",e):P(r.units)&&e&&(t=n.Zt(t,"vSliderNoUnit")):t=n.Zt(t,"vSliderMissingUnit"),t}var ot=u.core.Validate={required:function(t,e,i,n){return n.params.optional||et.isEmpty(e)&&(t=n.Zt(t,"vRequired")),t},singleChoice:it,multipleChoices:nt,oneOrMoreChoices:function(t,e,i,r){return n.isString(e)?it(t,e,0,r):nt(t,e,0,r)},sortable:function(t,e,i,n){return nt(t,e,0,n,!0)},fontFamily:function(t,e,i,r){return n.isString(e)&&(e=e.split(",")),n.isArray(e)&&(e=n.map(e,function(t){return et.normalizeFontFamily(t)})),nt(t,e,0,r)},checkbox:function(t,e,i,n){return 1!=e&&0!=e&&(t=n.Zt(t,"vCheckbox")),t},tags:function(t,e,i,r){var s=r.params;return n.isString(e)||(t=r.Zt(t,"vTagsType")),n.isArray(e)||(e=e.split(",")),q(s.min)&&e.lengths.max&&(t=r.Zt(t,"vTagsMax",s.max)),t},text:function(t,e,i,r){var s=r.params.attrs||{},o=s.type||"text";return n.isString(e)||(t=r.Zt(t,"vTextType")),"url"!==o||Z(e,{require_tld:!1,allow_trailing_dot:!0})?"email"!==o||K(e)||(t=r.Zt(t,"vInvalidEmail")):t=r.Zt(t,"vInvalidUrl"),q(s.maxlength)&&e.length>s.maxlength&&(t=r.Zt(t,"vTextTooLong",s.maxlength)),q(s.minlength)&&e.length\n\t\t\t\t<# if (marked) { #>{{{ marked(data.message || data.code) }}}<# } else { #>
    {{{ data.message || data.code }}}
    <# } #>\n\t\t\t\t<# if ( data.dismissible ) { #>\n\t\t\t\t\t\n\t\t\t\t<# } #>\n\t\t\t\n\t\t"},e}(l.Notification),ct=u.core.Notification=at,ut=function(t){function r(t,e){this.initialize(t,e),this.componentInit(),this.Vt()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.initialize=function(t,r){var s,o,a=this,c=[];a.params=n.extend({},a.defaults,a.params||{},r.params||r||{}),l.Control.instanceCounter||(l.Control.instanceCounter=0),l.Control.instanceCounter++,a.params.instanceNumber||(a.params.instanceNumber=l.Control.instanceCounter),a.params.type||n.find(l.controlConstructor,function(t,e){return t===a.constructor&&(a.params.type=e,!0)});var h=e.createElement("li");h.id="customize-control-"+t.replace(/\]/g,"").replace(/\[/g,"-"),h.className="customize-control kkcp-control customize-control-"+a.params.type,a.kkcp=1,a.id=t,a.container=i(h),a.Lt=h,a.deferred=n.extend(a.deferred||{},{embedded:new i.Deferred}),a.section=new l.Value,a.priority=new l.Value,a.active=new l.Value,a.activeArgumentsQueue=[],a.notifications=new l.Notifications({alt:a.altNotice}),a.elements=[],a.active.bind(function(t){var e=a.activeArgumentsQueue.shift();e=i.extend({},a.defaultActiveArguments,e),a.onChangeActive(t,e)}),a.section.set(a.params.section),a.priority.set(isNaN(a.params.priority)?10:a.params.priority),a.active.set(a.params.active),l.utils.bubbleChildValueChanges(a,["section","priority","active"]),a.settings={},s={},a.params.setting&&(s.default=a.params.setting),n.extend(s,a.params.settings),n.each(s,function(t,e){var i;n.isObject(t)&&n.isFunction(t.extended)&&t.extended(l.Value)?a.settings[e]=t:n.isString(t)&&((i=l(t))?a.settings[e]=i:c.push(t))}),o=function(){n.each(s,function(t,e){!a.settings[e]&&n.isString(t)&&(a.settings[e]=l(t))}),a.settings[0]&&!a.settings.default&&(a.settings.default=a.settings[0]),a.setting=a.settings.default||null,u.constants.DYNAMIC_CONTROLS_RENDERING||a.embed()},0===c.length?o():l.apply(l,c.concat(o))},r.prototype.componentInit=function(){},r.prototype.Vt=function(){var t=this;this.ready=this.componentDidMount,this.deferred.embedded.done(function(){t.setupNotifications(),u.constants.DYNAMIC_CONTROLS_RENDERING||t.nt()}),u.constants.DYNAMIC_CONTROLS_RENDERING&&l.section(this.section()).expanded.bind(function(e){e?n.defer(t.nt.bind(t)):t.Xt()}),this.setting&&(this.params.noLiveValidation||(this.setting.validate=this.Jt.bind(this)),this.params.noLiveSanitization||this.params.loose||(this.setting.sanitize=function(e){return t.sanitize(e,t.setting,t)}),this.setting.bind(function(e){var i=t.section();(!i||l.section.has(i)&&l.section(i).expanded())&&t.rendered&&t.shouldComponentUpdate(e)&&t.componentDidUpdate(e)}),u.constants.DYNAMIC_CONTROLS_RENDERING&&(this.setting.notifications.bind("add",function(e){t.notifications.add(new ct(e.code,{message:e.message})),t.notifications.render()}),this.setting.notifications.bind("removed",function(e){t.notifications.remove(e.code),t.notifications.render()})))},r.prototype.Qt=function(t){return u.l10n[t]||""},r.prototype.Jt=function(t){var e=[];return e=ot.required(e,t,this.setting,this),n.keys(e).length||(e=this.validate(e,t,this.setting,this)),this.Yt(e),e.length?this.params.loose?t:this.setting():t},r.prototype.Yt=function(t){var e=this.setting.notifications.get(),i=n.pluck(t,"code"),r=[];this.te=!!t.length;for(var s=0;s\n
    \n <# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #>\n
    \n <# } if (data.description) { #>\n
    \n <# if (marked) { #>{{{ marked(data.description) }}}\n <# } else { #>{{{ data.description }}}<# } #>\n
    \n <# } #>\n '},r.prototype.se=function(){return'
    '},r.prototype.ne=function(){return'\n
    \n \n
      \n
    • '+u.l10n.resetLastSaved+'
    • \n
    • '+u.l10n.resetInitial+'
    • \n
    • '+u.l10n.resetFactory+"
    • \n
    \n
    \n "},r.prototype.renderContent=function(){var t=this.Lt,e=(this.templateSelector,A.template(this.template()));if(e&&t){if((!1).performances)performance.now();this.params.content=t.innerHTML=e(this.params)}this.ae()},r.prototype.destroy=function(){this.Xt(!0),this.Lt.parentNode.removeChild(this.Lt)},r.prototype.shouldComponentUpdate=function(t){return!0},r.prototype.componentDidUpdate=function(t){},r.prototype.componentDidMount=function(){},r.prototype.componentWillUnmount=function(){},r.prototype.Xt=function(t){var e=this,i=this.Lt;this.params.content||(this.params.content=i.innerHTML.trim()),this.rendered&&this.componentWillUnmount(),n.defer(function(){if(t||!l.section(e.section.get()).expanded.get()){if((!1).performances)performance.now();i.innerHTML="",e.rendered=!1}})},r.prototype.nt=function(t){if((!1).performances)performance.now();this.params.content?this.rendered||(this.Lt.innerHTML=this.params.content,this.ae()):this.renderContent(),this.rendered=!0,this.componentDidMount(),t&&this.deferred.embedded.resolve(),this.ce()},r.prototype.ae=function(){this.notifications.container=this.getNotificationsContainerElement();var t=this.section();(!t||l.section.has(t)&&l.section(t).expanded())&&this.notifications.render()},r.prototype.softenize=function(t){return t},r.prototype.ce=function(){var t=this,e="kkcp-extras-open",i="kkcp-extras-reset_last",r="kkcp-extras-reset_initial",s="kkcp-extras-reset_factory",o="kkcp-disabled",a=this.Lt,c=a.getElementsByClassName("kkcp-extras")[0],u=a.getElementsByClassName("kkcp-extras-btn")[0],l=a.getElementsByClassName(i)[0],h=a.getElementsByClassName(r)[0],f=a.getElementsByClassName(s)[0],d=this.setting,p=!1,v=function(){a.classList.remove(e)},b=function(){d.forceSet(d.vLastSaved),v()},m=function(){d.forceSet(d.vInitial),v()},g=function(){d.forceSet(d.vFactory),v()},y=function(){h.className=r,h.onclick=m},_=function(){f.className=s,f.onclick=g},k=function(){if(t.te)return y(),void _();var e=t.softenize(d());n.isEqual(e,t.softenize(d.vLastSaved))?(l.className=i+" "+o,l.onclick=""):(l.className=i,l.onclick=b),n.isEqual(e,t.softenize(d.vInitial))?(h.className=r+" "+o,h.onclick=""):y(),n.isEqual(e,t.softenize(d.vFactory))?(f.className=s+" "+o,f.onclick=""):_()};u&&(u.onclick=function(){p=!p,a.classList.toggle(e,p),p&&k()}),c&&(c.onmouseenter=function(){p=!0,a.classList.add(e),k()},c.onmouseleave=function(){p=!1,setTimeout(function(){p||a.classList.remove(e)},200)})},r}(l.Control);l.bind("ready",function(){try{var e=t.ue.autofocus.control;e&&A.linkControl(null,e)}catch(t){}}),l.bind("save",function(){A.ft(function(t){t&&t.setting&&t.setting._dirty&&(t.setting.vLastSaved=t.setting())})});var lt=u.controls.Base=ut,ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentInit=function(){this.Wt=this.le(this.params.choices)},e.prototype.le=function(t){if(n.isArray(t))return t;if(!n.isUndefined(t)){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}return[]},e.prototype.Kt=function(){return"\n <# var choices = data.choices, idx = 0;\n if (!_.isEmpty(choices)) { #>\n "+this.oe()+"\n "+this.he()+"\n "+this.fe()+"\n "+this.de()+"\n <# } #>\n "},e.prototype.fe=function(){return"<# for (var val in choices) { #>"+this.pe()+"<#} #>"},e.prototype.pe=function(){return"\n <# if (choices.hasOwnProperty(val)) {\n var label;\n var choice = choices[val];\n var classes = '';\n var attributes = '';\n var tooltip = '';\n var id = data.id + idx++;\n if (!_.isUndefined(choice.label)) {\n label = choice.label;\n if (choice.popover) {\n classes += 'kkcpui-popover ';\n if (choice.popover.title) attributes += ' data-title=\"' + choice.popover.title + '\"';\n if (choice.popover.img) attributes += ' data-img=\"' + choice.popover.img + '\"';\n if (choice.popover.text) attributes += ' data-text=\"' + choice.popover.text + '\"';\n if (choice.popover.video) attributes += ' data-video=\"' + choice.popover.video + '\"';\n }\n if (choice.tooltip) {\n classes += 'kkcpui-tooltip--top ';\n attributes += ' title=\"' + choice.tooltip + '\"';\n tooltip = choice.tooltip;\n }\n } else {\n label = choice;\n }\n if (!tooltip) {\n tooltip = label;\n }\n #>\n "+this.ve()+"\n <# } #>\n "},e.prototype.ve=function(){return""},e.prototype.he=function(){return""},e.prototype.de=function(){return""},e}(lt),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldComponentUpdate=function(t){return this.be.value!==t},e.prototype.componentDidUpdate=function(t){this.be.value=t},e.prototype.componentDidMount=function(){var t=this;t.be=t.Lt.getElementsByTagName("input")[0],i(t.be).val(t.setting()).on("change keyup paste",function(){t.setting.set(this.value)})},e.prototype.Kt=function(){return"\n \n "},e.prototype.me=function(){return this.ge()},e.prototype.ge=function(){return'\n {{ key }}="{{ attrs[key] }}" <# } } #>\n >\n '},e}(lt),dt=function(t,e,i){var n,r,s,o;if(s=(t*=n=Math.pow(10,e|=0))%1==.5*(o=t>0|-(t<0)),r=Math.floor(t),s)switch(i){case"PHP_ROUND_HALF_DOWN":t=r+(o<0);break;case"PHP_ROUND_HALF_EVEN":t=r+r%2*o;break;case"PHP_ROUND_HALF_ODD":t=r+!(r%2);break;default:t=r+(o>0)}return(s?t:Math.round(t))/n};function pt(t){return n.isString(t)?t:JSON.stringify(t)}function vt(t,e,i){var r=i.Wt,s=r&&r.length?r:i.params.choices;return n.isArray(s)&&-1!==s.indexOf(t)?et.stripHTML(t):null}function bt(t,e,i,r){void 0===r&&(r=!1);var s=i.Wt,o=i.params,a=s&&s.length?s:o.choices;n.isArray(t)||(t=[t]);for(var c=[],u=0;uo.max&&(t=t.slice(0,o.max)),t}function mt(t,e,i){var r=i.params.attrs||{};return t=et.extractNumber(t,r.float),T(t)?(I(t)&&!r.float&&(t=dt(t)),n.isNumber(r.step)&&0!==et.modulus(t,r.step)&&(t=dt(t/r.step)*r.step),n.isNumber(r.min)&&tr.max?r.max:t):null}function gt(t,e){return(e=e||[]).length?e.length&&!t?e[0]:e.length&&t&&-1===e.indexOf(t)?e[0]:e.length&&t&&-1!==e.indexOf(t)?t:"":""}var yt={singleChoice:vt,multipleChoices:bt,oneOrMoreChoices:function(t,e,i){return n.isString(t)?vt(t,0,i):n.isArray(t)?bt(t,0,i):null},sortable:function(t,e,i){return bt(t,0,i,!0)},fontFamily:function(t,e,i){return t=et.normalizeFontFamilies(t),n.isString(t)&&(t=t.split(",")),t=bt(t,0,i),n.isArray(t)?t.join(","):null},checkbox:function(t,e,i){return t?"1":"0"},tags:function(t,e,i){var r=i.params;return n.isString(t)&&(t=t.split(",")),n.isArray(t)||(t=[pt(t)]),t=n.map(t,function(t){return t.trim()}),q(r.max)&&t.length>r.max&&(t=t.slice(0,r.max)),et.stripHTML(t.join(","))},text:function(t,e,i){var r=i.params.attrs||{},s=r.type||"text";return t=pt(t),"url"===s?t=t.trim():"email"===s&&(t=t.trim()),q(r.maxlength)&&t.length>r.maxlength&&(t=t.substr(0,r.maxlength)),q(r.minlength)&&t.length\n\t\t\t\n\t\t'},e.prototype.he=function(){return'\n\t\t\t
    \n\t\t'},e.prototype.de=function(){return"\n\t\t\t\n\t\t\t
    \n\t\t"},e}(_t);l.controlConstructor.kkcp_buttonset=u.controls.Buttonset=wt;var xt=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.checkbox,this.sanitize=yt.checkbox}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.softenize=function(t){return 0===t||1===t?""+t:t},e.prototype.shouldComponentUpdate=function(t){var e=tt(this.be.checked);return this.softenize(e)!==this.softenize(t)},e.prototype.componentDidUpdate=function(t){this.be.checked=tt(t)},e.prototype.componentDidMount=function(){var t=this;this.be=this.Lt.getElementsByTagName("input")[0],this.be.checked=tt(this.setting()),this.be.onchange=function(e){e.preventDefault();var i=e.target.checked?1:0;t.setting.set(i)}},e.prototype.Kt=function(){return"\n "+this.oe()+'\n \n '},e}(lt),St=l.controlConstructor.kkcp_checkbox=u.controls.Checkbox=xt,Ft=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.color,this.sanitize=yt.color}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.softenize=function(t){var e=tinycolor(t);return e._format?e.toRgbString():t},e.prototype.shouldComponentUpdate=function(t){return this.softenize(this.qe())!==this.softenize(t)},e.prototype.componentDidUpdate=function(t){this._e(t)},e.prototype.componentWillUnmount=function(){this.Ie&&this.Ie.spectrum("destroy")},e.prototype.componentDidMount=function(){var t=this,e=this.Lt,n=e.getElementsByClassName("kkcpui-toggle")[0];this.Te=e.getElementsByClassName("kkcpcolor-current-overlay")[0],this.Ie=i(e.getElementsByClassName("kkcpcolor-input")[0]),this.Re=i(e.getElementsByClassName("kkcp-expander")[0]).hide(),this._e(this.setting());var r=!1,s=!1,o=function(){s||(t.Ie.spectrum(t.Pe()),s=!0)};n.onmouseover=o,n.onclick=function(){return r=!r,o(),r?t.Re.slideDown():t.Re.slideUp(),!1}},e.prototype.Pe=function(t){var e=this,i=this.params,r=this.container;return n.extend({preferredFormat:"hex",flat:!0,showInput:!0,showInitial:!1,showButtons:!1,showSelectionPalette:!1,togglePaletteMoreText:u.l10n.togglePaletteMoreText,togglePaletteLessText:u.l10n.togglePaletteLessText,allowEmpty:!!i.transparent,showAlpha:!!i.alpha,showPalette:!!i.palette,showPaletteOnly:!(!i.palette||"hidden"!==i.picker&&i.picker),togglePaletteOnly:!!i.palette&&("hidden"===i.picker||i.picker),palette:i.palette,color:this.setting(),show:function(){r.find(".sp-input").focus()},move:function(t){var i=t?""+t:"transparent";e.setting.set(i)},change:function(t){var i=t?""+t:"transparent";e.setting.set(i),t||r.find(".sp-input").val("transparent")}},t||{})},e.prototype.qe=function(){return this.Te.style.background},e.prototype._e=function(t){this.Te.style.background=t,this.Ie&&this.Ie.spectrum&&this.Ie.spectrum("set",t)},e.prototype.Kt=function(){return"\n "+this.oe()+'\n \n \n \n
    \n \n
    \n '},e}(lt);l.controlConstructor.kkcp_color=u.controls.Color=Ft;var zt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.template=function(){return'\n <# if (data.alert) { #>
    <# } #>\n <# if (data.label) { #><# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #><# } #>\n <# if (data.description) { #> class="description customize-control-description"<# } #>><# if (marked) { #>{{{ marked(data.description) }}}<# } else { #>{{{ data.description }}}<# } #><# } #>\n <# if (marked && data.markdown) { #>
    {{{ marked(data.markdown) }}}
    <# } #>\n <# if (data.alert) { #>
    <# } #>\n '},e}(lt);l.controlConstructor.kkcp_content=u.controls.Content=zt;var Ot=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.fontFamily,this.sanitize=yt.fontFamily}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentInit=function(){t.prototype.componentInit.call(this),this.Se=n.map(this.Se,function(t){return t.value=et.normalizeFontFamily(t.value),t}),this.Wt=n.map(this.Wt,function(t){return et.normalizeFontFamily(t)})},e.prototype.softenize=function(t){return n.isArray(t)&&(t=t.join(",")),t},e.prototype.shouldComponentUpdate=function(t){return!n.isEqual(this.softenize(t),this.be.selectize.getValue())},e.prototype.componentDidUpdate=function(t){this._e(t)},e.prototype.componentDidMount=function(){this.be=this.Lt.getElementsByClassName("kkcp-select")[0],this._e(this.setting())},e.prototype._e=function(t){this.be.selectize&&this.be.selectize.destroy(),this.be.value=t,i(this.be).selectize(this.je())},e.prototype.$e=function(){return{hideSelected:!0,delimiter:","}},e.prototype.Ee=function(t){var e=t.value.replace(/'/g,"").replace(/"/g,"");return'
    '+n.escape(e)+"
    "},e.prototype.Ce=function(t){var e=t.value.replace(/'/g,"").replace(/"/g,"");return'
    '+n.escape(e)+"
    "},e.prototype.Me=function(t){return'
    '+n.escape(t.label)+"
    "},e.prototype.Kt=function(){return"\n \n \n '},e}(kt);l.controlConstructor.kkcp_font_family=u.controls.FontFamily=Ot;var At=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.Ee=function(t){return'
    \n \n
    '},e.prototype.Ce=function(t){return'
    \n \n
    '},e.prototype.Me=function(t){return'
    '+n.escape(t.label)+"
    "},e.prototype.De=function(t){return t.set+" "+t.set+"-"+t.value},e.prototype.Kt=function(){return"\n \n \n "},e}(kt);l.controlConstructor.kkcp_icon=u.controls.Icon=At;var Nt=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.sortable,this.sanitize=yt.sortable}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldComponentUpdate=function(t){return!n.isEqual(t,this.ye())},e.prototype.componentDidUpdate=function(t){this._e(t)},e.prototype.componentDidMount=function(){var t=this;this.Le(),this.container.sortable({items:".kkcp-sortable",cursor:"move",update:function(){var e=t.ye();t.setting.set(e)}})},e.prototype.Le=function(){var t=this.Lt.getElementsByClassName("kkcp-sortable");this.Ue={};for(var e=0,i=t.length;e\n "+this.pe()+"\n <# } } #>\n "},e.prototype.ve=function(){return'
    {{ label }}
    '},e}(ht),jt=l.controlConstructor.kkcp_sortable=u.controls.Sortable=Nt,$t=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.multipleChoices,this.sanitize=yt.multipleChoices}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldComponentUpdate=function(t){return!n.isEqual(t,this.ye())},e.prototype.componentDidUpdate=function(t){this.Be(t),this.params.sortable&&this.We(t)},e.prototype.componentDidMount=function(){var t=this;this.ke=this.Lt.getElementsByTagName("input"),this.params.sortable&&(this.container.sortable({items:"> label",cursor:"move",update:function(){t.setting.set(t.ye())}}),this.Le()),this.Be(this.setting(),!0)},e.prototype.Le=function(){var t=this.Lt.getElementsByTagName("label");this.Ue={};for(var e=0,i=t.length;e\n "+t+"\n <# }\n for (var val in choices) {\n if (data.choicesOrdered.indexOf(val) === -1) { #>\n "+t+"\n <# }\n }\n }\n } else {\n for (var val in choices) { #>\n "+t+"\n <# }\n } #>\n "},e.prototype.ve=function(){return'\n \n '},e}(ht);l.controlConstructor.kkcp_multicheck=u.controls.Multicheck=$t;var Et=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.number,this.sanitize=yt.number}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldComponentUpdate=function(t){return this.be.value!==""+t},e}(ft);l.controlConstructor.kkcp_number=u.controls.Number=Et;var Ct=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.text,this.sanitize=yt.text}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ft),Mt=l.controlConstructor.kkcp_text=u.controls.Text=Ct,qt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentDidUpdate=function(t){this.be.value=t,this.Ge&&(this.Ge.value=t)},e.prototype.componentDidMount=function(){var t=this,e=this.setting,i=(this.params||{}).attrs;t.be=t.Lt.getElementsByTagName("input")[0],i.visibility&&(t.Ge=t.Lt.getElementsByTagName("input")[1],t.container.find(".kkcp-password__toggle").click(function(e){e&&e.preventDefault(),t.Ke=!t.Ke,t.Ve(t.Ke)}),$(t.Ge).val(e()).on("change keyup paste",function(){e.set(this.value),t.be.value=this.value})),$(t.be).val(e()).on("change keyup paste",function(){e.set(this.value),t.Ge&&(t.Ge.value=this.value)})},e.prototype.Ve=function(t){t?(this.container.addClass("kkcp-password-visible"),this.Ge.focus()):(this.container.removeClass("kkcp-password-visible"),this.be.focus())},e.prototype.me=function(){var t=this.ge();return'\n \n <# if (data.attrs && data.attrs.visibility) { #>\n '+t+'\n {{ key }}="{{ attrs[key] }}" <# } } #>>\n \n <# } else { #>\n '+t+"\n <# } #>\n \n "},e}(Mt);l.controlConstructor.kkcp_password=u.controls.Password=qt;var It=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ve=function(){return'\n\t\t\t\n\t\t'},e}(_t);l.controlConstructor.kkcp_radio=u.controls.Radio=It;var Tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ve=function(){return'\n\t\t\t\n\t\t\t\n\t\t'},e}(_t);l.controlConstructor.kkcp_radio_image=u.controls.RadioImage=Tt;var Rt=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.oneOrMoreChoices,this.sanitize=yt.oneOrMoreChoices}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentWillUnmount=function(){this.Xe.selectize&&this.Xe.selectize.destroy()},e.prototype.shouldComponentUpdate=function(t){return this.ye()!=t},e.prototype.componentDidUpdate=function(t){this._e(t)},e.prototype.componentDidMount=function(){var t=this.params.attrs||{},e=this.setting;if(this.Xe=this.Lt.getElementsByTagName("select")[0],t.native)this.Je=this.Lt.getElementsByTagName("option"),this.Xe.onchange=function(){e.set(this.value)};else{var n={plugins:[],maxItems:this.params.max,onChange:function(t){e.set(t)}};t.hide_selected&&(n.hideSelected=!0),t.sort&&(n.sortField="text"),t.removable&&n.plugins.push("remove_button"),t.draggable&&n.plugins.push("drag_drop"),t.restore_on_backspace&&n.plugins.push("restore_on_backspace"),i(this.Xe).selectize(n)}this._e(this.setting())},e.prototype.ye=function(){return this.Xe?this.Xe.selectize?this.Xe.selectize.getValue():this.Xe.value:null},e.prototype._e=function(t){if(this.Xe.selectize)this.Xe.selectize.setValue(t,!0);else for(var e=this.Je.length;e--;){var i=this.Je[e];i.selected=t==i.value}},e.prototype.ve=function(){return'\n \n '},e.prototype.he=function(){return'"},e}(ht),Pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(l.controlConstructor.kkcp_select=u.controls.Select=Rt);l.controlConstructor.kkcp_font_weight=u.controls.FontWeight=Pt;var Dt=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.slider,this.sanitize=yt.slider}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.softenize=function(t){return""+t},e.prototype.shouldComponentUpdate=function(t){return!n.isEqual(this.softenize(t),this.ye())},e.prototype.componentDidUpdate=function(t){this.Qe(t,"API")},e.prototype.componentDidMount=function(){this.Ye(),this.ti(),this._e(this.setting())},e.prototype.Ye=function(){var t=this.Lt;this.ei=t.getElementsByClassName("kkcp-slider-number")[0],this.ii=i(t.getElementsByClassName("kkcp-unit")),this.ni=i(t.getElementsByClassName("kkcp-slider")[0])},e.prototype.ti=function(){var t=this,e=t.params,i=t.ei,r=t.ni,s=function(){var e=this.value;r.slider("value",e),t.Qe({ri:e})};if(e.units&&e.units.length>1){var o=t.ii;o.on("click",function(){o.removeClass("kkcp-current"),this.className+=" kkcp-current",t.Qe({si:this.value})})}i.onchange=s,i.onkeyup=s;var a=e.attrs||{};r.slider(n.extend(a,{value:et.extractNumber(this.setting()),slide:function(e,n){i.value=n.value,t.Qe({ri:n.value})},change:function(e,i){e.originalEvent&&t.Qe({ri:i.value})}}))},e.prototype.ye=function(t){var e;return e=t&&t.ri?""+t.ri:this.ei.value,this.params.units&&(t&&t.si?e+=t.si:e+=this.ii.filter(".kkcp-current").val()),e},e.prototype._e=function(t){var e=this.params,i=et.extractNumber(t),n=et.extractSizeUnit(t);this.ei.value=i,this.ni.slider("value",i),e.units&&this.ii.removeClass("kkcp-current").filter(function(){return this.value===n}).addClass("kkcp-current")},e.prototype.Qe=function(t,e){"API"===e?this._e(t):this.setting.set(this.ye(t))},e.prototype.oi=function(){return'\n <# if (data.units) { #>\n
    \n {{ key }}="{{ data.attrs[key] }}" <# } } #>>\n
    <# for (var i = 0, l = data.units.length; i < l; i++) { #><# } #>
    \n
    \n <# } else { #>\n {{ key }}="{{ data.attrs[key] }}" <# } } #>>\n <# } #>\n
    \n
    \n
    \n '},e.prototype.Kt=function(){return""+this.oe()+this.oi()},e}(lt);l.controlConstructor.kkcp_slider=u.controls.Slider=Dt;var Lt=function(t){function e(e,i){t.call(this,e,i),this.validate=ot.tags,this.sanitize=yt.tags}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentInit=function(){var t=this,e=this.params.attrs||{},i={plugins:[],persist:!1,create:function(t){return{value:t,text:t}},onChange:function(e){t.setting.set(e)}};e.persist&&(i.persist=!0),e.removable&&i.plugins.push("remove_button"),e.draggable&&i.plugins.push("drag_drop"),e.restore_on_backspace&&i.plugins.push("restore_on_backspace"),this.ai=i},e.prototype.componentWillUnmount=function(){this.be.selectize.destroy()},e.prototype.shouldComponentUpdate=function(t){return this.be.selectize.getValue()!==t},e.prototype.componentDidUpdate=function(t){this._e(t)},e.prototype.componentDidMount=function(){this.be=this.Lt.getElementsByTagName("input")[0],this._e(this.setting())},e.prototype._e=function(t){this.be.selectize&&this.be.selectize.destroy(),this.be.value=t,i(this.be).selectize(this.ai)},e.prototype.Kt=function(){return"\n \n '},e}(lt);l.controlConstructor.kkcp_tags=u.controls.Tags=Lt;var Ut=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.componentInit=function(){this.params.wp_editor&&(this.ci=this.li())},r.prototype.componentWillUnmount=function(){if(this.params.wp_editor)try{this.hi&&t.wp.editor.remove(this.ci)}catch(t){}},r.prototype.shouldComponentUpdate=function(t){return t!==this.ye()},r.prototype.componentDidUpdate=function(t){this._e(t)},r.prototype.componentDidMount=function(){if(this.fi=this.Lt.getElementsByTagName("textarea")[0],this.params.wp_editor&&!this.hi)this.di();else{var t=this;this._e(t.setting()),i(t.fi).on("change keyup paste",function(){t.setting.set(this.value)})}},r.prototype.ye=function(){return this.params.wp_editor?(wpEditorInstance=t.tinyMCE.get(this.ci),wpEditorInstance.getContent()):this.fi.value},r.prototype._e=function(e){this.params.wp_editor?t.tinyMCE.get(this.ci).setContent(e):this.fi.value=e},r.prototype.li=function(){return this.id.replace(/-/g,"_")+"__textarea"},r.prototype.di=function(){this.fi.id=this.ci;var e=this.setting,r=n.isObject(this.params.wp_editor)?this.params.wp_editor:{},s=i.extend(!0,{},t.wp.editor.getDefaultSettings(),{teeny:!0,mediaButtons:!1}),o=i.extend(!0,s,r,{tinymce:{target:this.fi,setup:function(t){t.on("init",function(){t.setContent(e())}),t.on("change keyup",function(){e.set(t.getContent())})}}});t.wp.editor.initialize(this.ci,o),this.hi=!0},r.prototype.Kt=function(){return"\n \n '},r}(Mt);l.controlConstructor.kkcp_textarea=u.controls.Textarea=Ut;var Ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.Kt=function(){return"\n\t\t\t"+this.oe()+'\n\t\t\t<# var labelFalse = data.attrs ? data.attrs.label_false : \'\'; labelTrue = data.attrs ? data.attrs.label_true : \'\'; #>\n\t\t\t\n\t\t'},e}(St);l.controlConstructor.kkcp_toggle=u.controls.Toggle=Ht;var Bt=l.Setting.extend({initialize:function(t,e,i){l.Setting.prototype.initialize.call(this,t,e,i);var n=l.settings.settings[t];n&&(this.vFactory=n.default),this.vInitial=this(),this.vLastSaved=this.vInitial},preview:function(){var t;"postMessage"!==(t=this.transport)||l.state("previewerAlive").get()||(t="refresh"),"postMessage"===t?this.previewer.send("setting",[this.id,this.sanitize(this())]):"refresh"===t&&this.previewer.refresh()},sanitize:function(t){return t},forceSet:function(t,e){this._value=e||"dummy",this.set(t)}});l.settingConstructor.kkcp_base=u.settings.Base=Bt}(window,document,jQuery,_,wp,kkcp,marked,hljs,Modernizr); \ No newline at end of file diff --git a/js/index.php b/js/index.php new file mode 100644 index 0000000..e71af0e --- /dev/null +++ b/js/index.php @@ -0,0 +1 @@ +Oops! Plugin not activated…

    %s is not fully compatible with your PHP version (%s).
    Reccomended PHP version – %s (or higher).

    ← Return to the plugins screen" msgstr "" -#: includes/class-requirements.php:110 +#: php/class-requirements.php:110 msgid "

    Oops! Plugin not activated…

    %s is not fully compatible with your version of WordPress (%s).
    Reccomended WordPress version – %s (or higher).

    ← Return to the plugins screen Continue and activate anyway →" msgstr "" -#: includes/class-sanitizejs.php:78 +#: php/class-sanitizejs.php:78 msgid "Customize Plus | API error: a sanitizer function must be specified for %s" msgstr "" -#: includes/class-sanitizejs.php:165 +#: php/class-sanitizejs.php:165 msgid "Customize Plus | API error: value %s must be a number." msgstr "" -#: includes/class-sanitizejs.php:188 +#: php/class-sanitizejs.php:188 msgid "Customize Plus | API error: value %s must be a integer." msgstr "" -#: includes/class-sanitizejs.php:223, includes/class-sanitizejs.php:230 +#: php/class-sanitizejs.php:223, php/class-sanitizejs.php:230 msgid "Customize Plus | API error: value %1$s must be one of %2$s." msgstr "" -#: includes/class-sanitizejs.php:256 +#: php/class-sanitizejs.php:256 msgid "Customize Plus | API error: value %s must be an array." msgstr "" -#: includes/class-sanitizejs.php:274 +#: php/class-sanitizejs.php:274 msgid "Customize Plus | API error: value %s must be a boolean." msgstr "" -#: includes/class-sanitizejs.php:292 +#: php/class-sanitizejs.php:292 msgid "Customize Plus | API error: value %s must be a string." msgstr "" -#: includes/class-sanitizejs.php:311 +#: php/class-sanitizejs.php:311 msgid "Customize Plus | API error: value must be one of: %s" msgstr "" #. translators: %1$s is 'Plugin_Name: ', %2$s is the subject (code) -#: includes/class-theme.php:194 +#: php/class-theme.php:194 msgid "%1$s no %2$s given." msgstr "" #. translators: %1$s is 'Plugin_Name: ', %2$s is the subject (code) -#: includes/class-theme.php:202, includes/class-theme.php:232 +#: php/class-theme.php:202, php/class-theme.php:232 msgid "%1$s %2$s must be an array." msgstr "" #. translators: %1$s is 'Plugin_Name: ', %2$s is the object (code) -#: includes/class-theme.php:206 +#: php/class-theme.php:206 msgid "%1$s no %2$s array given." msgstr "" #. translators: %1$s is 'Plugin_Name: ', %2$s and %3$s pieces of code -#: includes/class-theme.php:305 +#: php/class-theme.php:305 msgid "%1$s %2$s root components need a %3$s value." msgstr "" #. translators: %1$s is 'Plugin_Name: ', %2$s is the type of value (code) -#: includes/class-theme.php:347 +#: php/class-theme.php:347 msgid "%1$s every setting must have a %2$s value." msgstr "" -#: includes/customize-classes.php:424 -msgid "Click to expand" -msgstr "" - -#: includes/customize-classes.php:456 -msgid "Reset to last saved value" -msgstr "" - -#: includes/customize-classes.php:457 -msgid "Reset to initial session value" -msgstr "" - -#: includes/customize-classes.php:458 -msgid "Reset to factory value" -msgstr "" - -#: includes/customize-classes.php:735 +#: php/customize-classes.php:660 msgid "It must be a list of values" msgstr "" -#: includes/customize-classes.php:736 +#: php/customize-classes.php:661 msgid "**%s** is not an allowed choice" msgstr "" -#: includes/customize-classes.php:737 +#: php/customize-classes.php:662 msgid "It must contain exactly **%s** values" msgstr "" -#: includes/customize-classes.php:738 +#: php/customize-classes.php:663 msgid "It must contain minimum **%s** values" msgstr "" -#: includes/customize-classes.php:739 +#: php/customize-classes.php:664 msgid "It must contain maximum **%s** values" msgstr "" -#: includes/customize-classes.php:1071 +#: php/customize-classes.php:839 msgid "Customize Plus | API error: set %s must follow the `set` strucure with values in `values` array." msgstr "" -#: includes/customize-classes.php:1308 +#: php/customize-classes.php:1040 msgid "It must be either checked or unchecked" msgstr "" -#: includes/customize-classes.php:1473 +#: php/customize-classes.php:1189 msgid "Cancel" msgstr "" -#: includes/customize-classes.php:1474 +#: php/customize-classes.php:1190 msgid "Choose" msgstr "" -#: includes/customize-classes.php:1475 +#: php/customize-classes.php:1191 msgid "Clear selection" msgstr "" -#: includes/customize-classes.php:1476 +#: php/customize-classes.php:1192 +msgid "Select color" +msgstr "" + +#: php/customize-classes.php:1193 msgid "No color selected" msgstr "" -#: includes/customize-classes.php:1477 +#: php/customize-classes.php:1194 msgid "Show color picker" msgstr "" -#: includes/customize-classes.php:1478 +#: php/customize-classes.php:1195 msgid "Hide color picker" msgstr "" -#: includes/customize-classes.php:1479 +#: php/customize-classes.php:1196 msgid "Colors must be strings" msgstr "" -#: includes/customize-classes.php:1480 +#: php/customize-classes.php:1197 msgid "Color not in the allowed palette" msgstr "" -#: includes/customize-classes.php:1481 +#: php/customize-classes.php:1198 msgid "Transparent is not allowed" msgstr "" -#: includes/customize-classes.php:1482 +#: php/customize-classes.php:1199 msgid "RGBA color is not allowed" msgstr "" -#: includes/customize-classes.php:1483 +#: php/customize-classes.php:1200 msgid "Not a valid color" msgstr "" -#: includes/customize-classes.php:1519 -msgid "Select Color" -msgstr "" - -#: includes/customize-classes.php:1838, includes/customize-classes.php:1838 +#: php/customize-classes.php:1492 msgid "Search icon by name..." msgstr "" -#: includes/customize-classes.php:2028 +#: php/customize-classes.php:1634 msgid "It must be a number" msgstr "" -#: includes/customize-classes.php:2029 +#: php/customize-classes.php:1635 msgid "It must be an integer, not a float" msgstr "" -#: includes/customize-classes.php:2030 +#: php/customize-classes.php:1636 msgid "It must be an integer number" msgstr "" -#: includes/customize-classes.php:2031 +#: php/customize-classes.php:1637 msgid "It must be a multiple of **%s**" msgstr "" -#: includes/customize-classes.php:2032 +#: php/customize-classes.php:1638 msgid "It must be higher than **%s**" msgstr "" -#: includes/customize-classes.php:2033 +#: php/customize-classes.php:1639 msgid "It must be lower than **%s**" msgstr "" -#: includes/customize-classes.php:2381 +#: php/customize-classes.php:1909 msgid "A CSS unit must be specified" msgstr "" -#: includes/customize-classes.php:2382 -msgid "CSS unit `%` is invalid" +#: php/customize-classes.php:1910 +msgid "CSS unit **%s** is not allowed here" msgstr "" -#: includes/customize-classes.php:2383 +#: php/customize-classes.php:1911 msgid "It does not accept a CSS unit" msgstr "" -#: includes/customize-classes.php:2618 +#: php/customize-classes.php:2084 msgid "Tags must be a string" msgstr "" -#: includes/customize-classes.php:2619 +#: php/customize-classes.php:2085 msgid "Minimum **%s** tags required" msgstr "" -#: includes/customize-classes.php:2620 +#: php/customize-classes.php:2086 msgid "Maximum **%s** tags allowed" msgstr "" -#: includes/customize-classes.php:2744 +#: php/customize-classes.php:2195 msgid "It must be a string" msgstr "" -#: includes/customize-classes.php:2745 +#: php/customize-classes.php:2196 msgid "Invalid URL" msgstr "" -#: includes/customize-classes.php:2746 +#: php/customize-classes.php:2197 msgid "Invalid email" msgstr "" -#: includes/customize-classes.php:2747 +#: php/customize-classes.php:2198 msgid "It must be shorter than **%s** chars" msgstr "" -#: includes/customize-classes.php:2748 +#: php/customize-classes.php:2199 msgid "It must be longer than **%s** chars" msgstr "" -#: includes/customize-classes.php:2749 +#: php/customize-classes.php:2200 msgid "It must follow this pattern **%s**" msgstr "" -#: includes/customize-classes.php:2750 +#: php/customize-classes.php:2201 msgid "HTML is not allowed. It will be stripped out on save" msgstr "" -#: includes/customize-classes.php:2751 +#: php/customize-classes.php:2202 msgid "This text contains some unallowed HTML. It will be stripped out on save" msgstr "" -#: includes/customize-classes.php:2752 +#: php/customize-classes.php:2203 msgid "The following HTML tags are not allowed: **%s**. They will be stripped out on save" msgstr "" -#: includes/customize-classes.php:2753 +#: php/customize-classes.php:2204 msgid "HTML code will be escaped on save" msgstr "" -#: includes/customize-classes.php:2754 +#: php/customize-classes.php:2205 msgid "HTML code is dangerously allowed here" msgstr "" -#: includes/customize-classes.php:2841 -msgid "Hide password" +#: php/customize-classes.php:2285 +msgid "Show password" msgstr "" -#: includes/customize-classes.php:2842 -msgid "Show password" +#: php/customize-classes.php:2286 +msgid "Hide password" msgstr "" diff --git a/includes/class-admin-about.php b/php/class-admin-about.php similarity index 99% rename from includes/class-admin-about.php rename to php/class-admin-about.php index c9f29d6..afe337c 100644 --- a/includes/class-admin-about.php +++ b/php/class-admin-about.php @@ -12,7 +12,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Admin_About { diff --git a/includes/class-admin.php b/php/class-admin.php similarity index 99% rename from includes/class-admin.php rename to php/class-admin.php index cfd0c27..181738b 100644 --- a/includes/class-admin.php +++ b/php/class-admin.php @@ -12,7 +12,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Admin extends KKcp_Singleton { diff --git a/includes/class-core.php b/php/class-core.php similarity index 96% rename from includes/class-core.php rename to php/class-core.php index f5742b5..5a08a5e 100644 --- a/includes/class-core.php +++ b/php/class-core.php @@ -12,7 +12,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp { @@ -99,7 +99,7 @@ public static function get_asset( $filename, $type, $base_url, $ext = '' ) { } $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; - return plugins_url( "assets/$type/$filename$min.$ext", $base_url ); + return plugins_url( "$type/$filename$min.$ext", $base_url ); } } diff --git a/includes/class-customize.php b/php/class-customize.php similarity index 95% rename from includes/class-customize.php rename to php/class-customize.php index 1e7e57f..09a0548 100644 --- a/includes/class-customize.php +++ b/php/class-customize.php @@ -15,7 +15,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize { @@ -155,7 +155,7 @@ class KKcp_Customize { 'underscore', 'jquery', 'jquery-ui-tooltip', - 'jquery-ui-slider' + // 'jquery-ui-slider' ); /** @@ -166,7 +166,6 @@ class KKcp_Customize { public function __construct() { add_action( 'customize_register', array( __CLASS__, 'register_custom_classes' ) ); add_action( 'customize_controls_print_styles', array( __CLASS__, 'enqueue_css_admin' ) ); - add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'get_notifications_tpls' ) ); add_action( 'customize_controls_print_footer_scripts' , array( __CLASS__, 'enqueue_js_admin' ) ); add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'get_view_loader' ) ); add_action( 'customize_controls_enqueue_scripts', array( __CLASS__, 'add_controls_js_vars' ) ); @@ -240,6 +239,7 @@ public static function get_js_constants() { 'IMAGES_BASE_URL' => KKcp_Theme::$images_base_url, 'DOCS_BASE_URL' => KKcp_Theme::$docs_base_url, 'DYNAMIC_CONTROLS_RENDERING' => KKcp_Theme::$dynamic_controls_rendering, + 'CP_URL' => esc_url( KKCP_PLUGIN_URL ), ); $additional = (array) apply_filters( 'kkcp_customize_get_js_constants', array() ); return array_merge( $required, self::$controls_constants, $additional ); @@ -253,6 +253,7 @@ public static function get_js_constants() { * hook. */ public static function get_js_settings() { + // @premium hook if ( class_exists( 'KKcpp' ) ) { $required = KKcpp::get_options(); } else { @@ -279,6 +280,9 @@ public static function get_js_l10n() { 'tools' => esc_html__( 'Tools', 'kkcp' ), 'vRequired' => esc_html__( 'A value is required', 'kkcp' ), 'vInvalid' => esc_html__( 'Invalid value', 'kkcp' ), + 'resetLastSaved' => esc_html__( 'Reset to last saved value', 'kkcp' ), + 'resetInitial' => esc_html__( 'Reset to initial session value', 'kkcp' ), + 'resetFactory' => esc_html__( 'Reset to factory value', 'kkcp' ), ); $additional = (array) apply_filters( 'kkcp_customize_get_js_l10n', array() ); return array_merge( $required, self::$controls_l10n, $additional ); @@ -346,8 +350,8 @@ public static function get_view_loader() {
    - - + +

    @@ -374,26 +378,6 @@ public static function get_view_loader() { - - (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Data { diff --git a/includes/class-helper.php b/php/class-helper.php similarity index 90% rename from includes/class-helper.php rename to php/class-helper.php index 0c91f22..6508f4d 100644 --- a/includes/class-helper.php +++ b/php/class-helper.php @@ -12,7 +12,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Helper { @@ -177,7 +177,7 @@ public static function hex_to_rgb( $value, $return_as_string = true ) { * @return string */ public static function rgba_to_rgb( $input ) { - sscanf( $input, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); + sscanf( $input, 'rgba(%d,%d,%d,%f)', $red, $green, $blue ); return "rgba($red,$green,$blue)"; } @@ -223,7 +223,9 @@ public static function normalize_font_families( $value ) { } /** - * Extract number from value, returns 0 otherwise + * Extract number (either integers or float) + * + * @see http://stackoverflow.com/a/17885985/1938970 * * @since 1.0.0 * @param string $value The value from to extract from @@ -231,39 +233,34 @@ public static function normalize_font_families( $value ) { * @return int|float|null The extracted number or null if the value does not * contain any digit. */ - public static function extract_number( $value, $allowed_float ) { - if ( is_int( $value ) || ( is_float( $value ) && $allowed_float ) ) { - return $value; - } - if ( $allowed_float ) { - $number_extracted = filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ); - } else { - $number_extracted = filter_var( $value, FILTER_SANITIZE_NUMBER_INT ); - } - if ( $number_extracted || 0 === $number_extracted ) { - return $number_extracted; + public static function extract_number( $value ) { + preg_match( '/(\+|-)?((\d+(\.\d+)?)|(\.\d+))/', $value, $matches ); + + if ( $matches && isset( $matches[0] ) && is_numeric( $matches[0] ) ) { + return $matches[0] + 0; } + return null; } /** - * Extract unit (like `px`, `em`, `%`, etc.) from an array of allowed units + * Extract size unit + * + * It returns the first matched, so the units are kind of sorted by popularity. + * @see http://www.w3schools.com/cssref/css_units.asp List of the css units * * @since 1.0.0 * @param string $value The value from to extract from * @param null|array $allowed_units An array of allowed units - * @return string The first valid unit found. + * @return string|null The first valid unit found. */ - public static function extract_size_unit( $value, $allowed_units ) { - if ( is_array( $allowed_units ) ) { - foreach ( $allowed_units as $unit ) { - if ( strpos( $value, $unit ) ) { - return $unit; - } - } - return isset( $allowed_units[0] ) ? $allowed_units[0] : ''; - } - return ''; + public static function extract_size_unit( $value ) { + preg_match( '/(px|%|em|rem|vh|vw|vmin|vmax|cm|mm|in|pt|pc|ch|ex)/', $value, $matches ); + + if ( $matches && isset( $matches[0] ) ) { + return $matches[0]; + } + return null; } /** diff --git a/includes/class-requirements.php b/php/class-requirements.php similarity index 99% rename from includes/class-requirements.php rename to php/class-requirements.php index 2e1c672..55c7a6c 100644 --- a/includes/class-requirements.php +++ b/php/class-requirements.php @@ -14,7 +14,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Requirements { diff --git a/includes/class-sanitize.php b/php/class-sanitize.php similarity index 82% rename from includes/class-sanitize.php rename to php/class-sanitize.php index 6123373..834045c 100644 --- a/includes/class-sanitize.php +++ b/php/class-sanitize.php @@ -15,7 +15,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Sanitize { @@ -143,6 +143,20 @@ public static function one_or_more_choices( $value, $setting, $control ) { return null; } + /** + * Sanitize sortable + * + * @since 1.1.0 + * + * @param array $value The value to sanitize. + * @param WP_Customize_Setting $setting Setting instance. + * @param WP_Customize_Control $control Control instance. + * @return array|null The sanitized value. + */ + public static function sortable( $value, $setting, $control ) { + return self::multiple_choices( $value, $setting, $control, true ); + } + /** * Sanitize font family * @@ -279,32 +293,32 @@ public static function text( $value, $setting, $control ) { */ public static function number( $value, $setting, $control ) { $attrs = $control->input_attrs; - $number = KKcp_Helper::extract_number( $value, $control ); + $value = $value + 0; - if ( is_null( $number ) ) { + if ( ! is_numeric( $value ) ) { return null; } // if it's a float but it is not allowed to be it round it - if ( is_float( $number ) && ! isset( $attrs['float'] ) ) { - $number = round( $number ); + if ( is_float( $value ) && ! isset( $attrs['float'] ) ) { + $value = round( $value ); } // if doesn't respect the step given round it to the closest // then do the min and max checks - if ( isset( $attrs['step'] ) && KKcp_Helper::modulus( $number, $attrs['step'] ) != 0 ) { - $number = round( $number / $attrs['step'] ) * $attrs['step']; + if ( isset( $attrs['step'] ) && KKcp_Helper::modulus( $value, $attrs['step'] ) != 0 ) { + $value = round( $value / $attrs['step'] ) * $attrs['step']; } // if it's lower than the minimum return the minimum - if ( isset( $attrs['min'] ) && is_numeric( $attrs['min'] ) && $number < $attrs['min'] ) { + if ( isset( $attrs['min'] ) && is_numeric( $attrs['min'] ) && $value < $attrs['min'] ) { return $attrs['min']; } // if it's higher than the maxmimum return the maximum - if ( isset( $attrs['max'] ) && is_numeric( $attrs['max'] ) && $number > $attrs['max'] ) { + if ( isset( $attrs['max'] ) && is_numeric( $attrs['max'] ) && $value > $attrs['max'] ) { return $attrs['max']; } - return $number; + return $value; } /** @@ -348,8 +362,8 @@ public static function size_unit( $unit, $allowed_units ) { * @return string|number|null The sanitized value. */ public static function slider( $value, $setting, $control ) { - $number = KKcp_Helper::extract_number( $value, isset( $control->input_attrs['float'] ) ); - $unit = KKcp_Helper::extract_size_unit( $value, $control->units ); + $number = KKcp_Helper::extract_number( $value ); + $unit = KKcp_Helper::extract_size_unit( $value ); $number = self::number( $number, $setting, $control ); $unit = self::size_unit( $unit, $control->units ); @@ -398,73 +412,6 @@ public static function color( $value, $setting, $control ) { } return $value; } - - /** - * Sanitize CSS - * - * @link(http://git.io/vZ05N, source) - * @since 1.0.0 - * - * @param string $input CSS to sanitize. - * @return string Sanitized CSS. - */ - private static function css( $input ) { - return wp_strip_all_tags( $input ); - } - - /** - * Sanitize image - * - * @link(http://git.io/vZ05p, source) - * @since 1.0.0 - * - * @param string $image Image filename. - * @param WP_Customize_Setting $setting Setting instance. - * @return string The image filename if the extension is allowed; otherwise, the setting default. - */ - private static function image( $image, $setting ) { - // Array of valid image file types. - // The array includes image mime types that are included in wp_get_mime_types() - $mimes = array( - 'jpg|jpeg|jpe' => 'image/jpeg', - 'gif' => 'image/gif', - 'png' => 'image/png', - 'bmp' => 'image/bmp', - 'tif|tiff' => 'image/tiff', - 'ico' => 'image/x-icon' - ); - // Return an array with file extension and mime_type. - $file = wp_check_filetype( $image, $mimes ); - // If $image has a valid mime_type, return it; otherwise, return the default. - return ( $file['ext'] ? $image : $setting->default ); - } - - /** - * HTML sanitization callback example. - * - * @link(http://git.io/vZ0dv, source) - * @since 1.0.0 - * - * @param string $html HTML to sanitize. - * @return string Sanitized HTML. - */ - private static function html( $html ) { - return wp_filter_post_kses( $html ); - } - - /** - * No-HTML sanitization callback example. - * - * @link(http://git.io/vZ0dL, source) - * @since 1.0.0 - * - * @since 1.0.0 - * @param string $nohtml The no-HTML content to sanitize. - * @return string Sanitized no-HTML content. - */ - private static function nohtml( $nohtml ) { - return wp_filter_nohtml_kses( $nohtml ); - } } endif; diff --git a/includes/class-sanitizejs.php b/php/class-sanitizejs.php similarity index 99% rename from includes/class-sanitizejs.php rename to php/class-sanitizejs.php index 9cf1d97..35dbd51 100644 --- a/includes/class-sanitizejs.php +++ b/php/class-sanitizejs.php @@ -13,7 +13,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_SanitizeJS { diff --git a/includes/class-singleton.php b/php/class-singleton.php similarity index 98% rename from includes/class-singleton.php rename to php/class-singleton.php index f087878..b843755 100644 --- a/includes/class-singleton.php +++ b/php/class-singleton.php @@ -12,7 +12,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ abstract class KKcp_Singleton { diff --git a/includes/class-theme.php b/php/class-theme.php similarity index 99% rename from includes/class-theme.php rename to php/class-theme.php index 9997f95..cf7e475 100644 --- a/includes/class-theme.php +++ b/php/class-theme.php @@ -13,7 +13,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Theme extends KKcp_Singleton { diff --git a/includes/class-validate.php b/php/class-validate.php similarity index 92% rename from includes/class-validate.php rename to php/class-validate.php index 7a297d9..135b550 100644 --- a/includes/class-validate.php +++ b/php/class-validate.php @@ -13,7 +13,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Validate { @@ -133,6 +133,21 @@ public static function one_or_more_choices( $validity, $value, $setting, $contro return self::multiple_choices( $validity, $value, $setting, $control ); } + /** + * Validate sortable + * + * @since 1.1.0 + * + * @param WP_Error $validity + * @param mixed $value The value to validate. + * @param WP_Customize_Setting $setting Setting instance. + * @param WP_Customize_Control $control Control instance. + * @return WP_Error + */ + public static function sortable( $validity, $value, $setting, $control ) { + return self::multiple_choices( $validity, $value, $setting, $control, true ); + } + /** * Validate font family * @@ -273,7 +288,7 @@ public static function text( $validity, $value, $setting, $control ) { * @return WP_Error */ public static function number( $validity, $value, $setting, $control ) { - $value = ($value == (int) $value) ? (int) $value : (float) $value; + $value = $value + 0; // no number if ( ! is_numeric( $value ) ) { @@ -290,8 +305,6 @@ public static function number( $validity, $value, $setting, $control ) { $validity = $control->add_error( $validity, 'vNotAnInteger' ); } - $attrs = $control->input_attrs; - if ( $attrs ) { // if doesn't respect the step given if ( isset( $attrs['step'] ) && is_numeric( $attrs['step'] ) && KKcp_Helper::modulus( $value, $attrs['step'] ) != 0 ) { @@ -320,17 +333,17 @@ public static function number( $validity, $value, $setting, $control ) { * @param mixed $allowed_units The allowed units * @return WP_Error */ - public static function size_unit( $validity, $unit, $allowed_units ) { + public static function size_unit( $validity, $unit, $setting, $control ) { // if it needs a unit and it is missing - if ( ! empty( $allowed_units ) && ! $unit ) { + if ( ! empty( $control->units ) && ! $unit ) { $validity = $control->add_error( $validity, 'vSliderMissingUnit' ); } // if the unit specified is not in the allowed ones - else if ( ! empty( $allowed_units ) && $unit && ! in_array( $unit, $allowed_units ) ) { - $validity = $control->add_error( $validity, 'vSliderInvalidUnit', $unit ); + else if ( ! empty( $control->units ) && $unit && ! in_array( $unit, $control->units ) ) { + $validity = $control->add_error( $validity, 'vSliderUnitNotAllowed', $unit ); } // if a unit is specified but none is allowed - else if ( empty( $allowed_units ) && $unit ) { + else if ( empty( $control->units ) && $unit ) { $validity = $control->add_error( $validity, 'vSliderNoUnit' ); } @@ -349,11 +362,11 @@ public static function size_unit( $validity, $unit, $allowed_units ) { * @return WP_Error */ public static function slider( $validity, $value, $setting, $control ) { - $number = KKcp_Helper::extract_number( $value, isset( $control->input_attrs['float'] ) ); - $unit = KKcp_Helper::extract_size_unit( $value, $control->units ); + $number = KKcp_Helper::extract_number( $value ); + $unit = KKcp_Helper::extract_size_unit( $value ); $validity = self::number( $validity, $number, $setting, $control ); - $validity = self::size_unit( $validity, $unit, $control->units ); + $validity = self::size_unit( $validity, $unit, $setting, $control ); return $validity; } diff --git a/includes/customize-classes.php b/php/customize-classes.php similarity index 75% rename from includes/customize-classes.php rename to php/customize-classes.php index 9c5faf2..c002826 100644 --- a/includes/customize-classes.php +++ b/php/customize-classes.php @@ -11,7 +11,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ @@ -34,7 +34,7 @@ * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Setting_Base extends WP_Customize_Setting { @@ -111,7 +111,7 @@ public function json() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Setting_Font_Family extends KKcp_Customize_Setting_Base { @@ -165,7 +165,7 @@ public function js_value_default() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Base extends WP_Customize_Control { @@ -202,7 +202,7 @@ class KKcp_Customize_Control_Base extends WP_Customize_Control { public $loose = false; /** - * Enable live validation of control's default setting value + * Enable live validation of control default setting's value * * For readibility this property is 'positively' put. But in the JSON `params` * it is reversed in its negative form, so that the `control.params` object @@ -217,7 +217,7 @@ class KKcp_Customize_Control_Base extends WP_Customize_Control { public $live_validation = true; /** - * Enable live sanitization of control's default setting value + * Enable live sanitization of control default setting's value * * For readibility this property is 'positively' put. But in the JSON `params` * it is reversed in its negative form, so that the `control.params` object @@ -371,8 +371,7 @@ public function to_json() { protected function add_to_json() {} /** - * Never render any content for controls from PHP. We rely completely on js, - * and declare the control `
  • ` container in the js control base class. + * Never render any content for controls from PHP * * @since 1.0.0 * @override @@ -380,95 +379,20 @@ protected function add_to_json() {} protected function render() {} /** - * Never render any inner content for controls from PHP. + * Never render any inner content for controls from PHP * * @since 1.0.0 * @override */ - public function render_content() {} + protected function render_content() {} /** - * Compose and minify js template rendered in the `js_tpl` function. + * Templates are entirely managed in JavaScript Control classes * * @since 1.0.0 * @override */ - public function content_template() { - $this->js_tpl_info(); - $this->js_tpl_extras(); - $this->js_tpl(); - $this->js_tpl_notifications(); - } - - /** - * Subclasses can have their own notifications container template - * - * @since 1.0.0 - */ - protected function js_tpl_notifications() { - ?> -
    - - <# if (data.info) { #> - - <# } #> - - <# if (data.label) { #> -
    <# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #>
    - <# } if (data.description) { #> -
    <# if (marked) { #>{{{ marked(data.description) }}}<# } else { #>{{{ data.description }}}<# } #>
    - <# } #> - -
    - -
      -
    • -
    • -
    • - -
    -
    - add( $msg_id, sprintf( $msg, $msg_arguments ) ); - // if it is a simple string message - } else { + } + // if it is a simple string message leave it as it is + else { $validity->add( $msg_id, $msg ); } return $validity; @@ -657,7 +582,7 @@ public function add_error( $validity, $msg_id, $msg_arguments ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ abstract class KKcp_Customize_Control_Base_Choices extends KKcp_Customize_Control_Base { @@ -755,104 +680,6 @@ protected function add_to_json() { $this->json['choices'] = $this->choices; } - /** - * Js template - * - * Choice supports both a string if you only want to pass a label or an array - * with `label`, `sublabel`, `tooltip`, `popover_title`, `popover_txt`, etc. - * - * {@inheritDoc} - * - * @since 1.0.0 - * @override - */ - protected function js_tpl() { - ?> - <# var choices = data.choices, idx = 0; - if (!_.isEmpty(choices)) { #> - js_tpl_header(); ?> - js_tpl_above_choices(); ?> - js_tpl_choices_loop(); ?> - js_tpl_below_choices(); ?> - <# } #> - - <# for (var val in choices) { #> - js_tpl_choice(); ?> - <#} #> - - <# if (choices.hasOwnProperty(val)) { - var label; - var choice = choices[val]; - var classes = ''; - var attributes = ''; - var tooltip = ''; - var id = data.id + idx++; - if (!_.isUndefined(choice.label)) { - label = choice.label; - if (choice.popover) { - classes += 'kkcpui-popover '; - if (choice.popover.title) attributes += ' data-title="' + choice.popover.title + '"'; - if (choice.popover.img) attributes += ' data-img="' + choice.popover.img + '"'; - if (choice.popover.text) attributes += ' data-text="' + choice.popover.text + '"'; - if (choice.popover.video) attributes += ' data-video="' + choice.popover.video + '"'; - } - if (choice.tooltip) { - classes += 'kkcpui-tooltip--top '; - attributes += ' title="' + choice.tooltip + '"'; - tooltip = choice.tooltip; - } - } else { - label = choice; - } - if (!tooltip) { - tooltip = label; - } - #> - js_tpl_choice_ui(); ?> - <# } #> - (https://knitkode.com) - * @copyright 2018 KnitKode - * @license GPLv3 - * @version Release: 1.0.22 - * @link https://knitkode.com/products/customize-plus - */ -abstract class KKcp_Customize_Control_Base_Input extends KKcp_Customize_Control_Base { - - /** - * {@inheritDoc}. Note that the `tooltip` input_attr is printed in a wrapping - * span instead of directly on the input field. - * - * @since 1.0.0 - * @override - */ - protected function js_tpl() { - ?> - - js_tpl_input(); - } - - /** - * Js template for the actual input element - * - * @since 1.0.0 - * @abstract - */ - protected function js_tpl_input () { - ?> - {{ key }}="{{ attrs[key] }}" <# } } #> - > - (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ abstract class KKcp_Customize_Control_Base_Radio extends KKcp_Customize_Control_Base_Choices { @@ -996,7 +764,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ abstract class KKcp_Customize_Control_Base_Set extends KKcp_Customize_Control_Base_Choices { @@ -1062,7 +830,7 @@ protected function get_set ( $name ) { public static function get_flatten_set_values ( $set ) { $values = array(); - foreach ( $set as $set_group_key => $set_group_values ) { + foreach ( $set as $set_group_values ) { if ( isset( $set_group_values['values'] ) && is_array( $set_group_values['values'] ) ) { foreach ( $set_group_values['values'] as $value ) { array_push( $values, $value ); @@ -1159,11 +927,11 @@ private function get_filtered_set ( $name, $filter ) { protected function get_valid_choices ( $filtered_sets ) { $valid_choices = array(); - foreach ( $filtered_sets as $set_name => $set_values ) { + foreach ( $filtered_sets as $set_values ) { // set can be a multidimensional array divided by groups if ( KKcp_Helper::is_assoc( $set_values ) ) { - foreach ( $set_values as $group_key => $group_values ) { + foreach ( $set_values as $group_values ) { if ( isset( $group_values['values'] ) && is_array( $group_values['values'] ) ) { $valid_choices = array_merge( $valid_choices, $group_values['values'] ); } @@ -1219,7 +987,7 @@ protected function add_to_json() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Buttonset extends KKcp_Customize_Control_Base_Radio { @@ -1229,45 +997,9 @@ class KKcp_Customize_Control_Buttonset extends KKcp_Customize_Control_Base_Radio * @inheritDoc */ public $type = 'kkcp_buttonset'; - - /** - * {@inheritDoc}. Always show tooltips. - * - * @since 1.0.0 - * @override - */ - protected function js_tpl_choice_ui () { - ?> - > - - -
    - - -
    - register_control_type( 'KKcp_Customize_Control_Buttonset' ); /** @@ -1280,7 +1012,7 @@ protected function js_tpl_below_choices () { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Checkbox extends KKcp_Customize_Control_Base { @@ -1309,20 +1041,6 @@ public function get_l10n() { ); } - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - js_tpl_header(); ?> - - register_control_type( 'KKcp_Customize_Control_Checkbox' ); /** @@ -1362,7 +1078,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Color extends KKcp_Customize_Control_Base { @@ -1473,6 +1189,7 @@ public function get_l10n() { 'cancelText' => esc_html__( 'Cancel', 'kkcp' ), 'chooseText' => esc_html__( 'Choose', 'kkcp' ), 'clearText' => esc_html__( 'Clear selection', 'kkcp' ), + 'selectColor' => esc_html__( 'Select color', 'kkcp' ), 'noColorSelectedText' => esc_html__( 'No color selected', 'kkcp' ), 'togglePaletteMoreText' => esc_html__( 'Show color picker', 'kkcp' ), 'togglePaletteLessText' => esc_html__( 'Hide color picker', 'kkcp' ), @@ -1489,8 +1206,6 @@ public function get_l10n() { * @inheritDoc */ protected function add_to_json() { - $this->json['valueCSS'] = $this->value(); - if ( $this->alpha ) { $this->json['alpha'] = true; } @@ -1507,22 +1222,6 @@ protected function add_to_json() { $this->json['mode'] = 'custom'; } - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - js_tpl_header(); ?> - - - -
    - -
    - register_control_type( 'KKcp_Customize_Control_Color' ); /** @@ -1555,7 +1252,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Content extends KKcp_Customize_Control_Base { @@ -1635,34 +1332,9 @@ protected function add_to_json() { $this->json['alert'] = $this->alert; } } - - /** - * @since 1.0.0 - * @inheritDoc - */ - public function content_template() { - $this->js_tpl_info(); - $this->js_tpl(); - } - - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - <# if (data.alert) { #>
    <# } #> - <# if (data.label) { #><# if (marked) { #>{{{ marked(data.label) }}}<# } else { #>{{{ data.label }}}<# } #><# } #> - <# if (data.description) { #> class="description customize-control-description"<# } #>><# if (marked) { #>{{{ marked(data.description) }}}<# } else { #>{{{ data.description }}}<# } #><# } #> - <# if (marked && data.markdown) { #>
    {{{ marked(data.markdown) }}}
    <# } #> - <# if (data.alert) { #>
    <# } #> - register_control_type( 'KKcp_Customize_Control_Content' ); /** @@ -1675,7 +1347,7 @@ protected function js_tpl() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Font_Family extends KKcp_Customize_Control_Base_Set { @@ -1738,19 +1410,6 @@ protected function get_valid_choices ( $filtered_sets ) { return $valid_choices; } - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - - - register_control_type( 'KKcp_Customize_Control_Font_Family' ); /** @@ -1783,7 +1440,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Icon extends KKcp_Customize_Control_Base_Set { @@ -1827,22 +1484,17 @@ protected function get_set ( $name ) { } /** - * @since 1.0.0 + * @since 1.0.0 * @inheritDoc */ - protected function js_tpl() { - ?> - - - esc_html__( 'Search icon by name...', 'kkcp' ), + ); } } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Icon' ); /** @@ -1855,7 +1507,7 @@ protected function js_tpl() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Multicheck extends KKcp_Customize_Control_Base_Choices { @@ -1919,50 +1571,6 @@ protected function add_to_json() { $this->json['choicesOrdered'] = $this->value(); } - /** - * If the control is sortable we first show the ordered choices (the ones stored - * as value in the DB, gathered with `$this->value()`) and then the other choices, - * that's why the double loop with the `indexOf` condition. - * - * {@inheritDoc} - * - * @since 1.0.0 - * @override - */ - protected function js_tpl_choices_loop() { - ?> - <# if (data.sortable) { - if (_.isArray(data.choicesOrdered)) { - for (var i = 0; i < data.choicesOrdered.length; i++) { - var val = data.choicesOrdered[i]; #> - js_tpl_choice(); ?> - <# } - for (var val in choices) { - if (data.choicesOrdered.indexOf(val) === -1) { #> - js_tpl_choice(); ?> - <# } - } - } - } else { - for (var val in choices) { #> - js_tpl_choice(); ?> - <# } - } #> - - - register_control_type( 'KKcp_Customize_Control_Multicheck' ); /** @@ -1995,10 +1601,10 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ -class KKcp_Customize_Control_Number extends KKcp_Customize_Control_Base_Input { +class KKcp_Customize_Control_Number extends KKcp_Customize_Control_Base { /** * @since 1.0.0 @@ -2051,9 +1657,7 @@ protected static function validate( $validity, $value, $setting, $control ) { } } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Number' ); /** @@ -2066,7 +1670,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Radio extends KKcp_Customize_Control_Base_Radio { @@ -2076,25 +1680,9 @@ class KKcp_Customize_Control_Radio extends KKcp_Customize_Control_Base_Radio { * @inheritDoc */ public $type = 'kkcp_radio'; - - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl_choice_ui() { - ?> - - register_control_type( 'KKcp_Customize_Control_Radio' ); /** @@ -2110,7 +1698,7 @@ protected function js_tpl_choice_ui() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Radio_Image extends KKcp_Customize_Control_Base_Radio { @@ -2120,29 +1708,9 @@ class KKcp_Customize_Control_Radio_Image extends KKcp_Customize_Control_Base_Rad * @inheritDoc */ public $type = 'kkcp_radio_image'; - - /** - * {@inheritDoc}. It shows the full image path (`img_custom`) or an image - * bundled in the plugin when `img` has been passed, with the plugin url - * as prepath, and always a `png` extension. Always show tooltip. - * - * @since 1.0.0 - * @override - */ - protected function js_tpl_choice_ui() { - ?> - > - - register_control_type( 'KKcp_Customize_Control_Radio_Image' ); /** @@ -2155,7 +1723,7 @@ protected function js_tpl_choice_ui() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Select extends KKcp_Customize_Control_Base_Choices { @@ -2191,47 +1759,9 @@ public function __construct( $manager, $id, $args = array() ) { $this->valid_choices = $this->get_valid_choices( $this->choices ); } - - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl_choice_ui() { - ?> - - - - register_control_type( 'KKcp_Customize_Control_Select' ); /** @@ -2244,7 +1774,7 @@ protected function js_tpl_below_choices () { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Font_Weight extends KKcp_Customize_Control_Select { @@ -2296,9 +1826,7 @@ class KKcp_Customize_Control_Font_Weight extends KKcp_Customize_Control_Select { ); } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Font_Weight' ); /** @@ -2311,7 +1839,7 @@ class KKcp_Customize_Control_Font_Weight extends KKcp_Customize_Control_Select { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Slider extends KKcp_Customize_Control_Base { @@ -2358,8 +1886,8 @@ class KKcp_Customize_Control_Slider extends KKcp_Customize_Control_Base { * @override */ public function __construct( $manager, $id, $args = array() ) { - if ( isset( $args['step'] ) && is_float( $args['step'] ) ) { - $args['float'] = true; + if ( isset( $args['input_attrs'] ) && isset( $args['input_attrs']['step'] ) && is_float( $args['input_attrs']['step'] ) ) { + $args['input_attrs']['float'] = true; } if ( isset( $args['units'] ) && ! empty( $args['units'] ) ) { @@ -2379,7 +1907,7 @@ public function __construct( $manager, $id, $args = array() ) { public function get_l10n() { return array( 'vSliderMissingUnit' => esc_html__( 'A CSS unit must be specified', 'kkcp' ), - 'vSliderInvalidUnit' => esc_html__( 'CSS unit `%` is invalid', 'kkcp' ), + 'vSliderUnitNotAllowed' => esc_html__( 'CSS unit **%s** is not allowed here', 'kkcp' ), 'vSliderNoUnit' => esc_html__( 'It does not accept a CSS unit', 'kkcp' ), ); } @@ -2402,41 +1930,6 @@ protected function add_to_json() { } } - /** - * {@inheritDoc} - * - * Separate the slider template to make it reusable by child classes - * - * @since 1.0.0 - * @override - */ - protected function js_tpl_slider() { - ?> - <# if (data.units) { #> -
    - {{ key }}="{{ data.attrs[key] }}" <# } } #>> -
    <# for (var i = 0, l = data.units.length; i < l; i++) { #><# } #>
    -
    - <# } else { #> - {{ key }}="{{ data.attrs[key] }}" <# } } #>> - <# } #> -
    -
    -
    - js_tpl_header(); - $this->js_tpl_slider(); - } - /** * @since 1.0.0 * @inheritDoc @@ -2454,9 +1947,7 @@ protected static function validate( $validity, $value, $setting, $control ) { } } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Slider' ); /** @@ -2469,7 +1960,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Sortable extends KKcp_Customize_Control_Base_Choices { @@ -2511,37 +2002,12 @@ protected function add_to_json() { $this->json['choices'] = $this->choices; } - /** - * @override - * @since 1.0.0 - */ - protected function js_tpl_choices_loop() { - ?> - <# if (_.isArray(data.choicesOrdered)) { - for (var i = 0; i < data.choicesOrdered.length; i++) { - var val = data.choicesOrdered[i]; #> - js_tpl_choice(); ?> - <# } - } #> - -
    {{ label }}
    - (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Tags extends KKcp_Customize_Control_Base { @@ -2630,19 +2096,6 @@ protected function add_to_json() { $this->json['min'] = KKcp_SanitizeJS::int_or_null( false, $this->min ); } - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - - register_control_type( 'KKcp_Customize_Control_Tags' ); /** @@ -2675,10 +2126,10 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ -class KKcp_Customize_Control_Text extends KKcp_Customize_Control_Base_Input { +class KKcp_Customize_Control_Text extends KKcp_Customize_Control_Base { /** * @since 1.0.0 @@ -2784,9 +2235,7 @@ protected static function validate( $validity, $value, $setting, $control ) { } } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Text' ); /** @@ -2803,7 +2252,7 @@ protected static function validate( $validity, $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Password extends KKcp_Customize_Control_Text { @@ -2828,24 +2277,14 @@ class KKcp_Customize_Control_Password extends KKcp_Customize_Control_Text { ); /** - * @since 1.0.0 - * @inheritDoc + * @since 1.0.0 + * @inerhitDoc */ - protected function js_tpl_inner () { - ?> - - <# if (data.attrs && data.attrs.visibility) { #> - js_tpl_input() ?> - {{ key }}="{{ attrs[key] }}" <# } } #>> - - <# } else { #> - js_tpl_input() ?> - <# } #> - - esc_html__( 'Show password', 'kkcp' ), + 'passwordHide' => esc_html__( 'Hide password', 'kkcp' ), + ); } /** @@ -2862,9 +2301,7 @@ protected static function sanitize( $value, $setting, $control ) { } } -/** - * Register on WordPress Customize global object - */ +// Register on WordPress Customize global object $wp_customize->register_control_type( 'KKcp_Customize_Control_Password' ); /** @@ -2877,7 +2314,7 @@ protected static function sanitize( $value, $setting, $control ) { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Textarea extends KKcp_Customize_Control_Text { @@ -3007,29 +2444,9 @@ protected function add_to_json() { wp_enqueue_editor(); } } - - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - - register_control_type( 'KKcp_Customize_Control_Textarea' ); /** @@ -3042,7 +2459,7 @@ protected function js_tpl() { * @author KnitKode (https://knitkode.com) * @copyright 2018 KnitKode * @license GPLv3 - * @version Release: 1.0.22 + * @version Release: 1.1.1 * @link https://knitkode.com/products/customize-plus */ class KKcp_Customize_Control_Toggle extends KKcp_Customize_Control_Checkbox { @@ -3061,28 +2478,7 @@ class KKcp_Customize_Control_Toggle extends KKcp_Customize_Control_Checkbox { 'label_false' => array( 'sanitizer' => 'string' ), 'label_true' => array( 'sanitizer' => 'string' ), ); - - /** - * @since 1.0.0 - * @inheritDoc - */ - protected function js_tpl() { - ?> - js_tpl_header(); ?> - <# var labelFalse = data.attrs ? data.attrs.label_false : ''; labelTrue = data.attrs ? data.attrs.label_true : ''; #> - - register_control_type( 'KKcp_Customize_Control_Toggle' ); \ No newline at end of file diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000..e71af0e --- /dev/null +++ b/php/index.php @@ -0,0 +1 @@ + Home in the left-hand menu to start translating = Theme integration = -Checkout the [documentation here](https://knitkode.com/docs/customize-plus/getting-started/integration?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). A tool to facilitate this task is [Customize Plus Builder](https://knitkode.com/products/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme), you can [try it here](https://knitkode.com/customize-plus-builder). +Checkout the [documentation here](https://knitkode.com/docs/customize-plus/getting-started/integration?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). A tool to facilitate this task is [Customize Plus Builder](https://knitkode.com/products/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme), you can [try it here](https://knitkode.com/customize-plus-builder?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=theme_integration&utm_campaign=readme). = Translations = * English - default @@ -100,11 +100,21 @@ Documentation can be found at [knitkode.com/docs/customize-plus](https://knitkod = How do I get help? = -Help is provided via the plugin support forum only. Please visit the [support page](https://knitkode.com/support) to see other options. +Help is provided via the plugin support forum only. Please visit the [support page](https://knitkode.com/support?utm_source=customize-plus&utm_medium=wordpress_org&utm_content=faq&utm_campaign=readme) to see other options. + += Can I see a quick demo? = +Yes, try out the always up to date [official demo theme](https://github.com/knitkode/customize-plus-demo). == Changelog == += 1.1.1: 24/02/2017 = + +* Bugfixing +* Moved control templates to JavaScript control's classes +* Control's classes use now a React ready methods naming and lifecycle style +* Support warnings in $validity notifications + = 1.0.21: 22/02/2017 = * Fix 'dancing char' on Base Input Control