UNPKG

@graphistry/falcor

Version:
114 lines 58 kB
/*! * * Copyright 2015 Netflix, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing * permissions and limitations under the License. */ module.exports=function(b){function d(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};b[c].call(f.exports,f,f.exports,d);f.l=!0;return f.exports}var a={};d.m=b;d.c=a;d.i=function(a){return a};d.d=function(a,f,e){d.o(a,f)||Object.defineProperty(a,f,{configurable:!1,enumerable:!0,get:e})};d.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};d.d(c,"a",c);return c};d.o=function(a,f){return Object.prototype.hasOwnProperty.call(a,f)};d.p="";return d(d.s= 106)}([function(b,d,a){var c=a(53),f=a(30),e=a(54);b.exports=function(a,b){a=a.$expires;return void 0===a||null===a||a===e?!1:a===f?b:a<c()}},function(b,d,a){var c=a(19);b.exports=function(a){for(var e,f=Object.keys(a),b={},n=-1,p=f.length;++n<p;)e=f[n],"$size"===e||c(e)||(b[e]=a[e]);return b}},function(b,d,a){var c=a(48);b.exports=function(a,e,m){a["\u001ef_invalidated"]||(a["\u001ef_invalidated"]=!0,e.push(a),c(m,a));return a}},function(b,d,a){(function(a){function c(a){a?(this["\u001ef_meta"]= a["\u001ef_meta"])||(this["\u001ef_meta"]=a):this["\u001ef_meta"]={}}function e(a){return function(){var e=this.length;var c=e;var f;if("number"!==(f=typeof e)&&(!e||"object"!==f||"atom"!==e.$type||"number"!==typeof(c=e.value))||0>c||c!==(c|0)){if("resolved"===this.$__status)throw new RangeError("Invalid FalcorJSON length");return[]}this.length=c;c=a.apply(this,arguments);this.length=e;return c}}function m(e){var c=e,g=typeof c,f=arguments.length;if(0===f)c=this;else if("string"!==g){if(!c||"object"!== g)return c}else{if(1!==f)return c;c=this}return c===a?void 0:c}function w(){return l(m.apply(this,arguments),w)}function n(a,e){return JSON.stringify(l(m.call(this,this),l,!0===a,!1,!0===e))}function p(a){var e=m.apply(this,arguments),c,f,k=0,b=l(e,p,!0,!0);e&&(c=e["\u001ef_meta"])&&(k=c.version);b&&"object"===typeof b&&(f=b["\u001ef_meta"])&&(f.version=k);return b}function l(a,e,g,f,m){if(!a||"object"!==typeof a)return a;var h,y;if(v(a))var k=a;else{var b=-1;var x=Object.keys(a);var q=x.length;k= {};f&&(k.__proto__=c.prototype);if(g&&(h=a["\u001ef_meta"])){var p=h.$code,l=h.status,w=h.abs_path,n=h.deref_to,r=h.deref_from;h={};p&&(h.$code=p);w&&(h.abs_path=w);n&&(h.deref_to=n);r&&(h.deref_from=r);m&&l&&(h.status=l);k["\u001ef_meta"]=h;f&&(h={},h.__proto__=k,k=h)}for(;++b<q;)"\u001ef_meta"!==(y=x[b])&&(k[y]=e(a[y],e,g,f,m))}return k}var z={length:!0,toString:!0,constructor:!0,toLocaleString:!0},r={toJSON:{enumerable:!1,value:w},toProps:{enumerable:!1,value:p},toString:{enumerable:!1,value:n}, toLocaleString:{enumerable:!1,value:n},$__hash:{enumerable:!1,get:function(){var a=this["\u001ef_meta"];return a&&a.$code||""}},$__path:{enumerable:!1,get:function(){var a=this["\u001ef_meta"];return a&&a.abs_path||[]}},$__status:{enumerable:!1,get:function(){var a=this["\u001ef_meta"];return a&&a.status||"resolved"}},$__version:{enumerable:!1,get:function(){var a=this["\u001ef_meta"];return a&&a.version||0}}};Object.defineProperties(c.prototype,Object.getOwnPropertyNames(Array.prototype).reduce(function(a, c){if(!z.hasOwnProperty(c)){var g=Array.prototype[c];"function"===typeof g&&(a[c]={value:e(g),writable:!0,enumerable:!1})}return a},r));var v=Array.isArray;b.exports=c}).call(d,a(31))},function(b,d,a){d=a(5);b.exports=d("NullInPathError",function(){this.message="`null` is not allowed in branch key positions."})},function(b,d){b.exports=function(a,c){function f(a){this.message=a;c&&c.apply(this,arguments);Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack} f.prototype=Object.create(Error.prototype);f.prototype.name=a;f.prototype.constructor=f;f.is=function(e){return e.name===a};return f}},function(b,d){b.exports=function(a){return null!==a&&"object"===typeof a}},function(b,d,a){b.exports=function(a,f){var e=f["\u001ef_refs_length"]||0;f["\u001ef_ref"+e]=a;f["\u001ef_refs_length"]=e+1;a["\u001ef_ref_index"]=e;a["\u001ef_context"]=f}},function(b,d,a){var c=a(6);b.exports=function(a){return c(a)&&a.$size||0}},function(b,d,a){function c(a,e){var f=a,b, n=0,p=e.length;if(0<p){do for(f=f[e[n]];f&&"ref"===(b=f.$type);)f=c(a,f.value);while(++n<p&&f&&!b)}return f}b.exports=c},function(b,d,a){var c=a(25),f=a(27);b.exports=function(a,m,b,n){var e=a,l;do 0<(e.$size=(e.$size||0)-m)?(l=e["\u001ef_parent"])?e["\u001ef_version"]!==n&&f(e,n):e["\u001ef_version"]=n:(l=e["\u001ef_parent"])&&c(e,l,e["\u001ef_key"],b,n);while(e=l);return a}},function(b,d,a){d=a(5);b.exports=d("InvalidKeySetError",function(a,f){this.mesage="The KeySet "+JSON.stringify(f)+" in path "+ JSON.stringify(a)+" contains a KeySet. Keysets can only contain Keys or Ranges"})},function(b,d,a){var c=a(54);b.exports=function(a,e){if(e.$expires!==c){var f=a["\u001ef_head"];if(!f)a["\u001ef_head"]=a["\u001ef_tail"]=e;else if(f!==e){var b=e["\u001ef_prev"],n=e["\u001ef_next"];n&&(n["\u001ef_prev"]=b);b&&(b["\u001ef_next"]=n);e["\u001ef_prev"]=void 0;a["\u001ef_head"]=e;e["\u001ef_next"]=f;f["\u001ef_prev"]=e;e===a["\u001ef_tail"]&&(a["\u001ef_tail"]=b)}}}},function(b,d,a){function c(a,c,b){"function"=== typeof a||"function"===typeof c||"function"===typeof b?(f.call(this,[]),this.destination={error:c,onError:c,next:a,onNext:a,complete:b,onCompleted:b}):(f.call(this,[],c),this.parent=c,this.destination=a)}var f=a(14);b.exports=c;c.prototype=Object.create(f.prototype);c.prototype.next=c.prototype.onNext=function(a){var e=this.destination;if(e)if(e.onNext)e.onNext(a);else e.next&&e.next(a)};c.prototype.error=c.prototype.onError=function(a){var e=!1,c=this.destination;c&&(c.onError?(e=!0,c.onError(a)): c.error&&(e=!0,c.error(a)),this.dispose());if(!e)throw a;};c.prototype.complete=c.prototype.onCompleted=function(){var a=this.destination;if(a){if(a.onCompleted)a.onCompleted();else a.complete&&a.complete();this.dispose()}};c.prototype.dispose=c.prototype.unsubscribe=function(){this.destination=null;f.prototype.dispose.call(this)}},function(b,d){function a(a,f){this.parent=f;this.subscriptions=a||[]}b.exports=a;a.prototype.add=function(a){return this.subscriptions.push(a)&&this||this};a.prototype.remove= function(a){a=this.subscriptions.indexOf(a);~a&&this.subscriptions.splice(a,1);return this};a.prototype.dispose=a.prototype.unsubscribe=function(){for(var a,f=this.subscriptions;f.length;)(a=f.pop())&&a.dispose&&a.dispose();if(a=this.parent)this.parent=null,a.remove&&a.remove(this)}},function(b,d,a){var c=a(0),f=a(2),e=a(12);b.exports=function(a,b,n,p,l,z,r,v,k,x,g,h,q,t,y,u,C,d,B,F,D,A,H){var m=B;if(b)if(c(a,y))a["\u001ef_invalidated"]||f(a,t,q);else if(e(q,a),void 0===a.value)m=!1,B=d;else{if(z)return h&& (v[l]=null),D(a,b,l,z,r,v,x,g,h,C,d,F);return}if(d)z&&(r.hasValue=!0);else if(!B)return;return A(p,l,r,v,k,h,x,g,m,d,n,u,C,H,q)}},function(b,d,a){var c=a(9);b.exports=function(a,e){e=e||a._path;var f=a._node;if(!f||void 0===f["\u001ef_parent"]||f["\u001ef_invalidated"])a._node=null,0===e.length?f=a._root.cache:(f=c(a._root.cache,e),e===a._path&&(a._node=f));return f}},function(b,d,a){function c(a,b,m,x,g,h,q,t,y,u,p,l,n,d,w,A,H,T){var k={},v=b<a.length-1,C=a[b],r=z(C,k),E=l.index;do{p.depth=b;f(m, x,g,h,q,t,r,v,!1,p,l,n,d,w,A,H,T);p[b]=r;p.index=b;var B=e[0],D=e[1],F=e[4];F[F.index++]=r;B&&(v?c(a,b+1,m,D,B,h,e[3],e[2],y,u,p,F,n,d,w,A,H,T):(y.push(p.slice(0,p.index+1)),u.push(F.slice(0,F.index))));r=z(C,k);if(k.done)break;l.index=E}while(1)}function f(a,c,b,x,g,h,q,t,y,u,C,d,z,F,D,A,H){var k=b;for(b=k.$type;"ref"===b;){a:{g=a;C=x;b=h;h=u;c=d;y=z;var v=F,r=D,E=A,B=H,G=k,L=G.value,I=L.slice(0);if(m(G,B)){w(G,y,v);G=void 0;var Q=g;k=C;I.index=L.length}else{var P=0,Y=G,R=L.length-1;Q=G=g;k=b=C; do{var X=L[P],ba=P<R;I.index=P;f(g,Q,G,C,k,b,X,ba,!0,h,I,c,y,v,r,E,B);G=e[0];I=e[4];if(!G||"object"!==typeof G){I.index=P;break a}Q=e[1];b=e[2];k=e[3]}while(P++<R);I.index=P;Y["\u001ef_context"]!==G&&n(Y,G)}e[0]=G;e[1]=Q;e[2]=b;e[3]=k;e[4]=I}k=e[0];if(!k||"object"!==typeof k)return;c=e[1];h=e[2];g=e[3];C=e[4];b=k.$type}if(void 0===b){if(null==q){if(t)throw new l;k&&(q=k["\u001ef_key"])}else c=k,g=h,k=c[q],h=g&&g[q];k=p(c,k,h,q,u,C,d,z,F,D,A,H)}e[0]=k;e[1]=c;e[2]=h;e[3]=g;e[4]=C}var e=Array(5),m=a(0), w=a(2),n=a(7),p=a(72),l=a(4),z=a(32);b.exports=function(a,f,b,m,g){a=a._root;for(var h=a.expired,k=a.version+1,x=a.cache,y=[],u=[],p=[],l=[],v=-1,n=f.length;++v<n;){var d=f[v],z=d.paths;d=d.jsonGraph;for(var w=-1,r=z.length;++w<r;){var K=z[w];u.index=0;c(K,0,x,x,x,d,d,d,p,l,y,u,k,h,a,m,b,g)}}e[0]=void 0;e[1]=void 0;e[2]=void 0;e[3]=void 0;e[4]=void 0;return x["\u001ef_version"]===k?(a.version=k,[p,l,!0]):[p,l,!1]}},function(b,d,a){function c(a,b,g,h,q,p,y,u,l,v,n,d,w,r,H){if(a&&"object"===typeof a&& !a.$type){var k=[];var x=0;m(a)&&(k[x++]="length");for(var t in a)z(t)||(k[x++]=t)}else k=void 0;if(k&&k.length){x=0;t=k.length;var C=l.index;do{var E=k[x],B=a[E],D=!(!B||"object"!==typeof B)&&!B.$type;u.depth=b;f(g,h,q,E,B,D,!1,u,l,v,n,d,w,r,H);u[b]=E;u.index=b;var A=e[0],F=e[1],P=e[2];P[P.index++]=E;A&&(D?c(B,b+1,g,F,A,p,y,u,P,v,n,d,w,r,H):(p.push(u.slice(0,u.index+1)),y.push(P.slice(0,P.index))));if(++x>=t)break;l.index=C}while(1)}}function f(a,c,g,h,b,m,y,u,l,d,z,F,D,A,H){var k=g;for(g=k.$type;"ref"=== g;){a:{l=b;g=a;c=u;var x=d,q=z,t=F,C=D,E=A,B=H,I=k,Q=I.value,P=Q.slice(0);if(w(I,B))n(I,q,t),I=void 0,k=g,P.index=Q.length;else{var Y=I;I=I["\u001ef_context"];if(null!=I)k=I["\u001ef_parent"]||g,P.index=Q.length;else{var R=0,X=Q.length-1;P.index=R;k=I=g;do{f(g,k,I,Q[R],l,R<X,!0,c,P,x,q,t,C,E,B);I=e[0];P=e[2];if(!I||"object"!==typeof I){P.index=R;break a}k=e[1]}while(R++<X);P.index=R;Y["\u001ef_context"]!==I&&p(Y,I)}}e[0]=I;e[1]=k;e[2]=P}k=e[0];if(!k||"object"!==typeof k)return;c=e[1];l=e[2];g=k&& k.$type}if(!m||void 0===g){if(null==h){if(m)throw new r;k&&(h=k["\u001ef_key"])}else c=k,k=c[h];k=v(c,k,h,b,m,y,u,l,d,z,F,D,A,H)}e[0]=k;e[1]=c;e[2]=l}var e=Array(3),m=Array.isArray,w=a(0),n=a(2),p=a(7),l=a(9),z=a(29),r=a(4),v=a(42);b.exports=function(a,f,g,h,b){var k=a._root,y=k.expired,m=k.version+1;a=a._path;var p=k.cache,q=l(p,a);if(!q)return[[],[],!1];for(var x=q["\u001ef_parent"]||p,v=[],d=[],n=[],z=a.length,w=-1,r=f.length;++w<r;){var M=f[w],J=a.slice(0);J.index=z;c(M.json,0,p,x,q,d,n,v,J,m, y,k,h,g,b)}e[0]=void 0;e[1]=void 0;e[2]=void 0;return p["\u001ef_version"]===m?(k.version=m,[d,n,!0]):[d,n,!1]}},function(b,d,a){d=a(83);d=new RegExp("^"+d,"i","g");b.exports=d.test.bind(d)},function(b,d,a){b.exports=a(34)},function(b,d,a){b.exports=a(37)},function(b,d){b.exports=function(a,c,f,e,b){var m=0;var d=e.jsonGraph;d||(e.jsonGraph=d={});do{e=c[m++];if(m>=f){d=d[e]=!0!==b?a:d[e]||{};break}d=d[e]||(d[e]={})}while(1);return d}},function(b,d){var a=Array.isArray;b.exports=function(c,f,e,b,d, n,p,l,z,r,v,k,x,g,h){if(z||r){for(var m,t=-1,y=(n=d-f)&&Array(n)||void 0;++t<n;){m=c[t+f];var u=m;if("object"!==typeof u||null===u)u=!1;else if(a(u))u=0===u.length;else{var C=u.to,w=u.from||0;"number"!==typeof C&&(C=w+(u.length||0));u=w>=C}if(u)return;y[t]=m}var B;c=null===m;m=z;if(z){u=d;C=b;var F=e.requested||(e.requested=[])}else f=l,C=p,u=l+n-Number(c);do{if(n<d||!m){b=-1;t=f;for(B=Array(u);++b<t;)B[b]=C[b];for(t=-1;b<u;)B[b++]=y[++t]}if(m=!m){z&&(F[F.length]=B);break}F[F.length]=B||y;f=l;C=p; F=e.missing||(e.missing=[]);u=l+n-Number(c)}while(1);if(r)return g(v,B,f,u,k,x,h,z)}}},function(b,d,a){function c(a,b,g,h,m,l,y,u,d){var k={},x=b<a.length-1,q=a[b],t=v(q,k);do{f(g,h,m,t,x,!1,l,y,u,d);t=e[0];var n=e[1];t&&(x?c(a,b+1,g,n,t,l,y,u,d):r(t,p(t),u,l));t=v(q,k)}while(!k.done)}function f(a,c,g,b,p,d,y,u,v,z){var h=g;for(g=h.$type;"ref"===g;){a:{c=a;g=y;d=u;var k=v,q=z;if(m(h,q))w(h,d,k),e[0]=void 0,e[1]=c;else{n(k,h);var x=h,t=h.value;h=h["\u001ef_context"];if(null!=h)var r=h["\u001ef_parent"]|| c;else{var C=0,E=t.length-1;r=h=c;do{f(c,r,h,t[C],C<E,!0,g,d,k,q);h=e[0];if(!h&&"object"!==typeof h)break a;r=e[1]}while(C++<E);x["\u001ef_context"]!==h&&l(x,h)}e[0]=h;e[1]=r}}h=e[0];if(!h&&"object"!==typeof h)return;c=e[1];g=h.$type}if(void 0===g)if(null==b){if(p)throw Error("`null` is not allowed in branch key positions.");}else c=h,h=c[b];e[0]=h;e[1]=c}var e=Array(2),m=a(0),w=a(2),n=a(12),p=a(8),l=a(7),z=a(16),r=a(10),v=a(32);b.exports=function(a,f,g){var h=a._root,b=h.expired,k=h.version+1,y= h.cache;a=z(a);if(!a)return!1;for(var m=-1,p=f.length,l=a["\u001ef_parent"]||y;++m<p;)c(f[m],0,y,l,a,k,b,h,g);e[0]=void 0;e[1]=void 0;return y["\u001ef_version"]===k?(h.version=k,!0):!1}},function(b,d,a){function c(a,b,d,r,v){if(a&&"object"===typeof a){var k=a.$type;if(void 0===k)for(var l in a)e(l)||c(a[l],a,l,r,v);else"ref"===k&&w(a),f(r,a);m(n(a,v));b[d]=a["\u001ef_parent"]=void 0;return!0}return!1}var f=a(48),e=a(29),m=a(75),w=a(76),n=a(27);b.exports=c},function(b,d,a){function c(a,b,m,g,h,l, d,y,u,p,n,r,w,D,A,H){var k={},q=m<b.length-1,v=b[m],t=z(v,k),x=p.index;do{u.depth=m;u[m]=t;u.index=m;f(g,h,l,t,a,q,!1,u,p,n,r,w,D,A,H);u[m]=t;u.index=m;var C=e[0],E=e[1],B=e[2];B[B.index++]=t;C&&(q?c(a,b,m+1,g,E,C,d,y,u,B,n,r,w,D,A,H):(d.push(u.slice(0,u.index+1)),y.push(B.slice(0,B.index))));t=z(v,k);if(k.done)break;p.index=x}while(1)}function f(a,c,b,g,h,d,p,y,u,z,E,B,F,D,A){var k=b;for(b=k.$type;"ref"===b;){a:{u=h;b=a;c=y;var q=z,t=E,v=B,x=F,C=D,G=A,L=k,I=L.value,Q=I.slice(0);if(m(L,G))w(L,t,v), L=void 0,k=b,Q.index=I.length;else{var P=L;L=L["\u001ef_context"];if(null!=L)k=L["\u001ef_parent"]||b,Q.index=I.length;else{var Y=0,R=I.length-1;k=L=b;do{var X=I[Y],ba=Y<R;Q.index=Y;f(b,k,L,X,u,ba,!0,c,Q,q,t,v,x,C,G);L=e[0];Q=e[2];if(!L||"object"!==typeof L){Q.index=Y;break a}k=e[1]}while(Y++<R);Q.index=Y;P["\u001ef_context"]!==L&&n(P,L)}}e[0]=L;e[1]=k;e[2]=Q}k=e[0];if(!k||"object"!==typeof k)return;c=e[1];u=e[2];b=k.$type}if(!d||void 0===b){if(null==g){if(d)throw new l;k&&(g=k["\u001ef_key"])}else c= k,k=c[g];k=r(c,k,g,h,d,p,y,u,z,E,B,F,D,A)}e[0]=k;e[1]=c;e[2]=u}var e=Array(3),m=a(0),w=a(2),n=a(7),p=a(9),l=a(4),z=a(32),r=a(42);b.exports=function(a,b,f,g,h){var k=a._root,m=k.expired,y=k.version+1;a=a._path;var u=k.cache,l=p(u,a);if(!l)return[[],[],!1];for(var d=l["\u001ef_parent"]||u,v=[],n=[],x=[],z=a.length,r=-1,w=b.length;++r<w;){var K=b[r],M=K.path;K=K.value;var J=a.slice(0);J.index=z;c(K,M,0,u,d,l,n,x,v,J,y,m,k,g,f,h)}e[0]=void 0;e[1]=void 0;e[2]=void 0;return u["\u001ef_version"]===y?(k.version= y,[n,x,!0]):[n,x,!1]}},function(b,d,a){b.exports=function(a,b){var c=a,f=[],d=0;do{var n=-1;var p=c["\u001ef_parent"];c["\u001ef_version"]=b;var l=c["\u001ef_refs_length"]||0;do if(p&&p["\u001ef_version"]!==b&&(f[d++]=p),++n<l)p=c["\u001ef_ref"+n];else break;while(1)}while(c=f[--d]);return a}},function(b,d,a){var c=a(6);b.exports=function(a){return c(a)&&a.$timestamp||void 0}},function(b,d,a){b.exports=function(a){return a&&"$"===a[0]||c(a)};var c=a(19)},function(b,d){b.exports=0},function(b,d){d= function(){return this}();try{d=d||Function("return this")()||(0,eval)("this")}catch(a){"object"===typeof window&&(d=window)}b.exports=d},function(b,d){b.exports=require("@graphistry/falcor-path-utils/lib/iterateKeySet")},function(b,d){b.exports=require("@graphistry/falcor-path-utils/lib/support/materializedAtom")},function(b,d,a){var c=Array.isArray,f=a(64),e=a(63),m=a(16),w=a(81),n=a(104),p=a(98);b.exports=function(a,b,d,v,k){var l,g=b,h;b=a._path;var q=a._root,t=q.cache,y=b&&b.length||0;if(y){if((l= m(a))&&l.$type)return{error:new w(b,b)};var u=[];for(h=0;h<y;++h)u[h]=b[h];h=a._referenceContainer}else l=t,u=[];var r=[];var z=!1;v=d&&d.json;var B=a._boxed,F=q.expired;var D=a._recycleJSON;var A=!!a._source,H=q.branchSelector,T=d&&a._materialized,K=a._treatErrorsAsValues,M=a._allowFromWhenceYouCame;a={args:null,data:d,hasValue:!1,relative:null,requested:null,missing:null};var J=0,O=g.length;if(0<O){if(D){z=!0;if(1<O&&k||c(g[0]))g=[p(n(g,{}))];O=1}do{var G=g[J];z?D=e(t,l,v,G,0,d,a,r,u,y,!1,h,q,F, k,H,B,T,A,K,M):(D=G.length,D=f(t,l,v,G,0,d,a,r,D,u,y,!1,h,q,F,k,H,B,T,A,K,M));v=D[0];D[0]=void 0;D[1]=void 0}while(++J<O)}k=a.requested;a.args=z&&g||k;if(k&&k.length&&(a.relative=a.args,y)){g=[];h=0;for(y=k.length;h<y;++h)g[h]=b.concat(k[h]);a.requested=g}a.hasValue&&(d.json=v);return a}},function(b,d,a){var c=Array(3),f=a(12),e=a(0),m=a(7),w=a(46);b.exports=function(a,b,d,z){f(d,b);var p,l=0,k=a,n=b.value,g=n,h=n.length;do{if(0===l&&void 0!==(p=b["\u001ef_context"]))k=p,l=h;else{var q=n[l++];if(void 0=== (k=k[q]))break}if(l===h){q=k.$type;if(void 0!==q&&e(k,z))break;else{if(k===b)throw new w(n);k!==p&&m(b,k)}if("ref"===q)f(d,k),l=0,b=k,k=a,n=g=b.value,h=n.length;else break}else if(void 0!==k.$type)break}while(1);l<h&&void 0!==k&&(h=l);l=-1;for(n=Array(h);++l<h;)n[l]=g[l];c[0]=k;c[1]=n;c[2]=b;return c}},function(b,d,a){var c=a(1),f=a(62);b.exports=function(a,b,d,n,p,l,z,r,v,k,x,g){if("error"===b&&!g)return f(a,d,p,l,v,k);p.hasValue=!0;return k?c(a):a.value}},function(b,d,a){var c=a(67),f=a(79);b.exports= function(a,b,d,n,p){var e=a._path;n=a._root;var m=e&&e.length||0;if(m)return{error:new f};var r=[];var v=e=n.cache;var k=[];for(var x=a._boxed,g=n.expired,h=a._materialized,q=!!a._source,t=-1,y=b.length,u=a._treatErrorsAsValues,w={args:null,data:d,paths:null,relative:null,requested:null,jsonGraph:null};++t<y;){var E=b[t];a=E.length;c(v,e,E,0,d,w,k,a,r,m,!1,n,g,p,x,h,q,u)}w.args=w.relative=w.requested;return w}},function(b,d,a){function c(a,b,d,r,v,k,x,g){if(d===r)return k?e(n):void 0;var h,l=d+1, t=-1,y=0;var u=b[d];a&&"object"===typeof a?((h=a["\u001ef_meta"])||(a["\u001ef_meta"]=h={}),h.status=g?"pending":"resolved",h.version=x.version,h.abs_path=b.slice(0,d)):(a={},a.__proto__=m.prototype,a["\u001ef_meta"]=h={},h.status=g?"pending":"resolved",h.version=x.version,h.abs_path=b.slice(0,d),v&&(a=v(a)));a:do{if("object"!==typeof u)d=u,g=void 0,u=!1;else if(f(u)){if(void 0!==p)throw new w(b,p);t=0;var p=u;y=u.length;if(0===y)break a;u=p[t];continue a}else{g=u.to;d=u.from||0;"number"!==typeof g&& (g=d+(u.length||0)-1);if(0>g-d)break a;u=!0}do a[d]=c(a[d],b,l,r,v,k,x);while(u&&++d<=g);if(++t===y)break a;u=p[t]}while(1);return a}var f=Array.isArray,e=a(1),m=a(3);a(4);var w=a(11),n=a(33);b.exports=c},function(b,d,a){var c=Array.isArray,f=a(93),e=a(51),m=a(52);b.exports=function(a){for(var b=[],d=-1,l=a.length,w,r,v,k;++d<l;)v=a[d],c(v)?(v={path:v},k="PathValues"):f(v)?k="PathValues":m(v)?k="JSONGraphs":e(v)&&(k="PathMaps"),r!==k&&(r=k,b.push(w={arguments:[],inputType:k})),w.arguments.push(v); return b}},function(b,d,a){b.exports=function(a,b,e,m,d){a["\u001ef_key"]=e;a["\u001ef_parent"]=b;void 0!==m&&(a["\u001ef_version"]=m);a["\u001ef_abs_path"]||(a["\u001ef_abs_path"]=d.slice(0,d.index).concat(e));return b[e]=a}},function(b,d,a){function c(a,b,g,h,m,d,y,u,l,n){if(a&&"object"===typeof a&&!a.$type)for(var k in a)if(!r(k)){var q=a[k],t=!(!q||"object"!==typeof q)&&!q.$type;f(g,h,m,k,q,t,!1,d,y,u,l,n);var w=e[0],x=e[1];w&&(t?c(q,b+1,g,x,w,d,y,u,l,n):v(w,p(w),u,d))}}function f(a,c,b,h,d,p, y,u,v,r,z,F){var g=b;for(b=g.$type;"ref"===b;){a:{c=d;b=a;y=u;var k=v,q=r,t=z,x=F;if(m(g,x))w(g,k,q),e[0]=void 0,e[1]=b;else{n(q,g);var C=g,E=g.value;g=g["\u001ef_context"];if(null!=g)var B=g["\u001ef_parent"]||b;else{var G=0,L=E.length-1;B=g=b;do{f(b,B,g,E[G],c,G<L,!0,y,k,q,t,x);g=e[0];if(!g&&"object"!==typeof g)break a;B=e[1]}while(G++<L);C["\u001ef_context"]!==g&&l(C,g)}e[0]=g;e[1]=B}}g=e[0];if(!g&&"object"!==typeof g)return;c=e[1];b=g.$type}if(void 0===b)if(null==h){if(p)throw Error("`null` is not allowed in branch key positions."); }else c=g,g=c[h];e[0]=g;e[1]=c}var e=Array(2),m=a(0),w=a(2),n=a(12),p=a(8),l=a(7),z=a(16),r=a(29),v=a(10);b.exports=function(a,b,g){var h=a._root,f=h.expired,k=h.version+1,y=h._comparator,m=h.cache;a=z(a);if(!a)return!1;for(var d=-1,l=a["\u001ef_parent"]||m,p=b.length;++d<p;)c(b[d].json,0,m,l,a,k,f,h,y,g);e[0]=void 0;e[1]=void 0;return m["\u001ef_version"]===k?(h.version=k,!0):!1}},function(b,d,a){var c=a(30),f=a(92),e=a(8),m=a(28),w=a(45),n=a(0),p=a(2),l=a(40),z=a(44),r=a(43),v=a(10);a(25);b.exports= function(a,b,g,h,d,t,y,u,C,E,B,F,D,A){A=f(b,t);if(d||t){if(A&&n(b,!0)&&(p(b,E,B),A=b.$expires===c?A:"expired"),A&&"ref"!==A||!b||"object"!==typeof b)b=z(b,{},a,g,B,C),b=l(b,a,g,C,u)}else d=f(h),(A||d)&&(F?3>F.length?F(b,h):F(b,h,u.slice(0,u.index)):!1!==m(h)<m(b))||(D&&"error"===d&&(h=D(r(y,g),h)),y=e(b)-e(h=w(h,d,d?h.value:h)),b=z(b,h,a,g,B,C),a=v(a,y,B,C),b=l(b,a,g,C,u));return b}},function(b,d){b.exports=function(a,c){a=a.slice(0,a.depth);a[a.length]=c;return a}},function(b,d,a){var c=a(74),f= a(25),e=a(27);b.exports=function(a,b,d,p,l,z){if(a===b)return a;a&&"object"===typeof a&&(c(a,b),f(a,d,p,l),e(b,z));return d[p]=b}},function(b,d,a){var c=Array.isArray,f=a(53),e=a(90),m=a(8),w=a(91),n=a(30);b.exports=function(a,b,d){var l=0;if(b){var p=a["\u001ef_wrapped_value"];a=e(a);l=m(a);a.$type=b;a["\u001ef_prev"]=void 0;a["\u001ef_next"]=void 0;a["\u001ef_wrapped_value"]=p||!1}else a={$type:"atom",value:d,"\u001ef_prev":void 0,"\u001ef_next":void 0,"\u001ef_wrapped_value":!0};if(null==d)l=51; else if(null==l||0>=l)switch(typeof d){case "object":l=c(d)?50+d.length:51;break;case "string":l=50+d.length;break;default:l=51}b=w(a);"number"===typeof b&&b<n&&(a.$expires=f()+-1*b);a.$size=l;return a}},function(b,d,a){d=a(5);b.exports=d("CircularReferenceError",function(a){this.message="Encountered circular reference "+JSON.stringify(a)})},function(b,d,a){d=a(5);b.exports=d("InvalidSourceError",function(a){this.message="An exception was thrown when making a request:\n\t"+a})},function(b,d,a){b.exports= function(a,b){var c=b["\u001ef_prev"],f=b["\u001ef_next"];f&&(f["\u001ef_prev"]=c);c&&(c["\u001ef_next"]=f);b["\u001ef_prev"]=b["\u001ef_next"]=void 0;b===a["\u001ef_head"]&&(a["\u001ef_head"]=f);b===a["\u001ef_tail"]&&(a["\u001ef_tail"]=c)}},function(b,d,a){(function(c){function f(a){if(a)switch(typeof a){case "object":this.source=a;break;case "function":this.source={subscribe:a}}}var e=a(13),d=a(14),w=a(94).default;b.exports=f;f.prototype[w]=function(){return this};f.prototype.operator=function(a){return this.subscribe(a)}; f.prototype.subscribe=function(a,b,c){return new d([this.operator.call(this.source,a instanceof e?a:new e(a,b,c))])};f.prototype.then=function(a,b){var e=this;this._promise||(this._promise=new c.Promise(function(a,b){var c=[],f=!1;e.subscribe({next:function(a){c[c.length]=a},error:function(a){f=!0;b(a)},complete:function(){!f&&a(1>=c.length?c[0]:c)}})}));return this._promise.then(a,b)}}).call(d,a(31))},function(b,d){function a(){}var c={dispose:function(){},unsubscribe:function(){}};a.prototype.schedule= function(a){a();return c};b.exports=a},function(b,d,a){var c=a(6);b.exports=function(a){return c(a)&&"json"in a}},function(b,d,a){var c=Array.isArray,f=a(6);b.exports=function(a){return f(a)&&c(a.paths)&&(f(a.jsonGraph)||f(a.jsong)||f(a.json)||f(a.values)||f(a.value))}},function(b,d){b.exports=Date.now},function(b,d){b.exports=1},function(b,d){b.exports=require("@graphistry/falcor-path-utils/lib/collapse")},function(b,d,a){function c(a){if(!(this instanceof f))return new f(a);f.call(this,a)}var f= a(57);d=a(3);c.prototype=Object.create(f.prototype);c.Model=f;c.FalcorJSON=d;c.toProps=d.prototype.toProps;b.exports=c},function(b,d,a){function c(a){a=a||{};this._node=a._node;this._path=a._path||[];this._source=a.source||a._source;this._root=a._root||new e(a,this);this._recycleJSON=!0===a.recycleJSON||a._recycleJSON;this._scheduler=a.scheduler||a._scheduler||new p;a._seed?(this._recycleJSON=!0,this._seed=a._seed,"undefined"===typeof a.treatErrorsAsValues&&(a.treatErrorsAsValues=!0)):this._recycleJSON&& (this._seed={},this._seed.__proto__=m.prototype,"undefined"===typeof a.treatErrorsAsValues&&(a.treatErrorsAsValues=!0));this._boxed=!0===a.boxed||a._boxed||!1;this._materialized=!0===a.materialized||a._materialized||!1;this._treatErrorsAsValues=!0===a.treatErrorsAsValues||a._treatErrorsAsValues||!1;this._allowFromWhenceYouCame=!0===a.allowFromWhenceYouCame||a._allowFromWhenceYouCame||!1;a.cache&&this.setCache(a.cache)}var f=a(85),e=a(59),m=a(3),w=a(58),n=a(89),p=a(50),l=a(55);a(8);var z=a(6),r=a(51), v=a(9),k=a(52),x=a(18),g=a(17),h=a(20),q=a(69),t=a(21);b.exports=c;c.prototype.constructor=c;c.prototype.get=function(){var a=this._seed;a||(a={},a.__proto__=m.prototype);for(var b=arguments.length,c=Array(b),e=0;e<b;e++)c[e]=arguments[e];return(new f("get",this,c))._toJSON(a,[])};c.prototype.set=function(){var a={};a.__proto__=m.prototype;for(var b=arguments.length,c=Array(b),e=0;e<b;e++)c[e]=arguments[e];return(new f("set",this,c))._toJSON(a,[])};c.prototype.preload=function(){for(var a=arguments.length, b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return(new f("get",this,b))._toJSON(null,[])};c.prototype.call=function(){var a={};a.__proto__=m.prototype;for(var b=arguments.length,c=Array(b),e=0;e<b;e++)c[e]=arguments[e];return(new f("call",this,c))._toJSON(a,[])};c.prototype.invalidate=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return(new f("invalidate",this,b))._toJSON(null,null).then()};c.prototype.deref=a(78);c.prototype._hasValidParentReference=a(77);c.prototype.getValue= function(a){return(new f("get",this,[a]))._toJSON({},[]).lift(function(b){return this.subscribe({onNext:function(c){var e=-1;c=c.json;for(var g=a.length;c&&!c.$type&&++e<g;)c=c[a[e]];b.onNext(c)},onError:b.onError.bind(b),onCompleted:b.onCompleted.bind(b)})})};c.prototype.setValue=function(a,b){a=1===arguments.length?a.path:a;b=1===arguments.length?a:{path:a,value:b};return(new f("set",this,[b]))._toJSON({},[]).lift(function(b){return this.subscribe({onNext:function(c){var e=-1;c=c.json;for(var g= a.length;c&&!c.$type&&++e<g;)c=c[a[e]];b.onNext(c)},onError:b.onError.bind(b),onCompleted:b.onCompleted.bind(b)})})};c.prototype.setCache=function(a){var b=this._root,c=b.cache;if(a!==c){var e={_path:[],_boxed:!1,_root:b,_materialized:!1,_treatErrorsAsValues:!1};b.cache=this._node={};"undefined"!==typeof c&&(b.expired=[],b["\u001ef_head"]=void 0,b["\u001ef_tail"]=void 0,this._recycleJSON&&(this._seed={},this._seed.__proto__=m.prototype));var f,d;k(a)?f=g(e,[a]):r(a)?f=x(e,[a]):z(a)&&(f=x(e,[{json:a}])); f&&(f[0].length&&h(e,f[0],null,!1,!1),f[2]&&(d=b.onChange)&&d.call(b.topLevelModel))}else"undefined"===typeof c&&(this._root.cache={});return this};c.prototype.getCache=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];if(0===b.length)return q(this,this._root.cache);a={};a.__proto__=m.prototype;a=t({_path:[],_root:this._root,_boxed:this._boxed,_materialized:this._materialized,_treatErrorsAsValues:this._treatErrorsAsValues},b,a).data;a.paths=l(b);return a};c.prototype.getVersion= function(a){a=a||[];if(!1===Array.isArray(a))throw Error("Model#getVersion must be called with an Array path.");this._path.length&&(a=this._path.concat(a));return this._getVersion(this,a)};c.prototype._clone=function(a){var b=new c(this);if(a)for(var e in a){var g=a[e];"delete"===g?delete b[e]:"_path"===e?(b[e]=g,!1===a.hasOwnProperty("_node")&&delete b._node):b[e]=g}0<b._path.length&&(b.setCache=void 0);return b};c.prototype.batch=function(a){var b;"number"===typeof a?b=new n(Math.round(Math.abs(a))): a?"function"===typeof a.schedule?b=a:"function"===typeof a&&(b={scheudle:a}):b=new n(1);return this._clone({_scheduler:b})};c.prototype.unbatch=function(){return this._clone({_scheduler:new p})};c.prototype.treatErrorsAsValues=function(){return this._clone({_treatErrorsAsValues:!0})};c.prototype.asDataSource=function(){return new w(this)};c.prototype._materialize=function(){return this._clone({_materialized:!0})};c.prototype._dematerialize=function(){return this._clone({_materialized:"delete"})}; c.prototype.boxValues=function(){return this._clone({_boxed:!0})};c.prototype.unboxValues=function(){return this._clone({_boxed:"delete"})};c.prototype.withoutDataSource=function(){return this._clone({_source:"delete"})};c.prototype.inspect=function(){return"{ v: "+this.getVersion()+" p: ["+this._path.join(", ")+"] }"};c.prototype.toJSON=function(){return{$type:"ref",value:this.getPath()}};c.prototype.getPath=function(){return this._path.slice(0)};c.prototype._fromWhenceYouCame=function(a){return this._clone({_allowFromWhenceYouCame:void 0=== a?!0:a})};c.prototype._optimizePath=function(a){a=v(this._root.cache,a);return(a&&a["\u001ef_abs_path"]||[]).slice(0)};c.prototype._getVersion=a(70);c.prototype._getPathValuesAsPathMap=h;c.prototype._getPathValuesAsJSONG=t;c.prototype._setPathValues=a(26);c.prototype._setPathMaps=a(18);c.prototype._setJSONGs=a(17);c.prototype._setCache=a(18);c.prototype._invalidatePathValues=a(24);c.prototype._invalidatePathMaps=a(41)},function(b,d){function a(a){this._model=a._materialize().treatErrorsAsValues()} a.prototype.get=function(a){return this._model.get.apply(this._model,a)._toJSONG()};a.prototype.set=function(a){return this._model.set(a)._toJSONG()};a.prototype.call=function(a,b,e,d){return this._model.call.apply(this._model,[a,b,e].concat(d))._toJSONG()};b.exports=a},function(b,d,a){function c(a,b){a=a||{};this.cache={};this.version=-1;this.syncRefCount=0;this.maxRetryCount=10;this.topLevelModel=b;this.requests=new f(this);this.expired=a.expired||[];this.collectRatio=.75;this.maxSize=Math.pow(2, 53)-1;"number"===typeof a.collectRatio&&(this.collectRatio=a.collectRatio);"number"===typeof a.maxSize&&(this.maxSize=a.maxSize);"function"===typeof a.comparator&&(this.comparator=a.comparator);"function"===typeof a.branchSelector&&(this.branchSelector=a.branchSelector);"function"===typeof a.errorSelector&&(this.errorSelector=a.errorSelector);"function"===typeof a.branchSelector&&(this.branchSelector=a.branchSelector);"function"===typeof a.onChange&&(this.onChange=a.onChange);"function"===typeof a.onChangesCompleted&& (this.onChangesCompleted=a.onChangesCompleted)}var f=a(86);a(28);c.comparator=c.prototype.comparator=function(a,b){var c=a&&a.$type,e;var f=b&&b.$type;if(c){if(!f)return a.value===b;if(c!==f)return!1;if((e=b.$timestamp)<(f=a.$timestamp))return!0;if(void 0!==e&&void 0===f||a.$expires!==b.$expires)return!1;if("ref"===c){a=a.value;c=a.length;b=b.value;if(c!==b.length)return!1;for(;~--c;)if(a[c]!==b[c])return!1;return!0}return a.value===b.value}return f?!1:a===b};b.exports=c},function(b,d,a){var c=a(20), f=a(21);b.exports={json:function(a,b,f,d){var e=!1;if(!b)return{missing:!1,hasValue:!1};var m=[].concat(b[1]||[]),n=[].concat(b[2]||[]),r=[].concat(b[3]||[]);b=(a._path||[]).concat(b[0]||[]);d&&r&&r.length&&(e=c(a,r,f,d,!0).hasValue);return{data:f,missing:!0,hasValue:e,fragments:[b,m,n,r]}},jsonGraph:function(a,b,c,d){var e=!1;if(!b)return{missing:!1,hasValue:!1};var m=[].concat(b[1]||[]),n=[].concat(b[2]||[]),r=[].concat(b[3]||[]);b=(a._path||[]).concat(b[0]||[]);d&&r&&r.length&&(e=f({_root:a._root, _boxed:a._boxed,_materialized:a._materialized,_treatErrorsAsValues:a._treatErrorsAsValues},r,c,!0,!0).hasValue);return{data:c,missing:!0,hasValue:e,fragments:[b,m,n,r]}}}},function(b,d,a){b.exports={json:a(34),jsonGraph:a(37)}},function(b,d,a){var c=a(1);b.exports=function(a,b,d,w,n,p){var e=-1;b+=!!n;n=Array(b);for(a=p?c(a):a.value;++e<b;)n[e]=w[e];(d.errors||(d.errors=[])).push({path:n,value:a})}},function(b,d,a){function c(a,b,g,d,u,z,E,B,F,D,A,H,T,K,M,J,O,G,L,I,Q){var h,q=A;if(void 0===b||void 0!== (h=b.$type)||void 0===d)return m[1]=void 0===b,m[0]=l(b,h,g,d,u,z,E,B,u,F,D,q,T,K,M,J,O,G,L,I,w,f,v),m;var t;h="";A=d.$keys;var y=u+1,C=D+1;if(Q&&H){var V=H.value;var W=H["\u001ef_abs_path"]}if(!g||"object"!==typeof g)g=void 0;else if(t=g["\u001ef_meta"]){var U=b["\u001ef_abs_path"];var S=t.abs_path;J||g instanceof n||(g.__proto__={},g.__proto__["\u001ef_meta"]=t,g.__proto__.__proto__=n.prototype);if(!e(U,S)){t.$code="";t.status=L&&"pending"||"incomplete";t.abs_path=U;t.version=b["\u001ef_version"]; V&&(t.deref_to=V);W&&(t.deref_from=W);if(S=t.keys)for(N in t.keys=Object.create(null),S)S[N]&&delete g[N];m[0]=g;m[1]=!0;return m}if(t.version===b["\u001ef_version"]&&t.$code===d.$code)return E.hasValue=!0,m[0]=g,m[1]=!1,m;S=t.keys;t.abs_path=U;t.version=b["\u001ef_version"];V&&(t.deref_to=V);W&&(t.deref_from=W)}U=Object.create(null);var ha=-1,ia=A.length,Z=!1;a:for(;++ha<ia;){q=A[ha];var aa=d[ha];if(null===q){if(void 0!==aa)throw new k;h=""+x(""+h+"null")}else{if("object"!==typeof q){var N=q;var ca= void 0;var da=!1;var ea=N}else{ca=q.to;N=q.from||0;"number"!==typeof ca&&(ca=N+(q.length||0)-1);if(0>ca-N)break a;da=!0;ea="["+N+".."+ca+"]"}do{q=!1;var ka=g&&g[N];var la=F;var ma=C;var na=H;var fa=b[N];B[u]=N;F[D]=N;if(void 0===aa){if(c(a,fa,ka,aa,y,z,E,B,la,ma,q,na,T,K,M,J,O,G,L,I,Q),!0===m[1]&&(Z=!0),void 0===(ka=m[0])&&!G){g&&g.hasOwnProperty(N)&&delete g[N];continue}}else{if(fa&&"ref"===fa.$type&&!p(fa,M)){var ja=r(a,fa,T,M);fa=ja[0];q=!0;la=ja[1];na=ja[2];ma=la.length;ja[0]=ja[1]=ja[2]=void 0}c(a, fa,ka,aa,y,z,E,B,la,ma,q,na,T,K,M,J,O,G,L,I,Q);!0===m[1]&&(Z=!0);if(void 0===(ka=m[0])){g&&g.hasOwnProperty(N)&&delete g[N];continue}}void 0===t&&(t={},t.version=b["\u001ef_version"],t.abs_path=b["\u001ef_abs_path"],V&&(t.deref_to=V),W&&(t.deref_from=W),g={},g["\u001ef_meta"]=t,g.__proto__=n.prototype,J?g=J(g):(q=g,g={},g.__proto__=q));U[N]=!0;S&&N in S&&(S[N]=!1);g[N]=ka}while(da&&++N<=ca);h=""+x(""+h+(Z?"":ea)+(aa?aa.$code:""))}}if(t&&(t.$code=h,t.keys=U,t.status=Z?L?"pending":G?"resolved":"incomplete": "resolved",S))for(N in S)S[N]&&delete g[N];m[0]=g;m[1]=Z;return m}function f(a,b,c,e,d,k,m,l,p,v,n,r,w,x,M){if(v)return x(n,a,b,b,r,w,M,p,c,e,m,l,k,f);a=a?g(a):[[]];var h=e.slice(0,d);return a.forEach(function(a){d=b+a.length;return z(h.concat(a),b,c,e,d,k,m,l,p,!1,n,r,w,x,M)})}function e(a,b){if(a===b)return!0;var c=a.length;if(c!==b.length)return!1;for(;~--c;)if(a[c]!==b[c])return!1;return!0}var m=Array(2),w=a(36),n=a(3),p=a(0),l=a(15),z=a(23),r=a(35),v=a(68),k=a(4);a(11);var x=a(100),g=a(99);b.exports= c},function(b,d,a){function c(a,b,h,d,t,y,u,C,E,B,F,D,A,H,T,K,M,J,O,G,L,I){var g;if(void 0===b||(g=b.$type)||t===E)return f[1]=void 0===b,f[0]=p(b,g,h,d,t,y,u,C,E,B,F,D,H,T,K,M,J,O,G,L,m,w,z),f;var q,x=t+1,R=-1,X=0,ba=F+1;D=d[t];if(null===D){if(x<E)throw new v;f[0]=h;f[1]=!1;return f}if(I&&A){var V=A.value;var W=A["\u001ef_abs_path"]}if(!h||"object"!==typeof h)h=void 0;else if(q=h["\u001ef_meta"])q.version=b["\u001ef_version"],q.abs_path=b["\u001ef_abs_path"],V&&(q.deref_to=V),W&&(q.deref_from=W); var U=!1;a:do{if("object"!==typeof D){g=D;var S=void 0;var ha=!1}else if(e(D)){if(void 0!==ia)throw new k(d,ia);R=0;var ia=D;X=D.length;if(0===X)break a;D=ia[R];continue a}else{S=D.to;g=D.from||0;"number"!==typeof S&&(S=g+(D.length||0)-1);if(0>S-g)break a;ha=!0}do{D=!1;var Z=h&&h[g];var aa=B;var N=ba;var ca=A;var da=b[g];C[t]=g;B[F]=g;if(x===E){if(c(a,da,Z,d,x,y,u,C,E,aa,N,D,ca,H,T,K,M,J,O,G,L,I),!0===f[1]&&(U=!0),void 0===(Z=f[0])&&!O)continue}else{if(da&&"ref"===da.$type&&!l(da,K)){var ea=r(a,da, H,K);da=ea[0];D=!0;aa=ea[1];ca=ea[2];N=aa.length;ea[0]=ea[1]=ea[2]=void 0}c(a,da,Z,d,x,y,u,C,E,aa,N,D,ca,H,T,K,M,J,O,G,L,I);!0===f[1]&&(U=!0);if(void 0===(Z=f[0]))continue}void 0===q&&(q={},q.version=b["\u001ef_version"],q.abs_path=b["\u001ef_abs_path"],V&&(q.deref_to=V),W&&(q.deref_from=W),h={},h["\u001ef_meta"]=q,h.__proto__=n.prototype,M&&(h=M(h)));h[g]=Z}while(ha&&++g<=S);if(++R===X)break a;D=ia[R]}while(1);q&&(q.status=U?G?"pending":O?"resolved":"incomplete":"resolved");f[0]=h;f[1]=U;return f} var f=Array(2),e=Array.isArray,m=a(36),w=a(23),n=a(3),p=a(15),l=a(0),z=a(38),r=a(35),v=a(4),k=a(11);b.exports=c},function(b,d,a){var c=Array(2),f=a(1),e=a(22),m=a(12),w=a(0),n=a(7),p=a(46);b.exports=function(a,b,d,v,k){m(d,b);var l,g=0,h=a,q=b.value,t=q,r=q.length;do{if(0===g&&void 0!==(l=b["\u001ef_context"]))h=l,g=r;else{var u=q[g++];if(void 0===(h=h[u]))break}if(g===r){u=h.$type;if(void 0!==u&&w(h,k))break;else{if(h===b)throw new p(q);h!==l&&n(b,h)}if("ref"===u)m(d,h),v&&e(f(h),q,r,v),g=0,b=h, h=a,q=t=b.value,r=q.length;else break}else if(void 0!==h.$type)break}while(1);g<r&&void 0!==h&&(r=g);g=-1;for(q=Array(r);++g<r;)q[g]=t[g];c[0]=h;c[1]=q;return c}},function(b,d,a){var c=a(1),f=a(22);b.exports=function(a,b,d,n,p,l,z,r,v,k,x){x=a.value;if(k||"ref"===b||"error"===b||!a["\u001ef_wrapped_value"]||"object"===typeof x)x=c(a);p.hasValue=!0;f(x,z,r,n);(n.paths||(n.paths=[])).push(l.slice(0,d+!!v));return x}},function(b,d,a){function c(a,b,g,d,r,C,E,B,F,D,A,H,T,K,M,J,O,G){var h;if(void 0=== b||(h=b.$type)||d===B)return l(b,h,r,g,d,r,C,E,B,F,D,A,H,T,K,void 0,M,J,O,G,w,f,z);var q=d+1,t=-1,u=0,y=D+1;A=g[d];if(null===A){if(q<B)throw new k;}else{a:do{if("object"!==typeof A){h=A;var R=void 0;var X=!1}else if(e(A)){if(void 0!==ba)throw new x(g,ba);t=0;var ba=A;u=A.length;if(0===u)break a;A=ba[t];continue a}else{R=A.to;h=A.from||0;"number"!==typeof R&&(R=h+(A.length||0)-1);if(0>R-h)break a;X=!0}do{A=!1;var V=F;var W=y;var U=b[h];E[d]=h;F[D]=h;if(U&&q<B&&"ref"===U.$type&&!p(U,K)){r&&n(m(U),F, W,r);var S=v(a,U,H,r,K);U=S[0];A=!0;V=S[1];W=V.length;S[0]=S[1]=void 0}c(a,U,g,q,r,C,E,B,V,W,A,H,T,K,M,J,O,G)}while(X&&++h<=R);if(++t===u)break a;A=ba[t]}while(1)}}function f(a,b,c,e,d,f,k,l,p,v,w,z,x,K,M){var h;if(w&&v){(w.paths||(w.paths=[])).push((h=0===d-b)&&e.slice(0,b+!!f)||e.slice(0,b).concat(a.slice(b,d+!!f)));var q=n(h&&m(g)||void 0,k,l,w,!h)}return r(a,b,c,e,d,f,k,l,p,!h&&v,q,z,!0,K,M)}var e=Array.isArray,m=a(1),w=a(66),n=a(22),p=a(0),l=a(15),z=a(38),r=a(23),v=a(65),k=a(4),x=a(11),g=a(33); b.exports=c},function(b,d,a){function c(a,b,d,r,v,k,x,g,h,q,t,y,u,C){if(void 0===b)return e(void 0,void 0,a,b,d,void 0,h,q,d,t,y,u,x,void 0,!1,v,k,!1,g,!1,void 0,C,void 0),k?f(n):void 0;var l,p,z=b.$keys,D=d+1,A=y+1;a&&"object"===typeof a?((l=a["\u001ef_meta"])?p=l.keys:a["\u001ef_meta"]=l={},l.$code="",l.status=g?"pending":"resolved",l.version=x.version,l.abs_path=t.slice(0,y)):(a={},a.__proto__=m.prototype,a["\u001ef_meta"]=l={},l.$code="",l.status=g?"pending":"resolved",l.version=x.version,l.abs_path= t.slice(0,y),v&&(a=v(a)));r=Object.create(null);var H=-1,T=z.length;a:for(;++H<T;){var K=z[H];var M=b[H];if(null===K){if(void 0!==M)throw new w;}else{if("object"!==typeof K){var J=K;var O=void 0;K=!1}else{O=K.to;J=K.from||0;"number"!==typeof O&&(O=J+(K.length||0)-1);if(0>O-J)break a;K=!0}do q[d]=J,t[y]=J,r[J]=!0,p&&J in p&&(p[J]=!1),a[J]=c(a[J],M,D,D,v,k,x,g,h,q,t,A,u,C);while(K&&++J<=O)}}l.keys=r;if(p)for(J in p)p[J]&&delete a[J];return a}var f=a(1),e=a(15),m=a(3),w=a(4);a(11);var n=a(33);b.exports= c},function(b,d,a){function c(a,b,d,p){var l,m;if(!a||"object"!==typeof a)return a;if(l=a.$type){if(void 0===(m=a.value))p?m={$type:"atom"}:a["\u001ef_wrapped_value"]&&(m=f(a));else if(d||"ref"===l||"error"===l||!a["\u001ef_wrapped_value"]||"object"===typeof m)m=f(a);return m}l=Object.keys(a);for(var r=l.length,v=-1;++v<r;){var k=l[v];"$size"===k||e(k)||void 0===(m=c(a[k],b&&b[k],d,p))||(void 0===b&&(b={}),b[k]=m)}return b}var f=a(1),e=a(19);b.exports=function(a,b){return c(b,{},a._boxed,a._materialized)}}, function(b,d,a){var c=a(16);b.exports=function(a,b){a=(a=c(a,b))&&a["\u001ef_version"];return null==a?-1:a}},function(b,d,a){function c(a,c,d,p,l){c=e(c);d=!1;p=-1;for(var m=c.length;++p<m;){var r=c[p],v=r.inputType;r=r.arguments;0<r.length&&("PathValues"===v&&(r=r.map(f)),(0,b.exports["invalidate"+v])(a,r,l)&&(d=!0))}d&&(l=a._root.onChange)&&l.call(a._root.topLevelModel);return{}}function f(a){return a.path||a.paths}var e=a(39);b.exports={json:c,jsonGraph:c,invalidatePathMaps:a(41),invalidatePathValues:a(24)}}, function(b,d,a){var c=a(45),f=a(0),e=a(40),m=a(2),w=a(44),n=a(8),p=a(43),l=a(28),z=a(10);b.exports=function(a,b,d,x,g,h,q,t,y,u,C,E){var k,r,v;if(b===d){if(void 0===d)return d;if(null===d)return b=c(d,void 0,d),a=z(a,-b.$size,y,q),b=e(b,a,x,void 0,h);if((r=!(!b||"object"!==typeof b))&&void 0===(k=b.$type))return void 0===b["\u001ef_parent"]&&e(b,a,x,q,h),b}else if(r=!(!b||"object"!==typeof b))k=b.$type;if("ref"!==k){if(v=!(!d||"object"!==typeof d))var A=d.$type;if(r&&!k&&(null==d||v&&!A))return b}else{if(null== d){if(f(b,E)){m(b,t,y);return}return b}if(v=!(!d||"object"!==typeof d))if(A=d.$type,"ref"===A)if(b===d){if(null!=b["\u001ef_parent"])return b}else{var H=b.$timestamp;var T=d.$timestamp;if(!f(b,E)&&!f(d,E)&&T<H)return}}if(k&&v&&!A)return e(w(b,d,a,x,y,q),a,x,void 0,h);A||!v?("error"===A&&C&&(d=C(p(g,x),d)),A&&b===d?b["\u001ef_parent"]||(b=c(b,k,b.value),a=z(a,-b.$size,y,q),b=e(b,a,x,q,h)):(g=!0,k||A?r&&f(b,E)||(g=u?!(3>u.length?u(b,d):u(b,d,h.slice(0,h.index))):!1===l(d)<l(b)):g=!0,g&&(u=n(b)-n(d= c(d,A,A?d.value:d)),b=w(b,d,a,x,y,q),a=z(a,u,y,q),b=e(b,a,x,q,h))),f(b,!0)&&m(b,t,y)):null==b&&(b=e(d,a,x,void 0,h));return b}},function(b,d,a){function c(a,c,d){var l=!1,m=-1,k=c.length,n=[],g=[],h=a._root,q=h.errorSelector;d=d&&!a._source;for(h=a._source?null:h.comparator;++m<k;){var t=c[m],p=t.inputType;t=t.arguments;if(0<t.length){var u=(0,b.exports["set"+p])(a,t,q,h,d);l=l||u[2];g.push.apply(g,u[1]);"PathValues"===p?n.push.apply(n,t.map(f)):"JSONGraphs"===p?n.push.apply(n,e(t,f)):n.push.apply(n, u[0])}}return{changed:l,requested:n,optimized:g}}function f(a){return a.path||a.paths}function e(a,b){for(var c=-1,d=-1,e=a.length,f=[];++d<e;)for(var l=b(a[d],d,a),g=-1,h=l.length;++g<h;)f[++c]=l[g];return f}var m=a(20),w=a(21),n=a(39);b.exports={json:function(a,b,d,e,f){var k,l=n(b);var g=c(a,l,f);if((b=g.requested).length){if(!(k=g.changed)||e)var h=m(a,b,d,e,f);if(k){var q=w({_root:a._root,_boxed:a._boxed,_materialized:!0,_treatErrorsAsValues:a._treatErrorsAsValues},g.optimized,{},e,f);var t= q.data;var p=t.paths;q=q.requested;(e=a._root.onChange)&&e.call(a._root.topLevelModel)}}return{args:l,data:d,missing:p,relative:b,fragments:t,requested:q,error:h&&h.error,errors:h&&h.errors,hasValue:h&&h.hasValue}},jsonGraph:function(a,b,d,e,f){var k,m=n(b);var g=c(a,m,f);if((b=g.requested).length&&(e||(k=g.changed))){var h=w({_root:a._root,_boxed:a._boxed,_materialized:!0,_treatErrorsAsValues:a._treatErrorsAsValues},g.optimized,d,e,f);var l=h.data;var t=l.paths;var p=h.requested;k&&(e=a._root.onChange)&& e.call(a._root.topLevelModel)}return{args:m,data:d,missing:t,relative:b,fragments:l,requested:p,error:h&&h.error,hasValue:h&&h.hasValue}},setPathMaps:a(18),setPathValues:a(26),setJSONGraphs:a(17)}},function(b,d,a){b.exports=function(a,b){for(var c=a["\u001ef_refs_length"]||0,d=b["\u001ef_refs_length"]||0,f=-1;++f<c;){var n=a["\u001ef_ref"+f];void 0!==n&&(n["\u001ef_context"]=b,n["\u001ef_ref_index"]=d+f,b["\u001ef_ref"+(d+f)]=n,a["\u001ef_ref"+f]=void 0)}b["\u001ef_refs_length"]=c+d;a["\u001ef_refs_length"]= void 0;return b}},function(b,d,a){b.exports=function(a){for(var b=-1,c=a["\u001ef_refs_length"]||0;++b<c;){var d=a["\u001ef_ref"+b];null!=d&&(d["\u001ef_context"]=d["\u001ef_ref_index"]=a["\u001ef_ref"+b]=void 0)}a["\u001ef_refs_length"]=void 0;return a}},function(b,d,a){b.exports=function(a){var b=a["\u001ef_context"];if(b){for(var c=(a["\u001ef_ref_index"]||0)-1,d=(b["\u001ef_refs_length"]||0)-1;++c<=d;){var w=b["\u001ef_ref"+(c+1)];(b["\u001ef_ref"+c]=w)&&(w["\u001ef_ref_index"]=c)}b["\u001ef_refs_length"]= d;a["\u001ef_ref_index"]=a["\u001ef_context"]=void 0}return a}},function(b,d,a){b.exports=function(){var a=this._referenceContainer;return this._allowFromWhenceYouCame&&!0!==a?!1===a||a&&void 0===a["\u001ef_parent"]||a&&a["\u001ef_invalidated"]?!1:!0:!0}},function(b,d,a){var c=a(3),f=a(9);a(80);b.exports=function(a){var b;if(!a||"object"!==typeof a||!(b=a["\u001ef_meta"])||"object"!==typeof b)return null;var d=this._root.cache,e=this._recycleJSON,p=b.abs_path,l;if(!p){if(e){var z={json:a};z.__proto__= c.prototype}return this._clone({_node:void 0,_seed:z})}if(0===p.length)return e&&(z={json:a},z.__proto__=c.prototype),this._clone({_node:d,_path:p,_referenceContainer:!0,_seed:z});var r=b.deref_to,v=b.deref_from,k=f(d,p),x="e";if(v){x=!1;b=-1;var g=v.length;for(l=d;++b<g&&(l=l[v[b]],l&&!l.$type););if(r&&l&&"ref"===l.$type)for(x=!0,g=r.length,d=l.value,b=0;b<g;++b)if(d[b]!==r[b]){k=void 0;x=!1;break}}x?"e"===x&&(l=!0):l=!1;e&&(z={json:a},z.__proto__=c.prototype);return this._clone({_seed:z,_node:k, _path:p,_referenceContainer:l})}},function(b,d,a){d=a(5);b.exports=d("BoundJSONGraphModelError",function(){this.message="It is not legal to use the JSON Graph format from a bound Model. JSON Graph format can only be used from a root model."})},function(b,d,a){d=a(5);b.exports=d("InvalidDerefInputError",function(){this.message="Deref can only be used with a non-primitive object from get, set, or call."})},function(b,d,a){d=a(5);b.exports=d("InvalidModelError",function(a,b){this.message="The boundPath of the model is not valid since a value or error was found before the path end."; this.boundPath=a;this.shortedPath=b})},function(b,d,a){function c(a){return a.map(function(a){return JSON.stringify(a)}).join(",\n\t")}d=a(5);b.exports=d("MaxRetryExceededError",function(a,b,d,w){this.message="Exceeded the max retry count ("+a+") for these paths: \n"+(b&&"absolute: [\n\t"+c(b)+"\n]\n"||"")+(d&&"relative: [\n\t"+c(d)+"\n]\n"||"")+(w&&"optimized: [\n\t"+c(w)+"\n]\n"||"")})},function(b,d){b.exports=String.fromCharCode(30)+"f_"},function(b,d,a){var c=a(10);b.exports=function(a,b,d,w, n,p){"number"!==typeof n&&(n=.75);for(var e,f=w*n;n=b.pop();)d-=e=n.$size||0,c(n,e,a,p);if(d>=w){for(b=a["\u001ef_tail"];d>=f&&(n=b);)b=b["\u001ef_prev"],d-=e=n.$size||0,c(n,e,a,p);a["\u001ef_tail"]=n;null==n?a["\u001ef_head"]=void 0:n["\u001ef_next"]=void 0}}},function(b,d,a){function c(a,b,c){p.call(this,a);b&&c&&(this.type=a,this.source=this,this.model=b,this._args=c)}function f(a,b,c,d,e){this.data=a;this.errors=b;this.operation=c;this.progressive=d;this.maxRetryCount=e}function e(a,b,c,d,e,f){l.call(this, a);this.data=b;this.request=this.missing=null;this.started=!1;this.retryCount=-1;this.errors=c;this.errored=!1;this.relative=null;this.hasValue=!1;this.requested=this.fragments=null;this.completed=!1;this.operation=d;this.progressive=e;this.maxRetryCount=f}function m(a,b,c,d){"jsonGraph"===b&&a.paths&&(a.paths=v(a.paths));try{++c.syncRefCount,d.onNext(a)}catch(y){throw y;}finally{--c.syncRefCount}}function w(a,b){try{throw b;}catch(q){l.prototype.onError.call(a,q)}}function n(a,b){for(var c,d,g,e= Object.keys(b),h=-1,f=e.length;++h<f;)g=e[h],"\u001ef_meta"!==g&&(d=b[g],c=a[g],c!==d&&(d&&"object"===typeof d?void 0===c?a[g]=d:n(c,d):void 0===c&&(a[g]=d)));return a}var p=a(49),l=a(13),z=a(84),r=a(3),v=a(55),k=a(47),x=a(82);b.exports=c;c.prototype=Object.create(p.prototype);c.prototype.lift=function(a,b){b=new c(b||this);b.type=this.type;b.model=this.model;b._args=this._args;b.operator=a;a.data=a.data||this.operator.data;a.errors=a.errors||this.operator.errors;a.operation=a.operation||this.operator.operation; a.progressive=a.progressive||this.operator.progressive;a.maxRetryCount=a.maxRetryCount||this.operator.maxRetryCount;return b};c.prototype.operator=function(a){return this._subscribe(a)};c.prototype._subscribe=function(a){a.onNext({type:this.type,args:this._args,model:this.model,version:this.model._root.version});a.onCompleted();return a};c.prototype._toJSON=function(a,b){void 0===a&&(a={},a.__proto__=r.prototype);return this.lift(new f(a,b||this.operator.errors,"json",this.operator.progressive,this.operator.maxRetryCount), this.source)};c.prototype._toJSONG=function(a,b){void 0===a&&(a={},a.__proto__=r.prototype);return this.lift(new f(a,b||this.operator.errors,"jsonGraph",this.operator.progressive,this.operator.maxRetryCount),this.source)};c.prototype.retry=function(a){return this.lift(new f(this.operator.data,this.operator.errors,this.operator.operation,this.operator.progresive,a),this.source)};c.prototype.progressively=function(){return this.lift(new f(this.operator.data,this.operator.errors,this.operator.operation, !0,this.operator.maxRetryCount),this.source)};f.prototype.call=function(a,b){return a.subscribe(new e(b,this.data,this.errors,this.operation,this.progressive))};e.prototype=Object.create(l.prototype);e.prototype.operations={get:a(61),set:a(73),call:a(60),invalidate:a(71)};e.prototype.next=e.prototype.onNext=function(a){if(!this.started)this.args=a.args,this.type=a.type,this.model=a.model,this.version=a.version,this.maxRetryCount=this.maxRetryCount||this.model._root.maxRetryCount;else if(this.destination){var b, c=a.type;a=a.args||a.paths;var d=this.data,e=this.model,g=this.errors,f=this.hasValue,k=this.operation,l=this.progressive,p=l&&d;e._recycleJSON&&"get"===this.type&&(p=!1);p&&(d={},d.__proto__=r.prototype);if(a&&a.length){var v=this.operations[c][k](e,a,d,l||!e._source,-1===this.retryCount);if(v.error)return w(this,v.error);g&&v.errors&&g.push.apply(g,v.errors);if(b=v.fragments)a=v.args,this.fragments=b;this.relative=v.relative;this.requested=v.requested;this.missing=b=v.missing;this.hasValue=f||(f= v.hasValue)}this.completed=!b||!e._source;"set"!==c&&(this.args=a,p&&(this.data=n(d,this.data)));l&&f&&d&&(d.json||d.jsonGraph)&&m(d,k,e._root,this.destination)}};e.prototype.error=e.prototype.onError=function(a){if(a instanceof k)return l.prototype.onError.call(this,a);this.errored=!0;this.onCompleted(a)};e.prototype.complete=e.prototype.onCompleted=function(a){if(this.destination){var b,c;if(!this.started&&(this.started=!0))this.onNext(this);else if(c=this.errored)this.onNext({type:"get",paths:this.relative}); if(c||this.completed)return!this.progressive&&this.hasValue&&((b=this.data)&&b.json||b.jsonGraph)&&m(b,this.operation,this.model._root,this.destination),b=this.errors,c||a||b&&b.length?w(this,b.length&&b||a):l.prototype.onCompleted.call(this);if(++this.retryCount>=this.maxRetryCount)return w(this,new x(this.retryCount,this.requested,this.relative,this.missing));this.request=this.model._root.requests[this.type](this.model,this.missing,this.relative,this.fragments).subscribe(this)}};e.prototype.dispose= e.pr