!functiont(e,n,r){functioni(u,s){if(!n[u]){if(!e[u]){varp="function"==typeofrequire&&require;if(!s&&p)returnp(u,!0);if(o)returno(u,!0);thrownewError("Cannot find module '"+u+"'")}vara=n[u]={exports:{}};e[u][0].call(a.exports,function(t){varn=e[u][1][t];returni(n?n:t)},a,a.exports,t,e,n,r)}returnn[u].exports}for(varo="function"==typeofrequire&&require,u=0;u<r.length;u++)i(r[u]);returni}({1:[function(t,e){varn;n=function(){functiont(t,e){this.HB=t,this.parser=e,this.unprocessed_ops=[]}returnt.prototype.parseOperation=function(t){vare;if(e=this.parser[t.type],null!=e)returne(t);thrownewError("You forgot to specify a parser for type "+t.type+". The message is "+JSON.stringify(t)+".")},t.prototype.applyOpsBundle=function(t){vare,n,r,i,o,u,s,p;for(n=[],r=0,u=t.length;u>r;r++)e=t[r],n.push(this.parseOperation(e));for(i=0,s=n.length;s>i;i++)e=n[i],this.HB.addOperation(e);for(o=0,p=n.length;p>o;o++)e=n[o],e.execute()||this.unprocessed_ops.push(e);returnthis.tryUnprocessed()},t.prototype.applyOpsCheckDouble=function(t){vare,n,r,i;for(i=[],n=0,r=t.length;r>n;n++)e=t[n],i.push(null==this.HB.getOperation(e.uid)?this.applyOp(e):void0);returni},t.prototype.applyOps=function(t){vare,n,r,i;for(i=[],n=0,r=t.length;r>n;n++)e=t[n],i.push(this.applyOp(e));returni},t.prototype.applyOp=function(t){vare;returne=this.parseOperation(t),this.HB.addToCounter(e),e.execute()?this.HB.addOperation(e):this.unprocessed_ops.push(e),this.tryUnprocessed()},t.prototype.tryUnprocessed=function(){vart,e,n,r,i,o,u;for(u=[];;){for(t=this.unprocessed_ops.length,n=[],o=this.unprocessed_ops,r=0,i=o.length;i>r;r++)e=o[r],e.execute()?this.HB.addOperation(e):n.push(e);if(this.unprocessed_ops=n,this.unprocessed_ops.length===t)break;u.push(void0)}returnu},t}(),e.exports=n},{}],2:[function(t,e){varn,r,i,o;o=t("../Types/JsonTypes"),r=t("../HistoryBuffer"),n=t("../Engine"),i=function(){functiont(t,e){vari,u;this.HB=newr(t),u=o(this.HB),this.engine=newn(this.HB,u.parser),this.connector=newe(this.engine,this.HB,u.execution_listener,this),i=newu.types.JsonType(this.HB.getReservedUniqueIdentifier()),this.HB.addOperation(i).execute(),this.root_element=i}returnt.prototype.getRootElement=function(){returnthis.root_element},t.prototype.getEngine=function(){returnthis.engine},t.prototype.getConnector=function(){returnthis.connector},t.prototype.getHistoryBuffer=function(){returnthis.HB},t.prototype.setMutableDefault=function(t){returnthis.root_element.setMutableDefault(t)},t.prototype.getUserId=function(){returnthis.HB.getUserId()},t.prototype.val=function(t,e,n){returnthis.root_element.val(t,e,n)},Object.defineProperty(t.prototype,"value",{get:function(){returnthis.root_element.value},set:function(t){vare,n,r;if(t.constructor==={}.constructor){r=[];for(eint)n=t[e],r.push(this.val(e,n,"immutable"));returnr}thrownewError("You must only set Object values!")}}),t}(),e.exports=i,"undefined"!=typeofwindow&&null!==window&&(null==window.Y&&(window.Y={}),window.Y.JsonYatta=i)},{"../Engine":1,"../HistoryBuffer":3,"../Types/JsonTypes":5}],3:[function(t,e){varn;n=function(){functiont(t){this.user_id=t,this.operation_counter={},this.buffer={},this.change_listeners=[]}returnt.prototype.getUserId=function(){returnthis.user_id},t.prototype.getReservedUniqueIdentifier=function(){return{creator:"_",op_number:"_"}},t.prototype.getOperationCounter=function(){vart,e,n,r;e={},r=this.operation_counter;for(ninr)t=r[n],e[n]=t;returne},t.prototype._encode=function(t){vare,n,r,i,o,u,s,p,a,c;null==t&&(t={}),e=[],p=function(e,n){if(null==e||null==n)thrownewError("dah!");returnnull==t[e]||t[e]<=n},c=this.buffer;for(sinc){a=c[s];for(oina)if(n=a[o],!isNaN(parseInt(o))&&p(s,o)){if(r=n._encode(),null!=n.next_cl){for(i=n.next_cl;null!=i.next_cl&&p(i.creator,i.op_number);)i=i.next_cl;r.next=i.getUid()}elseif(null!=n.prev_cl){for(u=n.prev_cl;null!=u.prev_cl&&p(i.creator,i.op_number);)u=u.prev_cl;r.prev=u.getUid()}e.push(r)}}returne},t.prototype.getNextOperationIdentifier=function(t){vare;returnnull==t&&(t=this.user_id),null==this.operation_