scrivito_ui 1.17.0.rc2 → 1.17.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b805f3adedb9c6da020a34280594beee292381c9c3af33b5ee44c9f575411ea4
4
- data.tar.gz: 07cfe3bd86e0d664a8a631a78670a23ea28eb23a4a17ca687f242b0b4301bd92
3
+ metadata.gz: 68aaee604a64d7715e02f8daf62ec9717347494a6bc5ad8a82450dc00d008a15
4
+ data.tar.gz: 7aa603dd9373bd3ee6115aa1799f5acfd621615327cf8593eb874332bfec15f9
5
5
  SHA512:
6
- metadata.gz: b16859532982d4b0a0704b55aa8fffd198fbf310c674faa32a8e42c65660325de8eb5d8ea23e4b7ff4d8a6b39a6713685fe19b0e6281c8279d341ea95d9afec4
7
- data.tar.gz: 580fc54d60a5fb4618fb0554a2532c5d1fe2bf93347416246d883b1707831e1116c1d53bed5c0d7e3bd4f3626b4f975b9848b1c6346fa1619d74d5ca9e4c4bf6
6
+ metadata.gz: 5a9dd3061631984f0be6b4e753914de0f3600bd74f5a471a7b40839658d4497932b5be3a3742d10ebbb3e606550f31262b460c86ff3e1d7a3a5e13fa0f94c932
7
+ data.tar.gz: 25ba4a09bfedf94e64f7fa2035c689e1b400903f772b6ffbcc7f8dce5b5a839d4ccb191e3913407365f57d5cecc4e80316783358b0053e91fbe0188ac50caf3a
@@ -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;on)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=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;r0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=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=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;so&&(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;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?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&&ot?(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;i1&&(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;i1&&(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":">",'"':""","'":"'","`":"`"},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/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?"":""},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=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-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>>0,r=0;r0)for(n=0;n=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=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;n68?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=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;o0;){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;t0&&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;ithis?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=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()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]||i0,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;a0}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.expiresAfter19)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;n0)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;n0){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
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;on)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=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;r0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s=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=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;so&&(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;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?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&&ot?(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;i1&&(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;i1&&(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":">",'"':""","'":"'","`":"`"},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/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?"":""},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=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-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>>0,r=0;r0)for(n=0;n=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=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;n68?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=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;o0;){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;t0&&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;ithis?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=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()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]||i0,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;a0}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.expiresAfter19)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;n0)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;n0){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
2
2
  /*!
3
3
  * URI.js - Mutating URLs
4
4
  *
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0.rc2
4
+ version: 1.17.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-08 00:00:00.000000000 Z
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties