scrivito_sdk 1.16.0.rc1 → 1.16.0.rc2

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: 76243f40035c3d7c864fe322c0f35f55d4ed1c1c38a158b492b1a5403af08352
4
- data.tar.gz: 27765ae148888b8d98a439c036cfdff78b942014d9f1977c5a0cee45f78fe84f
3
+ metadata.gz: a127d90b53985381a7800147b5883671e86493036dfba6a4b87438424dcec98d
4
+ data.tar.gz: 143d3427d068c1e5b882f0a7cbab39098e554d9c65e0273fa05117f0a97d31e8
5
5
  SHA512:
6
- metadata.gz: 4b6b7548be93614eeebdc6573ca2a89b3f5a86a68f1fc7e6a058e0b7dcc4e47456ff48d2f9fb84e59ec24dca71c2dd98bb248b9dfb884690fe09fc6f571ae538
7
- data.tar.gz: 487530d43384f921eb2b75cec781ad69961e15d970354a3a25883bcd591ffb2f6bbc69eb0f63b61612a4fc6c2f64df84b03c756f625b16fa9bbbe364a7656d10
6
+ metadata.gz: 60fab940412b50488b8f5c3ef0a4ca95a1643d2b82f89eedb3f88c89a3ab9211dee31b6a3d15bda559a0e2e7a023d25009a2e75990495ae122cd76bec6273e95
7
+ data.tar.gz: b640470ccbcae8dce4d3bc973db4c195d1d2f55e9bb2844ae0feada5e7dd25f314dfa720c9a948d5e0d2dbef4da50563982d0ddbaaea31656b377acb8afbe429
data/config/ca-bundle.crt CHANGED
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Wed Apr 10 10:16:34 2019 GMT
4
+ ## Certificate data from Mozilla as of: Tue Apr 23 09:08:01 2019 GMT
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -1,4 +1,4 @@
1
- /*! Copyright (c) 2019 Infopark AG (https://scrivito.com) */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=487)}([function(t,e,n){"use strict";var r=n(2);function i(t){try{return Object(r.isFunction)(t)?function(t){if(function(t){return!!t._scrivitoPrivateSchema}(t)){var e=t._scrivitoPrivateSchema;return"[class "+e.name+"]"}if(function(t){var e=t.prototype;return e&&e.isReactComponent}(t)){var n=t.displayName||t.name;return'[class React.Component "'+n+'"]'}return a(t.toString())}(t):Object(r.isObject)(t)?function(t){var e=t._scrivitoPrivateContent;if(e&&Object(r.isFunction)(e.toPrettyPrint))return e.toPrettyPrint();if(Object(r.isElement)(t))return"[object HTMLElement "+o(t.outerHTML)+"]";return o(t)}(t):o(t)}catch(t){return""}}function o(t){var e=JSON.stringify(t);return e?a(e):e}function a(t){return t.length>100?t.slice(0,100)+"...":t}var s=n(52),u=n(57);u.struct.strict=!0,u.interface.strict=!0,u.fail=function(t){throw new TypeError(t)};var l,c=[];function f(t){l?c.push(t):setTimeout(t,0)}function d(t){f(function(){throw t})}function p(t,e,n){var o=n.docPermalink;return function(){for(var n,a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];try{n=function(t,e){var n=e.length,o=t.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(e.map(function(e,n){var r=e[0],o=e[1],a=t[n],s=u.validate(a,o);return s.errors.map(function(t){return function(t,e){var n=function(t,e){var n="argument '"+t+"'";if(0===e.path.length)return n;return"key '"+e.path.join("/")+"' in "+n}(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===u.Nil)return"Unexpected "+n+".";var r=u.getTypeName(e.expected),o="got "+i(e.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,t)})}));if(a.length>0)return a.join(" ")}(a,e)}catch(t){d(t)}if(n){var c="Visit https://scrivito.com/"+o+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+t+"': "+n+" "+c)}}}var h=function(){function t(){}return t.prototype.current=function(){return this.currentContext},t.prototype.runWith=function(t,e){var n=this.currentContext;try{return this.currentContext=t,e()}finally{this.currentContext=n}},t}(),v=function(){function t(){var t=this;this.promise=new ot(function(e,n){t.resolve=function(n){t.settled=!0,e(n)},t.reject=function(e){t.settled=!0,n(e)}})}return t.prototype.isPending=function(){return!this.settled},t}();function m(t){try{return{errorThrown:!1,result:t()}}catch(t){return{errorThrown:!0,error:t}}}var y=!1;function g(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];window&&window.console&&!y&&(t=window.console).error.apply(t,e)}function b(){var t="1.6.0-rc2-120-g6edf5efa9d80";return t}function w(t,e){void 0===e&&(e=window.document);var n=e.createElement("link");n.rel="stylesheet",n.href=t,O(e.head,n)}function _(t,e){void 0===e&&(e=window.document);var n=e.createElement("script");n.src=t,O(e.head,n)}function O(t,e){t.appendChild(e)}var k=/(_+)(\w)/g,x=/([A-Z])/g,C=/[A-Z]+|\d+/g,E=/^_?(_+[A-Z0-9]|[^_])+$/,S=/[_\s]+/g,j=/[A-Z][a-z]+/g;function T(t){return E.test(t)}function A(t){return t.replace(x,function(t,e){return"_"+e.toLowerCase()})}function P(t){return t.replace(k,function(t,e,n,r){return r?n.toUpperCase()===n?t:""+e.substr(1)+n.toUpperCase():t})}function N(t){var e=P(t);return e.charAt(0).toUpperCase()+e.slice(1)}function I(t){return t.replace(S," ").replace(j,function(t){return" "+t.toLowerCase()}).replace(C,function(t){return" "+t}).trim().replace(/./,function(t){return t.toUpperCase()})}n(113);var L=u.interface({size:u.Number,type:u.String},{name:"Blob",strict:!1}),D=L.extend({name:u.String},{name:"File",strict:!1});function R(t){return"_"===t[0]}function M(t,e){for(var n=t.iterator(),r=[];r.length!==e;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function B(){for(var t=Math.floor(Math.random()*Math.pow(16,8)).toString(16);t.length<8;)t="0"+t;return t}function q(){return B()+B()}var F=!1;function z(t,e,n){return F?t:r.throttle(t,e,n)}var U=-9007199254740991,H=9007199254740991,W=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function V(t){return"string"==typeof t&&t.match(/^-?\d+$/)?J(t):"number"==typeof t?J(t):null}function K(t){return function(t){return Q(t)&&Math.floor(t)===t}(t)&&U<=t&&t<=H}function Q(t){return"number"==typeof t&&Object(r.isFinite)(t)}function $(t){if("string"!=typeof t)return null;if(!Z(t))throw new s.InternalError('The value is not a valid ISO date time: "'+t+'"');return G(t)}function G(t){if(!t)return null;var e=t.match(W);if(!e)return null;var n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=parseInt(n,10),l=parseInt(r,10),c=parseInt(i,10),f=parseInt(o,10),d=parseInt(a,10),p=parseInt(s,10);return new Date(Date.UTC(u,l-1,c,f,d,p))}function Y(t){return""+(""+t.getUTCFullYear()+X(t.getUTCMonth()+1))+(""+X(t.getUTCDate())+X(t.getUTCHours()))+(""+X(t.getUTCMinutes())+X(t.getUTCSeconds()))}function Z(t){return"string"==typeof t&&!!t.match(/^\d{14}$/)}function X(t){return t<10?"0"+t:t}function J(t){var e=parseInt(t.toString(),10);return 0===e?0:K(e)?e:null}function tt(t){return et(1e3*t)}function et(t){return new ot(function(e){setTimeout(e,t)})}function nt(t,e){return rt(t)&&rt(e)?t.equals(e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&Object(r.every)(Object(r.zip)(t,e),function(t){return nt(t[0],t[1])}):t&&e?t.valueOf()===e.valueOf():t===e}function rt(t){return!!t&&"function"==typeof t.equals}function it(t,e){return t.then(function(t){return e(),t},function(t){throw e(),t})}var ot,at=n(125);ot="undefined"!=typeof Promise?Promise:at.a;var st=function(){function t(t,e){var n=(void 0===e?{}:e).batchSize;this.mget=t,this.batchSize=n||100,this.itemsToBatch=[]}return t.prototype.retrieve=function(t){var e=this;0===this.itemsToBatch.length&&f(function(){return e.performRetrieval()});var n=new v;return this.itemsToBatch.push({key:t,deferred:n}),n.promise},t.prototype.reset=function(){this.itemsToBatch=[]},t.prototype.performRetrieval=function(){var t=this,e=this.itemsToBatch.splice(0,this.batchSize);if(0!==e.length){var n=e.map(function(t){return t.key});this.mget(n).then(function(n){e.forEach(function(e,r){var i=e.key,o=e.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else t.retrieve(i).then(o.resolve,o.reject)})},function(t){e.forEach(function(e){return e.deferred.reject(t)})}),this.performRetrieval()}},t}();function ut(t){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lt(t){var e=ct(t);return JSON.stringify(e)}function ct(t){return Array.isArray(t)?t.map(ct):function(t){return"object"===ut(t)&&null!==t}(t)?Object.keys(t).sort().map(function(e){return[e,ct(t[e])]}):t}var ft=Object.assign||r.extend;function dt(t,e){var n=t.clientX,r=t.clientY,i=e.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}function pt(t){return(pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ht=function(){function t(t){this.subscribeFunction=t}return t.prototype.subscribe=function(t){var e=new vt("object"===pt(t)?t:{next:t}),n=this.subscribeFunction(e);return e.setUnsubscribeCallback("object"===pt(n)?function(){return n.unsubscribe()}:n),e},t.prototype.map=function(e){var n=this;return new t(function(t){return n.subscribe({next:function(n){return t.next(e(n))},complete:function(){return t.complete()}})})},t.prototype.filter=function(e){var n=this;return new t(function(t){return n.subscribe({next:function(n){e(n)&&t.next(n)},complete:function(){return t.complete()}})})},t.prototype.toPromise=function(){var t=this;return new ot(function(e){var n;t.subscribe({next:function(t){n=t},complete:function(){e(n)}})})},t.prototype.takeOne=function(){var e=this;return new t(function(t){var n=e.subscribe({next:function(e){n.unsubscribe(),t.next(e),t.complete()},complete:function(){t.complete()}});return n})},t.prototype.takeUntil=function(e){var n=this;return new t(function(t){var r,i;if((i=n.subscribe({next:function(e){t.next(e)},complete:function(){o()}})).isClosed())return function(){};function o(){t.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=e.subscribe({next:function(){o()},complete:function(){o()}}),a})},t}(),vt=function(){function t(t){this.subscriber=t}return t.prototype.next=function(t){this.subscriber&&this.subscriber.next&&this.subscriber.next(t)},t.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},t.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},t.prototype.isClosed=function(){return!this.subscriber},t.prototype.setUnsubscribeCallback=function(t){this.unsubscribeCallback=t},t}();var mt,yt=(mt=function(t,e){var n,r;return(mt=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}mt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),gt=function(t){function e(){var e=t.call(this,function(t){if(e.isCompleted)return t.complete(),function(){};var n=(e.subscriberIdCounter++).toString();return e.subscribers[n]=t,function(){delete e.subscribers[n]}})||this;return e.subscribers={},e.subscriberIdCounter=1,e.isCompleted=!1,e}return yt(e,t),e.prototype.next=function(t){var e=this;Object.keys(this.subscribers).forEach(function(n){e.subscribers[n].next(t)})},e.prototype.complete=function(){var t=this;Object.keys(this.subscribers).forEach(function(e){return t.subscribers[e].complete()}),this.subscribers={},this.isCompleted=!0},e.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},e.prototype.isClosed=function(){return this.isCompleted},e}(ht);n.d(e,"p",function(){return p}),n.d(e,"d",function(){return h}),n.d(e,"e",function(){return v}),n.d(e,"a",function(){return s.ArgumentError}),n.d(e,"g",function(){return s.InternalError}),n.d(e,"h",function(){return s.ResourceNotFoundError}),n.d(e,"i",function(){return s.ScrivitoError}),n.d(e,"Q",function(){return d}),n.d(e,"G",function(){return f}),n.d(e,"I",function(){return i}),n.d(e,"O",function(){return u}),n.d(e,"M",function(){return m}),n.d(e,"F",function(){return g}),n.d(e,"x",function(){return b}),n.d(e,"D",function(){return w}),n.d(e,"E",function(){return _}),n.d(e,"o",function(){return P}),n.d(e,"q",function(){return N}),n.d(e,"N",function(){return I}),n.d(e,"R",function(){return A}),n.d(e,"y",function(){return T}),n.d(e,"f",function(){return D}),n.d(e,"c",function(){return L}),n.d(e,"z",function(){return R}),n.d(e,"m",function(){return M}),n.d(e,"L",function(){return q}),n.d(e,"K",function(){return B}),n.d(e,"P",function(){return z}),n.d(e,"H",function(){return G}),n.d(e,"t",function(){return $}),n.d(e,"u",function(){return V}),n.d(e,"B",function(){return Q}),n.d(e,"w",function(){return Y}),n.d(e,"A",function(){return Z}),n.d(e,"C",function(){return K}),n.d(e,"S",function(){return tt}),n.d(e,"T",function(){return et}),n.d(e,"v",function(){return nt}),n.d(e,"J",function(){return it}),n.d(e,"j",function(){return ot}),n.d(e,"b",function(){return st}),n.d(e,"s",function(){return lt}),n.d(e,"n",function(){return ft}),n.d(e,"r",function(){return dt}),n.d(e,"k",function(){return ht}),n.d(e,"l",function(){return gt})},function(t,e,n){"use strict";t.exports=n(178)},function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,c=a.slice,f=s.toString,d=s.hasOwnProperty,p=Array.isArray,h=Object.keys,v=Object.create,m=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};e.nodeType?i._=y:(!n.nodeType&&n.exports&&(e=n.exports=y),e._=y),y.VERSION="1.9.1";var g,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return y.iteratee!==g?y.iteratee(t,e):null==t?y.identity:y.isFunction(t)?b(t,e,n):y.isObject(t)&&!y.isArray(t)?y.matcher(t):y.property(t)};y.iteratee=g=function(t,e){return w(t,e,1/0)};var _=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}},O=function(t){if(!y.isObject(t))return{};if(v)return v(t);m.prototype=t;var e=new m;return m.prototype=null,e},k=function(t){return function(e){return null==e?void 0:e[t]}},x=function(t,e){return null!=t&&d.call(t,e)},C=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},E=Math.pow(2,53)-1,S=k("length"),j=function(t){var e=S(t);return"number"==typeof e&&e>=0&&e<=E};y.each=y.forEach=function(t,e,n){var r,i;if(e=b(e,n),j(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=y.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},y.map=y.collect=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o};var T=function(t){return function(e,n,r,i){var o=arguments.length>=3;return function(e,n,r,i){var o=!j(e)&&y.keys(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var u=o?o[s]:s;r=n(r,e[u],u,e)}return r}(e,b(n,i,4),r,o)}};y.reduce=y.foldl=y.inject=T(1),y.reduceRight=y.foldr=T(-1),y.find=y.detect=function(t,e,n){var r=(j(t)?y.findIndex:y.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},y.filter=y.select=function(t,e,n){var r=[];return e=w(e,n),y.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},y.reject=function(t,e,n){return y.filter(t,y.negate(w(e)),n)},y.every=y.all=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},y.some=y.any=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},y.contains=y.includes=y.include=function(t,e,n,r){return j(t)||(t=y.values(t)),("number"!=typeof n||r)&&(n=0),y.indexOf(t,e,n)>=0},y.invoke=_(function(t,e,n){var r,i;return y.isFunction(e)?i=e:y.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),y.map(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=C(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;s<u;s++)null!=(r=t[s])&&r>o&&(o=r);else e=w(e,n),y.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},y.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;s<u;s++)null!=(r=t[s])&&r<o&&(o=r);else e=w(e,n),y.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},y.shuffle=function(t){return y.sample(t,1/0)},y.sample=function(t,e,n){if(null==e||n)return j(t)||(t=y.values(t)),t[y.random(t.length-1)];var r=j(t)?y.clone(t):y.values(t),i=S(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=y.random(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,e)},y.sortBy=function(t,e,n){var r=0;return e=w(e,n),y.pluck(y.map(t,function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var A=function(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=w(r,i),y.each(n,function(e,i){var a=r(e,i,n);t(o,e,a)}),o}};y.groupBy=A(function(t,e,n){x(t,n)?t[n].push(e):t[n]=[e]}),y.indexBy=A(function(t,e,n){t[n]=e}),y.countBy=A(function(t,e,n){x(t,n)?t[n]++:t[n]=1});var P=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;y.toArray=function(t){return t?y.isArray(t)?c.call(t):y.isString(t)?t.match(P):j(t)?y.map(t,y.identity):y.values(t):[]},y.size=function(t){return null==t?0:j(t)?t.length:y.keys(t).length},y.partition=A(function(t,e,n){t[n?0:1].push(e)},!0),y.first=y.head=y.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:y.initial(t,t.length-e)},y.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},y.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:y.rest(t,Math.max(0,t.length-e))},y.rest=y.tail=y.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},y.compact=function(t){return y.filter(t,Boolean)};var N=function(t,e,n,r){for(var i=(r=r||[]).length,o=0,a=S(t);o<a;o++){var s=t[o];if(j(s)&&(y.isArray(s)||y.isArguments(s)))if(e)for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else N(s,e,n,r),i=r.length;else n||(r[i++]=s)}return r};y.flatten=function(t,e){return N(t,e,!1)},y.without=_(function(t,e){return y.difference(t,e)}),y.uniq=y.unique=function(t,e,n,r){y.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=w(n,r));for(var i=[],o=[],a=0,s=S(t);a<s;a++){var u=t[a],l=n?n(u,a,t):u;e&&!n?(a&&o===l||i.push(u),o=l):n?y.contains(o,l)||(o.push(l),i.push(u)):y.contains(i,u)||i.push(u)}return i},y.union=_(function(t){return y.uniq(N(t,!0,!0))}),y.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=S(t);r<i;r++){var o=t[r];if(!y.contains(e,o)){var a;for(a=1;a<n&&y.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},y.difference=_(function(t,e){return e=N(e,!0,!0),y.filter(t,function(t){return!y.contains(e,t)})}),y.unzip=function(t){for(var e=t&&y.max(t,S).length||0,n=Array(e),r=0;r<e;r++)n[r]=y.pluck(t,r);return n},y.zip=_(y.unzip),y.object=function(t,e){for(var n={},r=0,i=S(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var I=function(t){return function(e,n,r){n=w(n,r);for(var i=S(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}};y.findIndex=I(1),y.findLastIndex=I(-1),y.sortedIndex=function(t,e,n,r){for(var i=(n=w(n,r,1))(e),o=0,a=S(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o};var L=function(t,e,n){return function(r,i,o){var a=0,s=S(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),y.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}};y.indexOf=L(1,y.findIndex,y.sortedIndex),y.lastIndexOf=L(-1,y.findLastIndex),y.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},y.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(c.call(t,r,r+=e));return n};var D=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),a=t.apply(o,i);return y.isObject(a)?a:o};y.bind=_(function(t,e,n){if(!y.isFunction(t))throw new TypeError("Bind must be called on a function");var r=_(function(i){return D(t,r,e,this,n.concat(i))});return r}),y.partial=_(function(t,e){var n=y.partial.placeholder,r=function(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return D(t,r,this,this,a)};return r}),y.partial.placeholder=y,y.bindAll=_(function(t,e){var n=(e=N(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=y.bind(t[r],t)}}),y.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return x(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},y.delay=_(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),y.defer=y.partial(y.delay,y,1),y.throttle=function(t,e,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:y.now(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=y.now();s||!1!==n.leading||(s=l);var c=e-(l-s);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},y.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=_(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,e),s&&(i=t.apply(this,a))}else r=y.delay(o,e,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2),y.restArguments=_;var R=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(t,e){var n=M.length,r=t.constructor,i=y.isFunction(r)&&r.prototype||s,o="constructor";for(x(t,o)&&!y.contains(e,o)&&e.push(o);n--;)(o=M[n])in t&&t[o]!==i[o]&&!y.contains(e,o)&&e.push(o)};y.keys=function(t){if(!y.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)x(t,n)&&e.push(n);return R&&B(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return R&&B(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},y.mapObject=function(t,e,n){e=w(e,n);for(var r=y.keys(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o},y.pairs=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},y.invert=function(t){for(var e={},n=y.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},y.functions=y.methods=function(t){var e=[];for(var n in t)y.isFunction(t[n])&&e.push(n);return e.sort()};var q=function(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var l=a[u];e&&void 0!==n[l]||(n[l]=o[l])}return n}};y.extend=q(y.allKeys),y.extendOwn=y.assign=q(y.keys),y.findKey=function(t,e,n){e=w(e,n);for(var r,i=y.keys(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r};var F,z,U=function(t,e,n){return e in n};y.pick=_(function(t,e){var n={},r=e[0];if(null==t)return n;y.isFunction(r)?(e.length>1&&(r=b(r,e[1])),e=y.allKeys(t)):(r=U,e=N(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n}),y.omit=_(function(t,e){var n,r=e[0];return y.isFunction(r)?(r=y.negate(r),e.length>1&&(n=e[1])):(e=y.map(N(e,!1,!1),String),r=function(t,n){return!y.contains(e,n)}),y.pick(t,r,n)}),y.defaults=q(y.allKeys,!0),y.create=function(t,e){var n=O(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0},F=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&z(t,e,n,r)},z=function(t,e,n,r){t instanceof y&&(t=t._wrapped),e instanceof y&&(e=e._wrapped);var i=f.call(t);if(i!==f.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return u.valueOf.call(t)===u.valueOf.call(e)}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(y.isFunction(a)&&a instanceof a&&y.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return r[l]===e;if(n.push(t),r.push(e),o){if((l=t.length)!==e.length)return!1;for(;l--;)if(!F(t[l],e[l],n,r))return!1}else{var c,d=y.keys(t);if(l=d.length,y.keys(e).length!==l)return!1;for(;l--;)if(c=d[l],!x(e,c)||!F(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0},y.isEqual=function(t,e){return F(t,e)},y.isEmpty=function(t){return null==t||(j(t)&&(y.isArray(t)||y.isString(t)||y.isArguments(t))?0===t.length:0===y.keys(t).length)},y.isElement=function(t){return!(!t||1!==t.nodeType)},y.isArray=p||function(t){return"[object Array]"===f.call(t)},y.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},y.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){y["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),y.isArguments(arguments)||(y.isArguments=function(t){return x(t,"callee")});var H=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof H&&(y.isFunction=function(t){return"function"==typeof t||!1}),y.isFinite=function(t){return!y.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},y.isNaN=function(t){return y.isNumber(t)&&isNaN(t)},y.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},y.isNull=function(t){return null===t},y.isUndefined=function(t){return void 0===t},y.has=function(t,e){if(!y.isArray(e))return x(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!d.call(t,i))return!1;t=t[i]}return!!n},y.noConflict=function(){return i._=o,this},y.identity=function(t){return t},y.constant=function(t){return function(){return t}},y.noop=function(){},y.property=function(t){return y.isArray(t)?function(e){return C(e,t)}:k(t)},y.propertyOf=function(t){return null==t?function(){}:function(e){return y.isArray(e)?C(t,e):t[e]}},y.matcher=y.matches=function(t){return t=y.extendOwn({},t),function(e){return y.isMatch(e,t)}},y.times=function(t,e,n){var r=Array(Math.max(0,t));e=b(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},y.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},y.now=Date.now||function(){return(new Date).getTime()};var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},V=y.invert(W),K=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};y.escape=K(W),y.unescape=K(V),y.result=function(t,e,n){y.isArray(e)||(e=[e]);var r=e.length;if(!r)return y.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=y.isFunction(o)?o.call(t):o}return t};var Q=0;y.uniqueId=function(t){var e=++Q+"";return t?t+e:e},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(t){return"\\"+G[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var r,i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,r,i,s){return a+=t.slice(o,s).replace(Y,Z),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.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(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,y)},u=e.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},y.chain=function(t){var e=y(t);return e._chain=!0,e};var X=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){return y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),X(this,n.apply(y,t))}}),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],X(this,n)}}),y.each(["concat","join","slice"],function(t){var e=a[t];y.prototype[t]=function(){return X(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return y}.apply(e,[]))||(n.exports=r)}()}).call(this,n(48),n(85)(t))},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"deserialize",function(){return J});var i=n(53),o=n(56),a=n(11);var s=function(){function t(t,e,n){this.container=t,this.attributeName=e,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return t.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},t.prototype.update=function(t){var e;this.container.update(((e={})[this.attributeName]=[t,this.typeInfo],e))},t.prototype.getContainer=function(){return this.container},t.prototype.obj=function(){return this.container.obj()},t.prototype.name=function(){return this.attributeName},t.prototype.type=function(){return this.typeInfo[0]},t.prototype.workspaceId=function(){return this.obj().workspaceId()},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.container.equals(e.getContainer())&&this.attributeName===e.name());var n,r},t.prototype.validClasses=function(){return this.typeOptions.validClasses},t.prototype.getDiff=function(){var t=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,t.id(),this.container===t?void 0:this.container.id())},t.prototype.toString=function(){var t=this.obj(),e=this.attributeName;return this.container===t?"<BasicField name="+e+" objId="+t.id()+">":"<BasicField name="+e+" objId="+t.id()+" widgetId="+this.container.id()+">"},t.prototype.id=function(){var t=this.obj();return this.container===t?this.attributeName+"|"+t.id():this.attributeName+"|"+t.id()+"|"+this.container.id()},t}(),u=n(0),l=n(13);function c(t){return l.parseQuery(t)}function f(t){return new l(t).query(!0)}var d=n(2),p=n.n(d),h=n(95);var v=function(){function t(t){var e=t.name,n=t.count,r=t.includedObjIds;this._name=e,this._count=n,this._includedObjIds=r}return t.prototype.name=function(){return this._name},t.prototype.count=function(){return this._count},t.prototype.includedObjs=function(){return Object(d.compact)(this._includedObjIds.map(function(t){return Bt.get(t)}))},t}();function m(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var y=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],g=["equals","startsWith","isGreaterThan","isLessThan"],b=["contains","containsPrefix"],w={query:[]},_=function(){function t(t){void 0===t&&(t=w);this._query=[].concat(t.query),this._batchSize=t.batchSize,this._offset=t.offset,this._sortBy=t.sortBy,this._sortDirection=t.sortDirection,this._includeDeleted=t.includeDeleted}return t.prototype.and=function(e,n,r,i){if(m(e,t))this._query=this._query.concat(e._query);else{if(void 0===n)throw new u.a("Missing operator to search with");if(void 0===r)throw new u.a('Missing value to search (specify "null" for missing)');var o=O(e,n,r);i&&(!function(t){if(!Object(d.contains)(b,t))throw new u.a('Boosting operator "'+t+'" is invalid.')}(n),o.boost=function(t){var e={};return Object(d.each)(t,function(t,n){var r=x(n);e[r]=t}),e}(i)),this._query.push(o)}return this},t.prototype.andNot=function(t,e,n){var r=O(t,e,n);return function(t){if(!Object(d.contains)(g,t))throw new u.a('Negating operator "'+t+'" is invalid.')}(e),r.negate=!0,this._query.push(r),this},t.prototype.offset=function(t){return this._offset=t,this},t.prototype.order=function(t,e){return void 0===e&&(e="asc"),this._sortBy=x(t),this._sortDirection=e,this},t.prototype.batchSize=function(t){return this._batchSize=t,this},t.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},t.prototype.count=function(){return this.getObjDataQuery().count()},t.prototype.first=function(){return this.take(1)[0]||null},t.prototype.take=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];S.apply(void 0,[t].concat(e));var r=this._batchSize;try{return this._batchSize=void 0===t?1e3:t,Object(u.m)(this,t)}finally{this._batchSize=r}},t.prototype.iterator=function(){var t=this.getObjDataQuery().iterator();return{next:function(){var e=t.next(),n=e.done,r=e.value;return n?{done:!0}:{done:!1,value:new Bt(r)}}}},t.prototype.getObjDataQuery=function(){return Object(a.j)(st(),this.params(),this.getBatchSize())},t.prototype.getBatchSize=function(){return this._batchSize||100},t.prototype.facet=function(t,e){var n;return n=void 0===e?{}:function(t){var e=d.without.apply(void 0,[Object.keys(t)].concat(C));if(e.length)throw new u.a("Invalid facet options: "+Object(u.I)(e)+". Valid options: "+C);return t}(e),new a.a(st(),x(t),n,this._query).result().map(function(t){return new v(t)})},t.prototype.store=function(t,e){Object(a.p)(st(),this.params(),t,e)},t.prototype.params=function(){return Object(d.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},d.isUndefined)},t}();function O(t,e,n){return{field:function(t){if(Object(d.isArray)(t))return Object(d.map)(t,x);return x(t)}(t),operator:function(t){if(!function(t){return Object(d.contains)(y,t)}(t))throw new u.a('Operator "'+t+'" is invalid.');return Object(u.R)(t)}(e),value:function(t){if(Object(d.isArray)(t))return Object(d.map)(t,k);return k(t)}(n)}}function k(t){return Object(d.isDate)(t)?Object(u.w)(t):m(t,Bt)?t.id():t}function x(t){if(!Object(u.y)(t))throw new u.a('Attribute name "'+t+'" is not camel case.');return Object(u.R)(t)}var C=["limit","includeObjs"];var E=u.O.refinement(u.O.Number,function(t){return t>=0},"Number (positive)"),S=Object(u.p)("objSearch.take",[["count",u.O.maybe(E)]],{docPermalink:"js-sdk/ObjSearch-take"});function j(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var T=u.O.irreducible("Obj",function(t){return L(t,Bt)}),A=u.O.irreducible("Widget",function(t){return L(t,bt)}),P=u.O.irreducible("Link",function(t){return L(t,Vt)}),N=u.O.irreducible("ObjSearch",function(t){return L(t,_)}),I=u.O.irreducible("Binary",function(t){return j(t,$)});function L(t,e){return!!t&&j(t._scrivitoPrivateContent,e)}var D,R=n(6);function M(t){D=t}var B=function(){function t(t,e){void 0===e&&(e={});var n=e.filename;if(this.contentType=e.contentType,t.idToCopy)this.idToCopy=t.idToCopy;else{var r=t.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return t.prototype.into=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return q.apply(void 0,[t].concat(e)),Object(R.g)("Changing CMS content"),this.intoId(t._scrivitoPrivateContent.id())},t.prototype.intoId=function(t){if(!D)throw new u.g("No binaryHandler defined!");var e;if(this.idToCopy)e=D.copyBinary(this.idToCopy,t,this.filename,this.contentType);else{if(!this.source)throw new u.g("Source is not defined!");e=D.uploadBinary(t,this.source,this.filename,this.contentType)}return e.then(function(t){var e=t.id;return new $(e,!1)})},t}(),q=Object(u.p)("FutureBinary#into",[["target",T]],{docPermalink:"js-sdk/FutureBinary-into"});var F,z=B,U=n(5),H=n(9);!function(t){t.Date="date",t.Number="number",t.String="string",t.Stringlist="stringlist"}(F||(F={}));var W=new U.LoadableCollection({name:"metadata",state:function(){return R.c.subState("metadataCollection")},loader:function(t){return H.e.retrieveBinaryMetadata(t)}}),V=function(){function t(t){this.binaryId=t,t&&(this.loadableData=W.get(t))}return t.store=function(t,e){K(e),W.get(t).set(e)},t.prototype.get=function(t){Object(a.c)("MetadataCollection#get"),function(t){if(!Object(u.y)(t))throw new u.a('Metadata key "'+t+'" is not in camel case.')}(t);var e=this.getData();if(e){var n=Object(u.R)(t);return e.hasOwnProperty(n)?e[n]:null}return null},t.prototype.keys=function(){var t=this.getData();return t?Object(d.map)(Object(d.keys)(t),u.o):[]},t.prototype.contentLength=function(){var t=this.get("contentLength");return"number"!=typeof t?0:t},t.prototype.contentType=function(){var t=this.get("contentType");return"string"!=typeof t?"":t},t.prototype.getData=function(){if(this.loadableData){var t=this.loadableData.get();if(t)return K(t)}},t}();function K(t){for(var e=t.meta_data,n={},r=0,i=Object.keys(e);r<i.length;r++){var o=i[r],a=e[o],s=a[0],l=a[1];if(null==l)throw new u.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var c=void 0;if(s===F.Date){if("string"!=typeof l)throw new u.g('Invalid non-string backend value for a date metadata "'+o+'"');c=Object(u.t)(l)}else c=l;n[o]=c}return n}var Q=new U.LoadableCollection({name:"binary",state:function(){return R.c.subState("binary")},loader:function(t){var e=t[0],n=t[1];return H.e.retrieveBinaryUrls(e,n)}}),$=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={}),this._id=t,this._isPublic=!!e,this._transformation=n||void 0,this._loadableData=Q.get([t,this._transformation])}return t.upload=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(Z.apply(void 0,[t,e].concat(n)),!(u.f.is(t)||e&&e.filename))throw new u.a("Expected a filename to be passed with Blob as the source.");return new z({source:t},e)},t.store=function(e,n,r){var i=n.transformation;Q.get([e,i]).set(r);var o=new t(e).raw();return i?o.optimizeFor(i):o},t.storeMetadata=function(t,e){V.store(t,e)},t.prototype.id=function(){return this._id},t.prototype.copy=function(t){return new z({idToCopy:this._id},t)},t.prototype.isPrivate=function(){return!this._isPublic},t.prototype.optimizeFor=function(e){return new t(this._id,this._isPublic,Object(d.extend)({},this._transformation,e))},t.prototype.original=function(){return new t(this._id,this._isPublic,{})},t.prototype.raw=function(){return new t(this._id,this._isPublic,null)},t.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(d.isEmpty)(this._transformation)},t.prototype.isRaw=function(){return!this.isTransformed()},t.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},t.prototype.urlWithoutPlaceholder=function(){var t=this._loadableData.get();if(t){var e=t[this.accessType()];if(!e)throw new u.g("Missing key "+this.accessType+" in binary data");return e.get.url}},t.prototype.filename=function(){var t=this.url();return!t||t.match(/^data:/)?"":l(t).path().split("/").pop()||""},t.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new V(this._id)},t.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},t.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},t.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var t=/[^.\\]*$/.exec(this.raw().filename());if(t)return t[0].toLowerCase()}return""},t.prototype.equals=function(e){return n=e,(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&Object(d.isEqual)(e.definition(),this.definition());var n,r},t.prototype.isImage=function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]},t.prototype.definition=function(){return this._transformation||null},t.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},t.prototype.assertNotTransformed=function(t){if(this.isTransformed())throw new u.i('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},t.prototype.isTransformed=function(){return!!this._transformation},t}(),G=u.O.struct({contentType:u.O.maybe(u.O.String),filename:u.O.maybe(u.O.String)}),Y=u.O.refinement(u.O.Object,function(t){return u.c.is(t)||u.f.is(t)},"Blob or File"),Z=Object(u.p)("Binary.upload",[["source",Y],["options",u.O.maybe(G)]],{docPermalink:"js-sdk/Binary-static-upload"});function X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function J(t,e,n,r){var i=X(e,2),o=i[0],a=i[1];switch(n){case"binary":return function(t,e){if("binary"===t&&e){var n=e.id,r="published"===st();return new $(n,r)}return null}(o,a);case"date":return function(t,e){if("date"!==t)return null;return Object(u.t)(e)}(o,a);case"float":return function(t,e){switch(t){case"string":return e.match(/^-?\d+(\.\d+)?$/)?tt(e):null;case"number":return tt(e);default:return null}}(o,a);case"enum":return function(t,e,n){var r=n.values;if("string"===t&&p.a.contains(r,e))return e;return null}(o,a,r);case"html":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"integer":return function(t,e){switch(t){case"string":case"number":return Object(u.u)(e);default:return null}}(o,a);case"link":return function(t,e){if("link"!==t||!p.a.isObject(e))return null;return et(e)}(o,a);case"linklist":return function(t,e){if(!p.a.isArray(e))return[];return p.a.compact(e.map(et))}(0,a);case"multienum":return function(t,e,n){var r=n.values;if("stringlist"!==t||!Array.isArray(e))return[];return p.a.intersection(e,r)}(o,a,r);case"reference":return function(t,e,n){if("reference"===t&&e)return nt(e,n);return null}(o,a,t);case"referencelist":return function(t,e,n){if("referencelist"!==t)return[];if(!e)return[];var r=e.map(function(t){return nt(t,n)});return p.a.compact(r)}(o,a,t);case"string":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"stringlist":return function(t,e){if("stringlist"!==t||!Array.isArray(e))return[];return e}(o,a);case"widgetlist":return function(t,e,n){if("widgetlist"!==t)return[];return p.a.map(e,function(t){return n.widget(t)})}(o,a,t);default:return null}}function tt(t){var e=parseFloat(t);return Object(u.B)(e)?e:null}function et(t){var e=p.a.pick(t,"query","rel","target","title","url");"fragment"in t&&(e.hash=t.fragment),"obj_id"in t&&(e.objId=t.obj_id);var n=new Vt(e);return n.isBroken()?null:n}function nt(t,e){var n=Bt.getInWorkspace(e.workspaceId(),t);return n||null}var rt=function(){function t(){}return t.prototype.get=function(t,e){var n=Object(u.R)(t),i=this.getAttributeData(n);return i&&d.isArray(i)||(i=[]),"string"==typeof e?J(this,i,e):J.apply(r,[this,i].concat(e))},t.prototype.serializeAttributes=function(t){var e=this;return d.mapObject(t,function(t,n){if(function(t){return d.isArray(t)&&"widgetlist"===t[0]}(t)){var r=Object(u.o)(n);return["widgetlist",d.invoke(e.get(r,["widgetlist"]),"serializeAttributes")]}return t})},t.prototype.persistWidgets=function(t,e){d.each(e,function(e){if(function(t){if(!t)return!1;if(!d.isArray(t))return!1;if(t.length<2)return!1;var e=t[1];return d.isArray(e)&&e.length>0&&"widgetlist"===e[0]}(e)){var n=e[0];if(n){var r=d.isArray(n)?n:[n];d.each(r,function(e){e.isPersisted()||e.persistInObj(t)})}}})},t}();function it(t){return d.mapObject(t,function(t,e){if(Object(u.z)(e))return d.isArray(t)?t:[t];if(!d.isArray(t))throw new u.g("Value for "+e+" should be a tuple: [value, typeInfo]");var n=t[0],r=t[1];return"string"==typeof r?[n,[r]]:[n,r]})}var ot,at="published";function st(){return ot||at}function ut(t){ot=t}function lt(){ot=void 0}function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function dt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function pt(t,e){return!e||"object"!==ct(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ht(t,e,n){return(ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yt(t,e,n){return e&&mt(t.prototype,e),n&&mt(t,n),t}function gt(t,e){return(gt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var bt=function(t){function e(t){var n;return function(t,e){if(!dt(t,e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=pt(this,vt(e).call(this)))._attributesToBeSaved=it(t),function(t){if(!t)throw new u.a('Please provide a widget class as the "_objClass" property.')}(t._objClass),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gt(t,e)}(e,rt),yt(e,null,[{key:"build",value:function(t,n){var r=Object.create(e.prototype);return r._obj=n,r._id=t,r}},{key:"newWithSerializedAttributes",value:function(t){var n={},r={};p.a.each(t,function(t,i){if("_obj_class"!==i)if(p.a.isArray(t)&&"widgetlist"===p.a.first(t)){var o=p.a.map(p.a.last(t),function(t){return e.newWithSerializedAttributes(t)}),a=Object(u.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=t;else n._objClass=[t]});var i=new e(n);return i.preserializedAttributes=r,i}}]),yt(e,[{key:"id",value:function(){return this._failIfNotPersisted(),this._id}},{key:"objClass",value:function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]}},{key:"obj",value:function(){return this._failIfNotPersisted(),this._obj}},{key:"widget",value:function(t){return this.obj().widget(t)}},{key:"workspaceId",value:function(){return this.obj().workspaceId()}},{key:"modification",value:function(){return Object(a.k)(st(),this.obj().id(),this.id())}},{key:"update",value:function(t){var e=this,n=it(t);Object(R.r)(function(){e.persistWidgets(e.obj(),n);var t=Ct(n);e._updateSelf(t)})}},{key:"insertBefore",value:function(t){t.obj().insertWidget(this,{before:t})}},{key:"insertAfter",value:function(t){t.obj().insertWidget(this,{after:t})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()}},{key:"persistInObj",value:function(t){this.persistWidgets(t,this._attributesToBeSaved);var e=Ct(this._attributesToBeSaved);p.a.extend(e,this.preserializedAttributes||{}),this._obj=t,this._id=t.generateWidgetId(),this._updateSelf(e),this._executeDidPersistCallback()}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"onDidPersist",value:function(t){if(this.isPersisted())throw new u.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=t}},{key:"hasOnDidPersistCallback",value:function(){return!!this._onDidPersistCallback}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(t){return!!dt(t,e)&&(this.id()===t.id()&&this.obj().id()===t.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"toPrettyPrint",value:function(){return"[object ".concat(this.objClass(),' id="').concat(this.id(),'" objId="').concat(this.obj().id(),'"]')}},{key:"getAttributeData",value:function(t){return this.obj().getWidgetAttribute(this.id(),t)}},{key:"getData",value:function(){return this.obj().getWidgetData(this.id())}},{key:"serializeAttributes",value:function(){return ht(vt(e.prototype),"serializeAttributes",this).call(this,this.getData())}},{key:"_failIfNotPersisted",value:function(){if(!this.isPersisted())throw new u.i("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(t){var e,n,r,i={_widgetPool:[(e={},n=this.id(),r=t,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e)]};this.obj().update(i)}},{key:"_executeDidPersistCallback",value:function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)}},{key:"_copyPersisted",value:function(){var t=this.serializeAttributes();return e.newWithSerializedAttributes(t)}},{key:"_copyUnpersisted",value:function(){var t=new e(p.a.mapObject(this._attributesToBeSaved,function(t){var e=ft(t,2),n=e[0],r=e[1];return r&&"widgetlist"===r[0]?[p.a.invoke(n,"copy"),r]:[n,r]}));return this._onDidPersistCallback&&t.onDidPersist(this._onDidPersistCallback),t}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}}]),e}();function wt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function _t(t){if(wt(t,Vt))return!0;if(!d.isObject(t))return!1;var e=d.without(d.keys(t),"hash","obj_id","query","rel","target","title","url");return d.isEmpty(e)}function Ot(t){var e,n=wt(t,Vt)?{rel:(e=t).rel()||void 0,query:e.query(),target:e.target(),title:e.title(),url:e.url(),obj_id:e.objId(),fragment:e.hash()}:function(t){return{obj_id:t.obj_id||null,query:t.query||null,rel:t.rel||void 0,target:t.target||null,title:t.title||null,url:t.url||null,fragment:t.hash||null}}(t);return n.rel||delete n.rel,n}function kt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function xt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ct(t){var e={};return p.a.each(t,function(t,n){var r=xt(t,2),i=r[0],o=r[1],a=function(t){if(!Object(u.y)(t))throw new u.a("Attribute names have to be in camel case.");return Object(u.R)(t)}(n);if(Object(u.z)(a))e[a]=i;else{var s=xt(o,2),l=s[0],c=s[1];e[a]=[Et(l,n),jt(St(l,c,i,n))]}}),e}function Et(t,e){switch(t){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 t;default:throw new u.a('Attribute "'.concat(e,'" is of unsupported type "').concat(t,'".'))}}function St(t,e,n,r){if(null===n)return n;switch(t){case"binary":return function(t,e){if(kt(t,$))return{id:t.id()};Tt(t,e,"A Binary.")}(n,r);case"date":return function(t,e){if(p.a.isDate(t))return Object(u.w)(t);if(Object(u.A)(t))return t;Tt(t,e,"A Date.")}(n,r);case"enum":return function(t,e,n){var r=t.values;if(p.a.contains(r,e))return e;var i='Valid attribute values are contained in its "values" array ['.concat(r,"].");Tt(e,n,i)}(e,n,r);case"float":return function(t,e){if(Object(u.B)(t))return t;var n=t;p.a.isNumber(t)&&(n=String(t));Tt(n,e,"A Number, that is #isFinite().")}(n,r);case"html":return function(t,e){if(p.a.isString(t))return t;Tt(t,e,"A String.")}(n,r);case"integer":return function(t,e){if(Object(u.C)(t))return t;Tt(t,e,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(t,e){if(_t(t))return Ot(t);Tt(t,e,"A Link instance.")}(n,r);case"linklist":return function(t,e){if(p.a.isArray(t)&&p.a.every(t,_t))return p.a.map(t,Ot);Tt(t,e,"An array of Link instances.")}(n,r);case"multienum":return function(t,e,n){var r=t.values,i="An array with values from ".concat(Object(u.I)(r),".");p.a.isArray(e)&&p.a.every(e,p.a.isString)||Tt(e,n,i);var o=p.a.difference(e,r);if(o.length){var a="".concat(i," Forbidden values: ").concat(Object(u.I)(o),".");Tt(e,n,a)}return e}(e,n,r);case"reference":return function(t,e){if(Pt(t))return At(t);Tt(t,e,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(t,e){if(function(t){return p.a.isArray(t)&&p.a.every(t,function(t){return Pt(t)})}(t))return p.a.map(t,At);Tt(t,e,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(t,e){if(Nt(t))return t.toString();Tt(t,e,"A String.")}(n,r);case"stringlist":return function(t,e){if(p.a.isArray(t)&&p.a.every(t,function(t){return Nt(t)}))return p.a.invoke(t,"toString");Tt(t,e,"An array of strings.")}(n,r);case"widgetlist":return function t(e,n){if(kt(e,bt))return t([e],n);if(p.a.isArray(e)&&p.a.every(e,function(t){return kt(t,bt)}))return p.a.invoke(e,"id");Tt(e,n,"An array of BasicWidget instances.")}(n,r);default:throw new u.g('serializeAttributeValue is not implemented for "'.concat(t,'".'))}}function jt(t){return(p.a.isString(t)||p.a.isArray(t))&&p.a.isEmpty(t)?null:t}function Tt(t,e,n){throw new u.a("Unexpected value ".concat(Object(u.I)(t)," for")+' attribute "'.concat(e,'". Expected: ').concat(n))}function At(t){return kt(t,Bt)?t.id():t}function Pt(t){return p.a.isString(t)||kt(t,Bt)}function Nt(t){return p.a.isString(t)||p.a.isNumber(t)}function It(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var Lt,Dt,Rt=(Lt=function(t,e){return(Lt=Object.setPrototypeOf||It({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Lt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Mt=function(t){function e(e){var n=t.call(this)||this;return n.objData=e,n}return Rt(e,t),e.get=function(t){var e=this.getIncludingDeleted(t);return!e||e.isDeleted()?null:e},e.getInWorkspace=function(t,e){var n=this.getIncludingDeletedInWorkspace(t,e);return!n||n.isDeleted()?null:n},e.getIncludingDeleted=function(t){return this.getIncludingDeletedInWorkspace(st(),t)},e.getIncludingDeletedInWorkspace=function(t,n){var r=Object(a.i)(t,n);if(!r)return null;var i=new e(r);return i.isFinallyDeleted()?null:i},e.create=function(t){return this.createInWorkspace(st(),t)},e.createInWorkspace=function(t,e){var n=it(e);!function(t){if(!t)throw new u.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(t,d.mapObject(r,function(t){return t[0]}),d.omit(e,"_objClass","_id"))},e.createFromFile=function(t,e){var n=this.create(e);return $.upload(t).intoId(n.id()).then(function(t){return n.update({blob:[t,["binary"]]}),n.finishSaving().then(function(){return n})})},e.addChildWithSerializedAttributes=function(t,n){var r=e.generateId();return this.createWithSerializedAttributes(st(),d.extend({},n,{_id:r,_path:t+"/"+r}))},e.createWithSerializedAttributes=function(t,n,r){if(!r){var i=function(t){var e={},n={};d.each(t,function(t,r){if(a=t,d.isArray(a)&&"widgetlist"===d.first(a)){var i=d.map(t[1],qt),o=Object(u.o)(r);n[o]=[i,["widgetlist"]]}else e[r]=t;var a}),e._id||(e._id=Mt.generateId());return[e,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(t,o,s)}var l=Object(a.d)(t,n._id);l.update(n);var c=new e(l);return c.update(r),c},e.generateId=function(){return Object(u.L)()},e.all=function(){return(new _).batchSize(1e3)},e.root=function(){return e.getByPath("/")},e.where=function(t,e,n,r){return(new _).and(t,e,n,r)},e.getByPath=function(t){var e=this.where("_path","equals",t).first();return e||null},e.getByPermalink=function(t){var e=this.where("_permalink","equals",t).first();return e||null},e.getAllByPermalink=function(t){return this.where("_permalink","equals",t).take()},e.generateWidgetId=function(){return Object(u.K)()},e.prototype.id=function(){return this.getAttributeData("_id")},e.prototype.objClass=function(){return this.getAttributeData("_obj_class")},e.prototype.obj=function(){return this},e.prototype.createdAt=function(){return Object(u.H)(this.getAttributeData("_created_at"))},e.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},e.prototype.lastChanged=function(){var t=this.getAttributeData("_last_changed");return t?Object(u.H)(t):null},e.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},e.prototype.version=function(){return this.getAttributeData("_version")},e.prototype.workspaceId=function(){return this.objData.workspaceId()},e.prototype.path=function(){return this.getAttributeData("_path")||null},e.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},e.prototype.parentPath=function(){var t=this.path();return t&&"/"!==t?function(t){var e=t.split("/");if(e.pop(),1===e.length)return"/";return e.join("/")}(t):null},e.prototype.parent=function(){var t=this.parentPath();return t?e.getByPath(t):null},e.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},e.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},e.prototype.isModified=function(){return!!this.modification()},e.prototype.isNew=function(){return"new"===this.modification()},e.prototype.isEdited=function(){return"edited"===this.modification()},e.prototype.isDeleted=function(){return"deleted"===this.modification()},e.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},e.prototype.contentLength=function(){return this.metadata().contentLength()},e.prototype.contentType=function(){return this.metadata().contentType()},e.prototype.contentUrl=function(){var t=this.blob();return t?t.url():""},e.prototype.metadata=function(){var t=this.blob();return t?new V(t.id()):new V},e.prototype.children=function(){var t=this.path();return t?Ft(t).take():[]},e.prototype.hasChildren=function(){var t=this.path();return!!t&&Ft(t).batchSize(0).count()>0},e.prototype.orderedChildren=function(){var t=this.children(),e=this.get("childOrder","referencelist");return d.isArray(e)?d.sortBy(t,function(t){var n=d.invoke(e,"id").indexOf(t.id());return-1===n?e.length:n}):t},e.prototype.backlinks=function(){return e.where("*","linksTo",this).take()},e.prototype.ancestors=function(){var t=this.parentPath();return t?function(t){var e=["/"];if("/"===t)return e;var n=t.split("/").slice(1),r="";return n.forEach(function(t){r=r+"/"+t,e.push(r)}),e}(t).map(function(t){return e.getByPath(t)}):[]},e.prototype.isRestricted=function(){var t=this.restriction();return!!t&&t.length>0},e.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},e.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},e.prototype.unrestrict=function(){this.update({_restriction:null})},e.prototype.update=function(t){var e=this,n=it(t);Object(R.r)(function(){e.persistWidgets(e,n);var t=Ct(n);e.objData.update(t)}),this.startLinkResolution()},e.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},e.prototype.insertWidget=function(t,e){var n,r=function(t){if(function(t){return!!t.before}(t))return t.before.id();return t.after.id()}(e),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,u=i.index,l=e.before?u:u+1,c=o.slice(0,l).concat([t],o.slice(l));s.update(((n={})[a]=[c,["widgetlist"]],n))}},e.prototype.removeWidget=function(t){var e=this.fieldContainingWidget(t);if(e){var n=e.get(),r=d.reject(n,function(e){return e.equals(t)});e.update(r)}},e.prototype.siblingWidget=function(t,e){var n=this._widgetPlacementFor(t.id());if(n)return n.attributeValue[n.index+e]},e.prototype.copyAsync=function(t){return void 0===t&&(t={}),function(t){if(d.difference(d.keys(t),["_path"]).length)throw new u.a('Currently only "_path" copy option is supported.')}(t),this._copyAttributes().then(function(n){var r=d.extend(n,t),i=e.createWithSerializedAttributes(st(),r);return i.objData.finishSaving().then(function(){return i})})},e.prototype.moveToAsync=function(t){return this.moveTo(t),this.finishSaving()},e.prototype.moveTo=function(t){this.update({_path:[t+"/"+this.id()]})},e.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},e.prototype.finishSaving=function(){var t=this;return this.finishLinkResolution().then(function(){return t.objData.finishSaving()})},e.prototype.equals=function(t){return!!It(t,e)&&this.id()===t.id()},e.prototype.widget=function(t){return this.getWidgetAttribute(t,"_obj_class")?bt.build(t,this):null},e.prototype.getWidgetAttribute=function(t,e){return this.objData.getWidgetAttribute(t,e)},e.prototype.widgets=function(){var t=this.getData();if(!Ht(t))return[];var e=t._widget_pool;if(!e)return[];var n=[];return this.collectWidgets(n,t,e,{}),n},e.prototype.fieldContainingWidget=function(t){var e=t.id(),n=this._widgetPlacementFor(e);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},e.prototype.generateWidgetId=function(){for(var t=0;t<10;t++){var n=e.generateWidgetId();if(!this.widget(n))return n}throw new u.g("Could not generate a new unused widget id.")},e.prototype.serializeAttributes=function(){var e=t.prototype.serializeAttributes.call(this,this.getData());return delete e._conflicts,delete e._modification,delete e._created_at,delete e._created_by,delete e._last_changed,delete e._last_changed_by,e},e.prototype.slug=function(){var t,e=this.get("title","string");return"string"!=typeof(t=e)?"":h(t)},e.prototype.getWidgetData=function(t){return this.objData.getWidget(t)},e.prototype.startLinkResolution=function(){Object(a.l)()||zt().startLinkResolutionFor(st(),this.id())},e.prototype.finishLinkResolution=function(){return zt().finishLinkResolutionFor(st(),this.id())},e.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},e.prototype.getAttributeData=function(t){return this.objData.getAttribute(t)},e.prototype.getData=function(){return this.objData.get()},e.prototype.blob=function(){return this.get("blob",["binary"])},e.prototype._copyAttributes=function(){var t=e.generateId(),n=this.serializeAttributes(),r=[];return d.each(n,function(e,i){if("_"!==i[0]){if(function(t){return"binary"===t[0]&&!!t[1]}(e)){var o=e[1],a=new z({idToCopy:o.id}).intoId(t).then(function(t){return{name:i,binary:t}});r.push(a)}}else delete n[i]}),n._id=t,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+t),u.j.all(r).then(function(t){return d.each(t,function(t){var e=t.name,r={id:t.binary.id()};n[e]=["binary",r]}),n})},e.prototype.collectWidgets=function(t,e,n,r){var i=this;d.map(e,function(t,e){if(t&&!Object(u.z)(e)){var n=t;return Object(H.h)(n)?n[1]:void 0}}).forEach(function(e){e&&e.forEach(function(e){if(!r[e]){r[e]=!0;var o=i.widget(e);if(o){t.push(o);var a=n[e];i.collectWidgets(t,a,n,r)}}})})},e.prototype._widgetPlacementFor=function(t){var e=this.getData();if(Ht(e)){var n=Object(a.f)(e,t);if(n){var r,i=Object(u.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}}}},e}(rt),Bt=Mt;function qt(t){return bt.newWithSerializedAttributes(t)}function Ft(t){return Mt.all().and("_parentPath","equals",t)}function zt(){if(!Dt)throw new Error("No Link Handler");return Dt}function Ut(t){Dt=t}function Ht(t){return!!t&&Object(H.f)(t)}var Wt=function(){return(Wt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Vt=function(){function t(t){this.attributes=Wt({},t)}return t.prototype.title=function(){return this.attributes.title||null},t.prototype.query=function(){return this.attributes.query||null},t.prototype.hash=function(){return this.attributes.hash||null},t.prototype.rel=function(){return this.attributes.rel||null},t.prototype.target=function(){return this.attributes.target||null},t.prototype.url=function(){return this.attributes.url||null},t.prototype.objId=function(){return this.attributes.objId||null},t.prototype.obj=function(){var t=this.objId();return t?Bt.get(t):null},t.prototype.queryParameters=function(){return c(this.query()||"")},t.prototype.isExternal=function(){return!!this.url()},t.prototype.isInternal=function(){return!this.isExternal()},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.isExternal()?this.hash()===e.hash()&&this.query()===e.query()&&this.rel()===e.rel()&&this.target()===e.target()&&this.title()===e.title()&&this.url()===e.url():this.objId()===e.objId()&&this.title()===e.title());var n,r},t.prototype.copy=function(e){void 0===e&&(e={});var n=Wt({},this.attributes,e);if(e.objId&&e.url)throw new u.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return e.objId?n.url=null:e.url&&(n.objId=null),new t(n)},t.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},t.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},t}();function Kt(t){var e=t.get(),n=function(t){var e=t.getDiff();if(Object(H.i)(e))return e.content}(t);return n?Object(d.compact)(n.map(function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=Qt(e,o))return{widget:r,modification:"new"};break;case"=":if(r=Qt(e,o))return{widget:r,modification:null};break;case"-":if(r=function(t,e){var n=Bt.getInWorkspace("published",t);if(n)return n.widget(e);return null}(t.obj().id(),o))return{widget:r,modification:"deleted"}}})):e.map(function(t){return{widget:t,modification:null}})}function Qt(t,e){return Object(d.find)(t,function(t){return t.id()===e})||null}n.d(e,"AnyNormalizedSingleTypeInfo",function(){return i.AnyNormalizedSingleTypeInfo}),n.d(e,"AnyNormalizedTypeInfo",function(){return i.AnyNormalizedTypeInfo}),n.d(e,"AnyNormalizedTypeOptions",function(){return i.AnyNormalizedTypeOptions}),n.d(e,"AnyTypeInfo",function(){return i.AnyTypeInfo}),n.d(e,"AnyTypeOptions",function(){return i.AnyTypeOptions}),n.d(e,"NormalizedTypeInfo",function(){return i.NormalizedTypeInfo}),n.d(e,"AttributeType",function(){return o.AttributeType}),n.d(e,"BasicAttributeDict",function(){return o.BasicAttributeDict}),n.d(e,"BasicAttributeValue",function(){return o.BasicAttributeValue}),n.d(e,"BasicAttributeValueForUpdate",function(){return o.BasicAttributeValueForUpdate}),n.d(e,"SystemAttributeValue",function(){return o.SystemAttributeValue}),n.d(e,"BasicField",function(){return s}),n.d(e,"BasicLink",function(){return Vt}),n.d(e,"BasicLinkAttributes",function(){}),n.d(e,"BasicObjFacetValue",function(){return v}),n.d(e,"ObjSearchParams",function(){}),n.d(e,"BasicObjSearch",function(){return _}),n.d(e,"OPERATORS",function(){return y}),n.d(e,"BasicSearchValue",function(){}),n.d(e,"SearchField",function(){}),n.d(e,"SearchOperator",function(){}),n.d(e,"Boost",function(){}),n.d(e,"BasicObj",function(){return Bt}),n.d(e,"MaybeBasicObj",function(){}),n.d(e,"setLinkHandler",function(){return Ut}),n.d(e,"LinkHandler",function(){}),n.d(e,"BasicWidget",function(){return bt}),n.d(e,"TransformationDefinition",function(){}),n.d(e,"Binary",function(){return $}),n.d(e,"BlobMock",function(){}),n.d(e,"FutureBinary",function(){return z}),n.d(e,"FutureBinaryOptions",function(){}),n.d(e,"IdToCopySource",function(){}),n.d(e,"SourceSource",function(){}),n.d(e,"setBinaryHandler",function(){return M}),n.d(e,"BinaryHandler",function(){}),n.d(e,"MetadataCollection",function(){return V}),n.d(e,"BinaryMetadataValue",function(){}),n.d(e,"ObjSearchType",function(){return N}),n.d(e,"LinkType",function(){return P}),n.d(e,"ObjType",function(){return T}),n.d(e,"WidgetType",function(){return A}),n.d(e,"BinaryType",function(){return I}),n.d(e,"QueryParameters",function(){}),n.d(e,"parseQuery",function(){return c}),n.d(e,"queryParametersFromUrl",function(){return f}),n.d(e,"currentWorkspaceId",function(){return st}),n.d(e,"resetCurrentWorkspaceId",function(){return lt}),n.d(e,"setCurrentWorkspaceId",function(){return ut}),n.d(e,"getPlacementModificationInfos",function(){return Kt}),n.d(e,"PlacementModification",function(){})},,function(t,e,n){"use strict";n.r(e);var r=n(98),i=n(0),o=new i.d,a=function(){return o.current()};function s(t){var e={subscribes:[],missing:!1,outdated:!1},n=o.runWith(e,t);return new c(e,n)}function u(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function l(){return void 0!==a()}var c=function(){function t(t,e){this.captureList=t,this.result=e}return t.prototype.forwardToCurrent=function(){var t,e,n=a();n?(t=n,e=this.captureList,t.subscribes=t.subscribes.concat(e.subscribes),t.missing=t.missing||e.missing,t.outdated=t.outdated||e.outdated):this.captureList.missing&&u()},t.prototype.isAllDataLoaded=function(){return!this.captureList.missing},t.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},t.prototype.subscribeLoading=function(t){var e=this.captureList.subscribes.map(function(t){return t()});t.unsubscribe(),t.storeUnsubscribe(function(){e.forEach(function(t){return t()})})},t}(),f=function(){function t(){}return t.prototype.storeUnsubscribe=function(t){this.unsubscribeCallback=t},t.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},t}();var d=n(6);function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.apply(void 0,[t].concat(e));var r=new i.e,o=V(function(){return Object(i.M)(function(){return Object(d.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},t)})},function(t){if(t.allDataUpToDate){o.unsubscribe();var e=t.result;e.errorThrown?r.reject(e.error):r.resolve(e.result)}});return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),v=function(){function t(t){this.container=t}return t.prototype.reader=function(){return this.container.reader().subState("value")},t.prototype.status=function(){return this.getStateKey("status")||"MISSING"},t.prototype.value=function(){return this.getStateKey("value")},t.prototype.error=function(){return this.getStateKey("error")},t.prototype.version=function(){return this.getStateKey("version")},t.prototype.transitionToMissing=function(){this.setState(void 0)},t.prototype.transitionToAvailable=function(t,e){this.setState({status:"AVAILABLE",value:t,version:e})},t.prototype.transitionToError=function(t,e){this.setState({status:"ERROR",error:t,version:e})},t.prototype.setState=function(t){this.container.set(t)},t.prototype.getStateKey=function(t){return this.container.subState(t).get()},t}(),m={},y={};function g(t,e){var n=!0;b(t,1);var r=m[t];r||(m[t]=e);var i=r||e;return i.notifyDataRequired(),function(){n&&(n=!1,b(t,-1)<1&&i.notifyDataNoLongerRequired())}}function b(t,e){var n=(y[t]||0)+e;return y[t]=n,n}function w(t){var e=m[t];e&&e.notifyDataWasSet()}var _,O=(_=function(t,e){var n,r;return(_=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),k=function(t){function e(){return t.call(this,"Data is not yet loaded.",!1)||this}return O(e,t),e}(i.i),x=function(){function t(t,e){this.loadableValue=t,this.stream=e,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return t.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},t.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},t.prototype.notifyDataWasSet=function(){},t.prototype.enqueueUpdate=function(){var t=this;this.isUpdateEnqueued||(Object(i.G)(function(){return t.update()}),this.isUpdateEnqueued=!0)},t.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},t.prototype.ensureStreamIsOpen=function(){var t=this;this.subscription||(this.subscription=this.stream.subscribe(function(e){t.bufferValue(e),t.enqueueUpdate()}))},t.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},t.prototype.bufferValue=function(t){this.bufferedValue=t,this.hasBufferedValue=!0},t.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},t}(),C=0,E=function(){function t(t,e,n){this.value=t,this.loader=e,this.invalidation=n}return t.prototype.notifyDataRequired=function(){this.triggerLoading()},t.prototype.notifyDataNoLongerRequired=function(){},t.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.hasBeenInvalidated=function(){return S(this.value,this.invalidation)},t.prototype.currentVersion=function(){return j(this.invalidation)},t.prototype.triggerLoading=function(){var t=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var e=this.currentVersion(),n=C++,r=function(){return t.currentLoad===n},i=function(e){r()&&Object(d.a)(function(){e(),t.notifyDataWasSet(),a()})},o=[],a=function(){return o.forEach(function(t){return t()})};this.loader({push:function(t){return o.push(t)},isReload:function(){return t.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then(function(n){return i(function(){return t.value.transitionToAvailable(n,e)})},function(n){return i(function(){return t.value.transitionToError(n,e)})}),this.currentLoad=n}},t.prototype.isLoading=function(){return void 0!==this.currentLoad},t}();function S(t,e){return!!e&&("MISSING"!==t.status()&&j(e)!==t.version())}function j(t){if(t){var e=t();if("number"==typeof e&&isNaN(e)){var n="invalidation callback returned unsuitable version "+e;throw new i.g(n)}return e}}var T=function(){function t(t){if(!t.state)throw new i.g("LoadableData needs state");this.value=new v(t.state),this.invalidation=t.invalidation,this.throwNotLoaded=t.throwNotLoaded||!1,this.id=t.state.id(),t.stream?this.loaderProcess=new x(this.value,t.stream):this.loaderProcess=new E(this.value,t.loader,t.invalidation)}return t.prototype.ensureAvailable=function(){var t,e,n=this;if(t=function(){return g(n.id,n.loaderProcess)},(e=a())&&e.subscribes.push(t),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(l()||(g(this.id,this.loaderProcess),u()),function(){var t=a();t&&(t.missing=!0)}(),this.throwNotLoaded)throw new k;return!1},t.prototype.get=function(){if(this.ensureAvailable())return P(this.id,this),this.value.value()},t.prototype.reader=function(){return P(this.id,this),this.value.reader()},t.prototype.set=function(t){this.value.transitionToAvailable(t,this.currentVersion()),w(this.id)},t.prototype.setError=function(t){this.transitionToError(t),w(this.id)},t.prototype.reset=function(){this.value.transitionToMissing()},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},t.prototype.isError=function(){return"ERROR"===this.value.status()},t.prototype.numSubscribers=function(){return t=this.id,y[t]||0;var t},t.prototype.transitionToError=function(t,e){void 0===e&&(e=this.currentVersion()),this.value.transitionToError(t,e)},t.prototype.notifyIfOutdated=function(){var t;S(this.value,this.invalidation)&&(t=a())&&(t.outdated=!0)},t.prototype.currentVersion=function(){return j(this.invalidation)},t}(),A=new i.d;function P(t,e){var n=A.current();n&&(n[t]=e)}function N(t){var e,n={};return{result:A.runWith(n,t),usedData:(e=n,Object.keys(e).map(function(t){return e[t]}))}}function I(t,e){var n=s(function(){return L(t,e)});return l()&&n.forwardToCurrent(),n.result}function L(t,e){var n=B(e);return n.allDataLoaded?n.result:t}var D=n(2),R=n.n(D);function M(t,e){var n=[];if(R.a.each(t,function(t){var r=B(function(){return e(t)});r.success&&n.push(r.result)}),n.length<t.length)throw new k;return n}function B(t){var e=s(function(){return Object(i.M)(t)});e.forwardToCurrent();var n=e.result,r=e.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var q=function(){function t(t){var e=t.name,n=t.state,r=t.loader,o=t.invalidation;this.name=e,this.state=n,this.loader=r,this.invalidation=o,function(t,e){if(F[t])throw new i.g("collection name registered twice: "+t);F[t]=e}(e,this)}return t.prototype.get=function(t,e){var n=this,r=function(t){if("string"==typeof t)return t;return Object(i.s)(t)}(t),o=this.invalidation,a=new T({state:this.state().subState(r),loader:function(r){return n.loader(t,r,e)},invalidation:o?function(){return o(t)}:void 0});return function(t,e){t.affiliation=e}(a,{collectionName:this.name,key:t}),a},t}();var F={};function z(t){Object(d.r)(function(){return t.forEach(U)})}function U(t){var e=t[0],n=t[1],r=t[2];(function(t){var e=F[t];if(!e)throw new i.g("collection with name "+t+" not found");return e})(e).get(n).set(r)}function H(t){return t.map(W)}function W(t){var e=function(t){return t.affiliation}(t);if(!e)throw new i.g("Tried to record a LoadableData without affiliation");return[e.collectionName,e.key,t.get()]}function V(t,e){var n=new f,r=Object(d.k)(function(){return s(function(){return Object(i.M)(t)})},function(t){t.subscribeLoading(n);var r=t.result;if(r.errorThrown){if(!t.isAllDataUpToDate())return;throw r.error}e({result:r.result,allDataLoaded:t.isAllDataLoaded(),allDataUpToDate:t.isAllDataUpToDate()})});return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}n.d(e,"loadAllUntil",function(){return r.default}),n.d(e,"capture",function(){return s}),n.d(e,"CaptureList",function(){}),n.d(e,"CaptureReport",function(){return c}),n.d(e,"isCurrentlyCapturing",function(){return l}),n.d(e,"LoadingSubscriber",function(){return f}),n.d(e,"load",function(){return p}),n.d(e,"LoadableData",function(){return T}),n.d(e,"reportUsedData",function(){return N}),n.d(e,"LoaderApi",function(){}),n.d(e,"LoaderCallback",function(){}),n.d(e,"LoadableState",function(){}),n.d(e,"loadableWithDefault",function(){return I}),n.d(e,"loadWithDefault",function(){return L}),n.d(e,"mapAndLoadParallel",function(){return M}),n.d(e,"runAndCatchErrorsWhileLoading",function(){return B}),n.d(e,"RunResult",function(){}),n.d(e,"NotLoadedError",function(){return k}),n.d(e,"DataRecording",function(){}),n.d(e,"loadRecording",function(){return z}),n.d(e,"generateRecording",function(){return H}),n.d(e,"LoadableCollection",function(){return q}),n.d(e,"LoadableCollectionState",function(){}),n.d(e,"observeAndLoad",function(){return V})},function(t,e,n){"use strict";var r=n(0),i=n(2),o=function(){function t(t,e){this.value=t,this.copy=e,this.valueForReading=new r.d}return t.prototype.read=function(t){var e=this.value;return this.valueForReading.runWith(e,function(){return t(e)})},t.prototype.write=function(t){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),t(this.value)},t}(),a=function(){function t(t){this.notifySubscribers=t,this.subscribersStore=new o([],function(t){return t.slice()})}return t.prototype.create=function(t,e){return void 0===e&&(e=0),new s(this.subscribersStore,t,e)},t.prototype.count=function(){return this.subscribersStore.read(function(t){return t.length})},t.prototype.reset=function(){this.subscribersStore.write(function(t){t.length=0})},t.prototype.notify=function(){var t=this;this.subscribersStore.read(function(e){return t.notifySubscribers(e)})},t}(),s=function(){function t(t,e,n){void 0===n&&(n=0),this.subscriberStore=t,this.listener=e,this.rank=n,this.active=!1}return t.prototype.subscribeChanges=function(t){var e=this;this.stateReference=t,this.active||(this.subscriberStore.write(function(t){var n=Object(i.sortedIndex)(t,e,"rank");t.splice(n,0,e)}),this.active=!0),this.hasChanges()&&this.listener()},t.prototype.unsubscribe=function(){var t=this;this.active&&(this.subscriberStore.write(function(e){var n=e.indexOf(t);n>=0&&e.splice(n,1)}),this.active=!1)},t.prototype.notify=function(){this.active&&this.listener()},t.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},t}(),u=new a(function(t){t.forEach(function(t){t.hasChanges()&&t.notify()})}),l=new a(function(t){t.forEach(function(t){Object(r.G)(function(){t.hasChanges()&&t.notify()})})}),c=function(){function t(){this.listenersStore=new o([],function(t){return t.slice()})}return t.prototype.subscribe=function(t){var e=this,n=!0,r=function(){n&&t()};return this.listenersStore.write(function(t){return t.push(r)}),function(){n=!1,e.listenersStore.write(function(t){var e=t.indexOf(r);t.splice(e,1)})}},t.prototype.count=function(){return this.listenersStore.read(function(t){return t.length})},t.prototype.clear=function(){this.listenersStore.write(function(t){t.length=0})},t.prototype.notify=function(){this.listenersStore.read(function(t){return t.forEach(function(t){return t()})})},t}();function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return null!==t&&"object"===f(t)&&!Array.isArray(t)&&!function(t){var e=Object.getPrototypeOf(t);if(null===e)return!1;return null!==Object.getPrototypeOf(e)}(t)}function p(t,e){return t===e?e:d(e)?function(t,e){var n={},r=!1;void 0===t&&(r=!0);var i=Object.keys(e),o=new Set;t&&Object.keys(t).forEach(function(t){return o.add(t)});o.size!==i.length&&(r=!0);return i.forEach(function(i){o.has(i)||(r=!0);var a=t?t[i]:void 0,s=p(a,e[i]);s!==a&&(r=!0),n[i]=s}),r?Object.freeze(n):t}(d(t)?t:void 0,e):Array.isArray(e)?function(t,e){var n=!1;void 0!==t&&t.length===e.length||(n=!0);var r=e.map(function(e,r){var i=t?t[r]:void 0,o=p(i,e);return o!==i&&(n=!0),o});return n?Object.freeze(r):t}(Array.isArray(t)?t:void 0,e):e}var h,v,m,y,g,b,w,_=(h=function(t,e){var n,r;return(h=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector(function(){return e!==t.untrackedGet()}),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.set=function(t){var e=this.untrackedGet(),n=p(e,t);n!==e&&this.uncheckedSet(n)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new E(this,t)},t.prototype.reader=function(){return this},t.prototype.setSubState=function(t,e){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===e){var o=Object.keys(i);if(1===o.length&&o[0]===t)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===e?delete s[t]:s[t]=e,this.uncheckedSet(Object.freeze(a))}else{var u=Object.freeze(((n={})[t]=e,n));this.uncheckedSet(u)}},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(null!=e)return e[t]},t}(),k=function(){function t(t){this.detector=t}return t.prototype.hasChanges=function(){return this.detector()},t}(),x=function(t){function e(){var e=t.call(this)||this;return e.listeners=new c,e.detectorRecording=new r.d,e.batchUpdates=new r.d,e.version=0,e.frozenContextContainer=new r.d,e}return _(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.withFrozenState=function(t,e){return this.frozenContextContainer.runWith(t,e)},e.prototype.failIfTracking=function(t){if(this.detectorRecording.current())throw new r.g(t)},e.prototype.failIfFrozen=function(t){var e=this.frozenContextContainer.current();if(e){var n=t+" is not permitted inside '"+e.contextName+"'. "+(e.message||"");throw new C(n)}},e.prototype.uncheckedSet=function(t){this.failIfFrozen("Changing state"),this.state=t,this.version++,this.insideBatchUpdate()||this.notifyListeners()},e.prototype.trackStateAccess=function(t){var e=this.trackChanges(t),n=e.detector;return{result:e.result,accessedState:new k(n)}},e.prototype.recordDetector=function(t){var e=this.detectorRecording.current();void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return""},e.prototype.subscribe=function(t){return this.listeners.subscribe(t)},e.prototype.withBatchedUpdates=function(t){var e=this.state;try{this.batchUpdates.runWith(!0,t)}finally{this.insideBatchUpdate()||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.count()},e.prototype.clearListeners=function(){this.listeners.clear()},e.prototype.trackChanges=function(t){var e=this,n=this.version,r=this.recordDetectors(t),o=r.result,a=r.detectors;return{result:o,detector:function(){return e.version!==n&&!!Object(i.find)(a,function(t){return t()})}}},e.prototype.recordDetectors=function(t){var e=[],n=this.detectorRecording.runWith(e,t),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,e),{result:n,detectors:e}},e.prototype.notifyListeners=function(){var t=this;this.withFrozenState({contextName:"state listeners"},function(){t.listeners.notify()})},e.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},e}(O),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i),E=function(t){function e(e,n){var r=t.call(this)||this;return r.parentState=e,r.key=n,r.tree=e.getTree(),r}return _(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.uncheckedSet=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){if(void 0===this.cachedId){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+t}return this.cachedId},e}(O);function S(t){t?(v=void 0,m=t.stateController(),y=t.createAppState(),w=t.sharedCmsState(),g=y.subState("localCms")):(v=new x,m=v,y=A(),w=v.subState("sharedCms"),g=v.subState("localCms"),b=v.subState("ui")),q()}var j,T=0;function A(){if(!v)throw new r.g;var t=(T++).toString();return v.subState("apps").subState(t)}function P(t){return m.withBatchedUpdates(t)}function N(){return m}function I(t){return m.trackStateAccess(t)}function L(t,e){return m.withFrozenState(t,e)}function D(t){return m.failIfFrozen(t)}function R(t){return m.failIfTracking(t)}function M(t){return l.create(t)}function B(t,e){return void 0===e&&(e=0),u.create(t,e)}function q(){j=m.subscribe(function(){u.notify(),l.notify()})}function F(){j&&j(),y.clear()}var z=[],U=function(){return 0!==z.length};function H(t){U()||Object(r.G)(function(){return P(function(){return function t(e){z=[];try{e.forEach(function(t){return t()})}finally{U()&&t(z)}}(z)})}),z.push(t)}function W(t,e){var n,i=!0,o=!1,a=M(s);function s(){if(i){var s=I(function(){return L({contextName:"observe",message:"Extract all side-effects into the listener function"},t)});a.subscribeChanges(s.accessedState);var u=s.result;o&&Object(r.v)(u,n)||(e(u),n=u,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function V(t,e){var n=I(function(){return L({contextName:"observeSync",message:"Use non-sync observe or nextTick"},t)}),i=n.result,o=B(function(){var n=I(t);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(e(a),i=a)});return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function K(t){return new r.j(function(e){var n=W(t,function(t){null!=t&&(n.unsubscribe(),e(t))})})}n.d(e,"d",function(){return A}),n.d(e,"c",function(){return g}),n.d(e,"m",function(){return w}),n.d(e,"o",function(){return I}),n.d(e,"r",function(){return P}),n.d(e,"s",function(){return L}),n.d(e,"g",function(){return D}),n.d(e,"h",function(){return R}),n.d(e,"i",function(){return N}),n.d(e,"p",function(){return b}),n.d(e,"b",function(){return y}),n.d(e,"j",function(){return S}),n.d(e,"n",function(){return F}),n.d(e,"e",function(){return M}),n.d(e,"f",function(){return B}),n.d(e,"a",function(){return H}),n.d(e,"k",function(){return W}),n.d(e,"l",function(){return V}),n.d(e,"q",function(){return K})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(6),a="GET",s="SEND",u=1;function l(t,e){var n=u++,l={};return Object.keys(t).forEach(function(u){var c=t[u];c===a&&(l[u]=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),l=u,c=s.subState(l).subState(Object(r.s)(t));return new i.LoadableData({state:c,stream:e.stream.apply(e,[l].concat(t))}).get()}),c===s&&(l[u]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.send.apply(e,[u].concat(t))})}),l}function c(t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k(function(r){return Object(i.observeAndLoad)(function(){var r=t();if(r){var i=r[e];return{valueFromClient:i.call.apply(i,[r].concat(n))}}},function(t){t.allDataLoaded&&void 0!==t.result&&r.next(t.result.valueFromClient)}).unsubscribe})},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.j(function(r){Object(o.q)(t).then(function(t){var i=t[e];r(i.call.apply(i,[t].concat(n)))})})}}}function f(t,e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=e[t];return new r.k(function(t){return Object(i.observeAndLoad)(function(){return a.call.apply(a,[e].concat(n))},function(e){e.allDataLoaded&&t.next(e.result)}).unsubscribe})},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=e[t];return new r.j(function(t){Object(r.G)(function(){return t(o.call.apply(o,[e].concat(n)))})})}}}function d(t){return{incomingMessages:new r.k(function(e){function n(t){e.next({data:t.data})}return t.addEventListener("message",n),t.start(),function(){t.removeEventListener("message",n)}}),sendMessage:function(e){t.postMessage(e.data,e.transfer)}}}var p=function(){function t(t){this.muxedStream=t,this.openStreams={}}return t.prototype.streamWithId=function(t){var e=this;return new r.k(function(n){e.ensureSubscribed();var r=e.subjectForStreamId(t).subscribe(n);return function(){r.unsubscribe(),e.removeSubjectIfAbandoned(t)}})},t.prototype.removeSubjectIfAbandoned=function(t){0===this.subjectForStreamId(t).subscriberCount()&&(delete this.openStreams[t],this.unsubscribeIfAbandoned())},t.prototype.subjectForStreamId=function(t){var e=this.openStreams[t];if(e)return e;var n=new r.l;return this.openStreams[t]=n,n},t.prototype.ensureSubscribed=function(){var t=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(e){var n=e.streamId,r=t.openStreams[n];r&&r.next(e.data)},complete:function(){return Object.keys(t.openStreams).forEach(function(e){var n=t.openStreams[e];n&&(n.complete(),delete t.openStreams[e])})}}))},t.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},t}();function h(t){return t&&"number"==typeof t.channel&&"string"==typeof t.verb}function v(t){return"string"==typeof t.method&&Array.isArray(t.params)}function m(t){return"CLOSE"===t.verb}function y(t){return"RESPOND"===t.verb}function g(t){return"ERROR"===t.verb}function b(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var w,_=(w=function(t,e){return(w=Object.setPrototypeOf||b({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function O(t){return new k(t)}var k=function(){function t(t){this.portLink=t,this.channelCounter=1,this.incomingChannels=new p(this.portLink.incomingMessages.map(function(t){return t.data}).filter(h).map(function(t){return{streamId:t.channel,data:t}}))}return t.prototype.stream=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k(function(r){var i=e.getNextChannelId();e.postMessage({channel:i,verb:"OPEN",method:t,params:n});var o=e.incomingChannels.streamWithId(i).subscribe(function(t){y(t)&&r.next(t.data)});return function(){e.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}})},t.prototype.send=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.getNextChannelId();return this.postMessage({channel:r,verb:"SEND",method:t,params:e}),this.incomingChannels.streamWithId(r).filter(j).takeOne().toPromise().then(function(t){if(!t)throw new C;if(g(t))throw new x;return t.data})},t.prototype.postMessage=function(t){this.portLink.sendMessage({data:t,transfer:E(t)})},t.prototype.getNextChannelId=function(){return this.channelCounter++},t}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i);function E(t){if("SEND"===t.verb)return t.params.filter(S)}function S(t){return b(t,MessagePort)}function j(t){return y(t)||g(t)}function T(t,e,n){return t[n.methodName]===e}function A(t,e,n){new P(t,e,n).start()}var P=function(){function t(t,e,n){this.portLink=t,this.adapterConnection=e,this.description=n,this.incomingMessages=t.incomingMessages.map(function(t){return t.data}).filter(h),this.incomingChannels=new p(this.incomingMessages.map(function(t){return{streamId:t.channel,data:t}}))}return t.prototype.start=function(){var t=this;this.incomingMessages.subscribe(function(e){!function(t){return"OPEN"===t.verb&&v(t)}(e)?function(t){return"SEND"===t.verb&&v(t)}(e)&&t.handleSendMessage(e):t.handleOpenStreamMessage(e)})},t.prototype.handleOpenStreamMessage=function(t){var e,n=this,r=N(t);if(T(this.description,a,r)){var i=(e=this.adapterConnection).stream.apply(e,[r.methodName].concat(r.params)),o=t.channel,s=i.subscribe(function(t){n.postMessage({verb:"RESPOND",data:t,channel:o})});this.incomingChannels.streamWithId(o).filter(m).takeOne().toPromise().then(function(){s.unsubscribe()})}},t.prototype.handleSendMessage=function(t){var e,n=this,i=N(t);T(this.description,s,i)&&(e=this.adapterConnection).send.apply(e,[i.methodName].concat(i.params)).then(function(e){return n.postMessage({verb:"RESPOND",data:e,channel:t.channel})},function(e){n.postMessage({verb:"ERROR",channel:t.channel}),Object(r.Q)(e)})},t.prototype.postMessage=function(t){this.portLink.sendMessage({data:t})},t}();function N(t){return{methodName:t.method,params:t.params}}n.d(e,"c",function(){return l}),n.d(e,"f",function(){return c}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return a}),n.d(e,"d",function(){return f}),n.d(e,"g",function(){return d}),n.d(e,"e",function(){return O}),n.d(e,"h",function(){return A})},,function(t,e,n){"use strict";var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",function(){return T}),n.d(r,"perform",function(){return A}),n.d(r,"reset",function(){return P}),n.d(r,"currentState",function(){return I});var i,o="&scrivito.authFailedCount=";function a(){i=0}var s={init:function(t){a();var e=t.location,n=e.hash,r=n.indexOf(o);if(!(r<0)){var s=n.substr(r+o.length,3),u=n.substring(0,r);"#"===u&&(u="");var l=e.href.toString().replace(n,u);i=parseInt(s,10)||0,t.history.replaceState({},"",l)}},augmentedRedirectUrl:function(t){var e=t.toString();return t.hash||(e+="#"),""+e+o+(i+1)},reset:a,currentFailureCount:function(){return i}},u=n(0),l=n(2),c=n(13);var f,d,p=(f=function(t,e){var n,r;return(f=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.httpCode=n,i.backendCode=r,i}return p(e,t),e.for=function(t,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new b(t,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new w(t,n,r):new e(t,n,r)},e}(u.i),v=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.i),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.i),g=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r)||this;return o.details=i||{},o}return p(e,t),e}(h),b=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),w=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),_=!1,O=0;function k(){return O>0}function x(t,e,n){var r=n.params,i=n.authorization,o=n.forceVerification;return _?u.j.resolve(new XMLHttpRequest):(O+=1,new u.j(function(n,a){var s=function(t,e,n,r){var i=new XMLHttpRequest;function o(t){!function(t,e){O-=1,e(t)}(new y(t),r)}return i.open("POST"===t?"POST":"PUT",e),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(t,e,n){O-=1;var r=t.status;if(!r||!Object(l.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?t.statusText:t.responseText);n(new y(i))}e(t)}(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}(t,e,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))}))}function C(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}d={},window._scrivitoRegisterVerificator=function(t,e){d[t].resolve(e)};var E,S,j=function(){var t=function(e,n){return(t=Object.setPrototypeOf||C({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T="client_verification_required";!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}j(e,t)}(g);function A(t){return t(N()).catch(function e(n){if(!function(t){return C(t,g)&&t.backendCode===T}(n))throw n;return function(t){if(!E){var e=t.verificator,n=t.data,r=(i=e.id,o=e.url,a=d[i],a||(a=new u.e,d[i]=a,Object(u.E)(o)),a.promise).then(function(t){return new u.j(function(e){t(n,function(t){e((S=t).authorization)})})});E={challenge:{verificator:e,data:n},promise:Object(u.J)(r,function(){E=void 0})}}var i,o,a;return E.promise}(n.details).then(t).catch(e)})}function P(){E=void 0,S=void 0}function N(){if(S){if(!(S.expiresAfter<new Date))return S.authorization;S=void 0}}function I(){var t=N();if(t)return"Authorization: "+t;if(E){var e=E.challenge;return"Pending computation: "+e.verificator.id+" with "+e.data}return null}var L,D,R=n(14);function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var B=function(){function t(){this.initDeferred=new u.e,this.authHeaderValueProvider=r}return t.prototype.init=function(t,e,n){e&&(this.tenant=e,this.endpoint=t,this.url=c(t+"/tenants/"+e+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},t.prototype.get=function(t,e){return this.perform("GET",t,e)},t.prototype.put=function(t,e){return this.perform("PUT",t,e)},t.prototype.post=function(t,e){return this.perform("POST",t,e)},t.prototype.delete=function(t,e){return this.perform("DELETE",t,e)},t.prototype.requestBuiltInUserSession=function(t){var e=this;return this.ensureInitialized().then(function(){return e.ajax("PUT","sessions/"+t)}).then(function(t){return s.reset(),t})},t.prototype.requestVisitorSession=function(t,e){var n=this;return this.ensureInitialized().then(function(){return n.ajax("PUT","sessions/"+t,void 0,"id_token "+e)})},t.prototype.enableForceVerification=function(){this.forceVerification=!0},t.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},t.prototype.ensureInitialized=function(){return this.initDeferred.promise},t.prototype.perform=function(t,e,n){var r=this;return this.ensureInitialized().then(function(){return r.send(t,e,n).then(function(t){return function(t){return!!t&&!!t.task&&1===Object(l.size)(t)}(t)?r.handleTask(t.task):t})})},t.prototype.send=function(t,e,n){var r=this;return this.authHeaderValueProvider.perform(function(i){return r.ajax(t,e,n,i)})},t.prototype.ajax=function(t,e,n,r){var i=this.url,o=this.forceVerification,a={params:{path:e,verb:t,params:n||{}},authorization:r,forceVerification:o};function s(){return function t(e,n){void 0===n&&(n=0);if(D)return new u.j(function(t){return t(e())});return e().then(function(r){if(429!==r.status)return r;if(L&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,q(n));return Object(u.T)(o).then(function(){return t(e,n+1)})})}(function(){return x(t,i,a)}).then(F)}return"POST"===t?s():function t(e,n){void 0===n&&(n=0);if(D)return new u.j(function(t){return t(e())});return e().catch(function(r){if(o=r,null!=(a=y)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a){if(L&&n>5)throw r;var i=q(n);return Object(u.T)(i).then(function(){return t(e,n+1)})}var o,a;throw r})}(s)},t.prototype.handleTask=function(t){var e=this;switch(t.status){case"success":return t.result;case"error":throw h.for(t.message,412,t.code);case"open":return Object(u.S)(2).then(function(){return e.get("tasks/"+t.id).then(function(t){return e.handleTask(t)})});default:throw new y("Invalid task response (unknown status)")}},t}();function q(t){return 500*Math.pow(2,Math.min(t,16))}function F(t){var e,n=t.status;try{e=JSON.parse(t.responseText)}catch(e){throw new y(t.responseText)}if(n>=200&&n<300)return e;if("auth_missing"===e.code){var r=e.details;if(r&&z(r)){var i=r.visit;if("string"==typeof i){var o=function(t){var e=s.augmentedRedirectUrl(Object(R.f)());return t.replace("retry=RETRY","retry="+s.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(e))}(i);throw Object(R.i)(o),new m("Insufficient authorization - please visit "+o)}}}throw function(t,e,n){if(401===t){var r=H(e);return new g(r.error,t,r.code,r.details)}if(403===t){var r=H(e),i=r.code;if(!i||!U(i))throw new y("Authentication failure response no string value for code");return new v(r.error,t,i)}if(e.error&&"4"===t.toString()[0]){var r=H(e);return h.for(r.error,t,r.code)}if(500===t)return U(e.error)?new y(e.error):new y(n);return new y(n)}(n,e,t.responseText)}function z(t){return"object"===M(t)&&!Array.isArray(t)}function U(t){return"string"==typeof t}function H(t){var e=t.error;if("string"!=typeof e)throw new y("Malformed error response (key error is not a string)");var n=t.code;if(void 0!==n&&!U(n))throw new y("Malformed error response (optional key code is not a string)");var r=t.details;if(void 0!==r&&!z(r))throw new y("Malformed error response (optional key details is not an object");return{code:n,error:e,details:r}}var W=new B;var V=new u.b(function(t){return W.get("blobs/mget",{blobs:t}).then(function(e){return e.results.map(function(e,n){return function(t,e){var n=e.public_access.get;if(!n.url)throw new u.g('Missing public access URL for binary "'+t+'"');var r={public_access:{get:{url:n.url}}},i=e.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(t[n].id,e)})})});var K={};function Q(t,e){return function(t){var e=K[t];e||(e=function(t){return new u.b(function(e){return W.get("workspaces/"+t+"/objs/mget",{ids:e,include_deleted:!0}).then(function(t){return t.results})},{batchSize:17})}(t),K[t]=e);return e}(t).retrieve(e).then(function(t){return t||{_deleted:e}})}var $=function(){return($=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function G(t,e){var n=$({consistent:!0},e);return W.get("workspaces/"+t+"/objs/search",n).then(function(t){var e=function(t){var e={results:t.results,total:t.total},n=t.continuation;void 0!==n&&(e.continuation=n);var r=t.objs;void 0!==r&&(e.objs=r);return e}(t);return{results:e.results.map(function(t){return t.id}),continuation:e.continuation,total:e.total,objs:e.objs}})}function Y(t){return!!t&&"widgetlist_diff"===t.format}var Z={retrieveObj:function(t,e){return Q(t,e)},retrieveObjQuery:function(t,e){return G(t,e)},retrieveFacetQuery:function(t,e){return function(t,e){return W.get("workspaces/"+t+"/objs/search",e).then(function(t){return{facets:t.facets.map(function(t){return t.map(function(t){return{total:t.total,value:t.value,results:t.results}})})}})}(t,e)},retrieveBinaryMetadata:function(t){return function(t){return W.get("blobs/"+encodeURIComponent(t||"")+"/meta_data")}(t)},retrieveBinaryUrls:function(t,e){return function(t,e){var n={id:t};return e&&(n.transformation=e),V.retrieve(n)}(t,e)},retrieveObjFieldDiffs:function(t,e){return function(t,e){return W.get("workspaces/"+t+"/objs/"+e+"/diff").then(function(t){return t})}(t,e)}};function X(t){Z=t}function J(t){return!t._deleted}function tt(t){return"widgetlist"===t[0]}n.d(e,"a",function(){return s}),n.d(e,"d",function(){return W}),n.d(e,"e",function(){return Z}),n.d(e,"j",function(){return X}),n.d(e,"b",function(){return m}),n.d(e,"c",function(){return g}),n.d(e,"g",function(){return k}),n.d(e,"f",function(){return J}),n.d(e,"h",function(){return tt}),n.d(e,"i",function(){return Y})},function(t,e,n){"use strict";var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n},s=function(){function t(t,e){var n={};e._scrivitoPrivateSchema&&r.extend(n,e._scrivitoPrivateSchema.attributes),t.attributes&&r.each(t.attributes,function(t,e){n[e]=function(t){if("string"==typeof t)return[t];return[t[0],l(t[1])]}(t)});var i=t.onlyInside;this.definition=o({},t,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return t.forInstance=function(t){return this.forClass(t.constructor)},t.forClass=function(t){return t._scrivitoPrivateSchema},t.basicFieldFor=function(e,n){var r=t.forInstance(e);if(r){var o=r.attributes[n];if(o)return new i.BasicField(e._scrivitoPrivateContent,n,o)}},Object.defineProperty(t.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),t.prototype.isBinary=function(){var t=this.definition.attributes.blob;return!!t&&"binary"===t[0]},t}();function u(t){return!(!t||!t._scrivitoPrivateSchema)}function l(t){if(!("only"in t))return t;var e=t.only,n=a(t,["only"]);return o({},n,{validClasses:"string"==typeof e?[e]:e})}var c=n(0);function f(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function d(t,e){if(Object(r.isArray)(e))return Object(r.map)(e,function(e){return d(t,e)});if(f(e,i.BasicObj))return p(e,t.objClassFor(e.objClass()));if(f(e,i.BasicWidget)){var n=e.objClass();return p(e,t.widgetClassFor(n))}if(f(e,i.BasicLink)){var o=Object.create(t.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=e,o}return e}function p(t,e){var n=Object.create(e.prototype);return n._scrivitoPrivateContent=t,n}function h(t){return Object(r.isArray)(t)?Object(r.map)(t,h):t&&t._scrivitoPrivateContent?t._scrivitoPrivateContent:t}function v(t,e,n){return Object(r.mapObject)(t,function(t,r){if(Object(c.z)(r))return[t];var i=e.attributes[r];if(!i)throw new c.a('Attribute "'.concat(r,'" is not defined for CMS object ')+'class "'.concat(n,'".'));return[h(t),i]})}function m(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var g=function(){function t(e){m(this,t),this._registry=e}var e,n,r;return e=t,(n=[{key:"getObj",value:function(t,e){var n=i.BasicObj.get(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"getObjIncludingDeleted",value:function(t,e){var n=i.BasicObj.getIncludingDeleted(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"read",value:function(t,e){var n=s.basicFieldFor(t,e);if(!n)return null;var r=n.get();return d(this._registry,r)}},{key:"update",value:function(t,e){var n,r=this._registry.objClassNameFor(t.constructor);if(!r)throw n=t.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new c.a('Updating is not supported on the base class "'.concat(n,'".'));if(e.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=v(e,s.forInstance(t),r);t._scrivitoPrivateContent.update(i)}},{key:"wrapInAppClass",value:function(t){return d(this._registry,t)}},{key:"_checkObjClassAndWrapInAppClass",value:function(t,e){if(!e)return null;var n=this._registry.objClassNameFor(t);if(n&&n!==e.objClass())throw new c.h('Obj with id "'.concat(e.id(),'" is not of type "').concat(n,'".'));return this.wrapInAppClass(e)}}])&&y(e.prototype,n),r&&y(e,r),t}();function b(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t){return function(){function e(){b(this,e)}var n,r,i;return n=e,(r=[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");if(Object(c.z)(e))throw new c.a('Attribute name "'.concat(e,'" is not a valid custom attribute name.'));return t.read(this,e)}},{key:"update",value:function(e){t.update(this,e)}}])&&w(n.prototype,r),i&&w(n,i),e}()}function O(t,e,n,r){var i={};return Object.keys(n.definition.attributes).forEach(function(n){if(!Object.prototype.hasOwnProperty.call(t,n)){var o=e.initialContentFor(r,n);void 0!==o&&(i[n]=o)}}),i}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function E(t,e){return!e||"object"!==k(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function T(t){var e=new g(t);function n(e,n){var r=new t.ObjSearch;return e&&r.and("_objClass","equals",e),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(e){return d(t,e)}return function(a){function u(){return x(this,u),E(this,S(u).apply(this,arguments))}var l,f,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(u,_(e)),l=u,d=[{key:"get",value:function(t){return e.getObj(this,t)}},{key:"getIncludingDeleted",value:function(t){return e.getObjIncludingDeleted(this,t)}},{key:"getByPath",value:function(t){return o(i.BasicObj.getByPath(t))}},{key:"getByPermalink",value:function(t){return o(i.BasicObj.getByPermalink(t))}},{key:"all",value:function(){return n(t.objClassNameFor(this),1e3)}},{key:"root",value:function(){return o(i.BasicObj.root())}},{key:"where",value:function(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return n(t.objClassNameFor(this)).and(e,r,i,o)}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(t,this._appClassName());var e=this._prepareAttributesForCreate(t);return o(i.BasicObj.create(e))}},{key:"createFromFile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){if(!c.f.is(t)){if(c.c.is(t))throw new c.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new c.a('Creating CMS objects from file is only available with instances of "File"')}}(t),function(t,e,n){if(A(t,e),Object.prototype.hasOwnProperty.call(t,"blob"))throw new c.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new c.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(e,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(e);return i.BasicObj.createFromFile(t,n).then(function(t){return o(t)})}},{key:"_prepareAttributesForCreate",value:function(e){var n=this._schema(),i=this._appClassName(),o=O(e,t,n,i),a={_objClass:i};return v(Object(r.extend)({},e,o,a),n,i)}},{key:"_appClassName",value:function(){return t.objClassNameFor(this)}},{key:"_schema",value:function(){return s.forClass(this)}}],(f=[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return o(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return o(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return o(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return o(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return o(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var t=s.forInstance(this);return!!t&&t.isBinary()}},{key:"isRestricted",value:function(){return this._scrivitoPrivateContent.isRestricted()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection}},{key:"restrict",value:function(){this._scrivitoPrivateContent.restrict()}},{key:"unrestrict",value:function(){this._scrivitoPrivateContent.unrestrict()}},{key:"widget",value:function(t){return o(this._scrivitoPrivateContent.widget(t))}},{key:"widgets",value:function(){return o(this._scrivitoPrivateContent.widgets())}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}}])&&C(l.prototype,f),d&&C(l,d),u}()}function A(t,e){if(!e)throw new c.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(t.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new c.a('Invalid attribute "_objClass". '+'"'.concat(t._objClass,'.create" will automatically set the CMS object class ')+"correctly.")}var P=function(){function t(t,e){this._registry=t,this._basicObjFacetValue=e}return t.prototype.name=function(){return this._basicObjFacetValue.name()},t.prototype.count=function(){return this._basicObjFacetValue.count()},t.prototype.includedObjs=function(){var t=this._basicObjFacetValue.includedObjs();return d(this._registry,t)},t}();function N(t){var e=function(){function e(){this._scrivitoPrivateContent=new i.BasicObjSearch}return e.prototype.and=function(t,n,r,i){if(u=t,null!=(l=e)&&"undefined"!=typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](u):u instanceof l){var o=t;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}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 a=I(r),s=t;this._scrivitoPrivateContent.and(s,n,a,i)}var u,l;return this},e.prototype.andNot=function(t,e,n){var r=I(n);return this._scrivitoPrivateContent.andNot(t,e,r),this},e.prototype.facet=function(e,n){return this._scrivitoPrivateContent.facet(e,n).map(function(e){return new P(t,e)})},e.prototype.first=function(){var e=this._scrivitoPrivateContent.first();return e?d(t,e):null},e.prototype.take=function(e){return this._scrivitoPrivateContent.take(e).map(function(e){return d(t,e)})},e.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map(function(e){return d(t,e)})},e.prototype.offset=function(t){return this._scrivitoPrivateContent.offset(t),this},e.prototype.order=function(t,e){return this._scrivitoPrivateContent.order(t,e),this},e.prototype.count=function(){return this._scrivitoPrivateContent.count()},e}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)e.prototype[n]=function(){var e=this._scrivitoPrivateContent.iterator();return{next:function(){var n=e.next();return n.done?{done:n.done}:{done:n.done,value:d(t,n.value)}}}}}return e}function I(t){return r.isArray(t)?t.map(function(t){return h(t)}):h(t)}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function F(t){var e=new g(t);return function(n){function o(){var e,n,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,o),n=this,e=!(r=M(o).call(this))||"object"!==L(r)&&"function"!=typeof r?B(n):r;var u=s.forInstance(B(e)),l=t.objClassNameFor(e.constructor),c=e._prepareAttributesForConstructor(a,u,l),f=new i.BasicWidget(c);return f.onDidPersist(function(e){var n=d(t,e),r=O(c,t,u,l);n.update(r)}),e._scrivitoPrivateContent=f,e}var a,u,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,_(e)),a=o,(u=[{key:"obj",value:function(){var e=this._scrivitoPrivateContent.obj();return d(t,e)}},{key:"copy",value:function(){var e=t.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),e)}},{key:"destroy",value:function(){this._scrivitoPrivateContent.remove()}},{key:"_prepareAttributesForConstructor",value:function(t,e,n){!function(t,e){if(!t)throw new c.a("Creating widgets is not supported for the class Widget or abstract classes.");if(e.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new c.a('Invalid attribute "_objClass". '+'"new '.concat(e._objClass,'" will automatically set the CMS object class correctly.'))}(n,t);var i={_objClass:n};return v(Object(r.extend)({},t,i),e,n)}}])&&R(a.prototype,u),l&&R(a,l),o}()}var z=["hash","obj","query","rel","target","title","url"];function U(t){return function(t){var e=r.without.apply(r,[r.keys(t)].concat(z));if(!r.isEmpty(e))throw new c.a("Unexpected attributes "+Object(c.I)(e)+". Available attributes: "+Object(c.I)(z))}(t),r.has(t,"obj")?r.extend({},t,{objId:H(t.obj)}):t}function H(t){return t?h(t).id():null}n(117);var W=function(){function t(){var t;this.mapping={},this.defaultClassForObjs=T(this),this.defaultClassForWidgets=F(this),this.defaultClassForLinks=(t=this,function(){function e(t){var e=U(t);this._scrivitoPrivateContent=new i.BasicLink(e)}return e.prototype.title=function(){return this._scrivitoPrivateContent.title()},e.prototype.query=function(){return this._scrivitoPrivateContent.query()},e.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},e.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},e.prototype.target=function(){return this._scrivitoPrivateContent.target()},e.prototype.url=function(){return this._scrivitoPrivateContent.url()},e.prototype.obj=function(){var e=this._scrivitoPrivateContent.obj();return e?d(t,e):null},e.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},e.prototype.copy=function(e){var n=this._scrivitoPrivateContent.copy(U(e)),r=Object.create(t.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},e.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},e.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},e}()),this.ObjSearch=N(this)}return t.prototype.register=function(t,e){this.mapping[t]=e},t.prototype.getClass=function(t){return this.mapping[t]||null},t.prototype.allObjClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForObjs.isPrototypeOf(e)})},t.prototype.allWidgetClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForWidgets.isPrototypeOf(e)})},t.prototype.objClassFor=function(t){return this.appClassFor(t,this.defaultClassForObjs)},t.prototype.widgetClassFor=function(t){return this.appClassFor(t,this.defaultClassForWidgets)},t.prototype.objClassNameFor=function(t){return r.findKey(this.mapping,function(e){return e===t})},t.prototype.setInitialContentFor=function(t){this.initialContentForFunction=t},t.prototype.initialContentFor=function(t,e){if(this.initialContentForFunction)return this.initialContentForFunction(t,e)},t.prototype.appClassFor=function(t,e){var n=this.getClass(t);return n&&e.isPrototypeOf(n)?n:e},t}();function V(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var K,Q=(K=function(t,e){return(K=Object.setPrototypeOf||V({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function $(t,e){if(e.extend&&!X(e.extend,t.defaultClassForObjs))throw new c.a('Invalid value for "extend": not a Scrivito Obj class');var n=e.extend||t.defaultClassForObjs,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function G(t,e){if(e.extend&&!X(e.extend,t.defaultClassForWidgets))throw new c.a('Invalid value for "extend": not a Scrivito Widget class');var n=e.extend||t.defaultClassForWidgets,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function Y(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return $(t,i)}(t,e,n);return t.register(e,i),i}function Z(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return G(t,i)}(t,e,n);return t.register(e,i),i}function X(t,e){return!!t&&(t===e||V(t.prototype,e))}var J=c.O.refinement(c.O.Function,u,"ObjClass"),tt=c.O.interface({attributes:c.O.maybe(c.O.dict(c.O.refinement(c.O.String,function(t){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(t)},"String (alphanumeric, starting with a lower-case character)"),c.O.union([c.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),c.O.tuple([c.O.enums.of(["enum","multienum"]),c.O.interface({values:c.O.list(c.O.String)})]),c.O.tuple([c.O.enums.of(["reference","referencelist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})]),c.O.tuple([c.O.enums.of(["widgetlist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})])]),"Attributes Specification")),extend:c.O.maybe(J)}),et=c.O.refinement(c.O.Function,u,"WidgetClass"),nt=c.O.interface({attributes:tt.meta.props.attributes,extend:c.O.maybe(et),onlyInside:c.O.maybe(c.O.union([c.O.String,c.O.Array]))}),rt=Object(c.p)("createObjClass",[["options",tt]],{docPermalink:"js-sdk/createObjClass"}),it=Object(c.p)("createWidgetClass",[["options",nt]],{docPermalink:"js-sdk/createWidgetClass"}),ot=c.O.union([tt,J]),at=Object(c.p)("provideObjClass",[["name",c.O.String],["objClassOrDefinition",ot]],{docPermalink:"js-sdk/provideObjClass"}),st=c.O.union([nt,et]),ut=Object(c.p)("provideWidgetClass",[["name",c.O.String],["widgetClassOrDefinition",st]],{docPermalink:"js-sdk/provideWidgetClass"});var lt=function(){function t(){this._registry=new W,this.appModelAccessor=new g(this._registry)}return t.init=function(e){var n=new t;return e.Obj=n.Obj,e.Widget=n.Widget,e.Link=n.Link,e.ObjSearch=n.ObjSearch,e.appModelAccessor=n.appModelAccessor,e.provideObjClass=function(t,e){return n.provideObjClass(t,e)},e.provideWidgetClass=function(t,e){return n.provideWidgetClass(t,e)},e.createObjClass=function(t){return n.createObjClass(t)},e.createWidgetClass=function(t){return n.createWidgetClass(t)},e.getClass=function(t){return n.getClass(t)},e.allObjClasses=function(){return n.allObjClasses()},e.allWidgetClasses=function(){return n.allWidgetClasses()},e._privateRealm=n,n},Object.defineProperty(t.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),t.prototype.provideObjClass=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return at.apply(void 0,[t,e].concat(n)),Y(this._registry,t,e)},t.prototype.provideWidgetClass=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ut.apply(void 0,[t,e].concat(n)),Z(this._registry,t,e)},t.prototype.createObjClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return rt.apply(void 0,[t].concat(e)),$(this._registry,t)},t.prototype.createWidgetClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return it.apply(void 0,[t].concat(e)),G(this._registry,t)},t.prototype.getClass=function(t){return this._registry.getClass(t)},t.prototype.allObjClasses=function(){return this._registry.allObjClasses()},t.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},t.prototype.setInitialContentFor=function(t){this._registry.setInitialContentFor(t)},t}();n.d(e,"f",function(){return d}),n.d(e,"e",function(){return h}),n.d(e,"d",function(){return v}),n.d(e,"a",function(){return P}),n.d(e,"b",function(){return s});e.c=lt},function(t,e,n){"use strict";var r;function i(t){return r?r.getContentStateId(t):""}function o(t){r=t}var a=n(2),s=n.n(a),u=n(5),l=n(6),c=n(0);var f,d=(f=function(t,e){var n,r;return(f=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=!1;function h(){return p}function v(){p=!0}function m(t){if(p)throw new y(t)}var y=function(t){function e(e){return t.call(this,e+" is not supported when using the in-memory tenant")||this}return d(e,t),e}(c.i),g=n(9),b=new u.LoadableCollection({name:"facetquery",state:function(){return l.c.subState("facetQuery")},loader:function(t){var e=t[0],n=t[1];return g.e.retrieveFacetQuery(e,n)},invalidation:function(t){var e=t[0];t[1];return Object(u.loadableWithDefault)(void 0,function(){return i(e)})||""}}),w=function(){function t(t,e,n,r){this._requestParams=_(e,n,r),this._loadableData=b.get([t,this._requestParams])}return t.store=function(t,e,n,r,i){var o=_(e,n,r);b.get([t,o]).set(i)},t.prototype.result=function(){m("Search API");var t=this._loadableData.get();return t?t.facets[0].map(function(t){return{name:t.value,count:t.total,includedObjIds:t.results.map(function(t){return t.id})}}):[]},t}();function _(t,e,n){var r={facets:[{attribute:t,limit:e.limit||10,include_objs:e.includeObjs||0}],size:0};return Object(a.isEmpty)(n)||(r.query=n),r}function O(t,e){var n=k(t,e);return n||(a.find(t._widget_pool,function(t,r){if(t&&(n=k(t,e)))return n.parentWidgetId=r,!0}),n)}function k(t,e){var n;return a.find(t,function(t,r){if(t&&!Object(c.z)(r)){var i=t;if(Object(g.h)(i)){var o=i[1];if(o){var a=o.indexOf(e);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}}),n}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(t,e){if(!t)return e;if(!e)return null;var n={};return S(t,e,function(r,i,o){"_widget_pool"===r?n._widget_pool=function(t,e){if(!e||s.a.isEmpty(e))return t;var n={};return S(t,e,function(t,r,i){Object.prototype.hasOwnProperty.call(e,t)?i&&!r?n[t]=i:i&&(n[t]=C(r,i)):n[t]=r}),n}(i||{},o):Object.prototype.hasOwnProperty.call(e,r)?o&&(n[r]=o):n[r]=t[r]}),n}function E(t,e){if(!t)return e;if(!e)return null;var n={};return S(t,e,function(t,e,r){if("_widget_pool"===t){var i=function(t,e){if(t===e)return;if(!t)return e;var n={};return S(t,e||{},function(t,e,r){var i=T(e,r,function(){var t=E(e,r);if(!s.a.isEmpty(t))return t});void 0!==i&&(n[t]=i)}),n}(e,r);s.a.isEmpty(i)||(n._widget_pool=i)}else{var o=T(e,r,function(){if(!s.a.isEqual(e,r))return r});void 0!==o&&(n[t]=o)}}),n}function S(t,e,n){s.a.union(s.a.keys(t),s.a.keys(e)).forEach(function(r){return n(r,j(t[r]),j(e[r]))})}function j(t){if(s.a.isArray(t)){var e=x(t,2),n=e[0],r=e[1];return"binary"===n&&r?[n,s.a.omit(r,"url")]:t}return t}function T(t,e,n){return!t&&e?e:t&&!e?null:t&&e?n():void 0}function A(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var N=function(){function t(e,n){var r=this;A(this,t),this._workspaceId=e,this._objId=n,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(c.P)(function(){return r._performReplication()},1e3)}var e,n,r;return e=t,(n=[{key:"start",value:function(){var t=this;g.e.retrieveObj(this._workspaceId,this._objId).then(function(e){Object(l.a)(function(){t.notifyBackendState(e)})})}},{key:"notifyLocalState",value:function(t){if(!R.isDisabled()){if(void 0===this._backendState)throw new c.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new c.g("Can not update a fully deleted obj.");this._localState=t,this._startReplication()}}},{key:"notifyBackendState",value:function(t){if(void 0===this._backendState)return this._backendState=t,void this._updateLocalState(t);if(D(t,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=t;else{if(t._deleted)this._updateLocalState(null);else{var e=I(this._backendState,t);this._updateLocalState(L(this.localState,e))}this._backendState=t}}},{key:"finishSaving",value:function(){var t;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return c.j.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return c.j.reject()})}},{key:"_startReplication",value:function(){var t=this;s.a.isEmpty(I(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new c.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),R.writeStarted(this._currentRequestDeferred.promise),Object(c.G)(function(){return t._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var t=this,e=this._localState,n=I(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(n){t._handleBackendUpdate(e,n),t._currentRequestDeferred.resolve(t._objId),t._currentRequestDeferred=null,t._replicationActive=!1,t._startReplication()},function(e){t._currentRequestDeferred.reject(e),t._currentRequestDeferred=null,t._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if(s.a.isEmpty(t))return c.j.resolve(this._backendState);var e="workspaces/".concat(this._workspaceId,"/objs/").concat(this._objId);return g.d.put(e,{obj:t})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new c.e}},{key:"_handleBackendUpdate",value:function(t,e){var n=I(t,this._localState);this._backendState=function(t,e){if(D(t,e)>0)return t;return e}(e,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(L(this._backendState,n))}},{key:"_updateLocalState",value:function(t){this._localState=t,U(this._workspaceId,this._objId,this._localState)}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}])&&P(e.prototype,n),r&&P(e,r),t}();function I(t,e){return E(t,e)}function L(t,e){return C(t,e)}function D(t,e){return t?e?function(t,e){if(t>e)return 1;if(e>t)return-1;return 0}(t._version,e._version):1:-1}var R=new(function(){function t(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return t.prototype.get=function(t,e){return this.replicationCache[t]||(this.replicationCache[t]={}),this.replicationCache[t][e]||(this.replicationCache[t][e]=new N(t,e)),this.replicationCache[t][e]},t.prototype.subscribeWrites=function(t){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=t,this.subscriptionToken},t.prototype.unsubscribeWrites=function(t){delete this.writeWriteCallbacks[t]},t.prototype.isDisabled=function(){return this.disabled},t.prototype.writeStarted=function(t){Object(a.each)(this.writeWriteCallbacks,function(e){e(t)})},t.prototype.disableReplication=function(){this.disabled=!0},t.prototype.enableReplication=function(){this.disabled=!1},t.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},t.prototype.clearCache=function(){this.replicationCache={}},t}());function M(t){R=t}function B(){return l.m.subState("objData")}var q=new u.LoadableCollection({name:"objdata",state:B,loader:function(t){var e=t[0],n=t[1];return R.get(e,n).start(),new c.j(function(){})}});var F=function(){function t(t,e){this._workspaceId=t,this._id=e,this._loadableData=q.get([t,e])}return t.prototype.get=function(){return Object(l.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},t.prototype.getWidget=function(t){return Object(l.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(t).get()},t.prototype.getWidgetWithBadPerformance=function(t){return this.getWidgetState(t).get()},t.prototype.getAttribute=function(t){if("_widget_pool"===t)throw new c.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(t).get()},t.prototype.getWidgetAttribute=function(t,e){return this.getWidgetState(t).subState(e).get()},t.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},t.prototype.set=function(t){Object(l.g)("Changing CMS content"),this._loadableData.set(t)},t.prototype.setError=function(t){this._loadableData.setError(t)},t.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},t.prototype.isAvailable=function(){return this._loadableData.isAvailable()},t.prototype.update=function(t){var e=C(this.get(),t);this.set(e),this._replication().notifyLocalState(e)},t.prototype.finishSaving=function(){return this._replication().finishSaving()},t.prototype.workspaceId=function(){return this._workspaceId},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.workspaceId()===e.workspaceId()&&this._id===e._id);var n,r},t.prototype._replication=function(){return R.get(this._workspaceId,this._id)},t.prototype.getWidgetState=function(t){return this.getSubReader("_widget_pool").subState(t)},t.prototype.getSubReader=function(t){return this._loadableData.reader().subState(t)},t}();function z(t,e){var n=W(t,e);return n.set(null),R.get(t,e).notifyBackendState(null),n}function U(t,e,n){W(t,e).set(n)}function H(t,e){var n=W(t,e);if(n.ensureAvailable())return n}function W(t,e){return new F(t,e)}var V=function(){return(V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},K={results:[],total:0},Q=new u.LoadableCollection({name:"objquery",state:function(){return ut()},loader:function(t,e,n){var r=t[0],i=t[1],o=t[2],a=e.push,s=e.isReload,l=e.wasCancelled;return function(t,e,n,r){if(r>0){var i=new $(t,e,n,r-1);return Object(u.load)(function(){return i.continuationForNextBatch()})}return c.j.resolve()}(r,i,n,o).then(function(t){if(l())throw new Error;var e={size:n,continuation:t,include_objs:!s()},o=V({},i,e);return g.e.retrieveObjQuery(r,o).then(function(t){var e=t.objs;return e&&a(function(){return e.forEach(function(t){t._id&&R.get(r,t._id).notifyBackendState(t)})}),function(t,e){e.forEach(function(e){return function(t,e){Object(u.load)(function(){return H(t,e)})}(t,e)})}(r,t.results),{results:t.results,total:t.total,continuation:t.continuation}})})},invalidation:function(t){var e=t[0];t[1],t[2];return Object(u.loadableWithDefault)(void 0,function(){return i(e)})||""}}),$=function(){function t(t,e,n,r){void 0===r&&(r=0),this._workspaceId=t,this._params=e,this._batchSize=n,this._index=r}return t.store=function(t,e,n,r){void 0===r&&(r=n.length),Q.get([t,Y(e),0]).set({results:n,total:r})},t.firstBatchFor=function(e,n,r){return new t(e,Y(n),r)},t.countFor=function(t,e){return this.firstBatchFor(t,e,0).count()},t.prototype.objIds=function(){return this._response().results},t.prototype.count=function(){return this._response().total||0},t.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new t(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),t.prototype.continuationForNextBatch=function(){return this._response().continuation},t.prototype._response=function(){return this._data().get()||K},t.prototype._data=function(){return Q.get([this._workspaceId,this._params,this._index],this._batchSize)},t}(),G=$;function Y(t){var e=Object(a.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},a.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}function Z(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function J(t,e,n){return e&&X(t.prototype,e),n&&X(t,n),t}var tt=function(){function t(e,n,r){Z(this,t),this._workspaceId=e,this._params=n,this._batchSize=r}return J(t,null,[{key:"store",value:function(t,e,n,r){G.store(t,e,n,r)}},{key:"count",value:function(t,e){return G.countFor(t,e)}}]),J(t,[{key:"iterator",value:function(){var t={},e=G.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!e)return{done:!0};var i=e.objIds();if(n<i.length){var o=i[n];return n++,t[o]?r():(t[o]=!0,{value:o,done:!1})}return e=e.nextBatch(),n=0,r()}}}}]),t}();function et(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rt(t,e,n){return e&&nt(t.prototype,e),n&&nt(t,n),t}var it=function(){function t(e,n,r){et(this,t),this._workspaceId=e,this._params=n,this._batchSize=r}return rt(t,[{key:"count",value:function(){return tt.count(this._workspaceId,this._params)}},{key:"iterator",value:function(){return new ot(this._workspaceId,this._params,this._batchSize)}}]),t}(),ot=function(){function t(e,n,r){et(this,t),this._workspaceId=e,this._iterator=new tt(e,n,r).iterator()}return rt(t,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var t=this._iterator.next().value;if(!t)return{done:!0};var e=H(this._workspaceId,t);return void 0===e?(this._iterator=void 0,{done:!0}):e.isNonExistent()?this.next():{value:e,done:!1}}}]),t}();function at(t,e,n,r){tt.store(t,e,n,r)}function st(t,e,n){return m("Search API"),new it(t,e,n)}function ut(){return l.c.subState("objQuery")}var lt=new u.LoadableCollection({name:"objFieldDiffs",state:function(){return l.c.subState("objFieldDiffs")},loader:function(t){var e=t[0],n=t[1];return g.e.retrieveObjFieldDiffs(e,n)},invalidation:function(t){return function(t,e){var n=H(t,e);if(n)return n.getAttribute("_version")||"";return""}(t[0],t[1])}});function ct(t,e,n,r){if("published"===t)return null;var i=function(t,e){return ft(t,e).get()||{}}(t,n);return r?function(t,e,n){var r=n._widget_pool;if(r){var i=r[e];if(i)return dt(t,i)}return null}(e,r,i):dt(e,i)}function ft(t,e){return lt.get([t,e])}function dt(t,e){var n=e[Object(c.R)(t)];return n?n[1]:null}function pt(t,e,n){var r=H("published",e),i=H(t,e);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(t,e,n){var r=t.getWidgetWithBadPerformance(n),i=e.getWidgetWithBadPerformance(n);return r?i?function(t,e){var n=E(t,e);return Object(a.some)(Object.keys(n),function(t){return!Object(c.z)(t)||"_obj_class"===t})}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}n.d(e,"g",function(){return i}),n.d(e,"o",function(){return o}),n.d(e,"a",function(){return w}),n.d(e,"f",function(){return O}),n.d(e,"b",function(){return"inMemory"}),n.d(e,"q",function(){return v}),n.d(e,"c",function(){return m}),n.d(e,"l",function(){return h}),n.d(e,"i",function(){return H}),n.d(e,"d",function(){return z}),n.d(e,"e",function(){return E}),n.d(e,"j",function(){return st}),n.d(e,"p",function(){return at}),n.d(e,"m",function(){return R}),n.d(e,"n",function(){return M}),n.d(e,"h",function(){return ct}),n.d(e,"k",function(){return pt})},function(t,e,n){"use strict";var r;function i(t){r=t}n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i})},function(t,e,n){var r,i,o;
1
+ /*! Copyright (c) 2019 Infopark AG (https://scrivito.com) */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=487)}([function(t,e,n){"use strict";var r=n(2);function i(t){try{return Object(r.isFunction)(t)?function(t){if(function(t){return!!t._scrivitoPrivateSchema}(t)){var e=t._scrivitoPrivateSchema;return"[class "+e.name+"]"}if(function(t){var e=t.prototype;return e&&e.isReactComponent}(t)){var n=t.displayName||t.name;return'[class React.Component "'+n+'"]'}return a(t.toString())}(t):Object(r.isObject)(t)?function(t){var e=t._scrivitoPrivateContent;if(e&&Object(r.isFunction)(e.toPrettyPrint))return e.toPrettyPrint();if(Object(r.isElement)(t))return"[object HTMLElement "+o(t.outerHTML)+"]";return o(t)}(t):o(t)}catch(t){return""}}function o(t){var e=JSON.stringify(t);return e?a(e):e}function a(t){return t.length>100?t.slice(0,100)+"...":t}var s=n(52),u=n(57);u.struct.strict=!0,u.interface.strict=!0,u.fail=function(t){throw new TypeError(t)};var l,c=[];function f(t){l?c.push(t):setTimeout(t,0)}function d(t){f(function(){throw t})}function p(t,e,n){var o=n.docPermalink;return function(){for(var n,a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];try{n=function(t,e){var n=e.length,o=t.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(e.map(function(e,n){var r=e[0],o=e[1],a=t[n],s=u.validate(a,o);return s.errors.map(function(t){return function(t,e){var n=function(t,e){var n="argument '"+t+"'";if(0===e.path.length)return n;return"key '"+e.path.join("/")+"' in "+n}(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===u.Nil)return"Unexpected "+n+".";var r=u.getTypeName(e.expected),o="got "+i(e.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,t)})}));if(a.length>0)return a.join(" ")}(a,e)}catch(t){d(t)}if(n){var c="Visit https://scrivito.com/"+o+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+t+"': "+n+" "+c)}}}var h=function(){function t(){}return t.prototype.current=function(){return this.currentContext},t.prototype.runWith=function(t,e){var n=this.currentContext;try{return this.currentContext=t,e()}finally{this.currentContext=n}},t}(),v=function(){function t(){var t=this;this.promise=new ot(function(e,n){t.resolve=function(n){t.settled=!0,e(n)},t.reject=function(e){t.settled=!0,n(e)}})}return t.prototype.isPending=function(){return!this.settled},t}();function m(t){try{return{errorThrown:!1,result:t()}}catch(t){return{errorThrown:!0,error:t}}}var y=!1;function g(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];window&&window.console&&!y&&(t=window.console).error.apply(t,e)}function b(){var t="1.6.0-rc1-122-g5bcb2871bd68";return t}function w(t,e){void 0===e&&(e=window.document);var n=e.createElement("link");n.rel="stylesheet",n.href=t,O(e.head,n)}function _(t,e){void 0===e&&(e=window.document);var n=e.createElement("script");n.src=t,O(e.head,n)}function O(t,e){t.appendChild(e)}var k=/(_+)(\w)/g,x=/([A-Z])/g,C=/[A-Z]+|\d+/g,E=/^_?(_+[A-Z0-9]|[^_])+$/,S=/[_\s]+/g,j=/[A-Z][a-z]+/g;function T(t){return E.test(t)}function A(t){return t.replace(x,function(t,e){return"_"+e.toLowerCase()})}function P(t){return t.replace(k,function(t,e,n,r){return r?n.toUpperCase()===n?t:""+e.substr(1)+n.toUpperCase():t})}function N(t){var e=P(t);return e.charAt(0).toUpperCase()+e.slice(1)}function I(t){return t.replace(S," ").replace(j,function(t){return" "+t.toLowerCase()}).replace(C,function(t){return" "+t}).trim().replace(/./,function(t){return t.toUpperCase()})}n(113);var L=u.interface({size:u.Number,type:u.String},{name:"Blob",strict:!1}),D=L.extend({name:u.String},{name:"File",strict:!1});function R(t){return"_"===t[0]}function M(t,e){for(var n=t.iterator(),r=[];r.length!==e;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function B(){for(var t=Math.floor(Math.random()*Math.pow(16,8)).toString(16);t.length<8;)t="0"+t;return t}function q(){return B()+B()}var F=!1;function z(t,e,n){return F?t:r.throttle(t,e,n)}var U=-9007199254740991,H=9007199254740991,W=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function V(t){return"string"==typeof t&&t.match(/^-?\d+$/)?J(t):"number"==typeof t?J(t):null}function K(t){return function(t){return Q(t)&&Math.floor(t)===t}(t)&&U<=t&&t<=H}function Q(t){return"number"==typeof t&&Object(r.isFinite)(t)}function $(t){if("string"!=typeof t)return null;if(!Z(t))throw new s.InternalError('The value is not a valid ISO date time: "'+t+'"');return G(t)}function G(t){if(!t)return null;var e=t.match(W);if(!e)return null;var n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=parseInt(n,10),l=parseInt(r,10),c=parseInt(i,10),f=parseInt(o,10),d=parseInt(a,10),p=parseInt(s,10);return new Date(Date.UTC(u,l-1,c,f,d,p))}function Y(t){return""+(""+t.getUTCFullYear()+X(t.getUTCMonth()+1))+(""+X(t.getUTCDate())+X(t.getUTCHours()))+(""+X(t.getUTCMinutes())+X(t.getUTCSeconds()))}function Z(t){return"string"==typeof t&&!!t.match(/^\d{14}$/)}function X(t){return t<10?"0"+t:t}function J(t){var e=parseInt(t.toString(),10);return 0===e?0:K(e)?e:null}function tt(t){return et(1e3*t)}function et(t){return new ot(function(e){setTimeout(e,t)})}function nt(t,e){return rt(t)&&rt(e)?t.equals(e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&Object(r.every)(Object(r.zip)(t,e),function(t){return nt(t[0],t[1])}):t&&e?t.valueOf()===e.valueOf():t===e}function rt(t){return!!t&&"function"==typeof t.equals}function it(t,e){return t.then(function(t){return e(),t},function(t){throw e(),t})}var ot,at=n(125);ot="undefined"!=typeof Promise?Promise:at.a;var st=function(){function t(t,e){var n=(void 0===e?{}:e).batchSize;this.mget=t,this.batchSize=n||100,this.itemsToBatch=[]}return t.prototype.retrieve=function(t){var e=this;0===this.itemsToBatch.length&&f(function(){return e.performRetrieval()});var n=new v;return this.itemsToBatch.push({key:t,deferred:n}),n.promise},t.prototype.reset=function(){this.itemsToBatch=[]},t.prototype.performRetrieval=function(){var t=this,e=this.itemsToBatch.splice(0,this.batchSize);if(0!==e.length){var n=e.map(function(t){return t.key});this.mget(n).then(function(n){e.forEach(function(e,r){var i=e.key,o=e.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else t.retrieve(i).then(o.resolve,o.reject)})},function(t){e.forEach(function(e){return e.deferred.reject(t)})}),this.performRetrieval()}},t}();function ut(t){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lt(t){var e=ct(t);return JSON.stringify(e)}function ct(t){return Array.isArray(t)?t.map(ct):function(t){return"object"===ut(t)&&null!==t}(t)?Object.keys(t).sort().map(function(e){return[e,ct(t[e])]}):t}var ft=Object.assign||r.extend;function dt(t,e){var n=t.clientX,r=t.clientY,i=e.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}function pt(t){return(pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ht=function(){function t(t){this.subscribeFunction=t}return t.prototype.subscribe=function(t){var e=new vt("object"===pt(t)?t:{next:t}),n=this.subscribeFunction(e);return e.setUnsubscribeCallback("object"===pt(n)?function(){return n.unsubscribe()}:n),e},t.prototype.map=function(e){var n=this;return new t(function(t){return n.subscribe({next:function(n){return t.next(e(n))},complete:function(){return t.complete()}})})},t.prototype.filter=function(e){var n=this;return new t(function(t){return n.subscribe({next:function(n){e(n)&&t.next(n)},complete:function(){return t.complete()}})})},t.prototype.toPromise=function(){var t=this;return new ot(function(e){var n;t.subscribe({next:function(t){n=t},complete:function(){e(n)}})})},t.prototype.takeOne=function(){var e=this;return new t(function(t){var n=e.subscribe({next:function(e){n.unsubscribe(),t.next(e),t.complete()},complete:function(){t.complete()}});return n})},t.prototype.takeUntil=function(e){var n=this;return new t(function(t){var r,i;if((i=n.subscribe({next:function(e){t.next(e)},complete:function(){o()}})).isClosed())return function(){};function o(){t.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=e.subscribe({next:function(){o()},complete:function(){o()}}),a})},t}(),vt=function(){function t(t){this.subscriber=t}return t.prototype.next=function(t){this.subscriber&&this.subscriber.next&&this.subscriber.next(t)},t.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},t.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},t.prototype.isClosed=function(){return!this.subscriber},t.prototype.setUnsubscribeCallback=function(t){this.unsubscribeCallback=t},t}();var mt,yt=(mt=function(t,e){var n,r;return(mt=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}mt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),gt=function(t){function e(){var e=t.call(this,function(t){if(e.isCompleted)return t.complete(),function(){};var n=(e.subscriberIdCounter++).toString();return e.subscribers[n]=t,function(){delete e.subscribers[n]}})||this;return e.subscribers={},e.subscriberIdCounter=1,e.isCompleted=!1,e}return yt(e,t),e.prototype.next=function(t){var e=this;Object.keys(this.subscribers).forEach(function(n){e.subscribers[n].next(t)})},e.prototype.complete=function(){var t=this;Object.keys(this.subscribers).forEach(function(e){return t.subscribers[e].complete()}),this.subscribers={},this.isCompleted=!0},e.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},e.prototype.isClosed=function(){return this.isCompleted},e}(ht);n.d(e,"p",function(){return p}),n.d(e,"d",function(){return h}),n.d(e,"e",function(){return v}),n.d(e,"a",function(){return s.ArgumentError}),n.d(e,"g",function(){return s.InternalError}),n.d(e,"h",function(){return s.ResourceNotFoundError}),n.d(e,"i",function(){return s.ScrivitoError}),n.d(e,"Q",function(){return d}),n.d(e,"G",function(){return f}),n.d(e,"I",function(){return i}),n.d(e,"O",function(){return u}),n.d(e,"M",function(){return m}),n.d(e,"F",function(){return g}),n.d(e,"x",function(){return b}),n.d(e,"D",function(){return w}),n.d(e,"E",function(){return _}),n.d(e,"o",function(){return P}),n.d(e,"q",function(){return N}),n.d(e,"N",function(){return I}),n.d(e,"R",function(){return A}),n.d(e,"y",function(){return T}),n.d(e,"f",function(){return D}),n.d(e,"c",function(){return L}),n.d(e,"z",function(){return R}),n.d(e,"m",function(){return M}),n.d(e,"L",function(){return q}),n.d(e,"K",function(){return B}),n.d(e,"P",function(){return z}),n.d(e,"H",function(){return G}),n.d(e,"t",function(){return $}),n.d(e,"u",function(){return V}),n.d(e,"B",function(){return Q}),n.d(e,"w",function(){return Y}),n.d(e,"A",function(){return Z}),n.d(e,"C",function(){return K}),n.d(e,"S",function(){return tt}),n.d(e,"T",function(){return et}),n.d(e,"v",function(){return nt}),n.d(e,"J",function(){return it}),n.d(e,"j",function(){return ot}),n.d(e,"b",function(){return st}),n.d(e,"s",function(){return lt}),n.d(e,"n",function(){return ft}),n.d(e,"r",function(){return dt}),n.d(e,"k",function(){return ht}),n.d(e,"l",function(){return gt})},function(t,e,n){"use strict";t.exports=n(178)},function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,c=a.slice,f=s.toString,d=s.hasOwnProperty,p=Array.isArray,h=Object.keys,v=Object.create,m=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};e.nodeType?i._=y:(!n.nodeType&&n.exports&&(e=n.exports=y),e._=y),y.VERSION="1.9.1";var g,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return y.iteratee!==g?y.iteratee(t,e):null==t?y.identity:y.isFunction(t)?b(t,e,n):y.isObject(t)&&!y.isArray(t)?y.matcher(t):y.property(t)};y.iteratee=g=function(t,e){return w(t,e,1/0)};var _=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}},O=function(t){if(!y.isObject(t))return{};if(v)return v(t);m.prototype=t;var e=new m;return m.prototype=null,e},k=function(t){return function(e){return null==e?void 0:e[t]}},x=function(t,e){return null!=t&&d.call(t,e)},C=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},E=Math.pow(2,53)-1,S=k("length"),j=function(t){var e=S(t);return"number"==typeof e&&e>=0&&e<=E};y.each=y.forEach=function(t,e,n){var r,i;if(e=b(e,n),j(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=y.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},y.map=y.collect=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o};var T=function(t){return function(e,n,r,i){var o=arguments.length>=3;return function(e,n,r,i){var o=!j(e)&&y.keys(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var u=o?o[s]:s;r=n(r,e[u],u,e)}return r}(e,b(n,i,4),r,o)}};y.reduce=y.foldl=y.inject=T(1),y.reduceRight=y.foldr=T(-1),y.find=y.detect=function(t,e,n){var r=(j(t)?y.findIndex:y.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},y.filter=y.select=function(t,e,n){var r=[];return e=w(e,n),y.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},y.reject=function(t,e,n){return y.filter(t,y.negate(w(e)),n)},y.every=y.all=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},y.some=y.any=function(t,e,n){e=w(e,n);for(var r=!j(t)&&y.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},y.contains=y.includes=y.include=function(t,e,n,r){return j(t)||(t=y.values(t)),("number"!=typeof n||r)&&(n=0),y.indexOf(t,e,n)>=0},y.invoke=_(function(t,e,n){var r,i;return y.isFunction(e)?i=e:y.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),y.map(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=C(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;s<u;s++)null!=(r=t[s])&&r>o&&(o=r);else e=w(e,n),y.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},y.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;s<u;s++)null!=(r=t[s])&&r<o&&(o=r);else e=w(e,n),y.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},y.shuffle=function(t){return y.sample(t,1/0)},y.sample=function(t,e,n){if(null==e||n)return j(t)||(t=y.values(t)),t[y.random(t.length-1)];var r=j(t)?y.clone(t):y.values(t),i=S(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=y.random(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,e)},y.sortBy=function(t,e,n){var r=0;return e=w(e,n),y.pluck(y.map(t,function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var A=function(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=w(r,i),y.each(n,function(e,i){var a=r(e,i,n);t(o,e,a)}),o}};y.groupBy=A(function(t,e,n){x(t,n)?t[n].push(e):t[n]=[e]}),y.indexBy=A(function(t,e,n){t[n]=e}),y.countBy=A(function(t,e,n){x(t,n)?t[n]++:t[n]=1});var P=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;y.toArray=function(t){return t?y.isArray(t)?c.call(t):y.isString(t)?t.match(P):j(t)?y.map(t,y.identity):y.values(t):[]},y.size=function(t){return null==t?0:j(t)?t.length:y.keys(t).length},y.partition=A(function(t,e,n){t[n?0:1].push(e)},!0),y.first=y.head=y.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:y.initial(t,t.length-e)},y.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},y.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:y.rest(t,Math.max(0,t.length-e))},y.rest=y.tail=y.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},y.compact=function(t){return y.filter(t,Boolean)};var N=function(t,e,n,r){for(var i=(r=r||[]).length,o=0,a=S(t);o<a;o++){var s=t[o];if(j(s)&&(y.isArray(s)||y.isArguments(s)))if(e)for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else N(s,e,n,r),i=r.length;else n||(r[i++]=s)}return r};y.flatten=function(t,e){return N(t,e,!1)},y.without=_(function(t,e){return y.difference(t,e)}),y.uniq=y.unique=function(t,e,n,r){y.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=w(n,r));for(var i=[],o=[],a=0,s=S(t);a<s;a++){var u=t[a],l=n?n(u,a,t):u;e&&!n?(a&&o===l||i.push(u),o=l):n?y.contains(o,l)||(o.push(l),i.push(u)):y.contains(i,u)||i.push(u)}return i},y.union=_(function(t){return y.uniq(N(t,!0,!0))}),y.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=S(t);r<i;r++){var o=t[r];if(!y.contains(e,o)){var a;for(a=1;a<n&&y.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},y.difference=_(function(t,e){return e=N(e,!0,!0),y.filter(t,function(t){return!y.contains(e,t)})}),y.unzip=function(t){for(var e=t&&y.max(t,S).length||0,n=Array(e),r=0;r<e;r++)n[r]=y.pluck(t,r);return n},y.zip=_(y.unzip),y.object=function(t,e){for(var n={},r=0,i=S(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var I=function(t){return function(e,n,r){n=w(n,r);for(var i=S(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}};y.findIndex=I(1),y.findLastIndex=I(-1),y.sortedIndex=function(t,e,n,r){for(var i=(n=w(n,r,1))(e),o=0,a=S(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o};var L=function(t,e,n){return function(r,i,o){var a=0,s=S(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),y.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}};y.indexOf=L(1,y.findIndex,y.sortedIndex),y.lastIndexOf=L(-1,y.findLastIndex),y.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},y.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(c.call(t,r,r+=e));return n};var D=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=O(t.prototype),a=t.apply(o,i);return y.isObject(a)?a:o};y.bind=_(function(t,e,n){if(!y.isFunction(t))throw new TypeError("Bind must be called on a function");var r=_(function(i){return D(t,r,e,this,n.concat(i))});return r}),y.partial=_(function(t,e){var n=y.partial.placeholder,r=function(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return D(t,r,this,this,a)};return r}),y.partial.placeholder=y,y.bindAll=_(function(t,e){var n=(e=N(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=y.bind(t[r],t)}}),y.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return x(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},y.delay=_(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),y.defer=y.partial(y.delay,y,1),y.throttle=function(t,e,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:y.now(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=y.now();s||!1!==n.leading||(s=l);var c=e-(l-s);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},y.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=_(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,e),s&&(i=t.apply(this,a))}else r=y.delay(o,e,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2),y.restArguments=_;var R=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(t,e){var n=M.length,r=t.constructor,i=y.isFunction(r)&&r.prototype||s,o="constructor";for(x(t,o)&&!y.contains(e,o)&&e.push(o);n--;)(o=M[n])in t&&t[o]!==i[o]&&!y.contains(e,o)&&e.push(o)};y.keys=function(t){if(!y.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)x(t,n)&&e.push(n);return R&&B(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return R&&B(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},y.mapObject=function(t,e,n){e=w(e,n);for(var r=y.keys(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o},y.pairs=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},y.invert=function(t){for(var e={},n=y.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},y.functions=y.methods=function(t){var e=[];for(var n in t)y.isFunction(t[n])&&e.push(n);return e.sort()};var q=function(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var l=a[u];e&&void 0!==n[l]||(n[l]=o[l])}return n}};y.extend=q(y.allKeys),y.extendOwn=y.assign=q(y.keys),y.findKey=function(t,e,n){e=w(e,n);for(var r,i=y.keys(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r};var F,z,U=function(t,e,n){return e in n};y.pick=_(function(t,e){var n={},r=e[0];if(null==t)return n;y.isFunction(r)?(e.length>1&&(r=b(r,e[1])),e=y.allKeys(t)):(r=U,e=N(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n}),y.omit=_(function(t,e){var n,r=e[0];return y.isFunction(r)?(r=y.negate(r),e.length>1&&(n=e[1])):(e=y.map(N(e,!1,!1),String),r=function(t,n){return!y.contains(e,n)}),y.pick(t,r,n)}),y.defaults=q(y.allKeys,!0),y.create=function(t,e){var n=O(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0},F=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&z(t,e,n,r)},z=function(t,e,n,r){t instanceof y&&(t=t._wrapped),e instanceof y&&(e=e._wrapped);var i=f.call(t);if(i!==f.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return u.valueOf.call(t)===u.valueOf.call(e)}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(y.isFunction(a)&&a instanceof a&&y.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return r[l]===e;if(n.push(t),r.push(e),o){if((l=t.length)!==e.length)return!1;for(;l--;)if(!F(t[l],e[l],n,r))return!1}else{var c,d=y.keys(t);if(l=d.length,y.keys(e).length!==l)return!1;for(;l--;)if(c=d[l],!x(e,c)||!F(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0},y.isEqual=function(t,e){return F(t,e)},y.isEmpty=function(t){return null==t||(j(t)&&(y.isArray(t)||y.isString(t)||y.isArguments(t))?0===t.length:0===y.keys(t).length)},y.isElement=function(t){return!(!t||1!==t.nodeType)},y.isArray=p||function(t){return"[object Array]"===f.call(t)},y.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},y.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){y["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),y.isArguments(arguments)||(y.isArguments=function(t){return x(t,"callee")});var H=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof H&&(y.isFunction=function(t){return"function"==typeof t||!1}),y.isFinite=function(t){return!y.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},y.isNaN=function(t){return y.isNumber(t)&&isNaN(t)},y.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},y.isNull=function(t){return null===t},y.isUndefined=function(t){return void 0===t},y.has=function(t,e){if(!y.isArray(e))return x(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!d.call(t,i))return!1;t=t[i]}return!!n},y.noConflict=function(){return i._=o,this},y.identity=function(t){return t},y.constant=function(t){return function(){return t}},y.noop=function(){},y.property=function(t){return y.isArray(t)?function(e){return C(e,t)}:k(t)},y.propertyOf=function(t){return null==t?function(){}:function(e){return y.isArray(e)?C(t,e):t[e]}},y.matcher=y.matches=function(t){return t=y.extendOwn({},t),function(e){return y.isMatch(e,t)}},y.times=function(t,e,n){var r=Array(Math.max(0,t));e=b(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},y.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},y.now=Date.now||function(){return(new Date).getTime()};var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},V=y.invert(W),K=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};y.escape=K(W),y.unescape=K(V),y.result=function(t,e,n){y.isArray(e)||(e=[e]);var r=e.length;if(!r)return y.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=y.isFunction(o)?o.call(t):o}return t};var Q=0;y.uniqueId=function(t){var e=++Q+"";return t?t+e:e},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(t){return"\\"+G[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var r,i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,r,i,s){return a+=t.slice(o,s).replace(Y,Z),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.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(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,y)},u=e.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},y.chain=function(t){var e=y(t);return e._chain=!0,e};var X=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){return y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),X(this,n.apply(y,t))}}),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],X(this,n)}}),y.each(["concat","join","slice"],function(t){var e=a[t];y.prototype[t]=function(){return X(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return y}.apply(e,[]))||(n.exports=r)}()}).call(this,n(48),n(85)(t))},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"deserialize",function(){return J});var i=n(53),o=n(56),a=n(11);var s=function(){function t(t,e,n){this.container=t,this.attributeName=e,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return t.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},t.prototype.update=function(t){var e;this.container.update(((e={})[this.attributeName]=[t,this.typeInfo],e))},t.prototype.getContainer=function(){return this.container},t.prototype.obj=function(){return this.container.obj()},t.prototype.name=function(){return this.attributeName},t.prototype.type=function(){return this.typeInfo[0]},t.prototype.workspaceId=function(){return this.obj().workspaceId()},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.container.equals(e.getContainer())&&this.attributeName===e.name());var n,r},t.prototype.validClasses=function(){return this.typeOptions.validClasses},t.prototype.getDiff=function(){var t=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,t.id(),this.container===t?void 0:this.container.id())},t.prototype.toString=function(){var t=this.obj(),e=this.attributeName;return this.container===t?"<BasicField name="+e+" objId="+t.id()+">":"<BasicField name="+e+" objId="+t.id()+" widgetId="+this.container.id()+">"},t.prototype.id=function(){var t=this.obj();return this.container===t?this.attributeName+"|"+t.id():this.attributeName+"|"+t.id()+"|"+this.container.id()},t}(),u=n(0),l=n(13);function c(t){return l.parseQuery(t)}function f(t){return new l(t).query(!0)}var d=n(2),p=n.n(d),h=n(95);var v=function(){function t(t){var e=t.name,n=t.count,r=t.includedObjIds;this._name=e,this._count=n,this._includedObjIds=r}return t.prototype.name=function(){return this._name},t.prototype.count=function(){return this._count},t.prototype.includedObjs=function(){return Object(d.compact)(this._includedObjIds.map(function(t){return Bt.get(t)}))},t}();function m(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var y=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],g=["equals","startsWith","isGreaterThan","isLessThan"],b=["contains","containsPrefix"],w={query:[]},_=function(){function t(t){void 0===t&&(t=w);this._query=[].concat(t.query),this._batchSize=t.batchSize,this._offset=t.offset,this._sortBy=t.sortBy,this._sortDirection=t.sortDirection,this._includeDeleted=t.includeDeleted}return t.prototype.and=function(e,n,r,i){if(m(e,t))this._query=this._query.concat(e._query);else{if(void 0===n)throw new u.a("Missing operator to search with");if(void 0===r)throw new u.a('Missing value to search (specify "null" for missing)');var o=O(e,n,r);i&&(!function(t){if(!Object(d.contains)(b,t))throw new u.a('Boosting operator "'+t+'" is invalid.')}(n),o.boost=function(t){var e={};return Object(d.each)(t,function(t,n){var r=x(n);e[r]=t}),e}(i)),this._query.push(o)}return this},t.prototype.andNot=function(t,e,n){var r=O(t,e,n);return function(t){if(!Object(d.contains)(g,t))throw new u.a('Negating operator "'+t+'" is invalid.')}(e),r.negate=!0,this._query.push(r),this},t.prototype.offset=function(t){return this._offset=t,this},t.prototype.order=function(t,e){return void 0===e&&(e="asc"),this._sortBy=x(t),this._sortDirection=e,this},t.prototype.batchSize=function(t){return this._batchSize=t,this},t.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},t.prototype.count=function(){return this.getObjDataQuery().count()},t.prototype.first=function(){return this.take(1)[0]||null},t.prototype.take=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];S.apply(void 0,[t].concat(e));var r=this._batchSize;try{return this._batchSize=void 0===t?1e3:t,Object(u.m)(this,t)}finally{this._batchSize=r}},t.prototype.iterator=function(){var t=this.getObjDataQuery().iterator();return{next:function(){var e=t.next(),n=e.done,r=e.value;return n?{done:!0}:{done:!1,value:new Bt(r)}}}},t.prototype.getObjDataQuery=function(){return Object(a.j)(st(),this.params(),this.getBatchSize())},t.prototype.getBatchSize=function(){return this._batchSize||100},t.prototype.facet=function(t,e){var n;return n=void 0===e?{}:function(t){var e=d.without.apply(void 0,[Object.keys(t)].concat(C));if(e.length)throw new u.a("Invalid facet options: "+Object(u.I)(e)+". Valid options: "+C);return t}(e),new a.a(st(),x(t),n,this._query).result().map(function(t){return new v(t)})},t.prototype.store=function(t,e){Object(a.p)(st(),this.params(),t,e)},t.prototype.params=function(){return Object(d.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},d.isUndefined)},t}();function O(t,e,n){return{field:function(t){if(Object(d.isArray)(t))return Object(d.map)(t,x);return x(t)}(t),operator:function(t){if(!function(t){return Object(d.contains)(y,t)}(t))throw new u.a('Operator "'+t+'" is invalid.');return Object(u.R)(t)}(e),value:function(t){if(Object(d.isArray)(t))return Object(d.map)(t,k);return k(t)}(n)}}function k(t){return Object(d.isDate)(t)?Object(u.w)(t):m(t,Bt)?t.id():t}function x(t){if(!Object(u.y)(t))throw new u.a('Attribute name "'+t+'" is not camel case.');return Object(u.R)(t)}var C=["limit","includeObjs"];var E=u.O.refinement(u.O.Number,function(t){return t>=0},"Number (positive)"),S=Object(u.p)("objSearch.take",[["count",u.O.maybe(E)]],{docPermalink:"js-sdk/ObjSearch-take"});function j(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var T=u.O.irreducible("Obj",function(t){return L(t,Bt)}),A=u.O.irreducible("Widget",function(t){return L(t,bt)}),P=u.O.irreducible("Link",function(t){return L(t,Vt)}),N=u.O.irreducible("ObjSearch",function(t){return L(t,_)}),I=u.O.irreducible("Binary",function(t){return j(t,$)});function L(t,e){return!!t&&j(t._scrivitoPrivateContent,e)}var D,R=n(6);function M(t){D=t}var B=function(){function t(t,e){void 0===e&&(e={});var n=e.filename;if(this.contentType=e.contentType,t.idToCopy)this.idToCopy=t.idToCopy;else{var r=t.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return t.prototype.into=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return q.apply(void 0,[t].concat(e)),Object(R.g)("Changing CMS content"),this.intoId(t._scrivitoPrivateContent.id())},t.prototype.intoId=function(t){if(!D)throw new u.g("No binaryHandler defined!");var e;if(this.idToCopy)e=D.copyBinary(this.idToCopy,t,this.filename,this.contentType);else{if(!this.source)throw new u.g("Source is not defined!");e=D.uploadBinary(t,this.source,this.filename,this.contentType)}return e.then(function(t){var e=t.id;return new $(e,!1)})},t}(),q=Object(u.p)("FutureBinary#into",[["target",T]],{docPermalink:"js-sdk/FutureBinary-into"});var F,z=B,U=n(5),H=n(9);!function(t){t.Date="date",t.Number="number",t.String="string",t.Stringlist="stringlist"}(F||(F={}));var W=new U.LoadableCollection({name:"metadata",state:function(){return R.c.subState("metadataCollection")},loader:function(t){return H.e.retrieveBinaryMetadata(t)}}),V=function(){function t(t){this.binaryId=t,t&&(this.loadableData=W.get(t))}return t.store=function(t,e){K(e),W.get(t).set(e)},t.prototype.get=function(t){Object(a.c)("MetadataCollection#get"),function(t){if(!Object(u.y)(t))throw new u.a('Metadata key "'+t+'" is not in camel case.')}(t);var e=this.getData();if(e){var n=Object(u.R)(t);return e.hasOwnProperty(n)?e[n]:null}return null},t.prototype.keys=function(){var t=this.getData();return t?Object(d.map)(Object(d.keys)(t),u.o):[]},t.prototype.contentLength=function(){var t=this.get("contentLength");return"number"!=typeof t?0:t},t.prototype.contentType=function(){var t=this.get("contentType");return"string"!=typeof t?"":t},t.prototype.getData=function(){if(this.loadableData){var t=this.loadableData.get();if(t)return K(t)}},t}();function K(t){for(var e=t.meta_data,n={},r=0,i=Object.keys(e);r<i.length;r++){var o=i[r],a=e[o],s=a[0],l=a[1];if(null==l)throw new u.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var c=void 0;if(s===F.Date){if("string"!=typeof l)throw new u.g('Invalid non-string backend value for a date metadata "'+o+'"');c=Object(u.t)(l)}else c=l;n[o]=c}return n}var Q=new U.LoadableCollection({name:"binary",state:function(){return R.c.subState("binary")},loader:function(t){var e=t[0],n=t[1];return H.e.retrieveBinaryUrls(e,n)}}),$=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={}),this._id=t,this._isPublic=!!e,this._transformation=n||void 0,this._loadableData=Q.get([t,this._transformation])}return t.upload=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(Z.apply(void 0,[t,e].concat(n)),!(u.f.is(t)||e&&e.filename))throw new u.a("Expected a filename to be passed with Blob as the source.");return new z({source:t},e)},t.store=function(e,n,r){var i=n.transformation;Q.get([e,i]).set(r);var o=new t(e).raw();return i?o.optimizeFor(i):o},t.storeMetadata=function(t,e){V.store(t,e)},t.prototype.id=function(){return this._id},t.prototype.copy=function(t){return new z({idToCopy:this._id},t)},t.prototype.isPrivate=function(){return!this._isPublic},t.prototype.optimizeFor=function(e){return new t(this._id,this._isPublic,Object(d.extend)({},this._transformation,e))},t.prototype.original=function(){return new t(this._id,this._isPublic,{})},t.prototype.raw=function(){return new t(this._id,this._isPublic,null)},t.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(d.isEmpty)(this._transformation)},t.prototype.isRaw=function(){return!this.isTransformed()},t.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},t.prototype.urlWithoutPlaceholder=function(){var t=this._loadableData.get();if(t){var e=t[this.accessType()];if(!e)throw new u.g("Missing key "+this.accessType+" in binary data");return e.get.url}},t.prototype.filename=function(){var t=this.url();return!t||t.match(/^data:/)?"":l(t).path().split("/").pop()||""},t.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new V(this._id)},t.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},t.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},t.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var t=/[^.\\]*$/.exec(this.raw().filename());if(t)return t[0].toLowerCase()}return""},t.prototype.equals=function(e){return n=e,(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&Object(d.isEqual)(e.definition(),this.definition());var n,r},t.prototype.isImage=function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]},t.prototype.definition=function(){return this._transformation||null},t.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},t.prototype.assertNotTransformed=function(t){if(this.isTransformed())throw new u.i('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},t.prototype.isTransformed=function(){return!!this._transformation},t}(),G=u.O.struct({contentType:u.O.maybe(u.O.String),filename:u.O.maybe(u.O.String)}),Y=u.O.refinement(u.O.Object,function(t){return u.c.is(t)||u.f.is(t)},"Blob or File"),Z=Object(u.p)("Binary.upload",[["source",Y],["options",u.O.maybe(G)]],{docPermalink:"js-sdk/Binary-static-upload"});function X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function J(t,e,n,r){var i=X(e,2),o=i[0],a=i[1];switch(n){case"binary":return function(t,e){if("binary"===t&&e){var n=e.id,r="published"===st();return new $(n,r)}return null}(o,a);case"date":return function(t,e){if("date"!==t)return null;return Object(u.t)(e)}(o,a);case"float":return function(t,e){switch(t){case"string":return e.match(/^-?\d+(\.\d+)?$/)?tt(e):null;case"number":return tt(e);default:return null}}(o,a);case"enum":return function(t,e,n){var r=n.values;if("string"===t&&p.a.contains(r,e))return e;return null}(o,a,r);case"html":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"integer":return function(t,e){switch(t){case"string":case"number":return Object(u.u)(e);default:return null}}(o,a);case"link":return function(t,e){if("link"!==t||!p.a.isObject(e))return null;return et(e)}(o,a);case"linklist":return function(t,e){if(!p.a.isArray(e))return[];return p.a.compact(e.map(et))}(0,a);case"multienum":return function(t,e,n){var r=n.values;if("stringlist"!==t||!Array.isArray(e))return[];return p.a.intersection(e,r)}(o,a,r);case"reference":return function(t,e,n){if("reference"===t&&e)return nt(e,n);return null}(o,a,t);case"referencelist":return function(t,e,n){if("referencelist"!==t)return[];if(!e)return[];var r=e.map(function(t){return nt(t,n)});return p.a.compact(r)}(o,a,t);case"string":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"stringlist":return function(t,e){if("stringlist"!==t||!Array.isArray(e))return[];return e}(o,a);case"widgetlist":return function(t,e,n){if("widgetlist"!==t)return[];return p.a.map(e,function(t){return n.widget(t)})}(o,a,t);default:return null}}function tt(t){var e=parseFloat(t);return Object(u.B)(e)?e:null}function et(t){var e=p.a.pick(t,"query","rel","target","title","url");"fragment"in t&&(e.hash=t.fragment),"obj_id"in t&&(e.objId=t.obj_id);var n=new Vt(e);return n.isBroken()?null:n}function nt(t,e){var n=Bt.getInWorkspace(e.workspaceId(),t);return n||null}var rt=function(){function t(){}return t.prototype.get=function(t,e){var n=Object(u.R)(t),i=this.getAttributeData(n);return i&&d.isArray(i)||(i=[]),"string"==typeof e?J(this,i,e):J.apply(r,[this,i].concat(e))},t.prototype.serializeAttributes=function(t){var e=this;return d.mapObject(t,function(t,n){if(function(t){return d.isArray(t)&&"widgetlist"===t[0]}(t)){var r=Object(u.o)(n);return["widgetlist",d.invoke(e.get(r,["widgetlist"]),"serializeAttributes")]}return t})},t.prototype.persistWidgets=function(t,e){d.each(e,function(e){if(function(t){if(!t)return!1;if(!d.isArray(t))return!1;if(t.length<2)return!1;var e=t[1];return d.isArray(e)&&e.length>0&&"widgetlist"===e[0]}(e)){var n=e[0];if(n){var r=d.isArray(n)?n:[n];d.each(r,function(e){e.isPersisted()||e.persistInObj(t)})}}})},t}();function it(t){return d.mapObject(t,function(t,e){if(Object(u.z)(e))return d.isArray(t)?t:[t];if(!d.isArray(t))throw new u.g("Value for "+e+" should be a tuple: [value, typeInfo]");var n=t[0],r=t[1];return"string"==typeof r?[n,[r]]:[n,r]})}var ot,at="published";function st(){return ot||at}function ut(t){ot=t}function lt(){ot=void 0}function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function dt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function pt(t,e){return!e||"object"!==ct(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ht(t,e,n){return(ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yt(t,e,n){return e&&mt(t.prototype,e),n&&mt(t,n),t}function gt(t,e){return(gt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var bt=function(t){function e(t){var n;return function(t,e){if(!dt(t,e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=pt(this,vt(e).call(this)))._attributesToBeSaved=it(t),function(t){if(!t)throw new u.a('Please provide a widget class as the "_objClass" property.')}(t._objClass),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gt(t,e)}(e,rt),yt(e,null,[{key:"build",value:function(t,n){var r=Object.create(e.prototype);return r._obj=n,r._id=t,r}},{key:"newWithSerializedAttributes",value:function(t){var n={},r={};p.a.each(t,function(t,i){if("_obj_class"!==i)if(p.a.isArray(t)&&"widgetlist"===p.a.first(t)){var o=p.a.map(p.a.last(t),function(t){return e.newWithSerializedAttributes(t)}),a=Object(u.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=t;else n._objClass=[t]});var i=new e(n);return i.preserializedAttributes=r,i}}]),yt(e,[{key:"id",value:function(){return this._failIfNotPersisted(),this._id}},{key:"objClass",value:function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]}},{key:"obj",value:function(){return this._failIfNotPersisted(),this._obj}},{key:"widget",value:function(t){return this.obj().widget(t)}},{key:"workspaceId",value:function(){return this.obj().workspaceId()}},{key:"modification",value:function(){return Object(a.k)(st(),this.obj().id(),this.id())}},{key:"update",value:function(t){var e=this,n=it(t);Object(R.r)(function(){e.persistWidgets(e.obj(),n);var t=Ct(n);e._updateSelf(t)})}},{key:"insertBefore",value:function(t){t.obj().insertWidget(this,{before:t})}},{key:"insertAfter",value:function(t){t.obj().insertWidget(this,{after:t})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()}},{key:"persistInObj",value:function(t){this.persistWidgets(t,this._attributesToBeSaved);var e=Ct(this._attributesToBeSaved);p.a.extend(e,this.preserializedAttributes||{}),this._obj=t,this._id=t.generateWidgetId(),this._updateSelf(e),this._executeDidPersistCallback()}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"onDidPersist",value:function(t){if(this.isPersisted())throw new u.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=t}},{key:"hasOnDidPersistCallback",value:function(){return!!this._onDidPersistCallback}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(t){return!!dt(t,e)&&(this.id()===t.id()&&this.obj().id()===t.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"toPrettyPrint",value:function(){return"[object ".concat(this.objClass(),' id="').concat(this.id(),'" objId="').concat(this.obj().id(),'"]')}},{key:"getAttributeData",value:function(t){return this.obj().getWidgetAttribute(this.id(),t)}},{key:"getData",value:function(){return this.obj().getWidgetData(this.id())}},{key:"serializeAttributes",value:function(){return ht(vt(e.prototype),"serializeAttributes",this).call(this,this.getData())}},{key:"_failIfNotPersisted",value:function(){if(!this.isPersisted())throw new u.i("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(t){var e,n,r,i={_widgetPool:[(e={},n=this.id(),r=t,n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e)]};this.obj().update(i)}},{key:"_executeDidPersistCallback",value:function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)}},{key:"_copyPersisted",value:function(){var t=this.serializeAttributes();return e.newWithSerializedAttributes(t)}},{key:"_copyUnpersisted",value:function(){var t=new e(p.a.mapObject(this._attributesToBeSaved,function(t){var e=ft(t,2),n=e[0],r=e[1];return r&&"widgetlist"===r[0]?[p.a.invoke(n,"copy"),r]:[n,r]}));return this._onDidPersistCallback&&t.onDidPersist(this._onDidPersistCallback),t}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}}]),e}();function wt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function _t(t){if(wt(t,Vt))return!0;if(!d.isObject(t))return!1;var e=d.without(d.keys(t),"hash","obj_id","query","rel","target","title","url");return d.isEmpty(e)}function Ot(t){var e,n=wt(t,Vt)?{rel:(e=t).rel()||void 0,query:e.query(),target:e.target(),title:e.title(),url:e.url(),obj_id:e.objId(),fragment:e.hash()}:function(t){return{obj_id:t.obj_id||null,query:t.query||null,rel:t.rel||void 0,target:t.target||null,title:t.title||null,url:t.url||null,fragment:t.hash||null}}(t);return n.rel||delete n.rel,n}function kt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function xt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ct(t){var e={};return p.a.each(t,function(t,n){var r=xt(t,2),i=r[0],o=r[1],a=function(t){if(!Object(u.y)(t))throw new u.a("Attribute names have to be in camel case.");return Object(u.R)(t)}(n);if(Object(u.z)(a))e[a]=i;else{var s=xt(o,2),l=s[0],c=s[1];e[a]=[Et(l,n),jt(St(l,c,i,n))]}}),e}function Et(t,e){switch(t){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 t;default:throw new u.a('Attribute "'.concat(e,'" is of unsupported type "').concat(t,'".'))}}function St(t,e,n,r){if(null===n)return n;switch(t){case"binary":return function(t,e){if(kt(t,$))return{id:t.id()};Tt(t,e,"A Binary.")}(n,r);case"date":return function(t,e){if(p.a.isDate(t))return Object(u.w)(t);if(Object(u.A)(t))return t;Tt(t,e,"A Date.")}(n,r);case"enum":return function(t,e,n){var r=t.values;if(p.a.contains(r,e))return e;var i='Valid attribute values are contained in its "values" array ['.concat(r,"].");Tt(e,n,i)}(e,n,r);case"float":return function(t,e){if(Object(u.B)(t))return t;var n=t;p.a.isNumber(t)&&(n=String(t));Tt(n,e,"A Number, that is #isFinite().")}(n,r);case"html":return function(t,e){if(p.a.isString(t))return t;Tt(t,e,"A String.")}(n,r);case"integer":return function(t,e){if(Object(u.C)(t))return t;Tt(t,e,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(t,e){if(_t(t))return Ot(t);Tt(t,e,"A Link instance.")}(n,r);case"linklist":return function(t,e){if(p.a.isArray(t)&&p.a.every(t,_t))return p.a.map(t,Ot);Tt(t,e,"An array of Link instances.")}(n,r);case"multienum":return function(t,e,n){var r=t.values,i="An array with values from ".concat(Object(u.I)(r),".");p.a.isArray(e)&&p.a.every(e,p.a.isString)||Tt(e,n,i);var o=p.a.difference(e,r);if(o.length){var a="".concat(i," Forbidden values: ").concat(Object(u.I)(o),".");Tt(e,n,a)}return e}(e,n,r);case"reference":return function(t,e){if(Pt(t))return At(t);Tt(t,e,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(t,e){if(function(t){return p.a.isArray(t)&&p.a.every(t,function(t){return Pt(t)})}(t))return p.a.map(t,At);Tt(t,e,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(t,e){if(Nt(t))return t.toString();Tt(t,e,"A String.")}(n,r);case"stringlist":return function(t,e){if(p.a.isArray(t)&&p.a.every(t,function(t){return Nt(t)}))return p.a.invoke(t,"toString");Tt(t,e,"An array of strings.")}(n,r);case"widgetlist":return function t(e,n){if(kt(e,bt))return t([e],n);if(p.a.isArray(e)&&p.a.every(e,function(t){return kt(t,bt)}))return p.a.invoke(e,"id");Tt(e,n,"An array of BasicWidget instances.")}(n,r);default:throw new u.g('serializeAttributeValue is not implemented for "'.concat(t,'".'))}}function jt(t){return(p.a.isString(t)||p.a.isArray(t))&&p.a.isEmpty(t)?null:t}function Tt(t,e,n){throw new u.a("Unexpected value ".concat(Object(u.I)(t)," for")+' attribute "'.concat(e,'". Expected: ').concat(n))}function At(t){return kt(t,Bt)?t.id():t}function Pt(t){return p.a.isString(t)||kt(t,Bt)}function Nt(t){return p.a.isString(t)||p.a.isNumber(t)}function It(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var Lt,Dt,Rt=(Lt=function(t,e){return(Lt=Object.setPrototypeOf||It({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Lt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Mt=function(t){function e(e){var n=t.call(this)||this;return n.objData=e,n}return Rt(e,t),e.get=function(t){var e=this.getIncludingDeleted(t);return!e||e.isDeleted()?null:e},e.getInWorkspace=function(t,e){var n=this.getIncludingDeletedInWorkspace(t,e);return!n||n.isDeleted()?null:n},e.getIncludingDeleted=function(t){return this.getIncludingDeletedInWorkspace(st(),t)},e.getIncludingDeletedInWorkspace=function(t,n){var r=Object(a.i)(t,n);if(!r)return null;var i=new e(r);return i.isFinallyDeleted()?null:i},e.create=function(t){return this.createInWorkspace(st(),t)},e.createInWorkspace=function(t,e){var n=it(e);!function(t){if(!t)throw new u.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(t,d.mapObject(r,function(t){return t[0]}),d.omit(e,"_objClass","_id"))},e.createFromFile=function(t,e){var n=this.create(e);return $.upload(t).intoId(n.id()).then(function(t){return n.update({blob:[t,["binary"]]}),n.finishSaving().then(function(){return n})})},e.addChildWithSerializedAttributes=function(t,n){var r=e.generateId();return this.createWithSerializedAttributes(st(),d.extend({},n,{_id:r,_path:t+"/"+r}))},e.createWithSerializedAttributes=function(t,n,r){if(!r){var i=function(t){var e={},n={};d.each(t,function(t,r){if(a=t,d.isArray(a)&&"widgetlist"===d.first(a)){var i=d.map(t[1],qt),o=Object(u.o)(r);n[o]=[i,["widgetlist"]]}else e[r]=t;var a}),e._id||(e._id=Mt.generateId());return[e,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(t,o,s)}var l=Object(a.d)(t,n._id);l.update(n);var c=new e(l);return c.update(r),c},e.generateId=function(){return Object(u.L)()},e.all=function(){return(new _).batchSize(1e3)},e.root=function(){return e.getByPath("/")},e.where=function(t,e,n,r){return(new _).and(t,e,n,r)},e.getByPath=function(t){var e=this.where("_path","equals",t).first();return e||null},e.getByPermalink=function(t){var e=this.where("_permalink","equals",t).first();return e||null},e.getAllByPermalink=function(t){return this.where("_permalink","equals",t).take()},e.generateWidgetId=function(){return Object(u.K)()},e.prototype.id=function(){return this.getAttributeData("_id")},e.prototype.objClass=function(){return this.getAttributeData("_obj_class")},e.prototype.obj=function(){return this},e.prototype.createdAt=function(){return Object(u.H)(this.getAttributeData("_created_at"))},e.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},e.prototype.lastChanged=function(){var t=this.getAttributeData("_last_changed");return t?Object(u.H)(t):null},e.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},e.prototype.version=function(){return this.getAttributeData("_version")},e.prototype.workspaceId=function(){return this.objData.workspaceId()},e.prototype.path=function(){return this.getAttributeData("_path")||null},e.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},e.prototype.parentPath=function(){var t=this.path();return t&&"/"!==t?function(t){var e=t.split("/");if(e.pop(),1===e.length)return"/";return e.join("/")}(t):null},e.prototype.parent=function(){var t=this.parentPath();return t?e.getByPath(t):null},e.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},e.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},e.prototype.isModified=function(){return!!this.modification()},e.prototype.isNew=function(){return"new"===this.modification()},e.prototype.isEdited=function(){return"edited"===this.modification()},e.prototype.isDeleted=function(){return"deleted"===this.modification()},e.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},e.prototype.contentLength=function(){return this.metadata().contentLength()},e.prototype.contentType=function(){return this.metadata().contentType()},e.prototype.contentUrl=function(){var t=this.blob();return t?t.url():""},e.prototype.metadata=function(){var t=this.blob();return t?new V(t.id()):new V},e.prototype.children=function(){var t=this.path();return t?Ft(t).take():[]},e.prototype.hasChildren=function(){var t=this.path();return!!t&&Ft(t).batchSize(0).count()>0},e.prototype.orderedChildren=function(){var t=this.children(),e=this.get("childOrder","referencelist");return d.isArray(e)?d.sortBy(t,function(t){var n=d.invoke(e,"id").indexOf(t.id());return-1===n?e.length:n}):t},e.prototype.backlinks=function(){return e.where("*","linksTo",this).take()},e.prototype.ancestors=function(){var t=this.parentPath();return t?function(t){var e=["/"];if("/"===t)return e;var n=t.split("/").slice(1),r="";return n.forEach(function(t){r=r+"/"+t,e.push(r)}),e}(t).map(function(t){return e.getByPath(t)}):[]},e.prototype.isRestricted=function(){var t=this.restriction();return!!t&&t.length>0},e.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},e.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},e.prototype.unrestrict=function(){this.update({_restriction:null})},e.prototype.update=function(t){var e=this,n=it(t);Object(R.r)(function(){e.persistWidgets(e,n);var t=Ct(n);e.objData.update(t)}),this.startLinkResolution()},e.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},e.prototype.insertWidget=function(t,e){var n,r=function(t){if(function(t){return!!t.before}(t))return t.before.id();return t.after.id()}(e),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,u=i.index,l=e.before?u:u+1,c=o.slice(0,l).concat([t],o.slice(l));s.update(((n={})[a]=[c,["widgetlist"]],n))}},e.prototype.removeWidget=function(t){var e=this.fieldContainingWidget(t);if(e){var n=e.get(),r=d.reject(n,function(e){return e.equals(t)});e.update(r)}},e.prototype.siblingWidget=function(t,e){var n=this._widgetPlacementFor(t.id());if(n)return n.attributeValue[n.index+e]},e.prototype.copyAsync=function(t){return void 0===t&&(t={}),function(t){if(d.difference(d.keys(t),["_path"]).length)throw new u.a('Currently only "_path" copy option is supported.')}(t),this._copyAttributes().then(function(n){var r=d.extend(n,t),i=e.createWithSerializedAttributes(st(),r);return i.objData.finishSaving().then(function(){return i})})},e.prototype.moveToAsync=function(t){return this.moveTo(t),this.finishSaving()},e.prototype.moveTo=function(t){this.update({_path:[t+"/"+this.id()]})},e.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},e.prototype.finishSaving=function(){var t=this;return this.finishLinkResolution().then(function(){return t.objData.finishSaving()})},e.prototype.equals=function(t){return!!It(t,e)&&this.id()===t.id()},e.prototype.widget=function(t){return this.getWidgetAttribute(t,"_obj_class")?bt.build(t,this):null},e.prototype.getWidgetAttribute=function(t,e){return this.objData.getWidgetAttribute(t,e)},e.prototype.widgets=function(){var t=this.getData();if(!Ht(t))return[];var e=t._widget_pool;if(!e)return[];var n=[];return this.collectWidgets(n,t,e,{}),n},e.prototype.fieldContainingWidget=function(t){var e=t.id(),n=this._widgetPlacementFor(e);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},e.prototype.generateWidgetId=function(){for(var t=0;t<10;t++){var n=e.generateWidgetId();if(!this.widget(n))return n}throw new u.g("Could not generate a new unused widget id.")},e.prototype.serializeAttributes=function(){var e=t.prototype.serializeAttributes.call(this,this.getData());return delete e._conflicts,delete e._modification,delete e._created_at,delete e._created_by,delete e._last_changed,delete e._last_changed_by,e},e.prototype.slug=function(){var t,e=this.get("title","string");return"string"!=typeof(t=e)?"":h(t)},e.prototype.getWidgetData=function(t){return this.objData.getWidget(t)},e.prototype.startLinkResolution=function(){Object(a.l)()||zt().startLinkResolutionFor(st(),this.id())},e.prototype.finishLinkResolution=function(){return zt().finishLinkResolutionFor(st(),this.id())},e.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},e.prototype.getAttributeData=function(t){return this.objData.getAttribute(t)},e.prototype.getData=function(){return this.objData.get()},e.prototype.blob=function(){return this.get("blob",["binary"])},e.prototype._copyAttributes=function(){var t=e.generateId(),n=this.serializeAttributes(),r=[];return d.each(n,function(e,i){if("_"!==i[0]){if(function(t){return"binary"===t[0]&&!!t[1]}(e)){var o=e[1],a=new z({idToCopy:o.id}).intoId(t).then(function(t){return{name:i,binary:t}});r.push(a)}}else delete n[i]}),n._id=t,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+t),u.j.all(r).then(function(t){return d.each(t,function(t){var e=t.name,r={id:t.binary.id()};n[e]=["binary",r]}),n})},e.prototype.collectWidgets=function(t,e,n,r){var i=this;d.map(e,function(t,e){if(t&&!Object(u.z)(e)){var n=t;return Object(H.h)(n)?n[1]:void 0}}).forEach(function(e){e&&e.forEach(function(e){if(!r[e]){r[e]=!0;var o=i.widget(e);if(o){t.push(o);var a=n[e];i.collectWidgets(t,a,n,r)}}})})},e.prototype._widgetPlacementFor=function(t){var e=this.getData();if(Ht(e)){var n=Object(a.f)(e,t);if(n){var r,i=Object(u.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}}}},e}(rt),Bt=Mt;function qt(t){return bt.newWithSerializedAttributes(t)}function Ft(t){return Mt.all().and("_parentPath","equals",t)}function zt(){if(!Dt)throw new Error("No Link Handler");return Dt}function Ut(t){Dt=t}function Ht(t){return!!t&&Object(H.f)(t)}var Wt=function(){return(Wt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Vt=function(){function t(t){this.attributes=Wt({},t)}return t.prototype.title=function(){return this.attributes.title||null},t.prototype.query=function(){return this.attributes.query||null},t.prototype.hash=function(){return this.attributes.hash||null},t.prototype.rel=function(){return this.attributes.rel||null},t.prototype.target=function(){return this.attributes.target||null},t.prototype.url=function(){return this.attributes.url||null},t.prototype.objId=function(){return this.attributes.objId||null},t.prototype.obj=function(){var t=this.objId();return t?Bt.get(t):null},t.prototype.queryParameters=function(){return c(this.query()||"")},t.prototype.isExternal=function(){return!!this.url()},t.prototype.isInternal=function(){return!this.isExternal()},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.isExternal()?this.hash()===e.hash()&&this.query()===e.query()&&this.rel()===e.rel()&&this.target()===e.target()&&this.title()===e.title()&&this.url()===e.url():this.objId()===e.objId()&&this.title()===e.title());var n,r},t.prototype.copy=function(e){void 0===e&&(e={});var n=Wt({},this.attributes,e);if(e.objId&&e.url)throw new u.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return e.objId?n.url=null:e.url&&(n.objId=null),new t(n)},t.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},t.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},t}();function Kt(t){var e=t.get(),n=function(t){var e=t.getDiff();if(Object(H.i)(e))return e.content}(t);return n?Object(d.compact)(n.map(function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=Qt(e,o))return{widget:r,modification:"new"};break;case"=":if(r=Qt(e,o))return{widget:r,modification:null};break;case"-":if(r=function(t,e){var n=Bt.getInWorkspace("published",t);if(n)return n.widget(e);return null}(t.obj().id(),o))return{widget:r,modification:"deleted"}}})):e.map(function(t){return{widget:t,modification:null}})}function Qt(t,e){return Object(d.find)(t,function(t){return t.id()===e})||null}n.d(e,"AnyNormalizedSingleTypeInfo",function(){return i.AnyNormalizedSingleTypeInfo}),n.d(e,"AnyNormalizedTypeInfo",function(){return i.AnyNormalizedTypeInfo}),n.d(e,"AnyNormalizedTypeOptions",function(){return i.AnyNormalizedTypeOptions}),n.d(e,"AnyTypeInfo",function(){return i.AnyTypeInfo}),n.d(e,"AnyTypeOptions",function(){return i.AnyTypeOptions}),n.d(e,"NormalizedTypeInfo",function(){return i.NormalizedTypeInfo}),n.d(e,"AttributeType",function(){return o.AttributeType}),n.d(e,"BasicAttributeDict",function(){return o.BasicAttributeDict}),n.d(e,"BasicAttributeValue",function(){return o.BasicAttributeValue}),n.d(e,"BasicAttributeValueForUpdate",function(){return o.BasicAttributeValueForUpdate}),n.d(e,"SystemAttributeValue",function(){return o.SystemAttributeValue}),n.d(e,"BasicField",function(){return s}),n.d(e,"BasicLink",function(){return Vt}),n.d(e,"BasicLinkAttributes",function(){}),n.d(e,"BasicObjFacetValue",function(){return v}),n.d(e,"ObjSearchParams",function(){}),n.d(e,"BasicObjSearch",function(){return _}),n.d(e,"OPERATORS",function(){return y}),n.d(e,"BasicSearchValue",function(){}),n.d(e,"SearchField",function(){}),n.d(e,"SearchOperator",function(){}),n.d(e,"Boost",function(){}),n.d(e,"BasicObj",function(){return Bt}),n.d(e,"MaybeBasicObj",function(){}),n.d(e,"setLinkHandler",function(){return Ut}),n.d(e,"LinkHandler",function(){}),n.d(e,"BasicWidget",function(){return bt}),n.d(e,"TransformationDefinition",function(){}),n.d(e,"Binary",function(){return $}),n.d(e,"BlobMock",function(){}),n.d(e,"FutureBinary",function(){return z}),n.d(e,"FutureBinaryOptions",function(){}),n.d(e,"IdToCopySource",function(){}),n.d(e,"SourceSource",function(){}),n.d(e,"setBinaryHandler",function(){return M}),n.d(e,"BinaryHandler",function(){}),n.d(e,"MetadataCollection",function(){return V}),n.d(e,"BinaryMetadataValue",function(){}),n.d(e,"ObjSearchType",function(){return N}),n.d(e,"LinkType",function(){return P}),n.d(e,"ObjType",function(){return T}),n.d(e,"WidgetType",function(){return A}),n.d(e,"BinaryType",function(){return I}),n.d(e,"QueryParameters",function(){}),n.d(e,"parseQuery",function(){return c}),n.d(e,"queryParametersFromUrl",function(){return f}),n.d(e,"currentWorkspaceId",function(){return st}),n.d(e,"resetCurrentWorkspaceId",function(){return lt}),n.d(e,"setCurrentWorkspaceId",function(){return ut}),n.d(e,"getPlacementModificationInfos",function(){return Kt}),n.d(e,"PlacementModification",function(){})},,function(t,e,n){"use strict";n.r(e);var r=n(98),i=n(0),o=new i.d,a=function(){return o.current()};function s(t){var e={subscribes:[],missing:!1,outdated:!1},n=o.runWith(e,t);return new c(e,n)}function u(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function l(){return void 0!==a()}var c=function(){function t(t,e){this.captureList=t,this.result=e}return t.prototype.forwardToCurrent=function(){var t,e,n=a();n?(t=n,e=this.captureList,t.subscribes=t.subscribes.concat(e.subscribes),t.missing=t.missing||e.missing,t.outdated=t.outdated||e.outdated):this.captureList.missing&&u()},t.prototype.isAllDataLoaded=function(){return!this.captureList.missing},t.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},t.prototype.subscribeLoading=function(t){var e=this.captureList.subscribes.map(function(t){return t()});t.unsubscribe(),t.storeUnsubscribe(function(){e.forEach(function(t){return t()})})},t}(),f=function(){function t(){}return t.prototype.storeUnsubscribe=function(t){this.unsubscribeCallback=t},t.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},t}();var d=n(6);function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.apply(void 0,[t].concat(e));var r=new i.e,o=V(function(){return Object(i.M)(function(){return Object(d.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},t)})},function(t){if(t.allDataUpToDate){o.unsubscribe();var e=t.result;e.errorThrown?r.reject(e.error):r.resolve(e.result)}});return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),v=function(){function t(t){this.container=t}return t.prototype.reader=function(){return this.container.reader().subState("value")},t.prototype.status=function(){return this.getStateKey("status")||"MISSING"},t.prototype.value=function(){return this.getStateKey("value")},t.prototype.error=function(){return this.getStateKey("error")},t.prototype.version=function(){return this.getStateKey("version")},t.prototype.transitionToMissing=function(){this.setState(void 0)},t.prototype.transitionToAvailable=function(t,e){this.setState({status:"AVAILABLE",value:t,version:e})},t.prototype.transitionToError=function(t,e){this.setState({status:"ERROR",error:t,version:e})},t.prototype.setState=function(t){this.container.set(t)},t.prototype.getStateKey=function(t){return this.container.subState(t).get()},t}(),m={},y={};function g(t,e){var n=!0;b(t,1);var r=m[t];r||(m[t]=e);var i=r||e;return i.notifyDataRequired(),function(){n&&(n=!1,b(t,-1)<1&&i.notifyDataNoLongerRequired())}}function b(t,e){var n=(y[t]||0)+e;return y[t]=n,n}function w(t){var e=m[t];e&&e.notifyDataWasSet()}var _,O=(_=function(t,e){var n,r;return(_=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),k=function(t){function e(){return t.call(this,"Data is not yet loaded.",!1)||this}return O(e,t),e}(i.i),x=function(){function t(t,e){this.loadableValue=t,this.stream=e,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return t.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},t.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},t.prototype.notifyDataWasSet=function(){},t.prototype.enqueueUpdate=function(){var t=this;this.isUpdateEnqueued||(Object(i.G)(function(){return t.update()}),this.isUpdateEnqueued=!0)},t.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},t.prototype.ensureStreamIsOpen=function(){var t=this;this.subscription||(this.subscription=this.stream.subscribe(function(e){t.bufferValue(e),t.enqueueUpdate()}))},t.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},t.prototype.bufferValue=function(t){this.bufferedValue=t,this.hasBufferedValue=!0},t.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},t}(),C=0,E=function(){function t(t,e,n){this.value=t,this.loader=e,this.invalidation=n}return t.prototype.notifyDataRequired=function(){this.triggerLoading()},t.prototype.notifyDataNoLongerRequired=function(){},t.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.hasBeenInvalidated=function(){return S(this.value,this.invalidation)},t.prototype.currentVersion=function(){return j(this.invalidation)},t.prototype.triggerLoading=function(){var t=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var e=this.currentVersion(),n=C++,r=function(){return t.currentLoad===n},i=function(e){r()&&Object(d.a)(function(){e(),t.notifyDataWasSet(),a()})},o=[],a=function(){return o.forEach(function(t){return t()})};this.loader({push:function(t){return o.push(t)},isReload:function(){return t.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then(function(n){return i(function(){return t.value.transitionToAvailable(n,e)})},function(n){return i(function(){return t.value.transitionToError(n,e)})}),this.currentLoad=n}},t.prototype.isLoading=function(){return void 0!==this.currentLoad},t}();function S(t,e){return!!e&&("MISSING"!==t.status()&&j(e)!==t.version())}function j(t){if(t){var e=t();if("number"==typeof e&&isNaN(e)){var n="invalidation callback returned unsuitable version "+e;throw new i.g(n)}return e}}var T=function(){function t(t){if(!t.state)throw new i.g("LoadableData needs state");this.value=new v(t.state),this.invalidation=t.invalidation,this.throwNotLoaded=t.throwNotLoaded||!1,this.id=t.state.id(),t.stream?this.loaderProcess=new x(this.value,t.stream):this.loaderProcess=new E(this.value,t.loader,t.invalidation)}return t.prototype.ensureAvailable=function(){var t,e,n=this;if(t=function(){return g(n.id,n.loaderProcess)},(e=a())&&e.subscribes.push(t),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(l()||(g(this.id,this.loaderProcess),u()),function(){var t=a();t&&(t.missing=!0)}(),this.throwNotLoaded)throw new k;return!1},t.prototype.get=function(){if(this.ensureAvailable())return P(this.id,this),this.value.value()},t.prototype.reader=function(){return P(this.id,this),this.value.reader()},t.prototype.set=function(t){this.value.transitionToAvailable(t,this.currentVersion()),w(this.id)},t.prototype.setError=function(t){this.transitionToError(t),w(this.id)},t.prototype.reset=function(){this.value.transitionToMissing()},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},t.prototype.isError=function(){return"ERROR"===this.value.status()},t.prototype.numSubscribers=function(){return t=this.id,y[t]||0;var t},t.prototype.transitionToError=function(t,e){void 0===e&&(e=this.currentVersion()),this.value.transitionToError(t,e)},t.prototype.notifyIfOutdated=function(){var t;S(this.value,this.invalidation)&&(t=a())&&(t.outdated=!0)},t.prototype.currentVersion=function(){return j(this.invalidation)},t}(),A=new i.d;function P(t,e){var n=A.current();n&&(n[t]=e)}function N(t){var e,n={};return{result:A.runWith(n,t),usedData:(e=n,Object.keys(e).map(function(t){return e[t]}))}}function I(t,e){var n=s(function(){return L(t,e)});return l()&&n.forwardToCurrent(),n.result}function L(t,e){var n=B(e);return n.allDataLoaded?n.result:t}var D=n(2),R=n.n(D);function M(t,e){var n=[];if(R.a.each(t,function(t){var r=B(function(){return e(t)});r.success&&n.push(r.result)}),n.length<t.length)throw new k;return n}function B(t){var e=s(function(){return Object(i.M)(t)});e.forwardToCurrent();var n=e.result,r=e.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var q=function(){function t(t){var e=t.name,n=t.state,r=t.loader,o=t.invalidation;this.name=e,this.state=n,this.loader=r,this.invalidation=o,function(t,e){if(F[t])throw new i.g("collection name registered twice: "+t);F[t]=e}(e,this)}return t.prototype.get=function(t,e){var n=this,r=function(t){if("string"==typeof t)return t;return Object(i.s)(t)}(t),o=this.invalidation,a=new T({state:this.state().subState(r),loader:function(r){return n.loader(t,r,e)},invalidation:o?function(){return o(t)}:void 0});return function(t,e){t.affiliation=e}(a,{collectionName:this.name,key:t}),a},t}();var F={};function z(t){Object(d.r)(function(){return t.forEach(U)})}function U(t){var e=t[0],n=t[1],r=t[2];(function(t){var e=F[t];if(!e)throw new i.g("collection with name "+t+" not found");return e})(e).get(n).set(r)}function H(t){return t.map(W)}function W(t){var e=function(t){return t.affiliation}(t);if(!e)throw new i.g("Tried to record a LoadableData without affiliation");return[e.collectionName,e.key,t.get()]}function V(t,e){var n=new f,r=Object(d.k)(function(){return s(function(){return Object(i.M)(t)})},function(t){t.subscribeLoading(n);var r=t.result;if(r.errorThrown){if(!t.isAllDataUpToDate())return;throw r.error}e({result:r.result,allDataLoaded:t.isAllDataLoaded(),allDataUpToDate:t.isAllDataUpToDate()})});return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}n.d(e,"loadAllUntil",function(){return r.default}),n.d(e,"capture",function(){return s}),n.d(e,"CaptureList",function(){}),n.d(e,"CaptureReport",function(){return c}),n.d(e,"isCurrentlyCapturing",function(){return l}),n.d(e,"LoadingSubscriber",function(){return f}),n.d(e,"load",function(){return p}),n.d(e,"LoadableData",function(){return T}),n.d(e,"reportUsedData",function(){return N}),n.d(e,"LoaderApi",function(){}),n.d(e,"LoaderCallback",function(){}),n.d(e,"LoadableState",function(){}),n.d(e,"loadableWithDefault",function(){return I}),n.d(e,"loadWithDefault",function(){return L}),n.d(e,"mapAndLoadParallel",function(){return M}),n.d(e,"runAndCatchErrorsWhileLoading",function(){return B}),n.d(e,"RunResult",function(){}),n.d(e,"NotLoadedError",function(){return k}),n.d(e,"DataRecording",function(){}),n.d(e,"loadRecording",function(){return z}),n.d(e,"generateRecording",function(){return H}),n.d(e,"LoadableCollection",function(){return q}),n.d(e,"LoadableCollectionState",function(){}),n.d(e,"observeAndLoad",function(){return V})},function(t,e,n){"use strict";var r=n(0),i=n(2),o=function(){function t(t,e){this.value=t,this.copy=e,this.valueForReading=new r.d}return t.prototype.read=function(t){var e=this.value;return this.valueForReading.runWith(e,function(){return t(e)})},t.prototype.write=function(t){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),t(this.value)},t}(),a=function(){function t(t){this.notifySubscribers=t,this.subscribersStore=new o([],function(t){return t.slice()})}return t.prototype.create=function(t,e){return void 0===e&&(e=0),new s(this.subscribersStore,t,e)},t.prototype.count=function(){return this.subscribersStore.read(function(t){return t.length})},t.prototype.reset=function(){this.subscribersStore.write(function(t){t.length=0})},t.prototype.notify=function(){var t=this;this.subscribersStore.read(function(e){return t.notifySubscribers(e)})},t}(),s=function(){function t(t,e,n){void 0===n&&(n=0),this.subscriberStore=t,this.listener=e,this.rank=n,this.active=!1}return t.prototype.subscribeChanges=function(t){var e=this;this.stateReference=t,this.active||(this.subscriberStore.write(function(t){var n=Object(i.sortedIndex)(t,e,"rank");t.splice(n,0,e)}),this.active=!0),this.hasChanges()&&this.listener()},t.prototype.unsubscribe=function(){var t=this;this.active&&(this.subscriberStore.write(function(e){var n=e.indexOf(t);n>=0&&e.splice(n,1)}),this.active=!1)},t.prototype.notify=function(){this.active&&this.listener()},t.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},t}(),u=new a(function(t){t.forEach(function(t){t.hasChanges()&&t.notify()})}),l=new a(function(t){t.forEach(function(t){Object(r.G)(function(){t.hasChanges()&&t.notify()})})}),c=function(){function t(){this.listenersStore=new o([],function(t){return t.slice()})}return t.prototype.subscribe=function(t){var e=this,n=!0,r=function(){n&&t()};return this.listenersStore.write(function(t){return t.push(r)}),function(){n=!1,e.listenersStore.write(function(t){var e=t.indexOf(r);t.splice(e,1)})}},t.prototype.count=function(){return this.listenersStore.read(function(t){return t.length})},t.prototype.clear=function(){this.listenersStore.write(function(t){t.length=0})},t.prototype.notify=function(){this.listenersStore.read(function(t){return t.forEach(function(t){return t()})})},t}();function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return null!==t&&"object"===f(t)&&!Array.isArray(t)&&!function(t){var e=Object.getPrototypeOf(t);if(null===e)return!1;return null!==Object.getPrototypeOf(e)}(t)}function p(t,e){return t===e?e:d(e)?function(t,e){var n={},r=!1;void 0===t&&(r=!0);var i=Object.keys(e),o=new Set;t&&Object.keys(t).forEach(function(t){return o.add(t)});o.size!==i.length&&(r=!0);return i.forEach(function(i){o.has(i)||(r=!0);var a=t?t[i]:void 0,s=p(a,e[i]);s!==a&&(r=!0),n[i]=s}),r?Object.freeze(n):t}(d(t)?t:void 0,e):Array.isArray(e)?function(t,e){var n=!1;void 0!==t&&t.length===e.length||(n=!0);var r=e.map(function(e,r){var i=t?t[r]:void 0,o=p(i,e);return o!==i&&(n=!0),o});return n?Object.freeze(r):t}(Array.isArray(t)?t:void 0,e):e}var h,v,m,y,g,b,w,_=(h=function(t,e){var n,r;return(h=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector(function(){return e!==t.untrackedGet()}),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.set=function(t){var e=this.untrackedGet(),n=p(e,t);n!==e&&this.uncheckedSet(n)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new E(this,t)},t.prototype.reader=function(){return this},t.prototype.setSubState=function(t,e){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===e){var o=Object.keys(i);if(1===o.length&&o[0]===t)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===e?delete s[t]:s[t]=e,this.uncheckedSet(Object.freeze(a))}else{var u=Object.freeze(((n={})[t]=e,n));this.uncheckedSet(u)}},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(null!=e)return e[t]},t}(),k=function(){function t(t){this.detector=t}return t.prototype.hasChanges=function(){return this.detector()},t}(),x=function(t){function e(){var e=t.call(this)||this;return e.listeners=new c,e.detectorRecording=new r.d,e.batchUpdates=new r.d,e.version=0,e.frozenContextContainer=new r.d,e}return _(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.withFrozenState=function(t,e){return this.frozenContextContainer.runWith(t,e)},e.prototype.failIfTracking=function(t){if(this.detectorRecording.current())throw new r.g(t)},e.prototype.failIfFrozen=function(t){var e=this.frozenContextContainer.current();if(e){var n=t+" is not permitted inside '"+e.contextName+"'. "+(e.message||"");throw new C(n)}},e.prototype.uncheckedSet=function(t){this.failIfFrozen("Changing state"),this.state=t,this.version++,this.insideBatchUpdate()||this.notifyListeners()},e.prototype.trackStateAccess=function(t){var e=this.trackChanges(t),n=e.detector;return{result:e.result,accessedState:new k(n)}},e.prototype.recordDetector=function(t){var e=this.detectorRecording.current();void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return""},e.prototype.subscribe=function(t){return this.listeners.subscribe(t)},e.prototype.withBatchedUpdates=function(t){var e=this.state;try{this.batchUpdates.runWith(!0,t)}finally{this.insideBatchUpdate()||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.count()},e.prototype.clearListeners=function(){this.listeners.clear()},e.prototype.trackChanges=function(t){var e=this,n=this.version,r=this.recordDetectors(t),o=r.result,a=r.detectors;return{result:o,detector:function(){return e.version!==n&&!!Object(i.find)(a,function(t){return t()})}}},e.prototype.recordDetectors=function(t){var e=[],n=this.detectorRecording.runWith(e,t),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,e),{result:n,detectors:e}},e.prototype.notifyListeners=function(){var t=this;this.withFrozenState({contextName:"state listeners"},function(){t.listeners.notify()})},e.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},e}(O),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i),E=function(t){function e(e,n){var r=t.call(this)||this;return r.parentState=e,r.key=n,r.tree=e.getTree(),r}return _(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.uncheckedSet=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){if(void 0===this.cachedId){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+t}return this.cachedId},e}(O);function S(t){t?(v=void 0,m=t.stateController(),y=t.createAppState(),w=t.sharedCmsState(),g=y.subState("localCms")):(v=new x,m=v,y=A(),w=v.subState("sharedCms"),g=v.subState("localCms"),b=v.subState("ui")),q()}var j,T=0;function A(){if(!v)throw new r.g;var t=(T++).toString();return v.subState("apps").subState(t)}function P(t){return m.withBatchedUpdates(t)}function N(){return m}function I(t){return m.trackStateAccess(t)}function L(t,e){return m.withFrozenState(t,e)}function D(t){return m.failIfFrozen(t)}function R(t){return m.failIfTracking(t)}function M(t){return l.create(t)}function B(t,e){return void 0===e&&(e=0),u.create(t,e)}function q(){j=m.subscribe(function(){u.notify(),l.notify()})}function F(){j&&j(),y.clear()}var z=[],U=function(){return 0!==z.length};function H(t){U()||Object(r.G)(function(){return P(function(){return function t(e){z=[];try{e.forEach(function(t){return t()})}finally{U()&&t(z)}}(z)})}),z.push(t)}function W(t,e){var n,i=!0,o=!1,a=M(s);function s(){if(i){var s=I(function(){return L({contextName:"observe",message:"Extract all side-effects into the listener function"},t)});a.subscribeChanges(s.accessedState);var u=s.result;o&&Object(r.v)(u,n)||(e(u),n=u,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function V(t,e){var n=I(function(){return L({contextName:"observeSync",message:"Use non-sync observe or nextTick"},t)}),i=n.result,o=B(function(){var n=I(t);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(e(a),i=a)});return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function K(t){return new r.j(function(e){var n=W(t,function(t){null!=t&&(n.unsubscribe(),e(t))})})}n.d(e,"d",function(){return A}),n.d(e,"c",function(){return g}),n.d(e,"m",function(){return w}),n.d(e,"o",function(){return I}),n.d(e,"r",function(){return P}),n.d(e,"s",function(){return L}),n.d(e,"g",function(){return D}),n.d(e,"h",function(){return R}),n.d(e,"i",function(){return N}),n.d(e,"p",function(){return b}),n.d(e,"b",function(){return y}),n.d(e,"j",function(){return S}),n.d(e,"n",function(){return F}),n.d(e,"e",function(){return M}),n.d(e,"f",function(){return B}),n.d(e,"a",function(){return H}),n.d(e,"k",function(){return W}),n.d(e,"l",function(){return V}),n.d(e,"q",function(){return K})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(6),a="GET",s="SEND",u=1;function l(t,e){var n=u++,l={};return Object.keys(t).forEach(function(u){var c=t[u];c===a&&(l[u]=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),l=u,c=s.subState(l).subState(Object(r.s)(t));return new i.LoadableData({state:c,stream:e.stream.apply(e,[l].concat(t))}).get()}),c===s&&(l[u]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.send.apply(e,[u].concat(t))})}),l}function c(t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k(function(r){return Object(i.observeAndLoad)(function(){var r=t();if(r){var i=r[e];return{valueFromClient:i.call.apply(i,[r].concat(n))}}},function(t){t.allDataLoaded&&void 0!==t.result&&r.next(t.result.valueFromClient)}).unsubscribe})},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.j(function(r){Object(o.q)(t).then(function(t){var i=t[e];r(i.call.apply(i,[t].concat(n)))})})}}}function f(t,e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=e[t];return new r.k(function(t){return Object(i.observeAndLoad)(function(){return a.call.apply(a,[e].concat(n))},function(e){e.allDataLoaded&&t.next(e.result)}).unsubscribe})},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=e[t];return new r.j(function(t){Object(r.G)(function(){return t(o.call.apply(o,[e].concat(n)))})})}}}function d(t){return{incomingMessages:new r.k(function(e){function n(t){e.next({data:t.data})}return t.addEventListener("message",n),t.start(),function(){t.removeEventListener("message",n)}}),sendMessage:function(e){t.postMessage(e.data,e.transfer)}}}var p=function(){function t(t){this.muxedStream=t,this.openStreams={}}return t.prototype.streamWithId=function(t){var e=this;return new r.k(function(n){e.ensureSubscribed();var r=e.subjectForStreamId(t).subscribe(n);return function(){r.unsubscribe(),e.removeSubjectIfAbandoned(t)}})},t.prototype.removeSubjectIfAbandoned=function(t){0===this.subjectForStreamId(t).subscriberCount()&&(delete this.openStreams[t],this.unsubscribeIfAbandoned())},t.prototype.subjectForStreamId=function(t){var e=this.openStreams[t];if(e)return e;var n=new r.l;return this.openStreams[t]=n,n},t.prototype.ensureSubscribed=function(){var t=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(e){var n=e.streamId,r=t.openStreams[n];r&&r.next(e.data)},complete:function(){return Object.keys(t.openStreams).forEach(function(e){var n=t.openStreams[e];n&&(n.complete(),delete t.openStreams[e])})}}))},t.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},t}();function h(t){return t&&"number"==typeof t.channel&&"string"==typeof t.verb}function v(t){return"string"==typeof t.method&&Array.isArray(t.params)}function m(t){return"CLOSE"===t.verb}function y(t){return"RESPOND"===t.verb}function g(t){return"ERROR"===t.verb}function b(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var w,_=(w=function(t,e){return(w=Object.setPrototypeOf||b({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function O(t){return new k(t)}var k=function(){function t(t){this.portLink=t,this.channelCounter=1,this.incomingChannels=new p(this.portLink.incomingMessages.map(function(t){return t.data}).filter(h).map(function(t){return{streamId:t.channel,data:t}}))}return t.prototype.stream=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k(function(r){var i=e.getNextChannelId();e.postMessage({channel:i,verb:"OPEN",method:t,params:n});var o=e.incomingChannels.streamWithId(i).subscribe(function(t){y(t)&&r.next(t.data)});return function(){e.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}})},t.prototype.send=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.getNextChannelId();return this.postMessage({channel:r,verb:"SEND",method:t,params:e}),this.incomingChannels.streamWithId(r).filter(j).takeOne().toPromise().then(function(t){if(!t)throw new C;if(g(t))throw new x;return t.data})},t.prototype.postMessage=function(t){this.portLink.sendMessage({data:t,transfer:E(t)})},t.prototype.getNextChannelId=function(){return this.channelCounter++},t}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i);function E(t){if("SEND"===t.verb)return t.params.filter(S)}function S(t){return b(t,MessagePort)}function j(t){return y(t)||g(t)}function T(t,e,n){return t[n.methodName]===e}function A(t,e,n){new P(t,e,n).start()}var P=function(){function t(t,e,n){this.portLink=t,this.adapterConnection=e,this.description=n,this.incomingMessages=t.incomingMessages.map(function(t){return t.data}).filter(h),this.incomingChannels=new p(this.incomingMessages.map(function(t){return{streamId:t.channel,data:t}}))}return t.prototype.start=function(){var t=this;this.incomingMessages.subscribe(function(e){!function(t){return"OPEN"===t.verb&&v(t)}(e)?function(t){return"SEND"===t.verb&&v(t)}(e)&&t.handleSendMessage(e):t.handleOpenStreamMessage(e)})},t.prototype.handleOpenStreamMessage=function(t){var e,n=this,r=N(t);if(T(this.description,a,r)){var i=(e=this.adapterConnection).stream.apply(e,[r.methodName].concat(r.params)),o=t.channel,s=i.subscribe(function(t){n.postMessage({verb:"RESPOND",data:t,channel:o})});this.incomingChannels.streamWithId(o).filter(m).takeOne().toPromise().then(function(){s.unsubscribe()})}},t.prototype.handleSendMessage=function(t){var e,n=this,i=N(t);T(this.description,s,i)&&(e=this.adapterConnection).send.apply(e,[i.methodName].concat(i.params)).then(function(e){return n.postMessage({verb:"RESPOND",data:e,channel:t.channel})},function(e){n.postMessage({verb:"ERROR",channel:t.channel}),Object(r.Q)(e)})},t.prototype.postMessage=function(t){this.portLink.sendMessage({data:t})},t}();function N(t){return{methodName:t.method,params:t.params}}n.d(e,"c",function(){return l}),n.d(e,"f",function(){return c}),n.d(e,"b",function(){return s}),n.d(e,"a",function(){return a}),n.d(e,"d",function(){return f}),n.d(e,"g",function(){return d}),n.d(e,"e",function(){return O}),n.d(e,"h",function(){return A})},,function(t,e,n){"use strict";var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",function(){return T}),n.d(r,"perform",function(){return A}),n.d(r,"reset",function(){return P}),n.d(r,"currentState",function(){return I});var i,o="&scrivito.authFailedCount=";function a(){i=0}var s={init:function(t){a();var e=t.location,n=e.hash,r=n.indexOf(o);if(!(r<0)){var s=n.substr(r+o.length,3),u=n.substring(0,r);"#"===u&&(u="");var l=e.href.toString().replace(n,u);i=parseInt(s,10)||0,t.history.replaceState({},"",l)}},augmentedRedirectUrl:function(t){var e=t.toString();return t.hash||(e+="#"),""+e+o+(i+1)},reset:a,currentFailureCount:function(){return i}},u=n(0),l=n(2),c=n(13);var f,d,p=(f=function(t,e){var n,r;return(f=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.httpCode=n,i.backendCode=r,i}return p(e,t),e.for=function(t,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new b(t,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new w(t,n,r):new e(t,n,r)},e}(u.i),v=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.i),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.i),g=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r)||this;return o.details=i||{},o}return p(e,t),e}(h),b=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),w=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return p(e,t),e}(h),_=!1,O=0;function k(){return O>0}function x(t,e,n){var r=n.params,i=n.authorization,o=n.forceVerification;return _?u.j.resolve(new XMLHttpRequest):(O+=1,new u.j(function(n,a){var s=function(t,e,n,r){var i=new XMLHttpRequest;function o(t){!function(t,e){O-=1,e(t)}(new y(t),r)}return i.open("POST"===t?"POST":"PUT",e),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(t,e,n){O-=1;var r=t.status;if(!r||!Object(l.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?t.statusText:t.responseText);n(new y(i))}e(t)}(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}(t,e,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))}))}function C(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}d={},window._scrivitoRegisterVerificator=function(t,e){d[t].resolve(e)};var E,S,j=function(){var t=function(e,n){return(t=Object.setPrototypeOf||C({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T="client_verification_required";!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}j(e,t)}(g);function A(t){return t(N()).catch(function e(n){if(!function(t){return C(t,g)&&t.backendCode===T}(n))throw n;return function(t){if(!E){var e=t.verificator,n=t.data,r=(i=e.id,o=e.url,a=d[i],a||(a=new u.e,d[i]=a,Object(u.E)(o)),a.promise).then(function(t){return new u.j(function(e){t(n,function(t){e((S=t).authorization)})})});E={challenge:{verificator:e,data:n},promise:Object(u.J)(r,function(){E=void 0})}}var i,o,a;return E.promise}(n.details).then(t).catch(e)})}function P(){E=void 0,S=void 0}function N(){if(S){if(!(S.expiresAfter<new Date))return S.authorization;S=void 0}}function I(){var t=N();if(t)return"Authorization: "+t;if(E){var e=E.challenge;return"Pending computation: "+e.verificator.id+" with "+e.data}return null}var L,D,R=n(14);function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var B=function(){function t(){this.initDeferred=new u.e,this.authHeaderValueProvider=r}return t.prototype.init=function(t,e,n){e&&(this.tenant=e,this.endpoint=t,this.url=c(t+"/tenants/"+e+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},t.prototype.get=function(t,e){return this.perform("GET",t,e)},t.prototype.put=function(t,e){return this.perform("PUT",t,e)},t.prototype.post=function(t,e){return this.perform("POST",t,e)},t.prototype.delete=function(t,e){return this.perform("DELETE",t,e)},t.prototype.requestBuiltInUserSession=function(t){var e=this;return this.ensureInitialized().then(function(){return e.ajax("PUT","sessions/"+t)}).then(function(t){return s.reset(),t})},t.prototype.requestVisitorSession=function(t,e){var n=this;return this.ensureInitialized().then(function(){return n.ajax("PUT","sessions/"+t,void 0,"id_token "+e)})},t.prototype.enableForceVerification=function(){this.forceVerification=!0},t.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},t.prototype.ensureInitialized=function(){return this.initDeferred.promise},t.prototype.perform=function(t,e,n){var r=this;return this.ensureInitialized().then(function(){return r.send(t,e,n).then(function(t){return function(t){return!!t&&!!t.task&&1===Object(l.size)(t)}(t)?r.handleTask(t.task):t})})},t.prototype.send=function(t,e,n){var r=this;return this.authHeaderValueProvider.perform(function(i){return r.ajax(t,e,n,i)})},t.prototype.ajax=function(t,e,n,r){var i=this.url,o=this.forceVerification,a={params:{path:e,verb:t,params:n||{}},authorization:r,forceVerification:o};function s(){return function t(e,n){void 0===n&&(n=0);if(D)return new u.j(function(t){return t(e())});return e().then(function(r){if(429!==r.status)return r;if(L&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,q(n));return Object(u.T)(o).then(function(){return t(e,n+1)})})}(function(){return x(t,i,a)}).then(F)}return"POST"===t?s():function t(e,n){void 0===n&&(n=0);if(D)return new u.j(function(t){return t(e())});return e().catch(function(r){if(o=r,null!=(a=y)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a){if(L&&n>5)throw r;var i=q(n);return Object(u.T)(i).then(function(){return t(e,n+1)})}var o,a;throw r})}(s)},t.prototype.handleTask=function(t){var e=this;switch(t.status){case"success":return t.result;case"error":throw h.for(t.message,412,t.code);case"open":return Object(u.S)(2).then(function(){return e.get("tasks/"+t.id).then(function(t){return e.handleTask(t)})});default:throw new y("Invalid task response (unknown status)")}},t}();function q(t){return 500*Math.pow(2,Math.min(t,16))}function F(t){var e,n=t.status;try{e=JSON.parse(t.responseText)}catch(e){throw new y(t.responseText)}if(n>=200&&n<300)return e;if("auth_missing"===e.code){var r=e.details;if(r&&z(r)){var i=r.visit;if("string"==typeof i){var o=function(t){var e=s.augmentedRedirectUrl(Object(R.f)());return t.replace("retry=RETRY","retry="+s.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(e))}(i);throw Object(R.i)(o),new m("Insufficient authorization - please visit "+o)}}}throw function(t,e,n){if(401===t){var r=H(e);return new g(r.error,t,r.code,r.details)}if(403===t){var r=H(e),i=r.code;if(!i||!U(i))throw new y("Authentication failure response no string value for code");return new v(r.error,t,i)}if(e.error&&"4"===t.toString()[0]){var r=H(e);return h.for(r.error,t,r.code)}if(500===t)return U(e.error)?new y(e.error):new y(n);return new y(n)}(n,e,t.responseText)}function z(t){return"object"===M(t)&&!Array.isArray(t)}function U(t){return"string"==typeof t}function H(t){var e=t.error;if("string"!=typeof e)throw new y("Malformed error response (key error is not a string)");var n=t.code;if(void 0!==n&&!U(n))throw new y("Malformed error response (optional key code is not a string)");var r=t.details;if(void 0!==r&&!z(r))throw new y("Malformed error response (optional key details is not an object");return{code:n,error:e,details:r}}var W=new B;var V=new u.b(function(t){return W.get("blobs/mget",{blobs:t}).then(function(e){return e.results.map(function(e,n){return function(t,e){var n=e.public_access.get;if(!n.url)throw new u.g('Missing public access URL for binary "'+t+'"');var r={public_access:{get:{url:n.url}}},i=e.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(t[n].id,e)})})});var K={};function Q(t,e){return function(t){var e=K[t];e||(e=function(t){return new u.b(function(e){return W.get("workspaces/"+t+"/objs/mget",{ids:e,include_deleted:!0}).then(function(t){return t.results})},{batchSize:17})}(t),K[t]=e);return e}(t).retrieve(e).then(function(t){return t||{_deleted:e}})}var $=function(){return($=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function G(t,e){var n=$({consistent:!0},e);return W.get("workspaces/"+t+"/objs/search",n).then(function(t){var e=function(t){var e={results:t.results,total:t.total},n=t.continuation;void 0!==n&&(e.continuation=n);var r=t.objs;void 0!==r&&(e.objs=r);return e}(t);return{results:e.results.map(function(t){return t.id}),continuation:e.continuation,total:e.total,objs:e.objs}})}function Y(t){return!!t&&"widgetlist_diff"===t.format}var Z={retrieveObj:function(t,e){return Q(t,e)},retrieveObjQuery:function(t,e){return G(t,e)},retrieveFacetQuery:function(t,e){return function(t,e){return W.get("workspaces/"+t+"/objs/search",e).then(function(t){return{facets:t.facets.map(function(t){return t.map(function(t){return{total:t.total,value:t.value,results:t.results}})})}})}(t,e)},retrieveBinaryMetadata:function(t){return function(t){return W.get("blobs/"+encodeURIComponent(t||"")+"/meta_data")}(t)},retrieveBinaryUrls:function(t,e){return function(t,e){var n={id:t};return e&&(n.transformation=e),V.retrieve(n)}(t,e)},retrieveObjFieldDiffs:function(t,e){return function(t,e){return W.get("workspaces/"+t+"/objs/"+e+"/diff").then(function(t){return t})}(t,e)}};function X(t){Z=t}function J(t){return!t._deleted}function tt(t){return"widgetlist"===t[0]}n.d(e,"a",function(){return s}),n.d(e,"d",function(){return W}),n.d(e,"e",function(){return Z}),n.d(e,"j",function(){return X}),n.d(e,"b",function(){return m}),n.d(e,"c",function(){return g}),n.d(e,"g",function(){return k}),n.d(e,"f",function(){return J}),n.d(e,"h",function(){return tt}),n.d(e,"i",function(){return Y})},function(t,e,n){"use strict";var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n},s=function(){function t(t,e){var n={};e._scrivitoPrivateSchema&&r.extend(n,e._scrivitoPrivateSchema.attributes),t.attributes&&r.each(t.attributes,function(t,e){n[e]=function(t){if("string"==typeof t)return[t];return[t[0],l(t[1])]}(t)});var i=t.onlyInside;this.definition=o({},t,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return t.forInstance=function(t){return this.forClass(t.constructor)},t.forClass=function(t){return t._scrivitoPrivateSchema},t.basicFieldFor=function(e,n){var r=t.forInstance(e);if(r){var o=r.attributes[n];if(o)return new i.BasicField(e._scrivitoPrivateContent,n,o)}},Object.defineProperty(t.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),t.prototype.isBinary=function(){var t=this.definition.attributes.blob;return!!t&&"binary"===t[0]},t}();function u(t){return!(!t||!t._scrivitoPrivateSchema)}function l(t){if(!("only"in t))return t;var e=t.only,n=a(t,["only"]);return o({},n,{validClasses:"string"==typeof e?[e]:e})}var c=n(0);function f(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function d(t,e){if(Object(r.isArray)(e))return Object(r.map)(e,function(e){return d(t,e)});if(f(e,i.BasicObj))return p(e,t.objClassFor(e.objClass()));if(f(e,i.BasicWidget)){var n=e.objClass();return p(e,t.widgetClassFor(n))}if(f(e,i.BasicLink)){var o=Object.create(t.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=e,o}return e}function p(t,e){var n=Object.create(e.prototype);return n._scrivitoPrivateContent=t,n}function h(t){return Object(r.isArray)(t)?Object(r.map)(t,h):t&&t._scrivitoPrivateContent?t._scrivitoPrivateContent:t}function v(t,e,n){return Object(r.mapObject)(t,function(t,r){if(Object(c.z)(r))return[t];var i=e.attributes[r];if(!i)throw new c.a('Attribute "'.concat(r,'" is not defined for CMS object ')+'class "'.concat(n,'".'));return[h(t),i]})}function m(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var g=function(){function t(e){m(this,t),this._registry=e}var e,n,r;return e=t,(n=[{key:"getObj",value:function(t,e){var n=i.BasicObj.get(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"getObjIncludingDeleted",value:function(t,e){var n=i.BasicObj.getIncludingDeleted(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"read",value:function(t,e){var n=s.basicFieldFor(t,e);if(!n)return null;var r=n.get();return d(this._registry,r)}},{key:"update",value:function(t,e){var n,r=this._registry.objClassNameFor(t.constructor);if(!r)throw n=t.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new c.a('Updating is not supported on the base class "'.concat(n,'".'));if(e.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=v(e,s.forInstance(t),r);t._scrivitoPrivateContent.update(i)}},{key:"wrapInAppClass",value:function(t){return d(this._registry,t)}},{key:"_checkObjClassAndWrapInAppClass",value:function(t,e){if(!e)return null;var n=this._registry.objClassNameFor(t);if(n&&n!==e.objClass())throw new c.h('Obj with id "'.concat(e.id(),'" is not of type "').concat(n,'".'));return this.wrapInAppClass(e)}}])&&y(e.prototype,n),r&&y(e,r),t}();function b(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _(t){return function(){function e(){b(this,e)}var n,r,i;return n=e,(r=[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");if(Object(c.z)(e))throw new c.a('Attribute name "'.concat(e,'" is not a valid custom attribute name.'));return t.read(this,e)}},{key:"update",value:function(e){t.update(this,e)}}])&&w(n.prototype,r),i&&w(n,i),e}()}function O(t,e,n,r){var i={};return Object.keys(n.definition.attributes).forEach(function(n){if(!Object.prototype.hasOwnProperty.call(t,n)){var o=e.initialContentFor(r,n);void 0!==o&&(i[n]=o)}}),i}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function E(t,e){return!e||"object"!==k(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function T(t){var e=new g(t);function n(e,n){var r=new t.ObjSearch;return e&&r.and("_objClass","equals",e),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(e){return d(t,e)}return function(a){function u(){return x(this,u),E(this,S(u).apply(this,arguments))}var l,f,d;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(u,_(e)),l=u,d=[{key:"get",value:function(t){return e.getObj(this,t)}},{key:"getIncludingDeleted",value:function(t){return e.getObjIncludingDeleted(this,t)}},{key:"getByPath",value:function(t){return o(i.BasicObj.getByPath(t))}},{key:"getByPermalink",value:function(t){return o(i.BasicObj.getByPermalink(t))}},{key:"all",value:function(){return n(t.objClassNameFor(this),1e3)}},{key:"root",value:function(){return o(i.BasicObj.root())}},{key:"where",value:function(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return n(t.objClassNameFor(this)).and(e,r,i,o)}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(t,this._appClassName());var e=this._prepareAttributesForCreate(t);return o(i.BasicObj.create(e))}},{key:"createFromFile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){if(!c.f.is(t)){if(c.c.is(t))throw new c.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new c.a('Creating CMS objects from file is only available with instances of "File"')}}(t),function(t,e,n){if(A(t,e),Object.prototype.hasOwnProperty.call(t,"blob"))throw new c.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new c.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(e,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(e);return i.BasicObj.createFromFile(t,n).then(function(t){return o(t)})}},{key:"_prepareAttributesForCreate",value:function(e){var n=this._schema(),i=this._appClassName(),o=O(e,t,n,i),a={_objClass:i};return v(Object(r.extend)({},e,o,a),n,i)}},{key:"_appClassName",value:function(){return t.objClassNameFor(this)}},{key:"_schema",value:function(){return s.forClass(this)}}],(f=[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return o(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return o(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return o(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return o(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return o(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var t=s.forInstance(this);return!!t&&t.isBinary()}},{key:"isRestricted",value:function(){return this._scrivitoPrivateContent.isRestricted()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection}},{key:"restrict",value:function(){this._scrivitoPrivateContent.restrict()}},{key:"unrestrict",value:function(){this._scrivitoPrivateContent.unrestrict()}},{key:"widget",value:function(t){return o(this._scrivitoPrivateContent.widget(t))}},{key:"widgets",value:function(){return o(this._scrivitoPrivateContent.widgets())}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}}])&&C(l.prototype,f),d&&C(l,d),u}()}function A(t,e){if(!e)throw new c.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(t.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new c.a('Invalid attribute "_objClass". '+'"'.concat(t._objClass,'.create" will automatically set the CMS object class ')+"correctly.")}var P=function(){function t(t,e){this._registry=t,this._basicObjFacetValue=e}return t.prototype.name=function(){return this._basicObjFacetValue.name()},t.prototype.count=function(){return this._basicObjFacetValue.count()},t.prototype.includedObjs=function(){var t=this._basicObjFacetValue.includedObjs();return d(this._registry,t)},t}();function N(t){var e=function(){function e(){this._scrivitoPrivateContent=new i.BasicObjSearch}return e.prototype.and=function(t,n,r,i){if(u=t,null!=(l=e)&&"undefined"!=typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](u):u instanceof l){var o=t;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}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 a=I(r),s=t;this._scrivitoPrivateContent.and(s,n,a,i)}var u,l;return this},e.prototype.andNot=function(t,e,n){var r=I(n);return this._scrivitoPrivateContent.andNot(t,e,r),this},e.prototype.facet=function(e,n){return this._scrivitoPrivateContent.facet(e,n).map(function(e){return new P(t,e)})},e.prototype.first=function(){var e=this._scrivitoPrivateContent.first();return e?d(t,e):null},e.prototype.take=function(e){return this._scrivitoPrivateContent.take(e).map(function(e){return d(t,e)})},e.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map(function(e){return d(t,e)})},e.prototype.offset=function(t){return this._scrivitoPrivateContent.offset(t),this},e.prototype.order=function(t,e){return this._scrivitoPrivateContent.order(t,e),this},e.prototype.count=function(){return this._scrivitoPrivateContent.count()},e}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)e.prototype[n]=function(){var e=this._scrivitoPrivateContent.iterator();return{next:function(){var n=e.next();return n.done?{done:n.done}:{done:n.done,value:d(t,n.value)}}}}}return e}function I(t){return r.isArray(t)?t.map(function(t){return h(t)}):h(t)}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function M(t){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function F(t){var e=new g(t);return function(n){function o(){var e,n,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,o),n=this,e=!(r=M(o).call(this))||"object"!==L(r)&&"function"!=typeof r?B(n):r;var u=s.forInstance(B(e)),l=t.objClassNameFor(e.constructor),c=e._prepareAttributesForConstructor(a,u,l),f=new i.BasicWidget(c);return f.onDidPersist(function(e){var n=d(t,e),r=O(c,t,u,l);n.update(r)}),e._scrivitoPrivateContent=f,e}var a,u,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,_(e)),a=o,(u=[{key:"obj",value:function(){var e=this._scrivitoPrivateContent.obj();return d(t,e)}},{key:"copy",value:function(){var e=t.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),e)}},{key:"destroy",value:function(){this._scrivitoPrivateContent.remove()}},{key:"_prepareAttributesForConstructor",value:function(t,e,n){!function(t,e){if(!t)throw new c.a("Creating widgets is not supported for the class Widget or abstract classes.");if(e.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new c.a('Invalid attribute "_objClass". '+'"new '.concat(e._objClass,'" will automatically set the CMS object class correctly.'))}(n,t);var i={_objClass:n};return v(Object(r.extend)({},t,i),e,n)}}])&&R(a.prototype,u),l&&R(a,l),o}()}var z=["hash","obj","query","rel","target","title","url"];function U(t){return function(t){var e=r.without.apply(r,[r.keys(t)].concat(z));if(!r.isEmpty(e))throw new c.a("Unexpected attributes "+Object(c.I)(e)+". Available attributes: "+Object(c.I)(z))}(t),r.has(t,"obj")?r.extend({},t,{objId:H(t.obj)}):t}function H(t){return t?h(t).id():null}n(117);var W=function(){function t(){var t;this.mapping={},this.defaultClassForObjs=T(this),this.defaultClassForWidgets=F(this),this.defaultClassForLinks=(t=this,function(){function e(t){var e=U(t);this._scrivitoPrivateContent=new i.BasicLink(e)}return e.prototype.title=function(){return this._scrivitoPrivateContent.title()},e.prototype.query=function(){return this._scrivitoPrivateContent.query()},e.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},e.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},e.prototype.target=function(){return this._scrivitoPrivateContent.target()},e.prototype.url=function(){return this._scrivitoPrivateContent.url()},e.prototype.obj=function(){var e=this._scrivitoPrivateContent.obj();return e?d(t,e):null},e.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},e.prototype.copy=function(e){var n=this._scrivitoPrivateContent.copy(U(e)),r=Object.create(t.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},e.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},e.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},e}()),this.ObjSearch=N(this)}return t.prototype.register=function(t,e){this.mapping[t]=e},t.prototype.getClass=function(t){return this.mapping[t]||null},t.prototype.allObjClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForObjs.isPrototypeOf(e)})},t.prototype.allWidgetClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForWidgets.isPrototypeOf(e)})},t.prototype.objClassFor=function(t){return this.appClassFor(t,this.defaultClassForObjs)},t.prototype.widgetClassFor=function(t){return this.appClassFor(t,this.defaultClassForWidgets)},t.prototype.objClassNameFor=function(t){return r.findKey(this.mapping,function(e){return e===t})},t.prototype.setInitialContentFor=function(t){this.initialContentForFunction=t},t.prototype.initialContentFor=function(t,e){if(this.initialContentForFunction)return this.initialContentForFunction(t,e)},t.prototype.appClassFor=function(t,e){var n=this.getClass(t);return n&&e.isPrototypeOf(n)?n:e},t}();function V(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var K,Q=(K=function(t,e){return(K=Object.setPrototypeOf||V({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function $(t,e){if(e.extend&&!X(e.extend,t.defaultClassForObjs))throw new c.a('Invalid value for "extend": not a Scrivito Obj class');var n=e.extend||t.defaultClassForObjs,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function G(t,e){if(e.extend&&!X(e.extend,t.defaultClassForWidgets))throw new c.a('Invalid value for "extend": not a Scrivito Widget class');var n=e.extend||t.defaultClassForWidgets,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function Y(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return $(t,i)}(t,e,n);return t.register(e,i),i}function Z(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return G(t,i)}(t,e,n);return t.register(e,i),i}function X(t,e){return!!t&&(t===e||V(t.prototype,e))}var J=c.O.refinement(c.O.Function,u,"ObjClass"),tt=c.O.interface({attributes:c.O.maybe(c.O.dict(c.O.refinement(c.O.String,function(t){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(t)},"String (alphanumeric, starting with a lower-case character)"),c.O.union([c.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),c.O.tuple([c.O.enums.of(["enum","multienum"]),c.O.interface({values:c.O.list(c.O.String)})]),c.O.tuple([c.O.enums.of(["reference","referencelist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})]),c.O.tuple([c.O.enums.of(["widgetlist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})])]),"Attributes Specification")),extend:c.O.maybe(J)}),et=c.O.refinement(c.O.Function,u,"WidgetClass"),nt=c.O.interface({attributes:tt.meta.props.attributes,extend:c.O.maybe(et),onlyInside:c.O.maybe(c.O.union([c.O.String,c.O.Array]))}),rt=Object(c.p)("createObjClass",[["options",tt]],{docPermalink:"js-sdk/createObjClass"}),it=Object(c.p)("createWidgetClass",[["options",nt]],{docPermalink:"js-sdk/createWidgetClass"}),ot=c.O.union([tt,J]),at=Object(c.p)("provideObjClass",[["name",c.O.String],["objClassOrDefinition",ot]],{docPermalink:"js-sdk/provideObjClass"}),st=c.O.union([nt,et]),ut=Object(c.p)("provideWidgetClass",[["name",c.O.String],["widgetClassOrDefinition",st]],{docPermalink:"js-sdk/provideWidgetClass"});var lt=function(){function t(){this._registry=new W,this.appModelAccessor=new g(this._registry)}return t.init=function(e){var n=new t;return e.Obj=n.Obj,e.Widget=n.Widget,e.Link=n.Link,e.ObjSearch=n.ObjSearch,e.appModelAccessor=n.appModelAccessor,e.provideObjClass=function(t,e){return n.provideObjClass(t,e)},e.provideWidgetClass=function(t,e){return n.provideWidgetClass(t,e)},e.createObjClass=function(t){return n.createObjClass(t)},e.createWidgetClass=function(t){return n.createWidgetClass(t)},e.getClass=function(t){return n.getClass(t)},e.allObjClasses=function(){return n.allObjClasses()},e.allWidgetClasses=function(){return n.allWidgetClasses()},e._privateRealm=n,n},Object.defineProperty(t.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),t.prototype.provideObjClass=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return at.apply(void 0,[t,e].concat(n)),Y(this._registry,t,e)},t.prototype.provideWidgetClass=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ut.apply(void 0,[t,e].concat(n)),Z(this._registry,t,e)},t.prototype.createObjClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return rt.apply(void 0,[t].concat(e)),$(this._registry,t)},t.prototype.createWidgetClass=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return it.apply(void 0,[t].concat(e)),G(this._registry,t)},t.prototype.getClass=function(t){return this._registry.getClass(t)},t.prototype.allObjClasses=function(){return this._registry.allObjClasses()},t.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},t.prototype.setInitialContentFor=function(t){this._registry.setInitialContentFor(t)},t}();n.d(e,"f",function(){return d}),n.d(e,"e",function(){return h}),n.d(e,"d",function(){return v}),n.d(e,"a",function(){return P}),n.d(e,"b",function(){return s});e.c=lt},function(t,e,n){"use strict";var r;function i(t){return r?r.getContentStateId(t):""}function o(t){r=t}var a=n(2),s=n.n(a),u=n(5),l=n(6),c=n(0);var f,d=(f=function(t,e){var n,r;return(f=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=!1;function h(){return p}function v(){p=!0}function m(t){if(p)throw new y(t)}var y=function(t){function e(e){return t.call(this,e+" is not supported when using the in-memory tenant")||this}return d(e,t),e}(c.i),g=n(9),b=new u.LoadableCollection({name:"facetquery",state:function(){return l.c.subState("facetQuery")},loader:function(t){var e=t[0],n=t[1];return g.e.retrieveFacetQuery(e,n)},invalidation:function(t){var e=t[0];t[1];return Object(u.loadableWithDefault)(void 0,function(){return i(e)})||""}}),w=function(){function t(t,e,n,r){this._requestParams=_(e,n,r),this._loadableData=b.get([t,this._requestParams])}return t.store=function(t,e,n,r,i){var o=_(e,n,r);b.get([t,o]).set(i)},t.prototype.result=function(){m("Search API");var t=this._loadableData.get();return t?t.facets[0].map(function(t){return{name:t.value,count:t.total,includedObjIds:t.results.map(function(t){return t.id})}}):[]},t}();function _(t,e,n){var r={facets:[{attribute:t,limit:e.limit||10,include_objs:e.includeObjs||0}],size:0};return Object(a.isEmpty)(n)||(r.query=n),r}function O(t,e){var n=k(t,e);return n||(a.find(t._widget_pool,function(t,r){if(t&&(n=k(t,e)))return n.parentWidgetId=r,!0}),n)}function k(t,e){var n;return a.find(t,function(t,r){if(t&&!Object(c.z)(r)){var i=t;if(Object(g.h)(i)){var o=i[1];if(o){var a=o.indexOf(e);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}}),n}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(t,e){if(!t)return e;if(!e)return null;var n={};return S(t,e,function(r,i,o){"_widget_pool"===r?n._widget_pool=function(t,e){if(!e||s.a.isEmpty(e))return t;var n={};return S(t,e,function(t,r,i){Object.prototype.hasOwnProperty.call(e,t)?i&&!r?n[t]=i:i&&(n[t]=C(r,i)):n[t]=r}),n}(i||{},o):Object.prototype.hasOwnProperty.call(e,r)?o&&(n[r]=o):n[r]=t[r]}),n}function E(t,e){if(!t)return e;if(!e)return null;var n={};return S(t,e,function(t,e,r){if("_widget_pool"===t){var i=function(t,e){if(t===e)return;if(!t)return e;var n={};return S(t,e||{},function(t,e,r){var i=T(e,r,function(){var t=E(e,r);if(!s.a.isEmpty(t))return t});void 0!==i&&(n[t]=i)}),n}(e,r);s.a.isEmpty(i)||(n._widget_pool=i)}else{var o=T(e,r,function(){if(!s.a.isEqual(e,r))return r});void 0!==o&&(n[t]=o)}}),n}function S(t,e,n){s.a.union(s.a.keys(t),s.a.keys(e)).forEach(function(r){return n(r,j(t[r]),j(e[r]))})}function j(t){if(s.a.isArray(t)){var e=x(t,2),n=e[0],r=e[1];return"binary"===n&&r?[n,s.a.omit(r,"url")]:t}return t}function T(t,e,n){return!t&&e?e:t&&!e?null:t&&e?n():void 0}function A(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var N=function(){function t(e,n){var r=this;A(this,t),this._workspaceId=e,this._objId=n,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(c.P)(function(){return r._performReplication()},1e3)}var e,n,r;return e=t,(n=[{key:"start",value:function(){var t=this;g.e.retrieveObj(this._workspaceId,this._objId).then(function(e){Object(l.a)(function(){t.notifyBackendState(e)})})}},{key:"notifyLocalState",value:function(t){if(!R.isDisabled()){if(void 0===this._backendState)throw new c.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new c.g("Can not update a fully deleted obj.");this._localState=t,this._startReplication()}}},{key:"notifyBackendState",value:function(t){if(void 0===this._backendState)return this._backendState=t,void this._updateLocalState(t);if(D(t,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=t;else{if(t._deleted)this._updateLocalState(null);else{var e=I(this._backendState,t);this._updateLocalState(L(this.localState,e))}this._backendState=t}}},{key:"finishSaving",value:function(){var t;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return c.j.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return c.j.reject()})}},{key:"_startReplication",value:function(){var t=this;s.a.isEmpty(I(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new c.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),R.writeStarted(this._currentRequestDeferred.promise),Object(c.G)(function(){return t._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var t=this,e=this._localState,n=I(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(n){t._handleBackendUpdate(e,n),t._currentRequestDeferred.resolve(t._objId),t._currentRequestDeferred=null,t._replicationActive=!1,t._startReplication()},function(e){t._currentRequestDeferred.reject(e),t._currentRequestDeferred=null,t._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if(s.a.isEmpty(t))return c.j.resolve(this._backendState);var e="workspaces/".concat(this._workspaceId,"/objs/").concat(this._objId);return g.d.put(e,{obj:t})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new c.e}},{key:"_handleBackendUpdate",value:function(t,e){var n=I(t,this._localState);this._backendState=function(t,e){if(D(t,e)>0)return t;return e}(e,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(L(this._backendState,n))}},{key:"_updateLocalState",value:function(t){this._localState=t,U(this._workspaceId,this._objId,this._localState)}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}])&&P(e.prototype,n),r&&P(e,r),t}();function I(t,e){return E(t,e)}function L(t,e){return C(t,e)}function D(t,e){return t?e?function(t,e){if(t>e)return 1;if(e>t)return-1;return 0}(t._version,e._version):1:-1}var R=new(function(){function t(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return t.prototype.get=function(t,e){return this.replicationCache[t]||(this.replicationCache[t]={}),this.replicationCache[t][e]||(this.replicationCache[t][e]=new N(t,e)),this.replicationCache[t][e]},t.prototype.subscribeWrites=function(t){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=t,this.subscriptionToken},t.prototype.unsubscribeWrites=function(t){delete this.writeWriteCallbacks[t]},t.prototype.isDisabled=function(){return this.disabled},t.prototype.writeStarted=function(t){Object(a.each)(this.writeWriteCallbacks,function(e){e(t)})},t.prototype.disableReplication=function(){this.disabled=!0},t.prototype.enableReplication=function(){this.disabled=!1},t.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},t.prototype.clearCache=function(){this.replicationCache={}},t}());function M(t){R=t}function B(){return l.m.subState("objData")}var q=new u.LoadableCollection({name:"objdata",state:B,loader:function(t){var e=t[0],n=t[1];return R.get(e,n).start(),new c.j(function(){})}});var F=function(){function t(t,e){this._workspaceId=t,this._id=e,this._loadableData=q.get([t,e])}return t.prototype.get=function(){return Object(l.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},t.prototype.getWidget=function(t){return Object(l.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(t).get()},t.prototype.getWidgetWithBadPerformance=function(t){return this.getWidgetState(t).get()},t.prototype.getAttribute=function(t){if("_widget_pool"===t)throw new c.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(t).get()},t.prototype.getWidgetAttribute=function(t,e){return this.getWidgetState(t).subState(e).get()},t.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},t.prototype.set=function(t){Object(l.g)("Changing CMS content"),this._loadableData.set(t)},t.prototype.setError=function(t){this._loadableData.setError(t)},t.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},t.prototype.isAvailable=function(){return this._loadableData.isAvailable()},t.prototype.update=function(t){var e=C(this.get(),t);this.set(e),this._replication().notifyLocalState(e)},t.prototype.finishSaving=function(){return this._replication().finishSaving()},t.prototype.workspaceId=function(){return this._workspaceId},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.workspaceId()===e.workspaceId()&&this._id===e._id);var n,r},t.prototype._replication=function(){return R.get(this._workspaceId,this._id)},t.prototype.getWidgetState=function(t){return this.getSubReader("_widget_pool").subState(t)},t.prototype.getSubReader=function(t){return this._loadableData.reader().subState(t)},t}();function z(t,e){var n=W(t,e);return n.set(null),R.get(t,e).notifyBackendState(null),n}function U(t,e,n){W(t,e).set(n)}function H(t,e){var n=W(t,e);if(n.ensureAvailable())return n}function W(t,e){return new F(t,e)}var V=function(){return(V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},K={results:[],total:0},Q=new u.LoadableCollection({name:"objquery",state:function(){return ut()},loader:function(t,e,n){var r=t[0],i=t[1],o=t[2],a=e.push,s=e.isReload,l=e.wasCancelled;return function(t,e,n,r){if(r>0){var i=new $(t,e,n,r-1);return Object(u.load)(function(){return i.continuationForNextBatch()})}return c.j.resolve()}(r,i,n,o).then(function(t){if(l())throw new Error;var e={size:n,continuation:t,include_objs:!s()},o=V({},i,e);return g.e.retrieveObjQuery(r,o).then(function(t){var e=t.objs;return e&&a(function(){return e.forEach(function(t){t._id&&R.get(r,t._id).notifyBackendState(t)})}),function(t,e){e.forEach(function(e){return function(t,e){Object(u.load)(function(){return H(t,e)})}(t,e)})}(r,t.results),{results:t.results,total:t.total,continuation:t.continuation}})})},invalidation:function(t){var e=t[0];t[1],t[2];return Object(u.loadableWithDefault)(void 0,function(){return i(e)})||""}}),$=function(){function t(t,e,n,r){void 0===r&&(r=0),this._workspaceId=t,this._params=e,this._batchSize=n,this._index=r}return t.store=function(t,e,n,r){void 0===r&&(r=n.length),Q.get([t,Y(e),0]).set({results:n,total:r})},t.firstBatchFor=function(e,n,r){return new t(e,Y(n),r)},t.countFor=function(t,e){return this.firstBatchFor(t,e,0).count()},t.prototype.objIds=function(){return this._response().results},t.prototype.count=function(){return this._response().total||0},t.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new t(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),t.prototype.continuationForNextBatch=function(){return this._response().continuation},t.prototype._response=function(){return this._data().get()||K},t.prototype._data=function(){return Q.get([this._workspaceId,this._params,this._index],this._batchSize)},t}(),G=$;function Y(t){var e=Object(a.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},a.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}function Z(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function J(t,e,n){return e&&X(t.prototype,e),n&&X(t,n),t}var tt=function(){function t(e,n,r){Z(this,t),this._workspaceId=e,this._params=n,this._batchSize=r}return J(t,null,[{key:"store",value:function(t,e,n,r){G.store(t,e,n,r)}},{key:"count",value:function(t,e){return G.countFor(t,e)}}]),J(t,[{key:"iterator",value:function(){var t={},e=G.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!e)return{done:!0};var i=e.objIds();if(n<i.length){var o=i[n];return n++,t[o]?r():(t[o]=!0,{value:o,done:!1})}return e=e.nextBatch(),n=0,r()}}}}]),t}();function et(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rt(t,e,n){return e&&nt(t.prototype,e),n&&nt(t,n),t}var it=function(){function t(e,n,r){et(this,t),this._workspaceId=e,this._params=n,this._batchSize=r}return rt(t,[{key:"count",value:function(){return tt.count(this._workspaceId,this._params)}},{key:"iterator",value:function(){return new ot(this._workspaceId,this._params,this._batchSize)}}]),t}(),ot=function(){function t(e,n,r){et(this,t),this._workspaceId=e,this._iterator=new tt(e,n,r).iterator()}return rt(t,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var t=this._iterator.next().value;if(!t)return{done:!0};var e=H(this._workspaceId,t);return void 0===e?(this._iterator=void 0,{done:!0}):e.isNonExistent()?this.next():{value:e,done:!1}}}]),t}();function at(t,e,n,r){tt.store(t,e,n,r)}function st(t,e,n){return m("Search API"),new it(t,e,n)}function ut(){return l.c.subState("objQuery")}var lt=new u.LoadableCollection({name:"objFieldDiffs",state:function(){return l.c.subState("objFieldDiffs")},loader:function(t){var e=t[0],n=t[1];return g.e.retrieveObjFieldDiffs(e,n)},invalidation:function(t){return function(t,e){var n=H(t,e);if(n)return n.getAttribute("_version")||"";return""}(t[0],t[1])}});function ct(t,e,n,r){if("published"===t)return null;var i=function(t,e){return ft(t,e).get()||{}}(t,n);return r?function(t,e,n){var r=n._widget_pool;if(r){var i=r[e];if(i)return dt(t,i)}return null}(e,r,i):dt(e,i)}function ft(t,e){return lt.get([t,e])}function dt(t,e){var n=e[Object(c.R)(t)];return n?n[1]:null}function pt(t,e,n){var r=H("published",e),i=H(t,e);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(t,e,n){var r=t.getWidgetWithBadPerformance(n),i=e.getWidgetWithBadPerformance(n);return r?i?function(t,e){var n=E(t,e);return Object(a.some)(Object.keys(n),function(t){return!Object(c.z)(t)||"_obj_class"===t})}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}n.d(e,"g",function(){return i}),n.d(e,"o",function(){return o}),n.d(e,"a",function(){return w}),n.d(e,"f",function(){return O}),n.d(e,"b",function(){return"inMemory"}),n.d(e,"q",function(){return v}),n.d(e,"c",function(){return m}),n.d(e,"l",function(){return h}),n.d(e,"i",function(){return H}),n.d(e,"d",function(){return z}),n.d(e,"e",function(){return E}),n.d(e,"j",function(){return st}),n.d(e,"p",function(){return at}),n.d(e,"m",function(){return R}),n.d(e,"n",function(){return M}),n.d(e,"h",function(){return ct}),n.d(e,"k",function(){return pt})},function(t,e,n){"use strict";var r;function i(t){r=t}n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i})},function(t,e,n){var r,i,o;
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_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0.rc1
4
+ version: 1.16.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infopark AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-10 00:00:00.000000000 Z
11
+ date: 2019-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -346,7 +346,6 @@ files:
346
346
  - app/models/obj.rb
347
347
  - app/models/widget.rb
348
348
  - app/views/cms/index.html.erb
349
- - app/views/google_maps_widget/show.html.erb
350
349
  - app/views/scrivito/_editing_auth_warning.html.erb
351
350
  - app/views/scrivito/fallback_thumbnail.html.erb
352
351
  - app/views/scrivito/obj_class/defaults.json.jbuilder
@@ -1 +0,0 @@
1
- <div id="spam">eggs</div>