scrivito_ui 1.17.0 → 1.18.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- /*! Copyright (c) 2020 Infopark Group GmbH (https://scrivito.com) */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=743)}([function(e,t,n){"use strict";n.d(t,"p",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return _})),n.d(t,"a",(function(){return s.ArgumentError})),n.d(t,"g",(function(){return s.InternalError})),n.d(t,"h",(function(){return s.ResourceNotFoundError})),n.d(t,"i",(function(){return s.ScrivitoError})),n.d(t,"Q",(function(){return p})),n.d(t,"G",(function(){return d})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return c})),n.d(t,"M",(function(){return v})),n.d(t,"F",(function(){return y})),n.d(t,"x",(function(){return b})),n.d(t,"D",(function(){return w})),n.d(t,"E",(function(){return k})),n.d(t,"o",(function(){return L})),n.d(t,"q",(function(){return P})),n.d(t,"N",(function(){return A})),n.d(t,"R",(function(){return T})),n.d(t,"y",(function(){return j})),n.d(t,"f",(function(){return I})),n.d(t,"c",(function(){return N})),n.d(t,"z",(function(){return Y})),n.d(t,"m",(function(){return R})),n.d(t,"L",(function(){return H})),n.d(t,"K",(function(){return F})),n.d(t,"P",(function(){return B})),n.d(t,"H",(function(){return G})),n.d(t,"t",(function(){return $})),n.d(t,"u",(function(){return U})),n.d(t,"B",(function(){return V})),n.d(t,"w",(function(){return K})),n.d(t,"A",(function(){return J})),n.d(t,"C",(function(){return q})),n.d(t,"S",(function(){return X})),n.d(t,"T",(function(){return ee})),n.d(t,"v",(function(){return te})),n.d(t,"J",(function(){return re})),n.d(t,"j",(function(){return ie})),n.d(t,"b",(function(){return ae})),n.d(t,"s",(function(){return se})),n.d(t,"n",(function(){return ue})),n.d(t,"r",(function(){return le})),n.d(t,"k",(function(){return pe})),n.d(t,"l",(function(){return me}));var r=n(2);function i(e){try{return Object(r.isFunction)(e)?function(e){if(function(e){return!!e._scrivitoPrivateSchema}(e)){return"[class "+e._scrivitoPrivateSchema.name+"]"}if(function(e){var t=e.prototype;return t&&t.isReactComponent}(e)){return'[class React.Component "'+(e.displayName||e.name)+'"]'}return a(e.toString())}(e):Object(r.isObject)(e)?function(e){var t=e._scrivitoPrivateContent;if(t&&Object(r.isFunction)(t.toPrettyPrint))return t.toPrettyPrint();if(Object(r.isElement)(e))return"[object HTMLElement "+o(e.outerHTML)+"]";return o(e)}(e):o(e)}catch(e){return""}}function o(e){var t=JSON.stringify(e);return t?a(t):t}function a(e){return e.length>100?e.slice(0,100)+"...":e}var s=n(52),c=n(58);c.struct.strict=!0,c.interface.strict=!0,c.fail=function(e){throw new TypeError(e)};var u,l=[];function d(e){u?l.push(e):setTimeout(e,0)}function p(e){d((function(){throw e}))}function f(e,t,n){var r=n.docPermalink;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];try{n=h(i,t)}catch(e){p(e)}if(n){var a="Visit https://scrivito.com/"+r+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+e+"': "+n+" "+a)}}}function h(e,t){var n=t.length,o=e.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(t.map((function(t,n){var r=t[0],o=t[1],a=e[n];return c.validate(a,o).errors.map((function(e){return function(e,t){var n=function(e,t){var n="argument '"+e+"'";if(0===t.path.length)return n;return"key '"+t.path.join("/")+"' in "+n}(e,t);if(void 0===t.actual)return"Missing required "+n+".";if(t.expected===c.Nil)return"Unexpected "+n+".";var r=c.getTypeName(t.expected),o="got "+i(t.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,e)}))})));return a.length>0?a.join(" "):void 0}var m=function(){function e(){}return e.prototype.current=function(){return this.currentContext},e.prototype.runWith=function(e,t){var n=this.currentContext;try{return this.currentContext=e,t()}finally{this.currentContext=n}},e}(),_=function(){function e(){var e=this;this.promise=new ie((function(t,n){e.resolve=function(n){e.settled=!0,t(n)},e.reject=function(t){e.settled=!0,n(t)}}))}return e.prototype.isPending=function(){return!this.settled},e}();function v(e){try{return{errorThrown:!1,result:e()}}catch(e){return{errorThrown:!0,error:e}}}var g=!1;function y(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window&&window.console&&!g&&(e=window.console).error.apply(e,t)}function b(){var e="1.0.0.dev-1-g8ef2d6db14a1";return e}function w(e,t){void 0===t&&(t=window.document);var n=t.createElement("link");n.rel="stylesheet",n.href=e,O(t.head,n)}function k(e,t){void 0===t&&(t=window.document);var n=t.createElement("script");n.src=e,O(t.head,n)}function O(e,t){e.appendChild(t)}var C=/(_+)(\w)/g,M=/([A-Z])/g,D=/[A-Z]+|\d+/g,x=/^_?(_+[A-Z0-9]|[^_])+$/,E=/[_\s]+/g,S=/[A-Z][a-z]+/g;function j(e){return x.test(e)}function T(e){return e.replace(M,(function(e,t){return"_"+t.toLowerCase()}))}function L(e){return e.replace(C,(function(e,t,n,r){return r?n.toUpperCase()===n?e:""+t.substr(1)+n.toUpperCase():e}))}function P(e){var t=L(e);return t.charAt(0).toUpperCase()+t.slice(1)}function A(e){return e.replace(E," ").replace(S,(function(e){return" "+e.toLowerCase()})).replace(D,(function(e){return" "+e})).trim().replace(/./,(function(e){return e.toUpperCase()}))}n(136);var N=c.interface({size:c.Number,type:c.String},{name:"Blob",strict:!1}),I=N.extend({name:c.String},{name:"File",strict:!1});function Y(e){return"_"===e[0]}function R(e,t){for(var n=e.iterator(),r=[];r.length!==t;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function F(){for(var e=Math.floor(Math.random()*Math.pow(16,8)).toString(16);e.length<8;)e="0"+e;return e}function H(){return F()+F()}var W=!1;function B(e,t,n){return W?e:r.throttle(e,t,n)}var z=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function U(e){return"string"==typeof e&&e.match(/^-?\d+$/)||"number"==typeof e?Z(e):null}function q(e){return function(e){return V(e)&&Math.floor(e)===e}(e)&&-9007199254740991<=e&&e<=9007199254740991}function V(e){return"number"==typeof e&&Object(r.isFinite)(e)}function $(e){if("string"!=typeof e)return null;if(!J(e))throw new s.InternalError('The value is not a valid ISO date time: "'+e+'"');return G(e)}function G(e){if(!e)return null;var t=e.match(z);if(!t)return null;var n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=parseInt(n,10),u=parseInt(r,10),l=parseInt(i,10),d=parseInt(o,10),p=parseInt(a,10),f=parseInt(s,10);return new Date(Date.UTC(c,u-1,l,d,p,f))}function K(e){return""+(""+e.getUTCFullYear()+Q(e.getUTCMonth()+1))+(""+Q(e.getUTCDate())+Q(e.getUTCHours()))+(""+Q(e.getUTCMinutes())+Q(e.getUTCSeconds()))}function J(e){return"string"==typeof e&&!!e.match(/^\d{14}$/)}function Q(e){return e<10?"0"+e:e}function Z(e){var t=parseInt(e.toString(),10);return 0===t?0:q(t)?t:null}function X(e){return ee(1e3*e)}function ee(e){return new ie((function(t){setTimeout(t,e)}))}function te(e,t){return ne(e)&&ne(t)?e.equals(t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Object(r.every)(Object(r.zip)(e,t),(function(e){return te(e[0],e[1])})):e&&t?e.valueOf()===t.valueOf():e===t}function ne(e){return!!e&&"function"==typeof e.equals}function re(e,t){return e.then((function(e){return t(),e}),(function(e){throw t(),e}))}var ie,oe=n(149);ie="undefined"!=typeof Promise?Promise:oe.a;var ae=function(){function e(e,t){var n=(void 0===t?{}:t).batchSize;this.mget=e,this.batchSize=n||100,this.itemsToBatch=[]}return e.prototype.retrieve=function(e){var t=this;0===this.itemsToBatch.length&&d((function(){return t.performRetrieval()}));var n=new _;return this.itemsToBatch.push({key:e,deferred:n}),n.promise},e.prototype.reset=function(){this.itemsToBatch=[]},e.prototype.performRetrieval=function(){var e=this,t=this.itemsToBatch.splice(0,this.batchSize);if(0!==t.length){var n=t.map((function(e){return e.key}));this.mget(n).then((function(n){t.forEach((function(t,r){var i=t.key,o=t.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else e.retrieve(i).then(o.resolve,o.reject)}))}),(function(e){t.forEach((function(t){return t.deferred.reject(e)}))})),this.performRetrieval()}},e}();function se(e){var t=ce(e);return JSON.stringify(t)}function ce(e){return Array.isArray(e)?e.map(ce):function(e){return"object"==typeof e&&null!==e}(e)?Object.keys(e).sort().map((function(t){return[t,ce(e[t])]})):e}var ue=Object.assign||r.extend;function le(e,t){var n=e.clientX,r=e.clientY,i=t.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}var de,pe=function(){function e(e){this.subscribeFunction=e}return e.prototype.subscribe=function(e){var t=new fe("object"==typeof e?e:{next:e}),n=this.subscribeFunction(t);return t.setUnsubscribeCallback("object"==typeof n?function(){return n.unsubscribe()}:n),t},e.prototype.map=function(t){var n=this;return new e((function(e){return n.subscribe({next:function(n){return e.next(t(n))},complete:function(){return e.complete()}})}))},e.prototype.filter=function(t){var n=this;return new e((function(e){return n.subscribe({next:function(n){t(n)&&e.next(n)},complete:function(){return e.complete()}})}))},e.prototype.toPromise=function(){var e=this;return new ie((function(t){var n;e.subscribe({next:function(e){n=e},complete:function(){t(n)}})}))},e.prototype.takeOne=function(){var t=this;return new e((function(e){var n=t.subscribe({next:function(t){n.unsubscribe(),e.next(t),e.complete()},complete:function(){e.complete()}});return n}))},e.prototype.takeUntil=function(t){var n=this;return new e((function(e){var r,i;if((i=n.subscribe({next:function(t){e.next(t)},complete:function(){o()}})).isClosed())return function(){};function o(){e.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=t.subscribe({next:function(){o()},complete:function(){o()}}),a}))},e}(),fe=function(){function e(e){this.subscriber=e}return e.prototype.next=function(e){this.subscriber&&this.subscriber.next&&this.subscriber.next(e)},e.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},e.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},e.prototype.isClosed=function(){return!this.subscriber},e.prototype.setUnsubscribeCallback=function(e){this.unsubscribeCallback=e},e}(),he=(de=function(e,t){return(de=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}de(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),me=function(e){function t(){var t=e.call(this,(function(e){if(t.isCompleted)return e.complete(),function(){};var n=(t.subscriberIdCounter++).toString();return t.subscribers[n]=e,function(){delete t.subscribers[n]}}))||this;return t.subscribers={},t.subscriberIdCounter=1,t.isCompleted=!1,t}return he(t,e),t.prototype.next=function(e){var t=this;Object.keys(this.subscribers).forEach((function(n){t.subscribers[n].next(e)}))},t.prototype.complete=function(){var e=this;Object.keys(this.subscribers).forEach((function(t){return e.subscribers[t].complete()})),this.subscribers={},this.isCompleted=!0},t.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},t.prototype.isClosed=function(){return this.isCompleted},t}(pe)},function(e,t,n){"use strict";e.exports=n(225)},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=i._,a=Array.prototype,s=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,l=a.slice,d=s.toString,p=s.hasOwnProperty,f=Array.isArray,h=Object.keys,m=Object.create,_=function(){},v=function(e){return e instanceof v?e:this instanceof v?void(this._wrapped=e):new v(e)};t.nodeType?i._=v:(!n.nodeType&&n.exports&&(t=n.exports=v),t._=v),v.VERSION="1.9.1";var g,y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return v.iteratee!==g?v.iteratee(e,t):null==e?v.identity:v.isFunction(e)?y(e,t,n):v.isObject(e)&&!v.isArray(e)?v.matcher(e):v.property(e)};v.iteratee=g=function(e,t){return b(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},k=function(e){if(!v.isObject(e))return{};if(m)return m(e);_.prototype=e;var t=new _;return _.prototype=null,t},O=function(e){return function(t){return null==t?void 0:t[e]}},C=function(e,t){return null!=e&&p.call(e,t)},M=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},D=Math.pow(2,53)-1,x=O("length"),E=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=D};v.each=v.forEach=function(e,t,n){var r,i;if(t=y(t,n),E(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=v.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},v.map=v.collect=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var S=function(e){var t=function(t,n,r,i){var o=!E(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var c=o?o[s]:s;r=n(r,t[c],c,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,y(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=S(1),v.reduceRight=v.foldr=S(-1),v.find=v.detect=function(e,t,n){var r=(E(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=b(t,n),v.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},v.reject=function(e,t,n){return v.filter(e,v.negate(b(t)),n)},v.every=v.all=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},v.some=v.any=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},v.contains=v.includes=v.include=function(e,t,n,r){return E(e)||(e=v.values(e)),("number"!=typeof n||r)&&(n=0),v.indexOf(e,t,n)>=0},v.invoke=w((function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=M(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))})),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r>o&&(o=r);else t=b(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r<o&&(o=r);else t=b(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o},v.shuffle=function(e){return v.sample(e,1/0)},v.sample=function(e,t,n){if(null==t||n)return E(e)||(e=v.values(e)),e[v.random(e.length-1)];var r=E(e)?v.clone(e):v.values(e),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=v.random(a,o),c=r[a];r[a]=r[s],r[s]=c}return r.slice(0,t)},v.sortBy=function(e,t,n){var r=0;return t=b(t,n),v.pluck(v.map(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")};var j=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=b(r,i),v.each(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}};v.groupBy=j((function(e,t,n){C(e,n)?e[n].push(t):e[n]=[t]})),v.indexBy=j((function(e,t,n){e[n]=t})),v.countBy=j((function(e,t,n){C(e,n)?e[n]++:e[n]=1}));var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;v.toArray=function(e){return e?v.isArray(e)?l.call(e):v.isString(e)?e.match(T):E(e)?v.map(e,v.identity):v.values(e):[]},v.size=function(e){return null==e?0:E(e)?e.length:v.keys(e).length},v.partition=j((function(e,t,n){e[n?0:1].push(t)}),!0),v.first=v.head=v.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:v.initial(e,e.length-t)},v.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},v.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))},v.rest=v.tail=v.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},v.compact=function(e){return v.filter(e,Boolean)};var L=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=x(e);o<a;o++){var s=e[o];if(E(s)&&(v.isArray(s)||v.isArguments(s)))if(t)for(var c=0,u=s.length;c<u;)r[i++]=s[c++];else L(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};v.flatten=function(e,t){return L(e,t,!1)},v.without=w((function(e,t){return v.difference(e,t)})),v.uniq=v.unique=function(e,t,n,r){v.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=b(n,r));for(var i=[],o=[],a=0,s=x(e);a<s;a++){var c=e[a],u=n?n(c,a,e):c;t&&!n?(a&&o===u||i.push(c),o=u):n?v.contains(o,u)||(o.push(u),i.push(c)):v.contains(i,c)||i.push(c)}return i},v.union=w((function(e){return v.uniq(L(e,!0,!0))})),v.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!v.contains(t,o)){var a;for(a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},v.difference=w((function(e,t){return t=L(t,!0,!0),v.filter(e,(function(e){return!v.contains(t,e)}))})),v.unzip=function(e){for(var t=e&&v.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=v.pluck(e,r);return n},v.zip=w(v.unzip),v.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var P=function(e){return function(t,n,r){n=b(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};v.findIndex=P(1),v.findLastIndex=P(-1),v.sortedIndex=function(e,t,n,r){for(var i=(n=b(n,r,1))(t),o=0,a=x(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var A=function(e,t,n){return function(r,i,o){var a=0,s=x(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(l.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}};v.indexOf=A(1,v.findIndex,v.sortedIndex),v.lastIndexOf=A(-1,v.findLastIndex),v.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},v.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(l.call(e,r,r+=t));return n};var N=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=w((function(e,t,n){if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w((function(i){return N(e,r,t,this,n.concat(i))}));return r})),v.partial=w((function(e,t){var n=v.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return N(e,r,this,this,a)};return r})),v.partial.placeholder=v,v.bindAll=w((function(e,t){var n=(t=L(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=v.bind(e[r],e)}})),v.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return C(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=w((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),v.defer=v.partial(v.delay,v,1),v.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:v.now(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=v.now();s||!1!==n.leading||(s=u);var l=t-(u-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var I=!{toString:null}.propertyIsEnumerable("toString"),Y=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(e,t){var n=Y.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(C(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=Y[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)C(e,n)&&t.push(n);return I&&R(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return I&&R(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},v.mapObject=function(e,t,n){t=b(t,n);for(var r=v.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},v.pairs=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},v.invert=function(e){for(var t={},n=v.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},v.functions=v.methods=function(e){var t=[];for(var n in e)v.isFunction(e[n])&&t.push(n);return t.sort()};var F=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,c=0;c<s;c++){var u=a[c];t&&void 0!==n[u]||(n[u]=o[u])}return n}};v.extend=F(v.allKeys),v.extendOwn=v.assign=F(v.keys),v.findKey=function(e,t,n){t=b(t,n);for(var r,i=v.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var H,W,B=function(e,t,n){return t in n};v.pick=w((function(e,t){var n={},r=t[0];if(null==e)return n;v.isFunction(r)?(t.length>1&&(r=y(r,t[1])),t=v.allKeys(e)):(r=B,t=L(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),v.omit=w((function(e,t){var n,r=t[0];return v.isFunction(r)?(r=v.negate(r),t.length>1&&(n=t[1])):(t=v.map(L(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)})),v.defaults=F(v.allKeys,!0),v.create=function(e,t){var n=k(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},H=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&W(e,t,n,r)},W=function(e,t,n,r){e instanceof v&&(e=e._wrapped),t instanceof v&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!H(e[u],t[u],n,r))return!1}else{var l,p=v.keys(e);if(u=p.length,v.keys(t).length!==u)return!1;for(;u--;)if(l=p[u],!C(t,l)||!H(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0},v.isEqual=function(e,t){return H(e,t)},v.isEmpty=function(e){return null==e||(E(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)},v.isElement=function(e){return!(!e||1!==e.nodeType)},v.isArray=f||function(e){return"[object Array]"===d.call(e)},v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},v.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){v["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}})),v.isArguments(arguments)||(v.isArguments=function(e){return C(e,"callee")});var z=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(v.isFunction=function(e){return"function"==typeof e||!1}),v.isFinite=function(e){return!v.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},v.isNaN=function(e){return v.isNumber(e)&&isNaN(e)},v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},v.isNull=function(e){return null===e},v.isUndefined=function(e){return void 0===e},v.has=function(e,t){if(!v.isArray(t))return C(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!p.call(e,i))return!1;e=e[i]}return!!n},v.noConflict=function(){return i._=o,this},v.identity=function(e){return e},v.constant=function(e){return function(){return e}},v.noop=function(){},v.property=function(e){return v.isArray(e)?function(t){return M(t,e)}:O(e)},v.propertyOf=function(e){return null==e?function(){}:function(t){return v.isArray(t)?M(e,t):e[t]}},v.matcher=v.matches=function(e){return e=v.extendOwn({},e),function(t){return v.isMatch(t,e)}},v.times=function(e,t,n){var r=Array(Math.max(0,e));t=y(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},v.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},v.now=Date.now||function(){return(new Date).getTime()};var U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=v.invert(U),V=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=V(U),v.unescape=V(q),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=v.isFunction(o)?o.call(e):o}return e};var $=0;v.uniqueId=function(e){var t=++$+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var G=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+K[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||G).source,(t.interpolate||G).source,(t.evaluate||G).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(J,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},c=t.variable||"obj";return s.source="function("+c+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),(function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),Z(this,n.apply(v,e))}})),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}})),v.each(["concat","join","slice"],(function(e){var t=a[e];v.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}})),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(41),n(79)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"AnyNormalizedSingleTypeInfo",(function(){return i.AnyNormalizedSingleTypeInfo})),n.d(t,"AnyNormalizedTypeInfo",(function(){return i.AnyNormalizedTypeInfo})),n.d(t,"AnyNormalizedTypeOptions",(function(){return i.AnyNormalizedTypeOptions})),n.d(t,"AnyTypeInfo",(function(){return i.AnyTypeInfo})),n.d(t,"AnyTypeOptions",(function(){return i.AnyTypeOptions})),n.d(t,"NormalizedTypeInfo",(function(){return i.NormalizedTypeInfo})),n.d(t,"AttributeType",(function(){return o.AttributeType})),n.d(t,"BasicAttributeDict",(function(){return o.BasicAttributeDict})),n.d(t,"BasicAttributeValue",(function(){return o.BasicAttributeValue})),n.d(t,"BasicAttributeValueForUpdate",(function(){return o.BasicAttributeValueForUpdate})),n.d(t,"SystemAttributeValue",(function(){return o.SystemAttributeValue})),n.d(t,"BasicField",(function(){return s})),n.d(t,"BasicLink",(function(){return Se})),n.d(t,"BasicLinkAttributes",(function(){})),n.d(t,"BasicObjFacetValue",(function(){return m})),n.d(t,"ObjSearchParams",(function(){})),n.d(t,"BasicObjSearch",(function(){return b})),n.d(t,"OPERATORS",(function(){return _})),n.d(t,"BasicSearchValue",(function(){})),n.d(t,"SearchField",(function(){})),n.d(t,"SearchOperator",(function(){})),n.d(t,"Boost",(function(){})),n.d(t,"BasicObj",(function(){return ke})),n.d(t,"MaybeBasicObj",(function(){})),n.d(t,"setLinkHandler",(function(){return De})),n.d(t,"LinkHandler",(function(){})),n.d(t,"BasicWidget",(function(){return ce})),n.d(t,"TransformationDefinition",(function(){})),n.d(t,"Binary",(function(){return V})),n.d(t,"BlobMock",(function(){})),n.d(t,"FutureBinary",(function(){return F})),n.d(t,"FutureBinaryOptions",(function(){})),n.d(t,"IdToCopySource",(function(){})),n.d(t,"SourceSource",(function(){})),n.d(t,"setBinaryHandler",(function(){return N})),n.d(t,"BinaryHandler",(function(){})),n.d(t,"MetadataCollection",(function(){return z})),n.d(t,"BinaryMetadataValue",(function(){})),n.d(t,"ObjSearchType",(function(){return j})),n.d(t,"LinkType",(function(){return S})),n.d(t,"ObjType",(function(){return x})),n.d(t,"WidgetType",(function(){return E})),n.d(t,"BinaryType",(function(){return T})),n.d(t,"QueryParameters",(function(){})),n.d(t,"parseQuery",(function(){return l})),n.d(t,"queryParametersFromUrl",(function(){return d})),n.d(t,"currentWorkspaceId",(function(){return re})),n.d(t,"resetCurrentWorkspaceId",(function(){return oe})),n.d(t,"setCurrentWorkspaceId",(function(){return ie})),n.d(t,"getPlacementModificationInfos",(function(){return je})),n.d(t,"PlacementModification",(function(){}));var r={};n.r(r),n.d(r,"deserialize",(function(){return J}));var i=n(54),o=n(57),a=n(11),s=function(){function e(e,t,n){this.container=e,this.attributeName=t,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return e.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},e.prototype.update=function(e){var t;this.container.update(((t={})[this.attributeName]=[e,this.typeInfo],t))},e.prototype.getContainer=function(){return this.container},e.prototype.obj=function(){return this.container.obj()},e.prototype.name=function(){return this.attributeName},e.prototype.type=function(){return this.typeInfo[0]},e.prototype.workspaceId=function(){return this.obj().workspaceId()},e.prototype.equals=function(t){return t instanceof e&&(this.container.equals(t.getContainer())&&this.attributeName===t.name())},e.prototype.validClasses=function(){return this.typeOptions.validClasses},e.prototype.getDiff=function(){var e=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,e.id(),this.container===e?void 0:this.container.id())},e.prototype.toString=function(){var e=this.obj(),t=this.attributeName;return this.container===e?"<BasicField name="+t+" objId="+e.id()+">":"<BasicField name="+t+" objId="+e.id()+" widgetId="+this.container.id()+">"},e.prototype.id=function(){var e=this.obj();return this.container===e?this.attributeName+"|"+e.id():this.attributeName+"|"+e.id()+"|"+this.container.id()},e}(),c=n(0),u=n(12);function l(e){return u.parseQuery(e)}function d(e){return new u(e).query(!0)}var p=n(2),f=n.n(p),h=n(107);var m=function(){function e(e){var t=e.name,n=e.count,r=e.includedObjIds;this._name=t,this._count=n,this._includedObjIds=r}return e.prototype.name=function(){return this._name},e.prototype.count=function(){return this._count},e.prototype.includedObjs=function(){return Object(p.compact)(this._includedObjIds.map((function(e){return ke.get(e)})))},e}(),_=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],v=["equals","startsWith","isGreaterThan","isLessThan"],g=["contains","containsPrefix"],y={query:[]},b=function(){function e(e){void 0===e&&(e=y);this._query=[].concat(e.query),this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return e.prototype.and=function(t,n,r,i){if(t instanceof e)this._query=this._query.concat(t._query);else{if(void 0===n)throw new c.a("Missing operator to search with");if(void 0===r)throw new c.a('Missing value to search (specify "null" for missing)');var o=w(t,n,r);i&&(!function(e){if(!Object(p.contains)(g,e))throw new c.a('Boosting operator "'+e+'" is invalid.')}(n),o.boost=function(e){var t={};return Object(p.each)(e,(function(e,n){var r=O(n);t[r]=e})),t}(i)),this._query.push(o)}return this},e.prototype.andNot=function(e,t,n){var r=w(e,t,n);return function(e){if(!Object(p.contains)(v,e))throw new c.a('Negating operator "'+e+'" is invalid.')}(t),r.negate=!0,this._query.push(r),this},e.prototype.offset=function(e){return this._offset=e,this},e.prototype.order=function(e,t){return void 0===t&&(t="asc"),this._sortBy=O(e),this._sortDirection=t,this},e.prototype.batchSize=function(e){return this._batchSize=e,this},e.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},e.prototype.count=function(){return this.getObjDataQuery().count()},e.prototype.first=function(){return this.take(1)[0]||null},e.prototype.take=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];D.apply(void 0,[e].concat(t));var r=this._batchSize;try{return this._batchSize=void 0===e?1e3:e,Object(c.m)(this,e)}finally{this._batchSize=r}},e.prototype.iterator=function(){var e=this.getObjDataQuery().iterator();return{next:function(){var t=e.next(),n=t.done,r=t.value;return n?{done:!0}:{done:!1,value:new ke(r)}}}},e.prototype.getObjDataQuery=function(){return Object(a.j)(re(),this.params(),this.getBatchSize())},e.prototype.getBatchSize=function(){return this._batchSize||100},e.prototype.facet=function(e,t){var n;return n=void 0===t?{}:function(e){var t=p.without.apply(void 0,[Object.keys(e)].concat(C));if(t.length)throw new c.a("Invalid facet options: "+Object(c.I)(t)+". Valid options: "+C);return e}(t),new a.a(re(),O(e),n,this._query).result().map((function(e){return new m(e)}))},e.prototype.store=function(e,t){Object(a.p)(re(),this.params(),e,t)},e.prototype.params=function(){return Object(p.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},p.isUndefined)},e}();function w(e,t,n){return{field:function(e){if(Object(p.isArray)(e))return Object(p.map)(e,O);return O(e)}(e),operator:function(e){if(!function(e){return Object(p.contains)(_,e)}(e))throw new c.a('Operator "'+e+'" is invalid.');return Object(c.R)(e)}(t),value:function(e){if(Object(p.isArray)(e))return Object(p.map)(e,k);return k(e)}(n)}}function k(e){return Object(p.isDate)(e)?Object(c.w)(e):e instanceof ke?e.id():e}function O(e){if(!Object(c.y)(e))throw new c.a('Attribute name "'+e+'" is not camel case.');return Object(c.R)(e)}var C=["limit","includeObjs"];var M=c.O.refinement(c.O.Number,(function(e){return e>=0}),"Number (positive)"),D=Object(c.p)("objSearch.take",[["count",c.O.maybe(M)]],{docPermalink:"js-sdk/ObjSearch-take"}),x=c.O.irreducible("Obj",(function(e){return L(e,ke)})),E=c.O.irreducible("Widget",(function(e){return L(e,ce)})),S=c.O.irreducible("Link",(function(e){return L(e,Se)})),j=c.O.irreducible("ObjSearch",(function(e){return L(e,b)})),T=c.O.irreducible("Binary",(function(e){return e instanceof V}));function L(e,t){return!!e&&e._scrivitoPrivateContent instanceof t}var P,A=n(7);function N(e){P=e}var I=function(){function e(e,t){void 0===t&&(t={});var n=t.filename;if(this.contentType=t.contentType,e.idToCopy)this.idToCopy=e.idToCopy;else{var r=e.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return e.prototype.into=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Y.apply(void 0,[e].concat(t)),Object(A.g)("Changing CMS content"),this.intoId(e._scrivitoPrivateContent.id())},e.prototype.intoId=function(e){if(!P)throw new c.g("No binaryHandler defined!");var t;if(this.idToCopy)t=P.copyBinary(this.idToCopy,e,this.filename,this.contentType);else{if(!this.source)throw new c.g("Source is not defined!");t=P.uploadBinary(e,this.source,this.filename,this.contentType)}return t.then((function(e){var t=e.id;return new V(t,!1)}))},e}(),Y=Object(c.p)("FutureBinary#into",[["target",x]],{docPermalink:"js-sdk/FutureBinary-into"});var R,F=I,H=n(5),W=n(9);!function(e){e.Date="date",e.Number="number",e.String="string",e.Stringlist="stringlist"}(R||(R={}));var B=new H.LoadableCollection({name:"metadata",state:function(){return A.c.subState("metadataCollection")},loader:function(e){return W.e.retrieveBinaryMetadata(e)}}),z=function(){function e(e){this.binaryId=e,e&&(this.loadableData=B.get(e))}return e.store=function(e,t){U(t),B.get(e).set(t)},e.prototype.get=function(e){Object(a.c)("MetadataCollection#get"),function(e){if(!Object(c.y)(e))throw new c.a('Metadata key "'+e+'" is not in camel case.')}(e);var t=this.getData();if(t){var n=Object(c.R)(e);return t.hasOwnProperty(n)?t[n]:null}return null},e.prototype.keys=function(){var e=this.getData();return e?Object(p.map)(Object(p.keys)(e),c.o):[]},e.prototype.contentLength=function(){var e=this.get("contentLength");return"number"!=typeof e?0:e},e.prototype.contentType=function(){var e=this.get("contentType");return"string"!=typeof e?"":e},e.prototype.getData=function(){if(this.loadableData){var e=this.loadableData.get();if(e)return U(e)}},e}();function U(e){for(var t=e.meta_data,n={},r=0,i=Object.keys(t);r<i.length;r++){var o=i[r],a=t[o],s=a[0],u=a[1];if(null==u)throw new c.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var l=void 0;if(s===R.Date){if("string"!=typeof u)throw new c.g('Invalid non-string backend value for a date metadata "'+o+'"');l=Object(c.t)(u)}else l=u;n[o]=l}return n}var q=new H.LoadableCollection({name:"binary",state:function(){return A.c.subState("binary")},loader:function(e){var t=e[0],n=e[1];return W.e.retrieveBinaryUrls(t,n)}}),V=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n={}),this._id=e,this._isPublic=!!t,this._transformation=n||void 0,this._loadableData=q.get([e,this._transformation])}return e.upload=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(K.apply(void 0,[e,t].concat(n)),!(c.f.is(e)||t&&t.filename))throw new c.a("Expected a filename to be passed with Blob as the source.");return new F({source:e},t)},e.store=function(t,n,r){var i=n.transformation;q.get([t,i]).set(r);var o=new e(t).raw();return i?o.optimizeFor(i):o},e.storeMetadata=function(e,t){z.store(e,t)},e.prototype.id=function(){return this._id},e.prototype.copy=function(e){return new F({idToCopy:this._id},e)},e.prototype.isPrivate=function(){return!this._isPublic},e.prototype.optimizeFor=function(t){return new e(this._id,this._isPublic,Object(p.extend)({},this._transformation,t))},e.prototype.original=function(){return new e(this._id,this._isPublic,{})},e.prototype.raw=function(){return new e(this._id,this._isPublic,null)},e.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(p.isEmpty)(this._transformation)},e.prototype.isRaw=function(){return!this.isTransformed()},e.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},e.prototype.urlWithoutPlaceholder=function(){var e=this._loadableData.get();if(e){var t=e[this.accessType()];if(!t)throw new c.g("Missing key "+this.accessType+" in binary data");return t.get.url}},e.prototype.filename=function(){var e=this.url();return!e||e.match(/^data:/)?"":u(e).path().split("/").pop()||""},e.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new z(this._id)},e.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},e.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},e.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var e=/[^.\\]*$/.exec(this.raw().filename());if(e)return e[0].toLowerCase()}return""},e.prototype.equals=function(t){return t instanceof e&&t.id()===this.id()&&t.isPrivate()===this.isPrivate()&&Object(p.isEqual)(t.definition(),this.definition())},e.prototype.isImage=function(){var e=this.raw().contentType();return!!e&&"image"===e.split("/")[0]},e.prototype.definition=function(){return this._transformation||null},e.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},e.prototype.assertNotTransformed=function(e){if(this.isTransformed())throw new c.i('"'+e+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},e.prototype.isTransformed=function(){return!!this._transformation},e}(),$=c.O.struct({contentType:c.O.maybe(c.O.String),filename:c.O.maybe(c.O.String)}),G=c.O.refinement(c.O.Object,(function(e){return c.c.is(e)||c.f.is(e)}),"Blob or File"),K=Object(c.p)("Binary.upload",[["source",G],["options",c.O.maybe($)]],{docPermalink:"js-sdk/Binary-static-upload"});function J(e,t,n,r){var i=t[0],o=t[1];switch(n){case"binary":return function(e,t){if("binary"===e&&t){var n=t.id,r="published"===re();return new V(n,r)}return null}(i,o);case"date":return function(e,t){if("date"!==e)return null;return Object(c.t)(t)}(i,o);case"float":return function(e,t){switch(e){case"string":return t.match(/^-?\d+(\.\d+)?$/)?Q(t):null;case"number":return Q(t);default:return null}}(i,o);case"enum":return function(e,t,n){var r=n.values;if("string"===e&&f.a.contains(r,t))return t;return null}(i,o,r);case"html":return function(e,t){if(f.a.contains(["html","string"],e)&&f.a.isString(t))return t;return""}(i,o);case"integer":return function(e,t){switch(e){case"string":case"number":return Object(c.u)(t);default:return null}}(i,o);case"link":return function(e,t){if("link"!==e||!f.a.isObject(t))return null;return Z(t)}(i,o);case"linklist":return function(e,t){if(!f.a.isArray(t))return[];return f.a.compact(t.map(Z))}(0,o);case"multienum":return function(e,t,n){var r=n.values;if("stringlist"!==e||!Array.isArray(t))return[];return f.a.intersection(t,r)}(i,o,r);case"reference":return function(e,t,n){if("reference"===e&&t)return X(t,n);return null}(i,o,e);case"referencelist":return function(e,t,n){if("referencelist"!==e)return[];if(!t)return[];var r=t.map((function(e){return X(e,n)}));return f.a.compact(r)}(i,o,e);case"string":return function(e,t){if(f.a.contains(["html","string"],e)&&f.a.isString(t))return t;return""}(i,o);case"stringlist":return function(e,t){if("stringlist"!==e||!Array.isArray(t))return[];return t}(i,o);case"widgetlist":return function(e,t,n){if("widgetlist"!==e)return[];return f.a.map(t,(function(e){return n.widget(e)}))}(i,o,e);default:return null}}function Q(e){var t=parseFloat(e);return Object(c.B)(t)?t:null}function Z(e){var t=f.a.pick(e,"query","rel","target","title","url");"fragment"in e&&(t.hash=e.fragment),"obj_id"in e&&(t.objId=e.obj_id);var n=new Se(t);return n.isBroken()?null:n}function X(e,t){var n=ke.getInWorkspace(t.workspaceId(),e);return n||null}var ee=function(){function e(){}return e.prototype.get=function(e,t){var n=Object(c.R)(e),i=this.getAttributeData(n);return i&&p.isArray(i)||(i=[]),"string"==typeof t?J(this,i,t):J.apply(r,[this,i].concat(t))},e.prototype.serializeAttributes=function(e){var t=this;return p.mapObject(e,(function(e,n){if(function(e){return p.isArray(e)&&"widgetlist"===e[0]}(e)){var r=Object(c.o)(n);return["widgetlist",p.invoke(t.get(r,["widgetlist"]),"serializeAttributes")]}return e}))},e.prototype.persistWidgets=function(e,t){p.each(t,(function(t){if(function(e){if(!e)return!1;if(!p.isArray(e))return!1;if(e.length<2)return!1;var t=e[1];return p.isArray(t)&&t.length>0&&"widgetlist"===t[0]}(t)){var n=t[0];if(n){var r=p.isArray(n)?n:[n];p.each(r,(function(t){t.isPersisted()||t.persistInObj(e)}))}}}))},e}();function te(e){return p.mapObject(e,(function(e,t){if(Object(c.z)(t))return p.isArray(e)?e:[e];if(!p.isArray(e))throw new c.g("Value for "+t+" should be a tuple: [value, typeInfo]");var n=e[0],r=e[1];return"string"==typeof r?[n,[r]]:[n,r]}))}var ne;function re(){return ne||"published"}function ie(e){ne=e}function oe(){ne=void 0}var ae,se=(ae=function(e,t){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ae(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ce=function(e){function t(t){var n=e.call(this)||this;return n._attributesToBeSaved=te(t),function(e){if(!e)throw new c.a('Please provide a widget class as the "_objClass" property.')}(t._objClass),n}return se(t,e),t.build=function(e,n){var r=Object.create(t.prototype);return r._obj=n,r._id=e,r},t.newWithSerializedAttributes=function(e){var n={},r={};f.a.each(e,(function(e,i){if("_obj_class"!==i)if(f.a.isArray(e)&&"widgetlist"===f.a.first(e)){var o=f.a.map(f.a.last(e),(function(e){return t.newWithSerializedAttributes(e)})),a=Object(c.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=e;else n._objClass=[e]}));var i=new t(n);return i.preserializedAttributes=r,i},t.prototype.id=function(){return this._failIfNotPersisted(),this._id},t.prototype.objClass=function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]},t.prototype.obj=function(){return this._failIfNotPersisted(),this._obj},t.prototype.widget=function(e){return this.obj().widget(e)},t.prototype.workspaceId=function(){return this.obj().workspaceId()},t.prototype.modification=function(){return Object(a.k)(re(),this.obj().id(),this.id())},t.prototype.update=function(e){var t=this,n=te(e);Object(A.r)((function(){t.persistWidgets(t.obj(),n);var e=de(n);t._updateSelf(e)}))},t.prototype.insertBefore=function(e){e.obj().insertWidget(this,{before:e})},t.prototype.insertAfter=function(e){e.obj().insertWidget(this,{after:e})},t.prototype.remove=function(){this.obj().removeWidget(this)},t.prototype.copy=function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()},t.prototype.persistInObj=function(e){this.persistWidgets(e,this._attributesToBeSaved);var t=de(this._attributesToBeSaved);f.a.extend(t,this.preserializedAttributes||{}),this._obj=e,this._id=e.generateWidgetId(),this._updateSelf(t),this._executeDidPersistCallback()},t.prototype.isPersisted=function(){return!!this._obj},t.prototype.onDidPersist=function(e){if(this.isPersisted())throw new c.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=e},t.prototype.hasOnDidPersistCallback=function(){return!!this._onDidPersistCallback},Object.defineProperty(t.prototype,"attributesToBeSaved",{get:function(){return this._attributesToBeSaved},enumerable:!0,configurable:!0}),t.prototype.finishSaving=function(){return this.obj().finishSaving()},t.prototype.equals=function(e){return e instanceof t&&(this.id()===e.id()&&this.obj().id()===e.obj().id())},t.prototype.containingField=function(){return this.obj().fieldContainingWidget(this)},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'" objId="'+this.obj().id()+'"]'},t.prototype.getAttributeData=function(e){return this.obj().getWidgetAttribute(this.id(),e)},t.prototype.getData=function(){return this.obj().getWidgetData(this.id())},t.prototype.serializeAttributes=function(){return e.prototype.serializeAttributes.call(this,this.getData())},t.prototype._failIfNotPersisted=function(){if(!this.isPersisted())throw new c.i("Can not access a new widget before it has been saved.")},t.prototype._updateSelf=function(e){var t,n={_widgetPool:[(t={},t[this.id()]=e,t)]};this.obj().update(n)},t.prototype._executeDidPersistCallback=function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)},t.prototype._copyPersisted=function(){var e=this.serializeAttributes();return t.newWithSerializedAttributes(e)},t.prototype._copyUnpersisted=function(){var e=new t(f.a.mapObject(this._attributesToBeSaved,(function(e){var t=e[0],n=e[1];return n&&"widgetlist"===n[0]?[f.a.invoke(t,"copy"),n]:[t,n]})));return this._onDidPersistCallback&&e.onDidPersist(this._onDidPersistCallback),e},t}(ee);function ue(e){if(e instanceof Se)return!0;if(!p.isObject(e))return!1;var t=p.without(p.keys(e),"hash","obj_id","query","rel","target","title","url");return p.isEmpty(t)}function le(e){var t,n=e instanceof Se?{rel:(t=e).rel()||void 0,query:t.query(),target:t.target(),title:t.title(),url:t.url(),obj_id:t.objId(),fragment:t.hash()}:function(e){return{obj_id:e.obj_id||null,query:e.query||null,rel:e.rel||void 0,target:e.target||null,title:e.title||null,url:e.url||null,fragment:e.hash||null}}(e);return n.rel||delete n.rel,n}function de(e){var t={};return f.a.each(e,(function(e,n){var r=e[0],i=e[1],o=function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");return Object(c.R)(e)}(n);if(Object(c.z)(o))t[o]=r;else{var a=i[0],s=i[1];t[o]=[pe(a,n),he(fe(a,s,r,n))]}})),t}function pe(e,t){switch(e){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return e;default:throw new c.a('Attribute "'+t+'" is of unsupported type "'+e+'".')}}function fe(e,t,n,r){if(null===n)return n;switch(e){case"binary":return function(e,t){if(e instanceof V)return{id:e.id()};me(e,t,"A Binary.")}(n,r);case"date":return function(e,t){if(f.a.isDate(e))return Object(c.w)(e);if(Object(c.A)(e))return e;me(e,t,"A Date.")}(n,r);case"enum":return function(e,t,n){var r=e.values;if(f.a.contains(r,t))return t;me(t,n,'Valid attribute values are contained in its "values" array ['+r+"].")}(t,n,r);case"float":return function(e,t){if(Object(c.B)(e))return e;var n=e;f.a.isNumber(e)&&(n=String(e));me(n,t,"A Number, that is #isFinite().")}(n,r);case"html":return function(e,t){if(f.a.isString(e))return e;me(e,t,"A String.")}(n,r);case"integer":return function(e,t){if(Object(c.C)(e))return e;me(e,t,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(e,t){if(ue(e))return le(e);me(e,t,"A Link instance.")}(n,r);case"linklist":return function(e,t){if(f.a.isArray(e)&&f.a.every(e,ue))return f.a.map(e,le);me(e,t,"An array of Link instances.")}(n,r);case"multienum":return function(e,t,n){var r=e.values,i="An array with values from "+Object(c.I)(r)+".";f.a.isArray(t)&&f.a.every(t,f.a.isString)||me(t,n,i);var o=f.a.difference(t,r);if(o.length){var a=i+" Forbidden values: "+Object(c.I)(o)+".";me(t,n,a)}return t}(t,n,r);case"reference":return function(e,t){if(ve(e))return _e(e);me(e,t,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(e,t){if(function(e){return f.a.isArray(e)&&f.a.every(e,(function(e){return ve(e)}))}(e))return f.a.map(e,_e);me(e,t,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(e,t){if(ge(e))return e.toString();me(e,t,"A String.")}(n,r);case"stringlist":return function(e,t){if(f.a.isArray(e)&&f.a.every(e,(function(e){return ge(e)})))return f.a.invoke(e,"toString");me(e,t,"An array of strings.")}(n,r);case"widgetlist":return function e(t,n){if(t instanceof ce)return e([t],n);if(f.a.isArray(t)&&f.a.every(t,(function(e){return e instanceof ce})))return f.a.invoke(t,"id");me(t,n,"An array of BasicWidget instances.")}(n,r);default:throw new c.g('serializeAttributeValue is not implemented for "'+e+'".')}}function he(e){return(f.a.isString(e)||f.a.isArray(e))&&f.a.isEmpty(e)?null:e}function me(e,t,n){throw new c.a("Unexpected value "+Object(c.I)(e)+' for attribute "'+t+'". Expected: '+n)}function _e(e){return e instanceof ke?e.id():e}function ve(e){return f.a.isString(e)||e instanceof ke}function ge(e){return f.a.isString(e)||f.a.isNumber(e)}var ye,be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),we=function(e){function t(t){var n=e.call(this)||this;return n.objData=t,n}return be(t,e),t.get=function(e){var t=this.getIncludingDeleted(e);return!t||t.isDeleted()?null:t},t.getInWorkspace=function(e,t){var n=this.getIncludingDeletedInWorkspace(e,t);return!n||n.isDeleted()?null:n},t.getIncludingDeleted=function(e){return this.getIncludingDeletedInWorkspace(re(),e)},t.getIncludingDeletedInWorkspace=function(e,n){var r=Object(a.i)(e,n);if(!r)return null;var i=new t(r);return i.isFinallyDeleted()?null:i},t.create=function(e){return this.createInWorkspace(re(),e)},t.createInWorkspace=function(e,t){var n=te(t);!function(e){if(!e)throw new c.a('Please provide an obj class as the "_objClass" property.')}(n._objClass),n._id||(n._id=[this.generateId()]);var r={_id:n._id,_obj_class:n._objClass};return this.createWithSerializedAttributes(e,p.mapObject(r,(function(e){return e[0]})),p.omit(t,"_objClass","_id"))},t.createFromFile=function(e,t){var n=this.create(t);return V.upload(e).intoId(n.id()).then((function(e){return n.update({blob:[e,["binary"]]}),n.finishSaving().then((function(){return n}))}))},t.addChildWithSerializedAttributes=function(e,n){var r=t.generateId();return this.createWithSerializedAttributes(re(),p.extend({},n,{_id:r,_path:e+"/"+r}))},t.createWithSerializedAttributes=function(e,n,r){if(!r){var i=function(e){var t={},n={};p.each(e,(function(e,r){if(a=e,p.isArray(a)&&"widgetlist"===p.first(a)){var i=p.map(e[1],Oe),o=Object(c.o)(r);n[o]=[i,["widgetlist"]]}else t[r]=e;var a})),t._id||(t._id=we.generateId());return[t,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(e,o,s)}var u=Object(a.d)(e,n._id);u.update(n);var l=new t(u);return l.update(r),l},t.generateId=function(){return Object(c.L)()},t.all=function(){return(new b).batchSize(1e3)},t.root=function(){return t.getByPath("/")},t.where=function(e,t,n,r){return(new b).and(e,t,n,r)},t.getByPath=function(e){var t=this.where("_path","equals",e).first();return t||null},t.getByPermalink=function(e){var t=this.where("_permalink","equals",e).first();return t||null},t.getAllByPermalink=function(e){return this.where("_permalink","equals",e).take()},t.generateWidgetId=function(){return Object(c.K)()},t.prototype.id=function(){return this.getAttributeData("_id")},t.prototype.objClass=function(){return this.getAttributeData("_obj_class")},t.prototype.obj=function(){return this},t.prototype.createdAt=function(){return Object(c.H)(this.getAttributeData("_created_at"))},t.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},t.prototype.lastChanged=function(){var e=this.getAttributeData("_last_changed");return e?Object(c.H)(e):null},t.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},t.prototype.version=function(){return this.getAttributeData("_version")},t.prototype.workspaceId=function(){return this.objData.workspaceId()},t.prototype.path=function(){return this.getAttributeData("_path")||null},t.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},t.prototype.parentPath=function(){var e=this.path();return e&&"/"!==e?function(e){var t=e.split("/");if(t.pop(),1===t.length)return"/";return t.join("/")}(e):null},t.prototype.parent=function(){var e=this.parentPath();return e?t.getByPath(e):null},t.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},t.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},t.prototype.isModified=function(){return!!this.modification()},t.prototype.isNew=function(){return"new"===this.modification()},t.prototype.isEdited=function(){return"edited"===this.modification()},t.prototype.isDeleted=function(){return"deleted"===this.modification()},t.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},t.prototype.contentLength=function(){return this.metadata().contentLength()},t.prototype.contentType=function(){return this.metadata().contentType()},t.prototype.contentUrl=function(){var e=this.blob();return e?e.url():""},t.prototype.metadata=function(){var e=this.blob();return e?new z(e.id()):new z},t.prototype.children=function(){var e=this.path();return e?Ce(e).take():[]},t.prototype.hasChildren=function(){var e=this.path();return!!e&&Ce(e).batchSize(0).count()>0},t.prototype.orderedChildren=function(){var e=this.children(),t=this.get("childOrder","referencelist");return p.isArray(t)?p.sortBy(e,(function(e){var n=p.invoke(t,"id").indexOf(e.id());return-1===n?t.length:n})):e},t.prototype.backlinks=function(){return t.where("*","linksTo",this).take()},t.prototype.ancestors=function(){var e=this.parentPath();return e?function(e){var t=["/"];if("/"===e)return t;var n=e.split("/").slice(1),r="";return n.forEach((function(e){r=r+"/"+e,t.push(r)})),t}(e).map((function(e){return t.getByPath(e)})):[]},t.prototype.isRestricted=function(){var e=this.restriction();return!!e&&e.length>0},t.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},t.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},t.prototype.unrestrict=function(){this.update({_restriction:null})},t.prototype.update=function(e){var t=this,n=te(e);Object(A.r)((function(){t.persistWidgets(t,n);var e=de(n);t.objData.update(e)})),this.startLinkResolution()},t.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},t.prototype.insertWidget=function(e,t){var n,r=function(e){if(function(e){return!!e.before}(e))return e.before.id();return e.after.id()}(t),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,c=i.index,u=t.before?c:c+1,l=o.slice(0,u).concat([e],o.slice(u));s.update(((n={})[a]=[l,["widgetlist"]],n))}},t.prototype.removeWidget=function(e){var t=this.fieldContainingWidget(e);if(t){var n=t.get(),r=p.reject(n,(function(t){return t.equals(e)}));t.update(r)}},t.prototype.siblingWidget=function(e,t){var n=this._widgetPlacementFor(e.id());if(n)return n.attributeValue[n.index+t]},t.prototype.copyAsync=function(e){return void 0===e&&(e={}),function(e){if(p.difference(p.keys(e),["_path"]).length)throw new c.a('Currently only "_path" copy option is supported.')}(e),this._copyAttributes().then((function(n){var r=p.extend(n,e),i=t.createWithSerializedAttributes(re(),r);return i.objData.finishSaving().then((function(){return i}))}))},t.prototype.moveToAsync=function(e){return this.moveTo(e),this.finishSaving()},t.prototype.moveTo=function(e){this.update({_path:[e+"/"+this.id()]})},t.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},t.prototype.finishSaving=function(){var e=this;return this.finishLinkResolution().then((function(){return e.objData.finishSaving()}))},t.prototype.equals=function(e){return e instanceof t&&this.id()===e.id()},t.prototype.widget=function(e){return this.getWidgetAttribute(e,"_obj_class")?ce.build(e,this):null},t.prototype.getWidgetAttribute=function(e,t){return this.objData.getWidgetAttribute(e,t)},t.prototype.widgets=function(){var e=this.getData();if(!xe(e))return[];var t=e._widget_pool;if(!t)return[];var n=[];return this.collectWidgets(n,e,t,{}),n},t.prototype.fieldContainingWidget=function(e){var t=e.id(),n=this._widgetPlacementFor(t);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},t.prototype.generateWidgetId=function(){for(var e=0;e<10;e++){var n=t.generateWidgetId();if(!this.widget(n))return n}throw new c.g("Could not generate a new unused widget id.")},t.prototype.serializeAttributes=function(){var t=e.prototype.serializeAttributes.call(this,this.getData());return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t},t.prototype.slug=function(){var e,t=this.get("title","string");return"string"!=typeof(e=t)?"":h(e)},t.prototype.getWidgetData=function(e){return this.objData.getWidget(e)},t.prototype.startLinkResolution=function(){Object(a.l)()||Me().startLinkResolutionFor(re(),this.id())},t.prototype.finishLinkResolution=function(){return Me().finishLinkResolutionFor(re(),this.id())},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},t.prototype.getAttributeData=function(e){return this.objData.getAttribute(e)},t.prototype.getData=function(){return this.objData.get()},t.prototype.blob=function(){return this.get("blob",["binary"])},t.prototype._copyAttributes=function(){var e=t.generateId(),n=this.serializeAttributes(),r=[];return p.each(n,(function(t,i){if("_"!==i[0]){if(function(e){return"binary"===e[0]&&!!e[1]}(t)){var o=t[1],a=new F({idToCopy:o.id}).intoId(e).then((function(e){return{name:i,binary:e}}));r.push(a)}}else delete n[i]})),n._id=e,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+e),c.j.all(r).then((function(e){return p.each(e,(function(e){var t=e.name,r={id:e.binary.id()};n[t]=["binary",r]})),n}))},t.prototype.collectWidgets=function(e,t,n,r){var i=this;p.map(t,(function(e,t){if(e&&!Object(c.z)(t)){var n=e;return Object(W.h)(n)?n[1]:void 0}})).forEach((function(t){t&&t.forEach((function(t){if(!r[t]){r[t]=!0;var o=i.widget(t);if(o){e.push(o);var a=n[t];i.collectWidgets(e,a,n,r)}}}))}))},t.prototype._widgetPlacementFor=function(e){var t=this.getData();if(xe(t)){var n=Object(a.f)(t,e);if(n){var r,i=Object(c.o)(n.attributeName),o=n.parentWidgetId;if(o){if(!(r=this.widget(o)))return}else r=this;return{container:r,attributeName:i,attributeValue:r.get(i,["widgetlist"]),index:n.index,parentWidgetId:o}}}},t}(ee),ke=we;function Oe(e){return ce.newWithSerializedAttributes(e)}function Ce(e){return we.all().and("_parentPath","equals",e)}function Me(){if(!ye)throw new Error("No Link Handler");return ye}function De(e){ye=e}function xe(e){return!!e&&Object(W.f)(e)}var Ee=function(){return(Ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Se=function(){function e(e){this.attributes=Ee({},e)}return e.prototype.title=function(){return this.attributes.title||null},e.prototype.query=function(){return this.attributes.query||null},e.prototype.hash=function(){return this.attributes.hash||null},e.prototype.rel=function(){return this.attributes.rel||null},e.prototype.target=function(){return this.attributes.target||null},e.prototype.url=function(){return this.attributes.url||null},e.prototype.objId=function(){return this.attributes.objId||null},e.prototype.obj=function(){var e=this.objId();return e?ke.get(e):null},e.prototype.queryParameters=function(){return l(this.query()||"")},e.prototype.isExternal=function(){return!!this.url()},e.prototype.isInternal=function(){return!this.isExternal()},e.prototype.equals=function(t){return t instanceof e&&(this.isExternal()?this.hash()===t.hash()&&this.query()===t.query()&&this.rel()===t.rel()&&this.target()===t.target()&&this.title()===t.title()&&this.url()===t.url():this.objId()===t.objId()&&this.title()===t.title())},e.prototype.copy=function(t){void 0===t&&(t={});var n=Ee({},this.attributes,t);if(t.objId&&t.url)throw new c.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return t.objId?n.url=null:t.url&&(n.objId=null),new e(n)},e.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},e.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},e}();function je(e){var t=e.get(),n=function(e){var t=e.getDiff();if(Object(W.i)(t))return t.content}(e);return n?Object(p.compact)(n.map((function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=Te(t,o))return{widget:r,modification:"new"};break;case"=":if(r=Te(t,o))return{widget:r,modification:null};break;case"-":if(r=function(e,t){var n=ke.getInWorkspace("published",e);if(n)return n.widget(t);return null}(e.obj().id(),o))return{widget:r,modification:"deleted"}}}))):t.map((function(e){return{widget:e,modification:null}}))}function Te(e,t){return Object(p.find)(e,(function(e){return e.id()===t}))||null}},function(e,t,n){e.exports=n(457)()},function(e,t,n){"use strict";n.r(t),n.d(t,"loadAllUntil",(function(){return r.default})),n.d(t,"capture",(function(){return s})),n.d(t,"CaptureList",(function(){})),n.d(t,"CaptureReport",(function(){return l})),n.d(t,"isCurrentlyCapturing",(function(){return u})),n.d(t,"LoadingSubscriber",(function(){return d})),n.d(t,"load",(function(){return f})),n.d(t,"LoadableData",(function(){return S})),n.d(t,"reportUsedData",(function(){return L})),n.d(t,"LoaderApi",(function(){})),n.d(t,"LoaderCallback",(function(){})),n.d(t,"LoadableState",(function(){})),n.d(t,"loadableWithDefault",(function(){return P})),n.d(t,"loadWithDefault",(function(){return A})),n.d(t,"mapAndLoadParallel",(function(){return Y})),n.d(t,"runAndCatchErrorsWhileLoading",(function(){return R})),n.d(t,"RunResult",(function(){})),n.d(t,"NotLoadedError",(function(){return O})),n.d(t,"DataRecording",(function(){})),n.d(t,"loadRecording",(function(){return W})),n.d(t,"generateRecording",(function(){return z})),n.d(t,"LoadableCollection",(function(){return F})),n.d(t,"LoadableCollectionState",(function(){})),n.d(t,"observeAndLoad",(function(){return q}));var r=n(117),i=n(0),o=new i.d,a=function(){return o.current()};function s(e){var t={subscribes:[],missing:!1,outdated:!1},n=o.runWith(t,e);return new l(t,n)}function c(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function u(){return void 0!==a()}var l=function(){function e(e,t){this.captureList=e,this.result=t}return e.prototype.forwardToCurrent=function(){var e,t,n=a();n?(e=n,t=this.captureList,e.subscribes=e.subscribes.concat(t.subscribes),e.missing=e.missing||t.missing,e.outdated=e.outdated||t.outdated):this.captureList.missing&&c()},e.prototype.isAllDataLoaded=function(){return!this.captureList.missing},e.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},e.prototype.subscribeLoading=function(e){var t=this.captureList.subscribes.map((function(e){return e()}));e.unsubscribe(),e.storeUnsubscribe((function(){t.forEach((function(e){return e()}))}))},e}(),d=function(){function e(){}return e.prototype.storeUnsubscribe=function(e){this.unsubscribeCallback=e},e.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},e}();var p=n(7);function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.apply(void 0,[e].concat(t));var r=new i.e,o=q((function(){return Object(i.M)((function(){return Object(p.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},e)}))}),(function(e){if(e.allDataUpToDate){o.unsubscribe();var t=e.result;t.errorThrown?r.reject(t.error):r.resolve(t.result)}}));return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),m=function(){function e(e){this.container=e}return e.prototype.reader=function(){return this.container.reader().subState("value")},e.prototype.status=function(){return this.getStateKey("status")||"MISSING"},e.prototype.value=function(){return this.getStateKey("value")},e.prototype.error=function(){return this.getStateKey("error")},e.prototype.version=function(){return this.getStateKey("version")},e.prototype.transitionToMissing=function(){this.setState(void 0)},e.prototype.transitionToAvailable=function(e,t){this.setState({status:"AVAILABLE",value:e,version:t})},e.prototype.transitionToError=function(e,t){this.setState({status:"ERROR",error:e,version:t})},e.prototype.setState=function(e){this.container.set(e)},e.prototype.getStateKey=function(e){return this.container.subState(e).get()},e}(),_={},v={};function g(e,t){var n=!0;y(e,1);var r=_[e];r||(_[e]=t);var i=r||t;return i.notifyDataRequired(),function(){n&&(n=!1,y(e,-1)<1&&i.notifyDataNoLongerRequired())}}function y(e,t){var n=(v[e]||0)+t;return v[e]=n,n}function b(e){var t=_[e];t&&t.notifyDataWasSet()}var w,k=(w=function(e,t){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(e){function t(){return e.call(this,"Data is not yet loaded.",!1)||this}return k(t,e),t}(i.i),C=function(){function e(e,t){this.loadableValue=e,this.stream=t,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return e.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},e.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},e.prototype.notifyDataWasSet=function(){},e.prototype.enqueueUpdate=function(){var e=this;this.isUpdateEnqueued||(Object(i.G)((function(){return e.update()})),this.isUpdateEnqueued=!0)},e.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},e.prototype.ensureStreamIsOpen=function(){var e=this;this.subscription||(this.subscription=this.stream.subscribe((function(t){e.bufferValue(t),e.enqueueUpdate()})))},e.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},e.prototype.bufferValue=function(e){this.bufferedValue=e,this.hasBufferedValue=!0},e.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},e}(),M=0,D=function(){function e(e,t,n){this.value=e,this.loader=t,this.invalidation=n}return e.prototype.notifyDataRequired=function(){this.triggerLoading()},e.prototype.notifyDataNoLongerRequired=function(){},e.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.hasBeenInvalidated=function(){return x(this.value,this.invalidation)},e.prototype.currentVersion=function(){return E(this.invalidation)},e.prototype.triggerLoading=function(){var e=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var t=this.currentVersion(),n=M++,r=function(){return e.currentLoad===n},i=function(t){r()&&Object(p.a)((function(){t(),e.notifyDataWasSet(),a()}))},o=[],a=function(){return o.forEach((function(e){return e()}))};this.loader({push:function(e){return o.push(e)},isReload:function(){return e.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then((function(n){return i((function(){return e.value.transitionToAvailable(n,t)}))}),(function(n){return i((function(){return e.value.transitionToError(n,t)}))})),this.currentLoad=n}},e.prototype.isLoading=function(){return void 0!==this.currentLoad},e}();function x(e,t){return!!t&&("MISSING"!==e.status()&&E(t)!==e.version())}function E(e){if(e){var t=e();if("number"==typeof t&&isNaN(t)){var n="invalidation callback returned unsuitable version "+t;throw new i.g(n)}return t}}var S=function(){function e(e){if(!e.state)throw new i.g("LoadableData needs state");this.value=new m(e.state),this.invalidation=e.invalidation,this.throwNotLoaded=e.throwNotLoaded||!1,this.id=e.state.id(),e.stream?this.loaderProcess=new C(this.value,e.stream):this.loaderProcess=new D(this.value,e.loader,e.invalidation)}return e.prototype.ensureAvailable=function(){var e,t,n=this;if(e=function(){return g(n.id,n.loaderProcess)},(t=a())&&t.subscribes.push(e),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(u()||(g(this.id,this.loaderProcess),c()),function(){var e=a();e&&(e.missing=!0)}(),this.throwNotLoaded)throw new O;return!1},e.prototype.get=function(){if(this.ensureAvailable())return T(this.id,this),this.value.value()},e.prototype.reader=function(){return T(this.id,this),this.value.reader()},e.prototype.set=function(e){this.value.transitionToAvailable(e,this.currentVersion()),b(this.id)},e.prototype.setError=function(e){this.transitionToError(e),b(this.id)},e.prototype.reset=function(){this.value.transitionToMissing()},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},e.prototype.isError=function(){return"ERROR"===this.value.status()},e.prototype.numSubscribers=function(){return e=this.id,v[e]||0;var e},e.prototype.transitionToError=function(e,t){void 0===t&&(t=this.currentVersion()),this.value.transitionToError(e,t)},e.prototype.notifyIfOutdated=function(){var e;x(this.value,this.invalidation)&&(e=a())&&(e.outdated=!0)},e.prototype.currentVersion=function(){return E(this.invalidation)},e}(),j=new i.d;function T(e,t){var n=j.current();n&&(n[e]=t)}function L(e){var t,n={};return{result:j.runWith(n,e),usedData:(t=n,Object.keys(t).map((function(e){return t[e]})))}}function P(e,t){var n=s((function(){return A(e,t)}));return u()&&n.forwardToCurrent(),n.result}function A(e,t){var n=R(t);return n.allDataLoaded?n.result:e}var N=n(2),I=n.n(N);function Y(e,t){var n=[];if(I.a.each(e,(function(e){var r=R((function(){return t(e)}));r.success&&n.push(r.result)})),n.length<e.length)throw new O;return n}function R(e){var t=s((function(){return Object(i.M)(e)}));t.forwardToCurrent();var n=t.result,r=t.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var F=function(){function e(e){var t=e.name,n=e.state,r=e.loader,o=e.invalidation;this.name=t,this.state=n,this.loader=r,this.invalidation=o,function(e,t){if(H[e])throw new i.g("collection name registered twice: "+e);H[e]=t}(t,this)}return e.prototype.get=function(e,t){var n=this,r=function(e){if("string"==typeof e)return e;return Object(i.s)(e)}(e),o=this.invalidation,a=new S({state:this.state().subState(r),loader:function(r){return n.loader(e,r,t)},invalidation:o?function(){return o(e)}:void 0});return function(e,t){e.affiliation=t}(a,{collectionName:this.name,key:e}),a},e}();var H={};function W(e){Object(p.r)((function(){return e.forEach(B)}))}function B(e){var t=e[0],n=e[1],r=e[2];(function(e){var t=H[e];if(!t)throw new i.g("collection with name "+e+" not found");return t})(t).get(n).set(r)}function z(e){return e.map(U)}function U(e){var t=function(e){return e.affiliation}(e);if(!t)throw new i.g("Tried to record a LoadableData without affiliation");return[t.collectionName,t.key,e.get()]}function q(e,t){var n=new d,r=Object(p.k)((function(){return s((function(){return Object(i.M)(e)}))}),(function(e){e.subscribeLoading(n);var r=e.result;if(r.errorThrown){if(!e.isAllDataUpToDate())return;throw r.error}t({result:r.result,allDataLoaded:e.isAllDataLoaded(),allDataUpToDate:e.isAllDataUpToDate()})}));return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Ct(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function _(e){var t=f(NaN);return null!=e?p(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=i.momentProperties=[];function g(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)s(i=t[r=v[n]])||(e[r]=i);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function O(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=k(t)),n}function C(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&O(e[r])!==O(t[r]))&&a++;return a+o}function M(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var n=!0;return p((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){for(var r,o=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];o.push(r)}M(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var x,E={};function S(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),E[e]||(M(t),E[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e,t){var n,r=p({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=p({},r[n]));return r}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function A(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function N(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function I(e){var t,n,r={};for(n in e)d(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var Y={};function R(e,t){Y[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,i=e.match(H);for(t=0,n=i.length;t<n;t++)z[i[t]]?i[t]=z[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(i[r])?i[r].call(t,e):i[r];return o}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var $=/\d/,G=/\d\d/,K=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function le(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=O(e)}),n=0;n<e.length;n++)fe[e[n]]=r}function me(e,t){he(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function _e(e,t,n){null!=t&&d(fe,e)&&fe[e](t,n._a,n,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),A("year","y"),R("year",1),le("Y",oe),le("YY",Z,G),le("YYYY",ne,J),le("YYYYY",re,Q),le("YYYYYY",re,Q),he(["YYYYY","YYYYYY"],0),he("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):O(e)})),he("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return O(e)+(O(e)>68?1900:2e3)};var ye,be=we("FullYear",!0);function we(e,t){return function(n){return null!=n?(Oe(this,e,n),i.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Oe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),A("month","M"),R("month",8),le("M",Z),le("MM",Z,G),le("MMM",(function(e,t){return t.monthsShortRegex(e)})),le("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[1]=O(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[1]=i:h(n).invalidMonth=e}));var Me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ee(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,a))||-1!==(i=ye.call(this._longMonthsParse,a))?i:null:-1!==(i=ye.call(this._longMonthsParse,a))||-1!==(i=ye.call(this._shortMonthsParse,a))?i:null}function Se(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=O(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function je(e){return null!=e?(Se(this,e),i.updateOffset(this,!0),this):ke(this,"Month")}var Te=ce,Le=ce;function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),i[t]=pe(i[t]);for(t=0;t<24;t++)o[t]=pe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ae(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Ne(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ie(e,t,n){var r=7+t-n;return-(7+Ne(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Ie(e,r,i);return s<=0?a=ve(o=e-1)+s:s>ve(e)?(o=e+1,a=s-ve(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Re(e,t,n){var r,i,o=Ie(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Fe(i=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Fe(e,t,n){var r=Ie(e,t,n),i=Ie(e+1,t,n);return(ve(e)-r+i)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Z),le("ww",Z,G),le("W",Z),le("WW",Z,G),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=O(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Z),le("e",Z),le("E",Z),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=O(e)}));var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ue(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null}var qe=ce,Ve=ce,$e=ce;function Ge(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],c=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),c.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),c.sort(e),u.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),c[t]=pe(c[t]),u[t]=pe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Je(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ke),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Je("a",!0),Je("A",!1),A("hour","h"),R("hour",13),le("a",Qe),le("A",Qe),le("H",Z),le("h",Z),le("k",Z),le("HH",Z,G),le("hh",Z,G),le("kk",Z,G),le("hmm",X),le("hmmss",ee),le("Hmm",X),le("Hmmss",ee),he(["H","HH"],3),he(["k","kk"],(function(e,t,n){var r=O(e);t[3]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[3]=O(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r,2)),t[5]=O(e.substr(i)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r,2)),t[5]=O(e.substr(i))}));var Ze,Xe=we("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:xe,week:{dow:0,doy:6},weekdays:We,weekdaysMin:ze,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(459)("./"+t),ot(r)}catch(e){}return tt[t]}function ot(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new L(T(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!o(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=rt(e[o]).split("-")).length,n=(n=rt(e[o+1]))?n.split("-"):null;t>0;){if(r=it(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&C(i,n,!0)>=t-1)break;t--}o++}return Ze}(e)}function ct(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Ce(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}function ut(e,t,n){return null!=e?e:null!=t?t:n}function lt(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,o,a,s,c;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=ut(t.GG,e._a[0],Re(Mt(),1,4).year),r=ut(t.W,1),((i=ut(t.E,1))<1||i>7)&&(c=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Re(Mt(),o,a);n=ut(t.gg,e._a[0],u.year),r=ut(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o}r<1||r>Fe(n,o,a)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(s=Ye(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=ut(e._a[0],r[0]),(e._dayOfYear>ve(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ne(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ne:Ae).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,i,o,a,s=e._i,c=dt.exec(s)||pt.exec(s);if(c){for(h(e).iso=!0,t=0,n=ht.length;t<n;t++)if(ht[t][1].exec(c[1])){i=ht[t][0],r=!1!==ht[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(c[3])){o=(c[2]||" ")+mt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(c[4]){if(!ft.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),kt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wt(e){var t,n,r,i,o,a,s,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){var u=(t=c[4],n=c[3],r=c[2],i=c[5],o=c[6],a=c[7],s=[yt(t),xe.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(o,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return bt[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=Ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,a,s=""+e._i,c=s.length,u=0;for(r=V(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),z[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-u,s.length>0&&h(e).unusedInput.push(s),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),lt(e),ct(e)}else wt(e);else vt(e)}function Ot(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ct(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),m(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));p(e,n||t)}(e):n?kt(e):function(e){var t=e._i;s(t)?e._d=new Date(i.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,wt(e),!1===e._isValid&&(delete e._isValid,i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=l(t.slice(0),(function(e){return parseInt(e,10)})),lt(e)):a(t)?function(e){if(!e._d){var t=I(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),lt(e)}}(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Ct(e,t,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new b(ct(Ot(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Mt(e,t,n,r){return Ct(e,t,n,r,!1)}i.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Dt=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),xt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Et(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Mt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var St=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jt(e){var t=I(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(St,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<St.length;++r)if(e[St[r]]){if(n)return!1;parseFloat(e[St[r]])!==O(e[St[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function Tt(e){return e instanceof jt}function Lt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),le("Z",se),le("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Nt(se,e)}));var At=/([\+\-]|\d\d)/gi;function Nt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(At)||["-",0,0],i=60*r[1]+O(r[2]);return 0===i?0:"+"===r[0]?i:-i}function It(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Mt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Mt(e).local()}function Yt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Rt(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ht=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var n,r,i,o,a,s,u=e,l=null;return Tt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(u={},t?u[t]=e:u.milliseconds=e):(l=Ft.exec(e))?(n="-"===l[1]?-1:1,u={y:0,d:O(l[2])*n,h:O(l[3])*n,m:O(l[4])*n,s:O(l[5])*n,ms:O(Lt(1e3*l[6]))*n}):(l=Ht.exec(e))?(n="-"===l[1]?-1:1,u={y:Bt(l[2],n),M:Bt(l[3],n),w:Bt(l[4],n),d:Bt(l[5],n),h:Bt(l[6],n),m:Bt(l[7],n),s:Bt(l[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Mt(u.from),a=Mt(u.to),i=o.isValid()&&a.isValid()?(a=It(a,o),o.isBefore(a)?s=zt(o,a):((s=zt(a,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=i.milliseconds,u.M=i.months),r=new jt(u),Tt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),qt(this,Wt(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var o=t._milliseconds,a=Lt(t._days),s=Lt(t._months);e.isValid()&&(r=null==r||r,s&&Se(e,ke(e,"Month")+s*n),a&&Oe(e,"Date",ke(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}Wt.fn=jt.prototype,Wt.invalid=function(){return Wt(NaN)};var Vt=Ut(1,"add"),$t=Ut(-1,"subtract");function Gt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Kt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Jt=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Qt(){return this._locale}function Zt(e,t){return(e%t+t)%t}function Xt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){U(0,[e,e.length],0,t)}function nn(e,t,n,r,i){var o;return null==e?Re(this,r,i).year:(t>(o=Fe(e,r,i))&&(t=o),rn.call(this,e,t,n,r,i))}function rn(e,t,n,r,i){var o=Ye(e,t,n,r,i),a=Ne(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),le("G",oe),le("g",oe),le("GG",Z,G),le("gg",Z,G),le("GGGG",ne,J),le("gggg",ne,J),le("GGGGG",re,Q),le("ggggg",re,Q),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=O(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),A("quarter","Q"),R("quarter",7),le("Q",$),he("Q",(function(e,t){t[1]=3*(O(e)-1)})),U("D",["DD",2],"Do","date"),A("date","D"),R("date",9),le("D",Z),le("DD",Z,G),le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],2),he("Do",(function(e,t){t[2]=O(e.match(Z)[0])}));var on=we("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),R("dayOfYear",4),le("DDD",te),le("DDDD",K),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=O(e)})),U("m",["mm",2],0,"minute"),A("minute","m"),R("minute",14),le("m",Z),le("mm",Z,G),he(["m","mm"],4);var an=we("Minutes",!1);U("s",["ss",2],0,"second"),A("second","s"),R("second",15),le("s",Z),le("ss",Z,G),he(["s","ss"],5);var sn,cn=we("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),R("millisecond",16),le("S",te,$),le("SS",te,G),le("SSS",te,K),sn="SSSS";sn.length<=9;sn+="S")le(sn,ie);function un(e,t){t[6]=O(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")he(sn,un);var ln=we("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var dn=b.prototype;function pn(e){return e}dn.add=Vt,dn.calendar=function(e,t){var n=e||Mt(),r=It(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Mt(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=It(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=Gt(this,r)/12;break;case"month":o=Gt(this,r);break;case"quarter":o=Gt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:k(o)},dn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Xt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Zt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Zt(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Mt(),e)},dn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Mt(),e)},dn.get=function(e){return j(this[e=N(e)])?this[e]():this},dn.invalidAt=function(){return h(this).overflow},dn.isAfter=function(e,t){var n=w(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=w(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var i=w(e)?e:Mt(e),o=w(t)?t:Mt(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))},dn.isSame=function(e,t){var n,r=w(e)?e:Mt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return m(this)},dn.lang=Jt,dn.locale=Kt,dn.localeData=Qt,dn.max=xt,dn.min=Dt,dn.parsingFlags=function(){return p({},h(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:Y[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=I(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=N(e)]))return this[e](t);return this},dn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Xt;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Zt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Zt(t,1e3)}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.subtract=$t,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},dn.toDate=function(){return new Date(this.valueOf())},dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=be,dn.isLeapYear=function(){return ge(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=je,dn.daysInMonth=function(){return Ce(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},dn.date=on,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=Xe,dn.minute=dn.minutes=an,dn.second=dn.seconds=cn,dn.millisecond=dn.milliseconds=ln,dn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Yt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?qt(this,Wt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Yt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Yt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Mt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Rt,dn.isUTC=Rt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=D("dates accessor is deprecated. Use date instead.",on),dn.months=D("months accessor is deprecated. Use month instead",je),dn.years=D("years accessor is deprecated. Use year instead",be),dn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),dn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Ot(e))._a){var t=e._isUTC?f(e._a):Mt(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var fn=L.prototype;function hn(e,t,n,r){var i=st(),o=f().set(r,t);return i[n](o,e)}function mn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return hn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=hn(e,r,n,"month");return i}function _n(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=st(),a=e?o._week.dow:0;if(null!=n)return hn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=hn(t,(i+a)%7,r,"day");return s}fn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},fn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},fn.invalidDate=function(){return this._invalidDate},fn.ordinal=function(e){return this._ordinal.replace("%d",e)},fn.preparse=pn,fn.postformat=pn,fn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return j(i)?i(e,t,n,r):i.replace(/%d/i,e)},fn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},fn.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Me).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},fn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Me.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Ee.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},fn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},fn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},fn.week=function(e){return Re(e,this._week.dow,this._week.doy).week},fn.firstDayOfYear=function(){return this._week.doy},fn.firstDayOfWeek=function(){return this._week.dow},fn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},fn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},fn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},fn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ue.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},fn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===O(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=D("moment.lang is deprecated. Use moment.locale instead.",ot),i.langData=D("moment.langData is deprecated. Use moment.localeData instead.",st);var vn=Math.abs;function gn(e,t,n,r){var i=Wt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function wn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}var On=kn("ms"),Cn=kn("s"),Mn=kn("m"),Dn=kn("h"),xn=kn("d"),En=kn("w"),Sn=kn("M"),jn=kn("Q"),Tn=kn("y");function Ln(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Ln("milliseconds"),An=Ln("seconds"),Nn=Ln("minutes"),In=Ln("hours"),Yn=Ln("days"),Rn=Ln("months"),Fn=Ln("years"),Hn=Math.round,Wn={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var zn=Math.abs;function Un(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=zn(this._milliseconds)/1e3,r=zn(this._days),i=zn(this._months);e=k(n/60),t=k(e/60),n%=60,e%=60;var o=k(i/12),a=i%=12,s=r,c=t,u=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",f=Un(this._months)!==Un(d)?"-":"",h=Un(this._days)!==Un(d)?"-":"",m=Un(this._milliseconds)!==Un(d)?"-":"";return p+"P"+(o?f+o+"Y":"")+(a?f+a+"M":"")+(s?h+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var Vn=jt.prototype;return Vn.isValid=function(){return this._isValid},Vn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},Vn.add=function(e,t){return gn(this,e,t,1)},Vn.subtract=function(e,t){return gn(this,e,t,-1)},Vn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+bn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(wn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Vn.asMilliseconds=On,Vn.asSeconds=Cn,Vn.asMinutes=Mn,Vn.asHours=Dn,Vn.asDays=xn,Vn.asWeeks=En,Vn.asMonths=Sn,Vn.asQuarters=jn,Vn.asYears=Tn,Vn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*O(this._months/12):NaN},Vn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,c=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*yn(wn(s)+a),a=0,s=0),c.milliseconds=o%1e3,e=k(o/1e3),c.seconds=e%60,t=k(e/60),c.minutes=t%60,n=k(t/60),c.hours=n%24,a+=k(n/24),i=k(bn(a)),s+=i,a-=yn(wn(i)),r=k(s/12),s%=12,c.days=a,c.months=s,c.years=r,this},Vn.clone=function(){return Wt(this)},Vn.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Vn.milliseconds=Pn,Vn.seconds=An,Vn.minutes=Nn,Vn.hours=In,Vn.days=Yn,Vn.weeks=function(){return k(this.days()/7)},Vn.months=Rn,Vn.years=Fn,Vn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Wt(e).abs(),i=Hn(r.as("s")),o=Hn(r.as("m")),a=Hn(r.as("h")),s=Hn(r.as("d")),c=Hn(r.as("M")),u=Hn(r.as("y")),l=i<=Wn.ss&&["s",i]||i<Wn.s&&["ss",i]||o<=1&&["m"]||o<Wn.m&&["mm",o]||a<=1&&["h"]||a<Wn.h&&["hh",a]||s<=1&&["d"]||s<Wn.d&&["dd",s]||c<=1&&["M"]||c<Wn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=t,l[3]=+e>0,l[4]=n,Bn.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Vn.toISOString=qn,Vn.toString=qn,Vn.toJSON=qn,Vn.locale=Kt,Vn.localeData=Qt,Vn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Vn.lang=Jt,U("X",0,0,"unix"),U("x",0,0,"valueOf"),le("x",oe),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(O(e))})),i.version="2.24.0",t=Mt,i.fn=dn,i.min=function(){var e=[].slice.call(arguments,0);return Et("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Et("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(e){return Mt(1e3*e)},i.months=function(e,t){return mn(e,t,"months")},i.isDate=u,i.locale=ot,i.invalid=_,i.duration=Wt,i.isMoment=w,i.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},i.parseZone=function(){return Mt.apply(null,arguments).parseZone()},i.localeData=st,i.isDuration=Tt,i.monthsShort=function(e,t){return mn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},i.defineLocale=at,i.updateLocale=function(e,t){if(null!=t){var n,r,i=et;null!=(r=it(e))&&(i=r._config),t=T(i,t),(n=new L(t)).parentLocale=tt[e],tt[e]=n,ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return x(tt)},i.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},i.normalizeUnits=N,i.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Wn[e]&&(void 0===t?Wn[e]:(Wn[e]=t,"s"===e&&(Wn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=dn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(79)(e))},function(e,t,n){"use strict";n.d(t,"d",(function(){return S})),n.d(t,"c",(function(){return v})),n.d(t,"m",(function(){return y})),n.d(t,"o",(function(){return L})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return P})),n.d(t,"g",(function(){return A})),n.d(t,"h",(function(){return N})),n.d(t,"i",(function(){return T})),n.d(t,"p",(function(){return g})),n.d(t,"b",(function(){return _})),n.d(t,"j",(function(){return D})),n.d(t,"n",(function(){return F})),n.d(t,"e",(function(){return I})),n.d(t,"f",(function(){return Y})),n.d(t,"a",(function(){return B})),n.d(t,"k",(function(){return z})),n.d(t,"l",(function(){return U})),n.d(t,"q",(function(){return q}));var r=n(0),i=n(2),o=function(){function e(e,t){this.value=e,this.copy=t,this.valueForReading=new r.d}return e.prototype.read=function(e){var t=this.value;return this.valueForReading.runWith(t,(function(){return e(t)}))},e.prototype.write=function(e){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),e(this.value)},e}(),a=function(){function e(e){this.notifySubscribers=e,this.subscribersStore=new o([],(function(e){return e.slice()}))}return e.prototype.create=function(e,t){return void 0===t&&(t=0),new s(this.subscribersStore,e,t)},e.prototype.count=function(){return this.subscribersStore.read((function(e){return e.length}))},e.prototype.reset=function(){this.subscribersStore.write((function(e){e.length=0}))},e.prototype.notify=function(){var e=this;this.subscribersStore.read((function(t){return e.notifySubscribers(t)}))},e}(),s=function(){function e(e,t,n){void 0===n&&(n=0),this.subscriberStore=e,this.listener=t,this.rank=n,this.active=!1}return e.prototype.subscribeChanges=function(e){var t=this;this.stateReference=e,this.active||(this.subscriberStore.write((function(e){var n=Object(i.sortedIndex)(e,t,"rank");e.splice(n,0,t)})),this.active=!0),this.hasChanges()&&this.listener()},e.prototype.unsubscribe=function(){var e=this;this.active&&(this.subscriberStore.write((function(t){var n=t.indexOf(e);n>=0&&t.splice(n,1)})),this.active=!1)},e.prototype.notify=function(){this.active&&this.listener()},e.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},e}(),c=new a((function(e){e.forEach((function(e){e.hasChanges()&&e.notify()}))})),u=new a((function(e){e.forEach((function(e){Object(r.G)((function(){e.hasChanges()&&e.notify()}))}))})),l=function(){function e(){this.listenersStore=new o([],(function(e){return e.slice()}))}return e.prototype.subscribe=function(e){var t=this,n=!0,r=function(){n&&e()};return this.listenersStore.write((function(e){return e.push(r)})),function(){n=!1,t.listenersStore.write((function(e){var t=e.indexOf(r);e.splice(t,1)}))}},e.prototype.count=function(){return this.listenersStore.read((function(e){return e.length}))},e.prototype.clear=function(){this.listenersStore.write((function(e){e.length=0}))},e.prototype.notify=function(){this.listenersStore.read((function(e){return e.forEach((function(e){return e()}))}))},e}();function d(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!1;return null!==Object.getPrototypeOf(t)}(e)}function p(e,t){return e===t?t:d(t)?function(e,t){var n={},r=!1;void 0===e&&(r=!0);var i=Object.keys(t),o=new Set;e&&Object.keys(e).forEach((function(e){return o.add(e)}));o.size!==i.length&&(r=!0);return i.forEach((function(i){o.has(i)||(r=!0);var a=e?e[i]:void 0,s=p(a,t[i]);s!==a&&(r=!0),n[i]=s})),r?Object.freeze(n):e}(d(e)?e:void 0,t):Array.isArray(t)?function(e,t){var n=!1;void 0!==e&&e.length===t.length||(n=!0);var r=t.map((function(t,r){var i=e?e[r]:void 0,o=p(i,t);return o!==i&&(n=!0),o}));return n?Object.freeze(r):e}(Array.isArray(e)?e:void 0,t):t}var f,h,m,_,v,g,y,b=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),w=function(){function e(){}return e.prototype.get=function(){var e=this,t=this.untrackedGet();return this.recordDetector((function(){return t!==e.untrackedGet()})),t},e.prototype.recordDetector=function(e){this.getTree().recordDetector(e)},e.prototype.set=function(e){var t=this.untrackedGet(),n=p(t,e);n!==t&&this.uncheckedSet(n)},e.prototype.clear=function(){this.set(void 0)},e.prototype.subState=function(e){return new M(this,e)},e.prototype.reader=function(){return this},e.prototype.setSubState=function(e,t){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===t){var o=Object.keys(i);if(1===o.length&&o[0]===e)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===t?delete s[e]:s[e]=t,this.uncheckedSet(Object.freeze(a))}else{var c=Object.freeze(((n={})[e]=t,n));this.uncheckedSet(c)}},e.prototype.getSubState=function(e){var t=this.untrackedGet();if(null!=t)return t[e]},e}(),k=function(){function e(e){this.detector=e}return e.prototype.hasChanges=function(){return this.detector()},e}(),O=function(e){function t(){var t=e.call(this)||this;return t.listeners=new l,t.detectorRecording=new r.d,t.batchUpdates=new r.d,t.version=0,t.frozenContextContainer=new r.d,t}return b(t,e),t.prototype.untrackedGet=function(){return this.state},t.prototype.withFrozenState=function(e,t){return this.frozenContextContainer.runWith(e,t)},t.prototype.failIfTracking=function(e){if(this.detectorRecording.current())throw new r.g(e)},t.prototype.failIfFrozen=function(e){var t=this.frozenContextContainer.current();if(t){var n=e+" is not permitted inside '"+t.contextName+"'. "+(t.message||"");throw new C(n)}},t.prototype.uncheckedSet=function(e){this.failIfFrozen("Changing state"),this.state=e,this.version++,this.insideBatchUpdate()||this.notifyListeners()},t.prototype.trackStateAccess=function(e){var t=this.trackChanges(e),n=t.detector;return{result:t.result,accessedState:new k(n)}},t.prototype.recordDetector=function(e){var t=this.detectorRecording.current();void 0!==t&&t.push(e)},t.prototype.getTree=function(){return this},t.prototype.id=function(){return""},t.prototype.subscribe=function(e){return this.listeners.subscribe(e)},t.prototype.withBatchedUpdates=function(e){var t=this.state;try{this.batchUpdates.runWith(!0,e)}finally{this.insideBatchUpdate()||t===this.state||this.notifyListeners()}},t.prototype.listenerCount=function(){return this.listeners.count()},t.prototype.clearListeners=function(){this.listeners.clear()},t.prototype.trackChanges=function(e){var t=this,n=this.version,r=this.recordDetectors(e),o=r.result,a=r.detectors;return{result:o,detector:function(){return t.version!==n&&!!Object(i.find)(a,(function(e){return e()}))}}},t.prototype.recordDetectors=function(e){var t=[],n=this.detectorRecording.runWith(t,e),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,t),{result:n,detectors:t}},t.prototype.notifyListeners=function(){var e=this;this.withFrozenState({contextName:"state listeners"},(function(){e.listeners.notify()}))},t.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},t}(w),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i),M=function(e){function t(t,n){var r=e.call(this)||this;return r.parentState=t,r.key=n,r.tree=t.getTree(),r}return b(t,e),t.prototype.getTree=function(){return this.tree},t.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},t.prototype.uncheckedSet=function(e){this.parentState.setSubState(this.key,e)},t.prototype.id=function(){if(void 0===this.cachedId){var e=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+e}return this.cachedId},t}(w);function D(e){e?(h=void 0,m=e.stateController(),_=e.createAppState(),y=e.sharedCmsState(),v=_.subState("localCms")):(h=new O,m=h,_=S(),y=h.subState("sharedCms"),v=h.subState("localCms"),g=h.subState("ui")),R()}var x,E=0;function S(){if(!h)throw new r.g;var e=(E++).toString();return h.subState("apps").subState(e)}function j(e){return m.withBatchedUpdates(e)}function T(){return m}function L(e){return m.trackStateAccess(e)}function P(e,t){return m.withFrozenState(e,t)}function A(e){return m.failIfFrozen(e)}function N(e){return m.failIfTracking(e)}function I(e){return u.create(e)}function Y(e,t){return void 0===t&&(t=0),c.create(e,t)}function R(){x=m.subscribe((function(){c.notify(),u.notify()}))}function F(){x&&x(),_.clear()}var H=[],W=function(){return 0!==H.length};function B(e){W()||Object(r.G)((function(){return j((function(){return function e(t){H=[];try{t.forEach((function(e){return e()}))}finally{W()&&e(H)}}(H)}))})),H.push(e)}function z(e,t){var n,i=!0,o=!1,a=I(s);function s(){if(i){var s=L((function(){return P({contextName:"observe",message:"Extract all side-effects into the listener function"},e)}));a.subscribeChanges(s.accessedState);var c=s.result;o&&Object(r.v)(c,n)||(t(c),n=c,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function U(e,t){var n=L((function(){return P({contextName:"observeSync",message:"Use non-sync observe or nextTick"},e)})),i=n.result,o=Y((function(){var n=L(e);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(t(a),i=a)}));return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function q(e){return new r.j((function(t){var n=z(e,(function(e){null!=e&&(n.unsubscribe(),t(e))}))}))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return w})),n.d(t,"h",(function(){return S}));var r=n(0),i=n(5),o=n(7),a="GET",s="SEND",c=1;function u(e,t){var n=c++,u={};return Object.keys(e).forEach((function(c){var l=e[c];l===a&&(u[c]=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),u=c,l=s.subState(u).subState(Object(r.s)(e)),d=new i.LoadableData({state:l,stream:t.stream.apply(t,[u].concat(e))});return d.get()}),l===s&&(u[c]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,[c].concat(e))})})),u}function l(e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k((function(r){return Object(i.observeAndLoad)((function(){var r=e();if(r){var i=r[t];return{valueFromClient:i.call.apply(i,[r].concat(n))}}}),(function(e){e.allDataLoaded&&void 0!==e.result&&r.next(e.result.valueFromClient)})).unsubscribe}))},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=new r.j((function(r){Object(o.q)(e).then((function(e){var i=e[t];r(i.call.apply(i,[e].concat(n)))}))}));return a}}}function d(e,t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=t[e];return new r.k((function(e){return Object(i.observeAndLoad)((function(){return a.call.apply(a,[t].concat(n))}),(function(t){t.allDataLoaded&&e.next(t.result)})).unsubscribe}))},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=t[e],a=new r.j((function(e){Object(r.G)((function(){return e(o.call.apply(o,[t].concat(n)))}))}));return a}}}function p(e){return{incomingMessages:new r.k((function(t){function n(e){t.next({data:e.data})}return e.addEventListener("message",n),e.start(),function(){e.removeEventListener("message",n)}})),sendMessage:function(t){e.postMessage(t.data,t.transfer)}}}var f=function(){function e(e){this.muxedStream=e,this.openStreams={}}return e.prototype.streamWithId=function(e){var t=this;return new r.k((function(n){t.ensureSubscribed();var r=t.subjectForStreamId(e).subscribe(n);return function(){r.unsubscribe(),t.removeSubjectIfAbandoned(e)}}))},e.prototype.removeSubjectIfAbandoned=function(e){0===this.subjectForStreamId(e).subscriberCount()&&(delete this.openStreams[e],this.unsubscribeIfAbandoned())},e.prototype.subjectForStreamId=function(e){var t=this.openStreams[e];if(t)return t;var n=new r.l;return this.openStreams[e]=n,n},e.prototype.ensureSubscribed=function(){var e=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(t){var n=t.streamId,r=e.openStreams[n];r&&r.next(t.data)},complete:function(){return Object.keys(e.openStreams).forEach((function(t){var n=e.openStreams[t];n&&(n.complete(),delete e.openStreams[t])}))}}))},e.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},e}();function h(e){return e&&"number"==typeof e.channel&&"string"==typeof e.verb}function m(e){return"string"==typeof e.method&&Array.isArray(e.params)}function _(e){return"CLOSE"===e.verb}function v(e){return"RESPOND"===e.verb}function g(e){return"ERROR"===e.verb}var y,b=(y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function w(e){return new k(e)}var k=function(){function e(e){this.portLink=e,this.channelCounter=1,this.incomingChannels=new f(this.portLink.incomingMessages.map((function(e){return e.data})).filter(h).map((function(e){return{streamId:e.channel,data:e}})))}return e.prototype.stream=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k((function(r){var i=t.getNextChannelId();t.postMessage({channel:i,verb:"OPEN",method:e,params:n});var o=t.incomingChannels.streamWithId(i).subscribe((function(e){v(e)&&r.next(e.data)}));return function(){t.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}}))},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getNextChannelId();this.postMessage({channel:r,verb:"SEND",method:e,params:t});var i=this.incomingChannels.streamWithId(r).filter(x).takeOne().toPromise().then((function(e){if(!e)throw new C;if(g(e))throw new O;return e.data}));return i},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e,transfer:M(e)})},e.prototype.getNextChannelId=function(){return this.channelCounter++},e}(),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i);function M(e){if("SEND"===e.verb)return e.params.filter(D)}function D(e){return e instanceof MessagePort}function x(e){return v(e)||g(e)}function E(e,t,n){return e[n.methodName]===t}function S(e,t,n){new j(e,t,n).start()}var j=function(){function e(e,t,n){this.portLink=e,this.adapterConnection=t,this.description=n,this.incomingMessages=e.incomingMessages.map((function(e){return e.data})).filter(h),this.incomingChannels=new f(this.incomingMessages.map((function(e){return{streamId:e.channel,data:e}})))}return e.prototype.start=function(){var e=this;this.incomingMessages.subscribe((function(t){!function(e){return"OPEN"===e.verb&&m(e)}(t)?function(e){return"SEND"===e.verb&&m(e)}(t)&&e.handleSendMessage(t):e.handleOpenStreamMessage(t)}))},e.prototype.handleOpenStreamMessage=function(e){var t,n=this,r=T(e);if(E(this.description,a,r)){var i=(t=this.adapterConnection).stream.apply(t,[r.methodName].concat(r.params)),o=e.channel,s=i.subscribe((function(e){n.postMessage({verb:"RESPOND",data:e,channel:o})}));this.incomingChannels.streamWithId(o).filter(_).takeOne().toPromise().then((function(){s.unsubscribe()}))}},e.prototype.handleSendMessage=function(e){var t,n=this,i=T(e);E(this.description,s,i)&&(t=this.adapterConnection).send.apply(t,[i.methodName].concat(i.params)).then((function(t){return n.postMessage({verb:"RESPOND",data:t,channel:e.channel})}),(function(t){n.postMessage({verb:"ERROR",channel:e.channel}),Object(r.Q)(t)}))},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e})},e}();function T(e){return{methodName:e.method,params:e.params}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return G})),n.d(t,"j",(function(){return K})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"g",(function(){return k})),n.d(t,"f",(function(){return J})),n.d(t,"h",(function(){return Q})),n.d(t,"i",(function(){return $}));var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",(function(){return x})),n.d(r,"perform",(function(){return E})),n.d(r,"reset",(function(){return S})),n.d(r,"currentState",(function(){return T}));var i;function o(){i=0}var a,s,c={init:function(e){o();var t=e.location,n=t.hash,r=n.indexOf("&scrivito.authFailedCount=");if(!(r<0)){var a=n.substr(r+"&scrivito.authFailedCount=".length,3),s=n.substring(0,r);"#"===s&&(s="");var c=t.href.toString().replace(n,s);i=parseInt(a,10)||0,e.history.replaceState({},"",c)}},augmentedRedirectUrl:function(e){var t=e.toString();return e.hash||(t+="#"),t+"&scrivito.authFailedCount="+(i+1)},reset:o,currentFailureCount:function(){return i}},u=n(0),l=n(2),d=n(12),p=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.httpCode=n,i.backendCode=r,i}return p(t,e),t.for=function(e,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new g(e,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new y(e,n,r):new t(e,n,r)},t}(u.i),h=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),m=function(e){function t(t){var n=e.call(this,"Insufficient authorization - please visit "+t)||this;return n.target=t,n}return p(t,e),t}(u.i),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(u.i),v=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.details=i||{},o}return p(t,e),t}(f),g=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),y=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),b=!1,w=0;function k(){return w>0}function O(e,t,n){var r=n.params,i=n.authorization,o=n.forceVerification;return b?u.j.resolve(new XMLHttpRequest):(w+=1,new u.j((function(n,a){var s=function(e,t,n,r){var i=new XMLHttpRequest;function o(e){!function(e,t){w-=1,t(e)}(new _(e),r)}return i.open("POST"===e?"POST":"PUT",t),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(e,t,n){w-=1;var r=e.status;if(!r||!Object(l.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?e.statusText:e.responseText);n(new _(i))}t(e)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(e,t,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(u.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))})))}s={},window._scrivitoRegisterVerificator=function(e,t){s[e].resolve(t)};var C,M,D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x="client_verification_required";!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}D(t,e)}(v);function E(e){return e(j()).catch((function t(n){if(!function(e){return e instanceof v&&e.backendCode===x}(n))throw n;return function(e){if(!C){var t=e.verificator,n=e.data,r=(i=t.id,o=t.url,a=s[i],a||(a=new u.e,s[i]=a,Object(u.E)(o)),a.promise).then((function(e){return new u.j((function(t){e(n,(function(e){t((M=e).authorization)}))}))}));C={challenge:{verificator:t,data:n},promise:Object(u.J)(r,(function(){C=void 0}))}}var i,o,a;return C.promise}(n.details).then(e).catch(t)}))}function S(){C=void 0,M=void 0}function j(){if(M){if(!(M.expiresAfter<new Date))return M.authorization;M=void 0}}function T(){var e=j();if(e)return"Authorization: "+e;if(C){var t=C.challenge;return"Pending computation: "+t.verificator.id+" with "+t.data}return null}var L,P,A=n(17),N=function(){return(N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},I=function(){function e(){this.initDeferred=new u.e,this.authHeaderValueProvider=r}return e.prototype.init=function(e,t,n){t&&(this.tenant=t,this.endpoint=e,this.url=d(e+"/tenants/"+t+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},e.prototype.get=function(e,t){return this.perform("GET",e,t)},e.prototype.put=function(e,t){return this.perform("PUT",e,t)},e.prototype.post=function(e,t){return this.perform("POST",e,t)},e.prototype.delete=function(e,t){return this.perform("DELETE",e,t)},e.prototype.requestBuiltInUserSession=function(e){var t=this;return this.ensureInitialized().then((function(){return t.ajax("PUT","sessions/"+e)})).then((function(e){return c.reset(),e}))},e.prototype.requestVisitorSession=function(e,t){var n=this;return this.ensureInitialized().then((function(){return n.ajax("PUT","sessions/"+e,void 0,"id_token "+t)}))},e.prototype.enableForceVerification=function(){this.forceVerification=!0},e.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},e.prototype.ensureInitialized=function(){return this.initDeferred.promise},e.prototype.perform=function(e,t,n){var r=this;return this.ensureInitialized().then((function(){return r.send(e,t,n).then((function(e){return function(e){return!!e&&!!e.task&&1===Object(l.size)(e)}(e)?r.handleTask(e.task):e}))}))},e.prototype.send=function(e,t,n){var r=this;return this.authHeaderValueProvider.perform((function(i){return r.ajax(e,t,n,i)}))},e.prototype.ajax=function(e,t,n,r){var i=this.url,o=this.forceVerification,a={params:{path:t,verb:e,params:n||{}},authorization:r,forceVerification:o};function s(){return function e(t,n){void 0===n&&(n=0);if(P)return new u.j((function(e){return e(t())}));return t().then((function(r){if(429!==r.status)return r;if(L&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,Y(n));return Object(u.T)(o).then((function(){return e(t,n+1)}))}))}((function(){return O(e,i,a)})).then(R)}return"POST"===e?s():function e(t,n){void 0===n&&(n=0);if(P)return new u.j((function(e){return e(t())}));return t().catch((function(r){if(r instanceof _){if(L&&n>5)throw r;var i=Y(n);return Object(u.T)(i).then((function(){return e(t,n+1)}))}throw r}))}(s)},e.prototype.handleTask=function(e){var t=this;switch(e.status){case"success":return e.result;case"error":throw f.for(e.message,412,e.code);case"exception":throw new _(e.message);case"open":return Object(u.S)(2).then((function(){return t.get("tasks/"+e.id).then((function(e){return t.handleTask(e)}))}));default:throw new _("Invalid task response (unknown status)")}},e}();function Y(e){return 500*Math.pow(2,Math.min(e,16))}function R(e){var t,n=e.status;try{t=JSON.parse(e.responseText)}catch(r){throw new _(e.responseText)}if(n>=200&&n<300)return t;var r=function(e,t,n){if("4"!==e.toString()[0])return 500===e&&F(t.error)?new _(t.error):new _(n);var r=function(e){var t=e.error,n=e.code,r=e.details;if(!F(t))throw H("key error is not a string");if(void 0!==n&&!F(n))throw H("optional key code is not a string");if(void 0!==r&&(i=r,"object"!=typeof i||Array.isArray(i)))throw H("optional key details is not an object");var i;return N({},e,{error:t,code:n,details:r})}(t);if(function(e){if("auth_missing"!==e.code)return!1;var t=e.details;return!!t&&"string"==typeof t.visit}(r)){var i=(o=r.details.visit,a=c.augmentedRedirectUrl(Object(A.f)()),o.replace("retry=RETRY","retry="+c.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(a)));return new m(i)}var o,a;if(401===e)return new v(r.error,e,r.code,r.details);if(403===e){var s=r.code;return F(s)?new h(r.error,e,s):new _("Authentication failure response no string value for code")}return f.for(r.error,e,r.code)}(n,t,e.responseText);throw r instanceof m&&Object(A.i)(r.target),r}function F(e){return"string"==typeof e}function H(e){return new _("Malformed error response: "+e)}var W=new I;var B=new u.b((function(e){return W.get("blobs/mget",{blobs:e}).then((function(t){return t.results.map((function(t,n){return function(e,t){var n=t.public_access.get;if(!n.url)throw new u.g('Missing public access URL for binary "'+e+'"');var r={public_access:{get:{url:n.url}}},i=t.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(e[n].id,t)}))}))}));var z={};function U(e,t){return function(e){var t=z[e];t||(t=function(e){return new u.b((function(t){return W.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then((function(e){return e.results}))}),{batchSize:17})}(e),z[e]=t);return t}(e).retrieve(t).then((function(e){return e||{_deleted:t}}))}var q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function V(e,t){var n=q({consistent:!0},t);return W.get("workspaces/"+e+"/objs/search",n).then((function(e){var t=function(e){var t={results:e.results,total:e.total},n=e.continuation;void 0!==n&&(t.continuation=n);var r=e.objs;void 0!==r&&(t.objs=r);return t}(e);return{results:t.results.map((function(e){return e.id})),continuation:t.continuation,total:t.total,objs:t.objs}}))}function $(e){return!!e&&"widgetlist_diff"===e.format}var G={retrieveObj:function(e,t){return U(e,t)},retrieveObjQuery:function(e,t){return V(e,t)},retrieveFacetQuery:function(e,t){return function(e,t){return W.get("workspaces/"+e+"/objs/search",t).then((function(e){return{facets:e.facets.map((function(e){return e.map((function(e){return{total:e.total,value:e.value,results:e.results}}))}))}}))}(e,t)},retrieveBinaryMetadata:function(e){return function(e){return W.get("blobs/"+encodeURIComponent(e||"")+"/meta_data")}(e)},retrieveBinaryUrls:function(e,t){return function(e,t){var n={id:e};return t&&(n.transformation=t),B.retrieve(n)}(e,t)},retrieveObjFieldDiffs:function(e,t){return function(e,t){return W.get("workspaces/"+e+"/objs/"+t+"/diff").then((function(e){return e}))}(e,t)}};function K(e){G=e}function J(e){return!e._deleted}function Q(e){return"widgetlist"===e[0]}},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return s}));var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},s=function(){function e(e,t){var n={};t._scrivitoPrivateSchema&&r.extend(n,t._scrivitoPrivateSchema.attributes),e.attributes&&r.each(e.attributes,(function(e,t){n[t]=function(e){if("string"==typeof e)return[e];return[e[0],u(e[1])]}(e)}));var i=e.onlyInside;this.definition=o({},e,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return e.forInstance=function(e){return this.forClass(e.constructor)},e.forClass=function(e){return e._scrivitoPrivateSchema},e.basicFieldFor=function(t,n){var r=e.forInstance(t);if(r){var o=r.attributes[n];if(o)return new i.BasicField(t._scrivitoPrivateContent,n,o)}},Object.defineProperty(e.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),e.prototype.isBinary=function(){var e=this.definition.attributes.blob;return!!e&&"binary"===e[0]},e}();function c(e){return!(!e||!e._scrivitoPrivateSchema)}function u(e){if(!("only"in e))return e;var t=e.only,n=a(e,["only"]);return o({},n,{validClasses:"string"==typeof t?[t]:t})}var l=n(0);function d(e,t){if(Object(r.isArray)(t))return Object(r.map)(t,(function(t){return d(e,t)}));if(t instanceof i.BasicObj)return p(t,e.objClassFor(t.objClass()));if(t instanceof i.BasicWidget){var n=t.objClass();return p(t,e.widgetClassFor(n))}if(t instanceof i.BasicLink){var o=Object.create(e.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=t,o}return t}function p(e,t){var n=Object.create(t.prototype);return n._scrivitoPrivateContent=e,n}function f(e){return Object(r.isArray)(e)?Object(r.map)(e,f):e&&e._scrivitoPrivateContent?e._scrivitoPrivateContent:e}function h(e,t,n){return Object(r.mapObject)(e,(function(e,r){if(Object(l.z)(r))return[e];var i=t.attributes[r];if(!i)throw new l.a('Attribute "'+r+'" is not defined for CMS object class "'+n+'".');return[f(e),i]}))}var m=function(){function e(e){this._registry=e}return e.prototype.getObj=function(e,t){var n=i.BasicObj.get(t);return this._checkObjClassAndWrapInAppClass(e,n)},e.prototype.getObjIncludingDeleted=function(e,t){var n=i.BasicObj.getIncludingDeleted(t);return this._checkObjClassAndWrapInAppClass(e,n)},e.prototype.read=function(e,t){var n=s.basicFieldFor(e,t);if(!n)return null;var r=n.get();return d(this._registry,r)},e.prototype.update=function(e,t){var n=this._registry.objClassNameFor(e.constructor);if(!n){var r=void 0;throw r=e.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.a('Updating is not supported on the base class "'+r+'".')}if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=h(t,s.forInstance(e),n);e._scrivitoPrivateContent.update(i)},e.prototype.wrapInAppClass=function(e){return d(this._registry,e)},e.prototype._checkObjClassAndWrapInAppClass=function(e,t){if(!t)return null;var n=this._registry.objClassNameFor(e);if(n&&n!==t.objClass())throw new l.h('Obj with id "'+t.id()+'" is not of type "'+n+'".');return this.wrapInAppClass(t)},e}();function _(e){return function(){function t(){}return t.prototype.id=function(){return this._scrivitoPrivateContent.id()},t.prototype.objClass=function(){return this._scrivitoPrivateContent.objClass()},t.prototype.finishSaving=function(){return this._scrivitoPrivateContent.finishSaving()},t.prototype.get=function(t){if(!Object(l.y)(t))throw new l.a("Attribute names have to be in camel case.");if(Object(l.z)(t))throw new l.a('Attribute name "'+t+'" is not a valid custom attribute name.');return e.read(this,t)},t.prototype.update=function(t){e.update(this,t)},t}()}function v(e,t,n,r){var i={};return Object.keys(n.definition.attributes).forEach((function(n){if(!Object.prototype.hasOwnProperty.call(e,n)){var o=t.initialContentFor(r,n);void 0!==o&&(i[n]=o)}})),i}var g,y=(g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function b(e){var t=new m(e);function n(t,n){var r=new e.ObjSearch;return t&&r.and("_objClass","equals",t),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(t){return d(e,t)}return function(a){function c(){return null!==a&&a.apply(this,arguments)||this}return y(c,a),c.get=function(e){return t.getObj(this,e)},c.getIncludingDeleted=function(e){return t.getObjIncludingDeleted(this,e)},c.getByPath=function(e){return o(i.BasicObj.getByPath(e))},c.getByPermalink=function(e){return o(i.BasicObj.getByPermalink(e))},c.all=function(){return n(e.objClassNameFor(this),1e3)},c.root=function(){return o(i.BasicObj.root())},c.where=function(t,r,i,o){return void 0===o&&(o=null),n(e.objClassNameFor(this)).and(t,r,i,o)},c.create=function(e){void 0===e&&(e={}),w(e,this._appClassName());var t=this._prepareAttributesForCreate(e);return o(i.BasicObj.create(t))},c.createFromFile=function(e,t){void 0===t&&(t={}),function(e){if(!l.f.is(e)){if(l.c.is(e))throw new l.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new l.a('Creating CMS objects from file is only available with instances of "File"')}}(e),function(e,t,n){if(w(e,t),Object.prototype.hasOwnProperty.call(e,"blob"))throw new l.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new l.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(t,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(t);return i.BasicObj.createFromFile(e,n).then((function(e){return o(e)}))},c.prototype.lastChanged=function(){return this._scrivitoPrivateContent.lastChanged()},c.prototype.path=function(){return this._scrivitoPrivateContent.path()},c.prototype.parent=function(){return o(this._scrivitoPrivateContent.parent())},c.prototype.ancestors=function(){return o(this._scrivitoPrivateContent.ancestors())},c.prototype.backlinks=function(){return o(this._scrivitoPrivateContent.backlinks())},c.prototype.children=function(){return o(this._scrivitoPrivateContent.children())},c.prototype.orderedChildren=function(){return o(this._scrivitoPrivateContent.orderedChildren())},c.prototype.permalink=function(){return this._scrivitoPrivateContent.permalink()},c.prototype.slug=function(){return this._scrivitoPrivateContent.slug()},c.prototype.isBinary=function(){var e=s.forInstance(this);return!!e&&e.isBinary()},c.prototype.isRestricted=function(){return this._scrivitoPrivateContent.isRestricted()},c.prototype.contentLength=function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0},c.prototype.contentType=function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""},c.prototype.contentUrl=function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""},c.prototype.metadata=function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection},c.prototype.restrict=function(){this._scrivitoPrivateContent.restrict()},c.prototype.unrestrict=function(){this._scrivitoPrivateContent.unrestrict()},c.prototype.widget=function(e){return o(this._scrivitoPrivateContent.widget(e))},c.prototype.widgets=function(){return o(this._scrivitoPrivateContent.widgets())},c.prototype.destroy=function(){this._scrivitoPrivateContent.destroy()},c._prepareAttributesForCreate=function(t){var n=this._schema(),i=this._appClassName(),o=v(t,e,n,i),a={_objClass:i};return h(Object(r.extend)({},t,o,a),n,i)},c._appClassName=function(){return e.objClassNameFor(this)},c._schema=function(){return s.forClass(this)},c}(_(t))}function w(e,t){if(!t)throw new l.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new l.a('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.')}var k=function(){function e(e,t){this._registry=e,this._basicObjFacetValue=t}return e.prototype.name=function(){return this._basicObjFacetValue.name()},e.prototype.count=function(){return this._basicObjFacetValue.count()},e.prototype.includedObjs=function(){var e=this._basicObjFacetValue.includedObjs();return d(this._registry,e)},e}();function O(e){return r.isArray(e)?e.map((function(e){return f(e)})):f(e)}var C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function M(e){return function(t){function n(n){void 0===n&&(n={});var r=t.call(this)||this,o=s.forInstance(r),a=e.objClassNameFor(r.constructor),c=r._prepareAttributesForConstructor(n,o,a),u=new i.BasicWidget(c);return u.onDidPersist((function(t){var n=d(e,t),r=v(c,e,o,a);n.update(r)})),r._scrivitoPrivateContent=u,r}return C(n,t),n.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return d(e,t)},n.prototype.copy=function(){var t=e.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),t)},n.prototype.destroy=function(){this._scrivitoPrivateContent.remove()},n.prototype._prepareAttributesForConstructor=function(e,t,n){!function(e,t){if(!e)throw new l.a("Creating widgets is not supported for the class Widget or abstract classes.");if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new l.a('Invalid attribute "_objClass". "new '+t._objClass+'" will automatically set the CMS object class correctly.')}(n,e);var i={_objClass:n};return h(Object(r.extend)({},e,i),t,n)},n}(_(new m(e)))}var D=["hash","obj","query","rel","target","title","url"];function x(e){return function(e){var t=r.without.apply(r,[r.keys(e)].concat(D));if(!r.isEmpty(t))throw new l.a("Unexpected attributes "+Object(l.I)(t)+". Available attributes: "+Object(l.I)(D))}(e),r.has(e,"obj")?r.extend({},e,{objId:E(e.obj)}):e}function E(e){return e?f(e).id():null}n(140);var S=function(){function e(){var e;this.mapping={},this.defaultClassForObjs=b(this),this.defaultClassForWidgets=M(this),this.defaultClassForLinks=(e=this,function(){function t(e){var t=x(e);this._scrivitoPrivateContent=new i.BasicLink(t)}return t.prototype.title=function(){return this._scrivitoPrivateContent.title()},t.prototype.query=function(){return this._scrivitoPrivateContent.query()},t.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},t.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},t.prototype.target=function(){return this._scrivitoPrivateContent.target()},t.prototype.url=function(){return this._scrivitoPrivateContent.url()},t.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return t?d(e,t):null},t.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},t.prototype.copy=function(t){var n=this._scrivitoPrivateContent.copy(x(t)),r=Object.create(e.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},t.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},t.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},t}()),this.ObjSearch=function(e){var t=function(){function t(){this._scrivitoPrivateContent=new i.BasicObjSearch}return t.prototype.and=function(e,n,r,i){if(e instanceof t){var o=e;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}else{if(void 0===n)throw new l.a("Missing operator to search with");if(void 0===r)throw new l.a('Missing value to search (specify "null" for missing)');var a=O(r),s=e;this._scrivitoPrivateContent.and(s,n,a,i)}return this},t.prototype.andNot=function(e,t,n){var r=O(n);return this._scrivitoPrivateContent.andNot(e,t,r),this},t.prototype.facet=function(t,n){return this._scrivitoPrivateContent.facet(t,n).map((function(t){return new k(e,t)}))},t.prototype.first=function(){var t=this._scrivitoPrivateContent.first();return t?d(e,t):null},t.prototype.take=function(t){return this._scrivitoPrivateContent.take(t).map((function(t){return d(e,t)}))},t.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map((function(t){return d(e,t)}))},t.prototype.offset=function(e){return this._scrivitoPrivateContent.offset(e),this},t.prototype.order=function(e,t){return this._scrivitoPrivateContent.order(e,t),this},t.prototype.count=function(){return this._scrivitoPrivateContent.count()},t}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)t.prototype[n]=function(){var t=this._scrivitoPrivateContent.iterator();return{next:function(){var n=t.next();return n.done?{done:n.done}:{done:n.done,value:d(e,n.value)}}}}}return t}(this)}return e.prototype.register=function(e,t){this.mapping[e]=t},e.prototype.getClass=function(e){return this.mapping[e]||null},e.prototype.allObjClasses=function(){var e=this;return r.pick(this.mapping,(function(t){return e.defaultClassForObjs.isPrototypeOf(t)}))},e.prototype.allWidgetClasses=function(){var e=this;return r.pick(this.mapping,(function(t){return e.defaultClassForWidgets.isPrototypeOf(t)}))},e.prototype.objClassFor=function(e){return this.appClassFor(e,this.defaultClassForObjs)},e.prototype.widgetClassFor=function(e){return this.appClassFor(e,this.defaultClassForWidgets)},e.prototype.objClassNameFor=function(e){return r.findKey(this.mapping,(function(t){return t===e}))},e.prototype.setInitialContentFor=function(e){this.initialContentForFunction=e},e.prototype.initialContentFor=function(e,t){if(this.initialContentForFunction)return this.initialContentForFunction(e,t)},e.prototype.appClassFor=function(e,t){var n=this.getClass(e);return n&&t.isPrototypeOf(n)?n:t},e}(),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function T(e,t){if(t.extend&&!N(t.extend,e.defaultClassForObjs))throw new l.a('Invalid value for "extend": not a Scrivito Obj class');var n=t.extend||e.defaultClassForObjs,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function L(e,t){if(t.extend&&!N(t.extend,e.defaultClassForWidgets))throw new l.a('Invalid value for "extend": not a Scrivito Widget class');var n=t.extend||e.defaultClassForWidgets,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function P(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return T(e,i)}(e,t,n);return e.register(t,i),i}function A(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return L(e,i)}(e,t,n);return e.register(t,i),i}function N(e,t){return!!e&&(e===t||e.prototype instanceof t)}var I=l.O.refinement(l.O.Function,c,"ObjClass"),Y=l.O.interface({attributes:l.O.maybe(l.O.dict(l.O.refinement(l.O.String,(function(e){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(e)}),"String (alphanumeric, starting with a lower-case character)"),l.O.union([l.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),l.O.tuple([l.O.enums.of(["enum","multienum"]),l.O.interface({values:l.O.list(l.O.String)})]),l.O.tuple([l.O.enums.of(["reference","referencelist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})]),l.O.tuple([l.O.enums.of(["widgetlist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})])]),"Attributes Specification")),extend:l.O.maybe(I)}),R=l.O.refinement(l.O.Function,c,"WidgetClass"),F=l.O.interface({attributes:Y.meta.props.attributes,extend:l.O.maybe(R),onlyInside:l.O.maybe(l.O.union([l.O.String,l.O.Array]))}),H=Object(l.p)("createObjClass",[["options",Y]],{docPermalink:"js-sdk/createObjClass"}),W=Object(l.p)("createWidgetClass",[["options",F]],{docPermalink:"js-sdk/createWidgetClass"}),B=l.O.union([Y,I]),z=Object(l.p)("provideObjClass",[["name",l.O.String],["objClassOrDefinition",B]],{docPermalink:"js-sdk/provideObjClass"}),U=l.O.union([F,R]),q=Object(l.p)("provideWidgetClass",[["name",l.O.String],["widgetClassOrDefinition",U]],{docPermalink:"js-sdk/provideWidgetClass"});var V=function(){function e(){this._registry=new S,this.appModelAccessor=new m(this._registry)}return e.init=function(t){var n=new e;return t.Obj=n.Obj,t.Widget=n.Widget,t.Link=n.Link,t.ObjSearch=n.ObjSearch,t.appModelAccessor=n.appModelAccessor,t.provideObjClass=function(e,t){return n.provideObjClass(e,t)},t.provideWidgetClass=function(e,t){return n.provideWidgetClass(e,t)},t.createObjClass=function(e){return n.createObjClass(e)},t.createWidgetClass=function(e){return n.createWidgetClass(e)},t.getClass=function(e){return n.getClass(e)},t.allObjClasses=function(){return n.allObjClasses()},t.allWidgetClasses=function(){return n.allWidgetClasses()},t._privateRealm=n,n},Object.defineProperty(e.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),e.prototype.provideObjClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return z.apply(void 0,[e,t].concat(n)),P(this._registry,e,t)},e.prototype.provideWidgetClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return q.apply(void 0,[e,t].concat(n)),A(this._registry,e,t)},e.prototype.createObjClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return H.apply(void 0,[e].concat(t)),T(this._registry,e)},e.prototype.createWidgetClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return W.apply(void 0,[e].concat(t)),L(this._registry,e)},e.prototype.getClass=function(e){return this._registry.getClass(e)},e.prototype.allObjClasses=function(){return this._registry.allObjClasses()},e.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},e.prototype.setInitialContentFor=function(e){this._registry.setInitialContentFor(e)},e}();t.c=V},function(e,t,n){"use strict";var r;function i(e){return r?r.getContentStateId(e):""}function o(e){r=e}n.d(t,"g",(function(){return i})),n.d(t,"o",(function(){return o})),n.d(t,"a",(function(){return w})),n.d(t,"f",(function(){return O})),n.d(t,"b",(function(){return f})),n.d(t,"q",(function(){return _})),n.d(t,"c",(function(){return v})),n.d(t,"l",(function(){return m})),n.d(t,"i",(function(){return W})),n.d(t,"d",(function(){return F})),n.d(t,"e",(function(){return D})),n.d(t,"j",(function(){return X})),n.d(t,"p",(function(){return Z})),n.d(t,"m",(function(){return A})),n.d(t,"n",(function(){return N})),n.d(t,"h",(function(){return ne})),n.d(t,"k",(function(){return oe}));var a,s=n(2),c=n.n(s),u=n(5),l=n(7),d=n(0),p=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f="inMemory",h=!1;function m(){return h}function _(){h=!0}function v(e){if(h)throw new g(e)}var g=function(e){function t(t){return e.call(this,t+" is not supported when using the in-memory tenant")||this}return p(t,e),t}(d.i),y=n(9),b=new u.LoadableCollection({name:"facetquery",state:function(){return l.c.subState("facetQuery")},loader:function(e){var t=e[0],n=e[1];return y.e.retrieveFacetQuery(t,n)},invalidation:function(e){var t=e[0];e[1];return Object(u.loadableWithDefault)(void 0,(function(){return i(t)}))||""}}),w=function(){function e(e,t,n,r){this._requestParams=k(t,n,r),this._loadableData=b.get([e,this._requestParams])}return e.store=function(e,t,n,r,i){var o=k(t,n,r);b.get([e,o]).set(i)},e.prototype.result=function(){v("Search API");var e=this._loadableData.get();return e?e.facets[0].map((function(e){return{name:e.value,count:e.total,includedObjIds:e.results.map((function(e){return e.id}))}})):[]},e}();function k(e,t,n){var r={facets:[{attribute:e,limit:t.limit||10,include_objs:t.includeObjs||0}],size:0};return Object(s.isEmpty)(n)||(r.query=n),r}function O(e,t){var n=C(e,t);return n||(s.find(e._widget_pool,(function(e,r){if(e&&(n=C(e,t)))return n.parentWidgetId=r,!0})),n)}function C(e,t){var n;return s.find(e,(function(e,r){if(e&&!Object(d.z)(r)){var i=e;if(Object(y.h)(i)){var o=i[1];if(o){var a=o.indexOf(t);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}})),n}function M(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,(function(r,i,o){"_widget_pool"===r?n._widget_pool=function(e,t){if(!t||c.a.isEmpty(t))return e;var n={};return x(e,t,(function(e,r,i){Object.prototype.hasOwnProperty.call(t,e)?i&&!r?n[e]=i:i&&(n[e]=M(r,i)):n[e]=r})),n}(i||{},o):Object.prototype.hasOwnProperty.call(t,r)?o&&(n[r]=o):n[r]=e[r]})),n}function D(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,(function(e,t,r){if("_widget_pool"===e){var i=function(e,t){if(e===t)return;if(!e)return t;var n={};return x(e,t||{},(function(e,t,r){var i=S(t,r,(function(){var e=D(t,r);if(!c.a.isEmpty(e))return e}));void 0!==i&&(n[e]=i)})),n}(t,r);c.a.isEmpty(i)||(n._widget_pool=i)}else{var o=S(t,r,(function(){if(!c.a.isEqual(t,r))return r}));void 0!==o&&(n[e]=o)}})),n}function x(e,t,n){c.a.union(c.a.keys(e),c.a.keys(t)).forEach((function(r){return n(r,E(e[r]),E(t[r]))}))}function E(e){if(c.a.isArray(e)){var t=e[0],n=e[1];return"binary"===t&&n?[t,c.a.omit(n,"url")]:e}return e}function S(e,t,n){return!e&&t?t:e&&!t?null:e&&t?n():void 0}var j=function(){function e(e,t){var n=this;this._workspaceId=e,this._objId=t,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(d.P)((function(){return n._performReplication()}),1e3)}return e.prototype.start=function(){var e=this;y.e.retrieveObj(this._workspaceId,this._objId).then((function(t){Object(l.a)((function(){e.notifyBackendState(t)}))}))},e.prototype.notifyLocalState=function(e){if(!A.isDisabled()){if(void 0===this._backendState)throw new d.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new d.g("Can not update a fully deleted obj.");this._localState=e,this._startReplication()}},e.prototype.notifyBackendState=function(e){if(void 0===this._backendState)return this._backendState=e,void this._updateLocalState(e);if(P(e,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=e;else{if(e._deleted)this._updateLocalState(null);else{var t=T(this._backendState,e);this._updateLocalState(L(this.localState,t))}this._backendState=e}},e.prototype.finishSaving=function(){var e;if(this._nextRequestDeferred)e=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return d.j.resolve();e=this._currentRequestDeferred.promise}return e.catch((function(){return d.j.reject()}))},e.prototype._startReplication=function(){var e=this;c.a.isEmpty(T(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new d.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),A.writeStarted(this._currentRequestDeferred.promise),Object(d.G)((function(){return e._performThrottledReplication()})))},e.prototype._performReplication=function(){var e=this,t=this._localState,n=T(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then((function(n){e._handleBackendUpdate(t,n),e._currentRequestDeferred.resolve(e._objId),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()}),(function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1}))},e.prototype._replicatePatchToBackend=function(e){if(c.a.isEmpty(e))return d.j.resolve(this._backendState);var t="workspaces/"+this._workspaceId+"/objs/"+this._objId;return y.d.put(t,{obj:e})},e.prototype._initDeferredForRequest=function(){if(this._nextRequestDeferred){var e=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=e}else this._currentRequestDeferred=new d.e},e.prototype._handleBackendUpdate=function(e,t){var n=T(e,this._localState);this._backendState=function(e,t){if(P(e,t)>0)return e;return t}(t,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(L(this._backendState,n))},e.prototype._updateLocalState=function(e){this._localState=e,H(this._workspaceId,this._objId,this._localState)},Object.defineProperty(e.prototype,"backendState",{get:function(){return this._backendState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localState",{get:function(){return this._localState},enumerable:!0,configurable:!0}),e.prototype.isNotStoredInBackend=function(){return null===this._backendState},e.prototype.isRequestInFlight=function(){return this._replicationActive},e}();function T(e,t){return D(e,t)}function L(e,t){return M(e,t)}function P(e,t){return e?t?function(e,t){if(e>t)return 1;if(t>e)return-1;return 0}(e._version,t._version):1:-1}var A=new(function(){function e(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return e.prototype.get=function(e,t){return this.replicationCache[e]||(this.replicationCache[e]={}),this.replicationCache[e][t]||(this.replicationCache[e][t]=new j(e,t)),this.replicationCache[e][t]},e.prototype.subscribeWrites=function(e){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=e,this.subscriptionToken},e.prototype.unsubscribeWrites=function(e){delete this.writeWriteCallbacks[e]},e.prototype.isDisabled=function(){return this.disabled},e.prototype.writeStarted=function(e){Object(s.each)(this.writeWriteCallbacks,(function(t){t(e)}))},e.prototype.disableReplication=function(){this.disabled=!0},e.prototype.enableReplication=function(){this.disabled=!1},e.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},e.prototype.clearCache=function(){this.replicationCache={}},e}());function N(e){A=e}function I(){return l.m.subState("objData")}var Y=new u.LoadableCollection({name:"objdata",state:I,loader:function(e){var t=e[0],n=e[1];return A.get(t,n).start(),new d.j((function(){}))}});var R=function(){function e(e,t){this._workspaceId=e,this._id=t,this._loadableData=Y.get([e,t])}return e.prototype.get=function(){return Object(l.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},e.prototype.getWidget=function(e){return Object(l.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(e).get()},e.prototype.getWidgetWithBadPerformance=function(e){return this.getWidgetState(e).get()},e.prototype.getAttribute=function(e){if("_widget_pool"===e)throw new d.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(e).get()},e.prototype.getWidgetAttribute=function(e,t){return this.getWidgetState(e).subState(t).get()},e.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},e.prototype.set=function(e){Object(l.g)("Changing CMS content"),this._loadableData.set(e)},e.prototype.setError=function(e){this._loadableData.setError(e)},e.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},e.prototype.isAvailable=function(){return this._loadableData.isAvailable()},e.prototype.update=function(e){var t=M(this.get(),e);this.set(t),this._replication().notifyLocalState(t)},e.prototype.finishSaving=function(){return this._replication().finishSaving()},e.prototype.workspaceId=function(){return this._workspaceId},e.prototype.equals=function(t){return t instanceof e&&(this.workspaceId()===t.workspaceId()&&this._id===t._id)},e.prototype._replication=function(){return A.get(this._workspaceId,this._id)},e.prototype.getWidgetState=function(e){return this.getSubReader("_widget_pool").subState(e)},e.prototype.getSubReader=function(e){return this._loadableData.reader().subState(e)},e}();function F(e,t){var n=B(e,t);return n.set(null),A.get(e,t).notifyBackendState(null),n}function H(e,t,n){B(e,t).set(n)}function W(e,t){var n=B(e,t);if(n.ensureAvailable())return n}function B(e,t){return new R(e,t)}var z=function(){return(z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},U={results:[],total:0},q=new u.LoadableCollection({name:"objquery",state:function(){return ee()},loader:function(e,t,n){var r=e[0],i=e[1],o=e[2],a=t.push,s=t.isReload,c=t.wasCancelled;return function(e,t,n,r){if(r>0){var i=new V(e,t,n,r-1);return Object(u.load)((function(){return i.continuationForNextBatch()}))}return d.j.resolve()}(r,i,n,o).then((function(e){if(c())throw new Error;var t={size:n,continuation:e,include_objs:!s()},o=z({},i,t);return y.e.retrieveObjQuery(r,o).then((function(e){var t=e.objs;return t&&a((function(){return t.forEach((function(e){e._id&&A.get(r,e._id).notifyBackendState(e)}))})),function(e,t){t.forEach((function(t){return function(e,t){Object(u.load)((function(){return W(e,t)}))}(e,t)}))}(r,e.results),{results:e.results,total:e.total,continuation:e.continuation}}))}))},invalidation:function(e){var t=e[0];e[1],e[2];return Object(u.loadableWithDefault)(void 0,(function(){return i(t)}))||""}}),V=function(){function e(e,t,n,r){void 0===r&&(r=0),this._workspaceId=e,this._params=t,this._batchSize=n,this._index=r}return e.store=function(e,t,n,r){void 0===r&&(r=n.length),q.get([e,G(t),0]).set({results:n,total:r})},e.firstBatchFor=function(t,n,r){return new e(t,G(n),r)},e.countFor=function(e,t){return this.firstBatchFor(e,t,0).count()},e.prototype.objIds=function(){return this._response().results},e.prototype.count=function(){return this._response().total||0},e.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new e(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(e.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),e.prototype.continuationForNextBatch=function(){return this._response().continuation},e.prototype._response=function(){return this._data().get()||U},e.prototype._data=function(){return q.get([this._workspaceId,this._params,this._index],this._batchSize)},e}(),$=V;function G(e){var t=Object(s.omit)({query:e.query,offset:e.offset,sort_by:e.sortBy,sort_order:e.sortDirection},s.isUndefined);return e.includeDeleted&&(t.options={include_deleted:!0}),t}var K=function(){function e(e,t,n){this._workspaceId=e,this._params=t,this._batchSize=n}return e.store=function(e,t,n,r){$.store(e,t,n,r)},e.count=function(e,t){return $.countFor(e,t)},e.prototype.iterator=function(){var e={},t=$.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!t)return{done:!0};var i=t.objIds();if(n<i.length){var o=i[n];return n++,e[o]?r():(e[o]=!0,{value:o,done:!1})}return t=t.nextBatch(),n=0,r()}}},e}(),J=function(){function e(e,t,n){this._workspaceId=e,this._params=t,this._batchSize=n}return e.prototype.count=function(){return K.count(this._workspaceId,this._params)},e.prototype.iterator=function(){return new Q(this._workspaceId,this._params,this._batchSize)},e}(),Q=function(){function e(e,t,n){this._workspaceId=e,this._iterator=new K(e,t,n).iterator()}return e.prototype.next=function(){if(!this._iterator)return{done:!0};var e=this._iterator.next().value;if(!e)return{done:!0};var t=W(this._workspaceId,e);return void 0===t?(this._iterator=void 0,{done:!0}):t.isNonExistent()?this.next():{value:t,done:!1}},e}();function Z(e,t,n,r){K.store(e,t,n,r)}function X(e,t,n){return v("Search API"),new J(e,t,n)}function ee(){return l.c.subState("objQuery")}var te=new u.LoadableCollection({name:"objFieldDiffs",state:function(){return l.c.subState("objFieldDiffs")},loader:function(e){var t=e[0],n=e[1];return y.e.retrieveObjFieldDiffs(t,n)},invalidation:function(e){return function(e,t){var n=W(e,t);if(n)return n.getAttribute("_version")||"";return""}(e[0],e[1])}});function ne(e,t,n,r){if("published"===e)return null;var i=function(e,t){return re(e,t).get()||{}}(e,n);return r?function(e,t,n){var r=n._widget_pool;if(r){var i=r[t];if(i)return ie(e,i)}return null}(t,r,i):ie(t,i)}function re(e,t){return te.get([e,t])}function ie(e,t){var n=t[Object(d.R)(e)];return n?n[1]:null}function oe(e,t,n){var r=W("published",t),i=W(e,t);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(e,t,n){var r=e.getWidgetWithBadPerformance(n),i=t.getWidgetWithBadPerformance(n);return r?i?function(e,t){var n=D(e,t);return Object(s.some)(Object.keys(n),(function(e){return!Object(d.z)(e)||"_obj_class"===e}))}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}},function(e,t,n){var r,i,o;
1
+ /*! Copyright (c) 2022 JustRelate Group GmbH (https://scrivito.com) */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=743)}([function(e,t,n){"use strict";n.d(t,"p",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return _})),n.d(t,"a",(function(){return s.ArgumentError})),n.d(t,"g",(function(){return s.InternalError})),n.d(t,"h",(function(){return s.ResourceNotFoundError})),n.d(t,"i",(function(){return s.ScrivitoError})),n.d(t,"Q",(function(){return p})),n.d(t,"G",(function(){return d})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return c})),n.d(t,"M",(function(){return v})),n.d(t,"F",(function(){return y})),n.d(t,"x",(function(){return b})),n.d(t,"D",(function(){return w})),n.d(t,"E",(function(){return k})),n.d(t,"o",(function(){return L})),n.d(t,"q",(function(){return P})),n.d(t,"N",(function(){return A})),n.d(t,"R",(function(){return T})),n.d(t,"y",(function(){return j})),n.d(t,"f",(function(){return I})),n.d(t,"c",(function(){return N})),n.d(t,"z",(function(){return Y})),n.d(t,"m",(function(){return R})),n.d(t,"L",(function(){return H})),n.d(t,"K",(function(){return F})),n.d(t,"P",(function(){return B})),n.d(t,"H",(function(){return G})),n.d(t,"t",(function(){return $})),n.d(t,"u",(function(){return U})),n.d(t,"B",(function(){return V})),n.d(t,"w",(function(){return K})),n.d(t,"A",(function(){return J})),n.d(t,"C",(function(){return q})),n.d(t,"S",(function(){return X})),n.d(t,"T",(function(){return ee})),n.d(t,"v",(function(){return te})),n.d(t,"J",(function(){return re})),n.d(t,"j",(function(){return ie})),n.d(t,"b",(function(){return ae})),n.d(t,"s",(function(){return se})),n.d(t,"n",(function(){return ue})),n.d(t,"r",(function(){return le})),n.d(t,"k",(function(){return pe})),n.d(t,"l",(function(){return me}));var r=n(2);function i(e){try{return Object(r.isFunction)(e)?function(e){if(function(e){return!!e._scrivitoPrivateSchema}(e)){return"[class "+e._scrivitoPrivateSchema.name+"]"}if(function(e){var t=e.prototype;return t&&t.isReactComponent}(e)){return'[class React.Component "'+(e.displayName||e.name)+'"]'}return a(e.toString())}(e):Object(r.isObject)(e)?function(e){var t=e._scrivitoPrivateContent;if(t&&Object(r.isFunction)(t.toPrettyPrint))return t.toPrettyPrint();if(Object(r.isElement)(e))return"[object HTMLElement "+o(e.outerHTML)+"]";return o(e)}(e):o(e)}catch(e){return""}}function o(e){var t=JSON.stringify(e);return t?a(t):t}function a(e){return e.length>100?e.slice(0,100)+"...":e}var s=n(52),c=n(58);c.struct.strict=!0,c.interface.strict=!0,c.fail=function(e){throw new TypeError(e)};var u,l=[];function d(e){u?l.push(e):setTimeout(e,0)}function p(e){d((function(){throw e}))}function f(e,t,n){var r=n.docPermalink;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];try{n=h(i,t)}catch(e){p(e)}if(n){var a="Visit https://scrivito.com/"+r+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+e+"': "+n+" "+a)}}}function h(e,t){var n=t.length,o=e.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(t.map((function(t,n){var r=t[0],o=t[1],a=e[n];return c.validate(a,o).errors.map((function(e){return function(e,t){var n=function(e,t){var n="argument '"+e+"'";if(0===t.path.length)return n;return"key '"+t.path.join("/")+"' in "+n}(e,t);if(void 0===t.actual)return"Missing required "+n+".";if(t.expected===c.Nil)return"Unexpected "+n+".";var r=c.getTypeName(t.expected),o="got "+i(t.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,e)}))})));return a.length>0?a.join(" "):void 0}var m=function(){function e(){}return e.prototype.current=function(){return this.currentContext},e.prototype.runWith=function(e,t){var n=this.currentContext;try{return this.currentContext=e,t()}finally{this.currentContext=n}},e}(),_=function(){function e(){var e=this;this.promise=new ie((function(t,n){e.resolve=function(n){e.settled=!0,t(n)},e.reject=function(t){e.settled=!0,n(t)}}))}return e.prototype.isPending=function(){return!this.settled},e}();function v(e){try{return{errorThrown:!1,result:e()}}catch(e){return{errorThrown:!0,error:e}}}var g=!1;function y(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window&&window.console&&!g&&(e=window.console).error.apply(e,t)}function b(){var e="1.0.0.dev-1-gc831e5305284";return e}function w(e,t){void 0===t&&(t=window.document);var n=t.createElement("link");n.rel="stylesheet",n.href=e,O(t.head,n)}function k(e,t){void 0===t&&(t=window.document);var n=t.createElement("script");n.src=e,O(t.head,n)}function O(e,t){e.appendChild(t)}var C=/(_+)(\w)/g,M=/([A-Z])/g,D=/[A-Z]+|\d+/g,x=/^_?(_+[A-Z0-9]|[^_])+$/,E=/[_\s]+/g,S=/[A-Z][a-z]+/g;function j(e){return x.test(e)}function T(e){return e.replace(M,(function(e,t){return"_"+t.toLowerCase()}))}function L(e){return e.replace(C,(function(e,t,n,r){return r?n.toUpperCase()===n?e:""+t.substr(1)+n.toUpperCase():e}))}function P(e){var t=L(e);return t.charAt(0).toUpperCase()+t.slice(1)}function A(e){return e.replace(E," ").replace(S,(function(e){return" "+e.toLowerCase()})).replace(D,(function(e){return" "+e})).trim().replace(/./,(function(e){return e.toUpperCase()}))}n(136);var N=c.interface({size:c.Number,type:c.String},{name:"Blob",strict:!1}),I=N.extend({name:c.String},{name:"File",strict:!1});function Y(e){return"_"===e[0]}function R(e,t){for(var n=e.iterator(),r=[];r.length!==t;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function F(){for(var e=Math.floor(Math.random()*Math.pow(16,8)).toString(16);e.length<8;)e="0"+e;return e}function H(){return F()+F()}var W=!1;function B(e,t,n){return W?e:r.throttle(e,t,n)}var z=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function U(e){return"string"==typeof e&&e.match(/^-?\d+$/)||"number"==typeof e?Z(e):null}function q(e){return function(e){return V(e)&&Math.floor(e)===e}(e)&&-9007199254740991<=e&&e<=9007199254740991}function V(e){return"number"==typeof e&&Object(r.isFinite)(e)}function $(e){if("string"!=typeof e)return null;if(!J(e))throw new s.InternalError('The value is not a valid ISO date time: "'+e+'"');return G(e)}function G(e){if(!e)return null;var t=e.match(z);if(!t)return null;var n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=parseInt(n,10),u=parseInt(r,10),l=parseInt(i,10),d=parseInt(o,10),p=parseInt(a,10),f=parseInt(s,10);return new Date(Date.UTC(c,u-1,l,d,p,f))}function K(e){return""+(""+e.getUTCFullYear()+Q(e.getUTCMonth()+1))+(""+Q(e.getUTCDate())+Q(e.getUTCHours()))+(""+Q(e.getUTCMinutes())+Q(e.getUTCSeconds()))}function J(e){return"string"==typeof e&&!!e.match(/^\d{14}$/)}function Q(e){return e<10?"0"+e:e}function Z(e){var t=parseInt(e.toString(),10);return 0===t?0:q(t)?t:null}function X(e){return ee(1e3*e)}function ee(e){return new ie((function(t){setTimeout(t,e)}))}function te(e,t){return ne(e)&&ne(t)?e.equals(t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Object(r.every)(Object(r.zip)(e,t),(function(e){return te(e[0],e[1])})):e&&t?e.valueOf()===t.valueOf():e===t}function ne(e){return!!e&&"function"==typeof e.equals}function re(e,t){return e.then((function(e){return t(),e}),(function(e){throw t(),e}))}var ie,oe=n(149);ie="undefined"!=typeof Promise?Promise:oe.a;var ae=function(){function e(e,t){var n=(void 0===t?{}:t).batchSize;this.mget=e,this.batchSize=n||100,this.itemsToBatch=[]}return e.prototype.retrieve=function(e){var t=this;0===this.itemsToBatch.length&&d((function(){return t.performRetrieval()}));var n=new _;return this.itemsToBatch.push({key:e,deferred:n}),n.promise},e.prototype.reset=function(){this.itemsToBatch=[]},e.prototype.performRetrieval=function(){var e=this,t=this.itemsToBatch.splice(0,this.batchSize);if(0!==t.length){var n=t.map((function(e){return e.key}));this.mget(n).then((function(n){t.forEach((function(t,r){var i=t.key,o=t.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else e.retrieve(i).then(o.resolve,o.reject)}))}),(function(e){t.forEach((function(t){return t.deferred.reject(e)}))})),this.performRetrieval()}},e}();function se(e){var t=ce(e);return JSON.stringify(t)}function ce(e){return Array.isArray(e)?e.map(ce):function(e){return"object"==typeof e&&null!==e}(e)?Object.keys(e).sort().map((function(t){return[t,ce(e[t])]})):e}var ue=Object.assign||r.extend;function le(e,t){var n=e.clientX,r=e.clientY,i=t.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}var de,pe=function(){function e(e){this.subscribeFunction=e}return e.prototype.subscribe=function(e){var t=new fe("object"==typeof e?e:{next:e}),n=this.subscribeFunction(t);return t.setUnsubscribeCallback("object"==typeof n?function(){return n.unsubscribe()}:n),t},e.prototype.map=function(t){var n=this;return new e((function(e){return n.subscribe({next:function(n){return e.next(t(n))},complete:function(){return e.complete()}})}))},e.prototype.filter=function(t){var n=this;return new e((function(e){return n.subscribe({next:function(n){t(n)&&e.next(n)},complete:function(){return e.complete()}})}))},e.prototype.toPromise=function(){var e=this;return new ie((function(t){var n;e.subscribe({next:function(e){n=e},complete:function(){t(n)}})}))},e.prototype.takeOne=function(){var t=this;return new e((function(e){var n=t.subscribe({next:function(t){n.unsubscribe(),e.next(t),e.complete()},complete:function(){e.complete()}});return n}))},e.prototype.takeUntil=function(t){var n=this;return new e((function(e){var r,i;if((i=n.subscribe({next:function(t){e.next(t)},complete:function(){o()}})).isClosed())return function(){};function o(){e.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=t.subscribe({next:function(){o()},complete:function(){o()}}),a}))},e}(),fe=function(){function e(e){this.subscriber=e}return e.prototype.next=function(e){this.subscriber&&this.subscriber.next&&this.subscriber.next(e)},e.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},e.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},e.prototype.isClosed=function(){return!this.subscriber},e.prototype.setUnsubscribeCallback=function(e){this.unsubscribeCallback=e},e}(),he=(de=function(e,t){return(de=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}de(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),me=function(e){function t(){var t=e.call(this,(function(e){if(t.isCompleted)return e.complete(),function(){};var n=(t.subscriberIdCounter++).toString();return t.subscribers[n]=e,function(){delete t.subscribers[n]}}))||this;return t.subscribers={},t.subscriberIdCounter=1,t.isCompleted=!1,t}return he(t,e),t.prototype.next=function(e){var t=this;Object.keys(this.subscribers).forEach((function(n){t.subscribers[n].next(e)}))},t.prototype.complete=function(){var e=this;Object.keys(this.subscribers).forEach((function(t){return e.subscribers[t].complete()})),this.subscribers={},this.isCompleted=!0},t.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},t.prototype.isClosed=function(){return this.isCompleted},t}(pe)},function(e,t,n){"use strict";e.exports=n(225)},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=i._,a=Array.prototype,s=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,l=a.slice,d=s.toString,p=s.hasOwnProperty,f=Array.isArray,h=Object.keys,m=Object.create,_=function(){},v=function(e){return e instanceof v?e:this instanceof v?void(this._wrapped=e):new v(e)};t.nodeType?i._=v:(!n.nodeType&&n.exports&&(t=n.exports=v),t._=v),v.VERSION="1.9.1";var g,y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return v.iteratee!==g?v.iteratee(e,t):null==e?v.identity:v.isFunction(e)?y(e,t,n):v.isObject(e)&&!v.isArray(e)?v.matcher(e):v.property(e)};v.iteratee=g=function(e,t){return b(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},k=function(e){if(!v.isObject(e))return{};if(m)return m(e);_.prototype=e;var t=new _;return _.prototype=null,t},O=function(e){return function(t){return null==t?void 0:t[e]}},C=function(e,t){return null!=e&&p.call(e,t)},M=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},D=Math.pow(2,53)-1,x=O("length"),E=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=D};v.each=v.forEach=function(e,t,n){var r,i;if(t=y(t,n),E(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=v.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},v.map=v.collect=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var S=function(e){var t=function(t,n,r,i){var o=!E(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var c=o?o[s]:s;r=n(r,t[c],c,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,y(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=S(1),v.reduceRight=v.foldr=S(-1),v.find=v.detect=function(e,t,n){var r=(E(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=b(t,n),v.each(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r},v.reject=function(e,t,n){return v.filter(e,v.negate(b(t)),n)},v.every=v.all=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},v.some=v.any=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},v.contains=v.includes=v.include=function(e,t,n,r){return E(e)||(e=v.values(e)),("number"!=typeof n||r)&&(n=0),v.indexOf(e,t,n)>=0},v.invoke=w((function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=M(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))})),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r>o&&(o=r);else t=b(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r<o&&(o=r);else t=b(t,n),v.each(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o},v.shuffle=function(e){return v.sample(e,1/0)},v.sample=function(e,t,n){if(null==t||n)return E(e)||(e=v.values(e)),e[v.random(e.length-1)];var r=E(e)?v.clone(e):v.values(e),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=v.random(a,o),c=r[a];r[a]=r[s],r[s]=c}return r.slice(0,t)},v.sortBy=function(e,t,n){var r=0;return t=b(t,n),v.pluck(v.map(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),"value")};var j=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=b(r,i),v.each(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}};v.groupBy=j((function(e,t,n){C(e,n)?e[n].push(t):e[n]=[t]})),v.indexBy=j((function(e,t,n){e[n]=t})),v.countBy=j((function(e,t,n){C(e,n)?e[n]++:e[n]=1}));var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;v.toArray=function(e){return e?v.isArray(e)?l.call(e):v.isString(e)?e.match(T):E(e)?v.map(e,v.identity):v.values(e):[]},v.size=function(e){return null==e?0:E(e)?e.length:v.keys(e).length},v.partition=j((function(e,t,n){e[n?0:1].push(t)}),!0),v.first=v.head=v.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:v.initial(e,e.length-t)},v.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},v.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))},v.rest=v.tail=v.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},v.compact=function(e){return v.filter(e,Boolean)};var L=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=x(e);o<a;o++){var s=e[o];if(E(s)&&(v.isArray(s)||v.isArguments(s)))if(t)for(var c=0,u=s.length;c<u;)r[i++]=s[c++];else L(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};v.flatten=function(e,t){return L(e,t,!1)},v.without=w((function(e,t){return v.difference(e,t)})),v.uniq=v.unique=function(e,t,n,r){v.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=b(n,r));for(var i=[],o=[],a=0,s=x(e);a<s;a++){var c=e[a],u=n?n(c,a,e):c;t&&!n?(a&&o===u||i.push(c),o=u):n?v.contains(o,u)||(o.push(u),i.push(c)):v.contains(i,c)||i.push(c)}return i},v.union=w((function(e){return v.uniq(L(e,!0,!0))})),v.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!v.contains(t,o)){var a;for(a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},v.difference=w((function(e,t){return t=L(t,!0,!0),v.filter(e,(function(e){return!v.contains(t,e)}))})),v.unzip=function(e){for(var t=e&&v.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=v.pluck(e,r);return n},v.zip=w(v.unzip),v.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var P=function(e){return function(t,n,r){n=b(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};v.findIndex=P(1),v.findLastIndex=P(-1),v.sortedIndex=function(e,t,n,r){for(var i=(n=b(n,r,1))(t),o=0,a=x(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var A=function(e,t,n){return function(r,i,o){var a=0,s=x(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(l.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}};v.indexOf=A(1,v.findIndex,v.sortedIndex),v.lastIndexOf=A(-1,v.findLastIndex),v.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},v.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(l.call(e,r,r+=t));return n};var N=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=w((function(e,t,n){if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w((function(i){return N(e,r,t,this,n.concat(i))}));return r})),v.partial=w((function(e,t){var n=v.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return N(e,r,this,this,a)};return r})),v.partial.placeholder=v,v.bindAll=w((function(e,t){var n=(t=L(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=v.bind(e[r],e)}})),v.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return C(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=w((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),v.defer=v.partial(v.delay,v,1),v.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:v.now(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=v.now();s||!1!==n.leading||(s=u);var l=t-(u-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var I=!{toString:null}.propertyIsEnumerable("toString"),Y=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(e,t){var n=Y.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(C(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=Y[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)C(e,n)&&t.push(n);return I&&R(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return I&&R(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},v.mapObject=function(e,t,n){t=b(t,n);for(var r=v.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},v.pairs=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},v.invert=function(e){for(var t={},n=v.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},v.functions=v.methods=function(e){var t=[];for(var n in e)v.isFunction(e[n])&&t.push(n);return t.sort()};var F=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,c=0;c<s;c++){var u=a[c];t&&void 0!==n[u]||(n[u]=o[u])}return n}};v.extend=F(v.allKeys),v.extendOwn=v.assign=F(v.keys),v.findKey=function(e,t,n){t=b(t,n);for(var r,i=v.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var H,W,B=function(e,t,n){return t in n};v.pick=w((function(e,t){var n={},r=t[0];if(null==e)return n;v.isFunction(r)?(t.length>1&&(r=y(r,t[1])),t=v.allKeys(e)):(r=B,t=L(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),v.omit=w((function(e,t){var n,r=t[0];return v.isFunction(r)?(r=v.negate(r),t.length>1&&(n=t[1])):(t=v.map(L(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)})),v.defaults=F(v.allKeys,!0),v.create=function(e,t){var n=k(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},H=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&W(e,t,n,r)},W=function(e,t,n,r){e instanceof v&&(e=e._wrapped),t instanceof v&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!H(e[u],t[u],n,r))return!1}else{var l,p=v.keys(e);if(u=p.length,v.keys(t).length!==u)return!1;for(;u--;)if(l=p[u],!C(t,l)||!H(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0},v.isEqual=function(e,t){return H(e,t)},v.isEmpty=function(e){return null==e||(E(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)},v.isElement=function(e){return!(!e||1!==e.nodeType)},v.isArray=f||function(e){return"[object Array]"===d.call(e)},v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},v.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){v["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}})),v.isArguments(arguments)||(v.isArguments=function(e){return C(e,"callee")});var z=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(v.isFunction=function(e){return"function"==typeof e||!1}),v.isFinite=function(e){return!v.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},v.isNaN=function(e){return v.isNumber(e)&&isNaN(e)},v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},v.isNull=function(e){return null===e},v.isUndefined=function(e){return void 0===e},v.has=function(e,t){if(!v.isArray(t))return C(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!p.call(e,i))return!1;e=e[i]}return!!n},v.noConflict=function(){return i._=o,this},v.identity=function(e){return e},v.constant=function(e){return function(){return e}},v.noop=function(){},v.property=function(e){return v.isArray(e)?function(t){return M(t,e)}:O(e)},v.propertyOf=function(e){return null==e?function(){}:function(t){return v.isArray(t)?M(e,t):e[t]}},v.matcher=v.matches=function(e){return e=v.extendOwn({},e),function(t){return v.isMatch(t,e)}},v.times=function(e,t,n){var r=Array(Math.max(0,e));t=y(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},v.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},v.now=Date.now||function(){return(new Date).getTime()};var U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=v.invert(U),V=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=V(U),v.unescape=V(q),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=v.isFunction(o)?o.call(e):o}return e};var $=0;v.uniqueId=function(e){var t=++$+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var G=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+K[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||G).source,(t.interpolate||G).source,(t.evaluate||G).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,(function(t,n,r,i,s){return a+=e.slice(o,s).replace(J,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},c=t.variable||"obj";return s.source="function("+c+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),(function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),Z(this,n.apply(v,e))}})),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}})),v.each(["concat","join","slice"],(function(e){var t=a[e];v.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}})),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(41),n(79)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"AnyNormalizedSingleTypeInfo",(function(){return i.AnyNormalizedSingleTypeInfo})),n.d(t,"AnyNormalizedTypeInfo",(function(){return i.AnyNormalizedTypeInfo})),n.d(t,"AnyNormalizedTypeOptions",(function(){return i.AnyNormalizedTypeOptions})),n.d(t,"AnyTypeInfo",(function(){return i.AnyTypeInfo})),n.d(t,"AnyTypeOptions",(function(){return i.AnyTypeOptions})),n.d(t,"NormalizedTypeInfo",(function(){return i.NormalizedTypeInfo})),n.d(t,"AttributeType",(function(){return o.AttributeType})),n.d(t,"BasicAttributeDict",(function(){return o.BasicAttributeDict})),n.d(t,"BasicAttributeValue",(function(){return o.BasicAttributeValue})),n.d(t,"BasicAttributeValueForUpdate",(function(){return o.BasicAttributeValueForUpdate})),n.d(t,"SystemAttributeValue",(function(){return o.SystemAttributeValue})),n.d(t,"BasicField",(function(){return s})),n.d(t,"BasicLink",(function(){return Se})),n.d(t,"BasicLinkAttributes",(function(){})),n.d(t,"BasicObjFacetValue",(function(){return m})),n.d(t,"ObjSearchParams",(function(){})),n.d(t,"BasicObjSearch",(function(){return b})),n.d(t,"OPERATORS",(function(){return _})),n.d(t,"BasicSearchValue",(function(){})),n.d(t,"SearchField",(function(){})),n.d(t,"SearchOperator",(function(){})),n.d(t,"Boost",(function(){})),n.d(t,"BasicObj",(function(){return ke})),n.d(t,"MaybeBasicObj",(function(){})),n.d(t,"setLinkHandler",(function(){return De})),n.d(t,"LinkHandler",(function(){})),n.d(t,"BasicWidget",(function(){return ce})),n.d(t,"TransformationDefinition",(function(){})),n.d(t,"Binary",(function(){return V})),n.d(t,"BlobMock",(function(){})),n.d(t,"FutureBinary",(function(){return F})),n.d(t,"FutureBinaryOptions",(function(){})),n.d(t,"IdToCopySource",(function(){})),n.d(t,"SourceSource",(function(){})),n.d(t,"setBinaryHandler",(function(){return N})),n.d(t,"BinaryHandler",(function(){})),n.d(t,"MetadataCollection",(function(){return z})),n.d(t,"BinaryMetadataValue",(function(){})),n.d(t,"ObjSearchType",(function(){return j})),n.d(t,"LinkType",(function(){return S})),n.d(t,"ObjType",(function(){return x})),n.d(t,"WidgetType",(function(){return E})),n.d(t,"BinaryType",(function(){return T})),n.d(t,"QueryParameters",(function(){})),n.d(t,"parseQuery",(function(){return l})),n.d(t,"queryParametersFromUrl",(function(){return d})),n.d(t,"currentWorkspaceId",(function(){return re})),n.d(t,"resetCurrentWorkspaceId",(function(){return oe})),n.d(t,"setCurrentWorkspaceId",(function(){return ie})),n.d(t,"getPlacementModificationInfos",(function(){return je})),n.d(t,"PlacementModification",(function(){}));var r={};n.r(r),n.d(r,"deserialize",(function(){return J}));var i=n(54),o=n(57),a=n(11),s=function(){function e(e,t,n){this.container=e,this.attributeName=t,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return e.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},e.prototype.update=function(e){var t;this.container.update(((t={})[this.attributeName]=[e,this.typeInfo],t))},e.prototype.getContainer=function(){return this.container},e.prototype.obj=function(){return this.container.obj()},e.prototype.name=function(){return this.attributeName},e.prototype.type=function(){return this.typeInfo[0]},e.prototype.workspaceId=function(){return this.obj().workspaceId()},e.prototype.equals=function(t){return t instanceof e&&(this.container.equals(t.getContainer())&&this.attributeName===t.name())},e.prototype.validClasses=function(){return this.typeOptions.validClasses},e.prototype.getDiff=function(){var e=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,e.id(),this.container===e?void 0:this.container.id())},e.prototype.toString=function(){var e=this.obj(),t=this.attributeName;return this.container===e?"<BasicField name="+t+" objId="+e.id()+">":"<BasicField name="+t+" objId="+e.id()+" widgetId="+this.container.id()+">"},e.prototype.id=function(){var e=this.obj();return this.container===e?this.attributeName+"|"+e.id():this.attributeName+"|"+e.id()+"|"+this.container.id()},e}(),c=n(0),u=n(12);function l(e){return u.parseQuery(e)}function d(e){return new u(e).query(!0)}var p=n(2),f=n.n(p),h=n(107);var m=function(){function e(e){var t=e.name,n=e.count,r=e.includedObjIds;this._name=t,this._count=n,this._includedObjIds=r}return e.prototype.name=function(){return this._name},e.prototype.count=function(){return this._count},e.prototype.includedObjs=function(){return Object(p.compact)(this._includedObjIds.map((function(e){return ke.get(e)})))},e}(),_=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],v=["equals","startsWith","isGreaterThan","isLessThan"],g=["contains","containsPrefix"],y={query:[]},b=function(){function e(e){void 0===e&&(e=y);this._query=[].concat(e.query),this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return e.prototype.and=function(t,n,r,i){if(t instanceof e)this._query=this._query.concat(t._query);else{if(void 0===n)throw new c.a("Missing operator to search with");if(void 0===r)throw new c.a('Missing value to search (specify "null" for missing)');var o=w(t,n,r);i&&(!function(e){if(!Object(p.contains)(g,e))throw new c.a('Boosting operator "'+e+'" is invalid.')}(n),o.boost=function(e){var t={};return Object(p.each)(e,(function(e,n){var r=O(n);t[r]=e})),t}(i)),this._query.push(o)}return this},e.prototype.andNot=function(e,t,n){var r=w(e,t,n);return function(e){if(!Object(p.contains)(v,e))throw new c.a('Negating operator "'+e+'" is invalid.')}(t),r.negate=!0,this._query.push(r),this},e.prototype.offset=function(e){return this._offset=e,this},e.prototype.order=function(e,t){return void 0===t&&(t="asc"),this._sortBy=O(e),this._sortDirection=t,this},e.prototype.batchSize=function(e){return this._batchSize=e,this},e.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},e.prototype.count=function(){return this.getObjDataQuery().count()},e.prototype.first=function(){return this.take(1)[0]||null},e.prototype.take=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];D.apply(void 0,[e].concat(t));var r=this._batchSize;try{return this._batchSize=void 0===e?1e3:e,Object(c.m)(this,e)}finally{this._batchSize=r}},e.prototype.iterator=function(){var e=this.getObjDataQuery().iterator();return{next:function(){var t=e.next(),n=t.done,r=t.value;return n?{done:!0}:{done:!1,value:new ke(r)}}}},e.prototype.getObjDataQuery=function(){return Object(a.j)(re(),this.params(),this.getBatchSize())},e.prototype.getBatchSize=function(){return this._batchSize||100},e.prototype.facet=function(e,t){var n;return n=void 0===t?{}:function(e){var t=p.without.apply(void 0,[Object.keys(e)].concat(C));if(t.length)throw new c.a("Invalid facet options: "+Object(c.I)(t)+". Valid options: "+C);return e}(t),new a.a(re(),O(e),n,this._query).result().map((function(e){return new m(e)}))},e.prototype.store=function(e,t){Object(a.p)(re(),this.params(),e,t)},e.prototype.params=function(){return Object(p.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},p.isUndefined)},e}();function w(e,t,n){return{field:function(e){if(Object(p.isArray)(e))return Object(p.map)(e,O);return O(e)}(e),operator:function(e){if(!function(e){return Object(p.contains)(_,e)}(e))throw new c.a('Operator "'+e+'" is invalid.');return Object(c.R)(e)}(t),value:function(e){if(Object(p.isArray)(e))return Object(p.map)(e,k);return k(e)}(n)}}function k(e){return Object(p.isDate)(e)?Object(c.w)(e):e instanceof ke?e.id():e}function O(e){if(!Object(c.y)(e))throw new c.a('Attribute name "'+e+'" is not camel case.');return Object(c.R)(e)}var C=["limit","includeObjs"];var M=c.O.refinement(c.O.Number,(function(e){return e>=0}),"Number (positive)"),D=Object(c.p)("objSearch.take",[["count",c.O.maybe(M)]],{docPermalink:"js-sdk/ObjSearch-take"}),x=c.O.irreducible("Obj",(function(e){return L(e,ke)})),E=c.O.irreducible("Widget",(function(e){return L(e,ce)})),S=c.O.irreducible("Link",(function(e){return L(e,Se)})),j=c.O.irreducible("ObjSearch",(function(e){return L(e,b)})),T=c.O.irreducible("Binary",(function(e){return e instanceof V}));function L(e,t){return!!e&&e._scrivitoPrivateContent instanceof t}var P,A=n(7);function N(e){P=e}var I=function(){function e(e,t){void 0===t&&(t={});var n=t.filename;if(this.contentType=t.contentType,e.idToCopy)this.idToCopy=e.idToCopy;else{var r=e.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return e.prototype.into=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Y.apply(void 0,[e].concat(t)),Object(A.g)("Changing CMS content"),this.intoId(e._scrivitoPrivateContent.id())},e.prototype.intoId=function(e){if(!P)throw new c.g("No binaryHandler defined!");var t;if(this.idToCopy)t=P.copyBinary(this.idToCopy,e,this.filename,this.contentType);else{if(!this.source)throw new c.g("Source is not defined!");t=P.uploadBinary(e,this.source,this.filename,this.contentType)}return t.then((function(e){var t=e.id;return new V(t,!1)}))},e}(),Y=Object(c.p)("FutureBinary#into",[["target",x]],{docPermalink:"js-sdk/FutureBinary-into"});var R,F=I,H=n(5),W=n(9);!function(e){e.Date="date",e.Number="number",e.String="string",e.Stringlist="stringlist"}(R||(R={}));var B=new H.LoadableCollection({name:"metadata",state:function(){return A.c.subState("metadataCollection")},loader:function(e){return W.e.retrieveBinaryMetadata(e)}}),z=function(){function e(e){this.binaryId=e,e&&(this.loadableData=B.get(e))}return e.store=function(e,t){U(t),B.get(e).set(t)},e.prototype.get=function(e){Object(a.c)("MetadataCollection#get"),function(e){if(!Object(c.y)(e))throw new c.a('Metadata key "'+e+'" is not in camel case.')}(e);var t=this.getData();if(t){var n=Object(c.R)(e);return t.hasOwnProperty(n)?t[n]:null}return null},e.prototype.keys=function(){var e=this.getData();return e?Object(p.map)(Object(p.keys)(e),c.o):[]},e.prototype.contentLength=function(){var e=this.get("contentLength");return"number"!=typeof e?0:e},e.prototype.contentType=function(){var e=this.get("contentType");return"string"!=typeof e?"":e},e.prototype.getData=function(){if(this.loadableData){var e=this.loadableData.get();if(e)return U(e)}},e}();function U(e){for(var t=e.meta_data,n={},r=0,i=Object.keys(t);r<i.length;r++){var o=i[r],a=t[o],s=a[0],u=a[1];if(null==u)throw new c.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var l=void 0;if(s===R.Date){if("string"!=typeof u)throw new c.g('Invalid non-string backend value for a date metadata "'+o+'"');l=Object(c.t)(u)}else l=u;n[o]=l}return n}var q=new H.LoadableCollection({name:"binary",state:function(){return A.c.subState("binary")},loader:function(e){var t=e[0],n=e[1];return W.e.retrieveBinaryUrls(t,n)}}),V=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n={}),this._id=e,this._isPublic=!!t,this._transformation=n||void 0,this._loadableData=q.get([e,this._transformation])}return e.upload=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(K.apply(void 0,[e,t].concat(n)),!(c.f.is(e)||t&&t.filename))throw new c.a("Expected a filename to be passed with Blob as the source.");return new F({source:e},t)},e.store=function(t,n,r){var i=n.transformation;q.get([t,i]).set(r);var o=new e(t).raw();return i?o.optimizeFor(i):o},e.storeMetadata=function(e,t){z.store(e,t)},e.prototype.id=function(){return this._id},e.prototype.copy=function(e){return new F({idToCopy:this._id},e)},e.prototype.isPrivate=function(){return!this._isPublic},e.prototype.optimizeFor=function(t){return new e(this._id,this._isPublic,Object(p.extend)({},this._transformation,t))},e.prototype.original=function(){return new e(this._id,this._isPublic,{})},e.prototype.raw=function(){return new e(this._id,this._isPublic,null)},e.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(p.isEmpty)(this._transformation)},e.prototype.isRaw=function(){return!this.isTransformed()},e.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},e.prototype.urlWithoutPlaceholder=function(){var e=this._loadableData.get();if(e){var t=e[this.accessType()];if(!t)throw new c.g("Missing key "+this.accessType+" in binary data");return t.get.url}},e.prototype.filename=function(){var e=this.url();return!e||e.match(/^data:/)?"":u(e).path().split("/").pop()||""},e.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new z(this._id)},e.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},e.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},e.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var e=/[^.\\]*$/.exec(this.raw().filename());if(e)return e[0].toLowerCase()}return""},e.prototype.equals=function(t){return t instanceof e&&t.id()===this.id()&&t.isPrivate()===this.isPrivate()&&Object(p.isEqual)(t.definition(),this.definition())},e.prototype.isImage=function(){var e=this.raw().contentType();return!!e&&"image"===e.split("/")[0]},e.prototype.definition=function(){return this._transformation||null},e.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},e.prototype.assertNotTransformed=function(e){if(this.isTransformed())throw new c.i('"'+e+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},e.prototype.isTransformed=function(){return!!this._transformation},e}(),$=c.O.struct({contentType:c.O.maybe(c.O.String),filename:c.O.maybe(c.O.String)}),G=c.O.refinement(c.O.Object,(function(e){return c.c.is(e)||c.f.is(e)}),"Blob or File"),K=Object(c.p)("Binary.upload",[["source",G],["options",c.O.maybe($)]],{docPermalink:"js-sdk/Binary-static-upload"});function J(e,t,n,r){var i=t[0],o=t[1];switch(n){case"binary":return function(e,t){if("binary"===e&&t){var n=t.id,r="published"===re();return new V(n,r)}return null}(i,o);case"date":return function(e,t){if("date"!==e)return null;return Object(c.t)(t)}(i,o);case"float":return function(e,t){switch(e){case"string":return t.match(/^-?\d+(\.\d+)?$/)?Q(t):null;case"number":return Q(t);default:return null}}(i,o);case"enum":return function(e,t,n){var r=n.values;if("string"===e&&f.a.contains(r,t))return t;return null}(i,o,r);case"html":return function(e,t){if(f.a.contains(["html","string"],e)&&f.a.isString(t))return t;return""}(i,o);case"integer":return function(e,t){switch(e){case"string":case"number":return Object(c.u)(t);default:return null}}(i,o);case"link":return function(e,t){if("link"!==e||!f.a.isObject(t))return null;return Z(t)}(i,o);case"linklist":return function(e,t){if(!f.a.isArray(t))return[];return f.a.compact(t.map(Z))}(0,o);case"multienum":return function(e,t,n){var r=n.values;if("stringlist"!==e||!Array.isArray(t))return[];return f.a.intersection(t,r)}(i,o,r);case"reference":return function(e,t,n){if("reference"===e&&t)return X(t,n);return null}(i,o,e);case"referencelist":return function(e,t,n){if("referencelist"!==e)return[];if(!t)return[];var r=t.map((function(e){return X(e,n)}));return f.a.compact(r)}(i,o,e);case"string":return function(e,t){if(f.a.contains(["html","string"],e)&&f.a.isString(t))return t;return""}(i,o);case"stringlist":return function(e,t){if("stringlist"!==e||!Array.isArray(t))return[];return t}(i,o);case"widgetlist":return function(e,t,n){if("widgetlist"!==e)return[];return f.a.map(t,(function(e){return n.widget(e)}))}(i,o,e);default:return null}}function Q(e){var t=parseFloat(e);return Object(c.B)(t)?t:null}function Z(e){var t=f.a.pick(e,"query","rel","target","title","url");"fragment"in e&&(t.hash=e.fragment),"obj_id"in e&&(t.objId=e.obj_id);var n=new Se(t);return n.isBroken()?null:n}function X(e,t){var n=ke.getInWorkspace(t.workspaceId(),e);return n||null}var ee=function(){function e(){}return e.prototype.get=function(e,t){var n=Object(c.R)(e),i=this.getAttributeData(n);return i&&p.isArray(i)||(i=[]),"string"==typeof t?J(this,i,t):J.apply(r,[this,i].concat(t))},e.prototype.serializeAttributes=function(e){var t=this;return p.mapObject(e,(function(e,n){if(function(e){return p.isArray(e)&&"widgetlist"===e[0]}(e)){var r=Object(c.o)(n);return["widgetlist",p.invoke(t.get(r,["widgetlist"]),"serializeAttributes")]}return e}))},e.prototype.persistWidgets=function(e,t){p.each(t,(function(t){if(function(e){if(!e)return!1;if(!p.isArray(e))return!1;if(e.length<2)return!1;var t=e[1];return p.isArray(t)&&t.length>0&&"widgetlist"===t[0]}(t)){var n=t[0];if(n){var r=p.isArray(n)?n:[n];p.each(r,(function(t){t.isPersisted()||t.persistInObj(e)}))}}}))},e}();function te(e){return p.mapObject(e,(function(e,t){if(Object(c.z)(t))return p.isArray(e)?e:[e];if(!p.isArray(e))throw new c.g("Value for "+t+" should be a tuple: [value, typeInfo]");var n=e[0],r=e[1];return"string"==typeof r?[n,[r]]:[n,r]}))}var ne;function re(){return ne||"published"}function ie(e){ne=e}function oe(){ne=void 0}var ae,se=(ae=function(e,t){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ae(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ce=function(e){function t(t){var n=e.call(this)||this;return n._attributesToBeSaved=te(t),function(e){if(!e)throw new c.a('Please provide a widget class as the "_objClass" property.')}(t._objClass),n}return se(t,e),t.build=function(e,n){var r=Object.create(t.prototype);return r._obj=n,r._id=e,r},t.newWithSerializedAttributes=function(e){var n={},r={};f.a.each(e,(function(e,i){if("_obj_class"!==i)if(f.a.isArray(e)&&"widgetlist"===f.a.first(e)){var o=f.a.map(f.a.last(e),(function(e){return t.newWithSerializedAttributes(e)})),a=Object(c.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=e;else n._objClass=[e]}));var i=new t(n);return i.preserializedAttributes=r,i},t.prototype.id=function(){return this._failIfNotPersisted(),this._id},t.prototype.objClass=function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]},t.prototype.obj=function(){return this._failIfNotPersisted(),this._obj},t.prototype.widget=function(e){return this.obj().widget(e)},t.prototype.workspaceId=function(){return this.obj().workspaceId()},t.prototype.modification=function(){return Object(a.k)(re(),this.obj().id(),this.id())},t.prototype.update=function(e){var t=this,n=te(e);Object(A.r)((function(){t.persistWidgets(t.obj(),n);var e=de(n);t._updateSelf(e)}))},t.prototype.insertBefore=function(e){e.obj().insertWidget(this,{before:e})},t.prototype.insertAfter=function(e){e.obj().insertWidget(this,{after:e})},t.prototype.remove=function(){this.obj().removeWidget(this)},t.prototype.copy=function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()},t.prototype.persistInObj=function(e){this.persistWidgets(e,this._attributesToBeSaved);var t=de(this._attributesToBeSaved);f.a.extend(t,this.preserializedAttributes||{}),this._obj=e,this._id=e.generateWidgetId(),this._updateSelf(t),this._executeDidPersistCallback()},t.prototype.isPersisted=function(){return!!this._obj},t.prototype.onDidPersist=function(e){if(this.isPersisted())throw new c.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=e},t.prototype.hasOnDidPersistCallback=function(){return!!this._onDidPersistCallback},Object.defineProperty(t.prototype,"attributesToBeSaved",{get:function(){return this._attributesToBeSaved},enumerable:!0,configurable:!0}),t.prototype.finishSaving=function(){return this.obj().finishSaving()},t.prototype.equals=function(e){return e instanceof t&&(this.id()===e.id()&&this.obj().id()===e.obj().id())},t.prototype.containingField=function(){return this.obj().fieldContainingWidget(this)},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'" objId="'+this.obj().id()+'"]'},t.prototype.getAttributeData=function(e){return this.obj().getWidgetAttribute(this.id(),e)},t.prototype.getData=function(){return this.obj().getWidgetData(this.id())},t.prototype.serializeAttributes=function(){return e.prototype.serializeAttributes.call(this,this.getData())},t.prototype._failIfNotPersisted=function(){if(!this.isPersisted())throw new c.i("Can not access a new widget before it has been saved.")},t.prototype._updateSelf=function(e){var t,n={_widgetPool:[(t={},t[this.id()]=e,t)]};this.obj().update(n)},t.prototype._executeDidPersistCallback=function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)},t.prototype._copyPersisted=function(){var e=this.serializeAttributes();return t.newWithSerializedAttributes(e)},t.prototype._copyUnpersisted=function(){var e=new t(f.a.mapObject(this._attributesToBeSaved,(function(e){var t=e[0],n=e[1];return n&&"widgetlist"===n[0]?[f.a.invoke(t,"copy"),n]:[t,n]})));return this._onDidPersistCallback&&e.onDidPersist(this._onDidPersistCallback),e},t}(ee);function ue(e){if(e instanceof Se)return!0;if(!p.isObject(e))return!1;var t=p.without(p.keys(e),"hash","obj_id","query","rel","target","title","url");return p.isEmpty(t)}function le(e){var t,n=e instanceof Se?{rel:(t=e).rel()||void 0,query:t.query(),target:t.target(),title:t.title(),url:t.url(),obj_id:t.objId(),fragment:t.hash()}:function(e){return{obj_id:e.obj_id||null,query:e.query||null,rel:e.rel||void 0,target:e.target||null,title:e.title||null,url:e.url||null,fragment:e.hash||null}}(e);return n.rel||delete n.rel,n}function de(e){var t={};return f.a.each(e,(function(e,n){var r=e[0],i=e[1],o=function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");return Object(c.R)(e)}(n);if(Object(c.z)(o))t[o]=r;else{var a=i[0],s=i[1];t[o]=[pe(a,n),he(fe(a,s,r,n))]}})),t}function pe(e,t){switch(e){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return e;default:throw new c.a('Attribute "'+t+'" is of unsupported type "'+e+'".')}}function fe(e,t,n,r){if(null===n)return n;switch(e){case"binary":return function(e,t){if(e instanceof V)return{id:e.id()};me(e,t,"A Binary.")}(n,r);case"date":return function(e,t){if(f.a.isDate(e))return Object(c.w)(e);if(Object(c.A)(e))return e;me(e,t,"A Date.")}(n,r);case"enum":return function(e,t,n){var r=e.values;if(f.a.contains(r,t))return t;me(t,n,'Valid attribute values are contained in its "values" array ['+r+"].")}(t,n,r);case"float":return function(e,t){if(Object(c.B)(e))return e;var n=e;f.a.isNumber(e)&&(n=String(e));me(n,t,"A Number, that is #isFinite().")}(n,r);case"html":return function(e,t){if(f.a.isString(e))return e;me(e,t,"A String.")}(n,r);case"integer":return function(e,t){if(Object(c.C)(e))return e;me(e,t,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(e,t){if(ue(e))return le(e);me(e,t,"A Link instance.")}(n,r);case"linklist":return function(e,t){if(f.a.isArray(e)&&f.a.every(e,ue))return f.a.map(e,le);me(e,t,"An array of Link instances.")}(n,r);case"multienum":return function(e,t,n){var r=e.values,i="An array with values from "+Object(c.I)(r)+".";f.a.isArray(t)&&f.a.every(t,f.a.isString)||me(t,n,i);var o=f.a.difference(t,r);if(o.length){var a=i+" Forbidden values: "+Object(c.I)(o)+".";me(t,n,a)}return t}(t,n,r);case"reference":return function(e,t){if(ve(e))return _e(e);me(e,t,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(e,t){if(function(e){return f.a.isArray(e)&&f.a.every(e,(function(e){return ve(e)}))}(e))return f.a.map(e,_e);me(e,t,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(e,t){if(ge(e))return e.toString();me(e,t,"A String.")}(n,r);case"stringlist":return function(e,t){if(f.a.isArray(e)&&f.a.every(e,(function(e){return ge(e)})))return f.a.invoke(e,"toString");me(e,t,"An array of strings.")}(n,r);case"widgetlist":return function e(t,n){if(t instanceof ce)return e([t],n);if(f.a.isArray(t)&&f.a.every(t,(function(e){return e instanceof ce})))return f.a.invoke(t,"id");me(t,n,"An array of BasicWidget instances.")}(n,r);default:throw new c.g('serializeAttributeValue is not implemented for "'+e+'".')}}function he(e){return(f.a.isString(e)||f.a.isArray(e))&&f.a.isEmpty(e)?null:e}function me(e,t,n){throw new c.a("Unexpected value "+Object(c.I)(e)+' for attribute "'+t+'". Expected: '+n)}function _e(e){return e instanceof ke?e.id():e}function ve(e){return f.a.isString(e)||e instanceof ke}function ge(e){return f.a.isString(e)||f.a.isNumber(e)}var ye,be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),we=function(e){function t(t){var n=e.call(this)||this;return n.objData=t,n}return be(t,e),t.get=function(e){var t=this.getIncludingDeleted(e);return!t||t.isDeleted()?null:t},t.getInWorkspace=function(e,t){var n=this.getIncludingDeletedInWorkspace(e,t);return!n||n.isDeleted()?null:n},t.getIncludingDeleted=function(e){return this.getIncludingDeletedInWorkspace(re(),e)},t.getIncludingDeletedInWorkspace=function(e,n){var r=Object(a.i)(e,n);if(!r)return null;var i=new t(r);return i.isFinallyDeleted()?null:i},t.create=function(e){return this.createInWorkspace(re(),e)},t.createInWorkspace=function(e,t){var n=te(t);!function(e){if(!e)throw new c.a('Please provide an obj class as the "_objClass" property.')}(n._objClass),n._id||(n._id=[this.generateId()]);var r={_id:n._id,_obj_class:n._objClass};return this.createWithSerializedAttributes(e,p.mapObject(r,(function(e){return e[0]})),p.omit(t,"_objClass","_id"))},t.createFromFile=function(e,t){var n=this.create(t);return V.upload(e).intoId(n.id()).then((function(e){return n.update({blob:[e,["binary"]]}),n.finishSaving().then((function(){return n}))}))},t.addChildWithSerializedAttributes=function(e,n){var r=t.generateId();return this.createWithSerializedAttributes(re(),p.extend({},n,{_id:r,_path:e+"/"+r}))},t.createWithSerializedAttributes=function(e,n,r){if(!r){var i=function(e){var t={},n={};p.each(e,(function(e,r){if(a=e,p.isArray(a)&&"widgetlist"===p.first(a)){var i=p.map(e[1],Oe),o=Object(c.o)(r);n[o]=[i,["widgetlist"]]}else t[r]=e;var a})),t._id||(t._id=we.generateId());return[t,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(e,o,s)}var u=Object(a.d)(e,n._id);u.update(n);var l=new t(u);return l.update(r),l},t.generateId=function(){return Object(c.L)()},t.all=function(){return(new b).batchSize(1e3)},t.root=function(){return t.getByPath("/")},t.where=function(e,t,n,r){return(new b).and(e,t,n,r)},t.getByPath=function(e){var t=this.where("_path","equals",e).first();return t||null},t.getByPermalink=function(e){var t=this.where("_permalink","equals",e).first();return t||null},t.getAllByPermalink=function(e){return this.where("_permalink","equals",e).take()},t.generateWidgetId=function(){return Object(c.K)()},t.prototype.id=function(){return this.getAttributeData("_id")},t.prototype.objClass=function(){return this.getAttributeData("_obj_class")},t.prototype.obj=function(){return this},t.prototype.createdAt=function(){return Object(c.H)(this.getAttributeData("_created_at"))},t.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},t.prototype.lastChanged=function(){var e=this.getAttributeData("_last_changed");return e?Object(c.H)(e):null},t.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},t.prototype.version=function(){return this.getAttributeData("_version")},t.prototype.workspaceId=function(){return this.objData.workspaceId()},t.prototype.path=function(){return this.getAttributeData("_path")||null},t.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},t.prototype.parentPath=function(){var e=this.path();return e&&"/"!==e?function(e){var t=e.split("/");if(t.pop(),1===t.length)return"/";return t.join("/")}(e):null},t.prototype.parent=function(){var e=this.parentPath();return e?t.getByPath(e):null},t.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},t.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},t.prototype.isModified=function(){return!!this.modification()},t.prototype.isNew=function(){return"new"===this.modification()},t.prototype.isEdited=function(){return"edited"===this.modification()},t.prototype.isDeleted=function(){return"deleted"===this.modification()},t.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},t.prototype.contentLength=function(){return this.metadata().contentLength()},t.prototype.contentType=function(){return this.metadata().contentType()},t.prototype.contentUrl=function(){var e=this.blob();return e?e.url():""},t.prototype.metadata=function(){var e=this.blob();return e?new z(e.id()):new z},t.prototype.children=function(){var e=this.path();return e?Ce(e).take():[]},t.prototype.hasChildren=function(){var e=this.path();return!!e&&Ce(e).batchSize(0).count()>0},t.prototype.orderedChildren=function(){var e=this.children(),t=this.get("childOrder","referencelist");return p.isArray(t)?p.sortBy(e,(function(e){var n=p.invoke(t,"id").indexOf(e.id());return-1===n?t.length:n})):e},t.prototype.backlinks=function(){return t.where("*","linksTo",this).take()},t.prototype.ancestors=function(){var e=this.parentPath();return e?function(e){var t=["/"];if("/"===e)return t;var n=e.split("/").slice(1),r="";return n.forEach((function(e){r=r+"/"+e,t.push(r)})),t}(e).map((function(e){return t.getByPath(e)})):[]},t.prototype.isRestricted=function(){var e=this.restriction();return!!e&&e.length>0},t.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},t.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},t.prototype.unrestrict=function(){this.update({_restriction:null})},t.prototype.update=function(e){var t=this,n=te(e);Object(A.r)((function(){t.persistWidgets(t,n);var e=de(n);t.objData.update(e)})),this.startLinkResolution()},t.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},t.prototype.insertWidget=function(e,t){var n,r=function(e){if(function(e){return!!e.before}(e))return e.before.id();return e.after.id()}(t),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,c=i.index,u=t.before?c:c+1,l=o.slice(0,u).concat([e],o.slice(u));s.update(((n={})[a]=[l,["widgetlist"]],n))}},t.prototype.removeWidget=function(e){var t=this.fieldContainingWidget(e);if(t){var n=t.get(),r=p.reject(n,(function(t){return t.equals(e)}));t.update(r)}},t.prototype.siblingWidget=function(e,t){var n=this._widgetPlacementFor(e.id());if(n)return n.attributeValue[n.index+t]},t.prototype.copyAsync=function(e){return void 0===e&&(e={}),function(e){if(p.difference(p.keys(e),["_path"]).length)throw new c.a('Currently only "_path" copy option is supported.')}(e),this._copyAttributes().then((function(n){var r=p.extend(n,e),i=t.createWithSerializedAttributes(re(),r);return i.objData.finishSaving().then((function(){return i}))}))},t.prototype.moveToAsync=function(e){return this.moveTo(e),this.finishSaving()},t.prototype.moveTo=function(e){this.update({_path:[e+"/"+this.id()]})},t.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},t.prototype.finishSaving=function(){var e=this;return this.finishLinkResolution().then((function(){return e.objData.finishSaving()}))},t.prototype.equals=function(e){return e instanceof t&&this.id()===e.id()},t.prototype.widget=function(e){return this.getWidgetAttribute(e,"_obj_class")?ce.build(e,this):null},t.prototype.getWidgetAttribute=function(e,t){return this.objData.getWidgetAttribute(e,t)},t.prototype.widgets=function(){var e=this.getData();if(!xe(e))return[];var t=e._widget_pool;if(!t)return[];var n=[];return this.collectWidgets(n,e,t,{}),n},t.prototype.fieldContainingWidget=function(e){var t=e.id(),n=this._widgetPlacementFor(t);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},t.prototype.generateWidgetId=function(){for(var e=0;e<10;e++){var n=t.generateWidgetId();if(!this.widget(n))return n}throw new c.g("Could not generate a new unused widget id.")},t.prototype.serializeAttributes=function(){var t=e.prototype.serializeAttributes.call(this,this.getData());return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t},t.prototype.slug=function(){var e,t=this.get("title","string");return"string"!=typeof(e=t)?"":h(e)},t.prototype.getWidgetData=function(e){return this.objData.getWidget(e)},t.prototype.startLinkResolution=function(){Object(a.l)()||Me().startLinkResolutionFor(re(),this.id())},t.prototype.finishLinkResolution=function(){return Me().finishLinkResolutionFor(re(),this.id())},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},t.prototype.getAttributeData=function(e){return this.objData.getAttribute(e)},t.prototype.getData=function(){return this.objData.get()},t.prototype.blob=function(){return this.get("blob",["binary"])},t.prototype._copyAttributes=function(){var e=t.generateId(),n=this.serializeAttributes(),r=[];return p.each(n,(function(t,i){if("_"!==i[0]){if(function(e){return"binary"===e[0]&&!!e[1]}(t)){var o=t[1],a=new F({idToCopy:o.id}).intoId(e).then((function(e){return{name:i,binary:e}}));r.push(a)}}else delete n[i]})),n._id=e,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+e),c.j.all(r).then((function(e){return p.each(e,(function(e){var t=e.name,r={id:e.binary.id()};n[t]=["binary",r]})),n}))},t.prototype.collectWidgets=function(e,t,n,r){var i=this;p.map(t,(function(e,t){if(e&&!Object(c.z)(t)){var n=e;return Object(W.h)(n)?n[1]:void 0}})).forEach((function(t){t&&t.forEach((function(t){if(!r[t]){r[t]=!0;var o=i.widget(t);if(o){e.push(o);var a=n[t];i.collectWidgets(e,a,n,r)}}}))}))},t.prototype._widgetPlacementFor=function(e){var t=this.getData();if(xe(t)){var n=Object(a.f)(t,e);if(n){var r,i=Object(c.o)(n.attributeName),o=n.parentWidgetId;if(o){if(!(r=this.widget(o)))return}else r=this;return{container:r,attributeName:i,attributeValue:r.get(i,["widgetlist"]),index:n.index,parentWidgetId:o}}}},t}(ee),ke=we;function Oe(e){return ce.newWithSerializedAttributes(e)}function Ce(e){return we.all().and("_parentPath","equals",e)}function Me(){if(!ye)throw new Error("No Link Handler");return ye}function De(e){ye=e}function xe(e){return!!e&&Object(W.f)(e)}var Ee=function(){return(Ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Se=function(){function e(e){this.attributes=Ee({},e)}return e.prototype.title=function(){return this.attributes.title||null},e.prototype.query=function(){return this.attributes.query||null},e.prototype.hash=function(){return this.attributes.hash||null},e.prototype.rel=function(){return this.attributes.rel||null},e.prototype.target=function(){return this.attributes.target||null},e.prototype.url=function(){return this.attributes.url||null},e.prototype.objId=function(){return this.attributes.objId||null},e.prototype.obj=function(){var e=this.objId();return e?ke.get(e):null},e.prototype.queryParameters=function(){return l(this.query()||"")},e.prototype.isExternal=function(){return!!this.url()},e.prototype.isInternal=function(){return!this.isExternal()},e.prototype.equals=function(t){return t instanceof e&&(this.isExternal()?this.hash()===t.hash()&&this.query()===t.query()&&this.rel()===t.rel()&&this.target()===t.target()&&this.title()===t.title()&&this.url()===t.url():this.objId()===t.objId()&&this.title()===t.title())},e.prototype.copy=function(t){void 0===t&&(t={});var n=Ee({},this.attributes,t);if(t.objId&&t.url)throw new c.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return t.objId?n.url=null:t.url&&(n.objId=null),new e(n)},e.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},e.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},e}();function je(e){var t=e.get(),n=function(e){var t=e.getDiff();if(Object(W.i)(t))return t.content}(e);return n?Object(p.compact)(n.map((function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=Te(t,o))return{widget:r,modification:"new"};break;case"=":if(r=Te(t,o))return{widget:r,modification:null};break;case"-":if(r=function(e,t){var n=ke.getInWorkspace("published",e);if(n)return n.widget(t);return null}(e.obj().id(),o))return{widget:r,modification:"deleted"}}}))):t.map((function(e){return{widget:e,modification:null}}))}function Te(e,t){return Object(p.find)(e,(function(e){return e.id()===t}))||null}},function(e,t,n){e.exports=n(457)()},function(e,t,n){"use strict";n.r(t),n.d(t,"loadAllUntil",(function(){return r.default})),n.d(t,"capture",(function(){return s})),n.d(t,"CaptureList",(function(){})),n.d(t,"CaptureReport",(function(){return l})),n.d(t,"isCurrentlyCapturing",(function(){return u})),n.d(t,"LoadingSubscriber",(function(){return d})),n.d(t,"load",(function(){return f})),n.d(t,"LoadableData",(function(){return S})),n.d(t,"reportUsedData",(function(){return L})),n.d(t,"LoaderApi",(function(){})),n.d(t,"LoaderCallback",(function(){})),n.d(t,"LoadableState",(function(){})),n.d(t,"loadableWithDefault",(function(){return P})),n.d(t,"loadWithDefault",(function(){return A})),n.d(t,"mapAndLoadParallel",(function(){return Y})),n.d(t,"runAndCatchErrorsWhileLoading",(function(){return R})),n.d(t,"RunResult",(function(){})),n.d(t,"NotLoadedError",(function(){return O})),n.d(t,"DataRecording",(function(){})),n.d(t,"loadRecording",(function(){return W})),n.d(t,"generateRecording",(function(){return z})),n.d(t,"LoadableCollection",(function(){return F})),n.d(t,"LoadableCollectionState",(function(){})),n.d(t,"observeAndLoad",(function(){return q}));var r=n(117),i=n(0),o=new i.d,a=function(){return o.current()};function s(e){var t={subscribes:[],missing:!1,outdated:!1},n=o.runWith(t,e);return new l(t,n)}function c(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function u(){return void 0!==a()}var l=function(){function e(e,t){this.captureList=e,this.result=t}return e.prototype.forwardToCurrent=function(){var e,t,n=a();n?(e=n,t=this.captureList,e.subscribes=e.subscribes.concat(t.subscribes),e.missing=e.missing||t.missing,e.outdated=e.outdated||t.outdated):this.captureList.missing&&c()},e.prototype.isAllDataLoaded=function(){return!this.captureList.missing},e.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},e.prototype.subscribeLoading=function(e){var t=this.captureList.subscribes.map((function(e){return e()}));e.unsubscribe(),e.storeUnsubscribe((function(){t.forEach((function(e){return e()}))}))},e}(),d=function(){function e(){}return e.prototype.storeUnsubscribe=function(e){this.unsubscribeCallback=e},e.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},e}();var p=n(7);function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.apply(void 0,[e].concat(t));var r=new i.e,o=q((function(){return Object(i.M)((function(){return Object(p.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},e)}))}),(function(e){if(e.allDataUpToDate){o.unsubscribe();var t=e.result;t.errorThrown?r.reject(t.error):r.resolve(t.result)}}));return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),m=function(){function e(e){this.container=e}return e.prototype.reader=function(){return this.container.reader().subState("value")},e.prototype.status=function(){return this.getStateKey("status")||"MISSING"},e.prototype.value=function(){return this.getStateKey("value")},e.prototype.error=function(){return this.getStateKey("error")},e.prototype.version=function(){return this.getStateKey("version")},e.prototype.transitionToMissing=function(){this.setState(void 0)},e.prototype.transitionToAvailable=function(e,t){this.setState({status:"AVAILABLE",value:e,version:t})},e.prototype.transitionToError=function(e,t){this.setState({status:"ERROR",error:e,version:t})},e.prototype.setState=function(e){this.container.set(e)},e.prototype.getStateKey=function(e){return this.container.subState(e).get()},e}(),_={},v={};function g(e,t){var n=!0;y(e,1);var r=_[e];r||(_[e]=t);var i=r||t;return i.notifyDataRequired(),function(){n&&(n=!1,y(e,-1)<1&&i.notifyDataNoLongerRequired())}}function y(e,t){var n=(v[e]||0)+t;return v[e]=n,n}function b(e){var t=_[e];t&&t.notifyDataWasSet()}var w,k=(w=function(e,t){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(e){function t(){return e.call(this,"Data is not yet loaded.",!1)||this}return k(t,e),t}(i.i),C=function(){function e(e,t){this.loadableValue=e,this.stream=t,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return e.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},e.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},e.prototype.notifyDataWasSet=function(){},e.prototype.enqueueUpdate=function(){var e=this;this.isUpdateEnqueued||(Object(i.G)((function(){return e.update()})),this.isUpdateEnqueued=!0)},e.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},e.prototype.ensureStreamIsOpen=function(){var e=this;this.subscription||(this.subscription=this.stream.subscribe((function(t){e.bufferValue(t),e.enqueueUpdate()})))},e.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},e.prototype.bufferValue=function(e){this.bufferedValue=e,this.hasBufferedValue=!0},e.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},e}(),M=0,D=function(){function e(e,t,n){this.value=e,this.loader=t,this.invalidation=n}return e.prototype.notifyDataRequired=function(){this.triggerLoading()},e.prototype.notifyDataNoLongerRequired=function(){},e.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.hasBeenInvalidated=function(){return x(this.value,this.invalidation)},e.prototype.currentVersion=function(){return E(this.invalidation)},e.prototype.triggerLoading=function(){var e=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var t=this.currentVersion(),n=M++,r=function(){return e.currentLoad===n},i=function(t){r()&&Object(p.a)((function(){t(),e.notifyDataWasSet(),a()}))},o=[],a=function(){return o.forEach((function(e){return e()}))};this.loader({push:function(e){return o.push(e)},isReload:function(){return e.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then((function(n){return i((function(){return e.value.transitionToAvailable(n,t)}))}),(function(n){return i((function(){return e.value.transitionToError(n,t)}))})),this.currentLoad=n}},e.prototype.isLoading=function(){return void 0!==this.currentLoad},e}();function x(e,t){return!!t&&("MISSING"!==e.status()&&E(t)!==e.version())}function E(e){if(e){var t=e();if("number"==typeof t&&isNaN(t)){var n="invalidation callback returned unsuitable version "+t;throw new i.g(n)}return t}}var S=function(){function e(e){if(!e.state)throw new i.g("LoadableData needs state");this.value=new m(e.state),this.invalidation=e.invalidation,this.throwNotLoaded=e.throwNotLoaded||!1,this.id=e.state.id(),e.stream?this.loaderProcess=new C(this.value,e.stream):this.loaderProcess=new D(this.value,e.loader,e.invalidation)}return e.prototype.ensureAvailable=function(){var e,t,n=this;if(e=function(){return g(n.id,n.loaderProcess)},(t=a())&&t.subscribes.push(e),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(u()||(g(this.id,this.loaderProcess),c()),function(){var e=a();e&&(e.missing=!0)}(),this.throwNotLoaded)throw new O;return!1},e.prototype.get=function(){if(this.ensureAvailable())return T(this.id,this),this.value.value()},e.prototype.reader=function(){return T(this.id,this),this.value.reader()},e.prototype.set=function(e){this.value.transitionToAvailable(e,this.currentVersion()),b(this.id)},e.prototype.setError=function(e){this.transitionToError(e),b(this.id)},e.prototype.reset=function(){this.value.transitionToMissing()},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},e.prototype.isError=function(){return"ERROR"===this.value.status()},e.prototype.numSubscribers=function(){return e=this.id,v[e]||0;var e},e.prototype.transitionToError=function(e,t){void 0===t&&(t=this.currentVersion()),this.value.transitionToError(e,t)},e.prototype.notifyIfOutdated=function(){var e;x(this.value,this.invalidation)&&(e=a())&&(e.outdated=!0)},e.prototype.currentVersion=function(){return E(this.invalidation)},e}(),j=new i.d;function T(e,t){var n=j.current();n&&(n[e]=t)}function L(e){var t,n={};return{result:j.runWith(n,e),usedData:(t=n,Object.keys(t).map((function(e){return t[e]})))}}function P(e,t){var n=s((function(){return A(e,t)}));return u()&&n.forwardToCurrent(),n.result}function A(e,t){var n=R(t);return n.allDataLoaded?n.result:e}var N=n(2),I=n.n(N);function Y(e,t){var n=[];if(I.a.each(e,(function(e){var r=R((function(){return t(e)}));r.success&&n.push(r.result)})),n.length<e.length)throw new O;return n}function R(e){var t=s((function(){return Object(i.M)(e)}));t.forwardToCurrent();var n=t.result,r=t.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var F=function(){function e(e){var t=e.name,n=e.state,r=e.loader,o=e.invalidation;this.name=t,this.state=n,this.loader=r,this.invalidation=o,function(e,t){if(H[e])throw new i.g("collection name registered twice: "+e);H[e]=t}(t,this)}return e.prototype.get=function(e,t){var n=this,r=function(e){if("string"==typeof e)return e;return Object(i.s)(e)}(e),o=this.invalidation,a=new S({state:this.state().subState(r),loader:function(r){return n.loader(e,r,t)},invalidation:o?function(){return o(e)}:void 0});return function(e,t){e.affiliation=t}(a,{collectionName:this.name,key:e}),a},e}();var H={};function W(e){Object(p.r)((function(){return e.forEach(B)}))}function B(e){var t=e[0],n=e[1],r=e[2];(function(e){var t=H[e];if(!t)throw new i.g("collection with name "+e+" not found");return t})(t).get(n).set(r)}function z(e){return e.map(U)}function U(e){var t=function(e){return e.affiliation}(e);if(!t)throw new i.g("Tried to record a LoadableData without affiliation");return[t.collectionName,t.key,e.get()]}function q(e,t){var n=new d,r=Object(p.k)((function(){return s((function(){return Object(i.M)(e)}))}),(function(e){e.subscribeLoading(n);var r=e.result;if(r.errorThrown){if(!e.isAllDataUpToDate())return;throw r.error}t({result:r.result,allDataLoaded:e.isAllDataLoaded(),allDataUpToDate:e.isAllDataUpToDate()})}));return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Ct(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function _(e){var t=f(NaN);return null!=e?p(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=i.momentProperties=[];function g(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)s(i=t[r=v[n]])||(e[r]=i);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function O(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=k(t)),n}function C(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&O(e[r])!==O(t[r]))&&a++;return a+o}function M(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var n=!0;return p((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){for(var r,o=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];o.push(r)}M(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var x,E={};function S(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),E[e]||(M(t),E[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e,t){var n,r=p({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=p({},r[n]));return r}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function A(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function N(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function I(e){var t,n,r={};for(n in e)d(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var Y={};function R(e,t){Y[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,i=e.match(H);for(t=0,n=i.length;t<n;t++)z[i[t]]?i[t]=z[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(i[r])?i[r].call(t,e):i[r];return o}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var $=/\d/,G=/\d\d/,K=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function le(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=O(e)}),n=0;n<e.length;n++)fe[e[n]]=r}function me(e,t){he(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function _e(e,t,n){null!=t&&d(fe,e)&&fe[e](t,n._a,n,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),A("year","y"),R("year",1),le("Y",oe),le("YY",Z,G),le("YYYY",ne,J),le("YYYYY",re,Q),le("YYYYYY",re,Q),he(["YYYYY","YYYYYY"],0),he("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):O(e)})),he("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return O(e)+(O(e)>68?1900:2e3)};var ye,be=we("FullYear",!0);function we(e,t){return function(n){return null!=n?(Oe(this,e,n),i.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Oe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ge(e)?29:28:31-r%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),A("month","M"),R("month",8),le("M",Z),le("MM",Z,G),le("MMM",(function(e,t){return t.monthsShortRegex(e)})),le("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[1]=O(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[1]=i:h(n).invalidMonth=e}));var Me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ee(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=ye.call(this._shortMonthsParse,a))||-1!==(i=ye.call(this._longMonthsParse,a))?i:null:-1!==(i=ye.call(this._longMonthsParse,a))||-1!==(i=ye.call(this._shortMonthsParse,a))?i:null}function Se(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=O(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function je(e){return null!=e?(Se(this,e),i.updateOffset(this,!0),this):ke(this,"Month")}var Te=ce,Le=ce;function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),i[t]=pe(i[t]);for(t=0;t<24;t++)o[t]=pe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ae(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Ne(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ie(e,t,n){var r=7+t-n;return-(7+Ne(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+Ie(e,r,i);return s<=0?a=ve(o=e-1)+s:s>ve(e)?(o=e+1,a=s-ve(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Re(e,t,n){var r,i,o=Ie(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Fe(i=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Fe(e,t,n){var r=Ie(e,t,n),i=Ie(e+1,t,n);return(ve(e)-r+i)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Z),le("ww",Z,G),le("W",Z),le("WW",Z,G),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=O(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Z),le("e",Z),le("E",Z),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=O(e)}));var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ue(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null}var qe=ce,Ve=ce,$e=ce;function Ge(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],c=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),c.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),c.sort(e),u.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),c[t]=pe(c[t]),u[t]=pe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Je(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ke),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ke.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Je("a",!0),Je("A",!1),A("hour","h"),R("hour",13),le("a",Qe),le("A",Qe),le("H",Z),le("h",Z),le("k",Z),le("HH",Z,G),le("hh",Z,G),le("kk",Z,G),le("hmm",X),le("hmmss",ee),le("Hmm",X),le("Hmmss",ee),he(["H","HH"],3),he(["k","kk"],(function(e,t,n){var r=O(e);t[3]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[3]=O(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r,2)),t[5]=O(e.substr(i)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=O(e.substr(0,r)),t[4]=O(e.substr(r,2)),t[5]=O(e.substr(i))}));var Ze,Xe=we("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:xe,week:{dow:0,doy:6},weekdays:We,weekdaysMin:ze,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function it(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(459)("./"+t),ot(r)}catch(e){}return tt[t]}function ot(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=it(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new L(T(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!o(e)){if(t=it(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(t=(i=rt(e[o]).split("-")).length,n=(n=rt(e[o+1]))?n.split("-"):null;t>0;){if(r=it(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&C(i,n,!0)>=t-1)break;t--}o++}return Ze}(e)}function ct(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Ce(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}function ut(e,t,n){return null!=e?e:null!=t?t:n}function lt(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,o,a,s,c;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=ut(t.GG,e._a[0],Re(Mt(),1,4).year),r=ut(t.W,1),((i=ut(t.E,1))<1||i>7)&&(c=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Re(Mt(),o,a);n=ut(t.gg,e._a[0],u.year),r=ut(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o}r<1||r>Fe(n,o,a)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(s=Ye(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=ut(e._a[0],r[0]),(e._dayOfYear>ve(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ne(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ne:Ae).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,r,i,o,a,s=e._i,c=dt.exec(s)||pt.exec(s);if(c){for(h(e).iso=!0,t=0,n=ht.length;t<n;t++)if(ht[t][1].exec(c[1])){i=ht[t][0],r=!1!==ht[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(c[3])){o=(c[2]||" ")+mt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(c[4]){if(!ft.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),kt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wt(e){var t,n,r,i,o,a,s,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){var u=(t=c[4],n=c[3],r=c[2],i=c[5],o=c[6],a=c[7],s=[yt(t),xe.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(o,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return bt[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=Ne.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,a,s=""+e._i,c=s.length,u=0;for(r=V(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),z[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-u,s.length>0&&h(e).unusedInput.push(s),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),lt(e),ct(e)}else wt(e);else vt(e)}function Ot(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ct(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),m(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));p(e,n||t)}(e):n?kt(e):function(e){var t=e._i;s(t)?e._d=new Date(i.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,wt(e),!1===e._isValid&&(delete e._isValid,i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=l(t.slice(0),(function(e){return parseInt(e,10)})),lt(e)):a(t)?function(e){if(!e._d){var t=I(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),lt(e)}}(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Ct(e,t,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new b(ct(Ot(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Mt(e,t,n,r){return Ct(e,t,n,r,!1)}i.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Dt=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),xt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Et(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Mt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var St=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jt(e){var t=I(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(St,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<St.length;++r)if(e[St[r]]){if(n)return!1;parseFloat(e[St[r]])!==O(e[St[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function Tt(e){return e instanceof jt}function Lt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Pt(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Pt("Z",":"),Pt("ZZ",""),le("Z",se),le("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Nt(se,e)}));var At=/([\+\-]|\d\d)/gi;function Nt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(At)||["-",0,0],i=60*r[1]+O(r[2]);return 0===i?0:"+"===r[0]?i:-i}function It(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Mt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Mt(e).local()}function Yt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Rt(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ft=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ht=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var n,r,i,o,a,s,u=e,l=null;return Tt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(u={},t?u[t]=e:u.milliseconds=e):(l=Ft.exec(e))?(n="-"===l[1]?-1:1,u={y:0,d:O(l[2])*n,h:O(l[3])*n,m:O(l[4])*n,s:O(l[5])*n,ms:O(Lt(1e3*l[6]))*n}):(l=Ht.exec(e))?(n="-"===l[1]?-1:1,u={y:Bt(l[2],n),M:Bt(l[3],n),w:Bt(l[4],n),d:Bt(l[5],n),h:Bt(l[6],n),m:Bt(l[7],n),s:Bt(l[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Mt(u.from),a=Mt(u.to),i=o.isValid()&&a.isValid()?(a=It(a,o),o.isBefore(a)?s=zt(o,a):((s=zt(a,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=i.milliseconds,u.M=i.months),r=new jt(u),Tt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),qt(this,Wt(n="string"==typeof n?+n:n,r),e),this}}function qt(e,t,n,r){var o=t._milliseconds,a=Lt(t._days),s=Lt(t._months);e.isValid()&&(r=null==r||r,s&&Se(e,ke(e,"Month")+s*n),a&&Oe(e,"Date",ke(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}Wt.fn=jt.prototype,Wt.invalid=function(){return Wt(NaN)};var Vt=Ut(1,"add"),$t=Ut(-1,"subtract");function Gt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Kt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Jt=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Qt(){return this._locale}function Zt(e,t){return(e%t+t)%t}function Xt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){U(0,[e,e.length],0,t)}function nn(e,t,n,r,i){var o;return null==e?Re(this,r,i).year:(t>(o=Fe(e,r,i))&&(t=o),rn.call(this,e,t,n,r,i))}function rn(e,t,n,r,i){var o=Ye(e,t,n,r,i),a=Ne(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),le("G",oe),le("g",oe),le("GG",Z,G),le("gg",Z,G),le("GGGG",ne,J),le("gggg",ne,J),le("GGGGG",re,Q),le("ggggg",re,Q),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=O(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),A("quarter","Q"),R("quarter",7),le("Q",$),he("Q",(function(e,t){t[1]=3*(O(e)-1)})),U("D",["DD",2],"Do","date"),A("date","D"),R("date",9),le("D",Z),le("DD",Z,G),le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],2),he("Do",(function(e,t){t[2]=O(e.match(Z)[0])}));var on=we("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),R("dayOfYear",4),le("DDD",te),le("DDDD",K),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=O(e)})),U("m",["mm",2],0,"minute"),A("minute","m"),R("minute",14),le("m",Z),le("mm",Z,G),he(["m","mm"],4);var an=we("Minutes",!1);U("s",["ss",2],0,"second"),A("second","s"),R("second",15),le("s",Z),le("ss",Z,G),he(["s","ss"],5);var sn,cn=we("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),R("millisecond",16),le("S",te,$),le("SS",te,G),le("SSS",te,K),sn="SSSS";sn.length<=9;sn+="S")le(sn,ie);function un(e,t){t[6]=O(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")he(sn,un);var ln=we("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var dn=b.prototype;function pn(e){return e}dn.add=Vt,dn.calendar=function(e,t){var n=e||Mt(),r=It(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Mt(n)))},dn.clone=function(){return new b(this)},dn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=It(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=Gt(this,r)/12;break;case"month":o=Gt(this,r);break;case"quarter":o=Gt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:k(o)},dn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Xt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Zt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Zt(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},dn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.fromNow=function(e){return this.from(Mt(),e)},dn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Mt(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},dn.toNow=function(e){return this.to(Mt(),e)},dn.get=function(e){return j(this[e=N(e)])?this[e]():this},dn.invalidAt=function(){return h(this).overflow},dn.isAfter=function(e,t){var n=w(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},dn.isBefore=function(e,t){var n=w(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},dn.isBetween=function(e,t,n,r){var i=w(e)?e:Mt(e),o=w(t)?t:Mt(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))},dn.isSame=function(e,t){var n,r=w(e)?e:Mt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},dn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},dn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},dn.isValid=function(){return m(this)},dn.lang=Jt,dn.locale=Kt,dn.localeData=Qt,dn.max=xt,dn.min=Dt,dn.parsingFlags=function(){return p({},h(this))},dn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:Y[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=I(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=N(e)]))return this[e](t);return this},dn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Xt;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Zt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Zt(t,1e3)}return this._d.setTime(t),i.updateOffset(this,!0),this},dn.subtract=$t,dn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},dn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},dn.toDate=function(){return new Date(this.valueOf())},dn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},dn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},dn.toJSON=function(){return this.isValid()?this.toISOString():null},dn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},dn.unix=function(){return Math.floor(this.valueOf()/1e3)},dn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},dn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},dn.year=be,dn.isLeapYear=function(){return ge(this.year())},dn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},dn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},dn.quarter=dn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},dn.month=je,dn.daysInMonth=function(){return Ce(this.year(),this.month())},dn.week=dn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},dn.isoWeek=dn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},dn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},dn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},dn.date=on,dn.day=dn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},dn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},dn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},dn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},dn.hour=dn.hours=Xe,dn.minute=dn.minutes=an,dn.second=dn.seconds=cn,dn.millisecond=dn.milliseconds=ln,dn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Yt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?qt(this,Wt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Yt(this)},dn.utc=function(e){return this.utcOffset(0,e)},dn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Yt(this),"m")),this},dn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},dn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Mt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},dn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},dn.isLocal=function(){return!!this.isValid()&&!this._isUTC},dn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},dn.isUtc=Rt,dn.isUTC=Rt,dn.zoneAbbr=function(){return this._isUTC?"UTC":""},dn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},dn.dates=D("dates accessor is deprecated. Use date instead.",on),dn.months=D("months accessor is deprecated. Use month instead",je),dn.years=D("years accessor is deprecated. Use year instead",be),dn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),dn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Ot(e))._a){var t=e._isUTC?f(e._a):Mt(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var fn=L.prototype;function hn(e,t,n,r){var i=st(),o=f().set(r,t);return i[n](o,e)}function mn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return hn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=hn(e,r,n,"month");return i}function _n(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=st(),a=e?o._week.dow:0;if(null!=n)return hn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=hn(t,(i+a)%7,r,"day");return s}fn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},fn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},fn.invalidDate=function(){return this._invalidDate},fn.ordinal=function(e){return this._ordinal.replace("%d",e)},fn.preparse=pn,fn.postformat=pn,fn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return j(i)?i(e,t,n,r):i.replace(/%d/i,e)},fn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},fn.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Me).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},fn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Me.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Ee.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},fn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},fn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},fn.week=function(e){return Re(e,this._week.dow,this._week.doy).week},fn.firstDayOfYear=function(){return this._week.doy},fn.firstDayOfWeek=function(){return this._week.dow},fn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},fn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},fn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},fn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return Ue.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ve),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},fn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===O(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=D("moment.lang is deprecated. Use moment.locale instead.",ot),i.langData=D("moment.langData is deprecated. Use moment.localeData instead.",st);var vn=Math.abs;function gn(e,t,n,r){var i=Wt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function wn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}var On=kn("ms"),Cn=kn("s"),Mn=kn("m"),Dn=kn("h"),xn=kn("d"),En=kn("w"),Sn=kn("M"),jn=kn("Q"),Tn=kn("y");function Ln(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Ln("milliseconds"),An=Ln("seconds"),Nn=Ln("minutes"),In=Ln("hours"),Yn=Ln("days"),Rn=Ln("months"),Fn=Ln("years"),Hn=Math.round,Wn={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var zn=Math.abs;function Un(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=zn(this._milliseconds)/1e3,r=zn(this._days),i=zn(this._months);e=k(n/60),t=k(e/60),n%=60,e%=60;var o=k(i/12),a=i%=12,s=r,c=t,u=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",f=Un(this._months)!==Un(d)?"-":"",h=Un(this._days)!==Un(d)?"-":"",m=Un(this._milliseconds)!==Un(d)?"-":"";return p+"P"+(o?f+o+"Y":"")+(a?f+a+"M":"")+(s?h+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var Vn=jt.prototype;return Vn.isValid=function(){return this._isValid},Vn.abs=function(){var e=this._data;return this._milliseconds=vn(this._milliseconds),this._days=vn(this._days),this._months=vn(this._months),e.milliseconds=vn(e.milliseconds),e.seconds=vn(e.seconds),e.minutes=vn(e.minutes),e.hours=vn(e.hours),e.months=vn(e.months),e.years=vn(e.years),this},Vn.add=function(e,t){return gn(this,e,t,1)},Vn.subtract=function(e,t){return gn(this,e,t,-1)},Vn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+bn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(wn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Vn.asMilliseconds=On,Vn.asSeconds=Cn,Vn.asMinutes=Mn,Vn.asHours=Dn,Vn.asDays=xn,Vn.asWeeks=En,Vn.asMonths=Sn,Vn.asQuarters=jn,Vn.asYears=Tn,Vn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*O(this._months/12):NaN},Vn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,c=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*yn(wn(s)+a),a=0,s=0),c.milliseconds=o%1e3,e=k(o/1e3),c.seconds=e%60,t=k(e/60),c.minutes=t%60,n=k(t/60),c.hours=n%24,a+=k(n/24),i=k(bn(a)),s+=i,a-=yn(wn(i)),r=k(s/12),s%=12,c.days=a,c.months=s,c.years=r,this},Vn.clone=function(){return Wt(this)},Vn.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},Vn.milliseconds=Pn,Vn.seconds=An,Vn.minutes=Nn,Vn.hours=In,Vn.days=Yn,Vn.weeks=function(){return k(this.days()/7)},Vn.months=Rn,Vn.years=Fn,Vn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Wt(e).abs(),i=Hn(r.as("s")),o=Hn(r.as("m")),a=Hn(r.as("h")),s=Hn(r.as("d")),c=Hn(r.as("M")),u=Hn(r.as("y")),l=i<=Wn.ss&&["s",i]||i<Wn.s&&["ss",i]||o<=1&&["m"]||o<Wn.m&&["mm",o]||a<=1&&["h"]||a<Wn.h&&["hh",a]||s<=1&&["d"]||s<Wn.d&&["dd",s]||c<=1&&["M"]||c<Wn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=t,l[3]=+e>0,l[4]=n,Bn.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Vn.toISOString=qn,Vn.toString=qn,Vn.toJSON=qn,Vn.locale=Kt,Vn.localeData=Qt,Vn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Vn.lang=Jt,U("X",0,0,"unix"),U("x",0,0,"valueOf"),le("x",oe),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(O(e))})),i.version="2.24.0",t=Mt,i.fn=dn,i.min=function(){var e=[].slice.call(arguments,0);return Et("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Et("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(e){return Mt(1e3*e)},i.months=function(e,t){return mn(e,t,"months")},i.isDate=u,i.locale=ot,i.invalid=_,i.duration=Wt,i.isMoment=w,i.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},i.parseZone=function(){return Mt.apply(null,arguments).parseZone()},i.localeData=st,i.isDuration=Tt,i.monthsShort=function(e,t){return mn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},i.defineLocale=at,i.updateLocale=function(e,t){if(null!=t){var n,r,i=et;null!=(r=it(e))&&(i=r._config),t=T(i,t),(n=new L(t)).parentLocale=tt[e],tt[e]=n,ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return x(tt)},i.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},i.normalizeUnits=N,i.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Wn[e]&&(void 0===t?Wn[e]:(Wn[e]=t,"s"===e&&(Wn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=dn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(79)(e))},function(e,t,n){"use strict";n.d(t,"d",(function(){return S})),n.d(t,"c",(function(){return v})),n.d(t,"m",(function(){return y})),n.d(t,"o",(function(){return L})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return P})),n.d(t,"g",(function(){return A})),n.d(t,"h",(function(){return N})),n.d(t,"i",(function(){return T})),n.d(t,"p",(function(){return g})),n.d(t,"b",(function(){return _})),n.d(t,"j",(function(){return D})),n.d(t,"n",(function(){return F})),n.d(t,"e",(function(){return I})),n.d(t,"f",(function(){return Y})),n.d(t,"a",(function(){return B})),n.d(t,"k",(function(){return z})),n.d(t,"l",(function(){return U})),n.d(t,"q",(function(){return q}));var r=n(0),i=n(2),o=function(){function e(e,t){this.value=e,this.copy=t,this.valueForReading=new r.d}return e.prototype.read=function(e){var t=this.value;return this.valueForReading.runWith(t,(function(){return e(t)}))},e.prototype.write=function(e){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),e(this.value)},e}(),a=function(){function e(e){this.notifySubscribers=e,this.subscribersStore=new o([],(function(e){return e.slice()}))}return e.prototype.create=function(e,t){return void 0===t&&(t=0),new s(this.subscribersStore,e,t)},e.prototype.count=function(){return this.subscribersStore.read((function(e){return e.length}))},e.prototype.reset=function(){this.subscribersStore.write((function(e){e.length=0}))},e.prototype.notify=function(){var e=this;this.subscribersStore.read((function(t){return e.notifySubscribers(t)}))},e}(),s=function(){function e(e,t,n){void 0===n&&(n=0),this.subscriberStore=e,this.listener=t,this.rank=n,this.active=!1}return e.prototype.subscribeChanges=function(e){var t=this;this.stateReference=e,this.active||(this.subscriberStore.write((function(e){var n=Object(i.sortedIndex)(e,t,"rank");e.splice(n,0,t)})),this.active=!0),this.hasChanges()&&this.listener()},e.prototype.unsubscribe=function(){var e=this;this.active&&(this.subscriberStore.write((function(t){var n=t.indexOf(e);n>=0&&t.splice(n,1)})),this.active=!1)},e.prototype.notify=function(){this.active&&this.listener()},e.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},e}(),c=new a((function(e){e.forEach((function(e){e.hasChanges()&&e.notify()}))})),u=new a((function(e){e.forEach((function(e){Object(r.G)((function(){e.hasChanges()&&e.notify()}))}))})),l=function(){function e(){this.listenersStore=new o([],(function(e){return e.slice()}))}return e.prototype.subscribe=function(e){var t=this,n=!0,r=function(){n&&e()};return this.listenersStore.write((function(e){return e.push(r)})),function(){n=!1,t.listenersStore.write((function(e){var t=e.indexOf(r);e.splice(t,1)}))}},e.prototype.count=function(){return this.listenersStore.read((function(e){return e.length}))},e.prototype.clear=function(){this.listenersStore.write((function(e){e.length=0}))},e.prototype.notify=function(){this.listenersStore.read((function(e){return e.forEach((function(e){return e()}))}))},e}();function d(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!1;return null!==Object.getPrototypeOf(t)}(e)}function p(e,t){return e===t?t:d(t)?function(e,t){var n={},r=!1;void 0===e&&(r=!0);var i=Object.keys(t),o=new Set;e&&Object.keys(e).forEach((function(e){return o.add(e)}));o.size!==i.length&&(r=!0);return i.forEach((function(i){o.has(i)||(r=!0);var a=e?e[i]:void 0,s=p(a,t[i]);s!==a&&(r=!0),n[i]=s})),r?Object.freeze(n):e}(d(e)?e:void 0,t):Array.isArray(t)?function(e,t){var n=!1;void 0!==e&&e.length===t.length||(n=!0);var r=t.map((function(t,r){var i=e?e[r]:void 0,o=p(i,t);return o!==i&&(n=!0),o}));return n?Object.freeze(r):e}(Array.isArray(e)?e:void 0,t):t}var f,h,m,_,v,g,y,b=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),w=function(){function e(){}return e.prototype.get=function(){var e=this,t=this.untrackedGet();return this.recordDetector((function(){return t!==e.untrackedGet()})),t},e.prototype.recordDetector=function(e){this.getTree().recordDetector(e)},e.prototype.set=function(e){var t=this.untrackedGet(),n=p(t,e);n!==t&&this.uncheckedSet(n)},e.prototype.clear=function(){this.set(void 0)},e.prototype.subState=function(e){return new M(this,e)},e.prototype.reader=function(){return this},e.prototype.setSubState=function(e,t){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===t){var o=Object.keys(i);if(1===o.length&&o[0]===e)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===t?delete s[e]:s[e]=t,this.uncheckedSet(Object.freeze(a))}else{var c=Object.freeze(((n={})[e]=t,n));this.uncheckedSet(c)}},e.prototype.getSubState=function(e){var t=this.untrackedGet();if(null!=t)return t[e]},e}(),k=function(){function e(e){this.detector=e}return e.prototype.hasChanges=function(){return this.detector()},e}(),O=function(e){function t(){var t=e.call(this)||this;return t.listeners=new l,t.detectorRecording=new r.d,t.batchUpdates=new r.d,t.version=0,t.frozenContextContainer=new r.d,t}return b(t,e),t.prototype.untrackedGet=function(){return this.state},t.prototype.withFrozenState=function(e,t){return this.frozenContextContainer.runWith(e,t)},t.prototype.failIfTracking=function(e){if(this.detectorRecording.current())throw new r.g(e)},t.prototype.failIfFrozen=function(e){var t=this.frozenContextContainer.current();if(t){var n=e+" is not permitted inside '"+t.contextName+"'. "+(t.message||"");throw new C(n)}},t.prototype.uncheckedSet=function(e){this.failIfFrozen("Changing state"),this.state=e,this.version++,this.insideBatchUpdate()||this.notifyListeners()},t.prototype.trackStateAccess=function(e){var t=this.trackChanges(e),n=t.detector;return{result:t.result,accessedState:new k(n)}},t.prototype.recordDetector=function(e){var t=this.detectorRecording.current();void 0!==t&&t.push(e)},t.prototype.getTree=function(){return this},t.prototype.id=function(){return""},t.prototype.subscribe=function(e){return this.listeners.subscribe(e)},t.prototype.withBatchedUpdates=function(e){var t=this.state;try{this.batchUpdates.runWith(!0,e)}finally{this.insideBatchUpdate()||t===this.state||this.notifyListeners()}},t.prototype.listenerCount=function(){return this.listeners.count()},t.prototype.clearListeners=function(){this.listeners.clear()},t.prototype.trackChanges=function(e){var t=this,n=this.version,r=this.recordDetectors(e),o=r.result,a=r.detectors;return{result:o,detector:function(){return t.version!==n&&!!Object(i.find)(a,(function(e){return e()}))}}},t.prototype.recordDetectors=function(e){var t=[],n=this.detectorRecording.runWith(t,e),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,t),{result:n,detectors:t}},t.prototype.notifyListeners=function(){var e=this;this.withFrozenState({contextName:"state listeners"},(function(){e.listeners.notify()}))},t.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},t}(w),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i),M=function(e){function t(t,n){var r=e.call(this)||this;return r.parentState=t,r.key=n,r.tree=t.getTree(),r}return b(t,e),t.prototype.getTree=function(){return this.tree},t.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},t.prototype.uncheckedSet=function(e){this.parentState.setSubState(this.key,e)},t.prototype.id=function(){if(void 0===this.cachedId){var e=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+e}return this.cachedId},t}(w);function D(e){e?(h=void 0,m=e.stateController(),_=e.createAppState(),y=e.sharedCmsState(),v=_.subState("localCms")):(h=new O,m=h,_=S(),y=h.subState("sharedCms"),v=h.subState("localCms"),g=h.subState("ui")),R()}var x,E=0;function S(){if(!h)throw new r.g;var e=(E++).toString();return h.subState("apps").subState(e)}function j(e){return m.withBatchedUpdates(e)}function T(){return m}function L(e){return m.trackStateAccess(e)}function P(e,t){return m.withFrozenState(e,t)}function A(e){return m.failIfFrozen(e)}function N(e){return m.failIfTracking(e)}function I(e){return u.create(e)}function Y(e,t){return void 0===t&&(t=0),c.create(e,t)}function R(){x=m.subscribe((function(){c.notify(),u.notify()}))}function F(){x&&x(),_.clear()}var H=[],W=function(){return 0!==H.length};function B(e){W()||Object(r.G)((function(){return j((function(){return function e(t){H=[];try{t.forEach((function(e){return e()}))}finally{W()&&e(H)}}(H)}))})),H.push(e)}function z(e,t){var n,i=!0,o=!1,a=I(s);function s(){if(i){var s=L((function(){return P({contextName:"observe",message:"Extract all side-effects into the listener function"},e)}));a.subscribeChanges(s.accessedState);var c=s.result;o&&Object(r.v)(c,n)||(t(c),n=c,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function U(e,t){var n=L((function(){return P({contextName:"observeSync",message:"Use non-sync observe or nextTick"},e)})),i=n.result,o=Y((function(){var n=L(e);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(t(a),i=a)}));return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function q(e){return new r.j((function(t){var n=z(e,(function(e){null!=e&&(n.unsubscribe(),t(e))}))}))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return w})),n.d(t,"h",(function(){return S}));var r=n(0),i=n(5),o=n(7),a="GET",s="SEND",c=1;function u(e,t){var n=c++,u={};return Object.keys(e).forEach((function(c){var l=e[c];l===a&&(u[c]=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),u=c,l=s.subState(u).subState(Object(r.s)(e)),d=new i.LoadableData({state:l,stream:t.stream.apply(t,[u].concat(e))});return d.get()}),l===s&&(u[c]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,[c].concat(e))})})),u}function l(e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k((function(r){return Object(i.observeAndLoad)((function(){var r=e();if(r){var i=r[t];return{valueFromClient:i.call.apply(i,[r].concat(n))}}}),(function(e){e.allDataLoaded&&void 0!==e.result&&r.next(e.result.valueFromClient)})).unsubscribe}))},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=new r.j((function(r){Object(o.q)(e).then((function(e){var i=e[t];r(i.call.apply(i,[e].concat(n)))}))}));return a}}}function d(e,t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=t[e];return new r.k((function(e){return Object(i.observeAndLoad)((function(){return a.call.apply(a,[t].concat(n))}),(function(t){t.allDataLoaded&&e.next(t.result)})).unsubscribe}))},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=t[e],a=new r.j((function(e){Object(r.G)((function(){return e(o.call.apply(o,[t].concat(n)))}))}));return a}}}function p(e){return{incomingMessages:new r.k((function(t){function n(e){t.next({data:e.data})}return e.addEventListener("message",n),e.start(),function(){e.removeEventListener("message",n)}})),sendMessage:function(t){e.postMessage(t.data,t.transfer)}}}var f=function(){function e(e){this.muxedStream=e,this.openStreams={}}return e.prototype.streamWithId=function(e){var t=this;return new r.k((function(n){t.ensureSubscribed();var r=t.subjectForStreamId(e).subscribe(n);return function(){r.unsubscribe(),t.removeSubjectIfAbandoned(e)}}))},e.prototype.removeSubjectIfAbandoned=function(e){0===this.subjectForStreamId(e).subscriberCount()&&(delete this.openStreams[e],this.unsubscribeIfAbandoned())},e.prototype.subjectForStreamId=function(e){var t=this.openStreams[e];if(t)return t;var n=new r.l;return this.openStreams[e]=n,n},e.prototype.ensureSubscribed=function(){var e=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(t){var n=t.streamId,r=e.openStreams[n];r&&r.next(t.data)},complete:function(){return Object.keys(e.openStreams).forEach((function(t){var n=e.openStreams[t];n&&(n.complete(),delete e.openStreams[t])}))}}))},e.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},e}();function h(e){return e&&"number"==typeof e.channel&&"string"==typeof e.verb}function m(e){return"string"==typeof e.method&&Array.isArray(e.params)}function _(e){return"CLOSE"===e.verb}function v(e){return"RESPOND"===e.verb}function g(e){return"ERROR"===e.verb}var y,b=(y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function w(e){return new k(e)}var k=function(){function e(e){this.portLink=e,this.channelCounter=1,this.incomingChannels=new f(this.portLink.incomingMessages.map((function(e){return e.data})).filter(h).map((function(e){return{streamId:e.channel,data:e}})))}return e.prototype.stream=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k((function(r){var i=t.getNextChannelId();t.postMessage({channel:i,verb:"OPEN",method:e,params:n});var o=t.incomingChannels.streamWithId(i).subscribe((function(e){v(e)&&r.next(e.data)}));return function(){t.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}}))},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getNextChannelId();this.postMessage({channel:r,verb:"SEND",method:e,params:t});var i=this.incomingChannels.streamWithId(r).filter(x).takeOne().toPromise().then((function(e){if(!e)throw new C;if(g(e))throw new O;return e.data}));return i},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e,transfer:M(e)})},e.prototype.getNextChannelId=function(){return this.channelCounter++},e}(),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return b(t,e),t}(r.i);function M(e){if("SEND"===e.verb)return e.params.filter(D)}function D(e){return e instanceof MessagePort}function x(e){return v(e)||g(e)}function E(e,t,n){return e[n.methodName]===t}function S(e,t,n){new j(e,t,n).start()}var j=function(){function e(e,t,n){this.portLink=e,this.adapterConnection=t,this.description=n,this.incomingMessages=e.incomingMessages.map((function(e){return e.data})).filter(h),this.incomingChannels=new f(this.incomingMessages.map((function(e){return{streamId:e.channel,data:e}})))}return e.prototype.start=function(){var e=this;this.incomingMessages.subscribe((function(t){!function(e){return"OPEN"===e.verb&&m(e)}(t)?function(e){return"SEND"===e.verb&&m(e)}(t)&&e.handleSendMessage(t):e.handleOpenStreamMessage(t)}))},e.prototype.handleOpenStreamMessage=function(e){var t,n=this,r=T(e);if(E(this.description,a,r)){var i=(t=this.adapterConnection).stream.apply(t,[r.methodName].concat(r.params)),o=e.channel,s=i.subscribe((function(e){n.postMessage({verb:"RESPOND",data:e,channel:o})}));this.incomingChannels.streamWithId(o).filter(_).takeOne().toPromise().then((function(){s.unsubscribe()}))}},e.prototype.handleSendMessage=function(e){var t,n=this,i=T(e);E(this.description,s,i)&&(t=this.adapterConnection).send.apply(t,[i.methodName].concat(i.params)).then((function(t){return n.postMessage({verb:"RESPOND",data:t,channel:e.channel})}),(function(t){n.postMessage({verb:"ERROR",channel:e.channel}),Object(r.Q)(t)}))},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e})},e}();function T(e){return{methodName:e.method,params:e.params}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return G})),n.d(t,"j",(function(){return K})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"g",(function(){return k})),n.d(t,"f",(function(){return J})),n.d(t,"h",(function(){return Q})),n.d(t,"i",(function(){return $}));var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",(function(){return x})),n.d(r,"perform",(function(){return E})),n.d(r,"reset",(function(){return S})),n.d(r,"currentState",(function(){return T}));var i;function o(){i=0}var a,s,c={init:function(e){o();var t=e.location,n=t.hash,r=n.indexOf("&scrivito.authFailedCount=");if(!(r<0)){var a=n.substr(r+"&scrivito.authFailedCount=".length,3),s=n.substring(0,r);"#"===s&&(s="");var c=t.href.toString().replace(n,s);i=parseInt(a,10)||0,e.history.replaceState({},"",c)}},augmentedRedirectUrl:function(e){var t=e.toString();return e.hash||(t+="#"),t+"&scrivito.authFailedCount="+(i+1)},reset:o,currentFailureCount:function(){return i}},u=n(0),l=n(2),d=n(12),p=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.httpCode=n,i.backendCode=r,i}return p(t,e),t.for=function(e,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new g(e,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new y(e,n,r):new t(e,n,r)},t}(u.i),h=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),m=function(e){function t(t){var n=e.call(this,"Insufficient authorization - please visit "+t)||this;return n.target=t,n}return p(t,e),t}(u.i),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(u.i),v=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.details=i||{},o}return p(t,e),t}(f),g=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),y=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(f),b=!1,w=0;function k(){return w>0}function O(e,t,n){var r=n.params,i=n.authorization,o=n.forceVerification;return b?u.j.resolve(new XMLHttpRequest):(w+=1,new u.j((function(n,a){var s=function(e,t,n,r){var i=new XMLHttpRequest;function o(e){!function(e,t){w-=1,t(e)}(new _(e),r)}return i.open("POST"===e?"POST":"PUT",t),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(e,t,n){w-=1;var r=e.status;if(!r||!Object(l.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?e.statusText:e.responseText);n(new _(i))}t(e)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(e,t,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(u.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))})))}s={},window._scrivitoRegisterVerificator=function(e,t){s[e].resolve(t)};var C,M,D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x="client_verification_required";!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}D(t,e)}(v);function E(e){return e(j()).catch((function t(n){if(!function(e){return e instanceof v&&e.backendCode===x}(n))throw n;return function(e){if(!C){var t=e.verificator,n=e.data,r=(i=t.id,o=t.url,a=s[i],a||(a=new u.e,s[i]=a,Object(u.E)(o)),a.promise).then((function(e){return new u.j((function(t){e(n,(function(e){t((M=e).authorization)}))}))}));C={challenge:{verificator:t,data:n},promise:Object(u.J)(r,(function(){C=void 0}))}}var i,o,a;return C.promise}(n.details).then(e).catch(t)}))}function S(){C=void 0,M=void 0}function j(){if(M){if(!(M.expiresAfter<new Date))return M.authorization;M=void 0}}function T(){var e=j();if(e)return"Authorization: "+e;if(C){var t=C.challenge;return"Pending computation: "+t.verificator.id+" with "+t.data}return null}var L,P,A=n(17),N=function(){return(N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},I=function(){function e(){this.initDeferred=new u.e,this.authHeaderValueProvider=r}return e.prototype.init=function(e,t,n){t&&(this.tenant=t,this.endpoint=e,this.url=d(e+"/tenants/"+t+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},e.prototype.get=function(e,t){return this.perform("GET",e,t)},e.prototype.put=function(e,t){return this.perform("PUT",e,t)},e.prototype.post=function(e,t){return this.perform("POST",e,t)},e.prototype.delete=function(e,t){return this.perform("DELETE",e,t)},e.prototype.requestBuiltInUserSession=function(e){var t=this;return this.ensureInitialized().then((function(){return t.ajax("PUT","sessions/"+e)})).then((function(e){return c.reset(),e}))},e.prototype.requestVisitorSession=function(e,t){var n=this;return this.ensureInitialized().then((function(){return n.ajax("PUT","sessions/"+e,void 0,"id_token "+t)}))},e.prototype.enableForceVerification=function(){this.forceVerification=!0},e.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},e.prototype.ensureInitialized=function(){return this.initDeferred.promise},e.prototype.perform=function(e,t,n){var r=this;return this.ensureInitialized().then((function(){return r.send(e,t,n).then((function(e){return function(e){return!!e&&!!e.task&&1===Object(l.size)(e)}(e)?r.handleTask(e.task):e}))}))},e.prototype.send=function(e,t,n){var r=this;return this.authHeaderValueProvider.perform((function(i){return r.ajax(e,t,n,i)}))},e.prototype.ajax=function(e,t,n,r){var i=this.url,o=this.forceVerification,a={params:{path:t,verb:e,params:n||{}},authorization:r,forceVerification:o};function s(){return function e(t,n){void 0===n&&(n=0);if(P)return new u.j((function(e){return e(t())}));return t().then((function(r){if(429!==r.status)return r;if(L&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,Y(n));return Object(u.T)(o).then((function(){return e(t,n+1)}))}))}((function(){return O(e,i,a)})).then(R)}return"POST"===e?s():function e(t,n){void 0===n&&(n=0);if(P)return new u.j((function(e){return e(t())}));return t().catch((function(r){if(r instanceof _){if(L&&n>5)throw r;var i=Y(n);return Object(u.T)(i).then((function(){return e(t,n+1)}))}throw r}))}(s)},e.prototype.handleTask=function(e){var t=this;switch(e.status){case"success":return e.result;case"error":throw f.for(e.message,412,e.code);case"exception":throw new _(e.message);case"open":return Object(u.S)(2).then((function(){return t.get("tasks/"+e.id).then((function(e){return t.handleTask(e)}))}));default:throw new _("Invalid task response (unknown status)")}},e}();function Y(e){return 500*Math.pow(2,Math.min(e,16))}function R(e){var t,n=e.status;try{t=JSON.parse(e.responseText)}catch(r){throw new _(e.responseText)}if(n>=200&&n<300)return t;var r=function(e,t,n){if("4"!==e.toString()[0])return 500===e&&F(t.error)?new _(t.error):new _(n);var r=function(e){var t=e.error,n=e.code,r=e.details;if(!F(t))throw H("key error is not a string");if(void 0!==n&&!F(n))throw H("optional key code is not a string");if(void 0!==r&&(i=r,"object"!=typeof i||Array.isArray(i)))throw H("optional key details is not an object");var i;return N({},e,{error:t,code:n,details:r})}(t);if(function(e){if("auth_missing"!==e.code)return!1;var t=e.details;return!!t&&"string"==typeof t.visit}(r)){var i=(o=r.details.visit,a=c.augmentedRedirectUrl(Object(A.f)()),o.replace("retry=RETRY","retry="+c.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(a)));return new m(i)}var o,a;if(401===e)return new v(r.error,e,r.code,r.details);if(403===e){var s=r.code;return F(s)?new h(r.error,e,s):new _("Authentication failure response no string value for code")}return f.for(r.error,e,r.code)}(n,t,e.responseText);throw r instanceof m&&Object(A.i)(r.target),r}function F(e){return"string"==typeof e}function H(e){return new _("Malformed error response: "+e)}var W=new I;var B=new u.b((function(e){return W.get("blobs/mget",{blobs:e}).then((function(t){return t.results.map((function(t,n){return function(e,t){var n=t.public_access.get;if(!n.url)throw new u.g('Missing public access URL for binary "'+e+'"');var r={public_access:{get:{url:n.url}}},i=t.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(e[n].id,t)}))}))}));var z={};function U(e,t){return function(e){var t=z[e];t||(t=function(e){return new u.b((function(t){return W.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then((function(e){return e.results}))}),{batchSize:17})}(e),z[e]=t);return t}(e).retrieve(t).then((function(e){return e||{_deleted:t}}))}var q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function V(e,t){var n=q({consistent:!0},t);return W.get("workspaces/"+e+"/objs/search",n).then((function(e){var t=function(e){var t={results:e.results,total:e.total},n=e.continuation;void 0!==n&&(t.continuation=n);var r=e.objs;void 0!==r&&(t.objs=r);return t}(e);return{results:t.results.map((function(e){return e.id})),continuation:t.continuation,total:t.total,objs:t.objs}}))}function $(e){return!!e&&"widgetlist_diff"===e.format}var G={retrieveObj:function(e,t){return U(e,t)},retrieveObjQuery:function(e,t){return V(e,t)},retrieveFacetQuery:function(e,t){return function(e,t){return W.get("workspaces/"+e+"/objs/search",t).then((function(e){return{facets:e.facets.map((function(e){return e.map((function(e){return{total:e.total,value:e.value,results:e.results}}))}))}}))}(e,t)},retrieveBinaryMetadata:function(e){return function(e){return W.get("blobs/"+encodeURIComponent(e||"")+"/meta_data")}(e)},retrieveBinaryUrls:function(e,t){return function(e,t){var n={id:e};return t&&(n.transformation=t),B.retrieve(n)}(e,t)},retrieveObjFieldDiffs:function(e,t){return function(e,t){return W.get("workspaces/"+e+"/objs/"+t+"/diff").then((function(e){return e}))}(e,t)}};function K(e){G=e}function J(e){return!e._deleted}function Q(e){return"widgetlist"===e[0]}},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return s}));var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},s=function(){function e(e,t){var n={};t._scrivitoPrivateSchema&&r.extend(n,t._scrivitoPrivateSchema.attributes),e.attributes&&r.each(e.attributes,(function(e,t){n[t]=function(e){if("string"==typeof e)return[e];return[e[0],u(e[1])]}(e)}));var i=e.onlyInside;this.definition=o({},e,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return e.forInstance=function(e){return this.forClass(e.constructor)},e.forClass=function(e){return e._scrivitoPrivateSchema},e.basicFieldFor=function(t,n){var r=e.forInstance(t);if(r){var o=r.attributes[n];if(o)return new i.BasicField(t._scrivitoPrivateContent,n,o)}},Object.defineProperty(e.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),e.prototype.isBinary=function(){var e=this.definition.attributes.blob;return!!e&&"binary"===e[0]},e}();function c(e){return!(!e||!e._scrivitoPrivateSchema)}function u(e){if(!("only"in e))return e;var t=e.only,n=a(e,["only"]);return o({},n,{validClasses:"string"==typeof t?[t]:t})}var l=n(0);function d(e,t){if(Object(r.isArray)(t))return Object(r.map)(t,(function(t){return d(e,t)}));if(t instanceof i.BasicObj)return p(t,e.objClassFor(t.objClass()));if(t instanceof i.BasicWidget){var n=t.objClass();return p(t,e.widgetClassFor(n))}if(t instanceof i.BasicLink){var o=Object.create(e.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=t,o}return t}function p(e,t){var n=Object.create(t.prototype);return n._scrivitoPrivateContent=e,n}function f(e){return Object(r.isArray)(e)?Object(r.map)(e,f):e&&e._scrivitoPrivateContent?e._scrivitoPrivateContent:e}function h(e,t,n){return Object(r.mapObject)(e,(function(e,r){if(Object(l.z)(r))return[e];var i=t.attributes[r];if(!i)throw new l.a('Attribute "'+r+'" is not defined for CMS object class "'+n+'".');return[f(e),i]}))}var m=function(){function e(e){this._registry=e}return e.prototype.getObj=function(e,t){var n=i.BasicObj.get(t);return this._checkObjClassAndWrapInAppClass(e,n)},e.prototype.getObjIncludingDeleted=function(e,t){var n=i.BasicObj.getIncludingDeleted(t);return this._checkObjClassAndWrapInAppClass(e,n)},e.prototype.read=function(e,t){var n=s.basicFieldFor(e,t);if(!n)return null;var r=n.get();return d(this._registry,r)},e.prototype.update=function(e,t){var n=this._registry.objClassNameFor(e.constructor);if(!n){var r=void 0;throw r=e.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.a('Updating is not supported on the base class "'+r+'".')}if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=h(t,s.forInstance(e),n);e._scrivitoPrivateContent.update(i)},e.prototype.wrapInAppClass=function(e){return d(this._registry,e)},e.prototype._checkObjClassAndWrapInAppClass=function(e,t){if(!t)return null;var n=this._registry.objClassNameFor(e);if(n&&n!==t.objClass())throw new l.h('Obj with id "'+t.id()+'" is not of type "'+n+'".');return this.wrapInAppClass(t)},e}();function _(e){return function(){function t(){}return t.prototype.id=function(){return this._scrivitoPrivateContent.id()},t.prototype.objClass=function(){return this._scrivitoPrivateContent.objClass()},t.prototype.finishSaving=function(){return this._scrivitoPrivateContent.finishSaving()},t.prototype.get=function(t){if(!Object(l.y)(t))throw new l.a("Attribute names have to be in camel case.");if(Object(l.z)(t))throw new l.a('Attribute name "'+t+'" is not a valid custom attribute name.');return e.read(this,t)},t.prototype.update=function(t){e.update(this,t)},t}()}function v(e,t,n,r){var i={};return Object.keys(n.definition.attributes).forEach((function(n){if(!Object.prototype.hasOwnProperty.call(e,n)){var o=t.initialContentFor(r,n);void 0!==o&&(i[n]=o)}})),i}var g,y=(g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function b(e){var t=new m(e);function n(t,n){var r=new e.ObjSearch;return t&&r.and("_objClass","equals",t),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(t){return d(e,t)}return function(a){function c(){return null!==a&&a.apply(this,arguments)||this}return y(c,a),c.get=function(e){return t.getObj(this,e)},c.getIncludingDeleted=function(e){return t.getObjIncludingDeleted(this,e)},c.getByPath=function(e){return o(i.BasicObj.getByPath(e))},c.getByPermalink=function(e){return o(i.BasicObj.getByPermalink(e))},c.all=function(){return n(e.objClassNameFor(this),1e3)},c.root=function(){return o(i.BasicObj.root())},c.where=function(t,r,i,o){return void 0===o&&(o=null),n(e.objClassNameFor(this)).and(t,r,i,o)},c.create=function(e){void 0===e&&(e={}),w(e,this._appClassName());var t=this._prepareAttributesForCreate(e);return o(i.BasicObj.create(t))},c.createFromFile=function(e,t){void 0===t&&(t={}),function(e){if(!l.f.is(e)){if(l.c.is(e))throw new l.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new l.a('Creating CMS objects from file is only available with instances of "File"')}}(e),function(e,t,n){if(w(e,t),Object.prototype.hasOwnProperty.call(e,"blob"))throw new l.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new l.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(t,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(t);return i.BasicObj.createFromFile(e,n).then((function(e){return o(e)}))},c.prototype.lastChanged=function(){return this._scrivitoPrivateContent.lastChanged()},c.prototype.path=function(){return this._scrivitoPrivateContent.path()},c.prototype.parent=function(){return o(this._scrivitoPrivateContent.parent())},c.prototype.ancestors=function(){return o(this._scrivitoPrivateContent.ancestors())},c.prototype.backlinks=function(){return o(this._scrivitoPrivateContent.backlinks())},c.prototype.children=function(){return o(this._scrivitoPrivateContent.children())},c.prototype.orderedChildren=function(){return o(this._scrivitoPrivateContent.orderedChildren())},c.prototype.permalink=function(){return this._scrivitoPrivateContent.permalink()},c.prototype.slug=function(){return this._scrivitoPrivateContent.slug()},c.prototype.isBinary=function(){var e=s.forInstance(this);return!!e&&e.isBinary()},c.prototype.isRestricted=function(){return this._scrivitoPrivateContent.isRestricted()},c.prototype.contentLength=function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0},c.prototype.contentType=function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""},c.prototype.contentUrl=function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""},c.prototype.metadata=function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection},c.prototype.restrict=function(){this._scrivitoPrivateContent.restrict()},c.prototype.unrestrict=function(){this._scrivitoPrivateContent.unrestrict()},c.prototype.widget=function(e){return o(this._scrivitoPrivateContent.widget(e))},c.prototype.widgets=function(){return o(this._scrivitoPrivateContent.widgets())},c.prototype.destroy=function(){this._scrivitoPrivateContent.destroy()},c._prepareAttributesForCreate=function(t){var n=this._schema(),i=this._appClassName(),o=v(t,e,n,i),a={_objClass:i};return h(Object(r.extend)({},t,o,a),n,i)},c._appClassName=function(){return e.objClassNameFor(this)},c._schema=function(){return s.forClass(this)},c}(_(t))}function w(e,t){if(!t)throw new l.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new l.a('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.')}var k=function(){function e(e,t){this._registry=e,this._basicObjFacetValue=t}return e.prototype.name=function(){return this._basicObjFacetValue.name()},e.prototype.count=function(){return this._basicObjFacetValue.count()},e.prototype.includedObjs=function(){var e=this._basicObjFacetValue.includedObjs();return d(this._registry,e)},e}();function O(e){return r.isArray(e)?e.map((function(e){return f(e)})):f(e)}var C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function M(e){return function(t){function n(n){void 0===n&&(n={});var r=t.call(this)||this,o=s.forInstance(r),a=e.objClassNameFor(r.constructor),c=r._prepareAttributesForConstructor(n,o,a),u=new i.BasicWidget(c);return u.onDidPersist((function(t){var n=d(e,t),r=v(c,e,o,a);n.update(r)})),r._scrivitoPrivateContent=u,r}return C(n,t),n.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return d(e,t)},n.prototype.copy=function(){var t=e.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),t)},n.prototype.destroy=function(){this._scrivitoPrivateContent.remove()},n.prototype._prepareAttributesForConstructor=function(e,t,n){!function(e,t){if(!e)throw new l.a("Creating widgets is not supported for the class Widget or abstract classes.");if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new l.a('Invalid attribute "_objClass". "new '+t._objClass+'" will automatically set the CMS object class correctly.')}(n,e);var i={_objClass:n};return h(Object(r.extend)({},e,i),t,n)},n}(_(new m(e)))}var D=["hash","obj","query","rel","target","title","url"];function x(e){return function(e){var t=r.without.apply(r,[r.keys(e)].concat(D));if(!r.isEmpty(t))throw new l.a("Unexpected attributes "+Object(l.I)(t)+". Available attributes: "+Object(l.I)(D))}(e),r.has(e,"obj")?r.extend({},e,{objId:E(e.obj)}):e}function E(e){return e?f(e).id():null}n(140);var S=function(){function e(){var e;this.mapping={},this.defaultClassForObjs=b(this),this.defaultClassForWidgets=M(this),this.defaultClassForLinks=(e=this,function(){function t(e){var t=x(e);this._scrivitoPrivateContent=new i.BasicLink(t)}return t.prototype.title=function(){return this._scrivitoPrivateContent.title()},t.prototype.query=function(){return this._scrivitoPrivateContent.query()},t.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},t.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},t.prototype.target=function(){return this._scrivitoPrivateContent.target()},t.prototype.url=function(){return this._scrivitoPrivateContent.url()},t.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return t?d(e,t):null},t.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},t.prototype.copy=function(t){var n=this._scrivitoPrivateContent.copy(x(t)),r=Object.create(e.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},t.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},t.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},t}()),this.ObjSearch=function(e){var t=function(){function t(){this._scrivitoPrivateContent=new i.BasicObjSearch}return t.prototype.and=function(e,n,r,i){if(e instanceof t){var o=e;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}else{if(void 0===n)throw new l.a("Missing operator to search with");if(void 0===r)throw new l.a('Missing value to search (specify "null" for missing)');var a=O(r),s=e;this._scrivitoPrivateContent.and(s,n,a,i)}return this},t.prototype.andNot=function(e,t,n){var r=O(n);return this._scrivitoPrivateContent.andNot(e,t,r),this},t.prototype.facet=function(t,n){return this._scrivitoPrivateContent.facet(t,n).map((function(t){return new k(e,t)}))},t.prototype.first=function(){var t=this._scrivitoPrivateContent.first();return t?d(e,t):null},t.prototype.take=function(t){return this._scrivitoPrivateContent.take(t).map((function(t){return d(e,t)}))},t.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map((function(t){return d(e,t)}))},t.prototype.offset=function(e){return this._scrivitoPrivateContent.offset(e),this},t.prototype.order=function(e,t){return this._scrivitoPrivateContent.order(e,t),this},t.prototype.count=function(){return this._scrivitoPrivateContent.count()},t}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)t.prototype[n]=function(){var t=this._scrivitoPrivateContent.iterator();return{next:function(){var n=t.next();return n.done?{done:n.done}:{done:n.done,value:d(e,n.value)}}}}}return t}(this)}return e.prototype.register=function(e,t){this.mapping[e]=t},e.prototype.getClass=function(e){return this.mapping[e]||null},e.prototype.allObjClasses=function(){var e=this;return r.pick(this.mapping,(function(t){return e.defaultClassForObjs.isPrototypeOf(t)}))},e.prototype.allWidgetClasses=function(){var e=this;return r.pick(this.mapping,(function(t){return e.defaultClassForWidgets.isPrototypeOf(t)}))},e.prototype.objClassFor=function(e){return this.appClassFor(e,this.defaultClassForObjs)},e.prototype.widgetClassFor=function(e){return this.appClassFor(e,this.defaultClassForWidgets)},e.prototype.objClassNameFor=function(e){return r.findKey(this.mapping,(function(t){return t===e}))},e.prototype.setInitialContentFor=function(e){this.initialContentForFunction=e},e.prototype.initialContentFor=function(e,t){if(this.initialContentForFunction)return this.initialContentForFunction(e,t)},e.prototype.appClassFor=function(e,t){var n=this.getClass(e);return n&&t.isPrototypeOf(n)?n:t},e}(),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function T(e,t){if(t.extend&&!N(t.extend,e.defaultClassForObjs))throw new l.a('Invalid value for "extend": not a Scrivito Obj class');var n=t.extend||e.defaultClassForObjs,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function L(e,t){if(t.extend&&!N(t.extend,e.defaultClassForWidgets))throw new l.a('Invalid value for "extend": not a Scrivito Widget class');var n=t.extend||e.defaultClassForWidgets,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function P(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return T(e,i)}(e,t,n);return e.register(t,i),i}function A(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return L(e,i)}(e,t,n);return e.register(t,i),i}function N(e,t){return!!e&&(e===t||e.prototype instanceof t)}var I=l.O.refinement(l.O.Function,c,"ObjClass"),Y=l.O.interface({attributes:l.O.maybe(l.O.dict(l.O.refinement(l.O.String,(function(e){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(e)}),"String (alphanumeric, starting with a lower-case character)"),l.O.union([l.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),l.O.tuple([l.O.enums.of(["enum","multienum"]),l.O.interface({values:l.O.list(l.O.String)})]),l.O.tuple([l.O.enums.of(["reference","referencelist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})]),l.O.tuple([l.O.enums.of(["widgetlist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})])]),"Attributes Specification")),extend:l.O.maybe(I)}),R=l.O.refinement(l.O.Function,c,"WidgetClass"),F=l.O.interface({attributes:Y.meta.props.attributes,extend:l.O.maybe(R),onlyInside:l.O.maybe(l.O.union([l.O.String,l.O.Array]))}),H=Object(l.p)("createObjClass",[["options",Y]],{docPermalink:"js-sdk/createObjClass"}),W=Object(l.p)("createWidgetClass",[["options",F]],{docPermalink:"js-sdk/createWidgetClass"}),B=l.O.union([Y,I]),z=Object(l.p)("provideObjClass",[["name",l.O.String],["objClassOrDefinition",B]],{docPermalink:"js-sdk/provideObjClass"}),U=l.O.union([F,R]),q=Object(l.p)("provideWidgetClass",[["name",l.O.String],["widgetClassOrDefinition",U]],{docPermalink:"js-sdk/provideWidgetClass"});var V=function(){function e(){this._registry=new S,this.appModelAccessor=new m(this._registry)}return e.init=function(t){var n=new e;return t.Obj=n.Obj,t.Widget=n.Widget,t.Link=n.Link,t.ObjSearch=n.ObjSearch,t.appModelAccessor=n.appModelAccessor,t.provideObjClass=function(e,t){return n.provideObjClass(e,t)},t.provideWidgetClass=function(e,t){return n.provideWidgetClass(e,t)},t.createObjClass=function(e){return n.createObjClass(e)},t.createWidgetClass=function(e){return n.createWidgetClass(e)},t.getClass=function(e){return n.getClass(e)},t.allObjClasses=function(){return n.allObjClasses()},t.allWidgetClasses=function(){return n.allWidgetClasses()},t._privateRealm=n,n},Object.defineProperty(e.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),e.prototype.provideObjClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return z.apply(void 0,[e,t].concat(n)),P(this._registry,e,t)},e.prototype.provideWidgetClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return q.apply(void 0,[e,t].concat(n)),A(this._registry,e,t)},e.prototype.createObjClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return H.apply(void 0,[e].concat(t)),T(this._registry,e)},e.prototype.createWidgetClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return W.apply(void 0,[e].concat(t)),L(this._registry,e)},e.prototype.getClass=function(e){return this._registry.getClass(e)},e.prototype.allObjClasses=function(){return this._registry.allObjClasses()},e.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},e.prototype.setInitialContentFor=function(e){this._registry.setInitialContentFor(e)},e}();t.c=V},function(e,t,n){"use strict";var r;function i(e){return r?r.getContentStateId(e):""}function o(e){r=e}n.d(t,"g",(function(){return i})),n.d(t,"o",(function(){return o})),n.d(t,"a",(function(){return w})),n.d(t,"f",(function(){return O})),n.d(t,"b",(function(){return f})),n.d(t,"q",(function(){return _})),n.d(t,"c",(function(){return v})),n.d(t,"l",(function(){return m})),n.d(t,"i",(function(){return W})),n.d(t,"d",(function(){return F})),n.d(t,"e",(function(){return D})),n.d(t,"j",(function(){return X})),n.d(t,"p",(function(){return Z})),n.d(t,"m",(function(){return A})),n.d(t,"n",(function(){return N})),n.d(t,"h",(function(){return ne})),n.d(t,"k",(function(){return oe}));var a,s=n(2),c=n.n(s),u=n(5),l=n(7),d=n(0),p=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f="inMemory",h=!1;function m(){return h}function _(){h=!0}function v(e){if(h)throw new g(e)}var g=function(e){function t(t){return e.call(this,t+" is not supported when using the in-memory tenant")||this}return p(t,e),t}(d.i),y=n(9),b=new u.LoadableCollection({name:"facetquery",state:function(){return l.c.subState("facetQuery")},loader:function(e){var t=e[0],n=e[1];return y.e.retrieveFacetQuery(t,n)},invalidation:function(e){var t=e[0];e[1];return Object(u.loadableWithDefault)(void 0,(function(){return i(t)}))||""}}),w=function(){function e(e,t,n,r){this._requestParams=k(t,n,r),this._loadableData=b.get([e,this._requestParams])}return e.store=function(e,t,n,r,i){var o=k(t,n,r);b.get([e,o]).set(i)},e.prototype.result=function(){v("Search API");var e=this._loadableData.get();return e?e.facets[0].map((function(e){return{name:e.value,count:e.total,includedObjIds:e.results.map((function(e){return e.id}))}})):[]},e}();function k(e,t,n){var r={facets:[{attribute:e,limit:t.limit||10,include_objs:t.includeObjs||0}],size:0};return Object(s.isEmpty)(n)||(r.query=n),r}function O(e,t){var n=C(e,t);return n||(s.find(e._widget_pool,(function(e,r){if(e&&(n=C(e,t)))return n.parentWidgetId=r,!0})),n)}function C(e,t){var n;return s.find(e,(function(e,r){if(e&&!Object(d.z)(r)){var i=e;if(Object(y.h)(i)){var o=i[1];if(o){var a=o.indexOf(t);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}})),n}function M(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,(function(r,i,o){"_widget_pool"===r?n._widget_pool=function(e,t){if(!t||c.a.isEmpty(t))return e;var n={};return x(e,t,(function(e,r,i){Object.prototype.hasOwnProperty.call(t,e)?i&&!r?n[e]=i:i&&(n[e]=M(r,i)):n[e]=r})),n}(i||{},o):Object.prototype.hasOwnProperty.call(t,r)?o&&(n[r]=o):n[r]=e[r]})),n}function D(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,(function(e,t,r){if("_widget_pool"===e){var i=function(e,t){if(e===t)return;if(!e)return t;var n={};return x(e,t||{},(function(e,t,r){var i=S(t,r,(function(){var e=D(t,r);if(!c.a.isEmpty(e))return e}));void 0!==i&&(n[e]=i)})),n}(t,r);c.a.isEmpty(i)||(n._widget_pool=i)}else{var o=S(t,r,(function(){if(!c.a.isEqual(t,r))return r}));void 0!==o&&(n[e]=o)}})),n}function x(e,t,n){c.a.union(c.a.keys(e),c.a.keys(t)).forEach((function(r){return n(r,E(e[r]),E(t[r]))}))}function E(e){if(c.a.isArray(e)){var t=e[0],n=e[1];return"binary"===t&&n?[t,c.a.omit(n,"url")]:e}return e}function S(e,t,n){return!e&&t?t:e&&!t?null:e&&t?n():void 0}var j=function(){function e(e,t){var n=this;this._workspaceId=e,this._objId=t,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(d.P)((function(){return n._performReplication()}),1e3)}return e.prototype.start=function(){var e=this;y.e.retrieveObj(this._workspaceId,this._objId).then((function(t){Object(l.a)((function(){e.notifyBackendState(t)}))}))},e.prototype.notifyLocalState=function(e){if(!A.isDisabled()){if(void 0===this._backendState)throw new d.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new d.g("Can not update a fully deleted obj.");this._localState=e,this._startReplication()}},e.prototype.notifyBackendState=function(e){if(void 0===this._backendState)return this._backendState=e,void this._updateLocalState(e);if(P(e,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=e;else{if(e._deleted)this._updateLocalState(null);else{var t=T(this._backendState,e);this._updateLocalState(L(this.localState,t))}this._backendState=e}},e.prototype.finishSaving=function(){var e;if(this._nextRequestDeferred)e=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return d.j.resolve();e=this._currentRequestDeferred.promise}return e.catch((function(){return d.j.reject()}))},e.prototype._startReplication=function(){var e=this;c.a.isEmpty(T(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new d.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),A.writeStarted(this._currentRequestDeferred.promise),Object(d.G)((function(){return e._performThrottledReplication()})))},e.prototype._performReplication=function(){var e=this,t=this._localState,n=T(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then((function(n){e._handleBackendUpdate(t,n),e._currentRequestDeferred.resolve(e._objId),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()}),(function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1}))},e.prototype._replicatePatchToBackend=function(e){if(c.a.isEmpty(e))return d.j.resolve(this._backendState);var t="workspaces/"+this._workspaceId+"/objs/"+this._objId;return y.d.put(t,{obj:e})},e.prototype._initDeferredForRequest=function(){if(this._nextRequestDeferred){var e=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=e}else this._currentRequestDeferred=new d.e},e.prototype._handleBackendUpdate=function(e,t){var n=T(e,this._localState);this._backendState=function(e,t){if(P(e,t)>0)return e;return t}(t,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(L(this._backendState,n))},e.prototype._updateLocalState=function(e){this._localState=e,H(this._workspaceId,this._objId,this._localState)},Object.defineProperty(e.prototype,"backendState",{get:function(){return this._backendState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localState",{get:function(){return this._localState},enumerable:!0,configurable:!0}),e.prototype.isNotStoredInBackend=function(){return null===this._backendState},e.prototype.isRequestInFlight=function(){return this._replicationActive},e}();function T(e,t){return D(e,t)}function L(e,t){return M(e,t)}function P(e,t){return e?t?function(e,t){if(e>t)return 1;if(t>e)return-1;return 0}(e._version,t._version):1:-1}var A=new(function(){function e(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return e.prototype.get=function(e,t){return this.replicationCache[e]||(this.replicationCache[e]={}),this.replicationCache[e][t]||(this.replicationCache[e][t]=new j(e,t)),this.replicationCache[e][t]},e.prototype.subscribeWrites=function(e){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=e,this.subscriptionToken},e.prototype.unsubscribeWrites=function(e){delete this.writeWriteCallbacks[e]},e.prototype.isDisabled=function(){return this.disabled},e.prototype.writeStarted=function(e){Object(s.each)(this.writeWriteCallbacks,(function(t){t(e)}))},e.prototype.disableReplication=function(){this.disabled=!0},e.prototype.enableReplication=function(){this.disabled=!1},e.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},e.prototype.clearCache=function(){this.replicationCache={}},e}());function N(e){A=e}function I(){return l.m.subState("objData")}var Y=new u.LoadableCollection({name:"objdata",state:I,loader:function(e){var t=e[0],n=e[1];return A.get(t,n).start(),new d.j((function(){}))}});var R=function(){function e(e,t){this._workspaceId=e,this._id=t,this._loadableData=Y.get([e,t])}return e.prototype.get=function(){return Object(l.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},e.prototype.getWidget=function(e){return Object(l.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(e).get()},e.prototype.getWidgetWithBadPerformance=function(e){return this.getWidgetState(e).get()},e.prototype.getAttribute=function(e){if("_widget_pool"===e)throw new d.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(e).get()},e.prototype.getWidgetAttribute=function(e,t){return this.getWidgetState(e).subState(t).get()},e.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},e.prototype.set=function(e){Object(l.g)("Changing CMS content"),this._loadableData.set(e)},e.prototype.setError=function(e){this._loadableData.setError(e)},e.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},e.prototype.isAvailable=function(){return this._loadableData.isAvailable()},e.prototype.update=function(e){var t=M(this.get(),e);this.set(t),this._replication().notifyLocalState(t)},e.prototype.finishSaving=function(){return this._replication().finishSaving()},e.prototype.workspaceId=function(){return this._workspaceId},e.prototype.equals=function(t){return t instanceof e&&(this.workspaceId()===t.workspaceId()&&this._id===t._id)},e.prototype._replication=function(){return A.get(this._workspaceId,this._id)},e.prototype.getWidgetState=function(e){return this.getSubReader("_widget_pool").subState(e)},e.prototype.getSubReader=function(e){return this._loadableData.reader().subState(e)},e}();function F(e,t){var n=B(e,t);return n.set(null),A.get(e,t).notifyBackendState(null),n}function H(e,t,n){B(e,t).set(n)}function W(e,t){var n=B(e,t);if(n.ensureAvailable())return n}function B(e,t){return new R(e,t)}var z=function(){return(z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},U={results:[],total:0},q=new u.LoadableCollection({name:"objquery",state:function(){return ee()},loader:function(e,t,n){var r=e[0],i=e[1],o=e[2],a=t.push,s=t.isReload,c=t.wasCancelled;return function(e,t,n,r){if(r>0){var i=new V(e,t,n,r-1);return Object(u.load)((function(){return i.continuationForNextBatch()}))}return d.j.resolve()}(r,i,n,o).then((function(e){if(c())throw new Error;var t={size:n,continuation:e,include_objs:!s()},o=z({},i,t);return y.e.retrieveObjQuery(r,o).then((function(e){var t=e.objs;return t&&a((function(){return t.forEach((function(e){e._id&&A.get(r,e._id).notifyBackendState(e)}))})),function(e,t){t.forEach((function(t){return function(e,t){Object(u.load)((function(){return W(e,t)}))}(e,t)}))}(r,e.results),{results:e.results,total:e.total,continuation:e.continuation}}))}))},invalidation:function(e){var t=e[0];e[1],e[2];return Object(u.loadableWithDefault)(void 0,(function(){return i(t)}))||""}}),V=function(){function e(e,t,n,r){void 0===r&&(r=0),this._workspaceId=e,this._params=t,this._batchSize=n,this._index=r}return e.store=function(e,t,n,r){void 0===r&&(r=n.length),q.get([e,G(t),0]).set({results:n,total:r})},e.firstBatchFor=function(t,n,r){return new e(t,G(n),r)},e.countFor=function(e,t){return this.firstBatchFor(e,t,0).count()},e.prototype.objIds=function(){return this._response().results},e.prototype.count=function(){return this._response().total||0},e.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new e(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(e.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),e.prototype.continuationForNextBatch=function(){return this._response().continuation},e.prototype._response=function(){return this._data().get()||U},e.prototype._data=function(){return q.get([this._workspaceId,this._params,this._index],this._batchSize)},e}(),$=V;function G(e){var t=Object(s.omit)({query:e.query,offset:e.offset,sort_by:e.sortBy,sort_order:e.sortDirection},s.isUndefined);return e.includeDeleted&&(t.options={include_deleted:!0}),t}var K=function(){function e(e,t,n){this._workspaceId=e,this._params=t,this._batchSize=n}return e.store=function(e,t,n,r){$.store(e,t,n,r)},e.count=function(e,t){return $.countFor(e,t)},e.prototype.iterator=function(){var e={},t=$.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!t)return{done:!0};var i=t.objIds();if(n<i.length){var o=i[n];return n++,e[o]?r():(e[o]=!0,{value:o,done:!1})}return t=t.nextBatch(),n=0,r()}}},e}(),J=function(){function e(e,t,n){this._workspaceId=e,this._params=t,this._batchSize=n}return e.prototype.count=function(){return K.count(this._workspaceId,this._params)},e.prototype.iterator=function(){return new Q(this._workspaceId,this._params,this._batchSize)},e}(),Q=function(){function e(e,t,n){this._workspaceId=e,this._iterator=new K(e,t,n).iterator()}return e.prototype.next=function(){if(!this._iterator)return{done:!0};var e=this._iterator.next().value;if(!e)return{done:!0};var t=W(this._workspaceId,e);return void 0===t?(this._iterator=void 0,{done:!0}):t.isNonExistent()?this.next():{value:t,done:!1}},e}();function Z(e,t,n,r){K.store(e,t,n,r)}function X(e,t,n){return v("Search API"),new J(e,t,n)}function ee(){return l.c.subState("objQuery")}var te=new u.LoadableCollection({name:"objFieldDiffs",state:function(){return l.c.subState("objFieldDiffs")},loader:function(e){var t=e[0],n=e[1];return y.e.retrieveObjFieldDiffs(t,n)},invalidation:function(e){return function(e,t){var n=W(e,t);if(n)return n.getAttribute("_version")||"";return""}(e[0],e[1])}});function ne(e,t,n,r){if("published"===e)return null;var i=function(e,t){return re(e,t).get()||{}}(e,n);return r?function(e,t,n){var r=n._widget_pool;if(r){var i=r[t];if(i)return ie(e,i)}return null}(t,r,i):ie(t,i)}function re(e,t){return te.get([e,t])}function ie(e,t){var n=t[Object(d.R)(e)];return n?n[1]:null}function oe(e,t,n){var r=W("published",t),i=W(e,t);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(e,t,n){var r=e.getWidgetWithBadPerformance(n),i=t.getWidgetWithBadPerformance(n);return r?i?function(e,t){var n=D(e,t);return Object(s.some)(Object.keys(n),(function(e){return!Object(d.z)(e)||"_obj_class"===e}))}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}},function(e,t,n){var r,i,o;
2
2
  /*!
3
3
  * URI.js - Mutating URLs
4
4
  *