text: !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("moment"),require("immutable")):"function"==typeof define&&define.amd?define("NetlifyCmsLibWidgets",["moment","immutable"],n):"object"==typeof exports?exports.NetlifyCmsLibWidgets=n(require("moment"),require("immutable")):t.NetlifyCmsLibWidgets=n(t.NetlifyCmsDefaultExports.Moment,t.NetlifyCmsDefaultExports.Immutable)}(window,(function(t,n){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=71)}([function(t,n,r){var e=r(14)(Object,"create");t.exports=e},function(t,n,r){var e=r(59);t.exports=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}},function(t,n,r){var e=r(65);t.exports=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map}},function(t,n,r){(function(t){function r(t,n){for(var r=0,e=t.length-1;e>=0;e--){var o=t[e];"."===o?t.splice(e,1):".."===o?(t.splice(e,1),r++):r&&(t.splice(e,1),r--)}if(n)for(;r--;r)t.unshift("..");return t}function e(t,n){if(t.filter)return t.filter(n);for(var r=[],e=0;e<t.length;e++)n(t[e],e,t)&&r.push(t[e]);return r}n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var u=i>=0?arguments[i]:t.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(n=u+"/"+n,o="/"===u.charAt(0))}return(o?"/":"")+(n=r(e(n.split("/"),(function(t){return!!t})),!o).join("/"))||"."},n.normalize=function(t){var i=n.isAbsolute(t),u="/"===o(t,-1);return(t=r(e(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&u&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(e(t,(function(t,n){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},n.relative=function(t,r){function e(t){for(var n=0;n<t.length&&""===t[n];n++);for(var r=t.length-1;r>=0&&""===t[r];r--);return n>r?[]:t.slice(n,r-n+1)}t=n.resolve(t).substr(1),r=n.resolve(r).substr(1);for(var o=e(t.split("/")),i=e(r.split("/")),u=Math.min(o.length,i.length),f=u,c=0;c<u;c++)if(o[c]!==i[c]){f=c;break}var s=[];for(c=f;c<o.length;c++)s.push("..");return(s=s.concat(i.slice(f))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,e=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(n=t.charCodeAt(i))){if(!o){e=i;break}}else o=!1;return-1===e?r?"/":".":r&&1===e?"/":t.slice(0,e)},n.basename=function(t,n){var r=function(t){"string"!=typeof t&&(t+="");var n,r=0,e=-1,o=!0;for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){r=n+1;break}}else-1===e&&(o=!1,e=n+1);return-1===e?"":t.slice(r,e)}(t);return n&&r.substr(-1*n.length)===n&&(r=r.substr(0,r.length-n.length)),r},n.extname=function(t){"string"!=typeof t&&(t+="");for(var n=-1,r=0,e=-1,o=!0,i=0,u=t.length-1;u>=0;--u){var f=t.charCodeAt(u);if(47!==f)-1===e&&(o=!1,e=u+1),46===f?-1===n?n=u:1!==i&&(i=1):-1!==n&&(i=-1);else if(!o){r=u+1;break}}return-1===n||-1===e||0===i||1===i&&n===e-1&&n===r+1?"":t.slice(n,e)};var o="b"==="ab".substr(-1)?function(t,n,r){return t.substr(n,r)}:function(t,n,r){return n<0&&(n=t.length+n),t.substr(n,r)}}).call(this,r(70))},function(t,n,r){var e=r(9),o=r(12);t.exports=function(t){return"number"==typeof t||o(t)&&"[object Number]"==e(t)}},function(t,n,r){var e=r(6).Symbol;t.exports=e},function(t,n,r){var e=r(19),o="object"==typeof self&&self&&self.Object===Object&&self,i=e||o||Function("return this")();t.exports=i},function(t,n){var r=Array.isArray;t.exports=r},function(t,n,r){var e=r(9),o=r(12);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==e(t)}},function(t,n,r){var e=r(5),o=r(22),i=r(23),u=e?e.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(n,r){n.exports=t},function(t,n,r){var e=r(5),o=r(21),i=r(7),u=r(8),f=e?e.prototype:void 0,c=f?f.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(i(n))return o(n,t)+"";if(u(n))return c?c.call(n):"";var r=n+"";return"0"==r&&1/n==-1/0?"-0":r}},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,r){var e=r(11);t.exports=function(t){return null==t?"":e(t)}},function(t,n,r){var e=r(46),o=r(51);t.exports=function(t,n){var r=o(t,n);return e(r)?r:void 0}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,r){var e=r(11),o=r(24),i=r(26),u=r(31),f=r(13),c=r(35);t.exports=function(t,n,r){if((t=f(t))&&(r||void 0===n))return t.slice(0,c(t)+1);if(!t||!(n=e(n)))return t;var s=u(t),a=i(s,u(n))+1;return o(s,0,a).join("")}},function(t,n,r){var e=r(36);t.exports=function(t,n,r){var o=null==t?void 0:e(t,n);return void 0===o?r:o}},function(t,r){t.exports=n},function(t,n,r){(function(n){var r="object"==typeof n&&n&&n.Object===Object&&n;t.exports=r}).call(this,r(20))},function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,n){t.exports=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o}},function(t,n,r){var e=r(5),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,f=e?e.toStringTag:void 0;t.exports=function(t){var n=i.call(t,f),r=t[f];try{t[f]=void 0;var e=!0}catch(t){}var o=u.call(t);return e&&(n?t[f]=r:delete t[f]),o}},function(t,n){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,n,r){var e=r(25);t.exports=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}},function(t,n){t.exports=function(t,n,r){var e=-1,o=t.length;n<0&&(n=-n>o?0:o+n),(r=r>o?o:r)<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var i=Array(o);++e<o;)i[e]=t[e+n];return i}},function(t,n,r){var e=r(27);t.exports=function(t,n){for(var r=t.length;r--&&e(n,t[r],0)>-1;);return r}},function(t,n,r){var e=r(28),o=r(29),i=r(30);t.exports=function(t,n,r){return n==n?i(t,n,r):e(t,o,r)}},function(t,n){t.exports=function(t,n,r,e){for(var o=t.length,i=r+(e?1:-1);e?i--:++i<o;)if(n(t[i],i,t))return i;return-1}},function(t,n){t.exports=function(t){return t!=t}},function(t,n){t.exports=function(t,n,r){for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1}},function(t,n,r){var e=r(32),o=r(33),i=r(34);t.exports=function(t){return o(t)?i(t):e(t)}},function(t,n){t.exports=function(t){return t.split("")}},function(t,n){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,n){var r="[\\ud800-\\udfff]",e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+e+"|"+o+")"+"?",s="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[i,u,f].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),a="(?:"+[i+e+"?",e,u,f,r].join("|")+")",l=RegExp(o+"(?="+o+")|"+a+s,"g");t.exports=function(t){return t.match(l)||[]}},function(t,n){var r=/\s/;t.exports=function(t){for(var n=t.length;n--&&r.test(t.charAt(n)););return n}},function(t,n,r){var e=r(37),o=r(69);t.exports=function(t,n){for(var r=0,i=(n=e(n,t)).length;null!=t&&r<i;)t=t[o(n[r++])];return r&&r==i?t:void 0}},function(t,n,r){var e=r(7),o=r(38),i=r(39),u=r(13);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:i(u(t))}},function(t,n,r){var e=r(7),o=r(8),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!o(t))||(u.test(t)||!i.test(t)||null!=n&&t in Object(n))}},function(t,n,r){var e=r(40),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,r,e,o){n.push(e?o.replace(i,"$1"):r||t)})),n}));t.exports=u},function(t,n,r){var e=r(41);t.exports=function(t){var n=e(t,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}},function(t,n,r){var e=r(42);function o(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,e);return r.cache=i.set(o,u)||i,u};return r.cache=new(o.Cache||e),r}o.Cache=e,t.exports=o},function(t,n,r){var e=r(43),o=r(64),i=r(66),u=r(67),f=r(68);function c(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}c.prototype.clear=e,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=f,t.exports=c},function(t,n,r){var e=r(44),o=r(56),i=r(63);t.exports=function(){this.size=0,this.__data__={hash:new e,map:new(i||o),string:new e}}},function(t,n,r){var e=r(45),o=r(52),i=r(53),u=r(54),f=r(55);function c(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}c.prototype.clear=e,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=f,t.exports=c},function(t,n,r){var e=r(0);t.exports=function(){this.__data__=e?e(null):{},this.size=0}},function(t,n,r){var e=r(47),o=r(48),i=r(15),u=r(50),f=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,a=c.toString,l=s.hasOwnProperty,p=RegExp("^"+a.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(e(t)?p:f).test(u(t))}},function(t,n,r){var e=r(9),o=r(15);t.exports=function(t){if(!o(t))return!1;var n=e(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},function(t,n,r){var e,o=r(49),i=(e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";t.exports=function(t){return!!i&&i in t}},function(t,n,r){var e=r(6)["__core-js_shared__"];t.exports=e},function(t,n){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]}},function(t,n){t.exports=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}},function(t,n,r){var e=r(0),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;if(e){var r=n[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(n,t)?n[t]:void 0}},function(t,n,r){var e=r(0),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;return e?void 0!==n[t]:o.call(n,t)}},function(t,n,r){var e=r(0);t.exports=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}},function(t,n,r){var e=r(57),o=r(58),i=r(60),u=r(61),f=r(62);function c(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}c.prototype.clear=e,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=f,t.exports=c},function(t,n){t.exports=function(){this.__data__=[],this.size=0}},function(t,n,r){var e=r(1),o=Array.prototype.splice;t.exports=function(t){var n=this.__data__,r=e(n,t);return!(r<0)&&(r==n.length-1?n.pop():o.call(n,r,1),--this.size,!0)}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,r){var e=r(1);t.exports=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]}},function(t,n,r){var e=r(1);t.exports=function(t){return e(this.__data__,t)>-1}},function(t,n,r){var e=r(1);t.exports=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this}},function(t,n,r){var e=r(14)(r(6),"Map");t.exports=e},function(t,n,r){var e=r(2);t.exports=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,r){var e=r(2);t.exports=function(t){return e(this,t).get(t)}},function(t,n,r){var e=r(2);t.exports=function(t){return e(this,t).has(t)}},function(t,n,r){var e=r(2);t.exports=function(t,n){var r=e(this,t),o=r.size;return r.set(t,n),this.size+=r.size==o?0:1,this}},function(t,n,r){var e=r(8);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(t,n){var r,e,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function f(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(n){try{return r.call(null,t,0)}catch(n){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{e="function"==typeof clearTimeout?clearTimeout:u}catch(t){e=u}}();var c,s=[],a=!1,l=-1;function p(){a&&c&&(a=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!a){var t=f(p);a=!0;for(var n=s.length;n;){for(c=s,s=[];++l<n;)c&&c[l].run();l=-1,n=s.length}c=null,a=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===u||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}(t)}}function v(t,n){this.fun=t,this.array=n}function d(){}o.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];s.push(new v(t,n)),1!==s.length||a||f(h)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,n,r){"use strict";r.r(n),r.d(n,"NetlifyCmsLibWidgets",(function(){return E})),r.d(n,"stringTemplate",(function(){return e})),r.d(n,"validations",(function(){return o}));var e={};r.r(e),r.d(e,"dateParsers",(function(){return d})),r.d(e,"parseDateFromEntry",(function(){return y})),r.d(e,"SLUG_MISSING_REQUIRED_DATE",(function(){return g})),r.d(e,"keyToPathArray",(function(){return m})),r.d(e,"expandPath",(function(){return x})),r.d(e,"compileStringTemplate",(function(){return b})),r.d(e,"extractTemplateVars",(function(){return _})),r.d(e,"addFileTemplateFields",(function(){return j}));var o={};r.r(o),r.d(o,"validateMinMax",(function(){return O}));var i=r(16),u=r.n(i),f=r(17),c=r.n(f),s=r(10),a=r.n(s),l=r(18),p=r(3);const h=[{pattern:/^upper$/,transform:t=>t.toUpperCase()},{pattern:/^lower$/,transform:t=>t.toLowerCase()},{pattern:/^date\('(.+)'\)$/,transform:(t,n)=>a()(t).format(n[1])}];function v(t){return("0"+t).slice(-2)}const d={year:t=>""+t.getUTCFullYear(),month:t=>v(t.getUTCMonth()+1),day:t=>v(t.getUTCDate()),hour:t=>v(t.getUTCHours()),minute:t=>v(t.getUTCMinutes()),second:t=>v(t.getUTCSeconds())};function y(t,n){if(!n)return;const r=t.getIn(["data",n]),e=r&&a()(r);return e&&e.isValid()?e.toDate():void 0}const g="SLUG_MISSING_REQUIRED_DATE";function m(t){if(!t)return[];const n=[],r=t.split("");let e,o=[];for(;e=r.shift();)["[","]","."].includes(e)?(o.length>0&&n.push(o.join("")),o=[]):o.push(e);return o.length>0&&n.push(o.join("")),n}function x({data:t,path:n,paths:r=[]}){n.endsWith(".*")&&(n+=".");const e=n.split(".*.");if(1===e.length)r.push(n);else{const n=e[0],o=c()(t,n);Array.isArray(o)&&o.forEach((o,i)=>{x({data:t,path:u()(`${n}.${i}.${e.slice(1).join(".*.")}`,"."),paths:r})})}return r}function b(t,n,r="",e=Object(l.Map)(),o){let i;const u=null!==n,f=t.replace(RegExp("{{([^}{|]+)( \\| ([^}{]+))?}}","g"),(t,u,f,c)=>{let s;const a=function(t,n){if(!t.startsWith("fields."))return;const r=t.substring("fields.".length),e=n.getIn(m(r));return"object"==typeof e&&null!==e?JSON.stringify(e):e}(u,e);if(a)s=a;else{if(d[u]&&!n)return i=!0,"";s=d[u]?d[u](n):"slug"===u?r:e.getIn(m(u),"")}if(o)return o(s);{const t=function(t){if(t){let n=null;const r=h.find(r=>(n=t.match(r.pattern),!!n));if(r)return t=>r.transform(t,n)}return null}(c);t&&(s=t(s))}return s});if(u&&i){const t=new Error;throw t.name=g,t}return f}function _(t){const n=RegExp("{{([^}{|]+)( \\| ([^}{]+))?}}","g"),r=RegExp("([^}{|]+)","g");return(t.match(n)||[]).map(t=>{const n=t.match(r);return n?n[0]:""})}function j(t,n,r=""){if(!t)return n;const e=Object(p.extname)(t),o=Object(p.basename)(t,e),i=Object(p.dirname)(t).replace(new RegExp(`^(/?)${r}/?`),"$1");return n=n.withMutations(t=>{t.set("dirname",i),t.set("filename",o),t.set("extension",""===e?e:e.substr(1))})}var w=r(4),T=r.n(w);function O(t,n,r,e,o){function i(r){return{type:"RANGE",message:t("editor.editorControlPane.widget."+r,{fieldLabel:n,minCount:e,maxCount:o,count:e})}}return[e,o,null==r?void 0:r.size].every(T.a)&&(r.size<e||r.size>o)?i(e===o?"rangeCountExact":"rangeCount"):T()(e)&&e>0&&null!=r&&r.size&&r.size<e?i("rangeMin"):T()(o)&&null!=r&&r.size&&r.size>o?i("rangeMax"):void 0}const E={stringTemplate:e,validations:o}}]).NetlifyCmsLibWidgets}));
  //# sourceMappingURL=netlify-cms-lib-widgets.js.map