@weng-lab/genomebrowser 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gbc.cjs.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("react"),Nr=require("react-dom");function bh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function xh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const ci=bh(E),Eh=`M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),E=require("react"),Nr=require("react-dom");function bh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function xh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const ci=bh(E),Eh=`M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
2
2
  s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
3
3
  c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z`,wh=`M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
4
- C22.32,8.481,24.301,9.057,26.013,10.047z`,Oh=({width:e,height:t})=>p.jsxs("svg",{width:e,height:t,viewBox:"0 0 40 40",children:[p.jsx("path",{opacity:"0.2",fill:"#000",d:Eh}),p.jsx("path",{fill:"#000",d:wh,children:p.jsx("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 20 20",to:"360 20 20",dur:"0.5s",repeatCount:"indefinite"})})]}),Sh=`M446.324,367.381L262.857,41.692c-15.644-28.444-58.311-28.444-73.956,0L5.435,367.381
4
+ C22.32,8.481,24.301,9.057,26.013,10.047z`,Sh=({width:e,height:t})=>m.jsxs("svg",{width:e,height:t,viewBox:"0 0 40 40",children:[m.jsx("path",{opacity:"0.2",fill:"#000",d:Eh}),m.jsx("path",{fill:"#000",d:wh,children:m.jsx("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 20 20",to:"360 20 20",dur:"0.5s",repeatCount:"indefinite"})})]}),Oh=`M446.324,367.381L262.857,41.692c-15.644-28.444-58.311-28.444-73.956,0L5.435,367.381
5
5
  c-15.644,28.444,4.267,64,36.978,64h365.511C442.057,429.959,461.968,395.825,446.324,367.381z`,Th=`M196.013,212.359l11.378,75.378c1.422,8.533,8.533,15.644,18.489,15.644l0,0
6
6
  c8.533,0,17.067-7.111,18.489-15.644l11.378-75.378c2.844-18.489-11.378-34.133-29.867-34.133l0,0
7
- C207.39,178.225,194.59,193.87,196.013,212.359z`,mu=({width:e,height:t})=>p.jsxs("svg",{width:e,height:t,viewBox:"0 0 451.74 481.74",children:[p.jsx("path",{fill:"#E24C4B",d:Sh}),p.jsx("path",{fill:"#FFFFFF",d:"M225.879,63.025l183.467,325.689H42.413L225.879,63.025L225.879,63.025z"}),p.jsxs("g",{children:[p.jsx("path",{fill:"#3F4448;",d:Th}),p.jsx("circle",{fill:"#3F4448",cx:"225.879",cy:"336.092",r:"17.067"})]})]});function Ch(e){return p.jsx("svg",{fill:"#000000",cursor:"pointer",x:e.x,y:e.y,height:e.height,width:e.width,version:"1.1",id:"Capa_1",viewBox:"0 0 54 54",children:p.jsxs("g",{children:[p.jsx("path",{d:`M51.22,21h-5.052c-0.812,0-1.481-0.447-1.792-1.197s-0.153-1.54,0.42-2.114l3.572-3.571\r
7
+ C207.39,178.225,194.59,193.87,196.013,212.359z`,pu=({width:e,height:t})=>m.jsxs("svg",{width:e,height:t,viewBox:"0 0 451.74 481.74",children:[m.jsx("path",{fill:"#E24C4B",d:Oh}),m.jsx("path",{fill:"#FFFFFF",d:"M225.879,63.025l183.467,325.689H42.413L225.879,63.025L225.879,63.025z"}),m.jsxs("g",{children:[m.jsx("path",{fill:"#3F4448;",d:Th}),m.jsx("circle",{fill:"#3F4448",cx:"225.879",cy:"336.092",r:"17.067"})]})]});function Ch(e){return m.jsx("svg",{fill:"#000000",cursor:"pointer",x:e.x,y:e.y,height:e.height,width:e.width,version:"1.1",id:"Capa_1",viewBox:"0 0 54 54",children:m.jsxs("g",{children:[m.jsx("path",{d:`M51.22,21h-5.052c-0.812,0-1.481-0.447-1.792-1.197s-0.153-1.54,0.42-2.114l3.572-3.571\r
8
8
  c0.525-0.525,0.814-1.224,0.814-1.966c0-0.743-0.289-1.441-0.814-1.967l-4.553-4.553c-1.05-1.05-2.881-1.052-3.933,0l-3.571,3.571\r
9
9
  c-0.574,0.573-1.366,0.733-2.114,0.421C33.447,9.313,33,8.644,33,7.832V2.78C33,1.247,31.753,0,30.22,0H23.78\r
10
10
  C22.247,0,21,1.247,21,2.78v5.052c0,0.812-0.447,1.481-1.197,1.792c-0.748,0.313-1.54,0.152-2.114-0.421l-3.571-3.571\r
@@ -26,7 +26,7 @@ C207.39,178.225,194.59,193.87,196.013,212.359z`,mu=({width:e,height:t})=>p.jsxs(
26
26
  c0.304-0.305,0.799-0.305,1.104,0l3.571,3.571c1.147,1.147,2.792,1.476,4.294,0.854C22.068,10.851,23,9.456,23,7.832V2.78\r
27
27
  C23,2.35,23.35,2,23.78,2h6.439C30.65,2,31,2.35,31,2.78v5.052c0,1.624,0.932,3.019,2.432,3.64\r
28
28
  c1.502,0.622,3.146,0.294,4.294-0.854l3.571-3.571c0.306-0.305,0.801-0.305,1.104,0l4.553,4.553c0.305,0.305,0.305,0.8,0,1.104\r
29
- l-3.572,3.571c-1.148,1.148-1.476,2.794-0.854,4.294c0.621,1.5,2.016,2.432,3.64,2.432h5.052C51.65,23,52,23.35,52,23.78V30.22z`}),p.jsx("path",{d:`M27,18c-4.963,0-9,4.037-9,9s4.037,9,9,9s9-4.037,9-9S31.963,18,27,18z M27,34c-3.859,0-7-3.141-7-7s3.141-7,7-7\r
29
+ l-3.572,3.571c-1.148,1.148-1.476,2.794-0.854,4.294c0.621,1.5,2.016,2.432,3.64,2.432h5.052C51.65,23,52,23.35,52,23.78V30.22z`}),m.jsx("path",{d:`M27,18c-4.963,0-9,4.037-9,9s4.037,9,9,9s9-4.037,9-9S31.963,18,27,18z M27,34c-3.859,0-7-3.141-7-7s3.141-7,7-7\r
30
30
  s7,3.141,7,7S30.859,34,27,34z`})]})})}var _h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kh(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Di={exports:{}},vu={},Ia={exports:{}},ei={exports:{}},De={};/** @license React v16.13.1
31
31
  * react-is.production.min.js
32
32
  *
@@ -34,93 +34,93 @@ C207.39,178.225,194.59,193.87,196.013,212.359z`,mu=({width:e,height:t})=>p.jsxs(
34
34
  *
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
- */var Ls;function Dh(){if(Ls)return De;Ls=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function y(O){if(typeof O=="object"&&O!==null){var R=O.$$typeof;switch(R){case t:switch(O=O.type,O){case c:case u:case r:case a:case i:case d:return O;default:switch(O=O&&O.$$typeof,O){case s:case l:case x:case g:case o:return O;default:return R}}case n:return R}}}function C(O){return y(O)===u}return De.AsyncMode=c,De.ConcurrentMode=u,De.ContextConsumer=s,De.ContextProvider=o,De.Element=t,De.ForwardRef=l,De.Fragment=r,De.Lazy=x,De.Memo=g,De.Portal=n,De.Profiler=a,De.StrictMode=i,De.Suspense=d,De.isAsyncMode=function(O){return C(O)||y(O)===c},De.isConcurrentMode=C,De.isContextConsumer=function(O){return y(O)===s},De.isContextProvider=function(O){return y(O)===o},De.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},De.isForwardRef=function(O){return y(O)===l},De.isFragment=function(O){return y(O)===r},De.isLazy=function(O){return y(O)===x},De.isMemo=function(O){return y(O)===g},De.isPortal=function(O){return y(O)===n},De.isProfiler=function(O){return y(O)===a},De.isStrictMode=function(O){return y(O)===i},De.isSuspense=function(O){return y(O)===d},De.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===a||O===i||O===d||O===f||typeof O=="object"&&O!==null&&(O.$$typeof===x||O.$$typeof===g||O.$$typeof===o||O.$$typeof===s||O.$$typeof===l||O.$$typeof===T||O.$$typeof===S||O.$$typeof===_||O.$$typeof===w)},De.typeOf=y,De}var Me={};/** @license React v16.13.1
37
+ */var Ls;function Dh(){if(Ls)return De;Ls=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case c:case u:case r:case a:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case s:case l:case x:case g:case o:return S;default:return R}}case n:return R}}}function C(S){return y(S)===u}return De.AsyncMode=c,De.ConcurrentMode=u,De.ContextConsumer=s,De.ContextProvider=o,De.Element=t,De.ForwardRef=l,De.Fragment=r,De.Lazy=x,De.Memo=g,De.Portal=n,De.Profiler=a,De.StrictMode=i,De.Suspense=h,De.isAsyncMode=function(S){return C(S)||y(S)===c},De.isConcurrentMode=C,De.isContextConsumer=function(S){return y(S)===s},De.isContextProvider=function(S){return y(S)===o},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},De.isForwardRef=function(S){return y(S)===l},De.isFragment=function(S){return y(S)===r},De.isLazy=function(S){return y(S)===x},De.isMemo=function(S){return y(S)===g},De.isPortal=function(S){return y(S)===n},De.isProfiler=function(S){return y(S)===a},De.isStrictMode=function(S){return y(S)===i},De.isSuspense=function(S){return y(S)===h},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===u||S===a||S===i||S===h||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===x||S.$$typeof===g||S.$$typeof===o||S.$$typeof===s||S.$$typeof===l||S.$$typeof===T||S.$$typeof===O||S.$$typeof===_||S.$$typeof===w)},De.typeOf=y,De}var Me={};/** @license React v16.13.1
38
38
  * react-is.development.js
39
39
  *
40
40
  * Copyright (c) Facebook, Inc. and its affiliates.
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */var Is;function Mh(){return Is||(Is=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function y(L){return typeof L=="string"||typeof L=="function"||L===r||L===u||L===a||L===i||L===d||L===f||typeof L=="object"&&L!==null&&(L.$$typeof===x||L.$$typeof===g||L.$$typeof===o||L.$$typeof===s||L.$$typeof===l||L.$$typeof===T||L.$$typeof===S||L.$$typeof===_||L.$$typeof===w)}function C(L){if(typeof L=="object"&&L!==null){var ae=L.$$typeof;switch(ae){case t:var ce=L.type;switch(ce){case c:case u:case r:case a:case i:case d:return ce;default:var oe=ce&&ce.$$typeof;switch(oe){case s:case l:case x:case g:case o:return oe;default:return ae}}case n:return ae}}}var O=c,R=u,P=s,F=o,U=t,V=l,ye=r,_e=x,ve=g,we=n,Ne=a,Ie=i,G=d,$=!1;function Z(L){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(L)||C(L)===c}function j(L){return C(L)===u}function A(L){return C(L)===s}function Y(L){return C(L)===o}function se(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function ee(L){return C(L)===l}function me(L){return C(L)===r}function H(L){return C(L)===x}function re(L){return C(L)===g}function ge(L){return C(L)===n}function ue(L){return C(L)===a}function pe(L){return C(L)===i}function I(L){return C(L)===d}Me.AsyncMode=O,Me.ConcurrentMode=R,Me.ContextConsumer=P,Me.ContextProvider=F,Me.Element=U,Me.ForwardRef=V,Me.Fragment=ye,Me.Lazy=_e,Me.Memo=ve,Me.Portal=we,Me.Profiler=Ne,Me.StrictMode=Ie,Me.Suspense=G,Me.isAsyncMode=Z,Me.isConcurrentMode=j,Me.isContextConsumer=A,Me.isContextProvider=Y,Me.isElement=se,Me.isForwardRef=ee,Me.isFragment=me,Me.isLazy=H,Me.isMemo=re,Me.isPortal=ge,Me.isProfiler=ue,Me.isStrictMode=pe,Me.isSuspense=I,Me.isValidElementType=y,Me.typeOf=C}()),Me}var Rs;function yu(){return Rs||(Rs=1,process.env.NODE_ENV==="production"?ei.exports=Dh():ei.exports=Mh()),ei.exports}/*
44
+ */var Is;function Mh(){return Is||(Is=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function y(L){return typeof L=="string"||typeof L=="function"||L===r||L===u||L===a||L===i||L===h||L===f||typeof L=="object"&&L!==null&&(L.$$typeof===x||L.$$typeof===g||L.$$typeof===o||L.$$typeof===s||L.$$typeof===l||L.$$typeof===T||L.$$typeof===O||L.$$typeof===_||L.$$typeof===w)}function C(L){if(typeof L=="object"&&L!==null){var ae=L.$$typeof;switch(ae){case t:var ce=L.type;switch(ce){case c:case u:case r:case a:case i:case h:return ce;default:var oe=ce&&ce.$$typeof;switch(oe){case s:case l:case x:case g:case o:return oe;default:return ae}}case n:return ae}}}var S=c,R=u,P=s,F=o,U=t,V=l,ye=r,_e=x,ve=g,we=n,Ae=a,Ie=i,G=h,$=!1;function Z(L){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(L)||C(L)===c}function j(L){return C(L)===u}function A(L){return C(L)===s}function Y(L){return C(L)===o}function se(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function ee(L){return C(L)===l}function pe(L){return C(L)===r}function W(L){return C(L)===x}function re(L){return C(L)===g}function ge(L){return C(L)===n}function ue(L){return C(L)===a}function me(L){return C(L)===i}function I(L){return C(L)===h}Me.AsyncMode=S,Me.ConcurrentMode=R,Me.ContextConsumer=P,Me.ContextProvider=F,Me.Element=U,Me.ForwardRef=V,Me.Fragment=ye,Me.Lazy=_e,Me.Memo=ve,Me.Portal=we,Me.Profiler=Ae,Me.StrictMode=Ie,Me.Suspense=G,Me.isAsyncMode=Z,Me.isConcurrentMode=j,Me.isContextConsumer=A,Me.isContextProvider=Y,Me.isElement=se,Me.isForwardRef=ee,Me.isFragment=pe,Me.isLazy=W,Me.isMemo=re,Me.isPortal=ge,Me.isProfiler=ue,Me.isStrictMode=me,Me.isSuspense=I,Me.isValidElementType=y,Me.typeOf=C}()),Me}var Rs;function yu(){return Rs||(Rs=1,process.env.NODE_ENV==="production"?ei.exports=Dh():ei.exports=Mh()),ei.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var ra,js;function Lh(){if(js)return ra;js=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(l){return o[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ra=i()?Object.assign:function(a,o){for(var s,c=r(a),u,l=1;l<arguments.length;l++){s=Object(arguments[l]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){u=e(s);for(var f=0;f<u.length;f++)n.call(s,u[f])&&(c[u[f]]=s[u[f]])}}return c},ra}var ia,Ps;function fo(){if(Ps)return ia;Ps=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ia=e,ia}var aa,Ns;function bu(){return Ns||(Ns=1,aa=Function.call.bind(Object.prototype.hasOwnProperty)),aa}var oa,As;function Ih(){if(As)return oa;As=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fo(),n={},r=bu();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,u){if(process.env.NODE_ENV!=="production"){for(var l in a)if(r(a,l)){var d;try{if(typeof a[l]!="function"){var f=Error((c||"React class")+": "+s+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[l](o,l,c,s,null,t)}catch(x){d=x}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var g=u?u():"";e("Failed "+s+" type: "+d.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},oa=i,oa}var sa,Fs;function Rh(){if(Fs)return sa;Fs=1;var e=yu(),t=Lh(),n=fo(),r=bu(),i=Ih(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return sa=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function d(j){var A=j&&(u&&j[u]||j[l]);if(typeof A=="function")return A}var f="<<anonymous>>",g={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:_(),arrayOf:y,element:C(),elementType:O(),instanceOf:R,node:V(),objectOf:F,oneOf:P,oneOfType:U,shape:_e,exact:ve};function x(j,A){return j===A?j!==0||1/j===1/A:j!==j&&A!==A}function w(j,A){this.message=j,this.data=A&&typeof A=="object"?A:{},this.stack=""}w.prototype=Error.prototype;function T(j){if(process.env.NODE_ENV!=="production")var A={},Y=0;function se(me,H,re,ge,ue,pe,I){if(ge=ge||f,pe=pe||re,I!==n){if(c){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=ge+":"+re;!A[ae]&&Y<3&&(a("You are manually calling a React.PropTypes validation function for the `"+pe+"` prop on `"+ge+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[ae]=!0,Y++)}}return H[re]==null?me?H[re]===null?new w("The "+ue+" `"+pe+"` is marked as required "+("in `"+ge+"`, but its value is `null`.")):new w("The "+ue+" `"+pe+"` is marked as required in "+("`"+ge+"`, but its value is `undefined`.")):null:j(H,re,ge,ue,pe)}var ee=se.bind(null,!1);return ee.isRequired=se.bind(null,!0),ee}function S(j){function A(Y,se,ee,me,H,re){var ge=Y[se],ue=Ie(ge);if(ue!==j){var pe=G(ge);return new w("Invalid "+me+" `"+H+"` of type "+("`"+pe+"` supplied to `"+ee+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return T(A)}function _(){return T(o)}function y(j){function A(Y,se,ee,me,H){if(typeof j!="function")return new w("Property `"+H+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var re=Y[se];if(!Array.isArray(re)){var ge=Ie(re);return new w("Invalid "+me+" `"+H+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<re.length;ue++){var pe=j(re,ue,ee,me,H+"["+ue+"]",n);if(pe instanceof Error)return pe}return null}return T(A)}function C(){function j(A,Y,se,ee,me){var H=A[Y];if(!s(H)){var re=Ie(H);return new w("Invalid "+ee+" `"+me+"` of type "+("`"+re+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return T(j)}function O(){function j(A,Y,se,ee,me){var H=A[Y];if(!e.isValidElementType(H)){var re=Ie(H);return new w("Invalid "+ee+" `"+me+"` of type "+("`"+re+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return T(j)}function R(j){function A(Y,se,ee,me,H){if(!(Y[se]instanceof j)){var re=j.name||f,ge=Z(Y[se]);return new w("Invalid "+me+" `"+H+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected ")+("instance of `"+re+"`."))}return null}return T(A)}function P(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function A(Y,se,ee,me,H){for(var re=Y[se],ge=0;ge<j.length;ge++)if(x(re,j[ge]))return null;var ue=JSON.stringify(j,function(I,L){var ae=G(L);return ae==="symbol"?String(L):L});return new w("Invalid "+me+" `"+H+"` of value `"+String(re)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return T(A)}function F(j){function A(Y,se,ee,me,H){if(typeof j!="function")return new w("Property `"+H+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+me+" `"+H+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected an object."));for(var ue in re)if(r(re,ue)){var pe=j(re,ue,ee,me,H+"."+ue,n);if(pe instanceof Error)return pe}return null}return T(A)}function U(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var A=0;A<j.length;A++){var Y=j[A];if(typeof Y!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Y)+" at index "+A+"."),o}function se(ee,me,H,re,ge){for(var ue=[],pe=0;pe<j.length;pe++){var I=j[pe],L=I(ee,me,H,re,ge,n);if(L==null)return null;L.data&&r(L.data,"expectedType")&&ue.push(L.data.expectedType)}var ae=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new w("Invalid "+re+" `"+ge+"` supplied to "+("`"+H+"`"+ae+"."))}return T(se)}function V(){function j(A,Y,se,ee,me){return we(A[Y])?null:new w("Invalid "+ee+" `"+me+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return T(j)}function ye(j,A,Y,se,ee){return new w((j||"React class")+": "+A+" type `"+Y+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function _e(j){function A(Y,se,ee,me,H){var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+me+" `"+H+"` of type `"+ge+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in j){var pe=j[ue];if(typeof pe!="function")return ye(ee,me,H,ue,G(pe));var I=pe(re,ue,ee,me,H+"."+ue,n);if(I)return I}return null}return T(A)}function ve(j){function A(Y,se,ee,me,H){var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+me+" `"+H+"` of type `"+ge+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Y[se],j);for(var pe in ue){var I=j[pe];if(r(j,pe)&&typeof I!="function")return ye(ee,me,H,pe,G(I));if(!I)return new w("Invalid "+me+" `"+H+"` key `"+pe+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Y[se],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(j),null," "));var L=I(re,pe,ee,me,H+"."+pe,n);if(L)return L}return null}return T(A)}function we(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(we);if(j===null||s(j))return!0;var A=d(j);if(A){var Y=A.call(j),se;if(A!==j.entries){for(;!(se=Y.next()).done;)if(!we(se.value))return!1}else for(;!(se=Y.next()).done;){var ee=se.value;if(ee&&!we(ee[1]))return!1}}else return!1;return!0;default:return!1}}function Ne(j,A){return j==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function Ie(j){var A=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":Ne(A,j)?"symbol":A}function G(j){if(typeof j>"u"||j===null)return""+j;var A=Ie(j);if(A==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return A}function $(j){var A=G(j);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function Z(j){return!j.constructor||!j.constructor.name?f:j.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},sa}var ca,Vs;function jh(){if(Vs)return ca;Vs=1;var e=fo();function t(){}function n(){}return n.resetWarningCache=t,ca=function(){function r(o,s,c,u,l,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},ca}if(process.env.NODE_ENV!=="production"){var Ph=yu(),Nh=!0;Ia.exports=Rh()(Ph.isElement,Nh)}else Ia.exports=jh()();var xu=Ia.exports;function Eu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Eu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qs(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Eu(e))&&(r&&(r+=" "),r+=t);return r}const Ah=Object.freeze(Object.defineProperty({__proto__:null,clsx:qs,default:qs},Symbol.toStringTag,{value:"Module"})),Fh=kh(Ah);var We={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.dontSetMe=Bh;Wt.findInArray=Vh;Wt.int=Uh;Wt.isFunction=qh;Wt.isNum=$h;function Vh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function qh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function $h(e){return typeof e=="number"&&!isNaN(e)}function Uh(e){return parseInt(e,10)}function Bh(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var On={};Object.defineProperty(On,"__esModule",{value:!0});On.browserPrefixToKey=Ou;On.browserPrefixToStyle=zh;On.default=void 0;On.getPrefix=wu;const ua=["Moz","Webkit","O","ms"];function wu(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const n=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(let r=0;r<ua.length;r++)if(Ou(t,ua[r])in n)return ua[r];return""}function Ou(e,t){return t?"".concat(t).concat(Wh(e)):e}function zh(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function Wh(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}On.default=wu();Object.defineProperty(We,"__esModule",{value:!0});We.addClassName=Cu;We.addEvent=Gh;We.addUserSelectStyles=ad;We.createCSSTransform=td;We.createSVGTransform=nd;We.getTouch=rd;We.getTouchIdentifier=id;We.getTranslation=ho;We.innerHeight=Jh;We.innerWidth=Zh;We.matchesSelector=Tu;We.matchesSelectorAndParentsTo=Hh;We.offsetXYFromParent=ed;We.outerHeight=Kh;We.outerWidth=Xh;We.removeClassName=_u;We.removeEvent=Yh;We.removeUserSelectStyles=od;var Tt=Wt,$s=Qh(On);function Su(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Su=function(r){return r?n:t})(e)}function Qh(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Su(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}let ti="";function Tu(e,t){return ti||(ti=(0,Tt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Tt.isFunction)(e[n])})),(0,Tt.isFunction)(e[ti])?e[ti](t):!1}function Hh(e,t,n){let r=e;do{if(Tu(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Gh(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Yh(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function Kh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Tt.int)(n.borderTopWidth),t+=(0,Tt.int)(n.borderBottomWidth),t}function Xh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Tt.int)(n.borderLeftWidth),t+=(0,Tt.int)(n.borderRightWidth),t}function Jh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Tt.int)(n.paddingTop),t-=(0,Tt.int)(n.paddingBottom),t}function Zh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Tt.int)(n.paddingLeft),t-=(0,Tt.int)(n.paddingRight),t}function ed(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-i.left)/n,o=(e.clientY+t.scrollTop-i.top)/n;return{x:a,y:o}}function td(e,t){const n=ho(e,t,"px");return{[(0,$s.browserPrefixToKey)("transform",$s.default)]:n}}function nd(e,t){return ho(e,t,"")}function ho(e,t,n){let{x:r,y:i}=e,a="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const o="".concat(typeof t.x=="string"?t.x:t.x+n),s="".concat(typeof t.y=="string"?t.y:t.y+n);a="translate(".concat(o,", ").concat(s,")")+a}return a}function rd(e,t){return e.targetTouches&&(0,Tt.findInArray)(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&(0,Tt.findInArray)(e.changedTouches,n=>t===n.identifier)}function id(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ad(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
48
+ */var ra,js;function Lh(){if(js)return ra;js=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(l){return o[l]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ra=i()?Object.assign:function(a,o){for(var s,c=r(a),u,l=1;l<arguments.length;l++){s=Object(arguments[l]);for(var h in s)t.call(s,h)&&(c[h]=s[h]);if(e){u=e(s);for(var f=0;f<u.length;f++)n.call(s,u[f])&&(c[u[f]]=s[u[f]])}}return c},ra}var ia,Ps;function fo(){if(Ps)return ia;Ps=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ia=e,ia}var aa,Ns;function bu(){return Ns||(Ns=1,aa=Function.call.bind(Object.prototype.hasOwnProperty)),aa}var oa,As;function Ih(){if(As)return oa;As=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=fo(),n={},r=bu();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,u){if(process.env.NODE_ENV!=="production"){for(var l in a)if(r(a,l)){var h;try{if(typeof a[l]!="function"){var f=Error((c||"React class")+": "+s+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}h=a[l](o,l,c,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=u?u():"";e("Failed "+s+" type: "+h.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},oa=i,oa}var sa,Fs;function Rh(){if(Fs)return sa;Fs=1;var e=yu(),t=Lh(),n=fo(),r=bu(),i=Ih(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return sa=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function h(j){var A=j&&(u&&j[u]||j[l]);if(typeof A=="function")return A}var f="<<anonymous>>",g={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:_(),arrayOf:y,element:C(),elementType:S(),instanceOf:R,node:V(),objectOf:F,oneOf:P,oneOfType:U,shape:_e,exact:ve};function x(j,A){return j===A?j!==0||1/j===1/A:j!==j&&A!==A}function w(j,A){this.message=j,this.data=A&&typeof A=="object"?A:{},this.stack=""}w.prototype=Error.prototype;function T(j){if(process.env.NODE_ENV!=="production")var A={},Y=0;function se(pe,W,re,ge,ue,me,I){if(ge=ge||f,me=me||re,I!==n){if(c){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=ge+":"+re;!A[ae]&&Y<3&&(a("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+ge+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[ae]=!0,Y++)}}return W[re]==null?pe?W[re]===null?new w("The "+ue+" `"+me+"` is marked as required "+("in `"+ge+"`, but its value is `null`.")):new w("The "+ue+" `"+me+"` is marked as required in "+("`"+ge+"`, but its value is `undefined`.")):null:j(W,re,ge,ue,me)}var ee=se.bind(null,!1);return ee.isRequired=se.bind(null,!0),ee}function O(j){function A(Y,se,ee,pe,W,re){var ge=Y[se],ue=Ie(ge);if(ue!==j){var me=G(ge);return new w("Invalid "+pe+" `"+W+"` of type "+("`"+me+"` supplied to `"+ee+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return T(A)}function _(){return T(o)}function y(j){function A(Y,se,ee,pe,W){if(typeof j!="function")return new w("Property `"+W+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var re=Y[se];if(!Array.isArray(re)){var ge=Ie(re);return new w("Invalid "+pe+" `"+W+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected an array."))}for(var ue=0;ue<re.length;ue++){var me=j(re,ue,ee,pe,W+"["+ue+"]",n);if(me instanceof Error)return me}return null}return T(A)}function C(){function j(A,Y,se,ee,pe){var W=A[Y];if(!s(W)){var re=Ie(W);return new w("Invalid "+ee+" `"+pe+"` of type "+("`"+re+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return T(j)}function S(){function j(A,Y,se,ee,pe){var W=A[Y];if(!e.isValidElementType(W)){var re=Ie(W);return new w("Invalid "+ee+" `"+pe+"` of type "+("`"+re+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return T(j)}function R(j){function A(Y,se,ee,pe,W){if(!(Y[se]instanceof j)){var re=j.name||f,ge=Z(Y[se]);return new w("Invalid "+pe+" `"+W+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected ")+("instance of `"+re+"`."))}return null}return T(A)}function P(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function A(Y,se,ee,pe,W){for(var re=Y[se],ge=0;ge<j.length;ge++)if(x(re,j[ge]))return null;var ue=JSON.stringify(j,function(I,L){var ae=G(L);return ae==="symbol"?String(L):L});return new w("Invalid "+pe+" `"+W+"` of value `"+String(re)+"` "+("supplied to `"+ee+"`, expected one of "+ue+"."))}return T(A)}function F(j){function A(Y,se,ee,pe,W){if(typeof j!="function")return new w("Property `"+W+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+pe+" `"+W+"` of type "+("`"+ge+"` supplied to `"+ee+"`, expected an object."));for(var ue in re)if(r(re,ue)){var me=j(re,ue,ee,pe,W+"."+ue,n);if(me instanceof Error)return me}return null}return T(A)}function U(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var A=0;A<j.length;A++){var Y=j[A];if(typeof Y!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Y)+" at index "+A+"."),o}function se(ee,pe,W,re,ge){for(var ue=[],me=0;me<j.length;me++){var I=j[me],L=I(ee,pe,W,re,ge,n);if(L==null)return null;L.data&&r(L.data,"expectedType")&&ue.push(L.data.expectedType)}var ae=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new w("Invalid "+re+" `"+ge+"` supplied to "+("`"+W+"`"+ae+"."))}return T(se)}function V(){function j(A,Y,se,ee,pe){return we(A[Y])?null:new w("Invalid "+ee+" `"+pe+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return T(j)}function ye(j,A,Y,se,ee){return new w((j||"React class")+": "+A+" type `"+Y+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function _e(j){function A(Y,se,ee,pe,W){var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+pe+" `"+W+"` of type `"+ge+"` "+("supplied to `"+ee+"`, expected `object`."));for(var ue in j){var me=j[ue];if(typeof me!="function")return ye(ee,pe,W,ue,G(me));var I=me(re,ue,ee,pe,W+"."+ue,n);if(I)return I}return null}return T(A)}function ve(j){function A(Y,se,ee,pe,W){var re=Y[se],ge=Ie(re);if(ge!=="object")return new w("Invalid "+pe+" `"+W+"` of type `"+ge+"` "+("supplied to `"+ee+"`, expected `object`."));var ue=t({},Y[se],j);for(var me in ue){var I=j[me];if(r(j,me)&&typeof I!="function")return ye(ee,pe,W,me,G(I));if(!I)return new w("Invalid "+pe+" `"+W+"` key `"+me+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Y[se],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var L=I(re,me,ee,pe,W+"."+me,n);if(L)return L}return null}return T(A)}function we(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(we);if(j===null||s(j))return!0;var A=h(j);if(A){var Y=A.call(j),se;if(A!==j.entries){for(;!(se=Y.next()).done;)if(!we(se.value))return!1}else for(;!(se=Y.next()).done;){var ee=se.value;if(ee&&!we(ee[1]))return!1}}else return!1;return!0;default:return!1}}function Ae(j,A){return j==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function Ie(j){var A=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":Ae(A,j)?"symbol":A}function G(j){if(typeof j>"u"||j===null)return""+j;var A=Ie(j);if(A==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return A}function $(j){var A=G(j);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function Z(j){return!j.constructor||!j.constructor.name?f:j.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},sa}var ca,Vs;function jh(){if(Vs)return ca;Vs=1;var e=fo();function t(){}function n(){}return n.resetWarningCache=t,ca=function(){function r(o,s,c,u,l,h){if(h!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},ca}if(process.env.NODE_ENV!=="production"){var Ph=yu(),Nh=!0;Ia.exports=Rh()(Ph.isElement,Nh)}else Ia.exports=jh()();var xu=Ia.exports;function Eu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Eu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qs(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Eu(e))&&(r&&(r+=" "),r+=t);return r}const Ah=Object.freeze(Object.defineProperty({__proto__:null,clsx:qs,default:qs},Symbol.toStringTag,{value:"Module"})),Fh=kh(Ah);var ze={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.dontSetMe=Bh;zt.findInArray=Vh;zt.int=Uh;zt.isFunction=qh;zt.isNum=$h;function Vh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function qh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function $h(e){return typeof e=="number"&&!isNaN(e)}function Uh(e){return parseInt(e,10)}function Bh(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.browserPrefixToKey=Su;Sn.browserPrefixToStyle=Hh;Sn.default=void 0;Sn.getPrefix=wu;const ua=["Moz","Webkit","O","ms"];function wu(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const n=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(let r=0;r<ua.length;r++)if(Su(t,ua[r])in n)return ua[r];return""}function Su(e,t){return t?"".concat(t).concat(zh(e)):e}function Hh(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function zh(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}Sn.default=wu();Object.defineProperty(ze,"__esModule",{value:!0});ze.addClassName=Cu;ze.addEvent=Gh;ze.addUserSelectStyles=ad;ze.createCSSTransform=td;ze.createSVGTransform=nd;ze.getTouch=rd;ze.getTouchIdentifier=id;ze.getTranslation=ho;ze.innerHeight=Jh;ze.innerWidth=Zh;ze.matchesSelector=Tu;ze.matchesSelectorAndParentsTo=Wh;ze.offsetXYFromParent=ed;ze.outerHeight=Kh;ze.outerWidth=Xh;ze.removeClassName=_u;ze.removeEvent=Yh;ze.removeUserSelectStyles=od;var Tt=zt,$s=Qh(Sn);function Ou(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ou=function(r){return r?n:t})(e)}function Qh(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ou(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}let ti="";function Tu(e,t){return ti||(ti=(0,Tt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Tt.isFunction)(e[n])})),(0,Tt.isFunction)(e[ti])?e[ti](t):!1}function Wh(e,t,n){let r=e;do{if(Tu(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Gh(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Yh(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function Kh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Tt.int)(n.borderTopWidth),t+=(0,Tt.int)(n.borderBottomWidth),t}function Xh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Tt.int)(n.borderLeftWidth),t+=(0,Tt.int)(n.borderRightWidth),t}function Jh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Tt.int)(n.paddingTop),t-=(0,Tt.int)(n.paddingBottom),t}function Zh(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Tt.int)(n.paddingLeft),t-=(0,Tt.int)(n.paddingRight),t}function ed(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-i.left)/n,o=(e.clientY+t.scrollTop-i.top)/n;return{x:a,y:o}}function td(e,t){const n=ho(e,t,"px");return{[(0,$s.browserPrefixToKey)("transform",$s.default)]:n}}function nd(e,t){return ho(e,t,"")}function ho(e,t,n){let{x:r,y:i}=e,a="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const o="".concat(typeof t.x=="string"?t.x:t.x+n),s="".concat(typeof t.y=="string"?t.y:t.y+n);a="translate(".concat(o,", ").concat(s,")")+a}return a}function rd(e,t){return e.targetTouches&&(0,Tt.findInArray)(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&(0,Tt.findInArray)(e.changedTouches,n=>t===n.identifier)}function id(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ad(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
50
  `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
- `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&Cu(e.body,"react-draggable-transparent-selection")}function od(e){if(e)try{if(e.body&&_u(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function Cu(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function _u(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.canDragX=ud;Qt.canDragY=ld;Qt.createCoreData=hd;Qt.createDraggableData=dd;Qt.getBoundPosition=sd;Qt.getControlPosition=fd;Qt.snapToGrid=cd;var St=Wt,Nn=We;function sd(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:pd(r);const i=po(e);if(typeof r=="string"){const{ownerDocument:a}=i,o=a.defaultView;let s;if(r==="parent"?s=i.parentNode:s=a.querySelector(r),!(s instanceof o.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const c=s,u=o.getComputedStyle(i),l=o.getComputedStyle(c);r={left:-i.offsetLeft+(0,St.int)(l.paddingLeft)+(0,St.int)(u.marginLeft),top:-i.offsetTop+(0,St.int)(l.paddingTop)+(0,St.int)(u.marginTop),right:(0,Nn.innerWidth)(c)-(0,Nn.outerWidth)(i)-i.offsetLeft+(0,St.int)(l.paddingRight)-(0,St.int)(u.marginRight),bottom:(0,Nn.innerHeight)(c)-(0,Nn.outerHeight)(i)-i.offsetTop+(0,St.int)(l.paddingBottom)-(0,St.int)(u.marginBottom)}}return(0,St.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,St.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,St.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,St.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function cd(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function ud(e){return e.props.axis==="both"||e.props.axis==="x"}function ld(e){return e.props.axis==="both"||e.props.axis==="y"}function fd(e,t,n){const r=typeof t=="number"?(0,Nn.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const i=po(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,Nn.offsetXYFromParent)(r||e,a,n.props.scale)}function hd(e,t,n){const r=!(0,St.isNum)(e.lastX),i=po(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function dd(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function pd(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function po(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Mi={},Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.default=md;function md(){}Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;var la=vd(E),Et=mo(xu),gd=mo(Nr),pt=We,tn=Qt,fa=Wt,pr=mo(Li);function mo(e){return e&&e.__esModule?e:{default:e}}function ku(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ku=function(r){return r?n:t})(e)}function vd(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=ku(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function gt(e,t,n){return t=yd(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yd(e){var t=bd(e,"string");return typeof t=="symbol"?t:String(t)}function bd(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const At={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nn=At.mouse,Ii=class extends la.Component{constructor(){super(...arguments),gt(this,"dragging",!1),gt(this,"lastX",NaN),gt(this,"lastY",NaN),gt(this,"touchIdentifier",null),gt(this,"mounted",!1),gt(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const n=this.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=n;if(this.props.disabled||!(t.target instanceof r.defaultView.Node)||this.props.handle&&!(0,pt.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,pt.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const i=(0,pt.getTouchIdentifier)(t);this.touchIdentifier=i;const a=(0,tn.getControlPosition)(t,i,this);if(a==null)return;const{x:o,y:s}=a,c=(0,tn.createCoreData)(this,o,s);(0,pr.default)("DraggableCore: handleDragStart: %j",c),(0,pr.default)("calling",this.props.onStart),!(this.props.onStart(t,c)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,pt.addUserSelectStyles)(r),this.dragging=!0,this.lastX=o,this.lastY=s,(0,pt.addEvent)(r,nn.move,this.handleDrag),(0,pt.addEvent)(r,nn.stop,this.handleDragStop))}),gt(this,"handleDrag",t=>{const n=(0,tn.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:i}=n;if(Array.isArray(this.props.grid)){let s=r-this.lastX,c=i-this.lastY;if([s,c]=(0,tn.snapToGrid)(this.props.grid,s,c),!s&&!c)return;r=this.lastX+s,i=this.lastY+c}const a=(0,tn.createCoreData)(this,r,i);if((0,pr.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(c)}return}this.lastX=r,this.lastY=i}),gt(this,"handleDragStop",t=>{if(!this.dragging)return;const n=(0,tn.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:i}=n;if(Array.isArray(this.props.grid)){let c=r-this.lastX||0,u=i-this.lastY||0;[c,u]=(0,tn.snapToGrid)(this.props.grid,c,u),r=this.lastX+c,i=this.lastY+u}const a=(0,tn.createCoreData)(this,r,i);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,pt.removeUserSelectStyles)(s.ownerDocument),(0,pr.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,pr.default)("DraggableCore: Removing handlers"),(0,pt.removeEvent)(s.ownerDocument,nn.move,this.handleDrag),(0,pt.removeEvent)(s.ownerDocument,nn.stop,this.handleDragStop))}),gt(this,"onMouseDown",t=>(nn=At.mouse,this.handleDragStart(t))),gt(this,"onMouseUp",t=>(nn=At.mouse,this.handleDragStop(t))),gt(this,"onTouchStart",t=>(nn=At.touch,this.handleDragStart(t))),gt(this,"onTouchEnd",t=>(nn=At.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,pt.addEvent)(t,At.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,pt.removeEvent)(n,At.mouse.move,this.handleDrag),(0,pt.removeEvent)(n,At.touch.move,this.handleDrag),(0,pt.removeEvent)(n,At.mouse.stop,this.handleDragStop),(0,pt.removeEvent)(n,At.touch.stop,this.handleDragStop),(0,pt.removeEvent)(t,At.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,pt.removeUserSelectStyles)(n)}}findDOMNode(){var t,n;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(n=this.props)===null||n===void 0||(n=n.nodeRef)===null||n===void 0?void 0:n.current:gd.default.findDOMNode(this)}render(){return la.cloneElement(la.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Mi.default=Ii;gt(Ii,"displayName","DraggableCore");gt(Ii,"propTypes",{allowAnyClick:Et.default.bool,children:Et.default.node.isRequired,disabled:Et.default.bool,enableUserSelectHack:Et.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Et.default.arrayOf(Et.default.number),handle:Et.default.string,cancel:Et.default.string,nodeRef:Et.default.object,onStart:Et.default.func,onDrag:Et.default.func,onStop:Et.default.func,onMouseDown:Et.default.func,scale:Et.default.number,className:fa.dontSetMe,style:fa.dontSetMe,transform:fa.dontSetMe});gt(Ii,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=f(E),n=l(xu),r=l(Nr),i=l(Fh),a=We,o=Qt,s=Wt,c=l(Mi),u=l(Li);function l(_){return _&&_.__esModule?_:{default:_}}function d(_){if(typeof WeakMap!="function")return null;var y=new WeakMap,C=new WeakMap;return(d=function(O){return O?C:y})(_)}function f(_,y){if(_&&_.__esModule)return _;if(_===null||typeof _!="object"&&typeof _!="function")return{default:_};var C=d(y);if(C&&C.has(_))return C.get(_);var O={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in _)if(P!=="default"&&Object.prototype.hasOwnProperty.call(_,P)){var F=R?Object.getOwnPropertyDescriptor(_,P):null;F&&(F.get||F.set)?Object.defineProperty(O,P,F):O[P]=_[P]}return O.default=_,C&&C.set(_,O),O}function g(){return g=Object.assign?Object.assign.bind():function(_){for(var y=1;y<arguments.length;y++){var C=arguments[y];for(var O in C)Object.prototype.hasOwnProperty.call(C,O)&&(_[O]=C[O])}return _},g.apply(this,arguments)}function x(_,y,C){return y=w(y),y in _?Object.defineProperty(_,y,{value:C,enumerable:!0,configurable:!0,writable:!0}):_[y]=C,_}function w(_){var y=T(_,"string");return typeof y=="symbol"?y:String(y)}function T(_,y){if(typeof _!="object"||_===null)return _;var C=_[Symbol.toPrimitive];if(C!==void 0){var O=C.call(_,y||"default");if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(_)}class S extends t.Component{static getDerivedStateFromProps(y,C){let{position:O}=y,{prevPropsPosition:R}=C;return O&&(!R||O.x!==R.x||O.y!==R.y)?((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:O,prevPropsPosition:R}),{x:O.x,y:O.y,prevPropsPosition:{...O}}):null}constructor(y){super(y),x(this,"onDragStart",(C,O)=>{if((0,u.default)("Draggable: onDragStart: %j",O),this.props.onStart(C,(0,o.createDraggableData)(this,O))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),x(this,"onDrag",(C,O)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",O);const R=(0,o.createDraggableData)(this,O),P={x:R.x,y:R.y,slackX:0,slackY:0};if(this.props.bounds){const{x:U,y:V}=P;P.x+=this.state.slackX,P.y+=this.state.slackY;const[ye,_e]=(0,o.getBoundPosition)(this,P.x,P.y);P.x=ye,P.y=_e,P.slackX=this.state.slackX+(U-P.x),P.slackY=this.state.slackY+(V-P.y),R.x=P.x,R.y=P.y,R.deltaX=P.x-this.state.x,R.deltaY=P.y-this.state.y}if(this.props.onDrag(C,R)===!1)return!1;this.setState(P)}),x(this,"onDragStop",(C,O)=>{if(!this.state.dragging||this.props.onStop(C,(0,o.createDraggableData)(this,O))===!1)return!1;(0,u.default)("Draggable: onDragStop: %j",O);const P={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:U,y:V}=this.props.position;P.x=U,P.y=V}this.setState(P)}),this.state={dragging:!1,dragged:!1,x:y.position?y.position.x:y.defaultPosition.x,y:y.position?y.position.y:y.defaultPosition.y,prevPropsPosition:{...y.position},slackX:0,slackY:0,isElementSVG:!1},y.position&&!(y.onDrag||y.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var y,C;return(y=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&y!==void 0?y:r.default.findDOMNode(this)}render(){const{axis:y,bounds:C,children:O,defaultPosition:R,defaultClassName:P,defaultClassNameDragging:F,defaultClassNameDragged:U,position:V,positionOffset:ye,scale:_e,...ve}=this.props;let we={},Ne=null;const G=!!!V||this.state.dragging,$=V||R,Z={x:(0,o.canDragX)(this)&&G?this.state.x:$.x,y:(0,o.canDragY)(this)&&G?this.state.y:$.y};this.state.isElementSVG?Ne=(0,a.createSVGTransform)(Z,ye):we=(0,a.createCSSTransform)(Z,ye);const j=(0,i.default)(O.props.className||"",P,{[F]:this.state.dragging,[U]:this.state.dragged});return t.createElement(c.default,g({},ve,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(O),{className:j,style:{...O.props.style,...we},transform:Ne}))}}e.default=S,x(S,"displayName","Draggable"),x(S,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),x(S,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(vu);const{default:Du,DraggableCore:xd}=vu;Di.exports=Du;Di.exports.default=Du;Di.exports.DraggableCore=xd;var Ed=Di.exports;const yi=gu(Ed);var Fe=(e=>(e.FULL="full",e.DENSE="dense",e.SQUISH="squish",e.PACK="pack",e.HIDE="hide",e.DOWNLOAD="download",e))(Fe||{}),X=(e=>(e.UNDEFINED="undefined",e.RULER="ruler",e.BIGWIG="bigwig",e.BIGBED="bigbed",e.IMPORTANCE="importance",e.TRANSCRIPT="transcript",e.BAM="bam",e.MOTIF="motif",e.LDTRACK="ldtrack",e))(X||{});function wd(e){return null}function Od(e){return null}var bi=(e=>(e[e.V29=29]="V29",e[e.V40=40]="V40",e[e.V47=47]="V47",e))(bi||{}),go=(e=>(e[e.V21=21]="V21",e[e.V25=25]="V25",e[e.V36=36]="V36",e))(go||{});function Sd(e){return null}const Sn=E.createContext({}),qt=E.createContext(()=>{});var le=(e=>(e.SET_DOMAIN="setDomain",e.SHIFT_DOMAIN="shiftDomain",e.ZOOM_DOMAIN="zoomDomain",e.SLIDE_DOMAIN="slideDomain",e.SET_DELTA="setDelta",e.ADD_TRACK="addTrack",e.UPDATE_TRACK="updateTrack",e.SET_TRACK_HEIGHT="setTrackHeight",e.SET_TRACK_DATA="setTrackData",e.SET_LOADING="setLoading",e.SWAP_TRACKS="swapTracks",e.RELOAD_TRACKS="reloadTracks",e.SHIFT_TRACK="shiftTrack",e.REMOVE_TRANSLATION="removeTranslation",e.INSERT_TRACK="insertTrack",e.DELETE_TRACK="deleteTrack",e.TRANSLATE_TRACK="translateTrack",e.SET_RANGE="setRange",e.UPDATE_PROPS="updateProps",e.BRING_TO_TOP="bringToTop",e.SET_HOVER="setHover",e.ADD_HIGHLIGHT="addHighlight",e.REMOVE_LAST_HIGHLIGHT="removeLastHighlight",e.REMOVE_HIGHLIGHT="removeHighlight",e))(le||{});function Td(e,t){switch(t.type){case"setDomain":const n=t.domain,r=Math.floor((n.end-n.start)/e.preRenderedWidth);return{...e,domain:t.domain,zoomLevel:r};case"addTrack":return e.tracks.find(y=>y.id===t.track.id)?e:{...e,tracks:[...e.tracks,t.track]};case"updateTrack":const a=e.tracks.find(y=>y.id===t.id);if(a){const y={...a,...t.track};return{...e,tracks:e.tracks.map(C=>C.id===t.id?y:C)}}return e;case"setTrackHeight":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,actualHeight:t.height}:y)};case"setTrackData":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,data:t.data}:y)};case"shiftDomain":const o=Math.floor(t.delta/e.preRenderedWidth*(e.domain.end-e.domain.start));return{...e,domain:{...e.domain,start:e.domain.start-o,end:e.domain.end-o}};case"setLoading":return{...e,tracks:e.tracks.map(y=>({...y,data:void 0,...y.trackType===X.MOTIF?{peaks:void 0}:{}}))};case"shiftTrack":const s=e.tracks.findIndex(y=>y.id===t.id1);if(s===-1)return e;const c=e.tracks.findIndex(y=>y.id===t.id2);if(c<0||c>=e.tracks.length)return e;const u=[...e.tracks],[l]=u.splice(s,1);return u.splice(c,0,l),{...e,tracks:u};case"swapTracks":const d=e.tracks.findIndex(y=>y.id===t.id1);if(d===-1)return e;const f=e.tracks.findIndex(y=>y.id===t.id2);if(f<0||f>=e.tracks.length)return e;const g=[...e.tracks];return[g[d],g[f]]=[g[f],g[d]],{...e,tracks:g};case"translateTrack":const x=e.tracks.find(y=>y.id===t.id);if(!x)return e;const w={...x.props,transform:`translate(0, ${t.dist})`};return{...e,tracks:e.tracks.map(y=>y.id===x.id?{...y,props:w}:y)};case"removeTranslation":return t.id==="ALL"?{...e,tracks:e.tracks.map(y=>{if(!y.props)return y;const{transform:C,...O}=y.props;return{...y,props:O}})}:{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:(()=>{if(!y.props)return y.props;const{transform:C,...O}=y.props;return O})()}:y)};case"insertTrack":return{...e,tracks:[...e.tracks.slice(0,t.index),t.track,...e.tracks.slice(t.index)]};case"deleteTrack":return{...e,tracks:e.tracks.filter(y=>y.id!==t.id)};case"setRange":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:{...y.props,range:t.range}}:y)};case"updateProps":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:{...y.props,...t.props}}:y)};case"bringToTop":const T=e.tracks.find(y=>y.id===t.id);return T?{...e,tracks:[T,...e.tracks.filter(y=>y.id!==t.id)]}:e;case"setDelta":return{...e,delta:t.delta};case"zoomDomain":const S=(e.domain.start+e.domain.end)/2,_=(e.domain.end-e.domain.start)*t.factor;return{...e,domain:{...e.domain,start:Math.floor(S-_/2),end:Math.ceil(S+_/2)},zoomLevel:e.zoomLevel};case"slideDomain":return{...e,domain:{...e.domain,start:e.domain.start+t.delta,end:e.domain.end+t.delta}};case"addHighlight":return e.highlights.some(y=>y.id===t.highlight.id)?e:{...e,highlights:[...e.highlights,t.highlight]};case"removeLastHighlight":return e.highlights.length===0||e.highlights[e.highlights.length-1].domain.chromosome?e:{...e,highlights:e.highlights.slice(0,-1)};case"removeHighlight":return{...e,highlights:e.highlights.filter(y=>y.id!==t.id)};default:return e}}const Mu=E.createContext(!1);function Cd({canDrag:e,id:t,height:n,children:r}){var Ie;const a=E.useRef(null),o=E.useContext(qt),s=E.useContext(Sn),[c,u]=E.useState(0),[l,d]=E.useState({x:0,y:0}),[f,g]=E.useState(!1),[x,w]=E.useState({x:0,y:0}),[T,S]=E.useState([]),[_,y]=E.useState([]),[C,O]=E.useState(-1),[R,P]=E.useState(null),[F,U]=E.useState(1);E.useEffect(()=>{const G=document.getElementById("browserSVG");if(P(G),G){const $=G,Z=$.getBoundingClientRect();U(Z.width/$.viewBox.baseVal.width)}},[]);const V=E.useRef(((Ie=s.tracks)==null?void 0:Ie.find(G=>G.id===t))||null);E.useEffect(()=>{if(!s.tracks||f)return;const G=s.tracks.map(j=>j.actualHeight||j.height),$=s.tracks.findIndex(j=>j.id===t);let Z=new Array(G.length).fill(0);Z=G.map((j,A)=>A<$?-G.slice(A,$).reduce((Y,se)=>Y+se,0):A>$?G.slice($+1,A+1).reduce((Y,se)=>Y+se,0):0),y(new Array(s.tracks.length).fill(!1)),S(Z)},[s.tracks?s.tracks:[]]);const ye=()=>{const G=T.reduce(($,Z,j)=>Math.abs(Z-c)<Math.abs(T[$]-c)?j:$,0);return C!=G&&(C!=-1&&_[C]&&_[G]&&(y($=>{const Z=[...$];return Z[C]=!1,Z}),o({type:le.REMOVE_TRANSLATION,id:s.tracks[C].id})),y($=>{const Z=[...$];return Z[G]=!0,Z}),o({type:le.TRANSLATE_TRACK,id:s.tracks[G].id,dist:c<0?n:-n}),O(G)),G},_e=()=>{if(!s.tracks)return;const G=s.tracks.find(Z=>Z.id===t);if(!G)return;const $=s.tracks.slice(0,s.tracks.indexOf(G)).reduce((Z,j)=>Z+(j.actualHeight||j.height),0);w({x:0,y:$+80}),u(0),g(!0)},ve=()=>{s.tracks&&(d({x:0,y:0}),g(!1),o({type:le.SHIFT_TRACK,id1:t,id2:s.tracks[ye()].id}),o({type:le.REMOVE_TRANSLATION,id:"ALL"}))},we=(G,$)=>{u($.y),d({x:0,y:$.y});const Z=ye(),j=s.tracks.indexOf(V.current);Z==j||s.tracks[Z]},Ne=E.useRef(null);return p.jsx(Mu.Provider,{value:f,children:p.jsx(yi,{scale:F,nodeRef:a,position:l,axis:"y",handle:".swap-handle",onStart:e&&R?_e:()=>!1,onStop:ve,onDrag:we,children:p.jsxs("g",{ref:a,"data-track-id":t,children:[!f&&r,f&&(R?Nr.createPortal(p.jsx(yi,{scale:F,nodeRef:Ne,position:{x:0,y:x.y+l.y},axis:"y",children:p.jsx("g",{ref:Ne,style:{cursor:"grabbing",filter:"drop-shadow(2px 2px 2px gray)"},children:r})}),R):r)]})})})}E.createContext({});E.createContext(()=>{});const vo=E.createContext({delta:0,setDelta:()=>{}}),yo=E.createContext({openModal:null,showModal:()=>{},closeModal:()=>{}});function _d({children:e,browserState:t,browserDispatch:n,modalState:r,deltaContext:i}){return p.jsx(yo.Provider,{value:{...r},children:p.jsx(Sn.Provider,{value:t,children:p.jsx(qt.Provider,{value:n,children:p.jsx(vo.Provider,{value:i,children:e})})})})}function kd(e){return p.jsxs("svg",{x:e.x,y:e.y,width:e.width,height:e.height,viewBox:"0 0 24.000001 24.000001",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[p.jsx("filter",{id:"a",colorInterpolationFilters:"sRGB",height:"1.39486",width:"1.311082",x:"-.155541",y:"-.19743",children:p.jsx("feGaussianBlur",{stdDeviation:"1.2313672"})}),p.jsxs("g",{transform:"matrix(.96344673 0 0 .96344673 -123.36427 -955.289756)",children:[p.jsx("path",{d:"m132.5 995.4062c-.831 0-1.5 1.5-1.5 1.5s.669 1.5 1.5 1.5h7.6875c-.25613.088-.47997.2851-.59375.5313l-3 6c-.2396.5108.0576 1.1992.59375 1.375l1.8125.625v2.4375c.00005.5236.47642 1 1 1h1c.52358 0 .99995-.4764 1-1v-2.4375l1.8125-.625c.53611-.1758.83335-.8642.59375-1.375l-3-6c-.13219-.2754-.39056-.4647-.6875-.5313h7.78125c.831 0 1.5-1.5 1.5-1.5s-.669-1.5-1.5-1.5z",filter:"url(#a)",opacity:".2"}),p.jsx("path",{d:"m140.3125 997.375c-.31022.06-.58621.2757-.71875.5625l-3 6c-.2396.5108.0576 1.1992.59375 1.375l1.8125.625v2.4375c.00005.5236.47642 1 1 1h1c.52358 0 .99995-.4764 1-1v-2.4375l1.8125-.625c.53611-.1758.83335-.8642.59375-1.375l-3-6c-.17625-.3672-.59466-.6026-1-.5625-.0312-.001-.0625-.001-.0937 0z"}),p.jsx("path",{d:"m140.5 998.375-3 6 2.5.8437v3.1563h1v-3.1563l2.5-.8437z",fill:"#fefefe"}),p.jsxs("g",{transform:"rotate(-90)",children:[p.jsx("rect",{height:"18.999969",rx:"1.43934",ry:"1.5",width:"3.049988",x:"-997.41217",y:"131.00003"}),p.jsx("path",{d:"m-996.41217 132.00003h1v16.999969h-1z",fill:"#fefefe"})]})]})]})}function bo(e){return e/6<10?e<10?e:10:e/6}const Us=({fontSize:e,position:t,width:n,children:r})=>p.jsxs(p.Fragment,{children:[p.jsx("text",{textAnchor:"end",alignmentBaseline:"middle",y:t-3,x:n*.94,fontSize:`${e}px`,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:r}),p.jsx("line",{x1:n*.96,x2:n,y1:t,y2:t,stroke:"#aaa"})]}),Dd=e=>{const t=bo(50),[n,r]=E.useState(null);E.useEffect(()=>{const x=document.getElementById("browserSVG");r(x)},[]);const{showModal:i}=E.useContext(yo),[a,o]=E.useState(void 0),s=E.useContext(qt),c=E.useContext(Sn);let u=-1;c.tracks&&(u=c.tracks.findIndex(x=>x.id===e.trackId));const l=x=>{i(e.trackId,x.clientX,x.clientY)},d=x=>{x.preventDefault(),s({type:le.BRING_TO_TOP,id:e.trackId})};E.useEffect(()=>{o(e.range)},[e.range]);const f=E.useContext(Mu),g=x=>{s({type:le.UPDATE_TRACK,id:e.trackId,track:{hoverColor:x?e.color:void 0}})};return p.jsx("svg",{style:{cursor:e.canDrag&&n?f?"grabbing":"grab":"default"},width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,preserveAspectRatio:"xMinYMin meet",children:p.jsxs("g",{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),height:e.height,width:e.width,children:[p.jsx("rect",{x:0,y:0,width:e.width,height:e.height,fill:"white",className:"swap-handle"}),p.jsx("rect",{x:0,y:0,width:e.width/15,height:e.height,stroke:"#000000",strokeWidth:.5,fill:e.color||"rgb(225,225,225)",style:{cursor:"default"}}),p.jsx("text",{fontSize:`${t}px`,y:e.range===void 0?e.height/2:(e.height+t)/2,x:e.width/10,alignmentBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.shortLabel}),p.jsx("line",{stroke:"#ccc",x1:e.width,x2:e.width,y1:0,y2:e.height}),e.trackType!==X.RULER&&n&&p.jsxs("svg",{x:e.width/10,y:e.range===void 0?e.height/2+5:(e.height+t)/2+5,width:35,height:20,cursor:"pointer",children:[p.jsxs("g",{onClick:l,children:[p.jsx("circle",{cx:7.5,cy:7.5,r:7.5,strokeWidth:0,fill:"transparent"}),p.jsx(Ch,{x:0,y:0,height:15,width:15})]}),u>0&&p.jsxs("g",{onClick:d,children:[p.jsx("circle",{cx:22.5,cy:7.5,r:7.5,strokeWidth:0,fill:"transparent"}),p.jsx(kd,{x:15,y:2,height:15,width:15})]})]}),a&&p.jsxs(p.Fragment,{children:[p.jsx(Us,{position:e.rangePositions.min,width:e.width,fontSize:t||e.height/6,children:Number(a.min).toFixed(2)}),p.jsx(Us,{position:e.rangePositions.max,width:e.width,fontSize:t||e.height/6,children:Number(a.max).toFixed(2)})]})]})})};function Md(e){return e&&e.props!==void 0}const Ld=0,Bs=255;function Lu(e){if(e=e.replace(/[^0-9a-f]/gi,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8&&(e=e.substring(0,6)),e.length!==6)throw new Error(e+" is not a valid hex color");return e}function Ri(e,t){e=Lu(e);let n="#";for(let r=0;r<3;++r){const i=parseInt(e.substr(r*2,2),16),a=Math.round(Math.min(Math.max(Ld,i+t*Bs),Bs)).toString(16);n+=("00"+a).substr(a.length)}return n}function zs(e){return parseInt(Lu(e),16)}function Id(e){return e>=16?e.toString(16):`0${e.toString(16)}`}const xo=E.createContext({show:!1,x:0,y:0,id:"",setContextMenu:()=>{},displayMode:void 0}),Rd=e=>{const{x:t,y:n,show:r}=E.useContext(xo);return p.jsx("g",{id:"context-menu",transform:`translate(${t}, ${n})`,style:{visibility:r?"visible":"hidden"},children:p.jsx("foreignObject",{width:e.width,height:e.height,children:e.children})})},pn=(e,t)=>{if(e.createSVGPoint&&e){let r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}const n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]},jd=(e,t)=>{const n=e.cloneNode(!0),r=t.cloneNode(!0);return'<?xml version="1.0" standalone="no"?>'+'<svg xmlns="http://www.w3.org/2000/svg">'+r.outerHTML.replace(/\n/g,"").replace(/[ ]{8}/g,"")+'<g transform="translate (0,50)">'+n.outerHTML.replace(/\n/g,"").replace(/[ ]{8}/g,"")+"</g></svg>"},Pd=(e,t,n)=>{const r=new Blob([jd(e,t)],{type:"image/svg;charset=utf-8"}),i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)};function Nd(e){return p.jsx("rect",{width:e.width,height:e.height,fill:e.hoverColor||"transparent",fillOpacity:e.hoverColor?.15:0,style:{pointerEvents:"none"}})}const Ad=(e,t)=>e||(!t||!t.substring||!t.length?"":t.length<=20?t:t.substring(0,20)+"..."),tt=e=>{var _;const t=E.useContext(qt),n=E.useContext(xo);E.useEffect(()=>{const y=C=>{const O=document.getElementById("context-menu");O&&!O.contains(C.target)&&n.setContextMenu({show:!1,x:0,y:0,id:""})};return document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}},[n]);const r=()=>{var O,R,P,F;const y=(R=(O=e.svgRef)==null?void 0:O.current)==null?void 0:R.getElementById("wrapped-track-"+e.id),C=(F=(P=e.svgRef)==null?void 0:P.current)==null?void 0:F.getElementById("wrapped-track-ruler");Pd(y,C,e.id+".svg")},[i,a]=E.useState(e.height||0),o=E.useCallback(y=>{a(y),e.onHeightChanged&&e.onHeightChanged(y)},[e]);E.useEffect(()=>{t({type:le.SET_TRACK_HEIGHT,id:e.id,height:i}),e.onHeightChanged&&e.height!==void 0&&e.onHeightChanged(e.height)},[e.height,i]);const s=e.trackMargin||(e.height||e.rowHeight||i)/6,c=e.titleSize||s*2.5,u=e.title?c+5:0,l=s+u,d=Ad(e.shortLabel||"",e.title||""),f=i-l,g=e.width<1e3?e.width/8:150,x=e.width-g,w=i/3,S=(_=e.displayMode)==null?void 0:_.toLowerCase();return p.jsx(Cd,{canDrag:e.canDrag||!1,id:e.id,height:i,children:p.jsxs("g",{id:"wrapped-track-"+e.id,children:[p.jsx("rect",{width:e.width,height:i,fill:"white",style:{pointerEvents:"none"}}),p.jsx("line",{stroke:"#ccc",x1:e.width,x2:e.width,y1:0,y2:i,strokeWidth:2}),e.loading&&!e.error&&p.jsx("g",{transform:`translate(${g+(x-w)/2},${(i-w)/2})`,children:p.jsx(Oh,{width:w,height:w})}),e.error&&p.jsxs("g",{transform:`translate(${g+(x-w)/2},${(i-w)/2})`,children:[p.jsx(mu,{width:w,height:w}),p.jsx("g",{transform:`translate(${w/2},${w+10})`,children:p.jsx("text",{textAnchor:"middle",fontSize:`${e.titleSize}px`,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.error})})]}),!e.loading&&!e.error&&e.title&&p.jsx("g",{id:`title-${e.id}`,children:p.jsx("text",{style:{cursor:"default"},fill:e.titleColor||"#000000",textAnchor:"middle",x:g+x/2,y:c/2+5,fontSize:`${c}px`,transform:`translate(0,${s})`,alignmentBaseline:"baseline",children:e.title})}),!e.loading&&!e.error&&p.jsx("g",{onContextMenu:y=>{if(e.trackType==X.RULER||!e.svgRef)return;y.preventDefault();const C=pn(e.svgRef.current,y);n.setContextMenu({show:!0,x:C[0]>e.width-80?C[0]-80:C[0],y:C[1],id:e.id,displayMode:S,downloadSVG:r,displayModeOptions:Fd(e.trackType)})},transform:`translate(${g},${i-f})`,children:E.Children.map(e.children,y=>Md(y)?E.cloneElement(y,{...y.props,height:f,width:e.width-g,hoverColor:e.hoverColor,onHeightChanged:C=>{o(C+l)}}):y)}),e.height!=0&&p.jsx(Dd,{canDrag:e.canDrag||!1,trackType:e.trackType||X.UNDEFINED,trackId:e.id,color:e.color,hoverColor:e.hoverColor,shortLabel:d,width:g,height:i,rangePositions:{min:i,max:l},range:e.range}),p.jsx(Nd,{width:e.width,height:i,hoverColor:e.hoverColor})]})})};function Fd(e){switch(e){case X.BIGBED:case X.BAM:return["dense","squish","hide","download"];case X.BIGWIG:return["full","dense","hide","download"];case X.TRANSCRIPT:return["pack","squish","hide","download"];case X.LDTRACK:return["dense","hide","download"];case X.MOTIF:return["dense","squish","hide","download"];default:return["hide","download"]}}let ni;const Vd=new Uint8Array(16);function qd(){if(!ni&&(ni=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ni))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ni(Vd)}const ft=[];for(let e=0;e<256;++e)ft.push((e+256).toString(16).slice(1));function $d(e,t=0){return ft[e[t+0]]+ft[e[t+1]]+ft[e[t+2]]+ft[e[t+3]]+"-"+ft[e[t+4]]+ft[e[t+5]]+"-"+ft[e[t+6]]+ft[e[t+7]]+"-"+ft[e[t+8]]+ft[e[t+9]]+"-"+ft[e[t+10]]+ft[e[t+11]]+ft[e[t+12]]+ft[e[t+13]]+ft[e[t+14]]+ft[e[t+15]]}let Ws,ha,da=0,pa=0;function $t(e,t,n){let r=t&&n||0;const i=t||new Array(16);e=e||{};let a=e.node||Ws,o=e.clockseq!==void 0?e.clockseq:ha;if(a==null||o==null){const f=e.random||(e.rng||qd)();a==null&&(a=Ws=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),o==null&&(o=ha=(f[6]<<8|f[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:pa+1;const u=s-da+(c-pa)/1e4;if(u<0&&e.clockseq===void 0&&(o=o+1&16383),(u<0||s>da)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");da=s,pa=c,ha=o,s+=122192928e5;const l=((s&268435455)*1e4+c)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=l&255;const d=s/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=d&255,i[r++]=d>>>24&15|16,i[r++]=d>>>16&255,i[r++]=o>>>8|128,i[r++]=o&255;for(let f=0;f<6;++f)i[r+f]=a[f];return t||$d(i)}function An(e,t){return` M ${e} ${t}`}function Te(e,t){return` L ${e} ${t}`}function Ct(e,t){return n=>(n-e.start)*t/(e.end-e.start)}function Iu(e,t){return n=>e.max===e.min?0:(e.max-n)*t/(e.max-e.min)}function Ud(e,t){const n=e.end-e.start,r=t.end-t.start;return i=>(i-e.start)*r/n+t.start}function Ru(e,t,n){return Ct(e||t.reduce((r,i)=>({start:i.start<r.start?i.start:r.start,end:i.end>r.end?i.end:r.end}),{start:1/0,end:-1/0}),n)}function Ar(e,t,n,r=10){return n=n||0,e.reduce((i,a)=>{let o=!1;for(let s=0;s<i.length;++s)if(t(i[s][i[s].length-1].coordinates.end)+r+n*i[s][i[s].length-1].name.length<=t(a.coordinates.start)){i[s].push(a),o=!0;break}return o||i.push([a]),i},[])}function Bd(e){return e==null?"":""+(e<1e5?e===Math.floor(e)?e:e.toFixed(2):e.toExponential(2))}const Ht=({width:e,height:t,id:n})=>p.jsx("clipPath",{id:n,children:p.jsx("rect",{x:0,y:0,width:e,height:t})}),Jt=E.createContext({show:!1,x:0,y:0,width:0,height:0,content:void 0,setTooltip:()=>{}});var ju=(e=>(e.ValuedPoint="valuedPoint",e.BigZoomData="bigZoomData",e.BigWigData="bigWigData",e))(ju||{});function Bn(e){return e[0].x!==void 0?"valuedPoint":e[0].minVal!==void 0?"bigZoomData":"bigWigData"}function ma(e){return Bn(e)==="bigWigData"?e.map(t=>({...t})):Bn(e)==="bigZoomData"?e.map(t=>({...t})):Bn(e)==="valuedPoint"?e.map(t=>({...t})):[]}const Qs=(e,t)=>{switch(Bn(e)){case"bigWigData":return e.forEach(n=>{n.value<t.min&&(n.value=t.min),n.value>t.max&&(n.value=t.max)}),e;case"bigZoomData":return e.forEach(n=>{n.minVal<t.min&&(n.minVal=t.min),n.maxVal>t.max&&(n.maxVal=t.max)}),e;case"valuedPoint":return e.forEach(n=>{n.min<t.min&&(n.min=t.min),n.max>t.max&&(n.max=t.max)}),e;default:return[]}},ga=(e,t)=>({min:e.reduce((n,r)=>t(r)<n?t(r):n,1/0),max:e.reduce((n,r)=>t(r)>n?t(r):n,-1/0)}),ui=e=>{switch(Bn(e)){case"bigWigData":return ga(e,t=>t.value);case"bigZoomData":return ga(e,t=>t.maxVal);case"valuedPoint":return ga(e,t=>t.max);default:return{min:0,max:0}}};function Hs(e){return e.value!==void 0}const zd=e=>{const t={start:e[0].x,end:e[e.length-1].x},n=Ru(t,e.map(i=>({start:i.x,end:i.x+1})),100),r=[];for(let i=0;i<=100;++i)r.push({x:i,max:-1/0,min:1/0});return e.reduce((i,a)=>{const o=Math.floor(n(a.x)),s=Math.floor(n(a.x));a.min<i.renderPoints[o].min&&(i.renderPoints[o].min=a.min),a.max>i.renderPoints[o].max&&(i.renderPoints[o].max=a.max);for(let c=o+1;c<=s;++c)i.renderPoints[c].min=a.min,i.renderPoints[c].max=a.max;return a.min<i.range.min&&(i.range.min=a.min),a.max>i.range.max&&(i.range.max=a.max),i},{renderPoints:r,range:{max:-1/0,min:1/0}})};function Pu(e,t){if(!e)return{renderPoints:[],range:{max:1,min:0}};const n=e.reduce((s,c)=>({start:c.start<s.start?c.start:s.start,end:c.end>s.end?c.end:s.end}),{start:1/0,end:-1/0}),r=Ru(n,e,t),i=[],a={start:Math.floor(r(e[0].start)),end:Math.floor(r(e[e.length-1].end))};for(let s=a.start;s<a.end;++s)i.push({x:s,max:-1/0,min:1/0});const o={renderPoints:i,range:{max:-1/0,min:1/0}};return e.forEach(s=>{const c=Math.floor(r(s.start)),u=Math.floor(r(s.end)),l=Hs(s)?s.value:s.minVal,d=Hs(s)?s.value:s.maxVal;l<o.renderPoints[c].min&&(o.renderPoints[c].min=l),d>o.renderPoints[c].max&&(o.renderPoints[c].max=d);for(let f=c+1;f<u;++f)o.renderPoints[f].min=l,o.renderPoints[f].max=d;l<o.range.min&&(o.range.min=l),d>o.range.max&&(o.range.max=d)}),o}function Mt({canDrag:e,children:t}){const n=E.useRef(null),r=E.useContext(qt),[i,a]=E.useState(!1),{delta:o,setDelta:s}=E.useContext(vo),[c,u]=E.useState({x:0,y:0}),[l,d]=E.useState(null),[f,g]=E.useState(1);E.useEffect(()=>{const T=document.getElementById("browserSVG");if(d(T),T){const S=T,_=S.getBoundingClientRect();g(_.width/S.viewBox.baseVal.width)}},[]);const x=(T,S)=>{T.preventDefault(),a(!0);const _=S.deltaX;s(o+_)},w=()=>{Math.abs(o)<10||(u({x:o,y:0}),r({type:le.SHIFT_DOMAIN,delta:o}),a(!1))};return E.useEffect(()=>{i||u({x:o,y:0})},[o]),p.jsx(yi,{nodeRef:n,scale:f,position:c,axis:"x",onStart:e&&l?()=>{}:()=>!1,onDrag:(T,S)=>x(T,S),onStop:w,children:p.jsx("g",{ref:n,height:"100%",style:{cursor:e&&l?i?"grabbing":"grab":"default"},children:t})})}function Ln(e,t){return` L ${e} ${t}`}const Wd=e=>{const t=E.useContext(Sn),n=E.useContext(qt),[r,i]=E.useState(ma(e.data)),[a,o]=E.useState();E.useEffect(()=>{const C=ui(r);C.min=C.min>0?0:C.min,n({type:le.UPDATE_PROPS,id:e.id,props:{defaultRange:C}}),o(C)},[]),E.useEffect(()=>{const C=ma(e.data),O=ui(C),R={min:O.min>0?0:O.min,max:O.max};i(Qs(C,R)),n({type:le.UPDATE_PROPS,id:e.id,props:{range:R}}),n({type:le.UPDATE_PROPS,id:e.id,props:{defaultRange:R}})},[e.data,a,e.domain]),E.useEffect(()=>{if(!e.range)return;const C=ma(e.data);i(Qs(C,e.range))},[e.range]);const s=E.useContext(Jt),[c,u]=E.useState(),[l,d]=E.useState(null),f=E.useCallback(C=>{var U;if(t.delta!=0||!((U=e.svgRef)!=null&&U.current))return;const O=pn(e.svgRef.current,C);d([O[0],O[1]]);const R=Math.round(O[0]-150),P=w.renderPoints.find(V=>V.min<1/0&&V.max>-1/0&&V.x===R);if(!P)return;const F=O[0]>e.width-60?O[0]-60+5:O[0]+5;s.setTooltip({show:!0,x:F,y:O[1]-e.height/2,height:80,width:60,content:p.jsx("div",{style:{fontSize:"10px",backgroundColor:"#ffffff",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",padding:"5px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"5px"},children:p.jsxs("div",{style:{whiteSpace:"nowrap",minWidth:"50px"},children:["value: ",Number(Bd(P.max))]})})})},[e.svgRef,e.width,e.height,t.delta]);E.useEffect(()=>{u(l?l[0]:void 0)},[l]);const g=()=>{s.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0}),u(void 0)};E.useEffect(()=>{if(t.delta!=0){g();return}},[t.delta]);const x=E.useRef($t()),w=E.useMemo(()=>r&&r.length&&Bn(r)===ju.ValuedPoint?{renderPoints:r,range:e.range||ui(r)}:Pu(r,e.width),[r,e.width,e.domain]),T=E.useMemo(()=>{const C=Iu(w.range,e.height),O=w.renderPoints.filter(P=>P.min<1/0&&P.max>-1/0),R=P=>Math.max(0,Math.min(e.height,C(P)));return{maxPath:O.reduce((P,F,U,V)=>P+(F.x?Ln(F.x,R(V[U-1]?V[U-1].max:0)):"")+Ln(F.x,R(F.max)),"M 0 "+R(0)+" ")+Ln(e.width,R(0)),minPath:O.reduce((P,F,U,V)=>P+(F.x?Ln(F.x,R(V[U-1]?V[U-1].min:0)):"")+Ln(F.x,R(F.min)),"M 0 "+R(0)+" ")+Ln(e.width,R(0))}},[w,e.height,e.width]),S=e.color||"#000000",_=E.useMemo(()=>e.noTransparency?S:Ri(S,.5),[e]),y=e.id||x.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{className:e.className,width:e.width,height:e.height,clipPath:`url(#${y})`,children:[p.jsx("rect",{width:e.width,height:e.height,fill:"white",onMouseOut:g}),p.jsx("defs",{children:p.jsx(Ht,{id:y,width:e.width,height:e.height})}),p.jsx("path",{d:T.maxPath,fill:_,style:{cursor:"default",clipPath:`url(#${y})`}}),p.jsx("path",{d:T.minPath,fill:S,style:{cursor:"default",clipPath:`url(#${y})`}}),c!==void 0&&p.jsx("line",{stroke:"#ccc",x1:c-150,x2:c-150,y1:0,y2:e.height}),p.jsx("rect",{width:e.width,height:e.height,fill:"transparent",onMouseMove:C=>{f(C)},onMouseOut:()=>{g()}})]})})},Qd=e=>{const t=E.useRef($t()),n=E.useMemo(()=>e.data&&e.data.length&&e.data[0].x!==void 0?zd(e.data):Pu(e.data,100),[e.data,e.width,e.domain]);n.range||(n.range=ui(n.renderPoints));const r=E.useMemo(()=>{const i=Iu(n.range,1),a=n.renderPoints.filter(s=>s.min<1/0&&s.max>-1/0),o=e.color||"#000000";return a.map(s=>Ri(o,i(s.max)))},[e.color,n]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{className:e.className,width:e.width,height:e.height,children:[p.jsx("defs",{children:p.jsx("linearGradient",{id:t.current,children:r.map((i,a)=>p.jsx("stop",{offset:`${a}%`,stopColor:i},`${t.current}_pt_${a}`))})}),p.jsx("rect",{width:e.width,height:e.height,fill:"white"}),p.jsx("rect",{width:e.width,height:e.height,fill:e.hoverColor||"transparent",fillOpacity:e.hoverColor?.2:0}),p.jsx("rect",{width:e.width,x:0,y:e.height/3,height:e.height/3,fill:`url('#${t.current}')`})]})})},Xn=e=>{E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const t=12,n=32,r=e.height,i=e.width;return p.jsxs("g",{className:e.className,width:e.width,height:e.height,transform:e.transform,children:[e.height!=0&&p.jsx("rect",{width:e.width,height:e.height,fill:"none",onClick:e.onClick}),e.error&&p.jsxs("g",{transform:`translate(${t+(i-n)/2},${(r-n)/2})`,children:[p.jsx(mu,{width:n,height:n}),p.jsx("g",{transform:`translate(${n/2},${n+10})`,children:p.jsx("text",{textAnchor:"middle",fontSize:"12px",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.text})})]}),!e.error&&e.text&&e.height!=0&&p.jsx("text",{textAnchor:"middle",x:Math.round(+e.width/2),y:Math.round(+e.height/2),style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.text})]})},Nu={trackType:X.BIGWIG,titleSize:12,trackMargin:12,displayMode:Fe.FULL,canDrag:!0,noTransparency:!0,color:"#ff5555"};function Au(e){const t=e.data&&e.data[0]?{loading:!1}:{loading:!0},n={...e,trackType:X.BIGWIG,displayMode:e.displayMode};switch(e.displayMode){case Fe.FULL:return p.jsx(tt,{...n,...t,trackType:X.BIGWIG,displayMode:e.displayMode,children:p.jsx(Wd,{...e})});case Fe.DENSE:return p.jsx(tt,{...n,...t,trackType:X.BIGWIG,displayMode:e.displayMode,children:p.jsx(Qd,{...e})});case Fe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),p.jsx(tt,{...n,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function Hd(e,t){const n=[];return e.forEach((r,i)=>(i===0||r.start>e[i-1].end||r.color!=e[i-1].color?n.push({start:t(r.start)<0?0:t(r.start),end:t(r.end)<0?0:t(r.end),color:r.color,name:r.name,score:r.score}):n[n.length-1].end=t(r.end),n)),n}function Gd(e,t){return Ar(e.sort((n,r)=>n.start-r.start).map(n=>({coordinates:{start:n.start,end:n.end},color:n.color,name:"",score:n.score,rectname:n.name})),t,0).map(n=>n.map(r=>({start:t(r.coordinates.start)<0?0:t(r.coordinates.start),end:t(r.coordinates.end),color:r.color,rectname:r.rectname,name:r.rectname,score:r.score})))}const Yd={fontSize:"12px",backgroundColor:"#ffffff",border:"1px solid",padding:"1em"},Fu=e=>p.jsxs("div",{style:Yd,children:[e.name?`name: ${e.name}`:"",p.jsx("br",{}),e.score!==void 0?`score: ${e.score}`:""]});function Vu(e,t,n,r,i){const a=E.useContext(Jt),o=E.useCallback((c,u)=>{if(!n||!n.current)return;const[l,d]=pn(n.current,c);a.setTooltip({show:!0,x:l>t-100?l-90:l+10,y:d+10,width:100,height:50,content:E.createElement(e,u)})},[e,t,n,a]),s=E.useCallback(()=>{a.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},[a]);return[o,s]}const Kd=e=>{const[t,n]=Vu(e.tooltipContent||Fu,e.width,e.svgRef),r=E.useRef($t()),i=E.useCallback(Ct(e.domain,e.width),[e.data]),a=e.color||"#000000",o=e.id||r.current.toString(),s=E.useMemo(()=>Hd(e.data||[],i),[e.width,e.data,e.domain]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{width:e.width,height:e.height,clipPath:`url(#${o})`,className:e.className,children:[p.jsx("rect",{width:e.width,height:e.height,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:o,width:e.width,height:e.height})}),s.map((c,u)=>p.jsx("rect",{style:{cursor:e.onClick?"pointer":"default"},height:e.height*.6,width:c.end-c.start,x:c.start,y:e.height*.2,fill:c.color||a,onClick:()=>e.onClick&&e.onClick(c),onMouseOut:()=>{e.onMouseOut&&e.onMouseOut(),n()},onMouseOver:l=>{l.persist(),e.onMouseOver&&e.onMouseOver(c),t(l,c)}},`${o}_${u}`))]})})},Xd=e=>{const[t,n]=Vu(e.tooltipContent||Fu,e.width,e.svgRef),r=E.useRef($t()),i=E.useCallback(Ct(e.domain,e.width),[e.data]),a=E.useMemo(()=>{const c=e.data?[...e.data]:[];return Gd(c,i)},[e.width,e.data,e.domain]),o=e.rowHeight*a.length,s=e.id||r.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(o)},[a,e.rowHeight,e.onHeightChanged]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{width:e.width,height:o,clipPath:`url(#${s})`,children:[p.jsx("rect",{width:e.width,height:o,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:s,width:e.width,height:o})}),a.map((c,u)=>p.jsx("g",{transform:`translate(0, ${u*e.rowHeight})`,children:c.map((l,d)=>p.jsx("rect",{style:{cursor:e.onClick?"pointer":"default"},height:e.rowHeight*.6,width:l.end-l.start<1?1:l.end-l.start,x:l.start,y:e.rowHeight*.2,fill:l.color,onClick:()=>e.onClick&&e.onClick(l),onMouseOut:()=>{e.onMouseOut&&e.onMouseOut(),n()},onMouseOver:f=>{f.persist(),e.onMouseOver&&e.onMouseOver(l),t(f,l)}},`${s}_${d}`))},`group_${u}`))]})})},qu={trackType:X.BIGBED,displayMode:Fe.SQUISH,rowHeight:10,titleSize:12,trackMargin:12,canDrag:!0};function $u(e){const t=e.data&&e.data[0]?{loading:!1}:{loading:!0},n={...e,trackType:X.BIGBED,displayMode:e.displayMode};switch(e.displayMode){case Fe.DENSE:return p.jsx(tt,{...n,...t,trackType:X.BIGBED,displayMode:e.displayMode,children:p.jsx(Kd,{...e})});case Fe.SQUISH:return p.jsx(tt,{...n,...t,trackType:X.BIGBED,displayMode:e.displayMode,children:p.jsx(Xd,{...e})});case Fe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigBed`),p.jsx(tt,{...n,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function Jd(e,t){return e.coordinates.start===t.coordinates.start?e.coordinates.end-t.coordinates.end:e.coordinates.start-t.coordinates.start}function Zd(e,t){return e.reduce((n,r)=>(r.transcripts.filter(i=>i.coordinates.start<t.end&&i.coordinates.end>t.start).forEach(i=>n.push({...i,strand:r.strand})),n),[]).sort((n,r)=>n.coordinates.start-r.coordinates.start)}function e0(e){if(e.length===0)return[];const t=[{coordinates:{...e[0].coordinates}}];return e.slice(1).forEach(n=>{n.coordinates.start<t[t.length-1].coordinates.end?t[t.length-1].coordinates.end=Math.max(t[t.length-1].coordinates.end,n.coordinates.end):t.push({coordinates:{...n.coordinates}})}),t}function t0(e,t){var s;const r=e.transcripts.reduce((c,u)=>[...c,...u.exons||[]],[]).sort(Jd),i=r.length===0?[]:[{coordinates:{...r[0].coordinates},UTRs:r[0].UTRs&&[...r[0].UTRs]}],a=new Set(e.transcripts.map(c=>c.color));r.slice(1).forEach(c=>{c.coordinates.start<i[i.length-1].coordinates.end?(i[i.length-1].UTRs=[...i[i.length-1].UTRs||[],...c.UTRs||[]],i[i.length-1].coordinates.end=Math.max(c.coordinates.end,i[i.length-1].coordinates.end)):i.push({coordinates:{...c.coordinates},UTRs:c.UTRs&&[...c.UTRs]})}),i.forEach(c=>{c.UTRs=e0(c.UTRs||[])});let o=a.size===1?a.values().next().value:void 0;return t&&(o=(s=e.name)!=null&&s.includes(t)?"#ff5555":o),{name:e.name||"",strand:e.strand,id:e.id||"",coordinates:{start:Math.min(...r.map(c=>c.coordinates.start)),end:Math.max(...r.map(c=>c.coordinates.end))},exons:i,color:o}}function n0(e,t,n){var r;return{strand:e.strand,name:e.name,id:e.id,color:e.color,coordinates:{end:t(e.coordinates.end),start:t(e.coordinates.start)},exons:((r=e.exons)==null?void 0:r.filter(i=>i.coordinates.end>n.start&&i.coordinates.start<n.end).map(i=>{var a;return{coordinates:{start:t(i.coordinates.start),end:t(i.coordinates.end)},UTRs:((a=i.UTRs)==null?void 0:a.map(o=>({coordinates:{start:t(o.coordinates.start),end:t(o.coordinates.end)}})))||[]}}))||[]}}function r0(e,t,n,r,i,a){let o="";if(e=e<0?0:e,t=t>a?a:t,n==="+")for(let s=e+10;s<t-10;s+=20)o+=An(s-i,r-i)+Te(s,r)+Te(s-i,r+i)+Te(s,r)+Te(s-i,r-i);else if(n==="-")for(let s=e+10;s<t-10;s+=20)o+=An(s+i,r-i)+Te(s,r)+Te(s+i,r+i)+Te(s,r)+Te(s+i,r-i);return o+" M "+e+" "+r+" L "+t+" "+r}function i0(e,t,n,r){var d,f;if(e.coordinates.start>r||e.coordinates.end<0)return"";const i=((d=e.UTRs)==null?void 0:d.filter(g=>g.coordinates.start===e.coordinates.start))||[],a=((f=e.UTRs)==null?void 0:f.filter(g=>g.coordinates.end===e.coordinates.end))||[],o=t-n*.2,s=t+n*.2,c=t-n*.3,u=t+n*.3;if(!i[0]&&!a[0])return An(e.coordinates.start,c)+Te(e.coordinates.end,c)+Te(e.coordinates.end,u)+Te(e.coordinates.start,u)+Te(e.coordinates.start,c);if(i[0]&&i[0].coordinates.end===e.coordinates.end)return An(i[0].coordinates.start,o)+Te(i[0].coordinates.end,o)+Te(i[0].coordinates.end,s)+Te(i[0].coordinates.start,s)+Te(i[0].coordinates.start,o);let l=i[0]?An(i[0].coordinates.start,o)+Te(i[0].coordinates.end,o)+Te(i[0].coordinates.end,c):An(e.coordinates.start,c);return l+=a[0]?Te(a[0].coordinates.start,c)+Te(a[0].coordinates.start,o)+Te(a[0].coordinates.end,o)+Te(a[0].coordinates.end,s)+Te(a[0].coordinates.start,s)+Te(a[0].coordinates.start,u):Te(e.coordinates.end,c)+Te(e.coordinates.end,u),l+(i[0]?Te(i[0].coordinates.end,u)+Te(i[0].coordinates.end,s)+Te(i[0].coordinates.start,s)+Te(i[0].coordinates.start,o):Te(e.coordinates.start,u)+Te(e.coordinates.start,c))}function Uu(e,t,n,r,i){var s;const a=n0(e,t,n),o={exons:((s=a.exons)==null?void 0:s.reduce((c,u)=>c+i0(u,r/2,r,i),""))||"",introns:r0(a.coordinates.start,a.coordinates.end,a.strand,r/2,r*.19,i)};return{transcript:a,paths:o}}const a0=e=>{const t=E.useContext(Jt),n=(l,d)=>{if(e.svgRef){const f=pn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-150?f[0]-150+5:f[0]+5,y:f[1],width:150,height:50,content:p.jsx("span",{style:{fontSize:"10px"},children:d.id})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.color||"#000000",s=bo(e.rowHeight)*1.25,c=E.useMemo(()=>Ar(Zd(e.data||[],e.domain),a,s).map((l,d)=>({y:d*e.rowHeight,transcripts:l.map(f=>Uu(f,a,e.domain,e.rowHeight,e.width))})),[e.data,e.rowHeight,e.width,e.domain]),u=E.useMemo(()=>Math.max(e.rowHeight*c.length,35),[e.rowHeight,c.length]);return console.log(u),E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(u)},[u]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{children:[p.jsx("rect",{width:e.width,height:u,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:i.current,width:e.width,height:c.length*e.rowHeight})}),c.map((l,d)=>p.jsx("g",{style:{clipPath:`url(#${i.current})`},transform:`translate(0,${l.y})`,height:e.rowHeight,width:e.width,children:l.transcripts.map((f,g)=>p.jsxs(E.Fragment,{children:[p.jsx("path",{stroke:f.transcript.color||o,fill:f.transcript.color||o,strokeWidth:e.rowHeight/16,d:f.paths.introns+f.paths.exons,style:{cursor:e.onTranscriptClick?"pointer":"default"},onMouseOver:x=>n(x,f.transcript),onMouseOut:r,onClick:()=>e.onTranscriptClick&&e.onTranscriptClick(f.transcript)}),p.jsx("text",{fill:f.transcript.color||o,fontSize:s,x:f.transcript.coordinates.end+5,y:e.rowHeight/2,dominantBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:f.transcript.name})]},`transcript_${g}`))},`row_${d}`))]})})},o0=e=>{const t=E.useContext(Jt),n=(l,d)=>{if(e.svgRef){const f=pn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-150?f[0]-150+5:f[0]+5,y:f[1],width:150,height:50,content:p.jsx("span",{style:{fontSize:"10px"},children:d.id})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.color||"#000000",s=bo(e.rowHeight)*1.25,c=E.useMemo(()=>{var l;return Ar(((l=e.data)==null?void 0:l.map(d=>t0(d,e.geneName)))||[],a,s).map((d,f)=>({y:f*e.rowHeight,transcripts:d.map(g=>Uu(g,a,e.domain,e.rowHeight,e.width))}))},[e.data,e.rowHeight,e.width,e.domain]),u=E.useMemo(()=>Math.max(e.rowHeight*c.length,35),[e.rowHeight,c.length]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(u)},[u]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{children:[p.jsx("rect",{width:e.width,height:u,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:i.current,width:e.width,height:c.length*e.rowHeight})}),c.map((l,d)=>p.jsx("g",{style:{clipPath:`url(#${i.current})`},transform:`translate(0,${l.y})`,height:e.rowHeight,width:e.width,children:l.transcripts.map((f,g)=>p.jsxs(E.Fragment,{children:[p.jsx("path",{stroke:f.transcript.color||o,fill:f.transcript.color||o,strokeWidth:e.rowHeight/16,d:f.paths.introns+f.paths.exons,style:{cursor:e.onTranscriptClick?"pointer":"default"},onMouseOver:x=>n(x,f.transcript),onMouseOut:r,onClick:()=>e.onTranscriptClick&&e.onTranscriptClick(f.transcript)}),p.jsx("text",{fill:f.transcript.color||o,fontSize:s,x:f.transcript.coordinates.end+5,y:e.rowHeight/2,dominantBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:f.transcript.name})]},`transcript_${g}`))},`row_${d}`))]})})},Bu={trackType:X.TRANSCRIPT,displayMode:Fe.SQUISH,rowHeight:14,titleSize:12,trackMargin:12,canDrag:!0};function zu(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data),a={...e,trackType:X.TRANSCRIPT,displayMode:e.displayMode};switch(E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]),E.useEffect(()=>{e.refetch&&e.refetch({variables:{assembly:e.assembly,chromosome:e.domain.chromosome,start:e.domain.start,end:e.domain.end,version:e.version}}).then(({data:o,loading:s,error:c})=>{i(o.gene),n(s)})},[e.version]),e.displayMode){case Fe.PACK:return p.jsx(tt,{...a,loading:t,trackType:X.TRANSCRIPT,displayMode:e.displayMode,children:p.jsx(a0,{...e,data:r})});case Fe.SQUISH:return p.jsx(tt,{...a,loading:t,trackType:X.TRANSCRIPT,displayMode:e.displayMode,children:p.jsx(o0,{...e,data:r})});case Fe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),p.jsx(tt,{...a,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function s0(e,t){const n=[];return e.sort((r,i)=>r.start-i.start).forEach((r,i)=>(i===0||r.start>e[i-1].end||r.color!=e[i-1].color?n.push({start:t(r.start)<0?0:t(r.start),end:t(r.end),color:r.color,cigarOps:r.cigarOps,strand:r.strand,seq:r.seq}):n[n.length-1].end=t(r.end),n)),n}function c0(e,t,n){return Ar(e.sort((r,i)=>r.start-i.start).map(r=>({coordinates:{start:r.start,end:r.end},color:r.color,name:"",cigarOps:r.cigarOps,strand:r.strand,seq:r.seq})),t,0).map(r=>r.map(i=>{var a;return{start:t(i.coordinates.start)<0?0:t(i.coordinates.start),end:t(i.coordinates.end),color:i.color,cigarOps:i.cigarOps.map(o=>({opStart:t(o.opStart)<0?0:t(o.opStart),opEnd:t(o.opEnd),op:o.op})),strand:i.strand,seq:t(i.coordinates.start)<0?(a=i.seq)==null?void 0:a.slice(n.start-i.coordinates.start,i.seq.length):i.seq}}))}const u0=e=>{const t=E.useRef($t()),n=Ct(e.domain,e.width),r=e.color||"#000000",i=E.useMemo(()=>c0(e.data,n,e.domain),[e.data,e.domain,e.width]),a=e.rowHeight*i.length,o=e.id||t.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(a)},[i,e.rowHeight,e.onHeightChanged]),p.jsxs("g",{width:e.width,height:a,transform:e.transform,clipPath:`url(#${o})`,children:[p.jsx("defs",{children:p.jsx(Ht,{id:o,width:e.width,height:a})}),i.map((s,c)=>p.jsx("g",{transform:`translate(0, ${c*e.rowHeight})`,children:s.map((u,l)=>{const d=u.cigarOps.map((f,g)=>{let x;return f.op==="S"?x=p.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,style:{fill:"none",strokeDasharray:"2,2",stroke:"black",strokeWidth:.5}},`${l}_${g}`):f.op==="I"?x=p.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,fill:"#ff69b4",children:p.jsx("title",{children:"Insertion"})},`${l}_${g}`):f.op==="D"||f.op==="N"?x=p.jsx("line",{y2:e.rowHeight*.2+e.rowHeight*.6/2,x2:f.opEnd,x1:f.opStart,y1:e.rowHeight*.2+e.rowHeight*.6/2,stroke:"red"},`${l}_${g}`):x=p.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,fill:u.strand!==void 0?u.strand?"#F7F71A":"#53F71A":u.color||r},`${l}_${g}`),x});return p.jsxs("g",{children:[d,e.domain.end-e.domain.start<=200&&u.seq&&p.jsx("text",{fontSize:8,x:u.start,y:e.rowHeight*.2+e.rowHeight*.5,fill:"black",textLength:u.end-u.start,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:u.seq})]},e.id+"_"+l)})},`group_${c}`))]})},l0=e=>{const t=E.useRef($t()),n=Ct(e.domain,e.width),r=e.color||"#000000",i=e.id||t.current.toString(),a=E.useMemo(()=>s0(e.data,n),[e.domain,e.width,e.data]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),p.jsxs("g",{width:e.width,height:e.height,transform:e.transform,clipPath:`url(#${i})`,children:[p.jsx("defs",{children:p.jsx(Ht,{id:i,width:e.width,height:e.height})}),a.map((o,s)=>p.jsx("rect",{height:e.height*.6,width:o.end-o.start,x:o.start,y:e.height*.2,fill:o.strand!==void 0?o.strand?"#F7F71A":"#53F71A":o.color||r},`${i}_${s}`))]})},f0={displayMode:Fe.DENSE,rowHeight:10};function h0(e){const t=e.data&&e.data[0]?{loading:!1}:{loading:!0},n={...e,trackType:X.BIGBED,displayMode:e.displayMode};switch(e.displayMode){case Fe.DENSE:return p.jsx(tt,{...n,...t,trackType:X.BAM,displayMode:e.displayMode,children:p.jsx(l0,{...e})});case Fe.SQUISH:return p.jsx(tt,{...n,...t,trackType:X.BAM,displayMode:e.displayMode,children:p.jsx(u0,{...e})});case Fe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigBed`),p.jsx(tt,{...n,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function d0(e,t){return n=>t.start+(t.end-t.start)*((n-e.start)/(e.end-e.start))}function p0(e,t){const n=e.map(t),r=Math.min(...n),i=Math.max(...n);return{start:r>0?0:r,end:i<0?0:i}}function m0(e){return t=>{const n=e((t<0,t)),r=e((t<0,0)),i=Math.abs(r-n)/100;return[n*(t<0?-1:1),i,t<0?"scale(1,-1)":""]}}function g0(e,t){const n=E.useMemo(()=>E0(e)?e.importance.map((o,s)=>({base:e.sequence.charAt(s),importance:o})):e,[e]),r=E.useMemo(()=>p0(n,o=>o.importance),[n]),i=d0(r,{start:t,end:0}),a=E.useCallback(m0(i),[r,t]);return[n,a,i]}function v0(e,t,n){return E.useMemo(()=>e.map(r=>{const i=t.slice(r.coordinates[0],r.coordinates[1]+1).map(s=>s.importance),a=[Math.min(...i),Math.max(...i)],o=n(a[1]);return{...r,y:o,height:n(a[0])-o}}),[e,n])}var Wu={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(_h,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(1&o&&(a=i(a)),8&o||4&o&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),2&o&&typeof a!="string")for(var c in a)i.d(s,c,(function(u){return a[u]}).bind(null,c));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="/",i(i.s=5)}([function(n,r,i){n.exports=i(3)},function(n,r,i){n.exports=i(4)},function(n,r,i){/*
51
+ `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&Cu(e.body,"react-draggable-transparent-selection")}function od(e){if(e)try{if(e.body&&_u(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function Cu(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function _u(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.canDragX=ud;Qt.canDragY=ld;Qt.createCoreData=hd;Qt.createDraggableData=dd;Qt.getBoundPosition=sd;Qt.getControlPosition=fd;Qt.snapToGrid=cd;var Ot=zt,Nn=ze;function sd(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:md(r);const i=mo(e);if(typeof r=="string"){const{ownerDocument:a}=i,o=a.defaultView;let s;if(r==="parent"?s=i.parentNode:s=a.querySelector(r),!(s instanceof o.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const c=s,u=o.getComputedStyle(i),l=o.getComputedStyle(c);r={left:-i.offsetLeft+(0,Ot.int)(l.paddingLeft)+(0,Ot.int)(u.marginLeft),top:-i.offsetTop+(0,Ot.int)(l.paddingTop)+(0,Ot.int)(u.marginTop),right:(0,Nn.innerWidth)(c)-(0,Nn.outerWidth)(i)-i.offsetLeft+(0,Ot.int)(l.paddingRight)-(0,Ot.int)(u.marginRight),bottom:(0,Nn.innerHeight)(c)-(0,Nn.outerHeight)(i)-i.offsetTop+(0,Ot.int)(l.paddingBottom)-(0,Ot.int)(u.marginBottom)}}return(0,Ot.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,Ot.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,Ot.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,Ot.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function cd(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function ud(e){return e.props.axis==="both"||e.props.axis==="x"}function ld(e){return e.props.axis==="both"||e.props.axis==="y"}function fd(e,t,n){const r=typeof t=="number"?(0,Nn.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const i=mo(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,Nn.offsetXYFromParent)(r||e,a,n.props.scale)}function hd(e,t,n){const r=!(0,Ot.isNum)(e.lastX),i=mo(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function dd(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function md(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function mo(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Mi={},Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.default=pd;function pd(){}Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;var la=vd(E),Et=po(xu),gd=po(Nr),mt=ze,tn=Qt,fa=zt,mr=po(Li);function po(e){return e&&e.__esModule?e:{default:e}}function ku(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ku=function(r){return r?n:t})(e)}function vd(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=ku(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function gt(e,t,n){return t=yd(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yd(e){var t=bd(e,"string");return typeof t=="symbol"?t:String(t)}function bd(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const At={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nn=At.mouse,Ii=class extends la.Component{constructor(){super(...arguments),gt(this,"dragging",!1),gt(this,"lastX",NaN),gt(this,"lastY",NaN),gt(this,"touchIdentifier",null),gt(this,"mounted",!1),gt(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const n=this.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=n;if(this.props.disabled||!(t.target instanceof r.defaultView.Node)||this.props.handle&&!(0,mt.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,mt.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const i=(0,mt.getTouchIdentifier)(t);this.touchIdentifier=i;const a=(0,tn.getControlPosition)(t,i,this);if(a==null)return;const{x:o,y:s}=a,c=(0,tn.createCoreData)(this,o,s);(0,mr.default)("DraggableCore: handleDragStart: %j",c),(0,mr.default)("calling",this.props.onStart),!(this.props.onStart(t,c)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,mt.addUserSelectStyles)(r),this.dragging=!0,this.lastX=o,this.lastY=s,(0,mt.addEvent)(r,nn.move,this.handleDrag),(0,mt.addEvent)(r,nn.stop,this.handleDragStop))}),gt(this,"handleDrag",t=>{const n=(0,tn.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:i}=n;if(Array.isArray(this.props.grid)){let s=r-this.lastX,c=i-this.lastY;if([s,c]=(0,tn.snapToGrid)(this.props.grid,s,c),!s&&!c)return;r=this.lastX+s,i=this.lastY+c}const a=(0,tn.createCoreData)(this,r,i);if((0,mr.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(c)}return}this.lastX=r,this.lastY=i}),gt(this,"handleDragStop",t=>{if(!this.dragging)return;const n=(0,tn.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:i}=n;if(Array.isArray(this.props.grid)){let c=r-this.lastX||0,u=i-this.lastY||0;[c,u]=(0,tn.snapToGrid)(this.props.grid,c,u),r=this.lastX+c,i=this.lastY+u}const a=(0,tn.createCoreData)(this,r,i);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,mt.removeUserSelectStyles)(s.ownerDocument),(0,mr.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,mr.default)("DraggableCore: Removing handlers"),(0,mt.removeEvent)(s.ownerDocument,nn.move,this.handleDrag),(0,mt.removeEvent)(s.ownerDocument,nn.stop,this.handleDragStop))}),gt(this,"onMouseDown",t=>(nn=At.mouse,this.handleDragStart(t))),gt(this,"onMouseUp",t=>(nn=At.mouse,this.handleDragStop(t))),gt(this,"onTouchStart",t=>(nn=At.touch,this.handleDragStart(t))),gt(this,"onTouchEnd",t=>(nn=At.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,mt.addEvent)(t,At.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,mt.removeEvent)(n,At.mouse.move,this.handleDrag),(0,mt.removeEvent)(n,At.touch.move,this.handleDrag),(0,mt.removeEvent)(n,At.mouse.stop,this.handleDragStop),(0,mt.removeEvent)(n,At.touch.stop,this.handleDragStop),(0,mt.removeEvent)(t,At.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,mt.removeUserSelectStyles)(n)}}findDOMNode(){var t,n;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(n=this.props)===null||n===void 0||(n=n.nodeRef)===null||n===void 0?void 0:n.current:gd.default.findDOMNode(this)}render(){return la.cloneElement(la.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Mi.default=Ii;gt(Ii,"displayName","DraggableCore");gt(Ii,"propTypes",{allowAnyClick:Et.default.bool,children:Et.default.node.isRequired,disabled:Et.default.bool,enableUserSelectHack:Et.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Et.default.arrayOf(Et.default.number),handle:Et.default.string,cancel:Et.default.string,nodeRef:Et.default.object,onStart:Et.default.func,onDrag:Et.default.func,onStop:Et.default.func,onMouseDown:Et.default.func,scale:Et.default.number,className:fa.dontSetMe,style:fa.dontSetMe,transform:fa.dontSetMe});gt(Ii,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=f(E),n=l(xu),r=l(Nr),i=l(Fh),a=ze,o=Qt,s=zt,c=l(Mi),u=l(Li);function l(_){return _&&_.__esModule?_:{default:_}}function h(_){if(typeof WeakMap!="function")return null;var y=new WeakMap,C=new WeakMap;return(h=function(S){return S?C:y})(_)}function f(_,y){if(_&&_.__esModule)return _;if(_===null||typeof _!="object"&&typeof _!="function")return{default:_};var C=h(y);if(C&&C.has(_))return C.get(_);var S={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in _)if(P!=="default"&&Object.prototype.hasOwnProperty.call(_,P)){var F=R?Object.getOwnPropertyDescriptor(_,P):null;F&&(F.get||F.set)?Object.defineProperty(S,P,F):S[P]=_[P]}return S.default=_,C&&C.set(_,S),S}function g(){return g=Object.assign?Object.assign.bind():function(_){for(var y=1;y<arguments.length;y++){var C=arguments[y];for(var S in C)Object.prototype.hasOwnProperty.call(C,S)&&(_[S]=C[S])}return _},g.apply(this,arguments)}function x(_,y,C){return y=w(y),y in _?Object.defineProperty(_,y,{value:C,enumerable:!0,configurable:!0,writable:!0}):_[y]=C,_}function w(_){var y=T(_,"string");return typeof y=="symbol"?y:String(y)}function T(_,y){if(typeof _!="object"||_===null)return _;var C=_[Symbol.toPrimitive];if(C!==void 0){var S=C.call(_,y||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(_)}class O extends t.Component{static getDerivedStateFromProps(y,C){let{position:S}=y,{prevPropsPosition:R}=C;return S&&(!R||S.x!==R.x||S.y!==R.y)?((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:S,prevPropsPosition:R}),{x:S.x,y:S.y,prevPropsPosition:{...S}}):null}constructor(y){super(y),x(this,"onDragStart",(C,S)=>{if((0,u.default)("Draggable: onDragStart: %j",S),this.props.onStart(C,(0,o.createDraggableData)(this,S))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),x(this,"onDrag",(C,S)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",S);const R=(0,o.createDraggableData)(this,S),P={x:R.x,y:R.y,slackX:0,slackY:0};if(this.props.bounds){const{x:U,y:V}=P;P.x+=this.state.slackX,P.y+=this.state.slackY;const[ye,_e]=(0,o.getBoundPosition)(this,P.x,P.y);P.x=ye,P.y=_e,P.slackX=this.state.slackX+(U-P.x),P.slackY=this.state.slackY+(V-P.y),R.x=P.x,R.y=P.y,R.deltaX=P.x-this.state.x,R.deltaY=P.y-this.state.y}if(this.props.onDrag(C,R)===!1)return!1;this.setState(P)}),x(this,"onDragStop",(C,S)=>{if(!this.state.dragging||this.props.onStop(C,(0,o.createDraggableData)(this,S))===!1)return!1;(0,u.default)("Draggable: onDragStop: %j",S);const P={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:U,y:V}=this.props.position;P.x=U,P.y=V}this.setState(P)}),this.state={dragging:!1,dragged:!1,x:y.position?y.position.x:y.defaultPosition.x,y:y.position?y.position.y:y.defaultPosition.y,prevPropsPosition:{...y.position},slackX:0,slackY:0,isElementSVG:!1},y.position&&!(y.onDrag||y.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var y,C;return(y=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&y!==void 0?y:r.default.findDOMNode(this)}render(){const{axis:y,bounds:C,children:S,defaultPosition:R,defaultClassName:P,defaultClassNameDragging:F,defaultClassNameDragged:U,position:V,positionOffset:ye,scale:_e,...ve}=this.props;let we={},Ae=null;const G=!!!V||this.state.dragging,$=V||R,Z={x:(0,o.canDragX)(this)&&G?this.state.x:$.x,y:(0,o.canDragY)(this)&&G?this.state.y:$.y};this.state.isElementSVG?Ae=(0,a.createSVGTransform)(Z,ye):we=(0,a.createCSSTransform)(Z,ye);const j=(0,i.default)(S.props.className||"",P,{[F]:this.state.dragging,[U]:this.state.dragged});return t.createElement(c.default,g({},ve,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(S),{className:j,style:{...S.props.style,...we},transform:Ae}))}}e.default=O,x(O,"displayName","Draggable"),x(O,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),x(O,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(vu);const{default:Du,DraggableCore:xd}=vu;Di.exports=Du;Di.exports.default=Du;Di.exports.DraggableCore=xd;var Ed=Di.exports;const yi=gu(Ed);var Pe=(e=>(e.FULL="full",e.DENSE="dense",e.SQUISH="squish",e.PACK="pack",e.HIDE="hide",e.DOWNLOAD="download",e))(Pe||{}),J=(e=>(e.UNDEFINED="undefined",e.RULER="ruler",e.BIGWIG="bigwig",e.BIGBED="bigbed",e.IMPORTANCE="importance",e.TRANSCRIPT="transcript",e.BAM="bam",e.MOTIF="motif",e.LDTRACK="ldtrack",e))(J||{});function wd(e){return null}function Sd(e){return null}var bi=(e=>(e[e.V29=29]="V29",e[e.V40=40]="V40",e[e.V47=47]="V47",e))(bi||{}),go=(e=>(e[e.V21=21]="V21",e[e.V25=25]="V25",e[e.V36=36]="V36",e))(go||{});function Od(e){return null}const On=E.createContext({}),qt=E.createContext(()=>{});var le=(e=>(e.SET_DOMAIN="setDomain",e.SHIFT_DOMAIN="shiftDomain",e.ZOOM_DOMAIN="zoomDomain",e.SLIDE_DOMAIN="slideDomain",e.SET_DELTA="setDelta",e.ADD_TRACK="addTrack",e.UPDATE_TRACK="updateTrack",e.SET_TRACK_HEIGHT="setTrackHeight",e.SET_TRACK_DATA="setTrackData",e.SET_LOADING="setLoading",e.SWAP_TRACKS="swapTracks",e.RELOAD_TRACKS="reloadTracks",e.SHIFT_TRACK="shiftTrack",e.REMOVE_TRANSLATION="removeTranslation",e.INSERT_TRACK="insertTrack",e.DELETE_TRACK="deleteTrack",e.TRANSLATE_TRACK="translateTrack",e.SET_RANGE="setRange",e.UPDATE_PROPS="updateProps",e.BRING_TO_TOP="bringToTop",e.SET_HOVER="setHover",e.ADD_HIGHLIGHT="addHighlight",e.REMOVE_LAST_HIGHLIGHT="removeLastHighlight",e.REMOVE_HIGHLIGHT="removeHighlight",e))(le||{});function Td(e,t){switch(t.type){case"setDomain":const n=t.domain,r=Math.floor((n.end-n.start)/e.preRenderedWidth);return{...e,domain:t.domain,zoomLevel:r};case"addTrack":return e.tracks.find(y=>y.id===t.track.id)?e:{...e,tracks:[...e.tracks,t.track]};case"updateTrack":const a=e.tracks.find(y=>y.id===t.id);if(a){const y={...a,...t.track};return{...e,tracks:e.tracks.map(C=>C.id===t.id?y:C)}}return e;case"setTrackHeight":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,actualHeight:t.height}:y)};case"setTrackData":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,data:t.data}:y)};case"shiftDomain":const o=Math.floor(t.delta/e.preRenderedWidth*(e.domain.end-e.domain.start));return{...e,domain:{...e.domain,start:e.domain.start-o,end:e.domain.end-o}};case"setLoading":return{...e,tracks:e.tracks.map(y=>({...y,data:void 0,...y.trackType===J.MOTIF?{peaks:void 0}:{}}))};case"shiftTrack":const s=e.tracks.findIndex(y=>y.id===t.id1);if(s===-1)return e;const c=e.tracks.findIndex(y=>y.id===t.id2);if(c<0||c>=e.tracks.length)return e;const u=[...e.tracks],[l]=u.splice(s,1);return u.splice(c,0,l),{...e,tracks:u};case"swapTracks":const h=e.tracks.findIndex(y=>y.id===t.id1);if(h===-1)return e;const f=e.tracks.findIndex(y=>y.id===t.id2);if(f<0||f>=e.tracks.length)return e;const g=[...e.tracks];return[g[h],g[f]]=[g[f],g[h]],{...e,tracks:g};case"translateTrack":const x=e.tracks.find(y=>y.id===t.id);if(!x)return e;const w={...x.props,transform:`translate(0, ${t.dist})`};return{...e,tracks:e.tracks.map(y=>y.id===x.id?{...y,props:w}:y)};case"removeTranslation":return t.id==="ALL"?{...e,tracks:e.tracks.map(y=>{if(!y.props)return y;const{transform:C,...S}=y.props;return{...y,props:S}})}:{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:(()=>{if(!y.props)return y.props;const{transform:C,...S}=y.props;return S})()}:y)};case"insertTrack":return{...e,tracks:[...e.tracks.slice(0,t.index),t.track,...e.tracks.slice(t.index)]};case"deleteTrack":return{...e,tracks:e.tracks.filter(y=>y.id!==t.id)};case"setRange":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:{...y.props,range:t.range}}:y)};case"updateProps":return{...e,tracks:e.tracks.map(y=>y.id===t.id?{...y,props:{...y.props,...t.props}}:y)};case"bringToTop":const T=e.tracks.find(y=>y.id===t.id);return T?{...e,tracks:[T,...e.tracks.filter(y=>y.id!==t.id)]}:e;case"setDelta":return{...e,delta:t.delta};case"zoomDomain":const O=(e.domain.start+e.domain.end)/2,_=(e.domain.end-e.domain.start)*t.factor;return{...e,domain:{...e.domain,start:Math.floor(O-_/2),end:Math.ceil(O+_/2)},zoomLevel:e.zoomLevel};case"slideDomain":return{...e,domain:{...e.domain,start:e.domain.start+t.delta,end:e.domain.end+t.delta}};case"addHighlight":return e.highlights.some(y=>y.id===t.highlight.id)?e:{...e,highlights:[...e.highlights,t.highlight]};case"removeLastHighlight":return e.highlights.length===0||e.highlights[e.highlights.length-1].domain.chromosome?e:{...e,highlights:e.highlights.slice(0,-1)};case"removeHighlight":return{...e,highlights:e.highlights.filter(y=>y.id!==t.id)};default:return e}}const Mu=E.createContext(!1);function Cd({canDrag:e,id:t,height:n,children:r}){var Ie;const a=E.useRef(null),o=E.useContext(qt),s=E.useContext(On),[c,u]=E.useState(0),[l,h]=E.useState({x:0,y:0}),[f,g]=E.useState(!1),[x,w]=E.useState({x:0,y:0}),[T,O]=E.useState([]),[_,y]=E.useState([]),[C,S]=E.useState(-1),[R,P]=E.useState(null),[F,U]=E.useState(1);E.useEffect(()=>{const G=document.getElementById("browserSVG");if(P(G),G){const $=G,Z=$.getBoundingClientRect();U(Z.width/$.viewBox.baseVal.width)}},[]);const V=E.useRef(((Ie=s.tracks)==null?void 0:Ie.find(G=>G.id===t))||null);E.useEffect(()=>{if(!s.tracks||f)return;const G=s.tracks.map(j=>j.actualHeight||j.height),$=s.tracks.findIndex(j=>j.id===t);let Z=new Array(G.length).fill(0);Z=G.map((j,A)=>A<$?-G.slice(A,$).reduce((Y,se)=>Y+se,0):A>$?G.slice($+1,A+1).reduce((Y,se)=>Y+se,0):0),y(new Array(s.tracks.length).fill(!1)),O(Z)},[s.tracks?s.tracks:[]]);const ye=()=>{const G=T.reduce(($,Z,j)=>Math.abs(Z-c)<Math.abs(T[$]-c)?j:$,0);return C!=G&&(C!=-1&&_[C]&&_[G]&&(y($=>{const Z=[...$];return Z[C]=!1,Z}),o({type:le.REMOVE_TRANSLATION,id:s.tracks[C].id})),y($=>{const Z=[...$];return Z[G]=!0,Z}),o({type:le.TRANSLATE_TRACK,id:s.tracks[G].id,dist:c<0?n:-n}),S(G)),G},_e=()=>{if(!s.tracks)return;const G=s.tracks.find(Z=>Z.id===t);if(!G)return;const $=s.tracks.slice(0,s.tracks.indexOf(G)).reduce((Z,j)=>Z+(j.actualHeight||j.height),0);w({x:0,y:$+80}),u(0),g(!0)},ve=()=>{s.tracks&&(h({x:0,y:0}),g(!1),o({type:le.SHIFT_TRACK,id1:t,id2:s.tracks[ye()].id}),o({type:le.REMOVE_TRANSLATION,id:"ALL"}))},we=(G,$)=>{u($.y),h({x:0,y:$.y});const Z=ye(),j=s.tracks.indexOf(V.current);Z==j||s.tracks[Z]},Ae=E.useRef(null);return m.jsx(Mu.Provider,{value:f,children:m.jsx(yi,{scale:F,nodeRef:a,position:l,axis:"y",handle:".swap-handle",onStart:e&&R?_e:()=>!1,onStop:ve,onDrag:we,children:m.jsxs("g",{ref:a,"data-track-id":t,children:[!f&&r,f&&(R?Nr.createPortal(m.jsx(yi,{scale:F,nodeRef:Ae,position:{x:0,y:x.y+l.y},axis:"y",children:m.jsx("g",{ref:Ae,style:{cursor:"grabbing",filter:"drop-shadow(2px 2px 2px gray)"},children:r})}),R):r)]})})})}E.createContext({});E.createContext(()=>{});const vo=E.createContext({delta:0,setDelta:()=>{}}),yo=E.createContext({openModal:null,showModal:()=>{},closeModal:()=>{}});function _d({children:e,browserState:t,browserDispatch:n,modalState:r,deltaContext:i}){return m.jsx(yo.Provider,{value:{...r},children:m.jsx(On.Provider,{value:t,children:m.jsx(qt.Provider,{value:n,children:m.jsx(vo.Provider,{value:i,children:e})})})})}function kd(e){return m.jsxs("svg",{x:e.x,y:e.y,width:e.width,height:e.height,viewBox:"0 0 24.000001 24.000001",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[m.jsx("filter",{id:"a",colorInterpolationFilters:"sRGB",height:"1.39486",width:"1.311082",x:"-.155541",y:"-.19743",children:m.jsx("feGaussianBlur",{stdDeviation:"1.2313672"})}),m.jsxs("g",{transform:"matrix(.96344673 0 0 .96344673 -123.36427 -955.289756)",children:[m.jsx("path",{d:"m132.5 995.4062c-.831 0-1.5 1.5-1.5 1.5s.669 1.5 1.5 1.5h7.6875c-.25613.088-.47997.2851-.59375.5313l-3 6c-.2396.5108.0576 1.1992.59375 1.375l1.8125.625v2.4375c.00005.5236.47642 1 1 1h1c.52358 0 .99995-.4764 1-1v-2.4375l1.8125-.625c.53611-.1758.83335-.8642.59375-1.375l-3-6c-.13219-.2754-.39056-.4647-.6875-.5313h7.78125c.831 0 1.5-1.5 1.5-1.5s-.669-1.5-1.5-1.5z",filter:"url(#a)",opacity:".2"}),m.jsx("path",{d:"m140.3125 997.375c-.31022.06-.58621.2757-.71875.5625l-3 6c-.2396.5108.0576 1.1992.59375 1.375l1.8125.625v2.4375c.00005.5236.47642 1 1 1h1c.52358 0 .99995-.4764 1-1v-2.4375l1.8125-.625c.53611-.1758.83335-.8642.59375-1.375l-3-6c-.17625-.3672-.59466-.6026-1-.5625-.0312-.001-.0625-.001-.0937 0z"}),m.jsx("path",{d:"m140.5 998.375-3 6 2.5.8437v3.1563h1v-3.1563l2.5-.8437z",fill:"#fefefe"}),m.jsxs("g",{transform:"rotate(-90)",children:[m.jsx("rect",{height:"18.999969",rx:"1.43934",ry:"1.5",width:"3.049988",x:"-997.41217",y:"131.00003"}),m.jsx("path",{d:"m-996.41217 132.00003h1v16.999969h-1z",fill:"#fefefe"})]})]})]})}function bo(e){return e/6<10?e<10?e:10:e/6}const Us=({fontSize:e,position:t,width:n,children:r})=>m.jsxs(m.Fragment,{children:[m.jsx("text",{textAnchor:"end",alignmentBaseline:"middle",y:t-3,x:n*.94,fontSize:`${e}px`,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:r}),m.jsx("line",{x1:n*.96,x2:n,y1:t,y2:t,stroke:"#aaa"})]}),Dd=e=>{const t=bo(50),[n,r]=E.useState(null);E.useEffect(()=>{const x=document.getElementById("browserSVG");r(x)},[]);const{showModal:i}=E.useContext(yo),[a,o]=E.useState(void 0),s=E.useContext(qt),c=E.useContext(On);let u=-1;c.tracks&&(u=c.tracks.findIndex(x=>x.id===e.trackId));const l=x=>{i(e.trackId,x.clientX,x.clientY)},h=x=>{x.preventDefault(),s({type:le.BRING_TO_TOP,id:e.trackId})};E.useEffect(()=>{o(e.range)},[e.range]);const f=E.useContext(Mu),g=x=>{s({type:le.UPDATE_TRACK,id:e.trackId,track:{hoverColor:x?e.color:void 0}})};return m.jsx("svg",{style:{cursor:e.canDrag&&n?f?"grabbing":"grab":"default"},width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,preserveAspectRatio:"xMinYMin meet",children:m.jsxs("g",{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),height:e.height,width:e.width,children:[m.jsx("rect",{x:0,y:0,width:e.width,height:e.height,fill:"white",className:"swap-handle"}),m.jsx("rect",{x:0,y:0,width:e.width/15,height:e.height,stroke:"#000000",strokeWidth:.5,fill:e.color||"rgb(225,225,225)",style:{cursor:"default"}}),m.jsx("text",{fontSize:`${t}px`,y:e.range===void 0?e.height/2:(e.height+t)/2,x:e.width/10,alignmentBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.shortLabel}),m.jsx("line",{stroke:"#ccc",x1:e.width,x2:e.width,y1:0,y2:e.height}),e.trackType!==J.RULER&&n&&m.jsxs("svg",{x:e.width/10,y:e.range===void 0?e.height/2+5:(e.height+t)/2+5,width:35,height:20,cursor:"pointer",children:[m.jsxs("g",{onClick:l,children:[m.jsx("circle",{cx:7.5,cy:7.5,r:7.5,strokeWidth:0,fill:"transparent"}),m.jsx(Ch,{x:0,y:0,height:15,width:15})]}),u>0&&m.jsxs("g",{onClick:h,children:[m.jsx("circle",{cx:22.5,cy:7.5,r:7.5,strokeWidth:0,fill:"transparent"}),m.jsx(kd,{x:15,y:2,height:15,width:15})]})]}),a&&m.jsxs(m.Fragment,{children:[m.jsx(Us,{position:e.rangePositions.min,width:e.width,fontSize:t||e.height/6,children:Number(a.min).toFixed(2)}),m.jsx(Us,{position:e.rangePositions.max,width:e.width,fontSize:t||e.height/6,children:Number(a.max).toFixed(2)})]})]})})};function Md(e){return e&&e.props!==void 0}const Ld=0,Bs=255;function Lu(e){if(e=e.replace(/[^0-9a-f]/gi,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8&&(e=e.substring(0,6)),e.length!==6)throw new Error(e+" is not a valid hex color");return e}function Ri(e,t){e=Lu(e);let n="#";for(let r=0;r<3;++r){const i=parseInt(e.substr(r*2,2),16),a=Math.round(Math.min(Math.max(Ld,i+t*Bs),Bs)).toString(16);n+=("00"+a).substr(a.length)}return n}function Hs(e){return parseInt(Lu(e),16)}function Id(e){return e>=16?e.toString(16):`0${e.toString(16)}`}const xo=E.createContext({show:!1,x:0,y:0,id:"",setContextMenu:()=>{},displayMode:void 0}),Rd=e=>{const{x:t,y:n,show:r}=E.useContext(xo);return m.jsx("g",{id:"context-menu",transform:`translate(${t}, ${n})`,style:{visibility:r?"visible":"hidden"},children:m.jsx("foreignObject",{width:e.width,height:e.height,children:e.children})})},mn=(e,t)=>{if(e.createSVGPoint&&e){let r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}const n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]},jd=(e,t)=>{const n=e.cloneNode(!0),r=t.cloneNode(!0);return'<?xml version="1.0" standalone="no"?>'+'<svg xmlns="http://www.w3.org/2000/svg">'+r.outerHTML.replace(/\n/g,"").replace(/[ ]{8}/g,"")+'<g transform="translate (0,50)">'+n.outerHTML.replace(/\n/g,"").replace(/[ ]{8}/g,"")+"</g></svg>"},Pd=(e,t,n)=>{const r=new Blob([jd(e,t)],{type:"image/svg;charset=utf-8"}),i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a)};function Nd(e){return m.jsx("rect",{width:e.width,height:e.height,fill:e.hoverColor||"transparent",fillOpacity:e.hoverColor?.15:0,style:{pointerEvents:"none"}})}const Ad=(e,t)=>e||(!t||!t.substring||!t.length?"":t.length<=20?t:t.substring(0,20)+"..."),tt=e=>{var _;const t=E.useContext(qt),n=E.useContext(xo);E.useEffect(()=>{const y=C=>{const S=document.getElementById("context-menu");S&&!S.contains(C.target)&&n.setContextMenu({show:!1,x:0,y:0,id:""})};return document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}},[n]);const r=()=>{var S,R,P,F;const y=(R=(S=e.svgRef)==null?void 0:S.current)==null?void 0:R.getElementById("wrapped-track-"+e.id),C=(F=(P=e.svgRef)==null?void 0:P.current)==null?void 0:F.getElementById("wrapped-track-ruler");Pd(y,C,e.id+".svg")},[i,a]=E.useState(e.height||0),o=E.useCallback(y=>{a(y),e.onHeightChanged&&e.onHeightChanged(y)},[e]);E.useEffect(()=>{t({type:le.SET_TRACK_HEIGHT,id:e.id,height:i}),e.onHeightChanged&&e.height!==void 0&&e.onHeightChanged(e.height)},[e.height,i]);const s=e.trackMargin||(e.height||e.rowHeight||i)/6,c=e.titleSize||s*2.5,u=e.title?c+5:0,l=s+u,h=Ad(e.shortLabel||"",e.title||""),f=i-l,g=e.width<1e3?e.width/8:150,x=e.width-g,w=i/3,O=(_=e.displayMode)==null?void 0:_.toLowerCase();return m.jsx(Cd,{canDrag:e.canDrag||!1,id:e.id,height:i,children:m.jsxs("g",{id:"wrapped-track-"+e.id,children:[m.jsx("rect",{width:e.width,height:i,fill:"white",style:{pointerEvents:"none"}}),m.jsx("line",{stroke:"#ccc",x1:e.width,x2:e.width,y1:0,y2:i,strokeWidth:2}),e.loading&&!e.error&&m.jsx("g",{transform:`translate(${g+(x-w)/2},${(i-w)/2})`,children:m.jsx(Sh,{width:w,height:w})}),e.error&&m.jsxs("g",{transform:`translate(${g+(x-w)/2},${(i-w)/2})`,children:[m.jsx(pu,{width:w,height:w}),m.jsx("g",{transform:`translate(${w/2},${w+10})`,children:m.jsx("text",{textAnchor:"middle",fontSize:`${e.titleSize}px`,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.error})})]}),!e.loading&&!e.error&&e.title&&m.jsx("g",{id:`title-${e.id}`,children:m.jsx("text",{style:{cursor:"default"},fill:e.titleColor||"#000000",textAnchor:"middle",x:g+x/2,y:c/2+5,fontSize:`${c}px`,transform:`translate(0,${s})`,alignmentBaseline:"baseline",children:e.title})}),!e.loading&&!e.error&&m.jsx("g",{onContextMenu:y=>{if(e.trackType==J.RULER||!e.svgRef)return;y.preventDefault();const C=mn(e.svgRef.current,y);n.setContextMenu({show:!0,x:C[0]>e.width-80?C[0]-80:C[0],y:C[1],id:e.id,displayMode:O,downloadSVG:r,displayModeOptions:Fd(e.trackType)})},transform:`translate(${g},${i-f})`,children:E.Children.map(e.children,y=>Md(y)?E.cloneElement(y,{...y.props,height:f,width:e.width-g,hoverColor:e.hoverColor,onHeightChanged:C=>{o(C+l)}}):y)}),e.height!=0&&m.jsx(Dd,{canDrag:e.canDrag||!1,trackType:e.trackType||J.UNDEFINED,trackId:e.id,color:e.color,hoverColor:e.hoverColor,shortLabel:h,width:g,height:i,rangePositions:{min:i,max:l},range:e.range}),m.jsx(Nd,{width:e.width,height:i,hoverColor:e.hoverColor})]})})};function Fd(e){switch(e){case J.BIGBED:case J.BAM:return["dense","squish","hide","download"];case J.BIGWIG:return["full","dense","hide","download"];case J.TRANSCRIPT:return["pack","squish","hide","download"];case J.LDTRACK:return["full","hide","download"];case J.MOTIF:return["dense","squish","hide","download"];default:return["hide","download"]}}let ni;const Vd=new Uint8Array(16);function qd(){if(!ni&&(ni=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ni))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ni(Vd)}const ft=[];for(let e=0;e<256;++e)ft.push((e+256).toString(16).slice(1));function $d(e,t=0){return ft[e[t+0]]+ft[e[t+1]]+ft[e[t+2]]+ft[e[t+3]]+"-"+ft[e[t+4]]+ft[e[t+5]]+"-"+ft[e[t+6]]+ft[e[t+7]]+"-"+ft[e[t+8]]+ft[e[t+9]]+"-"+ft[e[t+10]]+ft[e[t+11]]+ft[e[t+12]]+ft[e[t+13]]+ft[e[t+14]]+ft[e[t+15]]}let zs,ha,da=0,ma=0;function $t(e,t,n){let r=t&&n||0;const i=t||new Array(16);e=e||{};let a=e.node||zs,o=e.clockseq!==void 0?e.clockseq:ha;if(a==null||o==null){const f=e.random||(e.rng||qd)();a==null&&(a=zs=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),o==null&&(o=ha=(f[6]<<8|f[7])&16383)}let s=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:ma+1;const u=s-da+(c-ma)/1e4;if(u<0&&e.clockseq===void 0&&(o=o+1&16383),(u<0||s>da)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");da=s,ma=c,ha=o,s+=122192928e5;const l=((s&268435455)*1e4+c)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=l&255;const h=s/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=h&255,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=o>>>8|128,i[r++]=o&255;for(let f=0;f<6;++f)i[r+f]=a[f];return t||$d(i)}function An(e,t){return` M ${e} ${t}`}function Te(e,t){return` L ${e} ${t}`}function Ct(e,t){return n=>(n-e.start)*t/(e.end-e.start)}function Iu(e,t){return n=>e.max===e.min?0:(e.max-n)*t/(e.max-e.min)}function Ud(e,t){const n=e.end-e.start,r=t.end-t.start;return i=>(i-e.start)*r/n+t.start}function Ru(e,t,n){return Ct(e||t.reduce((r,i)=>({start:i.start<r.start?i.start:r.start,end:i.end>r.end?i.end:r.end}),{start:1/0,end:-1/0}),n)}function Ar(e,t,n,r=10){return n=n||0,e.reduce((i,a)=>{let o=!1;for(let s=0;s<i.length;++s)if(t(i[s][i[s].length-1].coordinates.end)+r+n*i[s][i[s].length-1].name.length<=t(a.coordinates.start)){i[s].push(a),o=!0;break}return o||i.push([a]),i},[])}function Bd(e){return e==null?"":""+(e<1e5?e===Math.floor(e)?e:e.toFixed(2):e.toExponential(2))}const Wt=({width:e,height:t,id:n})=>m.jsx("clipPath",{id:n,children:m.jsx("rect",{x:0,y:0,width:e,height:t})}),Jt=E.createContext({show:!1,x:0,y:0,width:0,height:0,content:void 0,setTooltip:()=>{}});var ju=(e=>(e.ValuedPoint="valuedPoint",e.BigZoomData="bigZoomData",e.BigWigData="bigWigData",e))(ju||{});function Bn(e){return e[0].x!==void 0?"valuedPoint":e[0].minVal!==void 0?"bigZoomData":"bigWigData"}function pa(e){return Bn(e)==="bigWigData"?e.map(t=>({...t})):Bn(e)==="bigZoomData"?e.map(t=>({...t})):Bn(e)==="valuedPoint"?e.map(t=>({...t})):[]}const Qs=(e,t)=>{switch(Bn(e)){case"bigWigData":return e.forEach(n=>{n.value<t.min&&(n.value=t.min),n.value>t.max&&(n.value=t.max)}),e;case"bigZoomData":return e.forEach(n=>{n.minVal<t.min&&(n.minVal=t.min),n.maxVal>t.max&&(n.maxVal=t.max)}),e;case"valuedPoint":return e.forEach(n=>{n.min<t.min&&(n.min=t.min),n.max>t.max&&(n.max=t.max)}),e;default:return[]}},ga=(e,t)=>({min:e.reduce((n,r)=>t(r)<n?t(r):n,1/0),max:e.reduce((n,r)=>t(r)>n?t(r):n,-1/0)}),ui=e=>{switch(Bn(e)){case"bigWigData":return ga(e,t=>t.value);case"bigZoomData":return ga(e,t=>t.maxVal);case"valuedPoint":return ga(e,t=>t.max);default:return{min:0,max:0}}};function Ws(e){return e.value!==void 0}const Hd=e=>{const t={start:e[0].x,end:e[e.length-1].x},n=Ru(t,e.map(i=>({start:i.x,end:i.x+1})),100),r=[];for(let i=0;i<=100;++i)r.push({x:i,max:-1/0,min:1/0});return e.reduce((i,a)=>{const o=Math.floor(n(a.x)),s=Math.floor(n(a.x));a.min<i.renderPoints[o].min&&(i.renderPoints[o].min=a.min),a.max>i.renderPoints[o].max&&(i.renderPoints[o].max=a.max);for(let c=o+1;c<=s;++c)i.renderPoints[c].min=a.min,i.renderPoints[c].max=a.max;return a.min<i.range.min&&(i.range.min=a.min),a.max>i.range.max&&(i.range.max=a.max),i},{renderPoints:r,range:{max:-1/0,min:1/0}})};function Pu(e,t){if(!e)return{renderPoints:[],range:{max:1,min:0}};const n=e.reduce((s,c)=>({start:c.start<s.start?c.start:s.start,end:c.end>s.end?c.end:s.end}),{start:1/0,end:-1/0}),r=Ru(n,e,t),i=[],a={start:Math.floor(r(e[0].start)),end:Math.floor(r(e[e.length-1].end))};for(let s=a.start;s<a.end;++s)i.push({x:s,max:-1/0,min:1/0});const o={renderPoints:i,range:{max:-1/0,min:1/0}};return e.forEach(s=>{const c=Math.floor(r(s.start)),u=Math.floor(r(s.end)),l=Ws(s)?s.value:s.minVal,h=Ws(s)?s.value:s.maxVal;l<o.renderPoints[c].min&&(o.renderPoints[c].min=l),h>o.renderPoints[c].max&&(o.renderPoints[c].max=h);for(let f=c+1;f<u;++f)o.renderPoints[f].min=l,o.renderPoints[f].max=h;l<o.range.min&&(o.range.min=l),h>o.range.max&&(o.range.max=h)}),o}function Mt({canDrag:e,children:t}){const n=E.useRef(null),r=E.useContext(qt),[i,a]=E.useState(!1),{delta:o,setDelta:s}=E.useContext(vo),[c,u]=E.useState({x:0,y:0}),[l,h]=E.useState(null),[f,g]=E.useState(1);E.useEffect(()=>{const T=document.getElementById("browserSVG");if(h(T),T){const O=T,_=O.getBoundingClientRect();g(_.width/O.viewBox.baseVal.width)}},[]);const x=(T,O)=>{T.preventDefault(),a(!0);const _=O.deltaX;s(o+_)},w=()=>{Math.abs(o)<10||(u({x:o,y:0}),r({type:le.SHIFT_DOMAIN,delta:o}),a(!1))};return E.useEffect(()=>{i||u({x:o,y:0})},[o]),m.jsx(yi,{nodeRef:n,scale:f,position:c,axis:"x",onStart:e&&l?()=>{}:()=>!1,onDrag:(T,O)=>x(T,O),onStop:w,children:m.jsx("g",{ref:n,height:"100%",style:{cursor:e&&l?i?"grabbing":"grab":"default"},children:t})})}function Ln(e,t){return` L ${e} ${t}`}const zd=e=>{const t=E.useContext(On),n=E.useContext(qt),[r,i]=E.useState(pa(e.data)),[a,o]=E.useState();E.useEffect(()=>{const C=ui(r);C.min=C.min>0?0:C.min,n({type:le.UPDATE_PROPS,id:e.id,props:{defaultRange:C}}),o(C)},[]),E.useEffect(()=>{const C=pa(e.data),S=ui(C),R={min:S.min>0?0:S.min,max:S.max};i(Qs(C,R)),n({type:le.UPDATE_PROPS,id:e.id,props:{range:R}}),n({type:le.UPDATE_PROPS,id:e.id,props:{defaultRange:R}})},[e.data,a,e.domain]),E.useEffect(()=>{if(!e.range)return;const C=pa(e.data);i(Qs(C,e.range))},[e.range]);const s=E.useContext(Jt),[c,u]=E.useState(),[l,h]=E.useState(null),f=E.useCallback(C=>{var U;if(t.delta!=0||!((U=e.svgRef)!=null&&U.current))return;const S=mn(e.svgRef.current,C);h([S[0],S[1]]);const R=Math.round(S[0]-150),P=w.renderPoints.find(V=>V.min<1/0&&V.max>-1/0&&V.x===R);if(!P)return;const F=S[0]>e.width-60?S[0]-60+5:S[0]+5;s.setTooltip({show:!0,x:F,y:S[1]-e.height/2,height:80,width:60,content:m.jsx("div",{style:{fontSize:"10px",backgroundColor:"#ffffff",boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",padding:"5px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"5px"},children:m.jsxs("div",{style:{whiteSpace:"nowrap",minWidth:"50px"},children:["value: ",Number(Bd(P.max))]})})})},[e.svgRef,e.width,e.height,t.delta]);E.useEffect(()=>{u(l?l[0]:void 0)},[l]);const g=()=>{s.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0}),u(void 0)};E.useEffect(()=>{if(t.delta!=0){g();return}},[t.delta]);const x=E.useRef($t()),w=E.useMemo(()=>r&&r.length&&Bn(r)===ju.ValuedPoint?{renderPoints:r,range:e.range||ui(r)}:Pu(r,e.width),[r,e.width,e.domain]),T=E.useMemo(()=>{const C=Iu(w.range,e.height),S=w.renderPoints.filter(P=>P.min<1/0&&P.max>-1/0),R=P=>Math.max(0,Math.min(e.height,C(P)));return{maxPath:S.reduce((P,F,U,V)=>P+(F.x?Ln(F.x,R(V[U-1]?V[U-1].max:0)):"")+Ln(F.x,R(F.max)),"M 0 "+R(0)+" ")+Ln(e.width,R(0)),minPath:S.reduce((P,F,U,V)=>P+(F.x?Ln(F.x,R(V[U-1]?V[U-1].min:0)):"")+Ln(F.x,R(F.min)),"M 0 "+R(0)+" ")+Ln(e.width,R(0))}},[w,e.height,e.width]),O=e.color||"#000000",_=E.useMemo(()=>e.noTransparency?O:Ri(O,.5),[e]),y=e.id||x.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{className:e.className,width:e.width,height:e.height,clipPath:`url(#${y})`,children:[m.jsx("rect",{width:e.width,height:e.height,fill:"white",onMouseOut:g}),m.jsx("defs",{children:m.jsx(Wt,{id:y,width:e.width,height:e.height})}),m.jsx("path",{d:T.maxPath,fill:_,style:{cursor:"default",clipPath:`url(#${y})`}}),m.jsx("path",{d:T.minPath,fill:O,style:{cursor:"default",clipPath:`url(#${y})`}}),c!==void 0&&m.jsx("line",{stroke:"#ccc",x1:c-150,x2:c-150,y1:0,y2:e.height}),m.jsx("rect",{width:e.width,height:e.height,fill:"transparent",onMouseMove:C=>{f(C)},onMouseOut:()=>{g()}})]})})},Qd=e=>{const t=E.useRef($t()),n=E.useMemo(()=>e.data&&e.data.length&&e.data[0].x!==void 0?Hd(e.data):Pu(e.data,100),[e.data,e.width,e.domain]);n.range||(n.range=ui(n.renderPoints));const r=E.useMemo(()=>{const i=Iu(n.range,1),a=n.renderPoints.filter(s=>s.min<1/0&&s.max>-1/0),o=e.color||"#000000";return a.map(s=>Ri(o,i(s.max)))},[e.color,n]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{className:e.className,width:e.width,height:e.height,children:[m.jsx("defs",{children:m.jsx("linearGradient",{id:t.current,children:r.map((i,a)=>m.jsx("stop",{offset:`${a}%`,stopColor:i},`${t.current}_pt_${a}`))})}),m.jsx("rect",{width:e.width,height:e.height,fill:"white"}),m.jsx("rect",{width:e.width,height:e.height,fill:e.hoverColor||"transparent",fillOpacity:e.hoverColor?.2:0}),m.jsx("rect",{width:e.width,x:0,y:e.height/3,height:e.height/3,fill:`url('#${t.current}')`})]})})},Xn=e=>{E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const t=12,n=32,r=e.height,i=e.width;return m.jsxs("g",{className:e.className,width:e.width,height:e.height,transform:e.transform,children:[e.height!=0&&m.jsx("rect",{width:e.width,height:e.height,fill:"none",onClick:e.onClick}),e.error&&m.jsxs("g",{transform:`translate(${t+(i-n)/2},${(r-n)/2})`,children:[m.jsx(pu,{width:n,height:n}),m.jsx("g",{transform:`translate(${n/2},${n+10})`,children:m.jsx("text",{textAnchor:"middle",fontSize:"12px",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.text})})]}),!e.error&&e.text&&e.height!=0&&m.jsx("text",{textAnchor:"middle",x:Math.round(+e.width/2),y:Math.round(+e.height/2),style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:e.text})]})},Nu={trackType:J.BIGWIG,titleSize:12,trackMargin:12,displayMode:Pe.FULL,canDrag:!0,noTransparency:!0,color:"#ff5555"};function Au(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data);E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]);const a={...e,trackType:J.BIGWIG,displayMode:e.displayMode};switch(e.displayMode){case Pe.FULL:return m.jsx(tt,{...a,loading:t,trackType:J.BIGWIG,displayMode:e.displayMode,children:m.jsx(zd,{...e,data:r})});case Pe.DENSE:return m.jsx(tt,{...a,loading:t,trackType:J.BIGWIG,displayMode:e.displayMode,children:m.jsx(Qd,{...e,data:r})});case Pe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),m.jsx(tt,{...a,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function Wd(e,t){const n=[];return e.forEach((r,i)=>(i===0||r.start>e[i-1].end||r.color!=e[i-1].color?n.push({start:t(r.start)<0?0:t(r.start),end:t(r.end)<0?0:t(r.end),color:r.color,name:r.name,score:r.score}):n[n.length-1].end=t(r.end),n)),n}function Gd(e,t){return Ar(e.sort((n,r)=>n.start-r.start).map(n=>({coordinates:{start:n.start,end:n.end},color:n.color,name:"",score:n.score,rectname:n.name})),t,0).map(n=>n.map(r=>({start:t(r.coordinates.start)<0?0:t(r.coordinates.start),end:t(r.coordinates.end),color:r.color,rectname:r.rectname,name:r.rectname,score:r.score})))}const Yd={fontSize:"12px",backgroundColor:"#ffffff",border:"1px solid",padding:"1em"},Fu=e=>m.jsxs("div",{style:Yd,children:[e.name?`name: ${e.name}`:"",m.jsx("br",{}),e.score!==void 0?`score: ${e.score}`:""]});function Vu(e,t,n,r,i){const a=E.useContext(Jt),o=E.useCallback((c,u)=>{if(!n||!n.current)return;const[l,h]=mn(n.current,c);a.setTooltip({show:!0,x:l>t-100?l-90:l+10,y:h+10,width:100,height:50,content:E.createElement(e,u)})},[e,t,n,a,r]),s=E.useCallback(()=>{a.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},[a,i]);return[o,s]}const Kd=e=>{const[t,n]=Vu(e.tooltipContent||Fu,e.width,e.svgRef),r=E.useRef($t()),i=E.useCallback(Ct(e.domain,e.width),[e.data]),a=e.color||"#000000",o=e.id||r.current.toString(),s=E.useMemo(()=>Wd(e.data||[],i),[e.width,e.data,e.domain]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{width:e.width,height:e.height,clipPath:`url(#${o})`,className:e.className,children:[m.jsx("rect",{width:e.width,height:e.height,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:o,width:e.width,height:e.height})}),s.map((c,u)=>m.jsx("rect",{style:{cursor:e.onClick?"pointer":"default"},height:e.height*.6,width:c.end-c.start,x:c.start,y:e.height*.2,fill:c.color||a,onClick:()=>e.onClick&&e.onClick(c),onMouseOut:()=>{e.onMouseOut&&e.onMouseOut(),n()},onMouseOver:l=>{l.persist(),e.onMouseOver&&e.onMouseOver(c),t(l,c)}},`${o}_${u}`))]})})},Xd=e=>{const[n,r]=Vu(e.tooltipContent||Fu,e.width,e.svgRef),i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=E.useMemo(()=>{const u=e.data?[...e.data]:[];return Gd(u,a)},[e.width,e.data,e.domain]),s=e.rowHeight*o.length||12,c=e.id||i.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(s)},[o,e.rowHeight,e.onHeightChanged]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{width:e.width,height:s,clipPath:`url(#${c})`,children:[m.jsx("rect",{width:e.width,height:s,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:c,width:e.width,height:s})}),o.map((u,l)=>m.jsx("g",{transform:`translate(0, ${l*e.rowHeight})`,children:u.map((h,f)=>m.jsx("rect",{style:{cursor:e.onClick?"pointer":"default"},height:e.rowHeight*.6,width:h.end-h.start<1?1:h.end-h.start,x:h.start,y:e.rowHeight*.2,fill:h.color,onClick:()=>e.onClick&&e.onClick(h),onMouseOut:()=>{e.onMouseOut&&e.onMouseOut(),r()},onMouseOver:g=>{g.persist(),e.onMouseOver&&e.onMouseOver(h),n(g,h)}},`${c}_${f}`))},`group_${l}`))]})})},qu={trackType:J.BIGBED,displayMode:Pe.SQUISH,rowHeight:10,titleSize:12,trackMargin:12,canDrag:!0};function $u(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data),a={...e,trackType:J.BIGBED,displayMode:e.displayMode};switch(E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]),e.displayMode){case Pe.DENSE:return m.jsx(tt,{...a,loading:t,trackType:J.BIGBED,displayMode:e.displayMode,children:m.jsx(Kd,{...e,data:r})});case Pe.SQUISH:return m.jsx(tt,{...a,loading:t,trackType:J.BIGBED,displayMode:e.displayMode,children:m.jsx(Xd,{...e,data:r})});case Pe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigBed`),m.jsx(tt,{...a,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function Jd(e,t){return e.coordinates.start===t.coordinates.start?e.coordinates.end-t.coordinates.end:e.coordinates.start-t.coordinates.start}function Zd(e,t){return e.reduce((n,r)=>(r.transcripts.filter(i=>i.coordinates.start<t.end&&i.coordinates.end>t.start).forEach(i=>n.push({...i,strand:r.strand})),n),[]).sort((n,r)=>n.coordinates.start-r.coordinates.start)}function e0(e){if(e.length===0)return[];const t=[{coordinates:{...e[0].coordinates}}];return e.slice(1).forEach(n=>{n.coordinates.start<t[t.length-1].coordinates.end?t[t.length-1].coordinates.end=Math.max(t[t.length-1].coordinates.end,n.coordinates.end):t.push({coordinates:{...n.coordinates}})}),t}function t0(e,t){var s;const r=e.transcripts.reduce((c,u)=>[...c,...u.exons||[]],[]).sort(Jd),i=r.length===0?[]:[{coordinates:{...r[0].coordinates},UTRs:r[0].UTRs&&[...r[0].UTRs]}],a=new Set(e.transcripts.map(c=>c.color));r.slice(1).forEach(c=>{c.coordinates.start<i[i.length-1].coordinates.end?(i[i.length-1].UTRs=[...i[i.length-1].UTRs||[],...c.UTRs||[]],i[i.length-1].coordinates.end=Math.max(c.coordinates.end,i[i.length-1].coordinates.end)):i.push({coordinates:{...c.coordinates},UTRs:c.UTRs&&[...c.UTRs]})}),i.forEach(c=>{c.UTRs=e0(c.UTRs||[])});let o=a.size===1?a.values().next().value:void 0;return t&&(o=(s=e.name)!=null&&s.includes(t)?"#ff5555":o),{name:e.name||"",strand:e.strand,id:e.id||"",coordinates:{start:Math.min(...r.map(c=>c.coordinates.start)),end:Math.max(...r.map(c=>c.coordinates.end))},exons:i,color:o}}function n0(e,t,n){var r;return{strand:e.strand,name:e.name,id:e.id,color:e.color,coordinates:{end:t(e.coordinates.end),start:t(e.coordinates.start)},exons:((r=e.exons)==null?void 0:r.filter(i=>i.coordinates.end>n.start&&i.coordinates.start<n.end).map(i=>{var a;return{coordinates:{start:t(i.coordinates.start),end:t(i.coordinates.end)},UTRs:((a=i.UTRs)==null?void 0:a.map(o=>({coordinates:{start:t(o.coordinates.start),end:t(o.coordinates.end)}})))||[]}}))||[]}}function r0(e,t,n,r,i,a){let o="";if(e=e<0?0:e,t=t>a?a:t,n==="+")for(let s=e+10;s<t-10;s+=20)o+=An(s-i,r-i)+Te(s,r)+Te(s-i,r+i)+Te(s,r)+Te(s-i,r-i);else if(n==="-")for(let s=e+10;s<t-10;s+=20)o+=An(s+i,r-i)+Te(s,r)+Te(s+i,r+i)+Te(s,r)+Te(s+i,r-i);return o+" M "+e+" "+r+" L "+t+" "+r}function i0(e,t,n,r){var h,f;if(e.coordinates.start>r||e.coordinates.end<0)return"";const i=((h=e.UTRs)==null?void 0:h.filter(g=>g.coordinates.start===e.coordinates.start))||[],a=((f=e.UTRs)==null?void 0:f.filter(g=>g.coordinates.end===e.coordinates.end))||[],o=t-n*.2,s=t+n*.2,c=t-n*.3,u=t+n*.3;if(!i[0]&&!a[0])return An(e.coordinates.start,c)+Te(e.coordinates.end,c)+Te(e.coordinates.end,u)+Te(e.coordinates.start,u)+Te(e.coordinates.start,c);if(i[0]&&i[0].coordinates.end===e.coordinates.end)return An(i[0].coordinates.start,o)+Te(i[0].coordinates.end,o)+Te(i[0].coordinates.end,s)+Te(i[0].coordinates.start,s)+Te(i[0].coordinates.start,o);let l=i[0]?An(i[0].coordinates.start,o)+Te(i[0].coordinates.end,o)+Te(i[0].coordinates.end,c):An(e.coordinates.start,c);return l+=a[0]?Te(a[0].coordinates.start,c)+Te(a[0].coordinates.start,o)+Te(a[0].coordinates.end,o)+Te(a[0].coordinates.end,s)+Te(a[0].coordinates.start,s)+Te(a[0].coordinates.start,u):Te(e.coordinates.end,c)+Te(e.coordinates.end,u),l+(i[0]?Te(i[0].coordinates.end,u)+Te(i[0].coordinates.end,s)+Te(i[0].coordinates.start,s)+Te(i[0].coordinates.start,o):Te(e.coordinates.start,u)+Te(e.coordinates.start,c))}function Uu(e,t,n,r,i){var s;const a=n0(e,t,n),o={exons:((s=a.exons)==null?void 0:s.reduce((c,u)=>c+i0(u,r/2,r,i),""))||"",introns:r0(a.coordinates.start,a.coordinates.end,a.strand,r/2,r*.19,i)};return{transcript:a,paths:o}}const a0=e=>{const t=E.useContext(Jt),n=(l,h)=>{if(e.svgRef){const f=mn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-150?f[0]-150+5:f[0]+5,y:f[1],width:150,height:50,content:m.jsx("span",{style:{fontSize:"10px"},children:h.id})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.color||"#000000",s=bo(e.rowHeight)*1.25,c=E.useMemo(()=>Ar(Zd(e.data||[],e.domain),a,s).map((l,h)=>({y:h*e.rowHeight,transcripts:l.map(f=>Uu(f,a,e.domain,e.rowHeight,e.width))})),[e.data,e.rowHeight,e.width,e.domain]),u=E.useMemo(()=>Math.max(e.rowHeight*c.length,35),[e.rowHeight,c.length]);return console.log(u),E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(u)},[u]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{children:[m.jsx("rect",{width:e.width,height:u,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:i.current,width:e.width,height:c.length*e.rowHeight})}),c.map((l,h)=>m.jsx("g",{style:{clipPath:`url(#${i.current})`},transform:`translate(0,${l.y})`,height:e.rowHeight,width:e.width,children:l.transcripts.map((f,g)=>m.jsxs(E.Fragment,{children:[m.jsx("path",{stroke:f.transcript.color||o,fill:f.transcript.color||o,strokeWidth:e.rowHeight/16,d:f.paths.introns+f.paths.exons,style:{cursor:e.onTranscriptClick?"pointer":"default"},onMouseOver:x=>n(x,f.transcript),onMouseOut:r,onClick:()=>e.onTranscriptClick&&e.onTranscriptClick(f.transcript)}),m.jsx("text",{fill:f.transcript.color||o,fontSize:s,x:f.transcript.coordinates.end+5,y:e.rowHeight/2,dominantBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:f.transcript.name})]},`transcript_${g}`))},`row_${h}`))]})})},o0=e=>{const t=E.useContext(Jt),n=(l,h)=>{if(e.svgRef){const f=mn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-150?f[0]-150+5:f[0]+5,y:f[1],width:150,height:50,content:m.jsx("span",{style:{fontSize:"10px"},children:h.id})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.color||"#000000",s=bo(e.rowHeight)*1.25,c=E.useMemo(()=>{var l;return Ar(((l=e.data)==null?void 0:l.map(h=>t0(h,e.geneName)))||[],a,s).map((h,f)=>({y:f*e.rowHeight,transcripts:h.map(g=>Uu(g,a,e.domain,e.rowHeight,e.width))}))},[e.data,e.rowHeight,e.width,e.domain]),u=E.useMemo(()=>Math.max(e.rowHeight*c.length,35),[e.rowHeight,c.length]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(u)},[u]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{children:[m.jsx("rect",{width:e.width,height:u,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:i.current,width:e.width,height:c.length*e.rowHeight})}),c.map((l,h)=>m.jsx("g",{style:{clipPath:`url(#${i.current})`},transform:`translate(0,${l.y})`,height:e.rowHeight,width:e.width,children:l.transcripts.map((f,g)=>m.jsxs(E.Fragment,{children:[m.jsx("path",{stroke:f.transcript.color||o,fill:f.transcript.color||o,strokeWidth:e.rowHeight/16,d:f.paths.introns+f.paths.exons,style:{cursor:e.onTranscriptClick?"pointer":"default"},onMouseOver:x=>n(x,f.transcript),onMouseOut:r,onClick:()=>e.onTranscriptClick&&e.onTranscriptClick(f.transcript)}),m.jsx("text",{fill:f.transcript.color||o,fontSize:s,x:f.transcript.coordinates.end+5,y:e.rowHeight/2,dominantBaseline:"middle",style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:f.transcript.name})]},`transcript_${g}`))},`row_${h}`))]})})},Bu={trackType:J.TRANSCRIPT,displayMode:Pe.SQUISH,rowHeight:14,titleSize:12,trackMargin:12,canDrag:!0};function Hu(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data),a={...e,trackType:J.TRANSCRIPT,displayMode:e.displayMode};switch(E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]),E.useEffect(()=>{e.refetch&&e.refetch({variables:{assembly:e.assembly,chromosome:e.domain.chromosome,start:e.domain.start,end:e.domain.end,version:e.version}}).then(({data:o,loading:s,error:c})=>{i(o.gene),n(s)})},[e.version]),e.displayMode){case Pe.PACK:return m.jsx(tt,{...a,loading:t,trackType:J.TRANSCRIPT,displayMode:e.displayMode,children:m.jsx(a0,{...e,data:r})});case Pe.SQUISH:return m.jsx(tt,{...a,loading:t,trackType:J.TRANSCRIPT,displayMode:e.displayMode,children:m.jsx(o0,{...e,data:r})});case Pe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),m.jsx(tt,{...a,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function s0(e,t){const n=[];return e.sort((r,i)=>r.start-i.start).forEach((r,i)=>(i===0||r.start>e[i-1].end||r.color!=e[i-1].color?n.push({start:t(r.start)<0?0:t(r.start),end:t(r.end),color:r.color,cigarOps:r.cigarOps,strand:r.strand,seq:r.seq}):n[n.length-1].end=t(r.end),n)),n}function c0(e,t,n){return Ar(e.sort((r,i)=>r.start-i.start).map(r=>({coordinates:{start:r.start,end:r.end},color:r.color,name:"",cigarOps:r.cigarOps,strand:r.strand,seq:r.seq})),t,0).map(r=>r.map(i=>{var a;return{start:t(i.coordinates.start)<0?0:t(i.coordinates.start),end:t(i.coordinates.end),color:i.color,cigarOps:i.cigarOps.map(o=>({opStart:t(o.opStart)<0?0:t(o.opStart),opEnd:t(o.opEnd),op:o.op})),strand:i.strand,seq:t(i.coordinates.start)<0?(a=i.seq)==null?void 0:a.slice(n.start-i.coordinates.start,i.seq.length):i.seq}}))}const u0=e=>{const t=E.useRef($t()),n=Ct(e.domain,e.width),r=e.color||"#000000",i=E.useMemo(()=>c0(e.data,n,e.domain),[e.data,e.domain,e.width]),a=e.rowHeight*i.length,o=e.id||t.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(a)},[i,e.rowHeight,e.onHeightChanged]),m.jsxs("g",{width:e.width,height:a,transform:e.transform,clipPath:`url(#${o})`,children:[m.jsx("defs",{children:m.jsx(Wt,{id:o,width:e.width,height:a})}),i.map((s,c)=>m.jsx("g",{transform:`translate(0, ${c*e.rowHeight})`,children:s.map((u,l)=>{const h=u.cigarOps.map((f,g)=>{let x;return f.op==="S"?x=m.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,style:{fill:"none",strokeDasharray:"2,2",stroke:"black",strokeWidth:.5}},`${l}_${g}`):f.op==="I"?x=m.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,fill:"#ff69b4",children:m.jsx("title",{children:"Insertion"})},`${l}_${g}`):f.op==="D"||f.op==="N"?x=m.jsx("line",{y2:e.rowHeight*.2+e.rowHeight*.6/2,x2:f.opEnd,x1:f.opStart,y1:e.rowHeight*.2+e.rowHeight*.6/2,stroke:"red"},`${l}_${g}`):x=m.jsx("rect",{height:e.rowHeight*.6,width:f.opEnd-f.opStart<1?1:f.opEnd-f.opStart,x:f.opStart,y:e.rowHeight*.2,fill:u.strand!==void 0?u.strand?"#F7F71A":"#53F71A":u.color||r},`${l}_${g}`),x});return m.jsxs("g",{children:[h,e.domain.end-e.domain.start<=200&&u.seq&&m.jsx("text",{fontSize:8,x:u.start,y:e.rowHeight*.2+e.rowHeight*.5,fill:"black",textLength:u.end-u.start,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:u.seq})]},e.id+"_"+l)})},`group_${c}`))]})},l0=e=>{const t=E.useRef($t()),n=Ct(e.domain,e.width),r=e.color||"#000000",i=e.id||t.current.toString(),a=E.useMemo(()=>s0(e.data,n),[e.domain,e.width,e.data]);return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height,e.onHeightChanged]),m.jsxs("g",{width:e.width,height:e.height,transform:e.transform,clipPath:`url(#${i})`,children:[m.jsx("defs",{children:m.jsx(Wt,{id:i,width:e.width,height:e.height})}),a.map((o,s)=>m.jsx("rect",{height:e.height*.6,width:o.end-o.start,x:o.start,y:e.height*.2,fill:o.strand!==void 0?o.strand?"#F7F71A":"#53F71A":o.color||r},`${i}_${s}`))]})},f0={displayMode:Pe.DENSE,rowHeight:10};function h0(e){const t=e.data&&e.data[0]?{loading:!1}:{loading:!0},n={...e,trackType:J.BIGBED,displayMode:e.displayMode};switch(e.displayMode){case Pe.DENSE:return m.jsx(tt,{...n,...t,trackType:J.BAM,displayMode:e.displayMode,children:m.jsx(l0,{...e})});case Pe.SQUISH:return m.jsx(tt,{...n,...t,trackType:J.BAM,displayMode:e.displayMode,children:m.jsx(u0,{...e})});case Pe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigBed`),m.jsx(tt,{...n,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}function d0(e,t){return n=>t.start+(t.end-t.start)*((n-e.start)/(e.end-e.start))}function m0(e,t){const n=e.map(t),r=Math.min(...n),i=Math.max(...n);return{start:r>0?0:r,end:i<0?0:i}}function p0(e){return t=>{const n=e((t<0,t)),r=e((t<0,0)),i=Math.abs(r-n)/100;return[n*(t<0?-1:1),i,t<0?"scale(1,-1)":""]}}function g0(e,t){const n=E.useMemo(()=>E0(e)?e.importance.map((o,s)=>({base:e.sequence.charAt(s),importance:o})):e,[e]),r=E.useMemo(()=>m0(n,o=>o.importance),[n]),i=d0(r,{start:t,end:0}),a=E.useCallback(p0(i),[r,t]);return[n,a,i]}function v0(e,t,n){return E.useMemo(()=>e.map(r=>{const i=t.slice(r.coordinates[0],r.coordinates[1]+1).map(s=>s.importance),a=[Math.min(...i),Math.max(...i)],o=n(a[1]);return{...r,y:o,height:n(a[0])-o}}),[e,n])}var zu={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(_h,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(1&o&&(a=i(a)),8&o||4&o&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),2&o&&typeof a!="string")for(var c in a)i.d(s,c,(function(u){return a[u]}).bind(null,c));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="/",i(i.s=5)}([function(n,r,i){n.exports=i(3)},function(n,r,i){n.exports=i(4)},function(n,r,i){/*
52
52
  object-assign
53
53
  (c) Sindre Sorhus
54
54
  @license MIT
55
- */var a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function c(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}n.exports=function(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var l={},d=0;d<10;d++)l["_"+String.fromCharCode(d)]=d;if(Object.getOwnPropertyNames(l).map(function(g){return l[g]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(g){f[g]=g}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(u,l){for(var d,f,g=c(u),x=1;x<arguments.length;x++){for(var w in d=Object(arguments[x]))o.call(d,w)&&(g[w]=d[w]);if(a){f=a(d);for(var T=0;T<f.length;T++)s.call(d,f[T])&&(g[f[T]]=d[f[T]])}}return g}},function(n,r,i){/** @license React v16.9.0
55
+ */var a=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function c(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}n.exports=function(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var l={},h=0;h<10;h++)l["_"+String.fromCharCode(h)]=h;if(Object.getOwnPropertyNames(l).map(function(g){return l[g]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(g){f[g]=g}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(u,l){for(var h,f,g=c(u),x=1;x<arguments.length;x++){for(var w in h=Object(arguments[x]))o.call(h,w)&&(g[w]=h[w]);if(a){f=a(h);for(var T=0;T<f.length;T++)s.call(h,f[T])&&(g[f[T]]=h[f[T]])}}return g}},function(n,r,i){/** @license React v16.9.0
56
56
  * react.production.min.js
57
57
  *
58
58
  * Copyright (c) Facebook, Inc. and its affiliates.
59
59
  *
60
60
  * This source code is licensed under the MIT license found in the
61
61
  * LICENSE file in the root directory of this source tree.
62
- */var a=i(2),o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,c=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,d=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,g=o?Symbol.for("react.context"):60110,x=o?Symbol.for("react.forward_ref"):60112,w=o?Symbol.for("react.suspense"):60113,T=o?Symbol.for("react.suspense_list"):60120,S=o?Symbol.for("react.memo"):60115,_=o?Symbol.for("react.lazy"):60116,y=typeof Symbol=="function"&&Symbol.iterator;function C(I){for(var L=I.message,ae="https://reactjs.org/docs/error-decoder.html?invariant="+L,ce=1;ce<arguments.length;ce++)ae+="&args[]="+encodeURIComponent(arguments[ce]);return I.message="Minified React error #"+L+"; visit "+ae+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",I}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R={};function P(I,L,ae){this.props=I,this.context=L,this.refs=R,this.updater=ae||O}function F(){}function U(I,L,ae){this.props=I,this.context=L,this.refs=R,this.updater=ae||O}P.prototype.isReactComponent={},P.prototype.setState=function(I,L){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw C(Error(85));this.updater.enqueueSetState(this,I,L,"setState")},P.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")},F.prototype=P.prototype;var V=U.prototype=new F;V.constructor=U,a(V,P.prototype),V.isPureReactComponent=!0;var ye={current:null},_e={suspense:null},ve={current:null},we=Object.prototype.hasOwnProperty,Ne={key:!0,ref:!0,__self:!0,__source:!0};function Ie(I,L,ae){var ce=void 0,oe={},Re=null,Qe=null;if(L!=null)for(ce in L.ref!==void 0&&(Qe=L.ref),L.key!==void 0&&(Re=""+L.key),L)we.call(L,ce)&&!Ne.hasOwnProperty(ce)&&(oe[ce]=L[ce]);var Xe=arguments.length-2;if(Xe===1)oe.children=ae;else if(1<Xe){for(var ke=Array(Xe),$e=0;$e<Xe;$e++)ke[$e]=arguments[$e+2];oe.children=ke}if(I&&I.defaultProps)for(ce in Xe=I.defaultProps)oe[ce]===void 0&&(oe[ce]=Xe[ce]);return{$$typeof:s,type:I,key:Re,ref:Qe,props:oe,_owner:ve.current}}function G(I){return typeof I=="object"&&I!==null&&I.$$typeof===s}var $=/\/+/g,Z=[];function j(I,L,ae,ce){if(Z.length){var oe=Z.pop();return oe.result=I,oe.keyPrefix=L,oe.func=ae,oe.context=ce,oe.count=0,oe}return{result:I,keyPrefix:L,func:ae,context:ce,count:0}}function A(I){I.result=null,I.keyPrefix=null,I.func=null,I.context=null,I.count=0,10>Z.length&&Z.push(I)}function Y(I,L,ae){return I==null?0:function ce(oe,Re,Qe,Xe){var ke=typeof oe;ke!=="undefined"&&ke!=="boolean"||(oe=null);var $e=!1;if(oe===null)$e=!0;else switch(ke){case"string":case"number":$e=!0;break;case"object":switch(oe.$$typeof){case s:case c:$e=!0}}if($e)return Qe(Xe,oe,Re===""?"."+se(oe,0):Re),1;if($e=0,Re=Re===""?".":Re+":",Array.isArray(oe))for(var yt=0;yt<oe.length;yt++){var Ot=Re+se(ke=oe[yt],yt);$e+=ce(ke,Ot,Qe,Xe)}else if(oe===null||typeof oe!="object"?Ot=null:Ot=typeof(Ot=y&&oe[y]||oe["@@iterator"])=="function"?Ot:null,typeof Ot=="function")for(oe=Ot.call(oe),yt=0;!(ke=oe.next()).done;)$e+=ce(ke=ke.value,Ot=Re+se(ke,yt++),Qe,Xe);else if(ke==="object")throw Qe=""+oe,C(Error(31),Qe==="[object Object]"?"object with keys {"+Object.keys(oe).join(", ")+"}":Qe,"");return $e}(I,"",L,ae)}function se(I,L){return typeof I=="object"&&I!==null&&I.key!=null?function(ae){var ce={"=":"=0",":":"=2"};return"$"+(""+ae).replace(/[=:]/g,function(oe){return ce[oe]})}(I.key):L.toString(36)}function ee(I,L){I.func.call(I.context,L,I.count++)}function me(I,L,ae){var ce=I.result,oe=I.keyPrefix;I=I.func.call(I.context,L,I.count++),Array.isArray(I)?H(I,ce,ae,function(Re){return Re}):I!=null&&(G(I)&&(I=function(Re,Qe){return{$$typeof:s,type:Re.type,key:Qe,ref:Re.ref,props:Re.props,_owner:Re._owner}}(I,oe+(!I.key||L&&L.key===I.key?"":(""+I.key).replace($,"$&/")+"/")+ae)),ce.push(I))}function H(I,L,ae,ce,oe){var Re="";ae!=null&&(Re=(""+ae).replace($,"$&/")+"/"),Y(I,me,L=j(L,Re,ce,oe)),A(L)}function re(){var I=ye.current;if(I===null)throw C(Error(321));return I}var ge={Children:{map:function(I,L,ae){if(I==null)return I;var ce=[];return H(I,ce,null,L,ae),ce},forEach:function(I,L,ae){if(I==null)return I;Y(I,ee,L=j(null,null,L,ae)),A(L)},count:function(I){return Y(I,function(){return null},null)},toArray:function(I){var L=[];return H(I,L,null,function(ae){return ae}),L},only:function(I){if(!G(I))throw C(Error(143));return I}},createRef:function(){return{current:null}},Component:P,PureComponent:U,createContext:function(I,L){return L===void 0&&(L=null),(I={$$typeof:g,_calculateChangedBits:L,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:f,_context:I},I.Consumer=I},forwardRef:function(I){return{$$typeof:x,render:I}},lazy:function(I){return{$$typeof:_,_ctor:I,_status:-1,_result:null}},memo:function(I,L){return{$$typeof:S,type:I,compare:L===void 0?null:L}},useCallback:function(I,L){return re().useCallback(I,L)},useContext:function(I,L){return re().useContext(I,L)},useEffect:function(I,L){return re().useEffect(I,L)},useImperativeHandle:function(I,L,ae){return re().useImperativeHandle(I,L,ae)},useDebugValue:function(){},useLayoutEffect:function(I,L){return re().useLayoutEffect(I,L)},useMemo:function(I,L){return re().useMemo(I,L)},useReducer:function(I,L,ae){return re().useReducer(I,L,ae)},useRef:function(I){return re().useRef(I)},useState:function(I){return re().useState(I)},Fragment:u,Profiler:d,StrictMode:l,Suspense:w,unstable_SuspenseList:T,createElement:Ie,cloneElement:function(I,L,ae){if(I==null)throw C(Error(267),I);var ce=void 0,oe=a({},I.props),Re=I.key,Qe=I.ref,Xe=I._owner;if(L!=null){L.ref!==void 0&&(Qe=L.ref,Xe=ve.current),L.key!==void 0&&(Re=""+L.key);var ke=void 0;for(ce in I.type&&I.type.defaultProps&&(ke=I.type.defaultProps),L)we.call(L,ce)&&!Ne.hasOwnProperty(ce)&&(oe[ce]=L[ce]===void 0&&ke!==void 0?ke[ce]:L[ce])}if((ce=arguments.length-2)===1)oe.children=ae;else if(1<ce){ke=Array(ce);for(var $e=0;$e<ce;$e++)ke[$e]=arguments[$e+2];oe.children=ke}return{$$typeof:s,type:I.type,key:Re,ref:Qe,props:oe,_owner:Xe}},createFactory:function(I){var L=Ie.bind(null,I);return L.type=I,L},isValidElement:G,version:"16.9.0",unstable_withSuspenseConfig:function(I,L){var ae=_e.suspense;_e.suspense=L===void 0?null:L;try{I()}finally{_e.suspense=ae}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:_e,ReactCurrentOwner:ve,IsSomeRendererActing:{current:!1},assign:a}},ue={default:ge},pe=ue&&ge||ue;n.exports=pe.default||pe},function(n,r,i){/** @license React v16.9.0
62
+ */var a=i(2),o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,c=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,h=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,g=o?Symbol.for("react.context"):60110,x=o?Symbol.for("react.forward_ref"):60112,w=o?Symbol.for("react.suspense"):60113,T=o?Symbol.for("react.suspense_list"):60120,O=o?Symbol.for("react.memo"):60115,_=o?Symbol.for("react.lazy"):60116,y=typeof Symbol=="function"&&Symbol.iterator;function C(I){for(var L=I.message,ae="https://reactjs.org/docs/error-decoder.html?invariant="+L,ce=1;ce<arguments.length;ce++)ae+="&args[]="+encodeURIComponent(arguments[ce]);return I.message="Minified React error #"+L+"; visit "+ae+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",I}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R={};function P(I,L,ae){this.props=I,this.context=L,this.refs=R,this.updater=ae||S}function F(){}function U(I,L,ae){this.props=I,this.context=L,this.refs=R,this.updater=ae||S}P.prototype.isReactComponent={},P.prototype.setState=function(I,L){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw C(Error(85));this.updater.enqueueSetState(this,I,L,"setState")},P.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")},F.prototype=P.prototype;var V=U.prototype=new F;V.constructor=U,a(V,P.prototype),V.isPureReactComponent=!0;var ye={current:null},_e={suspense:null},ve={current:null},we=Object.prototype.hasOwnProperty,Ae={key:!0,ref:!0,__self:!0,__source:!0};function Ie(I,L,ae){var ce=void 0,oe={},Re=null,Qe=null;if(L!=null)for(ce in L.ref!==void 0&&(Qe=L.ref),L.key!==void 0&&(Re=""+L.key),L)we.call(L,ce)&&!Ae.hasOwnProperty(ce)&&(oe[ce]=L[ce]);var Xe=arguments.length-2;if(Xe===1)oe.children=ae;else if(1<Xe){for(var ke=Array(Xe),$e=0;$e<Xe;$e++)ke[$e]=arguments[$e+2];oe.children=ke}if(I&&I.defaultProps)for(ce in Xe=I.defaultProps)oe[ce]===void 0&&(oe[ce]=Xe[ce]);return{$$typeof:s,type:I,key:Re,ref:Qe,props:oe,_owner:ve.current}}function G(I){return typeof I=="object"&&I!==null&&I.$$typeof===s}var $=/\/+/g,Z=[];function j(I,L,ae,ce){if(Z.length){var oe=Z.pop();return oe.result=I,oe.keyPrefix=L,oe.func=ae,oe.context=ce,oe.count=0,oe}return{result:I,keyPrefix:L,func:ae,context:ce,count:0}}function A(I){I.result=null,I.keyPrefix=null,I.func=null,I.context=null,I.count=0,10>Z.length&&Z.push(I)}function Y(I,L,ae){return I==null?0:function ce(oe,Re,Qe,Xe){var ke=typeof oe;ke!=="undefined"&&ke!=="boolean"||(oe=null);var $e=!1;if(oe===null)$e=!0;else switch(ke){case"string":case"number":$e=!0;break;case"object":switch(oe.$$typeof){case s:case c:$e=!0}}if($e)return Qe(Xe,oe,Re===""?"."+se(oe,0):Re),1;if($e=0,Re=Re===""?".":Re+":",Array.isArray(oe))for(var yt=0;yt<oe.length;yt++){var St=Re+se(ke=oe[yt],yt);$e+=ce(ke,St,Qe,Xe)}else if(oe===null||typeof oe!="object"?St=null:St=typeof(St=y&&oe[y]||oe["@@iterator"])=="function"?St:null,typeof St=="function")for(oe=St.call(oe),yt=0;!(ke=oe.next()).done;)$e+=ce(ke=ke.value,St=Re+se(ke,yt++),Qe,Xe);else if(ke==="object")throw Qe=""+oe,C(Error(31),Qe==="[object Object]"?"object with keys {"+Object.keys(oe).join(", ")+"}":Qe,"");return $e}(I,"",L,ae)}function se(I,L){return typeof I=="object"&&I!==null&&I.key!=null?function(ae){var ce={"=":"=0",":":"=2"};return"$"+(""+ae).replace(/[=:]/g,function(oe){return ce[oe]})}(I.key):L.toString(36)}function ee(I,L){I.func.call(I.context,L,I.count++)}function pe(I,L,ae){var ce=I.result,oe=I.keyPrefix;I=I.func.call(I.context,L,I.count++),Array.isArray(I)?W(I,ce,ae,function(Re){return Re}):I!=null&&(G(I)&&(I=function(Re,Qe){return{$$typeof:s,type:Re.type,key:Qe,ref:Re.ref,props:Re.props,_owner:Re._owner}}(I,oe+(!I.key||L&&L.key===I.key?"":(""+I.key).replace($,"$&/")+"/")+ae)),ce.push(I))}function W(I,L,ae,ce,oe){var Re="";ae!=null&&(Re=(""+ae).replace($,"$&/")+"/"),Y(I,pe,L=j(L,Re,ce,oe)),A(L)}function re(){var I=ye.current;if(I===null)throw C(Error(321));return I}var ge={Children:{map:function(I,L,ae){if(I==null)return I;var ce=[];return W(I,ce,null,L,ae),ce},forEach:function(I,L,ae){if(I==null)return I;Y(I,ee,L=j(null,null,L,ae)),A(L)},count:function(I){return Y(I,function(){return null},null)},toArray:function(I){var L=[];return W(I,L,null,function(ae){return ae}),L},only:function(I){if(!G(I))throw C(Error(143));return I}},createRef:function(){return{current:null}},Component:P,PureComponent:U,createContext:function(I,L){return L===void 0&&(L=null),(I={$$typeof:g,_calculateChangedBits:L,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:f,_context:I},I.Consumer=I},forwardRef:function(I){return{$$typeof:x,render:I}},lazy:function(I){return{$$typeof:_,_ctor:I,_status:-1,_result:null}},memo:function(I,L){return{$$typeof:O,type:I,compare:L===void 0?null:L}},useCallback:function(I,L){return re().useCallback(I,L)},useContext:function(I,L){return re().useContext(I,L)},useEffect:function(I,L){return re().useEffect(I,L)},useImperativeHandle:function(I,L,ae){return re().useImperativeHandle(I,L,ae)},useDebugValue:function(){},useLayoutEffect:function(I,L){return re().useLayoutEffect(I,L)},useMemo:function(I,L){return re().useMemo(I,L)},useReducer:function(I,L,ae){return re().useReducer(I,L,ae)},useRef:function(I){return re().useRef(I)},useState:function(I){return re().useState(I)},Fragment:u,Profiler:h,StrictMode:l,Suspense:w,unstable_SuspenseList:T,createElement:Ie,cloneElement:function(I,L,ae){if(I==null)throw C(Error(267),I);var ce=void 0,oe=a({},I.props),Re=I.key,Qe=I.ref,Xe=I._owner;if(L!=null){L.ref!==void 0&&(Qe=L.ref,Xe=ve.current),L.key!==void 0&&(Re=""+L.key);var ke=void 0;for(ce in I.type&&I.type.defaultProps&&(ke=I.type.defaultProps),L)we.call(L,ce)&&!Ae.hasOwnProperty(ce)&&(oe[ce]=L[ce]===void 0&&ke!==void 0?ke[ce]:L[ce])}if((ce=arguments.length-2)===1)oe.children=ae;else if(1<ce){ke=Array(ce);for(var $e=0;$e<ce;$e++)ke[$e]=arguments[$e+2];oe.children=ke}return{$$typeof:s,type:I.type,key:Re,ref:Qe,props:oe,_owner:Xe}},createFactory:function(I){var L=Ie.bind(null,I);return L.type=I,L},isValidElement:G,version:"16.9.0",unstable_withSuspenseConfig:function(I,L){var ae=_e.suspense;_e.suspense=L===void 0?null:L;try{I()}finally{_e.suspense=ae}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:_e,ReactCurrentOwner:ve,IsSomeRendererActing:{current:!1},assign:a}},ue={default:ge},me=ue&&ge||ue;n.exports=me.default||me},function(n,r,i){/** @license React v16.9.0
63
63
  * react-dom-server.browser.production.min.js
64
64
  *
65
65
  * Copyright (c) Facebook, Inc. and its affiliates.
66
66
  *
67
67
  * This source code is licensed under the MIT license found in the
68
68
  * LICENSE file in the root directory of this source tree.
69
- */var a=i(2),o=i(0);function s(k){for(var M=k.message,z="https://reactjs.org/docs/error-decoder.html?invariant="+M,q=1;q<arguments.length;q++)z+="&args[]="+encodeURIComponent(arguments[q]);return k.message="Minified React error #"+M+"; visit "+z+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",k}var c=typeof Symbol=="function"&&Symbol.for,u=c?Symbol.for("react.portal"):60106,l=c?Symbol.for("react.fragment"):60107,d=c?Symbol.for("react.strict_mode"):60108,f=c?Symbol.for("react.profiler"):60114,g=c?Symbol.for("react.provider"):60109,x=c?Symbol.for("react.context"):60110,w=c?Symbol.for("react.concurrent_mode"):60111,T=c?Symbol.for("react.forward_ref"):60112,S=c?Symbol.for("react.suspense"):60113,_=c?Symbol.for("react.suspense_list"):60120,y=c?Symbol.for("react.memo"):60115,C=c?Symbol.for("react.lazy"):60116,O=c?Symbol.for("react.fundamental"):60117;function R(k){if(k==null)return null;if(typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case l:return"Fragment";case u:return"Portal";case f:return"Profiler";case d:return"StrictMode";case S:return"Suspense";case _:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case x:return"Context.Consumer";case g:return"Context.Provider";case T:var M=k.render;return M=M.displayName||M.name||"",k.displayName||(M!==""?"ForwardRef("+M+")":"ForwardRef");case y:return R(k.type);case C:if(k=k._status===1?k._result:null)return R(k)}return null}var P=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;P.hasOwnProperty("ReactCurrentDispatcher")||(P.ReactCurrentDispatcher={current:null}),P.hasOwnProperty("ReactCurrentBatchConfig")||(P.ReactCurrentBatchConfig={suspense:null});var F={};function U(k,M){for(var z=0|k._threadCount;z<=M;z++)k[z]=k._currentValue2,k._threadCount=z+1}for(var V=new Uint16Array(16),ye=0;15>ye;ye++)V[ye]=ye+1;V[15]=0;var _e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ve=Object.prototype.hasOwnProperty,we={},Ne={};function Ie(k){return!!ve.call(Ne,k)||!ve.call(we,k)&&(_e.test(k)?Ne[k]=!0:(we[k]=!0,!1))}function G(k,M,z,q,B,W){this.acceptsBooleans=M===2||M===3||M===4,this.attributeName=q,this.attributeNamespace=B,this.mustUseProperty=z,this.propertyName=k,this.type=M,this.sanitizeURL=W}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(k){$[k]=new G(k,0,!1,k,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(k){var M=k[0];$[M]=new G(M,1,!1,k[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(k){$[k]=new G(k,2,!1,k.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(k){$[k]=new G(k,2,!1,k,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(k){$[k]=new G(k,3,!1,k.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(k){$[k]=new G(k,3,!0,k,null,!1)}),["capture","download"].forEach(function(k){$[k]=new G(k,4,!1,k,null,!1)}),["cols","rows","size","span"].forEach(function(k){$[k]=new G(k,6,!1,k,null,!1)}),["rowSpan","start"].forEach(function(k){$[k]=new G(k,5,!1,k.toLowerCase(),null,!1)});var Z=/[\-:]([a-z])/g;function j(k){return k[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(k){$[k]=new G(k,1,!1,k.toLowerCase(),null,!1)}),$.xlinkHref=new G("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(k){$[k]=new G(k,1,!1,k.toLowerCase(),null,!0)});var A=/["'&<>]/;function Y(k){if(typeof k=="boolean"||typeof k=="number")return""+k;k=""+k;var M=A.exec(k);if(M){var z,q="",B=0;for(z=M.index;z<k.length;z++){switch(k.charCodeAt(z)){case 34:M="&quot;";break;case 38:M="&amp;";break;case 39:M="&#x27;";break;case 60:M="&lt;";break;case 62:M="&gt;";break;default:continue}B!==z&&(q+=k.substring(B,z)),B=z+1,q+=M}k=B!==z?q+k.substring(B,z):q}return k}function se(k,M){var z,q=$.hasOwnProperty(k)?$[k]:null;return(z=k!=="style")&&(z=q!==null?q.type===0:2<k.length&&(k[0]==="o"||k[0]==="O")&&(k[1]==="n"||k[1]==="N")),z||function(B,W,te,ne){if(W==null||function(Ve,He,xe,nt){if(xe!==null&&xe.type===0)return!1;switch(typeof He){case"function":case"symbol":return!0;case"boolean":return xe!==null?!xe.acceptsBooleans:(Ve=Ve.toLowerCase().slice(0,5))!=="data-"&&Ve!=="aria-";default:return!1}}(B,W,te))return!0;if(te!==null)switch(te.type){case 3:return!W;case 4:return W===!1;case 5:return isNaN(W);case 6:return isNaN(W)||1>W}return!1}(k,M,q)?"":q!==null?(k=q.attributeName,(z=q.type)===3||z===4&&M===!0?k+'=""':(q.sanitizeURL&&(M=""+M),k+'="'+Y(M)+'"')):Ie(k)?k+'="'+Y(M)+'"':""}var ee=null,me=null,H=null,re=!1,ge=!1,ue=null,pe=0;function I(){if(ee===null)throw s(Error(321));return ee}function L(){if(0<pe)throw s(Error(312));return{memoizedState:null,queue:null,next:null}}function ae(){return H===null?me===null?(re=!1,me=H=L()):(re=!0,H=me):H.next===null?(re=!1,H=H.next=L()):(re=!0,H=H.next),H}function ce(k,M,z,q){for(;ge;)ge=!1,pe+=1,H=null,z=k(M,q);return me=ee=null,pe=0,H=ue=null,z}function oe(k,M){return typeof M=="function"?M(k):M}function Re(k,M,z){if(ee=I(),H=ae(),re){var q=H.queue;if(M=q.dispatch,ue!==null&&(z=ue.get(q))!==void 0){ue.delete(q),q=H.memoizedState;do q=k(q,z.action),z=z.next;while(z!==null);return H.memoizedState=q,[q,M]}return[H.memoizedState,M]}return k=k===oe?typeof M=="function"?M():M:z!==void 0?z(M):M,H.memoizedState=k,k=(k=H.queue={last:null,dispatch:null}).dispatch=Qe.bind(null,ee,k),[H.memoizedState,k]}function Qe(k,M,z){if(!(25>pe))throw s(Error(301));if(k===ee)if(ge=!0,k={action:z,next:null},ue===null&&(ue=new Map),(z=ue.get(M))===void 0)ue.set(M,k);else{for(M=z;M.next!==null;)M=M.next;M.next=k}}function Xe(){}var ke=0,$e={readContext:function(k){var M=ke;return U(k,M),k[M]},useContext:function(k){I();var M=ke;return U(k,M),k[M]},useMemo:function(k,M){if(ee=I(),M=M===void 0?null:M,(H=ae())!==null){var z=H.memoizedState;if(z!==null&&M!==null){e:{var q=z[1];if(q===null)q=!1;else{for(var B=0;B<q.length&&B<M.length;B++){var W=M[B],te=q[B];if((W!==te||W===0&&1/W!=1/te)&&(W==W||te==te)){q=!1;break e}}q=!0}}if(q)return z[0]}}return k=k(),H.memoizedState=[k,M],k},useReducer:Re,useRef:function(k){ee=I();var M=(H=ae()).memoizedState;return M===null?(k={current:k},H.memoizedState=k):M},useState:function(k){return Re(oe,k)},useLayoutEffect:function(){},useCallback:function(k){return k},useImperativeHandle:Xe,useEffect:Xe,useDebugValue:Xe,useResponder:function(k,M){return{props:M,responder:k}}},yt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ot(k){switch(k){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var tr={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Br=a({menuitem:!0},tr),Zt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zr=["Webkit","ms","Moz","O"];Object.keys(Zt).forEach(function(k){zr.forEach(function(M){M=M+k.charAt(0).toUpperCase()+k.substring(1),Zt[M]=Zt[k]})});var Wr=/([A-Z])/g,Qr=/^ms-/,Lt=o.Children.toArray,Tn=P.ReactCurrentDispatcher,Hr={listing:!0,pre:!0,textarea:!0},Gr=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,nr={},Cn={},Yr=Object.prototype.hasOwnProperty,rr={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ir(k,M){if(k===void 0)throw s(Error(152),R(M)||"Component")}function ar(k,M,z){function q(te,ne){var Ve=ne.prototype&&ne.prototype.isReactComponent,He=function(Ue,mt,It,Rt){if(Rt&&typeof(Rt=Ue.contextType)=="object"&&Rt!==null)return U(Rt,It),Rt[It];if(Ue=Ue.contextTypes){for(var lr in It={},Ue)It[lr]=mt[lr];mt=It}else mt=F;return mt}(ne,M,z,Ve),xe=[],nt=!1,Ge={isMounted:function(){return!1},enqueueForceUpdate:function(){if(xe===null)return null},enqueueReplaceState:function(Ue,mt){nt=!0,xe=[mt]},enqueueSetState:function(Ue,mt){if(xe===null)return null;xe.push(mt)}},be=void 0;if(Ve)be=new ne(te.props,He,Ge),typeof ne.getDerivedStateFromProps=="function"&&(Ve=ne.getDerivedStateFromProps.call(null,te.props,be.state))!=null&&(be.state=a({},be.state,Ve));else if(ee={},be=ne(te.props,He,Ge),(be=ce(ne,te.props,be,He))==null||be.render==null)return void ir(k=be,ne);if(be.props=te.props,be.context=He,be.updater=Ge,(Ge=be.state)===void 0&&(be.state=Ge=null),typeof be.UNSAFE_componentWillMount=="function"||typeof be.componentWillMount=="function")if(typeof be.componentWillMount=="function"&&typeof ne.getDerivedStateFromProps!="function"&&be.componentWillMount(),typeof be.UNSAFE_componentWillMount=="function"&&typeof ne.getDerivedStateFromProps!="function"&&be.UNSAFE_componentWillMount(),xe.length){Ge=xe;var Ye=nt;if(xe=null,nt=!1,Ye&&Ge.length===1)be.state=Ge[0];else{Ve=Ye?Ge[0]:be.state;var dt=!0;for(Ye=Ye?1:0;Ye<Ge.length;Ye++){var rt=Ge[Ye];(rt=typeof rt=="function"?rt.call(be,Ve,te.props,He):rt)!=null&&(dt?(dt=!1,Ve=a({},Ve,rt)):a(Ve,rt))}be.state=Ve}}else xe=null;if(ir(k=be.render(),ne),te=void 0,typeof be.getChildContext=="function"&&typeof(He=ne.childContextTypes)=="object"){for(var mn in te=be.getChildContext())if(!(mn in He))throw s(Error(108),R(ne)||"Unknown",mn)}te&&(M=a({},M,te))}for(;o.isValidElement(k);){var B=k,W=B.type;if(typeof W!="function")break;q(B,W)}return{child:k,context:M}}var or=function(){function k(M,z){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");o.isValidElement(M)?M.type!==l?M=[M]:(M=M.props.children,M=o.isValidElement(M)?[M]:Lt(M)):M=Lt(M),M={type:null,domNamespace:yt.html,children:M,childIndex:0,context:F,footer:""};var q=V[0];if(q===0){var B=V,W=2*(q=B.length);if(!(65536>=W))throw s(Error(304));var te=new Uint16Array(W);for(te.set(B),(V=te)[0]=q+1,B=q;B<W-1;B++)V[B]=B+1;V[W-1]=0}else V[0]=V[q];this.threadID=q,this.stack=[M],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=z,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return k.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var M=this.threadID;V[M]=V[0],V[0]=M}},k.prototype.pushProvider=function(M){var z=++this.contextIndex,q=M.type._context,B=this.threadID;U(q,B);var W=q[B];this.contextStack[z]=q,this.contextValueStack[z]=W,q[B]=M.props.value},k.prototype.popProvider=function(){var M=this.contextIndex,z=this.contextStack[M],q=this.contextValueStack[M];this.contextStack[M]=null,this.contextValueStack[M]=null,this.contextIndex--,z[this.threadID]=q},k.prototype.clearProviders=function(){for(var M=this.contextIndex;0<=M;M--)this.contextStack[M][this.threadID]=this.contextValueStack[M]},k.prototype.read=function(M){if(this.exhausted)return null;var z=ke;ke=this.threadID;var q=Tn.current;Tn.current=$e;try{for(var B=[""],W=!1;B[0].length<M;){if(this.stack.length===0){this.exhausted=!0;var te=this.threadID;V[te]=V[0],V[0]=te;break}var ne=this.stack[this.stack.length-1];if(W||ne.childIndex>=ne.children.length){var Ve=ne.footer;if(Ve!==""&&(this.previousWasTextNode=!1),this.stack.pop(),ne.type==="select")this.currentSelectValue=null;else if(ne.type!=null&&ne.type.type!=null&&ne.type.type.$$typeof===g)this.popProvider(ne.type);else if(ne.type===S){this.suspenseDepth--;var He=B.pop();if(W){W=!1;var xe=ne.fallbackFrame;if(!xe)throw s(Error(303));this.stack.push(xe),B[this.suspenseDepth]+="<!--$!-->";continue}B[this.suspenseDepth]+=He}B[this.suspenseDepth]+=Ve}else{var nt=ne.children[ne.childIndex++],Ge="";try{Ge+=this.render(nt,ne.context,ne.domNamespace)}catch(be){throw be}B.length<=this.suspenseDepth&&B.push(""),B[this.suspenseDepth]+=Ge}}return B[0]}finally{Tn.current=q,ke=z}},k.prototype.render=function(M,z,q){if(typeof M=="string"||typeof M=="number")return(q=""+M)==""?"":this.makeStaticMarkup?Y(q):this.previousWasTextNode?"<!-- -->"+Y(q):(this.previousWasTextNode=!0,Y(q));if(M=(z=ar(M,z,this.threadID)).child,z=z.context,M===null||M===!1)return"";if(!o.isValidElement(M)){if(M!=null&&M.$$typeof!=null)throw(q=M.$$typeof)===u?s(Error(257)):s(Error(258),q.toString());return M=Lt(M),this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:z,footer:""}),""}var B=M.type;if(typeof B=="string")return this.renderDOM(M,z,q);switch(B){case d:case w:case f:case _:case l:return M=Lt(M.props.children),this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:z,footer:""}),"";case S:throw s(Error(294))}if(typeof B=="object"&&B!==null)switch(B.$$typeof){case T:ee={};var W=B.render(M.props,M.ref);return W=ce(B.render,M.props,W,M.ref),W=Lt(W),this.stack.push({type:null,domNamespace:q,children:W,childIndex:0,context:z,footer:""}),"";case y:return M=[o.createElement(B.type,a({ref:M.ref},M.props))],this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:z,footer:""}),"";case g:return q={type:M,domNamespace:q,children:B=Lt(M.props.children),childIndex:0,context:z,footer:""},this.pushProvider(M),this.stack.push(q),"";case x:B=M.type,W=M.props;var te=this.threadID;return U(B,te),B=Lt(W.children(B[te])),this.stack.push({type:M,domNamespace:q,children:B,childIndex:0,context:z,footer:""}),"";case O:throw s(Error(338));case C:throw s(Error(295))}throw s(Error(130),B==null?B:typeof B,"")},k.prototype.renderDOM=function(M,z,q){var B=M.type.toLowerCase();if(!nr.hasOwnProperty(B)){if(!Gr.test(B))throw s(Error(65),B);nr[B]=!0}var W=M.props;if(B==="input")W=a({type:void 0},W,{defaultChecked:void 0,defaultValue:void 0,value:W.value!=null?W.value:W.defaultValue,checked:W.checked!=null?W.checked:W.defaultChecked});else if(B==="textarea"){var te=W.value;if(te==null){te=W.defaultValue;var ne=W.children;if(ne!=null){if(te!=null)throw s(Error(92));if(Array.isArray(ne)){if(!(1>=ne.length))throw s(Error(93));ne=ne[0]}te=""+ne}te==null&&(te="")}W=a({},W,{value:void 0,children:""+te})}else if(B==="select")this.currentSelectValue=W.value!=null?W.value:W.defaultValue,W=a({},W,{value:void 0});else if(B==="option"){ne=this.currentSelectValue;var Ve=function(mt){if(mt==null)return mt;var It="";return o.Children.forEach(mt,function(Rt){Rt!=null&&(It+=Rt)}),It}(W.children);if(ne!=null){var He=W.value!=null?W.value+"":Ve;if(te=!1,Array.isArray(ne)){for(var xe=0;xe<ne.length;xe++)if(""+ne[xe]===He){te=!0;break}}else te=""+ne===He;W=a({selected:void 0,children:void 0},W,{selected:te,children:Ve})}}if(te=W){if(Br[B]&&(te.children!=null||te.dangerouslySetInnerHTML!=null))throw s(Error(137),B,"");if(te.dangerouslySetInnerHTML!=null){if(te.children!=null)throw s(Error(60));if(!(typeof te.dangerouslySetInnerHTML=="object"&&"__html"in te.dangerouslySetInnerHTML))throw s(Error(61))}if(te.style!=null&&typeof te.style!="object")throw s(Error(62),"")}for(Ue in te=W,ne=this.makeStaticMarkup,Ve=this.stack.length===1,He="<"+M.type,te)if(Yr.call(te,Ue)){var nt=te[Ue];if(nt!=null){if(Ue==="style"){xe=void 0;var Ge="",be="";for(xe in nt)if(nt.hasOwnProperty(xe)){var Ye=xe.indexOf("--")===0,dt=nt[xe];if(dt!=null){if(Ye)var rt=xe;else if(rt=xe,Cn.hasOwnProperty(rt))rt=Cn[rt];else{var mn=rt.replace(Wr,"-$1").toLowerCase().replace(Qr,"-ms-");rt=Cn[rt]=mn}Ge+=be+rt+":",be=xe,Ge+=Ye=dt==null||typeof dt=="boolean"||dt===""?"":Ye||typeof dt!="number"||dt===0||Zt.hasOwnProperty(be)&&Zt[be]?(""+dt).trim():dt+"px",be=";"}}nt=Ge||null}xe=null;e:if(Ye=B,dt=te,Ye.indexOf("-")===-1)Ye=typeof dt.is=="string";else switch(Ye){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":Ye=!1;break e;default:Ye=!0}Ye?rr.hasOwnProperty(Ue)||(xe=Ie(xe=Ue)&&nt!=null?xe+'="'+Y(nt)+'"':""):xe=se(Ue,nt),xe&&(He+=" "+xe)}}ne||Ve&&(He+=' data-reactroot=""');var Ue=He;te="",tr.hasOwnProperty(B)?Ue+="/>":(Ue+=">",te="</"+M.type+">");e:{if((ne=W.dangerouslySetInnerHTML)!=null){if(ne.__html!=null){ne=ne.__html;break e}}else if(typeof(ne=W.children)=="string"||typeof ne=="number"){ne=Y(ne);break e}ne=null}return ne!=null?(W=[],Hr[B]&&ne.charAt(0)===`
69
+ */var a=i(2),o=i(0);function s(k){for(var M=k.message,H="https://reactjs.org/docs/error-decoder.html?invariant="+M,q=1;q<arguments.length;q++)H+="&args[]="+encodeURIComponent(arguments[q]);return k.message="Minified React error #"+M+"; visit "+H+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",k}var c=typeof Symbol=="function"&&Symbol.for,u=c?Symbol.for("react.portal"):60106,l=c?Symbol.for("react.fragment"):60107,h=c?Symbol.for("react.strict_mode"):60108,f=c?Symbol.for("react.profiler"):60114,g=c?Symbol.for("react.provider"):60109,x=c?Symbol.for("react.context"):60110,w=c?Symbol.for("react.concurrent_mode"):60111,T=c?Symbol.for("react.forward_ref"):60112,O=c?Symbol.for("react.suspense"):60113,_=c?Symbol.for("react.suspense_list"):60120,y=c?Symbol.for("react.memo"):60115,C=c?Symbol.for("react.lazy"):60116,S=c?Symbol.for("react.fundamental"):60117;function R(k){if(k==null)return null;if(typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case l:return"Fragment";case u:return"Portal";case f:return"Profiler";case h:return"StrictMode";case O:return"Suspense";case _:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case x:return"Context.Consumer";case g:return"Context.Provider";case T:var M=k.render;return M=M.displayName||M.name||"",k.displayName||(M!==""?"ForwardRef("+M+")":"ForwardRef");case y:return R(k.type);case C:if(k=k._status===1?k._result:null)return R(k)}return null}var P=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;P.hasOwnProperty("ReactCurrentDispatcher")||(P.ReactCurrentDispatcher={current:null}),P.hasOwnProperty("ReactCurrentBatchConfig")||(P.ReactCurrentBatchConfig={suspense:null});var F={};function U(k,M){for(var H=0|k._threadCount;H<=M;H++)k[H]=k._currentValue2,k._threadCount=H+1}for(var V=new Uint16Array(16),ye=0;15>ye;ye++)V[ye]=ye+1;V[15]=0;var _e=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ve=Object.prototype.hasOwnProperty,we={},Ae={};function Ie(k){return!!ve.call(Ae,k)||!ve.call(we,k)&&(_e.test(k)?Ae[k]=!0:(we[k]=!0,!1))}function G(k,M,H,q,B,z){this.acceptsBooleans=M===2||M===3||M===4,this.attributeName=q,this.attributeNamespace=B,this.mustUseProperty=H,this.propertyName=k,this.type=M,this.sanitizeURL=z}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(k){$[k]=new G(k,0,!1,k,null,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(k){var M=k[0];$[M]=new G(M,1,!1,k[1],null,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(k){$[k]=new G(k,2,!1,k.toLowerCase(),null,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(k){$[k]=new G(k,2,!1,k,null,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(k){$[k]=new G(k,3,!1,k.toLowerCase(),null,!1)}),["checked","multiple","muted","selected"].forEach(function(k){$[k]=new G(k,3,!0,k,null,!1)}),["capture","download"].forEach(function(k){$[k]=new G(k,4,!1,k,null,!1)}),["cols","rows","size","span"].forEach(function(k){$[k]=new G(k,6,!1,k,null,!1)}),["rowSpan","start"].forEach(function(k){$[k]=new G(k,5,!1,k.toLowerCase(),null,!1)});var Z=/[\-:]([a-z])/g;function j(k){return k[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,null,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,"http://www.w3.org/1999/xlink",!1)}),["xml:base","xml:lang","xml:space"].forEach(function(k){var M=k.replace(Z,j);$[M]=new G(M,1,!1,k,"http://www.w3.org/XML/1998/namespace",!1)}),["tabIndex","crossOrigin"].forEach(function(k){$[k]=new G(k,1,!1,k.toLowerCase(),null,!1)}),$.xlinkHref=new G("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach(function(k){$[k]=new G(k,1,!1,k.toLowerCase(),null,!0)});var A=/["'&<>]/;function Y(k){if(typeof k=="boolean"||typeof k=="number")return""+k;k=""+k;var M=A.exec(k);if(M){var H,q="",B=0;for(H=M.index;H<k.length;H++){switch(k.charCodeAt(H)){case 34:M="&quot;";break;case 38:M="&amp;";break;case 39:M="&#x27;";break;case 60:M="&lt;";break;case 62:M="&gt;";break;default:continue}B!==H&&(q+=k.substring(B,H)),B=H+1,q+=M}k=B!==H?q+k.substring(B,H):q}return k}function se(k,M){var H,q=$.hasOwnProperty(k)?$[k]:null;return(H=k!=="style")&&(H=q!==null?q.type===0:2<k.length&&(k[0]==="o"||k[0]==="O")&&(k[1]==="n"||k[1]==="N")),H||function(B,z,te,ne){if(z==null||function(Ve,We,xe,nt){if(xe!==null&&xe.type===0)return!1;switch(typeof We){case"function":case"symbol":return!0;case"boolean":return xe!==null?!xe.acceptsBooleans:(Ve=Ve.toLowerCase().slice(0,5))!=="data-"&&Ve!=="aria-";default:return!1}}(B,z,te))return!0;if(te!==null)switch(te.type){case 3:return!z;case 4:return z===!1;case 5:return isNaN(z);case 6:return isNaN(z)||1>z}return!1}(k,M,q)?"":q!==null?(k=q.attributeName,(H=q.type)===3||H===4&&M===!0?k+'=""':(q.sanitizeURL&&(M=""+M),k+'="'+Y(M)+'"')):Ie(k)?k+'="'+Y(M)+'"':""}var ee=null,pe=null,W=null,re=!1,ge=!1,ue=null,me=0;function I(){if(ee===null)throw s(Error(321));return ee}function L(){if(0<me)throw s(Error(312));return{memoizedState:null,queue:null,next:null}}function ae(){return W===null?pe===null?(re=!1,pe=W=L()):(re=!0,W=pe):W.next===null?(re=!1,W=W.next=L()):(re=!0,W=W.next),W}function ce(k,M,H,q){for(;ge;)ge=!1,me+=1,W=null,H=k(M,q);return pe=ee=null,me=0,W=ue=null,H}function oe(k,M){return typeof M=="function"?M(k):M}function Re(k,M,H){if(ee=I(),W=ae(),re){var q=W.queue;if(M=q.dispatch,ue!==null&&(H=ue.get(q))!==void 0){ue.delete(q),q=W.memoizedState;do q=k(q,H.action),H=H.next;while(H!==null);return W.memoizedState=q,[q,M]}return[W.memoizedState,M]}return k=k===oe?typeof M=="function"?M():M:H!==void 0?H(M):M,W.memoizedState=k,k=(k=W.queue={last:null,dispatch:null}).dispatch=Qe.bind(null,ee,k),[W.memoizedState,k]}function Qe(k,M,H){if(!(25>me))throw s(Error(301));if(k===ee)if(ge=!0,k={action:H,next:null},ue===null&&(ue=new Map),(H=ue.get(M))===void 0)ue.set(M,k);else{for(M=H;M.next!==null;)M=M.next;M.next=k}}function Xe(){}var ke=0,$e={readContext:function(k){var M=ke;return U(k,M),k[M]},useContext:function(k){I();var M=ke;return U(k,M),k[M]},useMemo:function(k,M){if(ee=I(),M=M===void 0?null:M,(W=ae())!==null){var H=W.memoizedState;if(H!==null&&M!==null){e:{var q=H[1];if(q===null)q=!1;else{for(var B=0;B<q.length&&B<M.length;B++){var z=M[B],te=q[B];if((z!==te||z===0&&1/z!=1/te)&&(z==z||te==te)){q=!1;break e}}q=!0}}if(q)return H[0]}}return k=k(),W.memoizedState=[k,M],k},useReducer:Re,useRef:function(k){ee=I();var M=(W=ae()).memoizedState;return M===null?(k={current:k},W.memoizedState=k):M},useState:function(k){return Re(oe,k)},useLayoutEffect:function(){},useCallback:function(k){return k},useImperativeHandle:Xe,useEffect:Xe,useDebugValue:Xe,useResponder:function(k,M){return{props:M,responder:k}}},yt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function St(k){switch(k){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}var tr={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Br=a({menuitem:!0},tr),Zt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hr=["Webkit","ms","Moz","O"];Object.keys(Zt).forEach(function(k){Hr.forEach(function(M){M=M+k.charAt(0).toUpperCase()+k.substring(1),Zt[M]=Zt[k]})});var zr=/([A-Z])/g,Qr=/^ms-/,Lt=o.Children.toArray,Tn=P.ReactCurrentDispatcher,Wr={listing:!0,pre:!0,textarea:!0},Gr=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,nr={},Cn={},Yr=Object.prototype.hasOwnProperty,rr={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ir(k,M){if(k===void 0)throw s(Error(152),R(M)||"Component")}function ar(k,M,H){function q(te,ne){var Ve=ne.prototype&&ne.prototype.isReactComponent,We=function(Ue,pt,It,Rt){if(Rt&&typeof(Rt=Ue.contextType)=="object"&&Rt!==null)return U(Rt,It),Rt[It];if(Ue=Ue.contextTypes){for(var lr in It={},Ue)It[lr]=pt[lr];pt=It}else pt=F;return pt}(ne,M,H,Ve),xe=[],nt=!1,Ge={isMounted:function(){return!1},enqueueForceUpdate:function(){if(xe===null)return null},enqueueReplaceState:function(Ue,pt){nt=!0,xe=[pt]},enqueueSetState:function(Ue,pt){if(xe===null)return null;xe.push(pt)}},be=void 0;if(Ve)be=new ne(te.props,We,Ge),typeof ne.getDerivedStateFromProps=="function"&&(Ve=ne.getDerivedStateFromProps.call(null,te.props,be.state))!=null&&(be.state=a({},be.state,Ve));else if(ee={},be=ne(te.props,We,Ge),(be=ce(ne,te.props,be,We))==null||be.render==null)return void ir(k=be,ne);if(be.props=te.props,be.context=We,be.updater=Ge,(Ge=be.state)===void 0&&(be.state=Ge=null),typeof be.UNSAFE_componentWillMount=="function"||typeof be.componentWillMount=="function")if(typeof be.componentWillMount=="function"&&typeof ne.getDerivedStateFromProps!="function"&&be.componentWillMount(),typeof be.UNSAFE_componentWillMount=="function"&&typeof ne.getDerivedStateFromProps!="function"&&be.UNSAFE_componentWillMount(),xe.length){Ge=xe;var Ye=nt;if(xe=null,nt=!1,Ye&&Ge.length===1)be.state=Ge[0];else{Ve=Ye?Ge[0]:be.state;var dt=!0;for(Ye=Ye?1:0;Ye<Ge.length;Ye++){var rt=Ge[Ye];(rt=typeof rt=="function"?rt.call(be,Ve,te.props,We):rt)!=null&&(dt?(dt=!1,Ve=a({},Ve,rt)):a(Ve,rt))}be.state=Ve}}else xe=null;if(ir(k=be.render(),ne),te=void 0,typeof be.getChildContext=="function"&&typeof(We=ne.childContextTypes)=="object"){for(var pn in te=be.getChildContext())if(!(pn in We))throw s(Error(108),R(ne)||"Unknown",pn)}te&&(M=a({},M,te))}for(;o.isValidElement(k);){var B=k,z=B.type;if(typeof z!="function")break;q(B,z)}return{child:k,context:M}}var or=function(){function k(M,H){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");o.isValidElement(M)?M.type!==l?M=[M]:(M=M.props.children,M=o.isValidElement(M)?[M]:Lt(M)):M=Lt(M),M={type:null,domNamespace:yt.html,children:M,childIndex:0,context:F,footer:""};var q=V[0];if(q===0){var B=V,z=2*(q=B.length);if(!(65536>=z))throw s(Error(304));var te=new Uint16Array(z);for(te.set(B),(V=te)[0]=q+1,B=q;B<z-1;B++)V[B]=B+1;V[z-1]=0}else V[0]=V[q];this.threadID=q,this.stack=[M],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=H,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return k.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0,this.clearProviders();var M=this.threadID;V[M]=V[0],V[0]=M}},k.prototype.pushProvider=function(M){var H=++this.contextIndex,q=M.type._context,B=this.threadID;U(q,B);var z=q[B];this.contextStack[H]=q,this.contextValueStack[H]=z,q[B]=M.props.value},k.prototype.popProvider=function(){var M=this.contextIndex,H=this.contextStack[M],q=this.contextValueStack[M];this.contextStack[M]=null,this.contextValueStack[M]=null,this.contextIndex--,H[this.threadID]=q},k.prototype.clearProviders=function(){for(var M=this.contextIndex;0<=M;M--)this.contextStack[M][this.threadID]=this.contextValueStack[M]},k.prototype.read=function(M){if(this.exhausted)return null;var H=ke;ke=this.threadID;var q=Tn.current;Tn.current=$e;try{for(var B=[""],z=!1;B[0].length<M;){if(this.stack.length===0){this.exhausted=!0;var te=this.threadID;V[te]=V[0],V[0]=te;break}var ne=this.stack[this.stack.length-1];if(z||ne.childIndex>=ne.children.length){var Ve=ne.footer;if(Ve!==""&&(this.previousWasTextNode=!1),this.stack.pop(),ne.type==="select")this.currentSelectValue=null;else if(ne.type!=null&&ne.type.type!=null&&ne.type.type.$$typeof===g)this.popProvider(ne.type);else if(ne.type===O){this.suspenseDepth--;var We=B.pop();if(z){z=!1;var xe=ne.fallbackFrame;if(!xe)throw s(Error(303));this.stack.push(xe),B[this.suspenseDepth]+="<!--$!-->";continue}B[this.suspenseDepth]+=We}B[this.suspenseDepth]+=Ve}else{var nt=ne.children[ne.childIndex++],Ge="";try{Ge+=this.render(nt,ne.context,ne.domNamespace)}catch(be){throw be}B.length<=this.suspenseDepth&&B.push(""),B[this.suspenseDepth]+=Ge}}return B[0]}finally{Tn.current=q,ke=H}},k.prototype.render=function(M,H,q){if(typeof M=="string"||typeof M=="number")return(q=""+M)==""?"":this.makeStaticMarkup?Y(q):this.previousWasTextNode?"<!-- -->"+Y(q):(this.previousWasTextNode=!0,Y(q));if(M=(H=ar(M,H,this.threadID)).child,H=H.context,M===null||M===!1)return"";if(!o.isValidElement(M)){if(M!=null&&M.$$typeof!=null)throw(q=M.$$typeof)===u?s(Error(257)):s(Error(258),q.toString());return M=Lt(M),this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:H,footer:""}),""}var B=M.type;if(typeof B=="string")return this.renderDOM(M,H,q);switch(B){case h:case w:case f:case _:case l:return M=Lt(M.props.children),this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:H,footer:""}),"";case O:throw s(Error(294))}if(typeof B=="object"&&B!==null)switch(B.$$typeof){case T:ee={};var z=B.render(M.props,M.ref);return z=ce(B.render,M.props,z,M.ref),z=Lt(z),this.stack.push({type:null,domNamespace:q,children:z,childIndex:0,context:H,footer:""}),"";case y:return M=[o.createElement(B.type,a({ref:M.ref},M.props))],this.stack.push({type:null,domNamespace:q,children:M,childIndex:0,context:H,footer:""}),"";case g:return q={type:M,domNamespace:q,children:B=Lt(M.props.children),childIndex:0,context:H,footer:""},this.pushProvider(M),this.stack.push(q),"";case x:B=M.type,z=M.props;var te=this.threadID;return U(B,te),B=Lt(z.children(B[te])),this.stack.push({type:M,domNamespace:q,children:B,childIndex:0,context:H,footer:""}),"";case S:throw s(Error(338));case C:throw s(Error(295))}throw s(Error(130),B==null?B:typeof B,"")},k.prototype.renderDOM=function(M,H,q){var B=M.type.toLowerCase();if(!nr.hasOwnProperty(B)){if(!Gr.test(B))throw s(Error(65),B);nr[B]=!0}var z=M.props;if(B==="input")z=a({type:void 0},z,{defaultChecked:void 0,defaultValue:void 0,value:z.value!=null?z.value:z.defaultValue,checked:z.checked!=null?z.checked:z.defaultChecked});else if(B==="textarea"){var te=z.value;if(te==null){te=z.defaultValue;var ne=z.children;if(ne!=null){if(te!=null)throw s(Error(92));if(Array.isArray(ne)){if(!(1>=ne.length))throw s(Error(93));ne=ne[0]}te=""+ne}te==null&&(te="")}z=a({},z,{value:void 0,children:""+te})}else if(B==="select")this.currentSelectValue=z.value!=null?z.value:z.defaultValue,z=a({},z,{value:void 0});else if(B==="option"){ne=this.currentSelectValue;var Ve=function(pt){if(pt==null)return pt;var It="";return o.Children.forEach(pt,function(Rt){Rt!=null&&(It+=Rt)}),It}(z.children);if(ne!=null){var We=z.value!=null?z.value+"":Ve;if(te=!1,Array.isArray(ne)){for(var xe=0;xe<ne.length;xe++)if(""+ne[xe]===We){te=!0;break}}else te=""+ne===We;z=a({selected:void 0,children:void 0},z,{selected:te,children:Ve})}}if(te=z){if(Br[B]&&(te.children!=null||te.dangerouslySetInnerHTML!=null))throw s(Error(137),B,"");if(te.dangerouslySetInnerHTML!=null){if(te.children!=null)throw s(Error(60));if(!(typeof te.dangerouslySetInnerHTML=="object"&&"__html"in te.dangerouslySetInnerHTML))throw s(Error(61))}if(te.style!=null&&typeof te.style!="object")throw s(Error(62),"")}for(Ue in te=z,ne=this.makeStaticMarkup,Ve=this.stack.length===1,We="<"+M.type,te)if(Yr.call(te,Ue)){var nt=te[Ue];if(nt!=null){if(Ue==="style"){xe=void 0;var Ge="",be="";for(xe in nt)if(nt.hasOwnProperty(xe)){var Ye=xe.indexOf("--")===0,dt=nt[xe];if(dt!=null){if(Ye)var rt=xe;else if(rt=xe,Cn.hasOwnProperty(rt))rt=Cn[rt];else{var pn=rt.replace(zr,"-$1").toLowerCase().replace(Qr,"-ms-");rt=Cn[rt]=pn}Ge+=be+rt+":",be=xe,Ge+=Ye=dt==null||typeof dt=="boolean"||dt===""?"":Ye||typeof dt!="number"||dt===0||Zt.hasOwnProperty(be)&&Zt[be]?(""+dt).trim():dt+"px",be=";"}}nt=Ge||null}xe=null;e:if(Ye=B,dt=te,Ye.indexOf("-")===-1)Ye=typeof dt.is=="string";else switch(Ye){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":Ye=!1;break e;default:Ye=!0}Ye?rr.hasOwnProperty(Ue)||(xe=Ie(xe=Ue)&&nt!=null?xe+'="'+Y(nt)+'"':""):xe=se(Ue,nt),xe&&(We+=" "+xe)}}ne||Ve&&(We+=' data-reactroot=""');var Ue=We;te="",tr.hasOwnProperty(B)?Ue+="/>":(Ue+=">",te="</"+M.type+">");e:{if((ne=z.dangerouslySetInnerHTML)!=null){if(ne.__html!=null){ne=ne.__html;break e}}else if(typeof(ne=z.children)=="string"||typeof ne=="number"){ne=Y(ne);break e}ne=null}return ne!=null?(z=[],Wr[B]&&ne.charAt(0)===`
70
70
  `&&(Ue+=`
71
- `),Ue+=ne):W=Lt(W.children),M=M.type,q=q==null||q==="http://www.w3.org/1999/xhtml"?Ot(M):q==="http://www.w3.org/2000/svg"&&M==="foreignObject"?"http://www.w3.org/1999/xhtml":q,this.stack.push({domNamespace:q,type:B,children:W,childIndex:0,context:z,footer:te}),this.previousWasTextNode=!1,Ue},k}(),sr={renderToString:function(k){k=new or(k,!1);try{return k.read(1/0)}finally{k.destroy()}},renderToStaticMarkup:function(k){k=new or(k,!0);try{return k.read(1/0)}finally{k.destroy()}},renderToNodeStream:function(){throw s(Error(207))},renderToStaticNodeStream:function(){throw s(Error(208))},version:"16.9.0"},cr={default:sr},ur=cr&&sr||cr;n.exports=ur.default||ur},function(n,r,i){i.r(r);var a=i(0),o=i.n(a);function s(){return(s=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var c=function(h){return o.a.createElement("g",null,o.a.createElement("path",s({},h,{d:`M 0 100 L 33 0 L 66 0 L 100 100 L 75 100
72
- L 66 75 L 33 75 L 25 100 L 0 100`})),o.a.createElement("path",{fill:"#ffffff",d:"M 41 55 L 50 25 L 58 55 L 41 55"}))};function u(){return(u=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var l=function(h){return o.a.createElement("g",null,o.a.createElement("path",u({},h,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
71
+ `),Ue+=ne):z=Lt(z.children),M=M.type,q=q==null||q==="http://www.w3.org/1999/xhtml"?St(M):q==="http://www.w3.org/2000/svg"&&M==="foreignObject"?"http://www.w3.org/1999/xhtml":q,this.stack.push({domNamespace:q,type:B,children:z,childIndex:0,context:H,footer:te}),this.previousWasTextNode=!1,Ue},k}(),sr={renderToString:function(k){k=new or(k,!1);try{return k.read(1/0)}finally{k.destroy()}},renderToStaticMarkup:function(k){k=new or(k,!0);try{return k.read(1/0)}finally{k.destroy()}},renderToNodeStream:function(){throw s(Error(207))},renderToStaticNodeStream:function(){throw s(Error(208))},version:"16.9.0"},cr={default:sr},ur=cr&&sr||cr;n.exports=ur.default||ur},function(n,r,i){i.r(r);var a=i(0),o=i.n(a);function s(){return(s=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var c=function(d){return o.a.createElement("g",null,o.a.createElement("path",s({},d,{d:`M 0 100 L 33 0 L 66 0 L 100 100 L 75 100
72
+ L 66 75 L 33 75 L 25 100 L 0 100`})),o.a.createElement("path",{fill:"#ffffff",d:"M 41 55 L 50 25 L 58 55 L 41 55"}))};function u(){return(u=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var l=function(d){return o.a.createElement("g",null,o.a.createElement("path",u({},d,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
73
73
  C 105 50 105 100 80 100 L 00 100
74
- L 0 0`})),o.a.createElement("path",{d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15",fill:"#ffffff"}),o.a.createElement("path",{d:"M 20 65 L 70 65 C 80 65 80 85 70 85 L 20 85 L 20 65",fill:"#ffffff"}))};function d(){return(d=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var f=function(h){return o.a.createElement("path",d({},h,{d:`M 100 28 C 100 -13 0 -13 0 50
74
+ L 0 0`})),o.a.createElement("path",{d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15",fill:"#ffffff"}),o.a.createElement("path",{d:"M 20 65 L 70 65 C 80 65 80 85 70 85 L 20 85 L 20 65",fill:"#ffffff"}))};function h(){return(h=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var f=function(d){return o.a.createElement("path",h({},d,{d:`M 100 28 C 100 -13 0 -13 0 50
75
75
  C 0 113 100 113 100 72 L 75 72
76
76
  C 75 90 30 90 30 50 C 30 10 75 10 75 28
77
- L 100 28`}))};function g(){return(g=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var x=function(h){return o.a.createElement("g",null,o.a.createElement("path",g({},h,{d:`M 0 0 L 60 0 C 110 0 110 100 60 100
77
+ L 100 28`}))};function g(){return(g=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var x=function(d){return o.a.createElement("g",null,o.a.createElement("path",g({},d,{d:`M 0 0 L 60 0 C 110 0 110 100 60 100
78
78
  L 0 100 L 0 0`})),o.a.createElement("path",{fill:"#ffffff",d:`M 20 15 L 40 15 C 85 15 85 85 40 85
79
- L 20 85 L 20 15`}))};function w(){return(w=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var T=function(h){return o.a.createElement("path",w({},h,{d:`M 0 0 L 100 0 L 100 20 L 20 20 L 20 40
79
+ L 20 85 L 20 15`}))};function w(){return(w=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var T=function(d){return o.a.createElement("path",w({},d,{d:`M 0 0 L 100 0 L 100 20 L 20 20 L 20 40
80
80
  L 90 40 L 90 60 L 20 60 L 20 80 L 100 80
81
- L 100 100 L 0 100 L 0 0`}))};function S(){return(S=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var _=function(h){return o.a.createElement("path",S({},h,{d:`M 0 0 L 100 0 L 100 20 L 20 20 L 20 40
81
+ L 100 100 L 0 100 L 0 0`}))};function O(){return(O=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var _=function(d){return o.a.createElement("path",O({},d,{d:`M 0 0 L 100 0 L 100 20 L 20 20 L 20 40
82
82
  L 80 40 L 80 60 L 20 60 L 20 100 L 0 100
83
- L 0 0`}))};function y(){return(y=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var C=function(h){return o.a.createElement("path",y({},h,{d:`M 100 28 C 100 -13 0 -13 0 50 C 0 113 100 113 100 72
83
+ L 0 0`}))};function y(){return(y=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var C=function(d){return o.a.createElement("path",y({},d,{d:`M 100 28 C 100 -13 0 -13 0 50 C 0 113 100 113 100 72
84
84
  L 100 48 L 55 48 L 55 72 L 75 72 C 75 90 30 90 30 50
85
- C 30 10 75 5 75 28 L 100 28`}))};function O(){return(O=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var R=function(h){return o.a.createElement("path",O({},h,{d:`M 0 0 L 20 0 L 20 40 L 80 40 L 80 0
85
+ C 30 10 75 5 75 28 L 100 28`}))};function S(){return(S=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var R=function(d){return o.a.createElement("path",S({},d,{d:`M 0 0 L 20 0 L 20 40 L 80 40 L 80 0
86
86
  L 100 0 L 100 100 L 80 100 L 80 60
87
- L 20 60 L 20 100 L 0 100 L 0 0`}))};function P(){return(P=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var F=function(h){return o.a.createElement("path",P({},h,{d:"M 40 0 L 60 0 L 60 100 L 40 100 L 40 0"}))};function U(){return(U=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var V=function(h){return o.a.createElement("path",U({},h,{d:`M 0 60 C 0 111 100 111 100 60
87
+ L 20 60 L 20 100 L 0 100 L 0 0`}))};function P(){return(P=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var F=function(d){return o.a.createElement("path",P({},d,{d:"M 40 0 L 60 0 L 60 100 L 40 100 L 40 0"}))};function U(){return(U=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var V=function(d){return o.a.createElement("path",U({},d,{d:`M 0 60 C 0 111 100 111 100 60
88
88
  L 100 0 L 75 0 L 75 60
89
- C 80 90 20 90 25 60`}))};function ye(){return(ye=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var _e=function(h){return o.a.createElement("path",ye({},h,{d:`M 0 0 L 20 0 L 20 40 L 75 0 L 100 0
89
+ C 80 90 20 90 25 60`}))};function ye(){return(ye=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var _e=function(d){return o.a.createElement("path",ye({},d,{d:`M 0 0 L 20 0 L 20 40 L 75 0 L 100 0
90
90
  L 50 50 L 100 100 L 75 100 L 30 65
91
- L 20 75 L 20 100 L 0 100 L 0 0`}))};function ve(){return(ve=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var we=function(h){return o.a.createElement("path",ve({},h,{d:`M 0 0 L 0 100 L 100 100 L 100 80
92
- L 20 80 L 20 0 L 0 0`}))};function Ne(){return(Ne=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ie=function(h){return o.a.createElement("path",Ne({},h,{d:`M 0 0 L 20 0 L 50 35 L 80 0 L 100 0 L 100 100
91
+ L 20 75 L 20 100 L 0 100 L 0 0`}))};function ve(){return(ve=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var we=function(d){return o.a.createElement("path",ve({},d,{d:`M 0 0 L 0 100 L 100 100 L 100 80
92
+ L 20 80 L 20 0 L 0 0`}))};function Ae(){return(Ae=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Ie=function(d){return o.a.createElement("path",Ae({},d,{d:`M 0 0 L 20 0 L 50 35 L 80 0 L 100 0 L 100 100
93
93
  L 80 100 L 80 30 L 50 65 L 20 30 L 20 100
94
- L 0 100 L 0 0`}))};function G(){return(G=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var $=function(h){return o.a.createElement("path",G({},h,{d:`M 0 100 L 0 0 L 20 0 L 80 75 L 80 0
95
- L 100 0 L 100 100 L 80 100 L 20 25 L 20 100 L 0 100`}))};function Z(){return(Z=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var j=function(h){return o.a.createElement("g",null,o.a.createElement("circle",Z({cx:"50",cy:"50",r:"50"},h)),o.a.createElement("circle",{cx:"50",cy:"50",r:"32",fill:"#ffffff"}))};function A(){return(A=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Y=function(h){return o.a.createElement("g",null,o.a.createElement("path",A({},h,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
96
- L 20 50 L 20 100 L 0 100 L 0 0`})),o.a.createElement("path",{fill:"#ffffff",d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15"}))};function se(){return(se=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ee=function(h){return o.a.createElement("g",null,o.a.createElement("circle",se({cx:"50",cy:"50",r:"50"},h)),o.a.createElement("circle",{cx:"50",cy:"50",r:"32",fill:"#ffffff"}),o.a.createElement("path",se({d:"M 85 100 L 55 70 L 70 55 L 100 85 L 85 100"},h)))};function me(){return(me=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var H=function(h){return o.a.createElement("g",null,o.a.createElement("path",me({},h,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
94
+ L 0 100 L 0 0`}))};function G(){return(G=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var $=function(d){return o.a.createElement("path",G({},d,{d:`M 0 100 L 0 0 L 20 0 L 80 75 L 80 0
95
+ L 100 0 L 100 100 L 80 100 L 20 25 L 20 100 L 0 100`}))};function Z(){return(Z=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var j=function(d){return o.a.createElement("g",null,o.a.createElement("circle",Z({cx:"50",cy:"50",r:"50"},d)),o.a.createElement("circle",{cx:"50",cy:"50",r:"32",fill:"#ffffff"}))};function A(){return(A=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Y=function(d){return o.a.createElement("g",null,o.a.createElement("path",A({},d,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
96
+ L 20 50 L 20 100 L 0 100 L 0 0`})),o.a.createElement("path",{fill:"#ffffff",d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15"}))};function se(){return(se=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ee=function(d){return o.a.createElement("g",null,o.a.createElement("circle",se({cx:"50",cy:"50",r:"50"},d)),o.a.createElement("circle",{cx:"50",cy:"50",r:"32",fill:"#ffffff"}),o.a.createElement("path",se({d:"M 85 100 L 55 70 L 70 55 L 100 85 L 85 100"},d)))};function pe(){return(pe=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var W=function(d){return o.a.createElement("g",null,o.a.createElement("path",pe({},d,{d:`M 0 0 L 80 0 C 105 0 105 50 80 50
97
97
  C 100 50 100 70 100 70 L 100 100 L 80 100
98
98
  L 80 80 C 80 80 80 60 50 60 L 20 60
99
- L 20 100 L 0 100 L 0 0`})),o.a.createElement("path",{fill:"#ffffff",d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15"}))},re=function(h){var m=h.fill,v=h.fillOpacity;return o.a.createElement("path",{fill:"#ffffff",stroke:m,strokeOpacity:v,strokeWidth:"18",d:"M92 26 A43 20 0 1 0 43 46 A42 23 0 1 1 9 68"})};function ge(){return(ge=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ue=function(h){return o.a.createElement("path",ge({},h,{d:`M 0 0 L 0 20 L 35 20 L 35 100
99
+ L 20 100 L 0 100 L 0 0`})),o.a.createElement("path",{fill:"#ffffff",d:"M 20 15 L 70 15 C 80 15 80 35 70 35 L 20 35 L 20 15"}))},re=function(d){var p=d.fill,v=d.fillOpacity;return o.a.createElement("path",{fill:"#ffffff",stroke:p,strokeOpacity:v,strokeWidth:"18",d:"M92 26 A43 20 0 1 0 43 46 A42 23 0 1 1 9 68"})};function ge(){return(ge=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ue=function(d){return o.a.createElement("path",ge({},d,{d:`M 0 0 L 0 20 L 35 20 L 35 100
100
100
  L 65 100 L 65 20 L 100 20
101
- L 100 0 L 0 0`}))};function pe(){return(pe=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var I=function(h){return o.a.createElement("path",pe({},h,{d:`M 0 0 L 0 60 C 0 111 100 111 100 60
101
+ L 100 0 L 0 0`}))};function me(){return(me=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var I=function(d){return o.a.createElement("path",me({},d,{d:`M 0 0 L 0 60 C 0 111 100 111 100 60
102
102
  L 100 0 L 75 0 L 75 60
103
- C 80 90 20 90 25 60 L 25 0 L 0 0`}))};function L(){return(L=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ae=function(h){return o.a.createElement("path",L({},h,{d:`M 0 0 L 20 0 L 50 80 L 80 0
104
- L 100 0 L 60 100 L 40 100 L 0 0`}))};function ce(){return(ce=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var oe=function(h){return o.a.createElement("path",ce({},h,{d:`M 0 0 L 20 0 L 30 70 L 50 30 L 70 70 L 80 0
103
+ C 80 90 20 90 25 60 L 25 0 L 0 0`}))};function L(){return(L=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ae=function(d){return o.a.createElement("path",L({},d,{d:`M 0 0 L 20 0 L 50 80 L 80 0
104
+ L 100 0 L 60 100 L 40 100 L 0 0`}))};function ce(){return(ce=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var oe=function(d){return o.a.createElement("path",ce({},d,{d:`M 0 0 L 20 0 L 30 70 L 50 30 L 70 70 L 80 0
105
105
  L 100 0 L 90 100 L 70 100 L 50 65 L 30 100
106
- L 10 100 L 0 0`}))};function Re(){return(Re=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Qe=function(h){return o.a.createElement("path",Re({},h,{d:`M 0 0 L 20 0 L 50 40 L 80 0 L 100 0 L 70 50
106
+ L 10 100 L 0 0`}))};function Re(){return(Re=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Qe=function(d){return o.a.createElement("path",Re({},d,{d:`M 0 0 L 20 0 L 50 40 L 80 0 L 100 0 L 70 50
107
107
  L 100 100 L 80 100 L 50 60 L 20 100 L 0 100
108
- L 30 50 L 0 0`}))};function Xe(){return(Xe=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ke=function(h){return o.a.createElement("path",Xe({},h,{d:`M 0 0 L 20 0 L 50 45 L 80 0 L 100 0
109
- L 60 60 L 60 100 L 40 100 L 40 60 L 0 0`}))};function $e(){return($e=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var yt=function(h){return o.a.createElement("path",$e({},h,{d:`M 0 0 L 100 0 L 100 20 L 35 80 L 100 80
108
+ L 30 50 L 0 0`}))};function Xe(){return(Xe=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ke=function(d){return o.a.createElement("path",Xe({},d,{d:`M 0 0 L 20 0 L 50 45 L 80 0 L 100 0
109
+ L 60 60 L 60 100 L 40 100 L 40 60 L 0 0`}))};function $e(){return($e=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var yt=function(d){return o.a.createElement("path",$e({},d,{d:`M 0 0 L 100 0 L 100 20 L 35 80 L 100 80
110
110
  L 100 100 L 0 100 L 0 80 L 65 20 L 0 20
111
- L 0 0`}))};function Ot(){return(Ot=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var tr=function(h){return o.a.createElement("g",null,o.a.createElement("path",Ot({d:"M 10 20 C 5 -5 95 -10 100 35 L 100 100 L 80 100 L 80 90 C 90 105 10 105 0 80 C 0 45 40 40 60 45 L 80 50 C 95 30 40 5 10 35"},h)),o.a.createElement("path",{fill:"#ffffff",d:"M 77 70 C 70 90 30 90 22 80 C 10 50 80 60 77 70"}))};function Br(){return(Br=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Zt=function(h){return o.a.createElement("g",null,o.a.createElement("path",Br({d:"M 20 0 L 0 0 L 0 100 L 20 100 L 20 80 C 10 110 90 110 100 70 L 100 60 C 90 10 10 10 20 40 L 20 40 L 20 0"},h)),o.a.createElement("path",{d:"M 79 60 C 80 95 20 95 20 65 C 20 30 80 30 79 65",fill:"#ffffff"}))};function zr(){return(zr=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Wr=function(h){return o.a.createElement("g",null,o.a.createElement("path",zr({d:"M 80 0 L 100 0 L 100 100 L 80 100 L 80 80 C 90 110 10 110 0 70 L 0 60 C 10 10 90 10 80 40 L 80 40 L 80 0"},h)),o.a.createElement("path",{d:"M 79 60 C 80 95 20 95 20 65 C 20 30 80 30 79 65",fill:"#ffffff"}))};function Qr(){return(Qr=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Lt=function(h){return o.a.createElement("g",null,o.a.createElement("path",Qr({d:"M 25 50 L 100 50 C 85 -17 15 -17 0 50 C 0 75 25 100 50 100 L 95 100 L 95 80 L 50 80 Q 25 70 25 50"},h)),o.a.createElement("path",{d:"M 33 37 L 68 37 C 58 10 42 10 33 37",fill:"#ffffff"}))};function Tn(){return(Tn=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Hr=function(h){return o.a.createElement("path",Tn({d:"M 95 32 C 80 -17 20 -5 20 37 L 7 37 L 7 50 L 20 50 L 20 100 L 45 100 L 45 50 L 57 50 L 57 37 L 45 37 C 45 10 70 10 75 32 L 95 32"},h))};function Gr(){return(Gr=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var nr=function(h){return o.a.createElement("g",null,o.a.createElement("path",Gr({d:"M 100 15 L 100 0 L 80 0 L 80 15 C 85 -8 15 -8 0 25 C 2 75 80 75 80 50 L 75 65 C 65 85 45 85 10 75 L 10 90 C 25 110 85 110 100 75 L 100 25"},h)),o.a.createElement("path",{d:"M 67 30 C 70 10 25 10 27 30 C 25 50 70 50 67 30",fill:"#ffffff"}))};function Cn(){return(Cn=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Yr=function(h){return o.a.createElement("path",Cn({d:"M 0 0 L 0 100 L 20 100 L 20 80 C 20 40 80 40 80 80 L 80 100 L 100 100 L 100 50 C 80 20 20 20 20 45 L 20 0 L 0 0"},h))};function rr(){return(rr=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ir=function(h){return o.a.createElement("g",null,o.a.createElement("rect",rr({},h,{x:40,y:20,width:20,height:80})),o.a.createElement("rect",rr({},h,{x:40,y:0,width:20,height:15})))};function ar(){return(ar=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var or=function(h){return o.a.createElement("g",null,o.a.createElement("path",ar({d:"M 0 60 C 0 115 100 115 100 60 L 100 20 L 80 20 L 80 60 C 80 90 20 90 25 60"},h)),o.a.createElement("rect",ar({x:80,width:20,height:15},h)))};function sr(){return(sr=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var cr=function(h){return o.a.createElement("path",sr({d:"M 0 0 L 20 0 L 20 60 L 75 30 L 100 30 L 50 65 L 100 100 L 75 100 L 27 80 L 20 85 L 20 100 L 0 100 L 0 0"},h))};function ur(){return(ur=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var k=function(h){return o.a.createElement("rect",ur({x:40,y:0,width:20,height:100},h))};function M(){return(M=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var z=function(h){return o.a.createElement("path",M({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 20 40 20 40 50 L 40 100 L 60 100 L 60 50 C 60 20 80 20 80 50 L 80 100 L 100 100 L 100 50 C 100 -10 40 -10 50 50 C 50 -5 20 -5 20 20 L 20 0 L 0 0"},h))};function q(){return(q=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var B=function(h){return o.a.createElement("path",q({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 0 80 0 80 50 L 80 100 L 100 100 L 100 25 C 80 -10 20 -10 20 20 L 20 0 L 0 0"},h))};function W(){return(W=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var te=function(h){return o.a.createElement("g",null,o.a.createElement("path",W({d:"M 20 100 L 0 100 L 0 0 L 20 0 L 20 20 C 10 -10 90 -10 100 30 L 100 40 C 90 90 10 90 20 60 L 20 60 L 20 100"},h)),o.a.createElement("path",{d:"M 79 40 C 80 5 20 5 20 35 C 20 70 80 70 79 35",fill:"#ffffff"}))};function ne(){return(ne=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ve=function(h){return o.a.createElement("g",null,o.a.createElement("path",ne({d:"M 80 100 L 100 100 L 100 0 L 80 0 L 80 20 C 90 -10 10 -10 0 30 L 0 40 C 10 90 90 90 80 60 L 80 60 L 80 100"},h)),o.a.createElement("path",{d:"M 79 40 C 80 5 20 5 20 35 C 20 70 80 70 79 35",fill:"#ffffff"}))};function He(){return(He=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var xe=function(h){return o.a.createElement("path",He({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 0 80 0 80 50 L 100 50 L 100 25 C 80 -10 20 -10 20 20 L 20 0 L 0 0"},h))};function nt(){return(nt=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ge=function(h){return o.a.createElement("path",nt({d:"M 95 68 C 80 117 20 105 20 63 L 20 47 L 7 47 L 7 27 L 20 27 L 20 0 L 45 0 L 45 27 L 57 27 L 57 47 L 45 47 L 45 63 C 45 90 70 90 75 68 L 95 68"},h))};function be(){return(be=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ye=function(h){return o.a.createElement("g",null,o.a.createElement("path",be({d:"M 0 0 L 0 60 C 0 111 100 111 100 60 L 100 0 L 75 0 L 75 60 C 80 90 20 90 25 60 L 25 0 L 0 0"},h)),o.a.createElement("rect",be({},h,{x:75,y:0,height:100,width:25})))};function dt(){return(dt=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var rt=function(h){return o.a.createElement("path",dt({d:"M 0 0 L 25 0 L 50 36 L 75 0 L 100 0 L 40 100 L 12 100 L 37 55 L 0 0"},h))};function mn(){return(mn=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ue=function(h){return o.a.createElement("path",mn({},h,{d:"M 0 80 L 0 100 L 100 100 L 100 80 L 68 80 L 68 0 L 32 0 L 0 15 L 0 40 L 32 25 L 32 80 L 0 80"}))};function mt(){return(mt=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var It=function(h){return o.a.createElement("path",mt({},h,{d:"M 0 25 C 20 -8 80 -8 100 25 C 100 90 30 50 20 85 L 100 85 L 100 100 L 0 100 L 0 70 C 10 40 75 70 75 25 C 70 10 30 10 25 28 L 0 25"}))};function Rt(){return(Rt=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var lr=function(h){return o.a.createElement("path",Rt({},h,{d:"M 0 35 L 0 25 C 20 -8 80 -8 100 25 C 100 30 100 50 75 50 C 100 50 100 70 100 75 C 80 108 20 108 0 75 L 0 65 L 25 65 L 25 75 C 30 88 70 88 75 75 C 75 68 75 65 47 58 L 47 42 C 75 32 75 35 75 25 C 70 12 30 12 25 25 L 25 35"}))};function Go(){return(Go=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Yo=function(h){return o.a.createElement("path",Go({},h,{d:"M 50 0 L 0 50 L 0 70 L 50 70 L 50 100 L 75 100 L 75 70 L 100 70 L 100 50 L 75 50 L 75 0 L 50 15 L 50 50 L 30 50 L 75 0 L 50 0"}))};function Ko(){return(Ko=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Xo=function(h){return o.a.createElement("path",Ko({},h,{d:"M 95 20 L 100 0 L 10 0 L 0 60 L 25 60 C 30 45 90 50 75 77 C 66 87 30 90 26 72 L 0 80 C 20 110 80 110 100 70 C 100 25 10 25 25 40 L 30 20 L 95 20"}))};function Jo(){return(Jo=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Zo=function(h){return o.a.createElement("path",Jo({},h,{d:"M 50 0 C -40 70 10 100 50 100 C 90 100 100 80 100 55 C 80 30 30 30 35 50 L 30 60 C 80 50 80 85 50 80 C 10 80 48 10 90 0 L 50 0"}))};function es(){return(es=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ts=function(h){return o.a.createElement("path",es({},h,{d:"M 0 0 L 100 0 L 50 100 L 20 100 L 60 20 L 0 20 L 0 0"}))};function Hi(){return(Hi=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ns=function(h){return o.a.createElement("g",null,o.a.createElement("path",Hi({},h,{d:"M 0 35 L 0 25 C 20 -8 80 -8 100 25 C 100 30 100 50 75 50 C 100 50 100 70 100 75 C 80 108 20 108 0 75 L 0 65 L 25 65 L 25 75 C 30 88 70 88 75 75 C 75 68 75 65 47 58 L 47 42 C 75 32 75 35 75 25 C 70 12 30 12 25 25 L 25 35"})),o.a.createElement("path",Hi({},h,{d:"M 100 35 L 100 25 C 80 -8 20 -8 0 25 C 0 30 0 50 25 50 C 0 50 0 70 0 75 C 20 108 80 108 100 75 L 100 65 L 75 65 L 75 75 C 70 88 30 88 25 75 C 25 68 25 65 53 58 L 53 42 C 25 32 25 35 25 25 C 30 12 70 12 75 25 L 75 35"})))};function rs(){return(rs=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var is=function(h){return o.a.createElement("path",rs({},h,{d:"M 50 100 C 140 30 90 0 50 0 C 10 0 0 20 0 45 C 20 70 70 70 65 50 L 70 40 C 20 50 20 15 50 20 C 90 20 52 90 10 100 L 50 100"}))},Gi=[{component:c,regex:"A",color:"red"},{component:l,regex:"B",color:"maroon"},{component:f,regex:"C",color:"blue"},{component:x,regex:"D",color:"green"},{component:T,regex:"E",color:"olive"},{component:_,regex:"F",color:"navy"},{component:C,regex:"G",color:"orange"},{component:R,regex:"H",color:"teal"},{component:F,regex:"I",color:"cadetblue"},{component:V,regex:"J",color:"lavender"},{component:_e,regex:"K",color:"chocolate"},{component:we,regex:"L",color:"coral"},{component:Ie,regex:"M",color:"darkolivegreen"},{component:$,regex:"N",color:"darkorange"},{component:j,regex:"O",color:"gold"},{component:Y,regex:"P",color:"darkorchid"},{component:ee,regex:"Q",color:"darkslateblue"},{component:H,regex:"R",color:"firebrick"},{component:re,regex:"S",color:"darkslategrey"},{component:ue,regex:"T",color:"#228b22"},{component:I,regex:"U",color:"seagreen"},{component:ae,regex:"V",color:"indigo"},{component:oe,regex:"W",color:"mediumseagreen"},{component:Qe,regex:"X",color:"black"},{component:ke,regex:"Y",color:"palevioletred"},{component:yt,regex:"Z",color:"peru"},{component:tr,regex:"a",color:"red"},{component:Zt,regex:"b",color:"maroon"},{component:f,regex:"c",color:"purple"},{component:Wr,regex:"d",color:"green"},{component:Lt,regex:"e",color:"olive"},{component:Hr,regex:"f",color:"navy"},{component:nr,regex:"g",color:"orange"},{component:Yr,regex:"h",color:"teal"},{component:ir,regex:"i",color:"cadetblue"},{component:or,regex:"j",color:"lavender"},{component:cr,regex:"k",color:"chocolate"},{component:k,regex:"l",color:"coral"},{component:z,regex:"m",color:"darkolivegreen"},{component:B,regex:"n",color:"darkorange"},{component:j,regex:"o",color:"gold"},{component:te,regex:"p",color:"darkorchid"},{component:Ve,regex:"q",color:"darkslateblue"},{component:xe,regex:"r",color:"firebrick"},{component:re,regex:"s",color:"darkslategrey"},{component:Ge,regex:"t",color:"#228b22"},{component:Ye,regex:"u",color:"seagreen"},{component:ae,regex:"v",color:"indigo"},{component:oe,regex:"w",color:"mediumseagreen"},{component:Qe,regex:"x",color:"black"},{component:rt,regex:"y",color:"palevioletred"},{component:yt,regex:"z",color:"peru"},{component:j,regex:"0",color:"indianred"},{component:Ue,regex:"1",color:"red"},{component:It,regex:"2",color:"green"},{component:lr,regex:"3",color:"purple"},{component:Yo,regex:"4",color:"navy"},{component:Xo,regex:"5",color:"teal"},{component:Zo,regex:"6",color:"gold"},{component:ts,regex:"7",color:"olive"},{component:ns,regex:"8",color:"slate"},{component:is,regex:"9",color:"firebrick"}],kf=o.a.forwardRef(function(h,m){var v=h.ppm,b=h.pfm,Q=h.scale,de=h.startpos,fe=h.mode;return o.a.createElement(_n,{ppm:v,alphabet:Gi,scale:Q,mode:fe,startpos:de,pfm:b,ref:m})});function Kr(h){return function(m){if(Array.isArray(m)){for(var v=0,b=new Array(m.length);v<m.length;v++)b[v]=m[v];return b}}(h)||function(m){if(Symbol.iterator in Object(m)||Object.prototype.toString.call(m)==="[object Arguments]")return Array.from(m)}(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Yi,as=function(h,m){for(var v=(""+h).length,b=h+1;b<h+m;++b)(""+b).length>v&&(v=(""+b).length);return v},os=(Yi={},Gi.forEach(function(h){Yi[h.regex]=h}),Yi),Ki=function(h){return h.map(function(m){if(m.regex.length===1)return Object.assign({},m,{component:os[m.regex].component});for(var v=(m.color&&m.color.map&&m.color.length>=1?m.color[0]:m.color)||"#000000",b=Object.assign({},m,{component:[],color:m.color&&m.color.map&&m.color.length===m.regex.length?m.color:[]}),Q=0;Q<b.regex.length;++Q)b.component.push(os[b.regex[Q]].component),b.color.length===Q&&b.color.push(v);return b})},ss=function(h){return h.map(function(m,v){return v}).sort(function(m,v){return h[m]<h[v]?-1:h[m]===h[v]?0:1})},Xr=function(h){return Kr(Array(Math.floor(h)).keys())},Df=function(h){var m=0;return h.filter(function(v){return v>0}).forEach(function(v){m+=v}),m},Mf=function(h){return h.reduce(function(m,v){return[].concat(Kr(m),Kr(h.reduce(function(b,Q){return[].concat(Kr(b),[{component:[v.component,Q.component],color:[v.color,Q.color],regex:v.regex+Q.regex}])},[])))},[])};function Lf(h){return function(m){if(Array.isArray(m)){for(var v=0,b=new Array(m.length);v<m.length;v++)b[v]=m[v];return b}}(h)||function(m){if(Symbol.iterator in Object(m)||Object.prototype.toString.call(m)==="[object Arguments]")return Array.from(m)}(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var cs=function(h,m,v){for(var b=[],Q=Math.max.apply(Math,Lf(v.map(function(fe){return fe.length}))),de=0;de<Q;++de)b.push(h.map(function(fe){return 0}));return v.forEach(function(fe){for(var Oe=0;Oe<fe.length;++Oe)++b[Oe][m[fe[Oe]]]}),{count:v.length,pfm:b}},If=function(h,m){var v={},b=[];return h.forEach(function(Q,de){v[Q.regex]=de}),m.split(`
112
- `).forEach(function(Q){Q[0]===">"?b.push(""):b[b.length-1]+=Q.trim()}),cs(h,v,b)},Rf=function(h,m){var v={};return h.forEach(function(b,Q){v[b.regex]=Q}),cs(h,v,m.split(`
113
- `).map(function(b){return b.trim()}))},us=function(h){var m=h.yscale,v=h.inverted,b=h.xscale,Q=h.children,de=m*(v?-1:1);return o.a.createElement("g",{transform:"scale("+b+","+de+")"},Q)};function Xi(){return(Xi=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ls=function(h){var m=h.height,v=h.width,b=h.indices,Q=h.alphabet,de=h.lv,fe=h.transform,Oe=h.alpha,Ze=h.inverted,Ke=h.onSymbolMouseOver,et=h.onSymbolMouseOut,it=h.onSymbolClick,Pe=m,ct=v/100;Oe=Oe||1;var at=b.map(function(he){if(!Q[he]||!Q[he].component||de[he]===0)return null;Pe-=100*de[he];var qe=Ze?Pe+100*de[he]:Pe;if(!Q[he].component.map){var ut=Q[he].component;return o.a.createElement("g",{transform:"translate(0,"+qe+")",key:he,onMouseOver:Ke&&function(){return Ke(Q[he])},onMouseOut:et&&function(){return et(Q[he])},onClick:it&&function(){return it(Q[he])}},o.a.createElement(us,{xscale:ct,yscale:de[he],inverted:Ze},o.a.createElement(ut,Xi({fill:Q[he].color,fillOpacity:Oe},Q[he]))))}var kt=.8*ct/Q[he].component.length;return Q[he].color.map||(Q[he].color=Q[he].component.map(function(Ut){return Q[he].color})),Q[he].component.map(function(Ut,Bt){return o.a.createElement("g",{transform:"translate("+(Bt*v*.8/Q[he].component.length+.1*v)+","+qe+")",key:he+"_"+Bt,onMouseOver:Ke&&function(){return Ke(Q[he])},onMouseOut:et&&function(){return et(Q[he])},onClick:it&&function(){return it(Q[he])}},o.a.createElement(us,{xscale:kt,yscale:de[he],inverted:Ze},o.a.createElement(Ut,Xi({fill:Q[he].color[Bt],fillOpacity:Oe},Q[he]))))})});return o.a.createElement("g",{transform:fe},at)},fs=function(h){var m=h.n,v=h.transform,b=h.glyphWidth,Q=h.startpos,de=Xr(m);return o.a.createElement("g",{transform:v},o.a.createElement("g",{transform:"rotate(-90)"},de.map(function(fe){return o.a.createElement("text",{x:"0",y:b*(fe+.66),fontSize:"18",textAnchor:"end",key:fe},fe+Q)})))},jf=function(h){var m=h.bits,v=h.transform,b=h.height,Q=h.width,de=h.zeroPoint,fe=Xr(m+1);return de===void 0&&(de=1),o.a.createElement("g",{transform:v},o.a.createElement("rect",{height:b,width:4,x:Q+1,y:0,fill:"#000000"}),fe.map(function(Oe){return o.a.createElement("g",{key:Oe,transform:"translate(0,"+(b*de-Math.floor(Oe*(b*de)/m))+")"},o.a.createElement("text",{x:Q-15,textAnchor:"end",y:"4",fontSize:"18"},Oe),o.a.createElement("rect",{x:Q-10,width:"15",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"20",x:-b/2,textAnchor:"middle",fontSize:"18"},"bits")))},Pf=function(h){var m=h.ticks,v=h.transform,b=h.height,Q=h.width,de=Xr(m+1).map(function(fe){return fe/m});return o.a.createElement("g",{transform:v},o.a.createElement("rect",{height:b,width:4,x:Q+1,y:"0",fill:"#000000"}),de.map(function(fe){return o.a.createElement("g",{key:fe,transform:"translate(0,"+(b-Math.floor(fe*b))+")"},o.a.createElement("text",{x:Q-10,textAnchor:"end",y:"4",fontSize:"18"},(fe+"").substring(0,4)),o.a.createElement("rect",{x:Q-5,width:"10",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"15",x:-b/2,textAnchor:"middle",fontSize:"18"},"frequency")))},hs=function(h){var m=h.minrange,v=h.maxrange,b=h.xstart,Q=h.width,de=h.height,fe=h.xaxis_y,Oe=h.numberofgridlines,Ze=h.stroke,Ke=function(he,qe){return function(ut){return qe[0]+(qe[1]-qe[0])*((ut-he[0])/(he[1]-he[0]))}}([m,v],[b,Q]),et=v-m,it=fe+de,Pe=Math.ceil(et)/Oe,ct=Math.ceil(et/Pe),at=Array.from(Array(ct).keys());return o.a.createElement("g",{stroke:Ze},at.map(function(he){var qe=m+Pe*he;return o.a.createElement("line",{key:he,x1:Ke(qe),x2:Ke(qe),y1:fe,y2:it})}),o.a.createElement("line",{x1:Ke(v),x2:Ke(v),y1:fe,y2:it}),";")};function ds(h){return function(m){if(Array.isArray(m)){for(var v=0,b=new Array(m.length);v<m.length;v++)b[v]=m[v];return b}}(h)||function(m){if(Symbol.iterator in Object(m)||Object.prototype.toString.call(m)==="[object Arguments]")return Array.from(m)}(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ji=function(h){var m,v,b=h.values,Q=h.glyphWidth,de=h.stackHeight,fe=h.alphabet,Oe=h.onSymbolMouseOver,Ze=h.onSymbolMouseOut,Ke=h.onSymbolClick,et=(m=Q,v=de,function(Pe,ct,at,he,qe){var ut=ss(Pe),kt=qe||{},Ut=kt.onSymbolMouseOver,Bt=kt.onSymbolMouseOut,Dn=kt.onSymbolClick;return o.a.createElement(ls,{indices:ut,alphabet:he,onSymbolMouseOver:Ut?function(bt){return Ut(at,bt)}:null,onSymbolClick:Dn?function(bt){return Dn(at,bt)}:null,onSymbolMouseOut:Bt?function(bt){return Bt(at,bt)}:null,lv:Pe,transform:ct,width:m,height:v,key:at})});for(var it in fe)if(!it.component){fe=Ki(fe);break}return b.map(function(Pe,ct){return et(Pe,"translate("+Q*ct+",0)",ct,fe,{onSymbolMouseOver:Oe,onSymbolMouseOut:Ze,onSymbolClick:Ke})})},_n=o.a.forwardRef(function(h,m){var v=h.ppm,b=h.pfm,Q=h.values,de=h.fasta,fe=h.mode,Oe=h.height,Ze=h.width,Ke=h.alphabet,et=h.glyphwidth,it=h.scale,Pe=h.startpos,ct=h.showGridLines,at=h.backgroundFrequencies,he=h.constantPseudocount,qe=h.smallSampleCorrectionOff,ut=h.yAxisMax,kt=h.onSymbolMouseOver,Ut=h.onSymbolMouseOut,Bt=h.onSymbolClick,Dn=h.noFastaNames,bt=h.countUnaligned,jt=null,Pt=!(!b&&!de||he||bt)&&!qe,Mn=Pt?0:(he||0)/Ke.length;if(!v&&!b&&de){var Cs=(Dn?Rf:If)(Ke,de.toUpperCase());b=Cs.pfm,jt=Cs.count||1}var gh=Pt&&b&&b.map&&b.map(function(xt){return xt.reduce(function(vn,hr,en){return en===void 0?vn:hr+vn},0)}).map(function(xt){return xt===0?0:(Ke.length-1)/(2*Math.log(2)*xt)});if(!v&&b&&b.map&&(v=b.map(function(xt,vn){var hr=(jt&&bt?jt:xt.reduce(function(en,na){return en+na},0)+Mn*Ke.length)||1;return xt.map(function(en){return(en+Mn)/hr})})),v.length===0||v[0].length===0)return o.a.createElement("div",null);var Zi=v[0].length;at||(at=v[0].map(function(xt){return 1/Zi}));var fr=Q||(fe!=="FREQUENCY"?v.map(function(xt,vn){return function(hr){return function(en,na){var Ms=0,yh=na||0;return en.map(function(dr,Zr){return Ms+=dr===0?0:dr*Math.log2(dr/(hr[Zr]||.01))}),en.map(function(dr){var Zr=dr*(Ms-yh);return Zr<=0?0:Zr})}}(at)(xt,gh[vn])}):v.map(function(xt){return xt.map(function(vn){return vn*Math.log2(Zi)})})),_s=fe==="FREQUENCY"?[Math.log2(Zi)]:at.map(function(xt){return Math.log2(1/(xt||.01))}),Jr=ut||Math.max.apply(Math,ds(_s)),ks=Math.min.apply(Math,ds(_s)),vh=ks<0?Jr/(Jr-ks):1;Pe=!isNaN(parseFloat(Pe))&&isFinite(Pe)?Pe:1;var gn=100*Jr,ea=gn/6*(et||1),ta=fr.length*ea+80,Ds=gn+18*(as(Pe,fr.length)+1);return it&&(ta>Ds?Ze=it:Oe=it),o.a.createElement("svg",{width:Ze,height:Oe,viewBox:"0 0 "+ta+" "+Ds,ref:m},ct&&o.a.createElement(hs,{minrange:Pe,maxrange:Pe+v.length,xstart:70,width:ta,height:gn,xaxis_y:10,numberofgridlines:10*fr.length}),o.a.createElement(fs,{transform:"translate(80,"+(gn+20)+")",n:fr.length,glyphWidth:ea,startpos:Pe}),fe==="FREQUENCY"?o.a.createElement(Pf,{transform:"translate(0,10)",width:65,height:gn,ticks:2}):o.a.createElement(jf,{transform:"translate(0,10)",width:65,height:gn,bits:Jr,zeroPoint:vh}),o.a.createElement("g",{transform:"translate(80,10)"},o.a.createElement(Ji,{values:fr,glyphWidth:ea,stackHeight:gn,alphabet:Ke,onSymbolMouseOver:kt,onSymbolMouseOut:Ut,onSymbolClick:Bt})))}),Nf=function(h){var m=h.transform,v=h.min,b=h.max,Q=h.width,de=h.height,fe=[v,0,b];return o.a.createElement("g",{transform:m},o.a.createElement("rect",{height:de,width:4,x:Q+1,y:"0",fill:"#000000"}),fe.map(function(Oe){return o.a.createElement("g",{key:Oe,transform:"translate(0,"+(de-Oe/b*de)/2+")"},o.a.createElement("text",{x:Q-10,textAnchor:"end",y:"4",fontSize:"18"},(Oe+"").substring(0,4)),o.a.createElement("rect",{x:Q-5,width:"10",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"15",x:-de/2,textAnchor:"middle",fontSize:"18"},"frequency")))};function ps(h){return function(m){if(Array.isArray(m)){for(var v=0,b=new Array(m.length);v<m.length;v++)b[v]=m[v];return b}}(h)||function(m){if(Symbol.iterator in Object(m)||Object.prototype.toString.call(m)==="[object Arguments]")return Array.from(m)}(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ms=function(h,m,v,b){return function(Q,de,fe,Oe,Ze,Ke){var et,it=Ze?(et=Q).map(function(qe,ut){return ut}).sort(function(qe,ut){return et[qe]<et[ut]?1:et[qe]===et[ut]?0:-1}):ss(Q),Pe=Ke||{},ct=Pe.onSymbolMouseOver,at=Pe.onSymbolMouseOut,he=Pe.onSymbolClick;return o.a.createElement(ls,{indices:it,alphabet:Oe,alpha:v,lv:Q,transform:de,width:h,height:m,onSymbolMouseOver:ct?function(qe){return ct(fe,qe)}:null,onSymbolClick:he?function(qe){return he(fe,qe)}:null,onSymbolMouseOut:at?function(qe){return at(fe,qe)}:null,key:fe,inverted:b})}},gs=o.a.forwardRef(function(h,m){var v=h.values,b=h.height,Q=h.width,de=h.alphabet,fe=h.scale,Oe=h.startpos,Ze=h.negativealpha,Ke=h.showGridLines,et=h.inverted,it=h.onSymbolMouseOver,Pe=h.onSymbolMouseOut,ct=h.onSymbolClick;if(v.length===0||v[0].length===0)return o.a.createElement("div",null);v[0].length;for(var at in de)if(!at.component){de=Ki(de);break}Oe=Oe??1,Ze=(Ze=Ze<0?0:Ze)>255?255:Ze;var he=v.map(Df),qe=v.map(function(bt){return-function(jt){var Pt=0;return jt.filter(function(Mn){return Mn<0}).forEach(function(Mn){Pt+=Mn}),Pt}(bt)}),ut=Math.max.apply(Math,ps(he).concat(ps(qe))),kt=v.length*(200/6)+80,Ut=200+18*(as(Oe,v.length)+1),Bt=ms(200/6,200/2.05),Dn=ms(200/6,-200/2.05,Ze/255,et);return fe&&(kt>Ut?Q=fe:b=fe),o.a.createElement("svg",{ref:m,width:Q,height:b,viewBox:"0 0 "+kt+" "+Ut},Ke&&o.a.createElement(hs,{minrange:Oe,maxrange:Oe+v.length,xstart:70,width:kt,height:200,xaxis_y:10,numberofgridlines:10*v.length}),o.a.createElement(fs,{transform:"translate(80,220)",n:v.length,glyphWidth:200/6,startpos:Oe}),o.a.createElement(Nf,{transform:"translate(0,10)",width:65,height:200,min:-ut,max:ut}),o.a.createElement("line",{style:{fill:"none",stroke:"#000000",strokeWidth:2,strokeLinecap:"butt",strokeLinejoin:"miter",strokeOpacity:1,strokeMiterlimit:4,strokeDasharray:"0.53,1.59",strokeDashoffset:0},transform:"translate(80,111)",x1:0,x2:kt-80}),o.a.createElement("g",{transform:"translate(80,10)"},v.map(function(bt,jt){return Bt(bt.map(function(Pt){return Pt>0?Pt/ut:0}),"translate("+200/6*jt+",0)",jt,de,!1,{onSymbolMouseOver:it,onSymbolMouseOut:Pe,onSymbolClick:ct})}),v.map(function(bt,jt){return Dn(bt.map(function(Pt){return Pt<0?Pt/ut:0}),"translate("+200/6*jt+",200)",jt,de,!0,{onSymbolMouseOver:it,onSymbolMouseOut:Pe,onSymbolClick:ct})})))});function vs(){return(vs=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var ys=[{component:c,regex:"A",color:"black"},{component:l,regex:"B",color:"#bb8800"},{component:f,regex:"C",color:"#008811"},{component:x,regex:"D",color:"#ff0000"},{component:T,regex:"E",color:"#ff0022"},{component:_,regex:"F",color:"#333333"},{component:C,regex:"G",color:"#007700"},{component:R,regex:"H",color:"#220099"},{component:F,regex:"I",color:"#111111"},{component:_e,regex:"K",color:"#0000aa"},{component:we,regex:"L",color:"#002222"},{component:Ie,regex:"M",color:"#220022"},{component:$,regex:"N",color:"#009911"},{component:Y,regex:"P",color:"#080808"},{component:ee,regex:"Q",color:"#00aa00"},{component:H,regex:"R",color:"#0022aa"},{component:re,regex:"S",color:"#008f00"},{component:ue,regex:"T",color:"#006600"},{component:ae,regex:"V",color:"#222200"},{component:oe,regex:"W",color:"#080808"},{component:ke,regex:"Y",color:"#00a800"},{component:yt,regex:"Z",color:"#aaaa00"}],bs=o.a.forwardRef(function(h,m){return o.a.createElement(_n,vs({alphabet:ys},h,{ref:m}))});function xs(){return(xs=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Es=[{component:c,regex:"A",color:"red"},{component:f,regex:"C",color:"blue"},{component:C,regex:"G",color:"orange"},{component:ue,regex:"T",color:"#228b22"}],ws=o.a.forwardRef(function(h,m){return o.a.createElement(_n,xs({alphabet:Es},h,{ref:m}))});function Os(){return(Os=Object.assign||function(h){for(var m=1;m<arguments.length;m++){var v=arguments[m];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(h[b]=v[b])}return h}).apply(this,arguments)}var Ss=[{component:c,regex:"A",color:"red"},{component:f,regex:"C",color:"blue"},{component:C,regex:"G",color:"orange"},{component:I,regex:"U",color:"seagreen"}],Ts=o.a.forwardRef(function(h,m){return o.a.createElement(_n,Os({alphabet:Ss},h,{ref:m}))}),kn=i(1),Af=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(ws,m))},Ff=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(Ts,m))},Vf=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(bs,m))},qf=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(_n,m))},$f=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(Ji,m))},Uf=function(h,m){h.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(gs,m))};i.d(r,"LC_a",function(){return Bf}),i.d(r,"LC_b",function(){return zf}),i.d(r,"LC_c",function(){return Wf}),i.d(r,"LC_d",function(){return Qf}),i.d(r,"LC_e",function(){return Hf}),i.d(r,"LC_f",function(){return Gf}),i.d(r,"LC_g",function(){return Yf}),i.d(r,"LC_h",function(){return Kf}),i.d(r,"LC_i",function(){return Xf}),i.d(r,"LC_j",function(){return Jf}),i.d(r,"LC_k",function(){return Zf}),i.d(r,"LC_l",function(){return eh}),i.d(r,"LC_m",function(){return th}),i.d(r,"LC_n",function(){return nh}),i.d(r,"LC_o",function(){return rh}),i.d(r,"LC_p",function(){return ih}),i.d(r,"LC_q",function(){return ah}),i.d(r,"LC_r",function(){return oh}),i.d(r,"LC_s",function(){return sh}),i.d(r,"LC_t",function(){return ch}),i.d(r,"LC_u",function(){return uh}),i.d(r,"LC_v",function(){return lh}),i.d(r,"LC_w",function(){return fh}),i.d(r,"LC_x",function(){return hh}),i.d(r,"LC_y",function(){return dh}),i.d(r,"LC_z",function(){return ph}),i.d(r,"N0",function(){return mh}),i.d(r,"Logo",function(){return _n}),i.d(r,"ProteinLogo",function(){return bs}),i.d(r,"DNALogo",function(){return ws}),i.d(r,"RNALogo",function(){return Ts}),i.d(r,"ProteinAlphabet",function(){return ys}),i.d(r,"DNAAlphabet",function(){return Es}),i.d(r,"RNAAlphabet",function(){return Ss}),i.d(r,"CompleteLogo",function(){return kf}),i.d(r,"CompleteAlphabet",function(){return Gi}),i.d(r,"INFORMATION_CONTENT",function(){return"INFORMATION_CONTENT"}),i.d(r,"FREQUENCY",function(){return"FREQUENCY"}),i.d(r,"xrange",function(){return Xr}),i.d(r,"LogoWithNegatives",function(){return gs}),i.d(r,"embedDNALogo",function(){return Af}),i.d(r,"disymbolAlphabet",function(){return Mf}),i.d(r,"RawLogo",function(){return Ji}),i.d(r,"embedRNALogo",function(){return Ff}),i.d(r,"embedLogoWithNegatives",function(){return Uf}),i.d(r,"embedProteinLogo",function(){return Vf}),i.d(r,"embedLogo",function(){return qf}),i.d(r,"embedRawLogo",function(){return $f}),i.d(r,"loadGlyphComponents",function(){return Ki}),i.d(r,"A",function(){return c}),i.d(r,"B",function(){return l}),i.d(r,"C",function(){return f}),i.d(r,"D",function(){return x}),i.d(r,"E",function(){return T}),i.d(r,"F",function(){return _}),i.d(r,"G",function(){return C}),i.d(r,"H",function(){return R}),i.d(r,"I",function(){return F}),i.d(r,"J",function(){return V}),i.d(r,"K",function(){return _e}),i.d(r,"L",function(){return we}),i.d(r,"M",function(){return Ie}),i.d(r,"N",function(){return $}),i.d(r,"O",function(){return j}),i.d(r,"P",function(){return Y}),i.d(r,"Q",function(){return ee}),i.d(r,"R",function(){return H}),i.d(r,"S",function(){return re}),i.d(r,"T",function(){return ue}),i.d(r,"U",function(){return I}),i.d(r,"V",function(){return ae}),i.d(r,"W",function(){return oe}),i.d(r,"X",function(){return Qe}),i.d(r,"Y",function(){return ke}),i.d(r,"Z",function(){return yt}),i.d(r,"N1",function(){return Ue}),i.d(r,"N2",function(){return It}),i.d(r,"N3",function(){return lr}),i.d(r,"N4",function(){return Yo}),i.d(r,"N5",function(){return Xo}),i.d(r,"N6",function(){return Zo}),i.d(r,"N7",function(){return ts}),i.d(r,"N8",function(){return ns}),i.d(r,"N9",function(){return is});var Bf=tr,zf=Zt,Wf=f,Qf=Wr,Hf=Lt,Gf=Hr,Yf=nr,Kf=Yr,Xf=ir,Jf=or,Zf=cr,eh=k,th=z,nh=B,rh=j,ih=te,ah=Ve,oh=xe,sh=re,ch=Ge,uh=Ye,lh=ae,fh=oe,hh=Qe,dh=rt,ph=yt,mh=j}])})})(Wu);var y0=Wu.exports,Fn=y0;const Gs=new Map([["A",Fn.A],["C",Fn.C],["G",Fn.G],["T",Fn.T]]),b0=new Map([["A","#008800"],["C","#000088"],["G","#a89132"],["T","#880000"]]),x0=e=>{const[t,n,r]=E.useMemo(()=>e.transform(e.importance),[e.transform,e.importance]);return Gs.get(e.base)?p.jsxs(p.Fragment,{children:[p.jsx("rect",{fill:"#000000",fillOpacity:0,y:0,x:e.x,width:e.totalWidth,height:e.totalHeight,onMouseOver:e.onMouseOver,onMouseOut:e.onMouseOut,onMouseDown:e.onClick,onMouseUp:e.onMouseUp}),p.jsx("g",{transform:`${r} translate(${e.x},${t}) scale(${e.xScale},${n})`,children:E.createElement(Gs.get(e.base),{fill:b0.get(e.base)})})]}):null};function E0(e){return e.sequence!==void 0}const w0=e=>{const[t,n,r]=g0(e.data,e.height),i=v0(e.annotations||[],t,r),[a]=E.useState(null),o=E.useMemo(()=>e.width/t.length/100,[e.width,t.length]),s=E.useMemo(()=>n(0)[0],[n]),c=E.useMemo(()=>i.map((d,f)=>{const g=100*o*Math.abs(d.coordinates[1]-d.coordinates[0]),x=Math.min(...d.coordinates)*o*100,w=d.y+d.height,T=80;return p.jsxs(E.Fragment,{children:[p.jsx("rect",{fill:d.color,fillOpacity:.4,x,width:g,height:d.height,y:d.y}),p.jsx("path",{fill:d.color,fillOpacity:.4,d:`M ${x} ${w} L ${x-g} ${w+T} L ${x-g} ${w+d.height*3} L ${x+g*2} ${w+d.height*3} L ${x+g*2} ${w+T} L ${x+g} ${w} L ${x} ${w}`}),p.jsx("g",{transform:`translate(${x-g},${w+T})`,children:d.children})]},f)}),[i,o]),u=E.useMemo(()=>t.map((d,f)=>d.importance?p.jsx(x0,{totalWidth:o*100,totalHeight:e.height,x:f*o*100,xScale:o,transform:n,onMouseOut:e.onBaseMousedOut,...d},f):null),[t,o,e.height,n,e.onBaseMousedOut]),l=E.useMemo(()=>t.filter(d=>d.importance).length>0?p.jsx("line",{stroke:"#ff0000",strokeWidth:1,...e.zeroLineProps,x1:0,x2:e.width,y1:s,y2:s}):p.jsx("text",{x:0,y:e.height/2,children:"No importance track data"}),[t,e.width,e.height,s,e.zeroLineProps]);return p.jsx(Mt,{canDrag:!0,children:p.jsxs("g",{children:[a!==null&&p.jsx("rect",{fill:"#93ceed",fillOpacity:.4,x:Math.min(...a)*o*100,width:100*o*Math.abs(a[1]-a[0]),height:e.height}),c,u,l]})})},Qu={titleSize:12,trackMargin:12,canDrag:!0};function Hu(e){const t=e.data?{loading:!1}:{loading:!0},n={...e,trackType:X.IMPORTANCE,displayMode:e.displayMode};return p.jsx(tt,{...n,...t,trackType:X.BIGWIG,displayMode:e.displayMode,children:p.jsx(w0,{...e})})}function Ys(e,t,n){const r=[],i=e.sort((a,o)=>a.start-o.start);return i.forEach((a,o)=>{var l;let s=0,c=a.pwm&&a.pwm.length||0;s=a.start<n.start?n.start-a.start:0,c=a.end>n.end?n.end-a.start:c;const u=a.pwm?(l=a.pwm)==null?void 0:l.slice(s,c):void 0;o===0||a.start>i[o-1].end?r.push({start:t(a.start)<0?0:t(a.start),end:t(a.end)<0?0:t(a.end),pwm:u}):r[r.length-1].end=t(a.end)}),r}function Ks(e,t,n){return Ar(e.sort((r,i)=>r.start-i.start).map(r=>({coordinates:{start:r.start,end:r.end},pwm:r.pwm,name:""})),t,0).map(r=>r.map(i=>{var c;let a=0,o=i.pwm&&i.pwm.length||0;a=i.coordinates.start<n.start?n.start-i.coordinates.start:0,o=i.coordinates.end>n.end?n.end-i.coordinates.start:o;const s=i.pwm?(c=i.pwm)==null?void 0:c.slice(a,o):void 0;return{start:t(i.coordinates.start)<0?0:t(i.coordinates.start),end:t(i.coordinates.end),pwm:s}}))}const O0=e=>{const t=E.useContext(Jt),n=(l,d)=>{if(e.svgRef){const f=pn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-d.pwm.length*20?f[0]-d.pwm.length*20+10:f[0]+10,y:f[1],width:d.pwm.length*20,height:150,content:p.jsx("div",{style:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",paddingRight:"15px",paddingTop:"10px",paddingLeft:"5px",position:"relative",width:d.pwm.length*20,height:150,backgroundColor:"white"},children:p.jsx(Fn.DNALogo,{ppm:d.pwm,mode:"INFORMATION_CONTENT",width:d.pwm.length*20,height:150})})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=E.useMemo(()=>Ks(e.data,a,e.domain),[e.data,e.domain,e.width]),s=E.useMemo(()=>Ks(e.peaks||[],a,e.domain),[e.peaks,e.domain,e.width]),c=Math.max(e.rowHeight*o.length,35),u=e.id||i.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(c)},[o,e.rowHeight,e.onHeightChanged]),p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{width:e.width,height:c,clipPath:`url(#${u})`,children:[p.jsx("rect",{width:e.width,height:c,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:u,width:e.width,height:c})}),s.map((l,d)=>p.jsx("g",{transform:`translate(0, ${d*e.rowHeight})`,children:l.map((f,g)=>p.jsx("rect",{height:e.rowHeight*.6,width:f.end-f.start<1?1:f.end-f.start,x:f.start,y:e.rowHeight*.2,fill:e.peakColor||"#3287a8",style:{cursor:"pointer"}},`${u}_peak_${d}_${g}`))},`group_peak_${d}`)),o.map((l,d)=>p.jsx("g",{transform:`translate(0, ${d*e.rowHeight})`,children:l.map((f,g)=>p.jsx("rect",{height:e.rowHeight*.6,width:f.end-f.start<1?1:f.end-f.start,x:f.start,y:e.rowHeight*.2,fill:e.color||"#000088",style:{cursor:"pointer"},onMouseOut:r,onMouseOver:x=>{x.persist(),f.pwm&&n(x,f)}},`${u}_${d}_${g}`))},`group_${d}`))]})})},S0=e=>{const t=E.useContext(Jt),n=(l,d)=>{if(e.svgRef){const f=pn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-d.pwm.length*20?f[0]-d.pwm.length*20+10:f[0]+10,y:f[1],width:d.pwm.length*20,height:150,content:p.jsx("div",{style:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",paddingRight:"15px",paddingTop:"10px",paddingLeft:"5px",position:"relative",width:d.pwm.length*20,height:150,backgroundColor:"white"},children:p.jsx(Fn.DNALogo,{ppm:d.pwm,mode:"INFORMATION_CONTENT",width:d.pwm.length*20,height:150})})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.id||i.current.toString(),s=E.useMemo(()=>Ys(e.data,a,e.domain),[e.domain,e.width,e.data]),c=E.useMemo(()=>Ys(e.peaks||[],a,e.domain),[e.domain,e.width,e.peaks]);E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const u=Math.max(e.height,35);return p.jsx(Mt,{canDrag:e.canDrag||!1,children:p.jsxs("g",{width:e.width,height:u,clipPath:`url(#${o})`,children:[p.jsx("rect",{width:e.width,height:u,fill:"white"}),p.jsx("defs",{children:p.jsx(Ht,{id:o,width:e.width,height:u})}),c.map((l,d)=>p.jsx("rect",{height:u*.6,width:l.end-l.start,x:l.start,y:u*.2,fill:e.peakColor||"#3287a8",style:{cursor:"pointer"}},`${o}_peak_${d}`)),s.map((l,d)=>p.jsx("rect",{height:u*.6,width:l.end-l.start,x:l.start,y:u*.2,fill:e.color||"#000088",style:{cursor:"pointer"},onMouseOut:r,onMouseOver:f=>{f.persist(),l.pwm&&n(f,l)}},`${o}_${d}`))]})})},Gu={trackType:X.MOTIF,titleSize:12,trackMargin:12,height:50,displayMode:Fe.SQUISH,canDrag:!0};function Yu(e){const t=e.data||e.peaks?{loading:!1}:{loading:!0},n={...e,trackType:X.MOTIF,displayMode:e.displayMode};switch(e.displayMode){case Fe.SQUISH:return p.jsx(tt,{...n,...t,trackType:X.MOTIF,displayMode:e.displayMode,children:p.jsx(O0,{...e})});case Fe.DENSE:return p.jsx(tt,{...n,...t,trackType:X.MOTIF,displayMode:e.displayMode,children:p.jsx(S0,{...e})});case Fe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),p.jsx(tt,{...n,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}const T0=[{text:"African",value:"AFRICAN"},{text:"Native American",value:"AMERICAN"},{text:"East Asian",value:"EAST_ASIAN"},{text:"European",value:"EUROPEAN"},{text:"South Asian",value:"SOUTH_ASIAN"}],C0=new Map([["AFRICAN",[null,{text:"Gambian",value:"GAMBIAN"},{text:"Mende",value:"MENDE"},{text:"Easn",value:"ESAN"},{text:"African American",value:"AFRICAN_AMERICAN"},{text:"African Caribbean",value:"AFRICAN_CARIBBEAN"}]],["AMERICAN",[null,{text:"Mexican",value:"MEXICAN"},{text:"Puerto Rican",value:"PUERTO_RICAN"},{text:"Colombian",value:"COLOMBIAN"},{text:"Peruvian",value:"PERUVIAN"}]],["EAST_ASIAN",[null,{text:"Han Chinese from Beijing",value:"HAN_CHINESE_BEIJING"},{text:"Japanese",value:"JAPANESE"},{text:"Dai",value:"DAI"},{text:"Kinh",value:"KINH"},{text:"Southern Han Chinese",value:"SOUTHERN_HAN_CHINESE"}]],["EUROPEAN",[null,{text:"Iberian",value:"IBERIAN"},{text:"British",value:"BRITISH"},{text:"Finnish",value:"FINNISH"},{text:"Toscani",value:"TOSCANI"},{text:"Utah resident northwest European",value:"UTAH_RESIDENT_NW_EUROPEAN"}]],["SOUTH_ASIAN",[null,{text:"Gujarati",value:"GUJARATI"},{text:"Punjabi",value:"PUNJABI"},{text:"Bengali",value:"BENGALI"},{text:"Sri Lankan Tamil",value:"SRI_LANKAN_TAMIL"},{text:"Indian Telugu",value:"INDIAN_TELUGU"}]]]),Xs=T0.flatMap(e=>(C0.get(e.value)??[]).filter(n=>n!==null).map(n=>({population:e.value,subpopulation:n.value})));function _0(e,t,n,r,i){const a=new Map,o=[];return e.sort((s,c)=>s.domain.start-c.domain.start).forEach(s=>{const c=t.has(s.id),u=c?2:1,l=n(s.domain.start),d=n(s.domain.end)-l<u?l+u:n(s.domain.end),f=o[o.length-1]&&o[o.length-1].domain.end;a.set(s.id,(d+l)/2),f&&f>l?(o[o.length-1].domain.end=d,c&&(o[o.length-1].taller=!0,o[o.length-1].color=r)):o.push({...s,domain:{start:l,end:d},color:c?r:i,taller:c})}),{snps:o,coords:a}}function k0(e,t,n,r,i,a){const o=e.get(t),s=u=>r((u.coordinates.start+u.coordinates.end)/2),c=Ud({start:i,end:1},{start:zs("0000ED"),end:zs("000000")});return o===void 0?[]:n.filter(u=>u.rSquared>i).map(u=>({d:`M ${o} ${a*.7} Q ${(o+s(u))/2} 0 ${s(u)} ${a*.7}`,stroke:`#FF${Id(Math.floor(c(u.rSquared)))}00`}))}const D0=e=>{var T,S,_;const[t,n]=E.useState(e.anchor),r=E.useContext(Jt),i=(y,C)=>{if(n(C.id),e.svgRef){const O=pn(e.svgRef.current,y);r.setTooltip({show:!0,x:O[0]>e.width-120?O[0]-120+15:O[0]+15,y:O[1]+10,width:120,height:50,content:p.jsx("span",{style:{fontSize:"10px"},children:C.id})})}e.onVariantMouseOver&&e.onVariantMouseOver(C)},a=()=>{r.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},o=E.useRef($t()),s=E.useCallback(Ct(e.domain,e.width),[(T=e.data)==null?void 0:T.snps]),c=e.color||"#000000",u=e.ldThreshold||.7,l=e.highlightColor||"#ff0000",d=e.highlighted||new Set,f=E.useMemo(()=>_0(e.data.snps,d,s,l,c),[e.domain,e.width,e.data.snps,e.highlighted,l,c]),g=e.data.ld&&E.useMemo(()=>k0(f.coords,t||"",e.data.ld.filter(y=>y.coordinates),s,u,e.height),[f,e.height,t,e.data.ld,e.domain,e.ldThreshold]);E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const x=t&&f.snps.find(y=>y.id===t),w=f.snps.find(y=>y.id===t);return E.useMemo(()=>p.jsxs(Mt,{canDrag:e.canDrag||!1,children:[p.jsx("rect",{width:e.width,height:e.height,fill:"white",onMouseOut:a}),p.jsxs("g",{className:e.className,width:e.width,height:e.height,clipPath:`url(#${o.current})`,children:[p.jsx("defs",{children:p.jsx(Ht,{id:o.current,width:e.width,height:e.height})}),x&&(g==null?void 0:g.length)===0&&p.jsx("text",{fill:"#ff0000",fontSize:10,x:e.width/2-150,y:20,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:`There are no SNPs in LD (r-squared > ${u}) with ${t} in ${e.id} track`}),x&&p.jsx("rect",{height:e.height*(w.taller?1:.6)*(t?.25:.6),width:1,x:w.domain.end,y:e.height-e.height*(w.taller?1:.6)*(t?.25:.6),fill:"#0000ff"},`${t}`),f.snps.map((y,C)=>{const O=e.height*(y.taller?1:.6)*(t?.25:.6);return p.jsx("rect",{style:{cursor:"pointer"},height:O,width:y.domain.end-y.domain.start,x:y.domain.start,y:e.height-O,fill:y.color,onMouseOver:R=>i(R,y),onMouseOut:()=>{a(),e.onVariantMouseOut&&e.onVariantMouseOut(y)},onClick:()=>e.onVariantClick&&e.onVariantClick(y)},`${e.id}_${C}`)}),g&&g.map((y,C)=>p.jsx("path",{d:y.d,stroke:y.stroke,fill:"none",strokeWidth:2},`${e.id}_path_${C}`))]})]}),[c,(S=e.data)==null?void 0:S.snps,e.ldThreshold,e.highlighted,e.highlightColor,(_=e.data)==null?void 0:_.ld,e.domain,e.height,e.width,e.id])};var Ra=function(e,t){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ra(e,t)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ra(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var D=function(){return D=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},D.apply(this,arguments)};function Vt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function an(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(l){try{u(r.next(l))}catch(d){o(d)}}function c(l){try{u(r.throw(l))}catch(d){o(d)}}function u(l){l.done?a(l.value):i(l.value).then(s,c)}u((r=r.apply(e,t||[])).next())})}function on(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(l){u=[6,l],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function wt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var va="Invariant Violation",Js=Object.setPrototypeOf,M0=Js===void 0?function(e,t){return e.__proto__=t,e}:Js,Ku=function(e){Gt(t,e);function t(n){n===void 0&&(n=va);var r=e.call(this,typeof n=="number"?va+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=va,M0(r,t.prototype),r}return t}(Error);function bn(e,t){if(!e)throw new Ku(t)}var Xu=["debug","log","warn","error","silent"],L0=Xu.indexOf("log");function ri(e){return function(){if(Xu.indexOf(e)>=L0){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=ri("debug"),e.log=ri("log"),e.warn=ri("warn"),e.error=ri("error")})(bn||(bn={}));var Eo="3.11.10";function Ft(e){try{return e()}catch{}}const ja=Ft(function(){return globalThis})||Ft(function(){return window})||Ft(function(){return self})||Ft(function(){return global})||Ft(function(){return Ft.constructor("return this")()});var Zs=new Map;function Pa(e){var t=Zs.get(e)||1;return Zs.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function Ju(e,t){t===void 0&&(t=0);var n=Pa("stringifyForDisplay");return JSON.stringify(e,function(r,i){return i===void 0?n:i},t).split(JSON.stringify(n)).join("<undefined>")}function ii(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(typeof t=="number"){var i=t;t=wo(i),t||(t=Oo(i,n),n=[])}e.apply(void 0,[t].concat(n))}}var ie=Object.assign(function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];t||bn(t,wo(n,r)||Oo(n,r))},{debug:ii(bn.debug),log:ii(bn.log),warn:ii(bn.warn),error:ii(bn.error)});function vt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Ku(wo(e,t)||Oo(e,t))}var ec=Symbol.for("ApolloErrorMessageHandler_"+Eo);function Zu(e){if(typeof e=="string")return e;try{return Ju(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function wo(e,t){if(t===void 0&&(t=[]),!!e)return ja[ec]&&ja[ec](e,t.map(Zu))}function Oo(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:Eo,message:e,args:t.map(Zu)})))}function li(e,t){if(!!!e)throw new Error(t)}function I0(e){return typeof e=="object"&&e!==null}function R0(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const j0=/\r\n|[\n\r]/g;function Na(e,t){let n=0,r=1;for(const i of e.body.matchAll(j0)){if(typeof i.index=="number"||R0(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function P0(e){return el(e.source,Na(e.source,e.start))}function el(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=t.line===1?n:0,c=t.column+s,u=`${e.name}:${o}:${c}
114
- `,l=r.split(/\r\n|[\n\r]/g),d=l[i];if(d.length>120){const f=Math.floor(c/80),g=c%80,x=[];for(let w=0;w<d.length;w+=80)x.push(d.slice(w,w+80));return u+tc([[`${o} |`,x[0]],...x.slice(1,f+1).map(w=>["|",w]),["|","^".padStart(g)],["|",x[f+1]]])}return u+tc([[`${o-1} |`,l[i-1]],[`${o} |`,d],["|","^".padStart(c)],[`${o+1} |`,l[i+1]]])}function tc(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
115
- `)}function N0(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class So extends Error{constructor(t,...n){var r,i,a;const{nodes:o,source:s,positions:c,path:u,originalError:l,extensions:d}=N0(n);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=l??void 0,this.nodes=nc(Array.isArray(o)?o:o?[o]:void 0);const f=nc((r=this.nodes)===null||r===void 0?void 0:r.map(x=>x.loc).filter(x=>x!=null));this.source=s??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??(f==null?void 0:f.map(x=>x.start)),this.locations=c&&s?c.map(x=>Na(s,x)):f==null?void 0:f.map(x=>Na(x.source,x.start));const g=I0(l==null?void 0:l.extensions)?l==null?void 0:l.extensions:void 0;this.extensions=(a=d??g)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,So):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
111
+ L 0 0`}))};function St(){return(St=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var tr=function(d){return o.a.createElement("g",null,o.a.createElement("path",St({d:"M 10 20 C 5 -5 95 -10 100 35 L 100 100 L 80 100 L 80 90 C 90 105 10 105 0 80 C 0 45 40 40 60 45 L 80 50 C 95 30 40 5 10 35"},d)),o.a.createElement("path",{fill:"#ffffff",d:"M 77 70 C 70 90 30 90 22 80 C 10 50 80 60 77 70"}))};function Br(){return(Br=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Zt=function(d){return o.a.createElement("g",null,o.a.createElement("path",Br({d:"M 20 0 L 0 0 L 0 100 L 20 100 L 20 80 C 10 110 90 110 100 70 L 100 60 C 90 10 10 10 20 40 L 20 40 L 20 0"},d)),o.a.createElement("path",{d:"M 79 60 C 80 95 20 95 20 65 C 20 30 80 30 79 65",fill:"#ffffff"}))};function Hr(){return(Hr=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var zr=function(d){return o.a.createElement("g",null,o.a.createElement("path",Hr({d:"M 80 0 L 100 0 L 100 100 L 80 100 L 80 80 C 90 110 10 110 0 70 L 0 60 C 10 10 90 10 80 40 L 80 40 L 80 0"},d)),o.a.createElement("path",{d:"M 79 60 C 80 95 20 95 20 65 C 20 30 80 30 79 65",fill:"#ffffff"}))};function Qr(){return(Qr=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Lt=function(d){return o.a.createElement("g",null,o.a.createElement("path",Qr({d:"M 25 50 L 100 50 C 85 -17 15 -17 0 50 C 0 75 25 100 50 100 L 95 100 L 95 80 L 50 80 Q 25 70 25 50"},d)),o.a.createElement("path",{d:"M 33 37 L 68 37 C 58 10 42 10 33 37",fill:"#ffffff"}))};function Tn(){return(Tn=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Wr=function(d){return o.a.createElement("path",Tn({d:"M 95 32 C 80 -17 20 -5 20 37 L 7 37 L 7 50 L 20 50 L 20 100 L 45 100 L 45 50 L 57 50 L 57 37 L 45 37 C 45 10 70 10 75 32 L 95 32"},d))};function Gr(){return(Gr=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var nr=function(d){return o.a.createElement("g",null,o.a.createElement("path",Gr({d:"M 100 15 L 100 0 L 80 0 L 80 15 C 85 -8 15 -8 0 25 C 2 75 80 75 80 50 L 75 65 C 65 85 45 85 10 75 L 10 90 C 25 110 85 110 100 75 L 100 25"},d)),o.a.createElement("path",{d:"M 67 30 C 70 10 25 10 27 30 C 25 50 70 50 67 30",fill:"#ffffff"}))};function Cn(){return(Cn=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Yr=function(d){return o.a.createElement("path",Cn({d:"M 0 0 L 0 100 L 20 100 L 20 80 C 20 40 80 40 80 80 L 80 100 L 100 100 L 100 50 C 80 20 20 20 20 45 L 20 0 L 0 0"},d))};function rr(){return(rr=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ir=function(d){return o.a.createElement("g",null,o.a.createElement("rect",rr({},d,{x:40,y:20,width:20,height:80})),o.a.createElement("rect",rr({},d,{x:40,y:0,width:20,height:15})))};function ar(){return(ar=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var or=function(d){return o.a.createElement("g",null,o.a.createElement("path",ar({d:"M 0 60 C 0 115 100 115 100 60 L 100 20 L 80 20 L 80 60 C 80 90 20 90 25 60"},d)),o.a.createElement("rect",ar({x:80,width:20,height:15},d)))};function sr(){return(sr=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var cr=function(d){return o.a.createElement("path",sr({d:"M 0 0 L 20 0 L 20 60 L 75 30 L 100 30 L 50 65 L 100 100 L 75 100 L 27 80 L 20 85 L 20 100 L 0 100 L 0 0"},d))};function ur(){return(ur=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var k=function(d){return o.a.createElement("rect",ur({x:40,y:0,width:20,height:100},d))};function M(){return(M=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var H=function(d){return o.a.createElement("path",M({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 20 40 20 40 50 L 40 100 L 60 100 L 60 50 C 60 20 80 20 80 50 L 80 100 L 100 100 L 100 50 C 100 -10 40 -10 50 50 C 50 -5 20 -5 20 20 L 20 0 L 0 0"},d))};function q(){return(q=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var B=function(d){return o.a.createElement("path",q({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 0 80 0 80 50 L 80 100 L 100 100 L 100 25 C 80 -10 20 -10 20 20 L 20 0 L 0 0"},d))};function z(){return(z=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var te=function(d){return o.a.createElement("g",null,o.a.createElement("path",z({d:"M 20 100 L 0 100 L 0 0 L 20 0 L 20 20 C 10 -10 90 -10 100 30 L 100 40 C 90 90 10 90 20 60 L 20 60 L 20 100"},d)),o.a.createElement("path",{d:"M 79 40 C 80 5 20 5 20 35 C 20 70 80 70 79 35",fill:"#ffffff"}))};function ne(){return(ne=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Ve=function(d){return o.a.createElement("g",null,o.a.createElement("path",ne({d:"M 80 100 L 100 100 L 100 0 L 80 0 L 80 20 C 90 -10 10 -10 0 30 L 0 40 C 10 90 90 90 80 60 L 80 60 L 80 100"},d)),o.a.createElement("path",{d:"M 79 40 C 80 5 20 5 20 35 C 20 70 80 70 79 35",fill:"#ffffff"}))};function We(){return(We=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var xe=function(d){return o.a.createElement("path",We({d:"M 0 0 L 0 100 L 20 100 L 20 60 C 20 0 80 0 80 50 L 100 50 L 100 25 C 80 -10 20 -10 20 20 L 20 0 L 0 0"},d))};function nt(){return(nt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Ge=function(d){return o.a.createElement("path",nt({d:"M 95 68 C 80 117 20 105 20 63 L 20 47 L 7 47 L 7 27 L 20 27 L 20 0 L 45 0 L 45 27 L 57 27 L 57 47 L 45 47 L 45 63 C 45 90 70 90 75 68 L 95 68"},d))};function be(){return(be=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Ye=function(d){return o.a.createElement("g",null,o.a.createElement("path",be({d:"M 0 0 L 0 60 C 0 111 100 111 100 60 L 100 0 L 75 0 L 75 60 C 80 90 20 90 25 60 L 25 0 L 0 0"},d)),o.a.createElement("rect",be({},d,{x:75,y:0,height:100,width:25})))};function dt(){return(dt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var rt=function(d){return o.a.createElement("path",dt({d:"M 0 0 L 25 0 L 50 36 L 75 0 L 100 0 L 40 100 L 12 100 L 37 55 L 0 0"},d))};function pn(){return(pn=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Ue=function(d){return o.a.createElement("path",pn({},d,{d:"M 0 80 L 0 100 L 100 100 L 100 80 L 68 80 L 68 0 L 32 0 L 0 15 L 0 40 L 32 25 L 32 80 L 0 80"}))};function pt(){return(pt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var It=function(d){return o.a.createElement("path",pt({},d,{d:"M 0 25 C 20 -8 80 -8 100 25 C 100 90 30 50 20 85 L 100 85 L 100 100 L 0 100 L 0 70 C 10 40 75 70 75 25 C 70 10 30 10 25 28 L 0 25"}))};function Rt(){return(Rt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var lr=function(d){return o.a.createElement("path",Rt({},d,{d:"M 0 35 L 0 25 C 20 -8 80 -8 100 25 C 100 30 100 50 75 50 C 100 50 100 70 100 75 C 80 108 20 108 0 75 L 0 65 L 25 65 L 25 75 C 30 88 70 88 75 75 C 75 68 75 65 47 58 L 47 42 C 75 32 75 35 75 25 C 70 12 30 12 25 25 L 25 35"}))};function Go(){return(Go=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Yo=function(d){return o.a.createElement("path",Go({},d,{d:"M 50 0 L 0 50 L 0 70 L 50 70 L 50 100 L 75 100 L 75 70 L 100 70 L 100 50 L 75 50 L 75 0 L 50 15 L 50 50 L 30 50 L 75 0 L 50 0"}))};function Ko(){return(Ko=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Xo=function(d){return o.a.createElement("path",Ko({},d,{d:"M 95 20 L 100 0 L 10 0 L 0 60 L 25 60 C 30 45 90 50 75 77 C 66 87 30 90 26 72 L 0 80 C 20 110 80 110 100 70 C 100 25 10 25 25 40 L 30 20 L 95 20"}))};function Jo(){return(Jo=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Zo=function(d){return o.a.createElement("path",Jo({},d,{d:"M 50 0 C -40 70 10 100 50 100 C 90 100 100 80 100 55 C 80 30 30 30 35 50 L 30 60 C 80 50 80 85 50 80 C 10 80 48 10 90 0 L 50 0"}))};function es(){return(es=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ts=function(d){return o.a.createElement("path",es({},d,{d:"M 0 0 L 100 0 L 50 100 L 20 100 L 60 20 L 0 20 L 0 0"}))};function Wi(){return(Wi=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ns=function(d){return o.a.createElement("g",null,o.a.createElement("path",Wi({},d,{d:"M 0 35 L 0 25 C 20 -8 80 -8 100 25 C 100 30 100 50 75 50 C 100 50 100 70 100 75 C 80 108 20 108 0 75 L 0 65 L 25 65 L 25 75 C 30 88 70 88 75 75 C 75 68 75 65 47 58 L 47 42 C 75 32 75 35 75 25 C 70 12 30 12 25 25 L 25 35"})),o.a.createElement("path",Wi({},d,{d:"M 100 35 L 100 25 C 80 -8 20 -8 0 25 C 0 30 0 50 25 50 C 0 50 0 70 0 75 C 20 108 80 108 100 75 L 100 65 L 75 65 L 75 75 C 70 88 30 88 25 75 C 25 68 25 65 53 58 L 53 42 C 25 32 25 35 25 25 C 30 12 70 12 75 25 L 75 35"})))};function rs(){return(rs=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var is=function(d){return o.a.createElement("path",rs({},d,{d:"M 50 100 C 140 30 90 0 50 0 C 10 0 0 20 0 45 C 20 70 70 70 65 50 L 70 40 C 20 50 20 15 50 20 C 90 20 52 90 10 100 L 50 100"}))},Gi=[{component:c,regex:"A",color:"red"},{component:l,regex:"B",color:"maroon"},{component:f,regex:"C",color:"blue"},{component:x,regex:"D",color:"green"},{component:T,regex:"E",color:"olive"},{component:_,regex:"F",color:"navy"},{component:C,regex:"G",color:"orange"},{component:R,regex:"H",color:"teal"},{component:F,regex:"I",color:"cadetblue"},{component:V,regex:"J",color:"lavender"},{component:_e,regex:"K",color:"chocolate"},{component:we,regex:"L",color:"coral"},{component:Ie,regex:"M",color:"darkolivegreen"},{component:$,regex:"N",color:"darkorange"},{component:j,regex:"O",color:"gold"},{component:Y,regex:"P",color:"darkorchid"},{component:ee,regex:"Q",color:"darkslateblue"},{component:W,regex:"R",color:"firebrick"},{component:re,regex:"S",color:"darkslategrey"},{component:ue,regex:"T",color:"#228b22"},{component:I,regex:"U",color:"seagreen"},{component:ae,regex:"V",color:"indigo"},{component:oe,regex:"W",color:"mediumseagreen"},{component:Qe,regex:"X",color:"black"},{component:ke,regex:"Y",color:"palevioletred"},{component:yt,regex:"Z",color:"peru"},{component:tr,regex:"a",color:"red"},{component:Zt,regex:"b",color:"maroon"},{component:f,regex:"c",color:"purple"},{component:zr,regex:"d",color:"green"},{component:Lt,regex:"e",color:"olive"},{component:Wr,regex:"f",color:"navy"},{component:nr,regex:"g",color:"orange"},{component:Yr,regex:"h",color:"teal"},{component:ir,regex:"i",color:"cadetblue"},{component:or,regex:"j",color:"lavender"},{component:cr,regex:"k",color:"chocolate"},{component:k,regex:"l",color:"coral"},{component:H,regex:"m",color:"darkolivegreen"},{component:B,regex:"n",color:"darkorange"},{component:j,regex:"o",color:"gold"},{component:te,regex:"p",color:"darkorchid"},{component:Ve,regex:"q",color:"darkslateblue"},{component:xe,regex:"r",color:"firebrick"},{component:re,regex:"s",color:"darkslategrey"},{component:Ge,regex:"t",color:"#228b22"},{component:Ye,regex:"u",color:"seagreen"},{component:ae,regex:"v",color:"indigo"},{component:oe,regex:"w",color:"mediumseagreen"},{component:Qe,regex:"x",color:"black"},{component:rt,regex:"y",color:"palevioletred"},{component:yt,regex:"z",color:"peru"},{component:j,regex:"0",color:"indianred"},{component:Ue,regex:"1",color:"red"},{component:It,regex:"2",color:"green"},{component:lr,regex:"3",color:"purple"},{component:Yo,regex:"4",color:"navy"},{component:Xo,regex:"5",color:"teal"},{component:Zo,regex:"6",color:"gold"},{component:ts,regex:"7",color:"olive"},{component:ns,regex:"8",color:"slate"},{component:is,regex:"9",color:"firebrick"}],kf=o.a.forwardRef(function(d,p){var v=d.ppm,b=d.pfm,Q=d.scale,de=d.startpos,fe=d.mode;return o.a.createElement(_n,{ppm:v,alphabet:Gi,scale:Q,mode:fe,startpos:de,pfm:b,ref:p})});function Kr(d){return function(p){if(Array.isArray(p)){for(var v=0,b=new Array(p.length);v<p.length;v++)b[v]=p[v];return b}}(d)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(d)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Yi,as=function(d,p){for(var v=(""+d).length,b=d+1;b<d+p;++b)(""+b).length>v&&(v=(""+b).length);return v},os=(Yi={},Gi.forEach(function(d){Yi[d.regex]=d}),Yi),Ki=function(d){return d.map(function(p){if(p.regex.length===1)return Object.assign({},p,{component:os[p.regex].component});for(var v=(p.color&&p.color.map&&p.color.length>=1?p.color[0]:p.color)||"#000000",b=Object.assign({},p,{component:[],color:p.color&&p.color.map&&p.color.length===p.regex.length?p.color:[]}),Q=0;Q<b.regex.length;++Q)b.component.push(os[b.regex[Q]].component),b.color.length===Q&&b.color.push(v);return b})},ss=function(d){return d.map(function(p,v){return v}).sort(function(p,v){return d[p]<d[v]?-1:d[p]===d[v]?0:1})},Xr=function(d){return Kr(Array(Math.floor(d)).keys())},Df=function(d){var p=0;return d.filter(function(v){return v>0}).forEach(function(v){p+=v}),p},Mf=function(d){return d.reduce(function(p,v){return[].concat(Kr(p),Kr(d.reduce(function(b,Q){return[].concat(Kr(b),[{component:[v.component,Q.component],color:[v.color,Q.color],regex:v.regex+Q.regex}])},[])))},[])};function Lf(d){return function(p){if(Array.isArray(p)){for(var v=0,b=new Array(p.length);v<p.length;v++)b[v]=p[v];return b}}(d)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(d)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var cs=function(d,p,v){for(var b=[],Q=Math.max.apply(Math,Lf(v.map(function(fe){return fe.length}))),de=0;de<Q;++de)b.push(d.map(function(fe){return 0}));return v.forEach(function(fe){for(var Se=0;Se<fe.length;++Se)++b[Se][p[fe[Se]]]}),{count:v.length,pfm:b}},If=function(d,p){var v={},b=[];return d.forEach(function(Q,de){v[Q.regex]=de}),p.split(`
112
+ `).forEach(function(Q){Q[0]===">"?b.push(""):b[b.length-1]+=Q.trim()}),cs(d,v,b)},Rf=function(d,p){var v={};return d.forEach(function(b,Q){v[b.regex]=Q}),cs(d,v,p.split(`
113
+ `).map(function(b){return b.trim()}))},us=function(d){var p=d.yscale,v=d.inverted,b=d.xscale,Q=d.children,de=p*(v?-1:1);return o.a.createElement("g",{transform:"scale("+b+","+de+")"},Q)};function Xi(){return(Xi=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ls=function(d){var p=d.height,v=d.width,b=d.indices,Q=d.alphabet,de=d.lv,fe=d.transform,Se=d.alpha,Ze=d.inverted,Ke=d.onSymbolMouseOver,et=d.onSymbolMouseOut,it=d.onSymbolClick,Ne=p,ct=v/100;Se=Se||1;var at=b.map(function(he){if(!Q[he]||!Q[he].component||de[he]===0)return null;Ne-=100*de[he];var qe=Ze?Ne+100*de[he]:Ne;if(!Q[he].component.map){var ut=Q[he].component;return o.a.createElement("g",{transform:"translate(0,"+qe+")",key:he,onMouseOver:Ke&&function(){return Ke(Q[he])},onMouseOut:et&&function(){return et(Q[he])},onClick:it&&function(){return it(Q[he])}},o.a.createElement(us,{xscale:ct,yscale:de[he],inverted:Ze},o.a.createElement(ut,Xi({fill:Q[he].color,fillOpacity:Se},Q[he]))))}var kt=.8*ct/Q[he].component.length;return Q[he].color.map||(Q[he].color=Q[he].component.map(function(Ut){return Q[he].color})),Q[he].component.map(function(Ut,Bt){return o.a.createElement("g",{transform:"translate("+(Bt*v*.8/Q[he].component.length+.1*v)+","+qe+")",key:he+"_"+Bt,onMouseOver:Ke&&function(){return Ke(Q[he])},onMouseOut:et&&function(){return et(Q[he])},onClick:it&&function(){return it(Q[he])}},o.a.createElement(us,{xscale:kt,yscale:de[he],inverted:Ze},o.a.createElement(Ut,Xi({fill:Q[he].color[Bt],fillOpacity:Se},Q[he]))))})});return o.a.createElement("g",{transform:fe},at)},fs=function(d){var p=d.n,v=d.transform,b=d.glyphWidth,Q=d.startpos,de=Xr(p);return o.a.createElement("g",{transform:v},o.a.createElement("g",{transform:"rotate(-90)"},de.map(function(fe){return o.a.createElement("text",{x:"0",y:b*(fe+.66),fontSize:"18",textAnchor:"end",key:fe},fe+Q)})))},jf=function(d){var p=d.bits,v=d.transform,b=d.height,Q=d.width,de=d.zeroPoint,fe=Xr(p+1);return de===void 0&&(de=1),o.a.createElement("g",{transform:v},o.a.createElement("rect",{height:b,width:4,x:Q+1,y:0,fill:"#000000"}),fe.map(function(Se){return o.a.createElement("g",{key:Se,transform:"translate(0,"+(b*de-Math.floor(Se*(b*de)/p))+")"},o.a.createElement("text",{x:Q-15,textAnchor:"end",y:"4",fontSize:"18"},Se),o.a.createElement("rect",{x:Q-10,width:"15",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"20",x:-b/2,textAnchor:"middle",fontSize:"18"},"bits")))},Pf=function(d){var p=d.ticks,v=d.transform,b=d.height,Q=d.width,de=Xr(p+1).map(function(fe){return fe/p});return o.a.createElement("g",{transform:v},o.a.createElement("rect",{height:b,width:4,x:Q+1,y:"0",fill:"#000000"}),de.map(function(fe){return o.a.createElement("g",{key:fe,transform:"translate(0,"+(b-Math.floor(fe*b))+")"},o.a.createElement("text",{x:Q-10,textAnchor:"end",y:"4",fontSize:"18"},(fe+"").substring(0,4)),o.a.createElement("rect",{x:Q-5,width:"10",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"15",x:-b/2,textAnchor:"middle",fontSize:"18"},"frequency")))},hs=function(d){var p=d.minrange,v=d.maxrange,b=d.xstart,Q=d.width,de=d.height,fe=d.xaxis_y,Se=d.numberofgridlines,Ze=d.stroke,Ke=function(he,qe){return function(ut){return qe[0]+(qe[1]-qe[0])*((ut-he[0])/(he[1]-he[0]))}}([p,v],[b,Q]),et=v-p,it=fe+de,Ne=Math.ceil(et)/Se,ct=Math.ceil(et/Ne),at=Array.from(Array(ct).keys());return o.a.createElement("g",{stroke:Ze},at.map(function(he){var qe=p+Ne*he;return o.a.createElement("line",{key:he,x1:Ke(qe),x2:Ke(qe),y1:fe,y2:it})}),o.a.createElement("line",{x1:Ke(v),x2:Ke(v),y1:fe,y2:it}),";")};function ds(d){return function(p){if(Array.isArray(p)){for(var v=0,b=new Array(p.length);v<p.length;v++)b[v]=p[v];return b}}(d)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(d)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ji=function(d){var p,v,b=d.values,Q=d.glyphWidth,de=d.stackHeight,fe=d.alphabet,Se=d.onSymbolMouseOver,Ze=d.onSymbolMouseOut,Ke=d.onSymbolClick,et=(p=Q,v=de,function(Ne,ct,at,he,qe){var ut=ss(Ne),kt=qe||{},Ut=kt.onSymbolMouseOver,Bt=kt.onSymbolMouseOut,Dn=kt.onSymbolClick;return o.a.createElement(ls,{indices:ut,alphabet:he,onSymbolMouseOver:Ut?function(bt){return Ut(at,bt)}:null,onSymbolClick:Dn?function(bt){return Dn(at,bt)}:null,onSymbolMouseOut:Bt?function(bt){return Bt(at,bt)}:null,lv:Ne,transform:ct,width:p,height:v,key:at})});for(var it in fe)if(!it.component){fe=Ki(fe);break}return b.map(function(Ne,ct){return et(Ne,"translate("+Q*ct+",0)",ct,fe,{onSymbolMouseOver:Se,onSymbolMouseOut:Ze,onSymbolClick:Ke})})},_n=o.a.forwardRef(function(d,p){var v=d.ppm,b=d.pfm,Q=d.values,de=d.fasta,fe=d.mode,Se=d.height,Ze=d.width,Ke=d.alphabet,et=d.glyphwidth,it=d.scale,Ne=d.startpos,ct=d.showGridLines,at=d.backgroundFrequencies,he=d.constantPseudocount,qe=d.smallSampleCorrectionOff,ut=d.yAxisMax,kt=d.onSymbolMouseOver,Ut=d.onSymbolMouseOut,Bt=d.onSymbolClick,Dn=d.noFastaNames,bt=d.countUnaligned,jt=null,Pt=!(!b&&!de||he||bt)&&!qe,Mn=Pt?0:(he||0)/Ke.length;if(!v&&!b&&de){var Cs=(Dn?Rf:If)(Ke,de.toUpperCase());b=Cs.pfm,jt=Cs.count||1}var gh=Pt&&b&&b.map&&b.map(function(xt){return xt.reduce(function(vn,hr,en){return en===void 0?vn:hr+vn},0)}).map(function(xt){return xt===0?0:(Ke.length-1)/(2*Math.log(2)*xt)});if(!v&&b&&b.map&&(v=b.map(function(xt,vn){var hr=(jt&&bt?jt:xt.reduce(function(en,na){return en+na},0)+Mn*Ke.length)||1;return xt.map(function(en){return(en+Mn)/hr})})),v.length===0||v[0].length===0)return o.a.createElement("div",null);var Zi=v[0].length;at||(at=v[0].map(function(xt){return 1/Zi}));var fr=Q||(fe!=="FREQUENCY"?v.map(function(xt,vn){return function(hr){return function(en,na){var Ms=0,yh=na||0;return en.map(function(dr,Zr){return Ms+=dr===0?0:dr*Math.log2(dr/(hr[Zr]||.01))}),en.map(function(dr){var Zr=dr*(Ms-yh);return Zr<=0?0:Zr})}}(at)(xt,gh[vn])}):v.map(function(xt){return xt.map(function(vn){return vn*Math.log2(Zi)})})),_s=fe==="FREQUENCY"?[Math.log2(Zi)]:at.map(function(xt){return Math.log2(1/(xt||.01))}),Jr=ut||Math.max.apply(Math,ds(_s)),ks=Math.min.apply(Math,ds(_s)),vh=ks<0?Jr/(Jr-ks):1;Ne=!isNaN(parseFloat(Ne))&&isFinite(Ne)?Ne:1;var gn=100*Jr,ea=gn/6*(et||1),ta=fr.length*ea+80,Ds=gn+18*(as(Ne,fr.length)+1);return it&&(ta>Ds?Ze=it:Se=it),o.a.createElement("svg",{width:Ze,height:Se,viewBox:"0 0 "+ta+" "+Ds,ref:p},ct&&o.a.createElement(hs,{minrange:Ne,maxrange:Ne+v.length,xstart:70,width:ta,height:gn,xaxis_y:10,numberofgridlines:10*fr.length}),o.a.createElement(fs,{transform:"translate(80,"+(gn+20)+")",n:fr.length,glyphWidth:ea,startpos:Ne}),fe==="FREQUENCY"?o.a.createElement(Pf,{transform:"translate(0,10)",width:65,height:gn,ticks:2}):o.a.createElement(jf,{transform:"translate(0,10)",width:65,height:gn,bits:Jr,zeroPoint:vh}),o.a.createElement("g",{transform:"translate(80,10)"},o.a.createElement(Ji,{values:fr,glyphWidth:ea,stackHeight:gn,alphabet:Ke,onSymbolMouseOver:kt,onSymbolMouseOut:Ut,onSymbolClick:Bt})))}),Nf=function(d){var p=d.transform,v=d.min,b=d.max,Q=d.width,de=d.height,fe=[v,0,b];return o.a.createElement("g",{transform:p},o.a.createElement("rect",{height:de,width:4,x:Q+1,y:"0",fill:"#000000"}),fe.map(function(Se){return o.a.createElement("g",{key:Se,transform:"translate(0,"+(de-Se/b*de)/2+")"},o.a.createElement("text",{x:Q-10,textAnchor:"end",y:"4",fontSize:"18"},(Se+"").substring(0,4)),o.a.createElement("rect",{x:Q-5,width:"10",height:"4",y:"-2",fill:"#000000"}))}),o.a.createElement("g",{transform:"rotate(-90)"},o.a.createElement("text",{y:"15",x:-de/2,textAnchor:"middle",fontSize:"18"},"frequency")))};function ms(d){return function(p){if(Array.isArray(p)){for(var v=0,b=new Array(p.length);v<p.length;v++)b[v]=p[v];return b}}(d)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(d)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ps=function(d,p,v,b){return function(Q,de,fe,Se,Ze,Ke){var et,it=Ze?(et=Q).map(function(qe,ut){return ut}).sort(function(qe,ut){return et[qe]<et[ut]?1:et[qe]===et[ut]?0:-1}):ss(Q),Ne=Ke||{},ct=Ne.onSymbolMouseOver,at=Ne.onSymbolMouseOut,he=Ne.onSymbolClick;return o.a.createElement(ls,{indices:it,alphabet:Se,alpha:v,lv:Q,transform:de,width:d,height:p,onSymbolMouseOver:ct?function(qe){return ct(fe,qe)}:null,onSymbolClick:he?function(qe){return he(fe,qe)}:null,onSymbolMouseOut:at?function(qe){return at(fe,qe)}:null,key:fe,inverted:b})}},gs=o.a.forwardRef(function(d,p){var v=d.values,b=d.height,Q=d.width,de=d.alphabet,fe=d.scale,Se=d.startpos,Ze=d.negativealpha,Ke=d.showGridLines,et=d.inverted,it=d.onSymbolMouseOver,Ne=d.onSymbolMouseOut,ct=d.onSymbolClick;if(v.length===0||v[0].length===0)return o.a.createElement("div",null);v[0].length;for(var at in de)if(!at.component){de=Ki(de);break}Se=Se??1,Ze=(Ze=Ze<0?0:Ze)>255?255:Ze;var he=v.map(Df),qe=v.map(function(bt){return-function(jt){var Pt=0;return jt.filter(function(Mn){return Mn<0}).forEach(function(Mn){Pt+=Mn}),Pt}(bt)}),ut=Math.max.apply(Math,ms(he).concat(ms(qe))),kt=v.length*(200/6)+80,Ut=200+18*(as(Se,v.length)+1),Bt=ps(200/6,200/2.05),Dn=ps(200/6,-200/2.05,Ze/255,et);return fe&&(kt>Ut?Q=fe:b=fe),o.a.createElement("svg",{ref:p,width:Q,height:b,viewBox:"0 0 "+kt+" "+Ut},Ke&&o.a.createElement(hs,{minrange:Se,maxrange:Se+v.length,xstart:70,width:kt,height:200,xaxis_y:10,numberofgridlines:10*v.length}),o.a.createElement(fs,{transform:"translate(80,220)",n:v.length,glyphWidth:200/6,startpos:Se}),o.a.createElement(Nf,{transform:"translate(0,10)",width:65,height:200,min:-ut,max:ut}),o.a.createElement("line",{style:{fill:"none",stroke:"#000000",strokeWidth:2,strokeLinecap:"butt",strokeLinejoin:"miter",strokeOpacity:1,strokeMiterlimit:4,strokeDasharray:"0.53,1.59",strokeDashoffset:0},transform:"translate(80,111)",x1:0,x2:kt-80}),o.a.createElement("g",{transform:"translate(80,10)"},v.map(function(bt,jt){return Bt(bt.map(function(Pt){return Pt>0?Pt/ut:0}),"translate("+200/6*jt+",0)",jt,de,!1,{onSymbolMouseOver:it,onSymbolMouseOut:Ne,onSymbolClick:ct})}),v.map(function(bt,jt){return Dn(bt.map(function(Pt){return Pt<0?Pt/ut:0}),"translate("+200/6*jt+",200)",jt,de,!0,{onSymbolMouseOver:it,onSymbolMouseOut:Ne,onSymbolClick:ct})})))});function vs(){return(vs=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var ys=[{component:c,regex:"A",color:"black"},{component:l,regex:"B",color:"#bb8800"},{component:f,regex:"C",color:"#008811"},{component:x,regex:"D",color:"#ff0000"},{component:T,regex:"E",color:"#ff0022"},{component:_,regex:"F",color:"#333333"},{component:C,regex:"G",color:"#007700"},{component:R,regex:"H",color:"#220099"},{component:F,regex:"I",color:"#111111"},{component:_e,regex:"K",color:"#0000aa"},{component:we,regex:"L",color:"#002222"},{component:Ie,regex:"M",color:"#220022"},{component:$,regex:"N",color:"#009911"},{component:Y,regex:"P",color:"#080808"},{component:ee,regex:"Q",color:"#00aa00"},{component:W,regex:"R",color:"#0022aa"},{component:re,regex:"S",color:"#008f00"},{component:ue,regex:"T",color:"#006600"},{component:ae,regex:"V",color:"#222200"},{component:oe,regex:"W",color:"#080808"},{component:ke,regex:"Y",color:"#00a800"},{component:yt,regex:"Z",color:"#aaaa00"}],bs=o.a.forwardRef(function(d,p){return o.a.createElement(_n,vs({alphabet:ys},d,{ref:p}))});function xs(){return(xs=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Es=[{component:c,regex:"A",color:"red"},{component:f,regex:"C",color:"blue"},{component:C,regex:"G",color:"orange"},{component:ue,regex:"T",color:"#228b22"}],ws=o.a.forwardRef(function(d,p){return o.a.createElement(_n,xs({alphabet:Es},d,{ref:p}))});function Ss(){return(Ss=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var v=arguments[p];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(d[b]=v[b])}return d}).apply(this,arguments)}var Os=[{component:c,regex:"A",color:"red"},{component:f,regex:"C",color:"blue"},{component:C,regex:"G",color:"orange"},{component:I,regex:"U",color:"seagreen"}],Ts=o.a.forwardRef(function(d,p){return o.a.createElement(_n,Ss({alphabet:Os},d,{ref:p}))}),kn=i(1),Af=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(ws,p))},Ff=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(Ts,p))},Vf=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(bs,p))},qf=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(_n,p))},$f=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(Ji,p))},Uf=function(d,p){d.innerHTML=Object(kn.renderToStaticMarkup)(o.a.createElement(gs,p))};i.d(r,"LC_a",function(){return Bf}),i.d(r,"LC_b",function(){return Hf}),i.d(r,"LC_c",function(){return zf}),i.d(r,"LC_d",function(){return Qf}),i.d(r,"LC_e",function(){return Wf}),i.d(r,"LC_f",function(){return Gf}),i.d(r,"LC_g",function(){return Yf}),i.d(r,"LC_h",function(){return Kf}),i.d(r,"LC_i",function(){return Xf}),i.d(r,"LC_j",function(){return Jf}),i.d(r,"LC_k",function(){return Zf}),i.d(r,"LC_l",function(){return eh}),i.d(r,"LC_m",function(){return th}),i.d(r,"LC_n",function(){return nh}),i.d(r,"LC_o",function(){return rh}),i.d(r,"LC_p",function(){return ih}),i.d(r,"LC_q",function(){return ah}),i.d(r,"LC_r",function(){return oh}),i.d(r,"LC_s",function(){return sh}),i.d(r,"LC_t",function(){return ch}),i.d(r,"LC_u",function(){return uh}),i.d(r,"LC_v",function(){return lh}),i.d(r,"LC_w",function(){return fh}),i.d(r,"LC_x",function(){return hh}),i.d(r,"LC_y",function(){return dh}),i.d(r,"LC_z",function(){return mh}),i.d(r,"N0",function(){return ph}),i.d(r,"Logo",function(){return _n}),i.d(r,"ProteinLogo",function(){return bs}),i.d(r,"DNALogo",function(){return ws}),i.d(r,"RNALogo",function(){return Ts}),i.d(r,"ProteinAlphabet",function(){return ys}),i.d(r,"DNAAlphabet",function(){return Es}),i.d(r,"RNAAlphabet",function(){return Os}),i.d(r,"CompleteLogo",function(){return kf}),i.d(r,"CompleteAlphabet",function(){return Gi}),i.d(r,"INFORMATION_CONTENT",function(){return"INFORMATION_CONTENT"}),i.d(r,"FREQUENCY",function(){return"FREQUENCY"}),i.d(r,"xrange",function(){return Xr}),i.d(r,"LogoWithNegatives",function(){return gs}),i.d(r,"embedDNALogo",function(){return Af}),i.d(r,"disymbolAlphabet",function(){return Mf}),i.d(r,"RawLogo",function(){return Ji}),i.d(r,"embedRNALogo",function(){return Ff}),i.d(r,"embedLogoWithNegatives",function(){return Uf}),i.d(r,"embedProteinLogo",function(){return Vf}),i.d(r,"embedLogo",function(){return qf}),i.d(r,"embedRawLogo",function(){return $f}),i.d(r,"loadGlyphComponents",function(){return Ki}),i.d(r,"A",function(){return c}),i.d(r,"B",function(){return l}),i.d(r,"C",function(){return f}),i.d(r,"D",function(){return x}),i.d(r,"E",function(){return T}),i.d(r,"F",function(){return _}),i.d(r,"G",function(){return C}),i.d(r,"H",function(){return R}),i.d(r,"I",function(){return F}),i.d(r,"J",function(){return V}),i.d(r,"K",function(){return _e}),i.d(r,"L",function(){return we}),i.d(r,"M",function(){return Ie}),i.d(r,"N",function(){return $}),i.d(r,"O",function(){return j}),i.d(r,"P",function(){return Y}),i.d(r,"Q",function(){return ee}),i.d(r,"R",function(){return W}),i.d(r,"S",function(){return re}),i.d(r,"T",function(){return ue}),i.d(r,"U",function(){return I}),i.d(r,"V",function(){return ae}),i.d(r,"W",function(){return oe}),i.d(r,"X",function(){return Qe}),i.d(r,"Y",function(){return ke}),i.d(r,"Z",function(){return yt}),i.d(r,"N1",function(){return Ue}),i.d(r,"N2",function(){return It}),i.d(r,"N3",function(){return lr}),i.d(r,"N4",function(){return Yo}),i.d(r,"N5",function(){return Xo}),i.d(r,"N6",function(){return Zo}),i.d(r,"N7",function(){return ts}),i.d(r,"N8",function(){return ns}),i.d(r,"N9",function(){return is});var Bf=tr,Hf=Zt,zf=f,Qf=zr,Wf=Lt,Gf=Wr,Yf=nr,Kf=Yr,Xf=ir,Jf=or,Zf=cr,eh=k,th=H,nh=B,rh=j,ih=te,ah=Ve,oh=xe,sh=re,ch=Ge,uh=Ye,lh=ae,fh=oe,hh=Qe,dh=rt,mh=yt,ph=j}])})})(zu);var y0=zu.exports,Fn=y0;const Gs=new Map([["A",Fn.A],["C",Fn.C],["G",Fn.G],["T",Fn.T]]),b0=new Map([["A","#008800"],["C","#000088"],["G","#a89132"],["T","#880000"]]),x0=e=>{const[t,n,r]=E.useMemo(()=>e.transform(e.importance),[e.transform,e.importance]);return Gs.get(e.base)?m.jsxs(m.Fragment,{children:[m.jsx("rect",{fill:"#000000",fillOpacity:0,y:0,x:e.x,width:e.totalWidth,height:e.totalHeight,onMouseOver:e.onMouseOver,onMouseOut:e.onMouseOut,onMouseDown:e.onClick,onMouseUp:e.onMouseUp}),m.jsx("g",{transform:`${r} translate(${e.x},${t}) scale(${e.xScale},${n})`,children:E.createElement(Gs.get(e.base),{fill:b0.get(e.base)})})]}):null};function E0(e){return e.sequence!==void 0}const w0=e=>{const[t,n,r]=g0(e.data,e.height),i=v0(e.annotations||[],t,r),[a]=E.useState(null),o=E.useMemo(()=>e.width/t.length/100,[e.width,t.length]),s=E.useMemo(()=>n(0)[0],[n]),c=E.useMemo(()=>i.map((h,f)=>{const g=100*o*Math.abs(h.coordinates[1]-h.coordinates[0]),x=Math.min(...h.coordinates)*o*100,w=h.y+h.height,T=80;return m.jsxs(E.Fragment,{children:[m.jsx("rect",{fill:h.color,fillOpacity:.4,x,width:g,height:h.height,y:h.y}),m.jsx("path",{fill:h.color,fillOpacity:.4,d:`M ${x} ${w} L ${x-g} ${w+T} L ${x-g} ${w+h.height*3} L ${x+g*2} ${w+h.height*3} L ${x+g*2} ${w+T} L ${x+g} ${w} L ${x} ${w}`}),m.jsx("g",{transform:`translate(${x-g},${w+T})`,children:h.children})]},f)}),[i,o]),u=E.useMemo(()=>t.map((h,f)=>h.importance?m.jsx(x0,{totalWidth:o*100,totalHeight:e.height,x:f*o*100,xScale:o,transform:n,onMouseOut:e.onBaseMousedOut,...h},f):null),[t,o,e.height,n,e.onBaseMousedOut]),l=E.useMemo(()=>t.filter(h=>h.importance).length>0?m.jsx("line",{stroke:"#ff0000",strokeWidth:1,...e.zeroLineProps,x1:0,x2:e.width,y1:s,y2:s}):m.jsx("text",{x:0,y:e.height/2,children:"No importance track data"}),[t,e.width,e.height,s,e.zeroLineProps]);return m.jsx(Mt,{canDrag:!0,children:m.jsxs("g",{children:[a!==null&&m.jsx("rect",{fill:"#93ceed",fillOpacity:.4,x:Math.min(...a)*o*100,width:100*o*Math.abs(a[1]-a[0]),height:e.height}),c,u,l]})})},Qu={titleSize:12,trackMargin:12,canDrag:!0};function Wu(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data);E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]);const a={...e,trackType:J.IMPORTANCE,displayMode:e.displayMode};return m.jsx(tt,{...a,loading:t,trackType:J.IMPORTANCE,displayMode:e.displayMode,children:m.jsx(w0,{...e,data:r})})}function Ys(e,t,n){const r=[],i=e.sort((a,o)=>a.start-o.start);return i.forEach((a,o)=>{var l;let s=0,c=a.pwm&&a.pwm.length||0;s=a.start<n.start?n.start-a.start:0,c=a.end>n.end?n.end-a.start:c;const u=a.pwm?(l=a.pwm)==null?void 0:l.slice(s,c):void 0;o===0||a.start>i[o-1].end?r.push({start:t(a.start)<0?0:t(a.start),end:t(a.end)<0?0:t(a.end),pwm:u}):r[r.length-1].end=t(a.end)}),r}function Ks(e,t,n){return Ar(e.sort((r,i)=>r.start-i.start).map(r=>({coordinates:{start:r.start,end:r.end},pwm:r.pwm,name:""})),t,0).map(r=>r.map(i=>{var c;let a=0,o=i.pwm&&i.pwm.length||0;a=i.coordinates.start<n.start?n.start-i.coordinates.start:0,o=i.coordinates.end>n.end?n.end-i.coordinates.start:o;const s=i.pwm?(c=i.pwm)==null?void 0:c.slice(a,o):void 0;return{start:t(i.coordinates.start)<0?0:t(i.coordinates.start),end:t(i.coordinates.end),pwm:s}}))}const S0=e=>{const t=E.useContext(Jt),n=(l,h)=>{if(e.svgRef){const f=mn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-h.pwm.length*20?f[0]-h.pwm.length*20+10:f[0]+10,y:f[1],width:h.pwm.length*20,height:150,content:m.jsx("div",{style:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",paddingRight:"15px",paddingTop:"10px",paddingLeft:"5px",position:"relative",width:h.pwm.length*20,height:150,backgroundColor:"white"},children:m.jsx(Fn.DNALogo,{ppm:h.pwm,mode:"INFORMATION_CONTENT",width:h.pwm.length*20,height:150})})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=E.useMemo(()=>Ks(e.data,a,e.domain),[e.data,e.domain,e.width]),s=E.useMemo(()=>Ks(e.peaks||[],a,e.domain),[e.peaks,e.domain,e.width]),c=Math.max(e.rowHeight*o.length,35),u=e.id||i.current.toString();return E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(c)},[o,e.rowHeight,e.onHeightChanged]),m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{width:e.width,height:c,clipPath:`url(#${u})`,children:[m.jsx("rect",{width:e.width,height:c,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:u,width:e.width,height:c})}),s.map((l,h)=>m.jsx("g",{transform:`translate(0, ${h*e.rowHeight})`,children:l.map((f,g)=>m.jsx("rect",{height:e.rowHeight*.6,width:f.end-f.start<1?1:f.end-f.start,x:f.start,y:e.rowHeight*.2,fill:e.peakColor||"#3287a8",style:{cursor:"pointer"}},`${u}_peak_${h}_${g}`))},`group_peak_${h}`)),o.map((l,h)=>m.jsx("g",{transform:`translate(0, ${h*e.rowHeight})`,children:l.map((f,g)=>m.jsx("rect",{height:e.rowHeight*.6,width:f.end-f.start<1?1:f.end-f.start,x:f.start,y:e.rowHeight*.2,fill:e.color||"#000088",style:{cursor:"pointer"},onMouseOut:r,onMouseOver:x=>{x.persist(),f.pwm&&n(x,f)}},`${u}_${h}_${g}`))},`group_${h}`))]})})},O0=e=>{const t=E.useContext(Jt),n=(l,h)=>{if(e.svgRef){const f=mn(e.svgRef.current,l);t.setTooltip({show:!0,x:f[0]>e.width-h.pwm.length*20?f[0]-h.pwm.length*20+10:f[0]+10,y:f[1],width:h.pwm.length*20,height:150,content:m.jsx("div",{style:{boxShadow:"0 0 4px 0 rgba(0, 0, 0, 0.2)",paddingRight:"15px",paddingTop:"10px",paddingLeft:"5px",position:"relative",width:h.pwm.length*20,height:150,backgroundColor:"white"},children:m.jsx(Fn.DNALogo,{ppm:h.pwm,mode:"INFORMATION_CONTENT",width:h.pwm.length*20,height:150})})})}},r=()=>{t.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},i=E.useRef($t()),a=E.useCallback(Ct(e.domain,e.width),[e.data]),o=e.id||i.current.toString(),s=E.useMemo(()=>Ys(e.data,a,e.domain),[e.domain,e.width,e.data]),c=E.useMemo(()=>Ys(e.peaks||[],a,e.domain),[e.domain,e.width,e.peaks]);E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const u=Math.max(e.height,35);return m.jsx(Mt,{canDrag:e.canDrag||!1,children:m.jsxs("g",{width:e.width,height:u,clipPath:`url(#${o})`,children:[m.jsx("rect",{width:e.width,height:u,fill:"white"}),m.jsx("defs",{children:m.jsx(Wt,{id:o,width:e.width,height:u})}),c.map((l,h)=>m.jsx("rect",{height:u*.6,width:l.end-l.start,x:l.start,y:u*.2,fill:e.peakColor||"#3287a8",style:{cursor:"pointer"}},`${o}_peak_${h}`)),s.map((l,h)=>m.jsx("rect",{height:u*.6,width:l.end-l.start,x:l.start,y:u*.2,fill:e.color||"#000088",style:{cursor:"pointer"},onMouseOut:r,onMouseOver:f=>{f.persist(),l.pwm&&n(f,l)}},`${o}_${h}`))]})})},Gu={trackType:J.MOTIF,titleSize:12,trackMargin:12,height:50,displayMode:Pe.SQUISH,canDrag:!0};function Yu(e){const[t,n]=E.useState(!e.data),[r,i]=E.useState(e.data);E.useEffect(()=>{e.data?(i(e.data),n(!1)):n(!0)},[e.data]);const a={...e,trackType:J.MOTIF,displayMode:e.displayMode};switch(e.displayMode){case Pe.SQUISH:return m.jsx(tt,{...a,loading:t,trackType:J.MOTIF,displayMode:e.displayMode,children:m.jsx(S0,{...e,data:r})});case Pe.DENSE:return m.jsx(tt,{...a,loading:t,trackType:J.MOTIF,displayMode:e.displayMode,children:m.jsx(O0,{...e,data:r})});case Pe.HIDE:return null;default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),m.jsx(tt,{...a,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}const T0=[{text:"African",value:"AFRICAN"},{text:"Native American",value:"AMERICAN"},{text:"East Asian",value:"EAST_ASIAN"},{text:"European",value:"EUROPEAN"},{text:"South Asian",value:"SOUTH_ASIAN"}],C0=new Map([["AFRICAN",[null,{text:"Gambian",value:"GAMBIAN"},{text:"Mende",value:"MENDE"},{text:"Easn",value:"ESAN"},{text:"African American",value:"AFRICAN_AMERICAN"},{text:"African Caribbean",value:"AFRICAN_CARIBBEAN"}]],["AMERICAN",[null,{text:"Mexican",value:"MEXICAN"},{text:"Puerto Rican",value:"PUERTO_RICAN"},{text:"Colombian",value:"COLOMBIAN"},{text:"Peruvian",value:"PERUVIAN"}]],["EAST_ASIAN",[null,{text:"Han Chinese from Beijing",value:"HAN_CHINESE_BEIJING"},{text:"Japanese",value:"JAPANESE"},{text:"Dai",value:"DAI"},{text:"Kinh",value:"KINH"},{text:"Southern Han Chinese",value:"SOUTHERN_HAN_CHINESE"}]],["EUROPEAN",[null,{text:"Iberian",value:"IBERIAN"},{text:"British",value:"BRITISH"},{text:"Finnish",value:"FINNISH"},{text:"Toscani",value:"TOSCANI"},{text:"Utah resident northwest European",value:"UTAH_RESIDENT_NW_EUROPEAN"}]],["SOUTH_ASIAN",[null,{text:"Gujarati",value:"GUJARATI"},{text:"Punjabi",value:"PUNJABI"},{text:"Bengali",value:"BENGALI"},{text:"Sri Lankan Tamil",value:"SRI_LANKAN_TAMIL"},{text:"Indian Telugu",value:"INDIAN_TELUGU"}]]]),Xs=T0.flatMap(e=>(C0.get(e.value)??[]).filter(n=>n!==null).map(n=>({population:e.value,subpopulation:n.value})));function _0(e,t,n,r,i){const a=new Map,o=[];return e.sort((s,c)=>s.domain.start-c.domain.start).forEach(s=>{const c=t.has(s.id),u=c?2:1,l=n(s.domain.start),h=n(s.domain.end)-l<u?l+u:n(s.domain.end),f=o[o.length-1]&&o[o.length-1].domain.end;a.set(s.id,(h+l)/2),f&&f>l?(o[o.length-1].domain.end=h,c&&(o[o.length-1].taller=!0,o[o.length-1].color=r)):o.push({...s,domain:{start:l,end:h},color:c?r:i,taller:c})}),{snps:o,coords:a}}function k0(e,t,n,r,i,a){const o=e.get(t),s=u=>r((u.coordinates.start+u.coordinates.end)/2),c=Ud({start:i,end:1},{start:Hs("0000ED"),end:Hs("000000")});return o===void 0?[]:n.filter(u=>u.rSquared>i).map(u=>({d:`M ${o} ${a*.7} Q ${(o+s(u))/2} 0 ${s(u)} ${a*.7}`,stroke:`#FF${Id(Math.floor(c(u.rSquared)))}00`}))}const D0=e=>{var T,O,_;const[t,n]=E.useState(e.anchor),r=E.useContext(Jt),i=(y,C)=>{if(n(C.id),e.svgRef){const S=mn(e.svgRef.current,y);r.setTooltip({show:!0,x:S[0]>e.width-120?S[0]-120+15:S[0]+15,y:S[1]+10,width:120,height:50,content:m.jsx("span",{style:{fontSize:"10px"},children:C.id})})}e.onVariantMouseOver&&e.onVariantMouseOver(C)},a=()=>{r.setTooltip({show:!1,x:0,y:0,content:void 0,width:0,height:0})},o=E.useRef($t()),s=E.useCallback(Ct(e.domain,e.width),[(T=e.data)==null?void 0:T.snps]),c=e.color||"#000000",u=e.ldThreshold||.7,l=e.highlightColor||"#ff0000",h=e.highlighted||new Set,f=E.useMemo(()=>_0(e.data.snps,h,s,l,c),[e.domain,e.width,e.data.snps,e.highlighted,l,c]),g=e.data.ld&&E.useMemo(()=>k0(f.coords,t||"",e.data.ld.filter(y=>y.coordinates),s,u,e.height),[f,e.height,t,e.data.ld,e.domain,e.ldThreshold]);E.useEffect(()=>{e.onHeightChanged&&e.onHeightChanged(e.height)},[e.height]);const x=t&&f.snps.find(y=>y.id===t),w=f.snps.find(y=>y.id===t);return E.useMemo(()=>m.jsxs(Mt,{canDrag:e.canDrag||!1,children:[m.jsx("rect",{width:e.width,height:e.height,fill:"white",onMouseOut:a}),m.jsxs("g",{className:e.className,width:e.width,height:e.height,clipPath:`url(#${o.current})`,children:[m.jsx("defs",{children:m.jsx(Wt,{id:o.current,width:e.width,height:e.height})}),x&&(g==null?void 0:g.length)===0&&m.jsx("text",{fill:"#ff0000",fontSize:10,x:e.width/2-150,y:20,style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},children:`There are no SNPs in LD (r-squared > ${u}) with ${t} in ${e.id} track`}),x&&m.jsx("rect",{height:e.height*(w.taller?1:.6)*(t?.25:.6),width:1,x:w.domain.end,y:e.height-e.height*(w.taller?1:.6)*(t?.25:.6),fill:"#0000ff"},`${t}`),f.snps.map((y,C)=>{const S=e.height*(y.taller?1:.6)*(t?.25:.6);return m.jsx("rect",{style:{cursor:"pointer"},height:S,width:y.domain.end-y.domain.start,x:y.domain.start,y:e.height-S,fill:y.color,onMouseOver:R=>i(R,y),onMouseOut:()=>{a(),e.onVariantMouseOut&&e.onVariantMouseOut(y)},onClick:()=>e.onVariantClick&&e.onVariantClick(y)},`${e.id}_${C}`)}),g&&g.map((y,C)=>m.jsx("path",{d:y.d,stroke:y.stroke,fill:"none",strokeWidth:2},`${e.id}_path_${C}`))]})]}),[c,(O=e.data)==null?void 0:O.snps,e.ldThreshold,e.highlighted,e.highlightColor,(_=e.data)==null?void 0:_.ld,e.domain,e.height,e.width,e.id])};var Ra=function(e,t){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ra(e,t)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ra(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var D=function(){return D=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},D.apply(this,arguments)};function Vt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function an(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(l){try{u(r.next(l))}catch(h){o(h)}}function c(l){try{u(r.throw(l))}catch(h){o(h)}}function u(l){l.done?a(l.value):i(l.value).then(s,c)}u((r=r.apply(e,t||[])).next())})}function on(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(l){u=[6,l],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function wt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var va="Invariant Violation",Js=Object.setPrototypeOf,M0=Js===void 0?function(e,t){return e.__proto__=t,e}:Js,Ku=function(e){Gt(t,e);function t(n){n===void 0&&(n=va);var r=e.call(this,typeof n=="number"?va+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=va,M0(r,t.prototype),r}return t}(Error);function bn(e,t){if(!e)throw new Ku(t)}var Xu=["debug","log","warn","error","silent"],L0=Xu.indexOf("log");function ri(e){return function(){if(Xu.indexOf(e)>=L0){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=ri("debug"),e.log=ri("log"),e.warn=ri("warn"),e.error=ri("error")})(bn||(bn={}));var Eo="3.11.10";function Ft(e){try{return e()}catch{}}const ja=Ft(function(){return globalThis})||Ft(function(){return window})||Ft(function(){return self})||Ft(function(){return global})||Ft(function(){return Ft.constructor("return this")()});var Zs=new Map;function Pa(e){var t=Zs.get(e)||1;return Zs.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function Ju(e,t){t===void 0&&(t=0);var n=Pa("stringifyForDisplay");return JSON.stringify(e,function(r,i){return i===void 0?n:i},t).split(JSON.stringify(n)).join("<undefined>")}function ii(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(typeof t=="number"){var i=t;t=wo(i),t||(t=So(i,n),n=[])}e.apply(void 0,[t].concat(n))}}var ie=Object.assign(function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];t||bn(t,wo(n,r)||So(n,r))},{debug:ii(bn.debug),log:ii(bn.log),warn:ii(bn.warn),error:ii(bn.error)});function vt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Ku(wo(e,t)||So(e,t))}var ec=Symbol.for("ApolloErrorMessageHandler_"+Eo);function Zu(e){if(typeof e=="string")return e;try{return Ju(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function wo(e,t){if(t===void 0&&(t=[]),!!e)return ja[ec]&&ja[ec](e,t.map(Zu))}function So(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:Eo,message:e,args:t.map(Zu)})))}function li(e,t){if(!!!e)throw new Error(t)}function I0(e){return typeof e=="object"&&e!==null}function R0(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const j0=/\r\n|[\n\r]/g;function Na(e,t){let n=0,r=1;for(const i of e.body.matchAll(j0)){if(typeof i.index=="number"||R0(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function P0(e){return el(e.source,Na(e.source,e.start))}function el(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,o=t.line+a,s=t.line===1?n:0,c=t.column+s,u=`${e.name}:${o}:${c}
114
+ `,l=r.split(/\r\n|[\n\r]/g),h=l[i];if(h.length>120){const f=Math.floor(c/80),g=c%80,x=[];for(let w=0;w<h.length;w+=80)x.push(h.slice(w,w+80));return u+tc([[`${o} |`,x[0]],...x.slice(1,f+1).map(w=>["|",w]),["|","^".padStart(g)],["|",x[f+1]]])}return u+tc([[`${o-1} |`,l[i-1]],[`${o} |`,h],["|","^".padStart(c)],[`${o+1} |`,l[i+1]]])}function tc(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
115
+ `)}function N0(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class Oo extends Error{constructor(t,...n){var r,i,a;const{nodes:o,source:s,positions:c,path:u,originalError:l,extensions:h}=N0(n);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=l??void 0,this.nodes=nc(Array.isArray(o)?o:o?[o]:void 0);const f=nc((r=this.nodes)===null||r===void 0?void 0:r.map(x=>x.loc).filter(x=>x!=null));this.source=s??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??(f==null?void 0:f.map(x=>x.start)),this.locations=c&&s?c.map(x=>Na(s,x)):f==null?void 0:f.map(x=>Na(x.source,x.start));const g=I0(l==null?void 0:l.extensions)?l==null?void 0:l.extensions:void 0;this.extensions=(a=h??g)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Oo):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
116
116
 
117
117
  `+P0(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
118
118
 
119
- `+el(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function nc(e){return e===void 0||e.length===0?void 0:e}function st(e,t,n){return new So(`Syntax Error: ${n}`,{source:e,positions:[t]})}class A0{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class tl{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const nl={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},F0=new Set(Object.keys(nl));function rc(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&F0.has(t)}var Vn;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Vn||(Vn={}));var Aa;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Aa||(Aa={}));var K;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(K||(K={}));function Fa(e){return e===9||e===32}function kr(e){return e>=48&&e<=57}function rl(e){return e>=97&&e<=122||e>=65&&e<=90}function il(e){return rl(e)||e===95}function V0(e){return rl(e)||kr(e)||e===95}function q0(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var a;const s=e[o],c=$0(s);c!==s.length&&(r=(a=r)!==null&&a!==void 0?a:o,i=o,o!==0&&c<n&&(n=c))}return e.map((o,s)=>s===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function $0(e){let t=0;for(;t<e.length&&Fa(e.charCodeAt(t));)++t;return t}function U0(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,a=r.length>1&&r.slice(1).every(g=>g.length===0||Fa(g.charCodeAt(0))),o=n.endsWith('\\"""'),s=e.endsWith('"')&&!o,c=e.endsWith("\\"),u=s||c,l=!i||e.length>70||u||a||o;let d="";const f=i&&Fa(e.charCodeAt(0));return(l&&!f||a)&&(d+=`
120
- `),d+=n,(l||u)&&(d+=`
121
- `),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(N||(N={}));class B0{constructor(t){const n=new tl(N.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==N.EOF)do if(t.next)t=t.next;else{const n=W0(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function z0(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Jn(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ji(e,t){return al(e.charCodeAt(t))&&ol(e.charCodeAt(t+1))}function al(e){return e>=55296&&e<=56319}function ol(e){return e>=56320&&e<=57343}function En(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return N.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Je(e,t,n,r,i){const a=e.line,o=1+n-e.lineStart;return new tl(t,n,r,a,o,i)}function W0(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const a=n.charCodeAt(i);switch(a){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Q0(e,i);case 33:return Je(e,N.BANG,i,i+1);case 36:return Je(e,N.DOLLAR,i,i+1);case 38:return Je(e,N.AMP,i,i+1);case 40:return Je(e,N.PAREN_L,i,i+1);case 41:return Je(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Je(e,N.SPREAD,i,i+3);break;case 58:return Je(e,N.COLON,i,i+1);case 61:return Je(e,N.EQUALS,i,i+1);case 64:return Je(e,N.AT,i,i+1);case 91:return Je(e,N.BRACKET_L,i,i+1);case 93:return Je(e,N.BRACKET_R,i,i+1);case 123:return Je(e,N.BRACE_L,i,i+1);case 124:return Je(e,N.PIPE,i,i+1);case 125:return Je(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?J0(e,i):G0(e,i)}if(kr(a)||a===45)return H0(e,i,a);if(il(a))return Z0(e,i);throw st(e.source,i,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Jn(a)||ji(n,i)?`Unexpected character: ${En(e,i)}.`:`Invalid character: ${En(e,i)}.`)}return Je(e,N.EOF,r,r)}function Q0(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(a===10||a===13)break;if(Jn(a))++i;else if(ji(n,i))i+=2;else break}return Je(e,N.COMMENT,t,i,n.slice(t+1,i))}function H0(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(a===45&&(a=r.charCodeAt(++i)),a===48){if(a=r.charCodeAt(++i),kr(a))throw st(e.source,i,`Invalid number, unexpected digit after 0: ${En(e,i)}.`)}else i=ya(e,i,a),a=r.charCodeAt(i);if(a===46&&(o=!0,a=r.charCodeAt(++i),i=ya(e,i,a),a=r.charCodeAt(i)),(a===69||a===101)&&(o=!0,a=r.charCodeAt(++i),(a===43||a===45)&&(a=r.charCodeAt(++i)),i=ya(e,i,a),a=r.charCodeAt(i)),a===46||il(a))throw st(e.source,i,`Invalid number, expected digit but got: ${En(e,i)}.`);return Je(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function ya(e,t,n){if(!kr(n))throw st(e.source,t,`Invalid number, expected digit but got: ${En(e,t)}.`);const r=e.source.body;let i=t+1;for(;kr(r.charCodeAt(i));)++i;return i}function G0(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const s=n.charCodeAt(i);if(s===34)return o+=n.slice(a,i),Je(e,N.STRING,t,i+1,o);if(s===92){o+=n.slice(a,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Y0(e,i):K0(e,i):X0(e,i);o+=c.value,i+=c.size,a=i;continue}if(s===10||s===13)break;if(Jn(s))++i;else if(ji(n,i))i+=2;else throw st(e.source,i,`Invalid character within String: ${En(e,i)}.`)}throw st(e.source,i,"Unterminated string.")}function Y0(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const a=n.charCodeAt(t+i++);if(a===125){if(i<5||!Jn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Er(a),r<0)break}throw st(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function K0(e,t){const n=e.source.body,r=ic(n,t+2);if(Jn(r))return{value:String.fromCodePoint(r),size:6};if(al(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=ic(n,t+8);if(ol(i))return{value:String.fromCodePoint(r,i),size:12}}throw st(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ic(e,t){return Er(e.charCodeAt(t))<<12|Er(e.charCodeAt(t+1))<<8|Er(e.charCodeAt(t+2))<<4|Er(e.charCodeAt(t+3))}function Er(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function X0(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
119
+ `+el(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function nc(e){return e===void 0||e.length===0?void 0:e}function st(e,t,n){return new Oo(`Syntax Error: ${n}`,{source:e,positions:[t]})}class A0{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class tl{constructor(t,n,r,i,a,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const nl={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},F0=new Set(Object.keys(nl));function rc(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&F0.has(t)}var Vn;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Vn||(Vn={}));var Aa;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Aa||(Aa={}));var K;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(K||(K={}));function Fa(e){return e===9||e===32}function kr(e){return e>=48&&e<=57}function rl(e){return e>=97&&e<=122||e>=65&&e<=90}function il(e){return rl(e)||e===95}function V0(e){return rl(e)||kr(e)||e===95}function q0(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var a;const s=e[o],c=$0(s);c!==s.length&&(r=(a=r)!==null&&a!==void 0?a:o,i=o,o!==0&&c<n&&(n=c))}return e.map((o,s)=>s===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function $0(e){let t=0;for(;t<e.length&&Fa(e.charCodeAt(t));)++t;return t}function U0(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,a=r.length>1&&r.slice(1).every(g=>g.length===0||Fa(g.charCodeAt(0))),o=n.endsWith('\\"""'),s=e.endsWith('"')&&!o,c=e.endsWith("\\"),u=s||c,l=!i||e.length>70||u||a||o;let h="";const f=i&&Fa(e.charCodeAt(0));return(l&&!f||a)&&(h+=`
120
+ `),h+=n,(l||u)&&(h+=`
121
+ `),'"""'+h+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(N||(N={}));class B0{constructor(t){const n=new tl(N.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==N.EOF)do if(t.next)t=t.next;else{const n=z0(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function H0(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Jn(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ji(e,t){return al(e.charCodeAt(t))&&ol(e.charCodeAt(t+1))}function al(e){return e>=55296&&e<=56319}function ol(e){return e>=56320&&e<=57343}function En(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return N.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Je(e,t,n,r,i){const a=e.line,o=1+n-e.lineStart;return new tl(t,n,r,a,o,i)}function z0(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const a=n.charCodeAt(i);switch(a){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Q0(e,i);case 33:return Je(e,N.BANG,i,i+1);case 36:return Je(e,N.DOLLAR,i,i+1);case 38:return Je(e,N.AMP,i,i+1);case 40:return Je(e,N.PAREN_L,i,i+1);case 41:return Je(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Je(e,N.SPREAD,i,i+3);break;case 58:return Je(e,N.COLON,i,i+1);case 61:return Je(e,N.EQUALS,i,i+1);case 64:return Je(e,N.AT,i,i+1);case 91:return Je(e,N.BRACKET_L,i,i+1);case 93:return Je(e,N.BRACKET_R,i,i+1);case 123:return Je(e,N.BRACE_L,i,i+1);case 124:return Je(e,N.PIPE,i,i+1);case 125:return Je(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?J0(e,i):G0(e,i)}if(kr(a)||a===45)return W0(e,i,a);if(il(a))return Z0(e,i);throw st(e.source,i,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Jn(a)||ji(n,i)?`Unexpected character: ${En(e,i)}.`:`Invalid character: ${En(e,i)}.`)}return Je(e,N.EOF,r,r)}function Q0(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(a===10||a===13)break;if(Jn(a))++i;else if(ji(n,i))i+=2;else break}return Je(e,N.COMMENT,t,i,n.slice(t+1,i))}function W0(e,t,n){const r=e.source.body;let i=t,a=n,o=!1;if(a===45&&(a=r.charCodeAt(++i)),a===48){if(a=r.charCodeAt(++i),kr(a))throw st(e.source,i,`Invalid number, unexpected digit after 0: ${En(e,i)}.`)}else i=ya(e,i,a),a=r.charCodeAt(i);if(a===46&&(o=!0,a=r.charCodeAt(++i),i=ya(e,i,a),a=r.charCodeAt(i)),(a===69||a===101)&&(o=!0,a=r.charCodeAt(++i),(a===43||a===45)&&(a=r.charCodeAt(++i)),i=ya(e,i,a),a=r.charCodeAt(i)),a===46||il(a))throw st(e.source,i,`Invalid number, expected digit but got: ${En(e,i)}.`);return Je(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function ya(e,t,n){if(!kr(n))throw st(e.source,t,`Invalid number, expected digit but got: ${En(e,t)}.`);const r=e.source.body;let i=t+1;for(;kr(r.charCodeAt(i));)++i;return i}function G0(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,o="";for(;i<r;){const s=n.charCodeAt(i);if(s===34)return o+=n.slice(a,i),Je(e,N.STRING,t,i+1,o);if(s===92){o+=n.slice(a,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Y0(e,i):K0(e,i):X0(e,i);o+=c.value,i+=c.size,a=i;continue}if(s===10||s===13)break;if(Jn(s))++i;else if(ji(n,i))i+=2;else throw st(e.source,i,`Invalid character within String: ${En(e,i)}.`)}throw st(e.source,i,"Unterminated string.")}function Y0(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const a=n.charCodeAt(t+i++);if(a===125){if(i<5||!Jn(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Er(a),r<0)break}throw st(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function K0(e,t){const n=e.source.body,r=ic(n,t+2);if(Jn(r))return{value:String.fromCodePoint(r),size:6};if(al(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=ic(n,t+8);if(ol(i))return{value:String.fromCodePoint(r,i),size:12}}throw st(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ic(e,t){return Er(e.charCodeAt(t))<<12|Er(e.charCodeAt(t+1))<<8|Er(e.charCodeAt(t+2))<<4|Er(e.charCodeAt(t+3))}function Er(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function X0(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
122
122
  `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw st(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function J0(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,o=a,s="";const c=[];for(;a<r;){const u=n.charCodeAt(a);if(u===34&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34){s+=n.slice(o,a),c.push(s);const l=Je(e,N.BLOCK_STRING,t,a+3,q0(c).join(`
123
- `));return e.line+=c.length-1,e.lineStart=i,l}if(u===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){s+=n.slice(o,a),o=a+1,a+=4;continue}if(u===10||u===13){s+=n.slice(o,a),c.push(s),u===13&&n.charCodeAt(a+1)===10?a+=2:++a,s="",o=a,i=a;continue}if(Jn(u))++a;else if(ji(n,a))a+=2;else throw st(e.source,a,`Invalid character within String: ${En(e,a)}.`)}throw st(e.source,a,"Unterminated string.")}function Z0(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(V0(a))++i;else break}return Je(e,N.NAME,t,i,n.slice(t,i))}const ep=10,sl=2;function To(e){return Pi(e,[])}function Pi(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return tp(e,t);default:return String(e)}}function tp(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(np(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Pi(r,n)}else if(Array.isArray(e))return ip(e,n);return rp(e,n)}function np(e){return typeof e.toJSON=="function"}function rp(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>sl?"["+ap(e)+"]":"{ "+n.map(([i,a])=>i+": "+Pi(a,t)).join(", ")+" }"}function ip(e,t){if(e.length===0)return"[]";if(t.length>sl)return"[Array]";const n=Math.min(ep,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Pi(e[a],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function ap(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const op=globalThis.process&&process.env.NODE_ENV==="production",sp=op?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){const o=To(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
123
+ `));return e.line+=c.length-1,e.lineStart=i,l}if(u===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){s+=n.slice(o,a),o=a+1,a+=4;continue}if(u===10||u===13){s+=n.slice(o,a),c.push(s),u===13&&n.charCodeAt(a+1)===10?a+=2:++a,s="",o=a,i=a;continue}if(Jn(u))++a;else if(ji(n,a))a+=2;else throw st(e.source,a,`Invalid character within String: ${En(e,a)}.`)}throw st(e.source,a,"Unterminated string.")}function Z0(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(V0(a))++i;else break}return Je(e,N.NAME,t,i,n.slice(t,i))}const em=10,sl=2;function To(e){return Pi(e,[])}function Pi(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return tm(e,t);default:return String(e)}}function tm(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(nm(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Pi(r,n)}else if(Array.isArray(e))return im(e,n);return rm(e,n)}function nm(e){return typeof e.toJSON=="function"}function rm(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>sl?"["+am(e)+"]":"{ "+n.map(([i,a])=>i+": "+Pi(a,t)).join(", ")+" }"}function im(e,t){if(e.length===0)return"[]";if(t.length>sl)return"[Array]";const n=Math.min(em,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Pi(e[a],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function am(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const om=globalThis.process&&process.env.NODE_ENV==="production",sm=om?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){const o=To(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
124
124
 
125
125
  Ensure that there is only one instance of "graphql" in the node_modules
126
126
  directory. If different versions of "graphql" are the dependencies of other
@@ -131,42 +131,42 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
131
131
  Duplicate "graphql" modules cannot be used at the same time since different
132
132
  versions may have different capabilities and behavior. The data from one
133
133
  version used in the function from another could produce confusing and
134
- spurious results.`)}}return!1};class cl{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||li(!1,`Body must be a string. Received: ${To(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||li(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||li(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function cp(e){return sp(e,cl)}function up(e,t){return new lp(e,t).parseDocument()}class lp{constructor(t,n={}){const r=cp(t)?t:new cl(t);this._lexer=new B0(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:K.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:K.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw st(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:K.OPERATION_DEFINITION,operation:Vn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:K.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return Vn.QUERY;case"mutation":return Vn.MUTATION;case"subscription":return Vn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:K.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:K.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:K.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:K.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:K.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:K.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:K.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:K.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:K.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:K.BOOLEAN,value:!0});case"false":return this.node(n,{kind:K.BOOLEAN,value:!1});case"null":return this.node(n,{kind:K.NULL});default:return this.node(n,{kind:K.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw st(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:K.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:K.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:K.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:K.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:K.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:K.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:K.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:K.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:K.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:K.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:K.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:K.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:K.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let a;this.expectOptionalToken(N.EQUALS)&&(a=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:K.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:K.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:K.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:K.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:K.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw st(this._lexer.source,this._lexer.token.start,`${ai(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:K.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:K.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:K.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Aa,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new A0(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw st(this._lexer.source,n.start,`Expected ${ul(t)}, found ${ai(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw st(this._lexer.source,n.start,`Expected "${t}", found ${ai(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return st(this._lexer.source,n.start,`Unexpected ${ai(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw st(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function ai(e){const t=e.value;return ul(e.kind)+(t!=null?` "${t}"`:"")}function ul(e){return z0(e)?`"${e}"`:e}function fp(e){return`"${e.replace(hp,dp)}"`}const hp=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function dp(e){return pp[e.charCodeAt(0)]}const pp=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Co=Object.freeze({});function Xt(e,t,n=nl){const r=new Map;for(const S of Object.values(K))r.set(S,mp(t,S));let i,a=Array.isArray(e),o=[e],s=-1,c=[],u=e,l,d;const f=[],g=[];do{s++;const S=s===o.length,_=S&&c.length!==0;if(S){if(l=g.length===0?void 0:f[f.length-1],u=d,d=g.pop(),_)if(a){u=u.slice();let C=0;for(const[O,R]of c){const P=O-C;R===null?(u.splice(P,1),C++):u[P]=R}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[C,O]of c)u[C]=O}s=i.index,o=i.keys,c=i.edits,a=i.inArray,i=i.prev}else if(d){if(l=a?s:o[s],u=d[l],u==null)continue;f.push(l)}let y;if(!Array.isArray(u)){var x,w;rc(u)||li(!1,`Invalid AST Node: ${To(u)}.`);const C=S?(x=r.get(u.kind))===null||x===void 0?void 0:x.leave:(w=r.get(u.kind))===null||w===void 0?void 0:w.enter;if(y=C==null?void 0:C.call(t,u,l,d,f,g),y===Co)break;if(y===!1){if(!S){f.pop();continue}}else if(y!==void 0&&(c.push([l,y]),!S))if(rc(y))u=y;else{f.pop();continue}}if(y===void 0&&_&&c.push([l,u]),S)f.pop();else{var T;i={inArray:a,index:s,keys:o,edits:c,prev:i},a=Array.isArray(u),o=a?u:(T=n[u.kind])!==null&&T!==void 0?T:[],s=-1,c=[],d&&g.push(d),d=u}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function mp(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function gp(e){return Xt(e,yp)}const vp=80,yp={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>J(e.definitions,`
134
+ spurious results.`)}}return!1};class cl{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||li(!1,`Body must be a string. Received: ${To(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||li(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||li(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function cm(e){return sm(e,cl)}function um(e,t){return new lm(e,t).parseDocument()}class lm{constructor(t,n={}){const r=cm(t)?t:new cl(t);this._lexer=new B0(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:K.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:K.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw st(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:K.OPERATION_DEFINITION,operation:Vn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:K.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return Vn.QUERY;case"mutation":return Vn.MUTATION;case"subscription":return Vn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:K.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:K.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:K.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:K.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:K.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:K.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:K.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:K.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:K.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:K.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:K.BOOLEAN,value:!0});case"false":return this.node(n,{kind:K.BOOLEAN,value:!1});case"null":return this.node(n,{kind:K.NULL});default:return this.node(n,{kind:K.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw st(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:K.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:K.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:K.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:K.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:K.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:K.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:K.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:K.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:K.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:K.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:K.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:K.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:K.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let a;this.expectOptionalToken(N.EQUALS)&&(a=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:K.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:K.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:K.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:K.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:K.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw st(this._lexer.source,this._lexer.token.start,`${ai(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:K.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:K.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:K.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:K.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:K.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Aa,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new A0(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw st(this._lexer.source,n.start,`Expected ${ul(t)}, found ${ai(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw st(this._lexer.source,n.start,`Expected "${t}", found ${ai(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return st(this._lexer.source,n.start,`Unexpected ${ai(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw st(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function ai(e){const t=e.value;return ul(e.kind)+(t!=null?` "${t}"`:"")}function ul(e){return H0(e)?`"${e}"`:e}function fm(e){return`"${e.replace(hm,dm)}"`}const hm=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function dm(e){return mm[e.charCodeAt(0)]}const mm=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Co=Object.freeze({});function Xt(e,t,n=nl){const r=new Map;for(const O of Object.values(K))r.set(O,pm(t,O));let i,a=Array.isArray(e),o=[e],s=-1,c=[],u=e,l,h;const f=[],g=[];do{s++;const O=s===o.length,_=O&&c.length!==0;if(O){if(l=g.length===0?void 0:f[f.length-1],u=h,h=g.pop(),_)if(a){u=u.slice();let C=0;for(const[S,R]of c){const P=S-C;R===null?(u.splice(P,1),C++):u[P]=R}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[C,S]of c)u[C]=S}s=i.index,o=i.keys,c=i.edits,a=i.inArray,i=i.prev}else if(h){if(l=a?s:o[s],u=h[l],u==null)continue;f.push(l)}let y;if(!Array.isArray(u)){var x,w;rc(u)||li(!1,`Invalid AST Node: ${To(u)}.`);const C=O?(x=r.get(u.kind))===null||x===void 0?void 0:x.leave:(w=r.get(u.kind))===null||w===void 0?void 0:w.enter;if(y=C==null?void 0:C.call(t,u,l,h,f,g),y===Co)break;if(y===!1){if(!O){f.pop();continue}}else if(y!==void 0&&(c.push([l,y]),!O))if(rc(y))u=y;else{f.pop();continue}}if(y===void 0&&_&&c.push([l,u]),O)f.pop();else{var T;i={inArray:a,index:s,keys:o,edits:c,prev:i},a=Array.isArray(u),o=a?u:(T=n[u.kind])!==null&&T!==void 0?T:[],s=-1,c=[],h&&g.push(h),h=u}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function pm(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function gm(e){return Xt(e,ym)}const vm=80,ym={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>X(e.definitions,`
135
135
 
136
- `)},OperationDefinition:{leave(e){const t=Ee("(",J(e.variableDefinitions,", "),")"),n=J([e.operation,J([e.name,t]),J(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Ee(" = ",n)+Ee(" ",J(r," "))},SelectionSet:{leave:({selections:e})=>Nt(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const a=Ee("",e,": ")+t;let o=a+Ee("(",J(n,", "),")");return o.length>vp&&(o=a+Ee(`(
137
- `,fi(J(n,`
136
+ `)},OperationDefinition:{leave(e){const t=Ee("(",X(e.variableDefinitions,", "),")"),n=X([e.operation,X([e.name,t]),X(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+Ee(" = ",n)+Ee(" ",X(r," "))},SelectionSet:{leave:({selections:e})=>Nt(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const a=Ee("",e,": ")+t;let o=a+Ee("(",X(n,", "),")");return o.length>vm&&(o=a+Ee(`(
137
+ `,fi(X(n,`
138
138
  `)),`
139
- )`)),J([o,J(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ee(" ",J(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>J(["...",Ee("on ",e),J(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Ee("(",J(n,", "),")")} on ${t} ${Ee("",J(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?U0(e):fp(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+J(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+J(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ee("(",J(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Ee("",e,`
140
- `)+J(["schema",J(t," "),Nt(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Ee("",e,`
141
- `)+J(["scalar",t,J(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ee("",e,`
142
- `)+J(["type",t,Ee("implements ",J(n," & ")),J(r," "),Nt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Ee("",e,`
139
+ )`)),X([o,X(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ee(" ",X(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>X(["...",Ee("on ",e),X(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Ee("(",X(n,", "),")")} on ${t} ${Ee("",X(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?U0(e):fm(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+X(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+X(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ee("(",X(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Ee("",e,`
140
+ `)+X(["schema",X(t," "),Nt(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Ee("",e,`
141
+ `)+X(["scalar",t,X(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ee("",e,`
142
+ `)+X(["type",t,Ee("implements ",X(n," & ")),X(r," "),Nt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Ee("",e,`
143
143
  `)+t+(ac(n)?Ee(`(
144
- `,fi(J(n,`
144
+ `,fi(X(n,`
145
145
  `)),`
146
- )`):Ee("(",J(n,", "),")"))+": "+r+Ee(" ",J(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Ee("",e,`
147
- `)+J([t+": "+n,Ee("= ",r),J(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ee("",e,`
148
- `)+J(["interface",t,Ee("implements ",J(n," & ")),J(r," "),Nt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Ee("",e,`
149
- `)+J(["union",t,J(n," "),Ee("= ",J(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Ee("",e,`
150
- `)+J(["enum",t,J(n," "),Nt(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Ee("",e,`
151
- `)+J([t,J(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Ee("",e,`
152
- `)+J(["input",t,J(n," "),Nt(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Ee("",e,`
146
+ )`):Ee("(",X(n,", "),")"))+": "+r+Ee(" ",X(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Ee("",e,`
147
+ `)+X([t+": "+n,Ee("= ",r),X(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Ee("",e,`
148
+ `)+X(["interface",t,Ee("implements ",X(n," & ")),X(r," "),Nt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Ee("",e,`
149
+ `)+X(["union",t,X(n," "),Ee("= ",X(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Ee("",e,`
150
+ `)+X(["enum",t,X(n," "),Nt(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Ee("",e,`
151
+ `)+X([t,X(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Ee("",e,`
152
+ `)+X(["input",t,X(n," "),Nt(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Ee("",e,`
153
153
  `)+"directive @"+t+(ac(n)?Ee(`(
154
- `,fi(J(n,`
154
+ `,fi(X(n,`
155
155
  `)),`
156
- )`):Ee("(",J(n,", "),")"))+(r?" repeatable":"")+" on "+J(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>J(["extend schema",J(e," "),Nt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>J(["extend scalar",e,J(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>J(["extend type",e,Ee("implements ",J(t," & ")),J(n," "),Nt(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>J(["extend interface",e,Ee("implements ",J(t," & ")),J(n," "),Nt(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>J(["extend union",e,J(t," "),Ee("= ",J(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>J(["extend enum",e,J(t," "),Nt(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>J(["extend input",e,J(t," "),Nt(n)]," ")}};function J(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Nt(e){return Ee(`{
157
- `,fi(J(e,`
156
+ )`):Ee("(",X(n,", "),")"))+(r?" repeatable":"")+" on "+X(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>X(["extend schema",X(e," "),Nt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>X(["extend scalar",e,X(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>X(["extend type",e,Ee("implements ",X(t," & ")),X(n," "),Nt(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>X(["extend interface",e,Ee("implements ",X(t," & ")),X(n," "),Nt(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>X(["extend union",e,X(t," "),Ee("= ",X(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>X(["extend enum",e,X(t," "),Nt(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>X(["extend input",e,X(t," "),Nt(n)]," ")}};function X(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Nt(e){return Ee(`{
157
+ `,fi(X(e,`
158
158
  `)),`
159
159
  }`)}function Ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function fi(e){return Ee(" ",e.replace(/\n/g,`
160
160
  `))}function ac(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
161
- `)))!==null&&t!==void 0?t:!1}function oc(e){return e.kind===K.FIELD||e.kind===K.FRAGMENT_SPREAD||e.kind===K.INLINE_FRAGMENT}function Fr(e,t){var n=e.directives;return!n||!n.length?!0:Ep(n).every(function(r){var i=r.directive,a=r.ifArgument,o=!1;return a.value.kind==="Variable"?(o=t&&t[a.value.name.value],ie(o!==void 0,70,i.name.value)):o=a.value.value,i.name.value==="skip"?!o:o})}function Dr(e,t,n){var r=new Set(e),i=r.size;return Xt(t,{Directive:function(a){if(r.delete(a.name.value)&&(!n||!r.size))return Co}}),n?!r.size:r.size<i}function bp(e){return e&&Dr(["client","export"],e,!0)}function xp(e){var t=e.name.value;return t==="skip"||t==="include"}function Ep(e){var t=[];return e&&e.length&&e.forEach(function(n){if(xp(n)){var r=n.arguments,i=n.name.value;ie(r&&r.length===1,71,i);var a=r[0];ie(a.name&&a.name.value==="if",72,i);var o=a.value;ie(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),73,i),t.push({directive:n,ifArgument:a})}}),t}const wp=()=>Object.create(null),{forEach:Op,slice:sc}=Array.prototype,{hasOwnProperty:Sp}=Object.prototype;let Zn=class ll{constructor(t=!0,n=wp){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return Op.call(t,r=>n=n.getChildTrie(r)),Sp.call(n,"data")?n.data:n.data=this.makeData(sc.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,i=t.length;n&&r<i;++r){const a=n.mapFor(t[r],!1);n=a&&a.get(t[r])}return n&&n.data}remove(){return this.removeArray(arguments)}removeArray(t){let n;if(t.length){const r=t[0],i=this.mapFor(r,!1),a=i&&i.get(r);a&&(n=a.removeArray(sc.call(t,1)),!a.data&&!a.weak&&!(a.strong&&a.strong.size)&&i.delete(r))}else n=this.data,delete this.data;return n}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new ll(this.weakness,this.makeData)),r}mapFor(t,n){return this.weakness&&Tp(t)?this.weak||(n?this.weak=new WeakMap:void 0):this.strong||(n?this.strong=new Map:void 0)}};function Tp(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var fl=Ft(function(){return navigator.product})=="ReactNative",er=typeof WeakMap=="function"&&!(fl&&!global.HermesInternal),hl=typeof WeakSet=="function",_o=typeof Symbol=="function"&&typeof Symbol.for=="function",Ni=_o&&Symbol.asyncIterator,dl=typeof Ft(function(){return window.document.createElement})=="function",Cp=Ft(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,_p=(dl||fl)&&!Cp;function Be(e){return e!==null&&typeof e=="object"}function kp(e,t){var n=t,r=[];e.definitions.forEach(function(a){if(a.kind==="OperationDefinition")throw vt(74,a.operation,a.name?" named '".concat(a.name.value,"'"):"");a.kind==="FragmentDefinition"&&r.push(a)}),typeof n>"u"&&(ie(r.length===1,75,r.length),n=r[0].name.value);var i=D(D({},e),{definitions:wt([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)});return i}function Ai(e){e===void 0&&(e=[]);var t={};return e.forEach(function(n){t[n.name.value]=n}),t}function Fi(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var n=e.name.value;if(typeof t=="function")return t(n);var r=t&&t[n];return ie(r,76,n),r||null}default:return null}}function Dp(){}class Va{constructor(t=1/0,n=Dp){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return n?(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0):!1}}function qa(){}const Mp=qa,Lp=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},Ip=typeof WeakMap<"u"?WeakMap:Map,Rp=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:qa,unregister:qa}},jp=10024;class xi{constructor(t=1/0,n=Mp){this.max=t,this.dispose=n,this.map=new Ip,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let i=0;i<jp;i++){const a=r.next().value;if(!a)break;this.unfinalizedNodes.delete(a);const o=a.key;delete a.key,a.keyRef=new Lp(o),this.registry.register(o,a,a)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Rp(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return n?(this.deleteNode(n),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var ba=new WeakSet;function pl(e){e.size<=(e.max||-1)||ba.has(e)||(ba.add(e),setTimeout(function(){e.clean(),ba.delete(e)},100))}var ko=function(e,t){var n=new xi(e,t);return n.set=function(r,i){var a=xi.prototype.set.call(this,r,i);return pl(this),a},n},Pp=function(e,t){var n=new Va(e,t);return n.set=function(r,i){var a=Va.prototype.set.call(this,r,i);return pl(this),a},n},Np=Symbol.for("apollo.cacheSize"),zt=D({},ja[Np]),yn={};function Do(e,t){yn[e]=t}var Ap=globalThis.__DEV__!==!1?$p:void 0,Fp=globalThis.__DEV__!==!1?Up:void 0,Vp=globalThis.__DEV__!==!1?ml:void 0;function qp(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var n=t[0],r=t[1];return[n,zt[n]||r]}))}function $p(){var e,t,n,r,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:qp(),sizes:D({print:(e=yn.print)===null||e===void 0?void 0:e.call(yn),parser:(t=yn.parser)===null||t===void 0?void 0:t.call(yn),canonicalStringify:(n=yn.canonicalStringify)===null||n===void 0?void 0:n.call(yn),links:Ua(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:vl(this.queryManager.documentTransform)}},(i=(r=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(r))}}function ml(){return{cache:{fragmentQueryDocuments:sn(this.getFragmentDoc)}}}function Up(){var e=this.config.fragments;return D(D({},ml.apply(this)),{addTypenameDocumentTransform:vl(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:sn(this.storeReader.executeSelectionSet),executeSubSelectedArray:sn(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:sn(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:sn(e==null?void 0:e.findFragmentSpreads),lookup:sn(e==null?void 0:e.lookup),transform:sn(e==null?void 0:e.transform)}})}function Bp(e){return!!e&&"dirtyKey"in e}function sn(e){return Bp(e)?e.size:void 0}function gl(e){return e!=null}function vl(e){return $a(e).map(function(t){return{cache:t}})}function $a(e){return e?wt(wt([sn(e==null?void 0:e.performWork)],$a(e==null?void 0:e.left),!0),$a(e==null?void 0:e.right),!0).filter(gl):[]}function Ua(e){var t;return e?wt(wt([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],Ua(e==null?void 0:e.left),!0),Ua(e==null?void 0:e.right),!0).filter(gl):[]}var cn=Object.assign(function(t){return JSON.stringify(t,zp)},{reset:function(){qn=new Pp(zt.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&Do("canonicalStringify",function(){return qn.size});var qn;cn.reset();function zp(e,t){if(t&&typeof t=="object"){var n=Object.getPrototypeOf(t);if(n===Object.prototype||n===null){var r=Object.keys(t);if(r.every(Wp))return t;var i=JSON.stringify(r),a=qn.get(i);if(!a){r.sort();var o=JSON.stringify(r);a=qn.get(o)||r,qn.set(i,a),qn.set(o,a)}var s=Object.create(n);return a.forEach(function(c){s[c]=t[c]}),s}}return t}function Wp(e,t,n){return t===0||n[t-1]<=e}function zn(e){return{__ref:String(e)}}function Le(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function Qp(e){return Be(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function Hp(e){return e.kind==="StringValue"}function Gp(e){return e.kind==="BooleanValue"}function Yp(e){return e.kind==="IntValue"}function Kp(e){return e.kind==="FloatValue"}function Xp(e){return e.kind==="Variable"}function Jp(e){return e.kind==="ObjectValue"}function Zp(e){return e.kind==="ListValue"}function em(e){return e.kind==="EnumValue"}function tm(e){return e.kind==="NullValue"}function Gn(e,t,n,r){if(Yp(n)||Kp(n))e[t.value]=Number(n.value);else if(Gp(n)||Hp(n))e[t.value]=n.value;else if(Jp(n)){var i={};n.fields.map(function(o){return Gn(i,o.name,o.value,r)}),e[t.value]=i}else if(Xp(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(Zp(n))e[t.value]=n.values.map(function(o){var s={};return Gn(s,t,o,r),s[t.value]});else if(em(n))e[t.value]=n.value;else if(tm(n))e[t.value]=null;else throw vt(85,t.value,n.kind)}function nm(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(i){n[i.name.value]={},i.arguments&&i.arguments.forEach(function(a){var o=a.name,s=a.value;return Gn(n[i.name.value],o,s,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(i){var a=i.name,o=i.value;return Gn(r,a,o,t)})),yl(e.name.value,r,n)}var rm=["connection","include","skip","client","rest","export","nonreactive"],mr=cn,yl=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key)if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(s){i[s]=t[s]}),"".concat(n.connection.key,"(").concat(mr(i),")")}else return n.connection.key;var a=e;if(t){var o=mr(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(s){rm.indexOf(s)===-1&&(n[s]&&Object.keys(n[s]).length?a+="@".concat(s,"(").concat(mr(n[s]),")"):a+="@".concat(s))}),a},{setStringify:function(e){var t=mr;return mr=e,t}});function Vi(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(r){var i=r.name,a=r.value;return Gn(n,i,a,t)}),n}return null}function un(e){return e.alias?e.alias.value:e.name.value}function Ba(e,t,n){for(var r,i=0,a=t.selections;i<a.length;i++){var o=a[i];if(ln(o)){if(o.name.value==="__typename")return e[un(o)]}else r?r.push(o):r=[o]}if(typeof e.__typename=="string")return e.__typename;if(r)for(var s=0,c=r;s<c.length;s++){var o=c[s],u=Ba(e,Fi(o,n).selectionSet,n);if(typeof u=="string")return u}}function ln(e){return e.kind==="Field"}function im(e){return e.kind==="InlineFragment"}function Vr(e){ie(e&&e.kind==="Document",77);var t=e.definitions.filter(function(n){return n.kind!=="FragmentDefinition"}).map(function(n){if(n.kind!=="OperationDefinition")throw vt(78,n.kind);return n});return ie(t.length<=1,79,t.length),e}function qr(e){return Vr(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function za(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function qi(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function bl(e){var t=qr(e);return ie(t&&t.operation==="query",80),t}function am(e){ie(e.kind==="Document",81),ie(e.definitions.length<=1,82);var t=e.definitions[0];return ie(t.kind==="FragmentDefinition",83),t}function $r(e){Vr(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if(i.kind==="OperationDefinition"){var a=i.operation;if(a==="query"||a==="mutation"||a==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw vt(84)}function Mo(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(r){r.defaultValue&&Gn(t,r.variable.name,r.defaultValue)}),t}const om=()=>Object.create(null),{forEach:sm,slice:cm}=Array.prototype,{hasOwnProperty:um}=Object.prototype;class Lo{constructor(t=!0,n=om){this.weakness=t,this.makeData=n}lookup(...t){return this.lookupArray(t)}lookupArray(t){let n=this;return sm.call(t,r=>n=n.getChildTrie(r)),um.call(n,"data")?n.data:n.data=this.makeData(cm.call(t))}peek(...t){return this.peekArray(t)}peekArray(t){let n=this;for(let r=0,i=t.length;n&&r<i;++r){const a=this.weakness&&cc(t[r])?n.weak:n.strong;n=a&&a.get(t[r])}return n&&n.data}getChildTrie(t){const n=this.weakness&&cc(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let r=n.get(t);return r||n.set(t,r=new Lo(this.weakness,this.makeData)),r}}function cc(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}let lt=null;const uc={};let lm=1;const fm=()=>class{constructor(){this.id=["slot",lm++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=lt;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===uc)break;return t!==lt&&(lt.slots[this.id]=n),!0}return lt&&(lt.slots[this.id]=uc),!1}getValue(){if(this.hasValue())return lt.slots[this.id]}withValue(t,n,r,i){const a={__proto__:null,[this.id]:t},o=lt;lt={parent:o,slots:a};try{return n.apply(i,r)}finally{lt=o}}static bind(t){const n=lt;return function(){const r=lt;try{return lt=n,t.apply(this,arguments)}finally{lt=r}}}static noContext(t,n,r){if(lt){const i=lt;try{return lt=null,t.apply(r,n)}finally{lt=i}}else return t.apply(r,n)}};function lc(e){try{return e()}catch{}}const xa="@wry/context:Slot",hm=lc(()=>globalThis)||lc(()=>global)||Object.create(null),fc=hm,xl=fc[xa]||Array[xa]||function(e){try{Object.defineProperty(fc,xa,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(fm()),$i=new xl,{hasOwnProperty:dm}=Object.prototype,Io=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function Ro(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const Mr=[],pm=100;function Yn(e,t){if(!e)throw new Error(t||"assertion failure")}function El(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function wl(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Ol(e){return e.slice(0)}class Ui{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Ui.count}peek(){if(this.value.length===1&&!fn(this))return hc(this),this.value[0]}recompute(t){return Yn(!this.recomputing,"already recomputing"),hc(this),fn(this)?mm(this,t):wl(this.value)}setDirty(){this.dirty||(this.dirty=!0,Sl(this),Ro(this))}dispose(){this.setDirty(),Dl(this),jo(this,(t,n)=>{t.setDirty(),Ml(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Mr.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(Io(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Mr.push(this.deps),this.deps=null)}}Ui.count=0;function hc(e){const t=$i.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),fn(e)?Cl(t,e):_l(t,e),t}function mm(e,t){return Dl(e),$i.withValue(e,gm,[e,t]),ym(e,t)&&vm(e),wl(e.value)}function gm(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&e.value.length===1&&(r=Ol(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!El(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function fn(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function vm(e){e.dirty=!1,!fn(e)&&Tl(e)}function Sl(e){jo(e,Cl)}function Tl(e){jo(e,_l)}function jo(e,t){const n=e.parents.size;if(n){const r=Io(e.parents);for(let i=0;i<n;++i)t(r[i],e)}}function Cl(e,t){Yn(e.childValues.has(t)),Yn(fn(t));const n=!fn(e);if(!e.dirtyChildren)e.dirtyChildren=Mr.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),n&&Sl(e)}function _l(e,t){Yn(e.childValues.has(t)),Yn(!fn(t));const n=e.childValues.get(t);n.length===0?e.childValues.set(t,Ol(t.value)):El(n,t.value)||e.setDirty(),kl(e,t),!fn(e)&&Tl(e)}function kl(e,t){const n=e.dirtyChildren;n&&(n.delete(t),n.size===0&&(Mr.length<pm&&Mr.push(n),e.dirtyChildren=null))}function Dl(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{Ml(e,n)}),e.forgetDeps(),Yn(e.dirtyChildren===null)}function Ml(e,t){t.parents.delete(e),e.childValues.delete(t),kl(e,t)}function ym(e,t){if(typeof e.subscribe=="function")try{Ro(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const bm={setDirty:!0,dispose:!0,forget:!0};function Ll(e){const t=new Map;function n(r){const i=$i.getValue();if(i){let a=t.get(r);a||t.set(r,a=new Set),i.dependOn(a)}}return n.dirty=function(i,a){const o=t.get(i);if(o){const s=a&&dm.call(bm,a)?a:"setDirty";Io(o).forEach(c=>c[s]()),t.delete(i),Ro(o)}},n}let dc;function xm(...e){return(dc||(dc=new Lo(typeof WeakMap=="function"))).lookupArray(e)}const Ea=new Set;function Lr(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=xm,normalizeResult:i,subscribe:a,cache:o=Va}=Object.create(null)){const s=typeof o=="function"?new o(t,f=>f.dispose()):o,c=function(){const f=r.apply(null,n?n.apply(null,arguments):arguments);if(f===void 0)return e.apply(null,arguments);let g=s.get(f);g||(s.set(f,g=new Ui(e)),g.normalizeResult=i,g.subscribe=a,g.forget=()=>s.delete(f));const x=g.recompute(Array.prototype.slice.call(arguments));return s.set(f,g),Ea.add(s),$i.hasValue()||(Ea.forEach(w=>w.clean()),Ea.clear()),x};Object.defineProperty(c,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:a,cache:s});function u(f){const g=f&&s.get(f);g&&g.setDirty()}c.dirtyKey=u,c.dirty=function(){u(r.apply(null,arguments))};function l(f){const g=f&&s.get(f);if(g)return g.peek()}c.peekKey=l,c.peek=function(){return l(r.apply(null,arguments))};function d(f){return f?s.delete(f):!1}return c.forgetKey=d,c.forget=function(){return d(r.apply(null,arguments))},c.makeCacheKey=r,c.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(c)}function Em(e){return e}var Il=function(){function e(t,n){n===void 0&&(n=Object.create(null)),this.resultCache=hl?new WeakSet:new Set,this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=n.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(Em,{cache:!1})},e.split=function(t,n,r){return r===void 0&&(r=e.identity()),Object.assign(new e(function(i){var a=t(i)?n:r;return a.transformDocument(i)},{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new Zn(er);this.performWork=Lr(e.prototype.performWork.bind(this),{makeCacheKey:function(r){var i=t.getCacheKey(r);if(i)return ie(Array.isArray(i),69),n.lookupArray(i)},max:zt["documentTransform.cache"],cache:xi})}},e.prototype.performWork=function(t){return Vr(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var n=this.performWork(t);return this.resultCache.add(n),n},e.prototype.concat=function(t){var n=this;return Object.assign(new e(function(r){return t.transformDocument(n.transformDocument(r))},{cache:!1}),{left:this,right:t})},e}(),wr,Bi=Object.assign(function(e){var t=wr.get(e);return t||(t=gp(e),wr.set(e,t)),t},{reset:function(){wr=new ko(zt.print||2e3)}});Bi.reset();globalThis.__DEV__!==!1&&Do("print",function(){return wr?wr.size:0});var ze=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var pc={kind:K.FIELD,name:{kind:K.NAME,value:"__typename"}};function Rl(e,t){return!e||e.selectionSet.selections.every(function(n){return n.kind===K.FRAGMENT_SPREAD&&Rl(t[n.name.value],t)})}function wm(e){return Rl(qr(e)||am(e),Ai(qi(e)))?null:e}function Om(e){var t=new Map,n=new Map;return e.forEach(function(r){r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),function(r){var i=t.get(r.name.value);return!i&&n.size&&n.forEach(function(a,o){o(r)&&(i=a)}),i}}function mc(e){var t=new Map;return function(r){r===void 0&&(r=e);var i=t.get(r);return i||t.set(r,i={variables:new Set,fragmentSpreads:new Set}),i}}function jl(e,t){Vr(t);for(var n=mc(""),r=mc(""),i=function(S){for(var _=0,y=void 0;_<S.length&&(y=S[_]);++_)if(!ze(y)){if(y.kind===K.OPERATION_DEFINITION)return n(y.name&&y.name.value);if(y.kind===K.FRAGMENT_DEFINITION)return r(y.name.value)}return globalThis.__DEV__!==!1&&ie.error(86),null},a=0,o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===K.OPERATION_DEFINITION&&++a;var s=Om(e),c=function(S){return Dt(S)&&S.map(s).some(function(_){return _&&_.remove})},u=new Map,l=!1,d={enter:function(S){if(c(S.directives))return l=!0,null}},f=Xt(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(S,_,y,C,O){var R=i(O);R&&R.variables.add(S.name.value)}},FragmentSpread:{enter:function(S,_,y,C,O){if(c(S.directives))return l=!0,null;var R=i(O);R&&R.fragmentSpreads.add(S.name.value)}},FragmentDefinition:{enter:function(S,_,y,C){u.set(JSON.stringify(C),S)},leave:function(S,_,y,C){var O=u.get(JSON.stringify(C));if(S===O)return S;if(a>0&&S.selectionSet.selections.every(function(R){return R.kind===K.FIELD&&R.name.value==="__typename"}))return r(S.name.value).removed=!0,l=!0,null}},Directive:{leave:function(S){if(s(S))return l=!0,null}}});if(!l)return t;var g=function(S){return S.transitiveVars||(S.transitiveVars=new Set(S.variables),S.removed||S.fragmentSpreads.forEach(function(_){g(r(_)).transitiveVars.forEach(function(y){S.transitiveVars.add(y)})})),S},x=new Set;f.definitions.forEach(function(S){S.kind===K.OPERATION_DEFINITION?g(n(S.name&&S.name.value)).fragmentSpreads.forEach(function(_){x.add(_)}):S.kind===K.FRAGMENT_DEFINITION&&a===0&&!r(S.name.value).removed&&x.add(S.name.value)}),x.forEach(function(S){g(r(S)).fragmentSpreads.forEach(function(_){x.add(_)})});var w=function(S){return!!(!x.has(S)||r(S).removed)},T={enter:function(S){if(w(S.name.value))return null}};return wm(Xt(f,{FragmentSpread:T,FragmentDefinition:T,OperationDefinition:{leave:function(S){if(S.variableDefinitions){var _=g(n(S.name&&S.name.value)).transitiveVars;if(_.size<S.variableDefinitions.length)return D(D({},S),{variableDefinitions:S.variableDefinitions.filter(function(y){return _.has(y.variable.name.value)})})}}}}))}var Po=Object.assign(function(e){return Xt(e,{SelectionSet:{enter:function(t,n,r){if(!(r&&r.kind===K.OPERATION_DEFINITION)){var i=t.selections;if(i){var a=i.some(function(s){return ln(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!a){var o=r;if(!(ln(o)&&o.directives&&o.directives.some(function(s){return s.name.value==="export"})))return D(D({},t),{selections:wt(wt([],i,!0),[pc],!1)})}}}}}})},{added:function(e){return e===pc}});function Sm(e){var t=$r(e),n=t.operation;if(n==="query")return e;var r=Xt(e,{OperationDefinition:{enter:function(i){return D(D({},i),{operation:"query"})}}});return r}function Pl(e){Vr(e);var t=jl([{test:function(n){return n.name.value==="client"},remove:!0}],e);return t}var Tm=Object.prototype.hasOwnProperty;function gc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zi(e)}function zi(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new hn,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Cm=function(e,t,n){return this.merge(e[n],t[n])},hn=function(){function e(t){t===void 0&&(t=Cm),this.reconciler=t,this.isObject=Be,this.pastCopies=new Set}return e.prototype.merge=function(t,n){for(var r=this,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return Be(n)&&Be(t)?(Object.keys(n).forEach(function(o){if(Tm.call(t,o)){var s=t[o];if(n[o]!==s){var c=r.reconciler.apply(r,wt([t,n,o],i,!1));c!==s&&(t=r.shallowCopyForMerge(t),t[o]=c)}}else t=r.shallowCopyForMerge(t),t[o]=n[o]}),t):n},e.prototype.shallowCopyForMerge=function(t){return Be(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=D({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function _m(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=km(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
162
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function km(e,t){if(e){if(typeof e=="string")return vc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vc(e,t)}}function vc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function No(e,t,n){return t&&yc(e.prototype,t),n&&yc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ao=function(){return typeof Symbol=="function"},Fo=function(e){return Ao()&&!!Symbol[e]},Vo=function(e){return Fo(e)?Symbol[e]:"@@"+e};Ao()&&!Fo("observable")&&(Symbol.observable=Symbol("observable"));var Dm=Vo("iterator"),Wa=Vo("observable"),Nl=Vo("species");function Ei(e,t){var n=e[t];if(n!=null){if(typeof n!="function")throw new TypeError(n+" is not a function");return n}}function gr(e){var t=e.constructor;return t!==void 0&&(t=t[Nl],t===null&&(t=void 0)),t!==void 0?t:Ae}function Mm(e){return e instanceof Ae}function Kn(e){Kn.log?Kn.log(e):setTimeout(function(){throw e})}function hi(e){Promise.resolve().then(function(){try{e()}catch(t){Kn(t)}})}function Al(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var n=Ei(t,"unsubscribe");n&&n.call(t)}}catch(r){Kn(r)}}function Qa(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function Lm(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(Fl(e,t[n].type,t[n].value),e._state!=="closed");++n);}}function Fl(e,t,n){e._state="running";var r=e._observer;try{var i=Ei(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(Qa(e),i)i.call(r,n);else throw n;break;case"complete":Qa(e),i&&i.call(r);break}}catch(a){Kn(a)}e._state==="closed"?Al(e):e._state==="running"&&(e._state="ready")}function wa(e,t,n){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:n});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:n}],hi(function(){return Lm(e)});return}Fl(e,t,n)}}var Im=function(){function e(n,r){this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new Rm(this);try{this._cleanup=r.call(void 0,i)}catch(a){i.error(a)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(Qa(this),Al(this))},No(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),Rm=function(){function e(n){this._subscription=n}var t=e.prototype;return t.next=function(r){wa(this._subscription,"next",r)},t.error=function(r){wa(this._subscription,"error",r)},t.complete=function(){wa(this._subscription,"complete")},No(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),Ae=function(){function e(n){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof n!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=n}var t=e.prototype;return t.subscribe=function(r){return(typeof r!="object"||r===null)&&(r={next:r,error:arguments[1],complete:arguments[2]}),new Im(r,this._subscriber)},t.forEach=function(r){var i=this;return new Promise(function(a,o){if(typeof r!="function"){o(new TypeError(r+" is not a function"));return}function s(){c.unsubscribe(),a()}var c=i.subscribe({next:function(u){try{r(u,s)}catch(l){o(l),c.unsubscribe()}},error:o,complete:a})})},t.map=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){return i.subscribe({next:function(s){try{s=r(s)}catch(c){return o.error(c)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},t.filter=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){return i.subscribe({next:function(s){try{if(!r(s))return}catch(c){return o.error(c)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},t.reduce=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this),o=arguments.length>1,s=!1,c=arguments[1],u=c;return new a(function(l){return i.subscribe({next:function(d){var f=!s;if(s=!0,!f||o)try{u=r(u,d)}catch(g){return l.error(g)}else u=d},error:function(d){l.error(d)},complete:function(){if(!s&&!o)return l.error(new TypeError("Cannot reduce an empty sequence"));l.next(u),l.complete()}})})},t.concat=function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=gr(this);return new s(function(c){var u,l=0;function d(f){u=f.subscribe({next:function(g){c.next(g)},error:function(g){c.error(g)},complete:function(){l===a.length?(u=void 0,c.complete()):d(s.from(a[l++]))}})}return d(r),function(){u&&(u.unsubscribe(),u=void 0)}})},t.flatMap=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){var s=[],c=i.subscribe({next:function(l){if(r)try{l=r(l)}catch(f){return o.error(f)}var d=a.from(l).subscribe({next:function(f){o.next(f)},error:function(f){o.error(f)},complete:function(){var f=s.indexOf(d);f>=0&&s.splice(f,1),u()}});s.push(d)},error:function(l){o.error(l)},complete:function(){u()}});function u(){c.closed&&s.length===0&&o.complete()}return function(){s.forEach(function(l){return l.unsubscribe()}),c.unsubscribe()}})},t[Wa]=function(){return this},e.from=function(r){var i=typeof this=="function"?this:e;if(r==null)throw new TypeError(r+" is not an object");var a=Ei(r,Wa);if(a){var o=a.call(r);if(Object(o)!==o)throw new TypeError(o+" is not an object");return Mm(o)&&o.constructor===i?o:new i(function(s){return o.subscribe(s)})}if(Fo("iterator")&&(a=Ei(r,Dm),a))return new i(function(s){hi(function(){if(!s.closed){for(var c=_m(a.call(r)),u;!(u=c()).done;){var l=u.value;if(s.next(l),s.closed)return}s.complete()}})});if(Array.isArray(r))return new i(function(s){hi(function(){if(!s.closed){for(var c=0;c<r.length;++c)if(s.next(r[c]),s.closed)return;s.complete()}})});throw new TypeError(r+" is not observable")},e.of=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=typeof this=="function"?this:e;return new o(function(s){hi(function(){if(!s.closed){for(var c=0;c<i.length;++c)if(s.next(i[c]),s.closed)return;s.complete()}})})},No(e,null,[{key:Nl,get:function(){return this}}]),e}();Ao()&&Object.defineProperty(Ae,Symbol("extensions"),{value:{symbol:Wa,hostReportError:Kn},configurable:!0});function jm(e){var t,n=e.Symbol;if(typeof n=="function")if(n.observable)t=n.observable;else{typeof n.for=="function"?t=n.for("https://github.com/benlesh/symbol-observable"):t=n("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch{}}else t="@@observable";return t}var jn;typeof self<"u"?jn=self:typeof window<"u"?jn=window:typeof global<"u"?jn=global:typeof module<"u"?jn=module:jn=Function("return this")();jm(jn);var bc=Ae.prototype,xc="@@observable";bc[xc]||(bc[xc]=function(){return this});var Pm=Object.prototype.toString;function Vl(e){return Ha(e)}function Ha(e,t){switch(Pm.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(i,a){n[a]=Ha(i,t)}),n}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(i){r[i]=Ha(e[i],t)}),r}default:return e}}function Nm(e){var t=new Set([e]);return t.forEach(function(n){Be(n)&&Am(n)===n&&Object.getOwnPropertyNames(n).forEach(function(r){Be(n[r])&&t.add(n[r])})}),e}function Am(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function Ir(e){return globalThis.__DEV__!==!1&&Nm(e),e}function Or(e,t,n){var r=[];e.forEach(function(i){return i[t]&&r.push(i)}),r.forEach(function(i){return i[t](n)})}function Oa(e,t,n){return new Ae(function(r){var i={then:function(c){return new Promise(function(u){return u(c())})}};function a(c,u){return function(l){if(c){var d=function(){return r.closed?0:c(l)};i=i.then(d,d).then(function(f){return r.next(f)},function(f){return r.error(f)})}else r[u](l)}}var o={next:a(t,"next"),error:a(n,"error"),complete:function(){i.then(function(){return r.complete()})}},s=e.subscribe(o);return function(){return s.unsubscribe()}})}function ql(e){function t(n){Object.defineProperty(e,n,{value:Ae})}return _o&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Ec(e){return e&&typeof e.then=="function"}var Pn=function(e){Gt(t,e);function t(n){var r=e.call(this,function(i){return r.addObserver(i),function(){return r.removeObserver(i)}})||this;return r.observers=new Set,r.promise=new Promise(function(i,a){r.resolve=i,r.reject=a}),r.handlers={next:function(i){r.sub!==null&&(r.latest=["next",i],r.notify("next",i),Or(r.observers,"next",i))},error:function(i){var a=r.sub;a!==null&&(a&&setTimeout(function(){return a.unsubscribe()}),r.sub=null,r.latest=["error",i],r.reject(i),r.notify("error",i),Or(r.observers,"error",i))},complete:function(){var i=r,a=i.sub,o=i.sources,s=o===void 0?[]:o;if(a!==null){var c=s.shift();c?Ec(c)?c.then(function(u){return r.sub=u.subscribe(r.handlers)},r.handlers.error):r.sub=c.subscribe(r.handlers):(a&&setTimeout(function(){return a.unsubscribe()}),r.sub=null,r.latest&&r.latest[0]==="next"?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),Or(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(i){r.reject(i),r.sources=[],r.handlers.error(i)},r.promise.catch(function(i){}),typeof n=="function"&&(n=[new Ae(n)]),Ec(n)?n.then(function(i){return r.start(i)},r.handlers.error):r.start(n),r}return t.prototype.start=function(n){this.sub===void 0&&(this.sources=Array.from(n),this.handlers.complete())},t.prototype.deliverLastMessage=function(n){if(this.latest){var r=this.latest[0],i=n[r];i&&i.call(n,this.latest[1]),this.sub===null&&r==="next"&&n.complete&&n.complete()}},t.prototype.addObserver=function(n){this.observers.has(n)||(this.deliverLastMessage(n),this.observers.add(n))},t.prototype.removeObserver=function(n){this.observers.delete(n)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(n,r){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(a){return a(n,r)}))},t.prototype.beforeNext=function(n){var r=!1;this.nextResultListeners.add(function(i,a){r||(r=!0,n(i,a))})},t}(Ae);ql(Pn);function Wn(e){return"incremental"in e}function Fm(e){return"hasNext"in e&&"data"in e}function Vm(e){return Wn(e)||Fm(e)}function qm(e){return Be(e)&&"payload"in e}function $l(e,t){var n=e,r=new hn;return Wn(t)&&Dt(t.incremental)&&t.incremental.forEach(function(i){for(var a=i.data,o=i.path,s=o.length-1;s>=0;--s){var c=o[s],u=!isNaN(+c),l=u?[]:{};l[c]=a,a=l}n=r.merge(n,a)}),n}function di(e){var t=Ga(e);return Dt(t)}function Ga(e){var t=Dt(e.errors)?e.errors.slice(0):[];return Wn(e)&&Dt(e.incremental)&&e.incremental.forEach(function(n){n.errors&&t.push.apply(t,n.errors)}),t}function wn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(r){r&&Object.keys(r).forEach(function(i){var a=r[i];a!==void 0&&(n[i]=a)})}),n}function Qn(e,t){return wn(e,t,t.variables&&{variables:wn(D(D({},e&&e.variables),t.variables))})}function Sa(e){return new Ae(function(t){t.error(e)})}var Ul=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r};function $m(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw vt(44,i)}return e}function Um(e,t){var n=D({},e),r=function(a){typeof a=="function"?n=D(D({},n),a(n)):n=D(D({},n),a)},i=function(){return D({},n)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:r}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function Bm(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?za(t.query)||void 0:""),t}function zm(e,t){var n=D({},e),r=new Set(Object.keys(e));return Xt(t,{Variable:function(i,a,o){o&&o.kind!=="VariableDefinition"&&r.delete(i.name.value)}}),r.forEach(function(i){delete n[i]}),n}function wc(e,t){return t?t(e):Ae.of()}function vr(e){return typeof e=="function"?new Ur(e):e}function oi(e){return e.request.length<=1}var Ur=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Ae.of()})},e.from=function(t){return t.length===0?e.empty():t.map(vr).reduce(function(n,r){return n.concat(r)})},e.split=function(t,n,r){var i=vr(n),a=vr(r||new e(wc)),o;return oi(i)&&oi(a)?o=new e(function(s){return t(s)?i.request(s)||Ae.of():a.request(s)||Ae.of()}):o=new e(function(s,c){return t(s)?i.request(s,c)||Ae.of():a.request(s,c)||Ae.of()}),Object.assign(o,{left:i,right:a})},e.execute=function(t,n){return t.request(Um(n.context,Bm($m(n))))||Ae.of()},e.concat=function(t,n){var r=vr(t);if(oi(r))return globalThis.__DEV__!==!1&&ie.warn(36,r),r;var i=vr(n),a;return oi(i)?a=new e(function(o){return r.request(o,function(s){return i.request(s)||Ae.of()})||Ae.of()}):a=new e(function(o,s){return r.request(o,function(c){return i.request(c,s)||Ae.of()})||Ae.of()}),Object.assign(a,{left:r,right:i})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(wc)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,n){throw vt(37)},e.prototype.onError=function(t,n){if(n&&n.error)return n.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),Ya=Ur.execute;function Wm(e){var t,n=e[Symbol.asyncIterator]();return t={next:function(){return n.next()}},t[Symbol.asyncIterator]=function(){return this},t}function Qm(e){var t=null,n=null,r=!1,i=[],a=[];function o(d){if(!n){if(a.length){var f=a.shift();if(Array.isArray(f)&&f[0])return f[0]({value:d,done:!1})}i.push(d)}}function s(d){n=d;var f=a.slice();f.forEach(function(g){g[1](d)}),!t||t()}function c(){r=!0;var d=a.slice();d.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",o),e.removeListener("error",s),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",o),e.on("error",s),e.on("end",c),e.on("finish",c),e.on("close",c);function u(){return new Promise(function(d,f){if(n)return f(n);if(i.length)return d({value:i.shift(),done:!1});if(r)return d({value:void 0,done:!0});a.push([d,f])})}var l={next:function(){return u()}};return Ni&&(l[Symbol.asyncIterator]=function(){return this}),l}function Hm(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(r,i){e.then(function(a){r({value:a,done:!1})}).catch(i)}))}};return Ni&&(n[Symbol.asyncIterator]=function(){return this}),n}function Oc(e){var t={next:function(){return e.read()}};return Ni&&(t[Symbol.asyncIterator]=function(){return this}),t}function Gm(e){return!!e.body}function Ym(e){return!!e.getReader}function Km(e){return!!(Ni&&e[Symbol.asyncIterator])}function Xm(e){return!!e.stream}function Jm(e){return!!e.arrayBuffer}function Zm(e){return!!e.pipe}function eg(e){var t=e;if(Gm(e)&&(t=e.body),Km(t))return Wm(t);if(Ym(t))return Oc(t.getReader());if(Xm(t))return Oc(t.stream().getReader());if(Jm(t))return Hm(t.arrayBuffer());if(Zm(t))return Qm(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var qo=Symbol();function tg(e){return e.extensions?Array.isArray(e.extensions[qo]):!1}function Bl(e){return e.hasOwnProperty("graphQLErrors")}var ng=function(e){var t=wt(wt(wt([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(n){return Be(n)&&n.message||"Error message not found."}).join(`
163
- `)},Yt=function(e){Gt(t,e);function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,u=e.call(this,s)||this;return u.name="ApolloError",u.graphQLErrors=r||[],u.protocolErrors=i||[],u.clientErrors=a||[],u.networkError=o||null,u.message=s||ng(u),u.extraInfo=c,u.cause=wt(wt(wt([o],r||[],!0),i||[],!0),a||[],!0).find(function(l){return!!l})||null,u.__proto__=t.prototype,u}return t}(Error),Sc=Object.prototype.hasOwnProperty;function rg(e,t){return an(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,l,d,f,g,x,w,T,S,_,y,C,O,R,P,F,U;return on(this,function(V){switch(V.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");n=new TextDecoder("utf-8"),r=(U=e.headers)===null||U===void 0?void 0:U.get("content-type"),i="boundary=",a=r!=null&&r.includes(i)?r==null?void 0:r.substring((r==null?void 0:r.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",o=`\r
164
- --`.concat(a),s="",c=eg(e),u=!0,V.label=1;case 1:return u?[4,c.next()]:[3,3];case 2:for(l=V.sent(),d=l.value,f=l.done,g=typeof d=="string"?d:n.decode(d),x=s.length-o.length+1,u=!f,s+=g,w=s.indexOf(o,x);w>-1;){if(T=void 0,P=[s.slice(0,w),s.slice(w+o.length)],T=P[0],s=P[1],S=T.indexOf(`\r
161
+ `)))!==null&&t!==void 0?t:!1}function oc(e){return e.kind===K.FIELD||e.kind===K.FRAGMENT_SPREAD||e.kind===K.INLINE_FRAGMENT}function Fr(e,t){var n=e.directives;return!n||!n.length?!0:Em(n).every(function(r){var i=r.directive,a=r.ifArgument,o=!1;return a.value.kind==="Variable"?(o=t&&t[a.value.name.value],ie(o!==void 0,70,i.name.value)):o=a.value.value,i.name.value==="skip"?!o:o})}function Dr(e,t,n){var r=new Set(e),i=r.size;return Xt(t,{Directive:function(a){if(r.delete(a.name.value)&&(!n||!r.size))return Co}}),n?!r.size:r.size<i}function bm(e){return e&&Dr(["client","export"],e,!0)}function xm(e){var t=e.name.value;return t==="skip"||t==="include"}function Em(e){var t=[];return e&&e.length&&e.forEach(function(n){if(xm(n)){var r=n.arguments,i=n.name.value;ie(r&&r.length===1,71,i);var a=r[0];ie(a.name&&a.name.value==="if",72,i);var o=a.value;ie(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),73,i),t.push({directive:n,ifArgument:a})}}),t}const wm=()=>Object.create(null),{forEach:Sm,slice:sc}=Array.prototype,{hasOwnProperty:Om}=Object.prototype;let Zn=class ll{constructor(t=!0,n=wm){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return Sm.call(t,r=>n=n.getChildTrie(r)),Om.call(n,"data")?n.data:n.data=this.makeData(sc.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,i=t.length;n&&r<i;++r){const a=n.mapFor(t[r],!1);n=a&&a.get(t[r])}return n&&n.data}remove(){return this.removeArray(arguments)}removeArray(t){let n;if(t.length){const r=t[0],i=this.mapFor(r,!1),a=i&&i.get(r);a&&(n=a.removeArray(sc.call(t,1)),!a.data&&!a.weak&&!(a.strong&&a.strong.size)&&i.delete(r))}else n=this.data,delete this.data;return n}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new ll(this.weakness,this.makeData)),r}mapFor(t,n){return this.weakness&&Tm(t)?this.weak||(n?this.weak=new WeakMap:void 0):this.strong||(n?this.strong=new Map:void 0)}};function Tm(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var fl=Ft(function(){return navigator.product})=="ReactNative",er=typeof WeakMap=="function"&&!(fl&&!global.HermesInternal),hl=typeof WeakSet=="function",_o=typeof Symbol=="function"&&typeof Symbol.for=="function",Ni=_o&&Symbol.asyncIterator,dl=typeof Ft(function(){return window.document.createElement})=="function",Cm=Ft(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,_m=(dl||fl)&&!Cm;function Be(e){return e!==null&&typeof e=="object"}function km(e,t){var n=t,r=[];e.definitions.forEach(function(a){if(a.kind==="OperationDefinition")throw vt(74,a.operation,a.name?" named '".concat(a.name.value,"'"):"");a.kind==="FragmentDefinition"&&r.push(a)}),typeof n>"u"&&(ie(r.length===1,75,r.length),n=r[0].name.value);var i=D(D({},e),{definitions:wt([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)});return i}function Ai(e){e===void 0&&(e=[]);var t={};return e.forEach(function(n){t[n.name.value]=n}),t}function Fi(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var n=e.name.value;if(typeof t=="function")return t(n);var r=t&&t[n];return ie(r,76,n),r||null}default:return null}}function Dm(){}class Va{constructor(t=1/0,n=Dm){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return n?(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0):!1}}function qa(){}const Mm=qa,Lm=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},Im=typeof WeakMap<"u"?WeakMap:Map,Rm=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:qa,unregister:qa}},jm=10024;class xi{constructor(t=1/0,n=Mm){this.max=t,this.dispose=n,this.map=new Im,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let i=0;i<jm;i++){const a=r.next().value;if(!a)break;this.unfinalizedNodes.delete(a);const o=a.key;delete a.key,a.keyRef=new Lm(o),this.registry.register(o,a,a)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Rm(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:i}=n;i&&(i.older=r),r&&(r.newer=i),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=i)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return n?(this.deleteNode(n),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var ba=new WeakSet;function ml(e){e.size<=(e.max||-1)||ba.has(e)||(ba.add(e),setTimeout(function(){e.clean(),ba.delete(e)},100))}var ko=function(e,t){var n=new xi(e,t);return n.set=function(r,i){var a=xi.prototype.set.call(this,r,i);return ml(this),a},n},Pm=function(e,t){var n=new Va(e,t);return n.set=function(r,i){var a=Va.prototype.set.call(this,r,i);return ml(this),a},n},Nm=Symbol.for("apollo.cacheSize"),Ht=D({},ja[Nm]),yn={};function Do(e,t){yn[e]=t}var Am=globalThis.__DEV__!==!1?$m:void 0,Fm=globalThis.__DEV__!==!1?Um:void 0,Vm=globalThis.__DEV__!==!1?pl:void 0;function qm(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var n=t[0],r=t[1];return[n,Ht[n]||r]}))}function $m(){var e,t,n,r,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:qm(),sizes:D({print:(e=yn.print)===null||e===void 0?void 0:e.call(yn),parser:(t=yn.parser)===null||t===void 0?void 0:t.call(yn),canonicalStringify:(n=yn.canonicalStringify)===null||n===void 0?void 0:n.call(yn),links:Ua(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:vl(this.queryManager.documentTransform)}},(i=(r=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(r))}}function pl(){return{cache:{fragmentQueryDocuments:sn(this.getFragmentDoc)}}}function Um(){var e=this.config.fragments;return D(D({},pl.apply(this)),{addTypenameDocumentTransform:vl(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:sn(this.storeReader.executeSelectionSet),executeSubSelectedArray:sn(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:sn(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:sn(e==null?void 0:e.findFragmentSpreads),lookup:sn(e==null?void 0:e.lookup),transform:sn(e==null?void 0:e.transform)}})}function Bm(e){return!!e&&"dirtyKey"in e}function sn(e){return Bm(e)?e.size:void 0}function gl(e){return e!=null}function vl(e){return $a(e).map(function(t){return{cache:t}})}function $a(e){return e?wt(wt([sn(e==null?void 0:e.performWork)],$a(e==null?void 0:e.left),!0),$a(e==null?void 0:e.right),!0).filter(gl):[]}function Ua(e){var t;return e?wt(wt([(t=e==null?void 0:e.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],Ua(e==null?void 0:e.left),!0),Ua(e==null?void 0:e.right),!0).filter(gl):[]}var cn=Object.assign(function(t){return JSON.stringify(t,Hm)},{reset:function(){qn=new Pm(Ht.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&Do("canonicalStringify",function(){return qn.size});var qn;cn.reset();function Hm(e,t){if(t&&typeof t=="object"){var n=Object.getPrototypeOf(t);if(n===Object.prototype||n===null){var r=Object.keys(t);if(r.every(zm))return t;var i=JSON.stringify(r),a=qn.get(i);if(!a){r.sort();var o=JSON.stringify(r);a=qn.get(o)||r,qn.set(i,a),qn.set(o,a)}var s=Object.create(n);return a.forEach(function(c){s[c]=t[c]}),s}}return t}function zm(e,t,n){return t===0||n[t-1]<=e}function Hn(e){return{__ref:String(e)}}function Le(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function Qm(e){return Be(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function Wm(e){return e.kind==="StringValue"}function Gm(e){return e.kind==="BooleanValue"}function Ym(e){return e.kind==="IntValue"}function Km(e){return e.kind==="FloatValue"}function Xm(e){return e.kind==="Variable"}function Jm(e){return e.kind==="ObjectValue"}function Zm(e){return e.kind==="ListValue"}function ep(e){return e.kind==="EnumValue"}function tp(e){return e.kind==="NullValue"}function Gn(e,t,n,r){if(Ym(n)||Km(n))e[t.value]=Number(n.value);else if(Gm(n)||Wm(n))e[t.value]=n.value;else if(Jm(n)){var i={};n.fields.map(function(o){return Gn(i,o.name,o.value,r)}),e[t.value]=i}else if(Xm(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(Zm(n))e[t.value]=n.values.map(function(o){var s={};return Gn(s,t,o,r),s[t.value]});else if(ep(n))e[t.value]=n.value;else if(tp(n))e[t.value]=null;else throw vt(85,t.value,n.kind)}function np(e,t){var n=null;e.directives&&(n={},e.directives.forEach(function(i){n[i.name.value]={},i.arguments&&i.arguments.forEach(function(a){var o=a.name,s=a.value;return Gn(n[i.name.value],o,s,t)})}));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(function(i){var a=i.name,o=i.value;return Gn(r,a,o,t)})),yl(e.name.value,r,n)}var rp=["connection","include","skip","client","rest","export","nonreactive"],pr=cn,yl=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key)if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(s){i[s]=t[s]}),"".concat(n.connection.key,"(").concat(pr(i),")")}else return n.connection.key;var a=e;if(t){var o=pr(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(s){rp.indexOf(s)===-1&&(n[s]&&Object.keys(n[s]).length?a+="@".concat(s,"(").concat(pr(n[s]),")"):a+="@".concat(s))}),a},{setStringify:function(e){var t=pr;return pr=e,t}});function Vi(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(r){var i=r.name,a=r.value;return Gn(n,i,a,t)}),n}return null}function un(e){return e.alias?e.alias.value:e.name.value}function Ba(e,t,n){for(var r,i=0,a=t.selections;i<a.length;i++){var o=a[i];if(ln(o)){if(o.name.value==="__typename")return e[un(o)]}else r?r.push(o):r=[o]}if(typeof e.__typename=="string")return e.__typename;if(r)for(var s=0,c=r;s<c.length;s++){var o=c[s],u=Ba(e,Fi(o,n).selectionSet,n);if(typeof u=="string")return u}}function ln(e){return e.kind==="Field"}function ip(e){return e.kind==="InlineFragment"}function Vr(e){ie(e&&e.kind==="Document",77);var t=e.definitions.filter(function(n){return n.kind!=="FragmentDefinition"}).map(function(n){if(n.kind!=="OperationDefinition")throw vt(78,n.kind);return n});return ie(t.length<=1,79,t.length),e}function qr(e){return Vr(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function Ha(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function qi(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function bl(e){var t=qr(e);return ie(t&&t.operation==="query",80),t}function ap(e){ie(e.kind==="Document",81),ie(e.definitions.length<=1,82);var t=e.definitions[0];return ie(t.kind==="FragmentDefinition",83),t}function $r(e){Vr(e);for(var t,n=0,r=e.definitions;n<r.length;n++){var i=r[n];if(i.kind==="OperationDefinition"){var a=i.operation;if(a==="query"||a==="mutation"||a==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw vt(84)}function Mo(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(function(r){r.defaultValue&&Gn(t,r.variable.name,r.defaultValue)}),t}const op=()=>Object.create(null),{forEach:sp,slice:cp}=Array.prototype,{hasOwnProperty:up}=Object.prototype;class Lo{constructor(t=!0,n=op){this.weakness=t,this.makeData=n}lookup(...t){return this.lookupArray(t)}lookupArray(t){let n=this;return sp.call(t,r=>n=n.getChildTrie(r)),up.call(n,"data")?n.data:n.data=this.makeData(cp.call(t))}peek(...t){return this.peekArray(t)}peekArray(t){let n=this;for(let r=0,i=t.length;n&&r<i;++r){const a=this.weakness&&cc(t[r])?n.weak:n.strong;n=a&&a.get(t[r])}return n&&n.data}getChildTrie(t){const n=this.weakness&&cc(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map);let r=n.get(t);return r||n.set(t,r=new Lo(this.weakness,this.makeData)),r}}function cc(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}let lt=null;const uc={};let lp=1;const fp=()=>class{constructor(){this.id=["slot",lp++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=lt;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===uc)break;return t!==lt&&(lt.slots[this.id]=n),!0}return lt&&(lt.slots[this.id]=uc),!1}getValue(){if(this.hasValue())return lt.slots[this.id]}withValue(t,n,r,i){const a={__proto__:null,[this.id]:t},o=lt;lt={parent:o,slots:a};try{return n.apply(i,r)}finally{lt=o}}static bind(t){const n=lt;return function(){const r=lt;try{return lt=n,t.apply(this,arguments)}finally{lt=r}}}static noContext(t,n,r){if(lt){const i=lt;try{return lt=null,t.apply(r,n)}finally{lt=i}}else return t.apply(r,n)}};function lc(e){try{return e()}catch{}}const xa="@wry/context:Slot",hp=lc(()=>globalThis)||lc(()=>global)||Object.create(null),fc=hp,xl=fc[xa]||Array[xa]||function(e){try{Object.defineProperty(fc,xa,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(fp()),$i=new xl,{hasOwnProperty:dp}=Object.prototype,Io=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function Ro(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const Mr=[],mp=100;function Yn(e,t){if(!e)throw new Error(t||"assertion failure")}function El(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function wl(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Sl(e){return e.slice(0)}class Ui{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Ui.count}peek(){if(this.value.length===1&&!fn(this))return hc(this),this.value[0]}recompute(t){return Yn(!this.recomputing,"already recomputing"),hc(this),fn(this)?pp(this,t):wl(this.value)}setDirty(){this.dirty||(this.dirty=!0,Ol(this),Ro(this))}dispose(){this.setDirty(),Dl(this),jo(this,(t,n)=>{t.setDirty(),Ml(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Mr.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(Io(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Mr.push(this.deps),this.deps=null)}}Ui.count=0;function hc(e){const t=$i.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),fn(e)?Cl(t,e):_l(t,e),t}function pp(e,t){return Dl(e),$i.withValue(e,gp,[e,t]),yp(e,t)&&vp(e),wl(e.value)}function gp(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&e.value.length===1&&(r=Sl(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!El(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function fn(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function vp(e){e.dirty=!1,!fn(e)&&Tl(e)}function Ol(e){jo(e,Cl)}function Tl(e){jo(e,_l)}function jo(e,t){const n=e.parents.size;if(n){const r=Io(e.parents);for(let i=0;i<n;++i)t(r[i],e)}}function Cl(e,t){Yn(e.childValues.has(t)),Yn(fn(t));const n=!fn(e);if(!e.dirtyChildren)e.dirtyChildren=Mr.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),n&&Ol(e)}function _l(e,t){Yn(e.childValues.has(t)),Yn(!fn(t));const n=e.childValues.get(t);n.length===0?e.childValues.set(t,Sl(t.value)):El(n,t.value)||e.setDirty(),kl(e,t),!fn(e)&&Tl(e)}function kl(e,t){const n=e.dirtyChildren;n&&(n.delete(t),n.size===0&&(Mr.length<mp&&Mr.push(n),e.dirtyChildren=null))}function Dl(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{Ml(e,n)}),e.forgetDeps(),Yn(e.dirtyChildren===null)}function Ml(e,t){t.parents.delete(e),e.childValues.delete(t),kl(e,t)}function yp(e,t){if(typeof e.subscribe=="function")try{Ro(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const bp={setDirty:!0,dispose:!0,forget:!0};function Ll(e){const t=new Map;function n(r){const i=$i.getValue();if(i){let a=t.get(r);a||t.set(r,a=new Set),i.dependOn(a)}}return n.dirty=function(i,a){const o=t.get(i);if(o){const s=a&&dp.call(bp,a)?a:"setDirty";Io(o).forEach(c=>c[s]()),t.delete(i),Ro(o)}},n}let dc;function xp(...e){return(dc||(dc=new Lo(typeof WeakMap=="function"))).lookupArray(e)}const Ea=new Set;function Lr(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=xp,normalizeResult:i,subscribe:a,cache:o=Va}=Object.create(null)){const s=typeof o=="function"?new o(t,f=>f.dispose()):o,c=function(){const f=r.apply(null,n?n.apply(null,arguments):arguments);if(f===void 0)return e.apply(null,arguments);let g=s.get(f);g||(s.set(f,g=new Ui(e)),g.normalizeResult=i,g.subscribe=a,g.forget=()=>s.delete(f));const x=g.recompute(Array.prototype.slice.call(arguments));return s.set(f,g),Ea.add(s),$i.hasValue()||(Ea.forEach(w=>w.clean()),Ea.clear()),x};Object.defineProperty(c,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:i,subscribe:a,cache:s});function u(f){const g=f&&s.get(f);g&&g.setDirty()}c.dirtyKey=u,c.dirty=function(){u(r.apply(null,arguments))};function l(f){const g=f&&s.get(f);if(g)return g.peek()}c.peekKey=l,c.peek=function(){return l(r.apply(null,arguments))};function h(f){return f?s.delete(f):!1}return c.forgetKey=h,c.forget=function(){return h(r.apply(null,arguments))},c.makeCacheKey=r,c.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(c)}function Ep(e){return e}var Il=function(){function e(t,n){n===void 0&&(n=Object.create(null)),this.resultCache=hl?new WeakSet:new Set,this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=n.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(Ep,{cache:!1})},e.split=function(t,n,r){return r===void 0&&(r=e.identity()),Object.assign(new e(function(i){var a=t(i)?n:r;return a.transformDocument(i)},{cache:!1}),{left:n,right:r})},e.prototype.resetCache=function(){var t=this;if(this.cached){var n=new Zn(er);this.performWork=Lr(e.prototype.performWork.bind(this),{makeCacheKey:function(r){var i=t.getCacheKey(r);if(i)return ie(Array.isArray(i),69),n.lookupArray(i)},max:Ht["documentTransform.cache"],cache:xi})}},e.prototype.performWork=function(t){return Vr(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var n=this.performWork(t);return this.resultCache.add(n),n},e.prototype.concat=function(t){var n=this;return Object.assign(new e(function(r){return t.transformDocument(n.transformDocument(r))},{cache:!1}),{left:this,right:t})},e}(),wr,Bi=Object.assign(function(e){var t=wr.get(e);return t||(t=gm(e),wr.set(e,t)),t},{reset:function(){wr=new ko(Ht.print||2e3)}});Bi.reset();globalThis.__DEV__!==!1&&Do("print",function(){return wr?wr.size:0});var He=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var mc={kind:K.FIELD,name:{kind:K.NAME,value:"__typename"}};function Rl(e,t){return!e||e.selectionSet.selections.every(function(n){return n.kind===K.FRAGMENT_SPREAD&&Rl(t[n.name.value],t)})}function wp(e){return Rl(qr(e)||ap(e),Ai(qi(e)))?null:e}function Sp(e){var t=new Map,n=new Map;return e.forEach(function(r){r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),function(r){var i=t.get(r.name.value);return!i&&n.size&&n.forEach(function(a,o){o(r)&&(i=a)}),i}}function pc(e){var t=new Map;return function(r){r===void 0&&(r=e);var i=t.get(r);return i||t.set(r,i={variables:new Set,fragmentSpreads:new Set}),i}}function jl(e,t){Vr(t);for(var n=pc(""),r=pc(""),i=function(O){for(var _=0,y=void 0;_<O.length&&(y=O[_]);++_)if(!He(y)){if(y.kind===K.OPERATION_DEFINITION)return n(y.name&&y.name.value);if(y.kind===K.FRAGMENT_DEFINITION)return r(y.name.value)}return globalThis.__DEV__!==!1&&ie.error(86),null},a=0,o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===K.OPERATION_DEFINITION&&++a;var s=Sp(e),c=function(O){return Dt(O)&&O.map(s).some(function(_){return _&&_.remove})},u=new Map,l=!1,h={enter:function(O){if(c(O.directives))return l=!0,null}},f=Xt(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(O,_,y,C,S){var R=i(S);R&&R.variables.add(O.name.value)}},FragmentSpread:{enter:function(O,_,y,C,S){if(c(O.directives))return l=!0,null;var R=i(S);R&&R.fragmentSpreads.add(O.name.value)}},FragmentDefinition:{enter:function(O,_,y,C){u.set(JSON.stringify(C),O)},leave:function(O,_,y,C){var S=u.get(JSON.stringify(C));if(O===S)return O;if(a>0&&O.selectionSet.selections.every(function(R){return R.kind===K.FIELD&&R.name.value==="__typename"}))return r(O.name.value).removed=!0,l=!0,null}},Directive:{leave:function(O){if(s(O))return l=!0,null}}});if(!l)return t;var g=function(O){return O.transitiveVars||(O.transitiveVars=new Set(O.variables),O.removed||O.fragmentSpreads.forEach(function(_){g(r(_)).transitiveVars.forEach(function(y){O.transitiveVars.add(y)})})),O},x=new Set;f.definitions.forEach(function(O){O.kind===K.OPERATION_DEFINITION?g(n(O.name&&O.name.value)).fragmentSpreads.forEach(function(_){x.add(_)}):O.kind===K.FRAGMENT_DEFINITION&&a===0&&!r(O.name.value).removed&&x.add(O.name.value)}),x.forEach(function(O){g(r(O)).fragmentSpreads.forEach(function(_){x.add(_)})});var w=function(O){return!!(!x.has(O)||r(O).removed)},T={enter:function(O){if(w(O.name.value))return null}};return wp(Xt(f,{FragmentSpread:T,FragmentDefinition:T,OperationDefinition:{leave:function(O){if(O.variableDefinitions){var _=g(n(O.name&&O.name.value)).transitiveVars;if(_.size<O.variableDefinitions.length)return D(D({},O),{variableDefinitions:O.variableDefinitions.filter(function(y){return _.has(y.variable.name.value)})})}}}}))}var Po=Object.assign(function(e){return Xt(e,{SelectionSet:{enter:function(t,n,r){if(!(r&&r.kind===K.OPERATION_DEFINITION)){var i=t.selections;if(i){var a=i.some(function(s){return ln(s)&&(s.name.value==="__typename"||s.name.value.lastIndexOf("__",0)===0)});if(!a){var o=r;if(!(ln(o)&&o.directives&&o.directives.some(function(s){return s.name.value==="export"})))return D(D({},t),{selections:wt(wt([],i,!0),[mc],!1)})}}}}}})},{added:function(e){return e===mc}});function Op(e){var t=$r(e),n=t.operation;if(n==="query")return e;var r=Xt(e,{OperationDefinition:{enter:function(i){return D(D({},i),{operation:"query"})}}});return r}function Pl(e){Vr(e);var t=jl([{test:function(n){return n.name.value==="client"},remove:!0}],e);return t}var Tp=Object.prototype.hasOwnProperty;function gc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Hi(e)}function Hi(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new hn,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Cp=function(e,t,n){return this.merge(e[n],t[n])},hn=function(){function e(t){t===void 0&&(t=Cp),this.reconciler=t,this.isObject=Be,this.pastCopies=new Set}return e.prototype.merge=function(t,n){for(var r=this,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return Be(n)&&Be(t)?(Object.keys(n).forEach(function(o){if(Tp.call(t,o)){var s=t[o];if(n[o]!==s){var c=r.reconciler.apply(r,wt([t,n,o],i,!1));c!==s&&(t=r.shallowCopyForMerge(t),t[o]=c)}}else t=r.shallowCopyForMerge(t),t[o]=n[o]}),t):n},e.prototype.shallowCopyForMerge=function(t){return Be(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=D({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e}();function _p(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=kp(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
162
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kp(e,t){if(e){if(typeof e=="string")return vc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vc(e,t)}}function vc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function No(e,t,n){return t&&yc(e.prototype,t),n&&yc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ao=function(){return typeof Symbol=="function"},Fo=function(e){return Ao()&&!!Symbol[e]},Vo=function(e){return Fo(e)?Symbol[e]:"@@"+e};Ao()&&!Fo("observable")&&(Symbol.observable=Symbol("observable"));var Dp=Vo("iterator"),za=Vo("observable"),Nl=Vo("species");function Ei(e,t){var n=e[t];if(n!=null){if(typeof n!="function")throw new TypeError(n+" is not a function");return n}}function gr(e){var t=e.constructor;return t!==void 0&&(t=t[Nl],t===null&&(t=void 0)),t!==void 0?t:Fe}function Mp(e){return e instanceof Fe}function Kn(e){Kn.log?Kn.log(e):setTimeout(function(){throw e})}function hi(e){Promise.resolve().then(function(){try{e()}catch(t){Kn(t)}})}function Al(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var n=Ei(t,"unsubscribe");n&&n.call(t)}}catch(r){Kn(r)}}function Qa(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function Lp(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(Fl(e,t[n].type,t[n].value),e._state!=="closed");++n);}}function Fl(e,t,n){e._state="running";var r=e._observer;try{var i=Ei(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(Qa(e),i)i.call(r,n);else throw n;break;case"complete":Qa(e),i&&i.call(r);break}}catch(a){Kn(a)}e._state==="closed"?Al(e):e._state==="running"&&(e._state="ready")}function wa(e,t,n){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:n});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:n}],hi(function(){return Lp(e)});return}Fl(e,t,n)}}var Ip=function(){function e(n,r){this._cleanup=void 0,this._observer=n,this._queue=void 0,this._state="initializing";var i=new Rp(this);try{this._cleanup=r.call(void 0,i)}catch(a){i.error(a)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(Qa(this),Al(this))},No(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),Rp=function(){function e(n){this._subscription=n}var t=e.prototype;return t.next=function(r){wa(this._subscription,"next",r)},t.error=function(r){wa(this._subscription,"error",r)},t.complete=function(){wa(this._subscription,"complete")},No(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),Fe=function(){function e(n){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof n!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=n}var t=e.prototype;return t.subscribe=function(r){return(typeof r!="object"||r===null)&&(r={next:r,error:arguments[1],complete:arguments[2]}),new Ip(r,this._subscriber)},t.forEach=function(r){var i=this;return new Promise(function(a,o){if(typeof r!="function"){o(new TypeError(r+" is not a function"));return}function s(){c.unsubscribe(),a()}var c=i.subscribe({next:function(u){try{r(u,s)}catch(l){o(l),c.unsubscribe()}},error:o,complete:a})})},t.map=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){return i.subscribe({next:function(s){try{s=r(s)}catch(c){return o.error(c)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},t.filter=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){return i.subscribe({next:function(s){try{if(!r(s))return}catch(c){return o.error(c)}o.next(s)},error:function(s){o.error(s)},complete:function(){o.complete()}})})},t.reduce=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this),o=arguments.length>1,s=!1,c=arguments[1],u=c;return new a(function(l){return i.subscribe({next:function(h){var f=!s;if(s=!0,!f||o)try{u=r(u,h)}catch(g){return l.error(g)}else u=h},error:function(h){l.error(h)},complete:function(){if(!s&&!o)return l.error(new TypeError("Cannot reduce an empty sequence"));l.next(u),l.complete()}})})},t.concat=function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=gr(this);return new s(function(c){var u,l=0;function h(f){u=f.subscribe({next:function(g){c.next(g)},error:function(g){c.error(g)},complete:function(){l===a.length?(u=void 0,c.complete()):h(s.from(a[l++]))}})}return h(r),function(){u&&(u.unsubscribe(),u=void 0)}})},t.flatMap=function(r){var i=this;if(typeof r!="function")throw new TypeError(r+" is not a function");var a=gr(this);return new a(function(o){var s=[],c=i.subscribe({next:function(l){if(r)try{l=r(l)}catch(f){return o.error(f)}var h=a.from(l).subscribe({next:function(f){o.next(f)},error:function(f){o.error(f)},complete:function(){var f=s.indexOf(h);f>=0&&s.splice(f,1),u()}});s.push(h)},error:function(l){o.error(l)},complete:function(){u()}});function u(){c.closed&&s.length===0&&o.complete()}return function(){s.forEach(function(l){return l.unsubscribe()}),c.unsubscribe()}})},t[za]=function(){return this},e.from=function(r){var i=typeof this=="function"?this:e;if(r==null)throw new TypeError(r+" is not an object");var a=Ei(r,za);if(a){var o=a.call(r);if(Object(o)!==o)throw new TypeError(o+" is not an object");return Mp(o)&&o.constructor===i?o:new i(function(s){return o.subscribe(s)})}if(Fo("iterator")&&(a=Ei(r,Dp),a))return new i(function(s){hi(function(){if(!s.closed){for(var c=_p(a.call(r)),u;!(u=c()).done;){var l=u.value;if(s.next(l),s.closed)return}s.complete()}})});if(Array.isArray(r))return new i(function(s){hi(function(){if(!s.closed){for(var c=0;c<r.length;++c)if(s.next(r[c]),s.closed)return;s.complete()}})});throw new TypeError(r+" is not observable")},e.of=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=typeof this=="function"?this:e;return new o(function(s){hi(function(){if(!s.closed){for(var c=0;c<i.length;++c)if(s.next(i[c]),s.closed)return;s.complete()}})})},No(e,null,[{key:Nl,get:function(){return this}}]),e}();Ao()&&Object.defineProperty(Fe,Symbol("extensions"),{value:{symbol:za,hostReportError:Kn},configurable:!0});function jp(e){var t,n=e.Symbol;if(typeof n=="function")if(n.observable)t=n.observable;else{typeof n.for=="function"?t=n.for("https://github.com/benlesh/symbol-observable"):t=n("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch{}}else t="@@observable";return t}var jn;typeof self<"u"?jn=self:typeof window<"u"?jn=window:typeof global<"u"?jn=global:typeof module<"u"?jn=module:jn=Function("return this")();jp(jn);var bc=Fe.prototype,xc="@@observable";bc[xc]||(bc[xc]=function(){return this});var Pp=Object.prototype.toString;function Vl(e){return Wa(e)}function Wa(e,t){switch(Pp.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach(function(i,a){n[a]=Wa(i,t)}),n}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach(function(i){r[i]=Wa(e[i],t)}),r}default:return e}}function Np(e){var t=new Set([e]);return t.forEach(function(n){Be(n)&&Ap(n)===n&&Object.getOwnPropertyNames(n).forEach(function(r){Be(n[r])&&t.add(n[r])})}),e}function Ap(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function Ir(e){return globalThis.__DEV__!==!1&&Np(e),e}function Sr(e,t,n){var r=[];e.forEach(function(i){return i[t]&&r.push(i)}),r.forEach(function(i){return i[t](n)})}function Sa(e,t,n){return new Fe(function(r){var i={then:function(c){return new Promise(function(u){return u(c())})}};function a(c,u){return function(l){if(c){var h=function(){return r.closed?0:c(l)};i=i.then(h,h).then(function(f){return r.next(f)},function(f){return r.error(f)})}else r[u](l)}}var o={next:a(t,"next"),error:a(n,"error"),complete:function(){i.then(function(){return r.complete()})}},s=e.subscribe(o);return function(){return s.unsubscribe()}})}function ql(e){function t(n){Object.defineProperty(e,n,{value:Fe})}return _o&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Ec(e){return e&&typeof e.then=="function"}var Pn=function(e){Gt(t,e);function t(n){var r=e.call(this,function(i){return r.addObserver(i),function(){return r.removeObserver(i)}})||this;return r.observers=new Set,r.promise=new Promise(function(i,a){r.resolve=i,r.reject=a}),r.handlers={next:function(i){r.sub!==null&&(r.latest=["next",i],r.notify("next",i),Sr(r.observers,"next",i))},error:function(i){var a=r.sub;a!==null&&(a&&setTimeout(function(){return a.unsubscribe()}),r.sub=null,r.latest=["error",i],r.reject(i),r.notify("error",i),Sr(r.observers,"error",i))},complete:function(){var i=r,a=i.sub,o=i.sources,s=o===void 0?[]:o;if(a!==null){var c=s.shift();c?Ec(c)?c.then(function(u){return r.sub=u.subscribe(r.handlers)},r.handlers.error):r.sub=c.subscribe(r.handlers):(a&&setTimeout(function(){return a.unsubscribe()}),r.sub=null,r.latest&&r.latest[0]==="next"?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),Sr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(i){r.reject(i),r.sources=[],r.handlers.error(i)},r.promise.catch(function(i){}),typeof n=="function"&&(n=[new Fe(n)]),Ec(n)?n.then(function(i){return r.start(i)},r.handlers.error):r.start(n),r}return t.prototype.start=function(n){this.sub===void 0&&(this.sources=Array.from(n),this.handlers.complete())},t.prototype.deliverLastMessage=function(n){if(this.latest){var r=this.latest[0],i=n[r];i&&i.call(n,this.latest[1]),this.sub===null&&r==="next"&&n.complete&&n.complete()}},t.prototype.addObserver=function(n){this.observers.has(n)||(this.deliverLastMessage(n),this.observers.add(n))},t.prototype.removeObserver=function(n){this.observers.delete(n)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(n,r){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(a){return a(n,r)}))},t.prototype.beforeNext=function(n){var r=!1;this.nextResultListeners.add(function(i,a){r||(r=!0,n(i,a))})},t}(Fe);ql(Pn);function zn(e){return"incremental"in e}function Fp(e){return"hasNext"in e&&"data"in e}function Vp(e){return zn(e)||Fp(e)}function qp(e){return Be(e)&&"payload"in e}function $l(e,t){var n=e,r=new hn;return zn(t)&&Dt(t.incremental)&&t.incremental.forEach(function(i){for(var a=i.data,o=i.path,s=o.length-1;s>=0;--s){var c=o[s],u=!isNaN(+c),l=u?[]:{};l[c]=a,a=l}n=r.merge(n,a)}),n}function di(e){var t=Ga(e);return Dt(t)}function Ga(e){var t=Dt(e.errors)?e.errors.slice(0):[];return zn(e)&&Dt(e.incremental)&&e.incremental.forEach(function(n){n.errors&&t.push.apply(t,n.errors)}),t}function wn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach(function(r){r&&Object.keys(r).forEach(function(i){var a=r[i];a!==void 0&&(n[i]=a)})}),n}function Qn(e,t){return wn(e,t,t.variables&&{variables:wn(D(D({},e&&e.variables),t.variables))})}function Oa(e){return new Fe(function(t){t.error(e)})}var Ul=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r};function $p(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw vt(44,i)}return e}function Up(e,t){var n=D({},e),r=function(a){typeof a=="function"?n=D(D({},n),a(n)):n=D(D({},n),a)},i=function(){return D({},n)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:r}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function Bp(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?Ha(t.query)||void 0:""),t}function Hp(e,t){var n=D({},e),r=new Set(Object.keys(e));return Xt(t,{Variable:function(i,a,o){o&&o.kind!=="VariableDefinition"&&r.delete(i.name.value)}}),r.forEach(function(i){delete n[i]}),n}function wc(e,t){return t?t(e):Fe.of()}function vr(e){return typeof e=="function"?new Ur(e):e}function oi(e){return e.request.length<=1}var Ur=function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Fe.of()})},e.from=function(t){return t.length===0?e.empty():t.map(vr).reduce(function(n,r){return n.concat(r)})},e.split=function(t,n,r){var i=vr(n),a=vr(r||new e(wc)),o;return oi(i)&&oi(a)?o=new e(function(s){return t(s)?i.request(s)||Fe.of():a.request(s)||Fe.of()}):o=new e(function(s,c){return t(s)?i.request(s,c)||Fe.of():a.request(s,c)||Fe.of()}),Object.assign(o,{left:i,right:a})},e.execute=function(t,n){return t.request(Up(n.context,Bp($p(n))))||Fe.of()},e.concat=function(t,n){var r=vr(t);if(oi(r))return globalThis.__DEV__!==!1&&ie.warn(36,r),r;var i=vr(n),a;return oi(i)?a=new e(function(o){return r.request(o,function(s){return i.request(s)||Fe.of()})||Fe.of()}):a=new e(function(o,s){return r.request(o,function(c){return i.request(c,s)||Fe.of()})||Fe.of()}),Object.assign(a,{left:r,right:i})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(wc)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,n){throw vt(37)},e.prototype.onError=function(t,n){if(n&&n.error)return n.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e}(),Ya=Ur.execute;function zp(e){var t,n=e[Symbol.asyncIterator]();return t={next:function(){return n.next()}},t[Symbol.asyncIterator]=function(){return this},t}function Qp(e){var t=null,n=null,r=!1,i=[],a=[];function o(h){if(!n){if(a.length){var f=a.shift();if(Array.isArray(f)&&f[0])return f[0]({value:h,done:!1})}i.push(h)}}function s(h){n=h;var f=a.slice();f.forEach(function(g){g[1](h)}),!t||t()}function c(){r=!0;var h=a.slice();h.forEach(function(f){f[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",o),e.removeListener("error",s),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",o),e.on("error",s),e.on("end",c),e.on("finish",c),e.on("close",c);function u(){return new Promise(function(h,f){if(n)return f(n);if(i.length)return h({value:i.shift(),done:!1});if(r)return h({value:void 0,done:!0});a.push([h,f])})}var l={next:function(){return u()}};return Ni&&(l[Symbol.asyncIterator]=function(){return this}),l}function Wp(e){var t=!1,n={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(r,i){e.then(function(a){r({value:a,done:!1})}).catch(i)}))}};return Ni&&(n[Symbol.asyncIterator]=function(){return this}),n}function Sc(e){var t={next:function(){return e.read()}};return Ni&&(t[Symbol.asyncIterator]=function(){return this}),t}function Gp(e){return!!e.body}function Yp(e){return!!e.getReader}function Kp(e){return!!(Ni&&e[Symbol.asyncIterator])}function Xp(e){return!!e.stream}function Jp(e){return!!e.arrayBuffer}function Zp(e){return!!e.pipe}function eg(e){var t=e;if(Gp(e)&&(t=e.body),Kp(t))return zp(t);if(Yp(t))return Sc(t.getReader());if(Xp(t))return Sc(t.stream().getReader());if(Jp(t))return Wp(t.arrayBuffer());if(Zp(t))return Qp(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var qo=Symbol();function tg(e){return e.extensions?Array.isArray(e.extensions[qo]):!1}function Bl(e){return e.hasOwnProperty("graphQLErrors")}var ng=function(e){var t=wt(wt(wt([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(n){return Be(n)&&n.message||"Error message not found."}).join(`
163
+ `)},Yt=function(e){Gt(t,e);function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,u=e.call(this,s)||this;return u.name="ApolloError",u.graphQLErrors=r||[],u.protocolErrors=i||[],u.clientErrors=a||[],u.networkError=o||null,u.message=s||ng(u),u.extraInfo=c,u.cause=wt(wt(wt([o],r||[],!0),i||[],!0),a||[],!0).find(function(l){return!!l})||null,u.__proto__=t.prototype,u}return t}(Error),Oc=Object.prototype.hasOwnProperty;function rg(e,t){return an(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,l,h,f,g,x,w,T,O,_,y,C,S,R,P,F,U;return on(this,function(V){switch(V.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");n=new TextDecoder("utf-8"),r=(U=e.headers)===null||U===void 0?void 0:U.get("content-type"),i="boundary=",a=r!=null&&r.includes(i)?r==null?void 0:r.substring((r==null?void 0:r.indexOf(i))+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",o=`\r
164
+ --`.concat(a),s="",c=eg(e),u=!0,V.label=1;case 1:return u?[4,c.next()]:[3,3];case 2:for(l=V.sent(),h=l.value,f=l.done,g=typeof h=="string"?h:n.decode(h),x=s.length-o.length+1,u=!f,s+=g,w=s.indexOf(o,x);w>-1;){if(T=void 0,P=[s.slice(0,w),s.slice(w+o.length)],T=P[0],s=P[1],O=T.indexOf(`\r
165
165
  \r
166
- `),_=ig(T.slice(0,S)),y=_["content-type"],y&&y.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(C=T.slice(S),C){if(O=zl(e,C),Object.keys(O).length>1||"data"in O||"incremental"in O||"errors"in O||"payload"in O)if(qm(O)){if(R={},"payload"in O){if(Object.keys(O).length===1&&O.payload===null)return[2];R=D({},O.payload)}"errors"in O&&(R=D(D({},R),{extensions:D(D({},"extensions"in R?R.extensions:null),(F={},F[qo]=O.errors,F))})),t(R)}else t(O);else if(Object.keys(O).length===1&&"hasNext"in O&&!O.hasNext)return[2]}w=s.indexOf(o)}return[3,1];case 3:return[2]}})})}function ig(e){var t={};return e.split(`
167
- `).forEach(function(n){var r=n.indexOf(":");if(r>-1){var i=n.slice(0,r).trim().toLowerCase(),a=n.slice(r+1).trim();t[i]=a}}),t}function zl(e,t){if(e.status>=300){var n=function(){try{return JSON.parse(t)}catch{return t}};Ul(e,n(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var r=i;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function ag(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function og(e){return function(t){return t.text().then(function(n){return zl(t,n)}).then(function(n){return!Array.isArray(n)&&!Sc.call(n,"data")&&!Sc.call(n,"errors")&&Ul(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(r){return r.operationName}):e.operationName,"'.")),n})}}var Ka=function(e,t){var n;try{n=JSON.stringify(e)}catch(i){var r=vt(40,t,i.message);throw r.parseError=i,r}return n},sg={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},cg={accept:"*/*","content-type":"application/json"},ug={method:"POST"},lg={http:sg,headers:cg,options:ug},fg=function(e,t){return t(e)};function hg(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},a={};n.forEach(function(d){i=D(D(D({},i),d.options),{headers:D(D({},i.headers),d.headers)}),d.credentials&&(i.credentials=d.credentials),a=D(D({},a),d.http)}),i.headers&&(i.headers=dg(i.headers,a.preserveHeaderCase));var o=e.operationName,s=e.extensions,c=e.variables,u=e.query,l={operationName:o,variables:c};return a.includeExtensions&&(l.extensions=s),a.includeQuery&&(l.query=t(u,Bi)),{options:i,body:l}}function dg(e,t){if(!t){var n={};return Object.keys(Object(e)).forEach(function(a){n[a.toLowerCase()]=e[a]}),n}var r={};Object.keys(Object(e)).forEach(function(a){r[a.toLowerCase()]={originalName:a,value:e[a]}});var i={};return Object.keys(r).forEach(function(a){i[r[a].originalName]=r[a].value}),i}var pg=function(e){if(!e&&typeof fetch>"u")throw vt(38)},mg=function(e,t){var n=e.getContext(),r=n.uri;return r||(typeof t=="function"?t(e):t||"/graphql")};function gg(e,t){var n=[],r=function(d,f){n.push("".concat(d,"=").concat(encodeURIComponent(f)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=Ka(t.variables,"Variables map")}catch(d){return{parseError:d}}r("variables",i)}if(t.extensions){var a=void 0;try{a=Ka(t.extensions,"Extensions map")}catch(d){return{parseError:d}}r("extensions",a)}var o="",s=e,c=e.indexOf("#");c!==-1&&(o=e.substr(c),s=e.substr(0,c));var u=s.indexOf("?")===-1?"?":"&",l=s+u+n.join("&")+o;return{newURI:l}}var Tc=Ft(function(){return fetch}),vg=function(e){e===void 0&&(e={});var t=e.uri,n=t===void 0?"/graphql":t,r=e.fetch,i=e.print,a=i===void 0?fg:i,o=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,u=e.includeUnusedVariables,l=u===void 0?!1:u,d=Vt(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&pg(r||Tc);var f={http:{includeExtensions:o,preserveHeaderCase:s},options:d.fetchOptions,credentials:d.credentials,headers:d.headers};return new Ur(function(g){var x=mg(g,n),w=g.getContext(),T={};if(w.clientAwareness){var S=w.clientAwareness,_=S.name,y=S.version;_&&(T["apollographql-client-name"]=_),y&&(T["apollographql-client-version"]=y)}var C=D(D({},T),w.headers),O={http:w.http,options:w.fetchOptions,credentials:w.credentials,headers:C};if(Dr(["client"],g.query)){var R=Pl(g.query);if(!R)return Sa(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));g.query=R}var P=hg(g,a,lg,f,O),F=P.options,U=P.body;U.variables&&!l&&(U.variables=zm(U.variables,g.query));var V;!F.signal&&typeof AbortController<"u"&&(V=new AbortController,F.signal=V.signal);var ye=function(Z){return Z.kind==="OperationDefinition"&&Z.operation==="mutation"},_e=function(Z){return Z.kind==="OperationDefinition"&&Z.operation==="subscription"},ve=_e($r(g.query)),we=Dr(["defer"],g.query);if(c&&!g.query.definitions.some(ye)&&(F.method="GET"),we||ve){F.headers=F.headers||{};var Ne="multipart/mixed;";ve&&we&&globalThis.__DEV__!==!1&&ie.warn(39),ve?Ne+="boundary=graphql;subscriptionSpec=1.0,application/json":we&&(Ne+="deferSpec=20220824,application/json"),F.headers.accept=Ne}if(F.method==="GET"){var Ie=gg(x,U),G=Ie.newURI,$=Ie.parseError;if($)return Sa($);x=G}else try{F.body=Ka(U,"Payload")}catch(Z){return Sa(Z)}return new Ae(function(Z){var j=r||Ft(function(){return fetch})||Tc,A=Z.next.bind(Z);return j(x,F).then(function(Y){var se;g.setContext({response:Y});var ee=(se=Y.headers)===null||se===void 0?void 0:se.get("content-type");return ee!==null&&/^multipart\/mixed/i.test(ee)?rg(Y,A):og(g)(Y).then(A)}).then(function(){V=void 0,Z.complete()}).catch(function(Y){V=void 0,ag(Y,Z)}),function(){V&&V.abort()}})})},yg=function(e){Gt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,vg(n).request)||this;return r.options=n,r}return t}(Ur);const{toString:Cc,hasOwnProperty:bg}=Object.prototype,_c=Function.prototype.toString,Xa=new Map;function je(e,t){try{return Ja(e,t)}finally{Xa.clear()}}function Ja(e,t){if(e===t)return!0;const n=Cc.call(e),r=Cc.call(t);if(n!==r)return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Dc(e,t))return!0;const i=kc(e),a=kc(t),o=i.length;if(o!==a.length)return!1;for(let s=0;s<o;++s)if(!bg.call(t,i[s]))return!1;for(let s=0;s<o;++s){const c=i[s];if(!Ja(e[c],t[c]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Dc(e,t))return!0;const i=e.entries(),a=n==="[object Map]";for(;;){const o=i.next();if(o.done)break;const[s,c]=o.value;if(!t.has(s)||a&&!Ja(c,t.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=_c.call(e);return i!==_c.call(t)?!1:!wg(i,Eg)}}return!1}function kc(e){return Object.keys(e).filter(xg,e)}function xg(e){return this[e]!==void 0}const Eg="{ [native code] }";function wg(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function Dc(e,t){let n=Xa.get(e);if(n){if(n.has(t))return!0}else Xa.set(e,n=new Set);return n.add(t),!1}function Wl(e,t,n,r){var i=t.data,a=Vt(t,["data"]),o=n.data,s=Vt(n,["data"]);return je(a,s)&&pi($r(e).selectionSet,i,o,{fragmentMap:Ai(qi(e)),variables:r})}function pi(e,t,n,r){if(t===n)return!0;var i=new Set;return e.selections.every(function(a){if(i.has(a)||(i.add(a),!Fr(a,r.variables))||Mc(a))return!0;if(ln(a)){var o=un(a),s=t&&t[o],c=n&&n[o],u=a.selectionSet;if(!u)return je(s,c);var l=Array.isArray(s),d=Array.isArray(c);if(l!==d)return!1;if(l&&d){var f=s.length;if(c.length!==f)return!1;for(var g=0;g<f;++g)if(!pi(u,s[g],c[g],r))return!1;return!0}return pi(u,s,c,r)}else{var x=Fi(a,r.fragmentMap);if(x)return Mc(x)?!0:pi(x.selectionSet,t,n,r)}})}function Mc(e){return!!e.directives&&e.directives.some(Og)}function Og(e){return e.name.value==="nonreactive"}var Ql=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=Lr(kp,{max:zt["cache.fragmentQueryDocuments"]||1e3,cache:xi})}return e.prototype.batch=function(t){var n=this,r=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(n)},r),i},e.prototype.recordOptimisticTransaction=function(t,n){this.performTransaction(t,n)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(D(D({},t),{rootId:t.id||"ROOT_QUERY",optimistic:n}))},e.prototype.watchFragment=function(t){var n=this,r=t.fragment,i=t.fragmentName,a=t.from,o=t.optimistic,s=o===void 0?!0:o,c=Vt(t,["fragment","fragmentName","from","optimistic"]),u=this.getFragmentDoc(r,i),l=D(D({},c),{returnPartialData:!0,id:typeof a>"u"||typeof a=="string"?a:this.identify(a),query:u,optimistic:s}),d;return new Ae(function(f){return n.watch(D(D({},l),{immediate:!0,callback:function(g){if(!(d&&Wl(u,{data:d==null?void 0:d.result},{data:g.result}))){var x={data:g.result,complete:!!g.complete};g.missing&&(x.missing=zi(g.missing.map(function(w){return w.missing}))),d=g,f.next(x)}}}))})},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(D(D({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:n}))},e.prototype.writeQuery=function(t){var n=t.id,r=t.data,i=Vt(t,["id","data"]);return this.write(Object.assign(i,{dataId:n||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(t){var n=t.id,r=t.data,i=t.fragment,a=t.fragmentName,o=Vt(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(i,a),dataId:n,result:r}))},e.prototype.updateQuery=function(t,n){return this.batch({update:function(r){var i=r.readQuery(t),a=n(i);return a==null?i:(r.writeQuery(D(D({},t),{data:a})),a)}})},e.prototype.updateFragment=function(t,n){return this.batch({update:function(r){var i=r.readFragment(t),a=n(i);return a==null?i:(r.writeFragment(D(D({},t),{data:a})),a)}})},e}();globalThis.__DEV__!==!1&&(Ql.prototype.getMemoryInternals=Vp);var Hl=function(e){Gt(t,e);function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(o={},o[s.path[c]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),ot=Object.prototype.hasOwnProperty;function yr(e){return e==null}function Gl(e,t){var n=e.__typename,r=e.id,i=e._id;if(typeof n=="string"&&(t&&(t.keyObject=yr(r)?yr(i)?void 0:{_id:i}:{id:r}),yr(r)&&!yr(i)&&(r=i),!yr(r)))return"".concat(n,":").concat(typeof r=="number"||typeof r=="string"?r:JSON.stringify(r))}var Yl={dataIdFromObject:Gl,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Sg(e){return wn(Yl,e)}function Kl(e){var t=e.canonizeResults;return t===void 0?Yl.canonizeResults:t}function Tg(e,t){return Le(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var Xl=/^[_a-z][_0-9a-z]*/i;function dn(e){var t=e.match(Xl);return t?t[0]:e}function Za(e,t,n){return Be(t)?ze(t)?t.every(function(r){return Za(e,r,n)}):e.selections.every(function(r){if(ln(r)&&Fr(r,n)){var i=un(r);return ot.call(t,i)&&(!r.selectionSet||Za(r.selectionSet,t[i],n))}return!0}):!1}function $n(e){return Be(e)&&!Le(e)&&!ze(e)}function Cg(){return new hn}function Jl(e,t){var n=Ai(qi(e));return{fragmentMap:n,lookupFragment:function(r){var i=n[r];return!i&&t&&(i=t.lookup(r)),i||null}}}var mi=Object.create(null),Ta=function(){return mi},Lc=Object.create(null),Rr=function(){function e(t,n){var r=this;this.policies=t,this.group=n,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return Ir(Le(i)?r.get(i.__ref,a):i&&i[a])},this.canRead=function(i){return Le(i)?r.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return zn(i);if(Le(i))return i;var o=r.policies.identify(i)[0];if(o){var s=zn(o);return a&&r.merge(o,i),s}}}return e.prototype.toObject=function(){return D({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,n){if(this.group.depend(t,n),ot.call(this.data,t)){var r=this.data[t];if(r&&ot.call(r,n))return r[n]}if(n==="__typename"&&ot.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof rn)return this.parent.get(t,n)},e.prototype.lookup=function(t,n){if(n&&this.group.depend(t,"__exists"),ot.call(this.data,t))return this.data[t];if(this instanceof rn)return this.parent.lookup(t,n);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,n){var r=this,i;Le(t)&&(t=t.__ref),Le(n)&&(n=n.__ref);var a=typeof t=="string"?this.lookup(i=t):t,o=typeof n=="string"?this.lookup(i=n):n;if(o){ie(typeof i=="string",1);var s=new hn(kg).merge(a,o);if(this.data[i]=s,s!==a&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);a||(c.__exists=1),Object.keys(o).forEach(function(u){if(!a||a[u]!==s[u]){c[u]=1;var l=dn(u);l!==u&&!r.policies.hasKeyArgs(s.__typename,l)&&(c[l]=1),s[u]===void 0&&!(r instanceof rn)&&delete s[u]}}),c.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(u){return r.group.dirty(i,u)})}}},e.prototype.modify=function(t,n){var r=this,i=this.lookup(t);if(i){var a=Object.create(null),o=!1,s=!0,c={DELETE:mi,INVALIDATE:Lc,isReference:Le,toReference:this.toReference,canRead:this.canRead,readField:function(u,l){return r.policies.readField(typeof u=="string"?{fieldName:u,from:l||zn(t)}:u,{store:r})}};if(Object.keys(i).forEach(function(u){var l=dn(u),d=i[u];if(d!==void 0){var f=typeof n=="function"?n:n[u]||n[l];if(f){var g=f===Ta?mi:f(Ir(d),D(D({},c),{fieldName:l,storeFieldName:u,storage:r.getStorage(t,u)}));if(g===Lc)r.group.dirty(t,u);else if(g===mi&&(g=void 0),g!==d&&(a[u]=g,o=!0,d=g,globalThis.__DEV__!==!1)){var x=function(O){if(r.lookup(O.__ref)===void 0)return globalThis.__DEV__!==!1&&ie.warn(2,O),!0};if(Le(g))x(g);else if(Array.isArray(g))for(var w=!1,T=void 0,S=0,_=g;S<_.length;S++){var y=_[S];if(Le(y)){if(w=!0,x(y))break}else if(typeof y=="object"&&y){var C=r.policies.identify(y)[0];C&&(T=y)}if(w&&T!==void 0){globalThis.__DEV__!==!1&&ie.warn(3,T);break}}}}d!==void 0&&(s=!1)}}),o)return this.merge(t,a),s&&(this instanceof rn?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,n,r){var i,a=this.lookup(t);if(a){var o=this.getFieldValue(a,"__typename"),s=n&&r?this.policies.getStoreFieldName({typename:o,fieldName:n,args:r}):n;return this.modify(t,s?(i={},i[s]=Ta,i):Ta)}return!1},e.prototype.evict=function(t,n){var r=!1;return t.id&&(ot.call(this.data,t.id)&&(r=this.delete(t.id,t.fieldName,t.args)),this instanceof rn&&this!==n&&(r=this.parent.evict(t,n)||r),(t.fieldName||r)&&this.group.dirty(t.id,t.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,n=this.toObject(),r=[];return this.getRootIdSet().forEach(function(i){ot.call(t.policies.rootTypenamesById,i)||r.push(i)}),r.length&&(n.__META={extraRootIds:r.sort()}),n},e.prototype.replace=function(t){var n=this;if(Object.keys(this.data).forEach(function(a){t&&ot.call(t,a)||n.delete(a)}),t){var r=t.__META,i=Vt(t,["__META"]);Object.keys(i).forEach(function(a){n.merge(a,i[a])}),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof rn?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,n=this.getRootIdSet(),r=this.toObject();n.forEach(function(o){ot.call(r,o)&&(Object.keys(t.findChildRefIds(o)).forEach(n.add,n),delete r[o])});var i=Object.keys(r);if(i.length){for(var a=this;a instanceof rn;)a=a.parent;i.forEach(function(o){return a.delete(o)})}return i},e.prototype.findChildRefIds=function(t){if(!ot.call(this.refs,t)){var n=this.refs[t]=Object.create(null),r=this.data[t];if(!r)return n;var i=new Set([r]);i.forEach(function(a){Le(a)&&(n[a.__ref]=!0),Be(a)&&Object.keys(a).forEach(function(o){var s=a[o];Be(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Zl=function(){function e(t,n){n===void 0&&(n=null),this.caching=t,this.parent=n,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?Ll():null,this.keyMaker=new Zn(er)},e.prototype.depend=function(t,n){if(this.d){this.d(Ca(t,n));var r=dn(n);r!==n&&this.d(Ca(t,r)),this.parent&&this.parent.depend(t,n)}},e.prototype.dirty=function(t,n){this.d&&this.d.dirty(Ca(t,n),n==="__exists"?"forget":"setDirty")},e}();function Ca(e,t){return t+"#"+e}function Ic(e,t){Sr(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(n){Gt(r,n);function r(i){var a=i.policies,o=i.resultCaching,s=o===void 0?!0:o,c=i.seed,u=n.call(this,a,new Zl(s))||this;return u.stump=new _g(u),u.storageTrie=new Zn(er),c&&u.replace(c),u}return r.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},r.prototype.removeLayer=function(){return this},r.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},r}(e);e.Root=t})(Rr||(Rr={}));var rn=function(e){Gt(t,e);function t(n,r,i,a){var o=e.call(this,r.policies,a)||this;return o.id=n,o.parent=r,o.replay=i,o.group=a,i(o),o}return t.prototype.addLayer=function(n,r){return new t(n,this,r,this.group)},t.prototype.removeLayer=function(n){var r=this,i=this.parent.removeLayer(n);return n===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var o=r.data[a],s=i.lookup(a);s?o?o!==s&&Object.keys(o).forEach(function(c){je(o[c],s[c])||r.group.dirty(a,c)}):(r.group.dirty(a,"__exists"),Object.keys(s).forEach(function(c){r.group.dirty(a,c)})):r.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return D(D({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(n){var r=this.parent.findChildRefIds(n);return ot.call(this.data,n)?D(D({},r),e.prototype.findChildRefIds.call(this,n)):r},t.prototype.getStorage=function(){for(var n=this.parent;n.parent;)n=n.parent;return n.getStorage.apply(n,arguments)},t}(Rr),_g=function(e){Gt(t,e);function t(n){return e.call(this,"EntityStore.Stump",n,function(){},new Zl(n.group.caching,n.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(n,r){return this.parent.merge(n,r)},t}(rn);function kg(e,t,n){var r=e[n],i=t[n];return je(r,i)?r:i}function Sr(e){return!!(e instanceof Rr&&e.group.caching)}function Dg(e){return Be(e)?ze(e)?e.slice(0):D({__proto__:Object.getPrototypeOf(e)},e):e}var Rc=function(){function e(){this.known=new(hl?WeakSet:Set),this.pool=new Zn(er),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Be(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Be(t)){var n=Dg(t);return this.passes.set(n,t),n}return t},e.prototype.admit=function(t){var n=this;if(Be(t)){var r=this.passes.get(t);if(r)return r;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var a=t.map(this.admit,this),o=this.pool.lookupArray(a);return o.array||(this.known.add(o.array=a),globalThis.__DEV__!==!1&&Object.freeze(a)),o.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],u=this.sortedKeys(t);c.push(u.json);var l=c.length;u.sorted.forEach(function(g){c.push(n.admit(t[g]))});var o=this.pool.lookupArray(c);if(!o.object){var d=o.object=Object.create(s);this.known.add(d),u.sorted.forEach(function(g,x){d[g]=c[l+x]}),globalThis.__DEV__!==!1&&Object.freeze(d)}return o.object}}}return t},e.prototype.sortedKeys=function(t){var n=Object.keys(t),r=this.pool.lookupArray(n);if(!r.keys){n.sort();var i=JSON.stringify(n);(r.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,r.keys={sorted:n,json:i})}return r.keys},e}();function jc(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Mg=function(){function e(t){var n=this;this.knownResults=new(er?WeakMap:Map),this.config=wn(t,{addTypename:t.addTypename!==!1,canonizeResults:Kl(t)}),this.canon=t.canon||new Rc,this.executeSelectionSet=Lr(function(r){var i,a=r.context.canonizeResults,o=jc(r);o[3]=!a;var s=(i=n.executeSelectionSet).peek.apply(i,o);return s?a?D(D({},s),{result:n.canon.admit(s.result)}):s:(Ic(r.context.store,r.enclosingRef.__ref),n.execSelectionSetImpl(r))},{max:this.config.resultCacheMaxSize||zt["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:jc,makeCacheKey:function(r,i,a,o){if(Sr(a.store))return a.store.makeCacheKey(r,Le(i)?i.__ref:i,a.varString,o)}}),this.executeSubSelectedArray=Lr(function(r){return Ic(r.context.store,r.enclosingRef.__ref),n.execSubSelectedArrayImpl(r)},{max:this.config.resultCacheMaxSize||zt["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(r){var i=r.field,a=r.array,o=r.context;if(Sr(o.store))return o.store.makeCacheKey(i,a,o.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Rc},e.prototype.diffQueryAgainstStore=function(t){var n=t.store,r=t.query,i=t.rootId,a=i===void 0?"ROOT_QUERY":i,o=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,u=t.canonizeResults,l=u===void 0?this.config.canonizeResults:u,d=this.config.cache.policies;o=D(D({},Mo(bl(r))),o);var f=zn(a),g=this.executeSelectionSet({selectionSet:$r(r).selectionSet,objectOrReference:f,enclosingRef:f,context:D({store:n,query:r,policies:d,variables:o,varString:cn(o),canonizeResults:l},Jl(r,this.config.fragments))}),x;if(g.missing&&(x=[new Hl(Lg(g.missing),g.missing,r,o)],!c))throw x[0];return{result:g.result,complete:!x,missing:x}},e.prototype.isFresh=function(t,n,r,i){if(Sr(i.store)&&this.knownResults.get(t)===r){var a=this.executeSelectionSet.peek(r,n,i,this.canon.isKnown(t));if(a&&t===a.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var n=this,r=t.selectionSet,i=t.objectOrReference,a=t.enclosingRef,o=t.context;if(Le(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,c=o.policies,u=o.store,l=u.getFieldValue(i,"__typename"),d=[],f,g=new hn;this.config.addTypename&&typeof l=="string"&&!c.rootIdsByTypename[l]&&d.push({__typename:l});function x(y,C){var O;return y.missing&&(f=g.merge(f,(O={},O[C]=y.missing,O))),y.result}var w=new Set(r.selections);w.forEach(function(y){var C,O;if(Fr(y,s))if(ln(y)){var R=c.readField({fieldName:y.name.value,field:y,variables:o.variables,from:i},o),P=un(y);R===void 0?Po.added(y)||(f=g.merge(f,(C={},C[P]="Can't find field '".concat(y.name.value,"' on ").concat(Le(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),C))):ze(R)?R.length>0&&(R=x(n.executeSubSelectedArray({field:y,array:R,enclosingRef:a,context:o}),P)):y.selectionSet?R!=null&&(R=x(n.executeSelectionSet({selectionSet:y.selectionSet,objectOrReference:R,enclosingRef:Le(R)?R:a,context:o}),P)):o.canonizeResults&&(R=n.canon.pass(R)),R!==void 0&&d.push((O={},O[P]=R,O))}else{var F=Fi(y,o.lookupFragment);if(!F&&y.kind===K.FRAGMENT_SPREAD)throw vt(9,y.name.value);F&&c.fragmentMatches(F,l)&&F.selectionSet.selections.forEach(w.add,w)}});var T=zi(d),S={result:T,missing:f},_=o.canonizeResults?this.canon.admit(S):Ir(S);return _.result&&this.knownResults.set(_.result,r),_},e.prototype.execSubSelectedArrayImpl=function(t){var n=this,r=t.field,i=t.array,a=t.enclosingRef,o=t.context,s,c=new hn;function u(l,d){var f;return l.missing&&(s=c.merge(s,(f={},f[d]=l.missing,f))),l.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(l,d){return l===null?null:ze(l)?u(n.executeSubSelectedArray({field:r,array:l,enclosingRef:a,context:o}),d):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:l,enclosingRef:Le(l)?l:a,context:o}),d):(globalThis.__DEV__!==!1&&Ig(o.store,r,l),l)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function Lg(e){try{JSON.stringify(e,function(t,n){if(typeof n=="string")throw n;return n})}catch(t){return t}}function Ig(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(i){Be(i)&&(ie(!Le(i),10,Tg(e,i),t.name.value),Object.values(i).forEach(r.add,r))})}}var $o=new xl,Pc=new WeakMap;function Tr(e){var t=Pc.get(e);return t||Pc.set(e,t={vars:new Set,dep:Ll()}),t}function Nc(e){Tr(e).vars.forEach(function(t){return t.forgetCache(e)})}function Rg(e){Tr(e).vars.forEach(function(t){return t.attachCache(e)})}function jg(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(c){Tr(c).dep.dirty(r),Pg(c)});var o=Array.from(n);n.clear(),o.forEach(function(c){return c(e)})}}else{var s=$o.getValue();s&&(i(s),Tr(s).dep(r))}return e};r.onNextChange=function(a){return n.add(a),function(){n.delete(a)}};var i=r.attachCache=function(a){return t.add(a),Tr(a).vars.add(r),r};return r.forgetCache=function(a){return t.delete(a)},r}function Pg(e){e.broadcastWatches&&e.broadcastWatches()}var Ac=Object.create(null);function Uo(e){var t=JSON.stringify(e);return Ac[t]||(Ac[t]=Object.create(null))}function Fc(e){var t=Uo(e);return t.keyFieldsFn||(t.keyFieldsFn=function(n,r){var i=function(o,s){return r.readField(s,o)},a=r.keyObject=Bo(e,function(o){var s=Hn(r.storeObject,o,i);return s===void 0&&n!==r.storeObject&&ot.call(n,o[0])&&(s=Hn(n,o,tf)),ie(s!==void 0,4,o.join("."),n),s});return"".concat(r.typename,":").concat(JSON.stringify(a))})}function Vc(e){var t=Uo(e);return t.keyArgsFn||(t.keyArgsFn=function(n,r){var i=r.field,a=r.variables,o=r.fieldName,s=Bo(e,function(u){var l=u[0],d=l.charAt(0);if(d==="@"){if(i&&Dt(i.directives)){var f=l.slice(1),g=i.directives.find(function(S){return S.name.value===f}),x=g&&Vi(g,a);return x&&Hn(x,u.slice(1))}return}if(d==="$"){var w=l.slice(1);if(a&&ot.call(a,w)){var T=u.slice(0);return T[0]=w,Hn(a,T)}return}if(n)return Hn(n,u)}),c=JSON.stringify(s);return(n||c!=="{}")&&(o+=":"+c),o})}function Bo(e,t){var n=new hn;return ef(e).reduce(function(r,i){var a,o=t(i);if(o!==void 0){for(var s=i.length-1;s>=0;--s)o=(a={},a[i[s]]=o,a);r=n.merge(r,o)}return r},Object.create(null))}function ef(e){var t=Uo(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(i,a){ze(i)?(ef(i).forEach(function(o){return n.push(r.concat(o))}),r.length=0):(r.push(i),ze(e[a+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function tf(e,t){return e[t]}function Hn(e,t,n){return n=n||tf,nf(t.reduce(function r(i,a){return ze(i)?i.map(function(o){return r(o,a)}):i&&n(i,a)},e))}function nf(e){return Be(e)?ze(e)?e.map(nf):Bo(Object.keys(e).sort(),function(t){return Hn(e,t)}):e}function eo(e){return e.args!==void 0?e.args:e.field?Vi(e.field,e.variables):null}var Ng=function(){},qc=function(e,t){return t.fieldName},$c=function(e,t,n){var r=n.mergeObjects;return r(e,t)},Uc=function(e,t){return t},Ag=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=D({dataIdFromObject:Gl},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,n){var r,i=this,a=n&&(n.typename||((r=n.storeObject)===null||r===void 0?void 0:r.__typename))||t.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=n&&n.storeObject||t,s=D(D({},n),{typename:a,storeObject:o,readField:n&&n.readField||function(){var f=zo(arguments,o);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,u=a&&this.getTypePolicy(a),l=u&&u.keyFn||this.config.dataIdFromObject;l;){var d=l(D(D({},t),o),s);if(ze(d))l=Fc(d);else{c=d;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var n=this;Object.keys(t).forEach(function(r){var i=t[r],a=i.queryType,o=i.mutationType,s=i.subscriptionType,c=Vt(i,["queryType","mutationType","subscriptionType"]);a&&n.setRootTypename("Query",r),o&&n.setRootTypename("Mutation",r),s&&n.setRootTypename("Subscription",r),ot.call(n.toBeAdded,r)?n.toBeAdded[r].push(c):n.toBeAdded[r]=[c]})},e.prototype.updateTypePolicy=function(t,n){var r=this,i=this.getTypePolicy(t),a=n.keyFields,o=n.fields;function s(c,u){c.merge=typeof u=="function"?u:u===!0?$c:u===!1?Uc:c.merge}s(i,n.merge),i.keyFn=a===!1?Ng:ze(a)?Fc(a):typeof a=="function"?a:i.keyFn,o&&Object.keys(o).forEach(function(c){var u=r.getFieldPolicy(t,c,!0),l=o[c];if(typeof l=="function")u.read=l;else{var d=l.keyArgs,f=l.read,g=l.merge;u.keyFn=d===!1?qc:ze(d)?Vc(d):typeof d=="function"?d:u.keyFn,typeof f=="function"&&(u.read=f),s(u,g)}u.read&&u.merge&&(u.keyFn=u.keyFn||qc)})},e.prototype.setRootTypename=function(t,n){n===void 0&&(n=t);var r="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[r];n!==i&&(ie(!i||i===t,5,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)},e.prototype.addPossibleTypes=function(t){var n=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(r){n.getSupertypeSet(r,!0),t[r].forEach(function(i){n.getSupertypeSet(i,!0).add(r);var a=i.match(Xl);(!a||a[0]!==i)&&n.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var n=this;if(!ot.call(this.typePolicies,t)){var r=this.typePolicies[t]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(o,s){if(o.test(t)){var c=n.supertypeMap.get(s);c&&c.forEach(function(u){return i.add(u)})}})),i&&i.size&&i.forEach(function(o){var s=n.getTypePolicy(o),c=s.fields,u=Vt(s,["fields"]);Object.assign(r,u),Object.assign(r.fields,c)})}var a=this.toBeAdded[t];return a&&a.length&&a.splice(0).forEach(function(o){n.updateTypePolicy(t,o)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,n,r){if(t){var i=this.getTypePolicy(t).fields;return i[n]||r&&(i[n]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,n){var r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r},e.prototype.fragmentMatches=function(t,n,r,i){var a=this;if(!t.typeCondition)return!0;if(!n)return!1;var o=t.typeCondition.name.value;if(n===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(n,!0),c=[s],u=function(x){var w=a.getSupertypeSet(x,!1);w&&w.size&&c.indexOf(w)<0&&c.push(w)},l=!!(r&&this.fuzzySubtypes.size),d=!1,f=0;f<c.length;++f){var g=c[f];if(g.has(o))return s.has(o)||(d&&globalThis.__DEV__!==!1&&ie.warn(6,n,o),s.add(o)),!0;g.forEach(u),l&&f===c.length-1&&Za(t.selectionSet,r,i)&&(l=!1,d=!0,this.fuzzySubtypes.forEach(function(x,w){var T=n.match(x);T&&T[0]===n&&u(w)}))}return!1},e.prototype.hasKeyArgs=function(t,n){var r=this.getFieldPolicy(t,n,!1);return!!(r&&r.keyFn)},e.prototype.getStoreFieldName=function(t){var n=t.typename,r=t.fieldName,i=this.getFieldPolicy(n,r,!1),a,o=i&&i.keyFn;if(o&&n)for(var s={typename:n,fieldName:r,field:t.field||null,variables:t.variables},c=eo(t);o;){var u=o(c,s);if(ze(u))o=Vc(u);else{a=u||r;break}}return a===void 0&&(a=t.field?nm(t.field,t.variables):yl(r,eo(t))),a===!1?r:r===dn(a)?a:r+":"+a},e.prototype.readField=function(t,n){var r=t.from;if(r){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var a=n.store.getFieldValue(r,"__typename");a&&(t.typename=a)}var o=this.getStoreFieldName(t),s=dn(o),c=n.store.getFieldValue(r,o),u=this.getFieldPolicy(t.typename,s,!1),l=u&&u.read;if(l){var d=Bc(this,r,t,n,n.store.getStorage(Le(r)?r.__ref:r,o));return $o.withValue(this.cache,l,[c,d])}return c}}},e.prototype.getReadFunction=function(t,n){var r=this.getFieldPolicy(t,n,!1);return r&&r.read},e.prototype.getMergeFunction=function(t,n,r){var i=this.getFieldPolicy(t,n,!1),a=i&&i.merge;return!a&&r&&(i=this.getTypePolicy(r),a=i&&i.merge),a},e.prototype.runMergeFunction=function(t,n,r,i,a){var o=r.field,s=r.typename,c=r.merge;return c===$c?rf(i.store)(t,n):c===Uc?n:(i.overwrite&&(t=void 0),c(t,n,Bc(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:i.variables},i,a||Object.create(null))))},e}();function Bc(e,t,n,r,i){var a=e.getStoreFieldName(n),o=dn(a),s=n.variables||r.variables,c=r.store,u=c.toReference,l=c.canRead;return{args:eo(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:Le,toReference:u,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(zo(arguments,t,s),r)},mergeObjects:rf(r.store)}}function zo(e,t,n){var r=e[0],i=e[1],a=e.length,o;return typeof r=="string"?o={fieldName:r,from:a>1?i:t}:(o=D({},r),ot.call(o,"from")||(o.from=t)),globalThis.__DEV__!==!1&&o.from===void 0&&globalThis.__DEV__!==!1&&ie.warn(7,Ju(Array.from(e))),o.variables===void 0&&(o.variables=n),o}function rf(e){return function(n,r){if(ze(n)||ze(r))throw vt(8);if(Be(n)&&Be(r)){var i=e.getFieldValue(n,"__typename"),a=e.getFieldValue(r,"__typename"),o=i&&a&&i!==a;if(o)return r;if(Le(n)&&$n(r))return e.merge(n.__ref,r),n;if($n(n)&&Le(r))return e.merge(n,r.__ref),r;if($n(n)&&$n(r))return D(D({},n),r)}return r}}function _a(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:D(D({},e),{clientOnly:t,deferred:n})),i}var Fg=function(){function e(t,n,r){this.cache=t,this.reader=n,this.fragments=r}return e.prototype.writeToStore=function(t,n){var r=this,i=n.query,a=n.result,o=n.dataId,s=n.variables,c=n.overwrite,u=qr(i),l=Cg();s=D(D({},Mo(u)),s);var d=D(D({store:t,written:Object.create(null),merge:function(g,x){return l.merge(g,x)},variables:s,varString:cn(s)},Jl(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:a||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:d});if(!Le(f))throw vt(11,a);return d.incomingById.forEach(function(g,x){var w=g.storeObject,T=g.mergeTree,S=g.fieldNodeSet,_=zn(x);if(T&&T.map.size){var y=r.applyMerges(T,_,w,d);if(Le(y))return;w=y}if(globalThis.__DEV__!==!1&&!d.overwrite){var C=Object.create(null);S.forEach(function(P){P.selectionSet&&(C[P.name.value]=!0)});var O=function(P){return C[dn(P)]===!0},R=function(P){var F=T&&T.map.get(P);return!!(F&&F.info&&F.info.merge)};Object.keys(w).forEach(function(P){O(P)&&!R(P)&&Vg(_,w,P,d.store)})}t.merge(x,w)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var n=this,r=t.dataId,i=t.result,a=t.selectionSet,o=t.context,s=t.mergeTree,c=this.cache.policies,u=Object.create(null),l=r&&c.rootTypenamesById[r]||Ba(i,a,o.fragmentMap)||r&&o.store.get(r,"__typename");typeof l=="string"&&(u.__typename=l);var d=function(){var y=zo(arguments,u,o.variables);if(Le(y.from)){var C=o.incomingById.get(y.from.__ref);if(C){var O=c.readField(D(D({},y),{from:C.storeObject}),o);if(O!==void 0)return O}}return c.readField(y,o)},f=new Set;this.flattenFields(a,i,o,l).forEach(function(y,C){var O,R=un(C),P=i[R];if(f.add(C),P!==void 0){var F=c.getStoreFieldName({typename:l,fieldName:C.name.value,field:C,variables:y.variables}),U=zc(s,F),V=n.processFieldValue(P,C,C.selectionSet?_a(y,!1,!1):y,U),ye=void 0;C.selectionSet&&(Le(V)||$n(V))&&(ye=d("__typename",V));var _e=c.getMergeFunction(l,C.name.value,ye);_e?U.info={field:C,typename:l,merge:_e}:Wc(s,F),u=y.merge(u,(O={},O[F]=V,O))}else globalThis.__DEV__!==!1&&!y.clientOnly&&!y.deferred&&!Po.added(C)&&!c.getReadFunction(l,C.name.value)&&globalThis.__DEV__!==!1&&ie.error(12,un(C),i)});try{var g=c.identify(i,{typename:l,selectionSet:a,fragmentMap:o.fragmentMap,storeObject:u,readField:d}),x=g[0],w=g[1];r=r||x,w&&(u=o.merge(u,w))}catch(y){if(!r)throw y}if(typeof r=="string"){var T=zn(r),S=o.written[r]||(o.written[r]=[]);if(S.indexOf(a)>=0||(S.push(a),this.reader&&this.reader.isFresh(i,T,a,o)))return T;var _=o.incomingById.get(r);return _?(_.storeObject=o.merge(_.storeObject,u),_.mergeTree=to(_.mergeTree,s),f.forEach(function(y){return _.fieldNodeSet.add(y)})):o.incomingById.set(r,{storeObject:u,mergeTree:wi(s)?void 0:s,fieldNodeSet:f}),T}return u},e.prototype.processFieldValue=function(t,n,r,i){var a=this;return!n.selectionSet||t===null?globalThis.__DEV__!==!1?Vl(t):t:ze(t)?t.map(function(o,s){var c=a.processFieldValue(o,n,r,zc(i,s));return Wc(i,s),c}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:i})},e.prototype.flattenFields=function(t,n,r,i){i===void 0&&(i=Ba(n,t,r.fragmentMap));var a=new Map,o=this.cache.policies,s=new Zn(!1);return function c(u,l){var d=s.lookup(u,l.clientOnly,l.deferred);d.visited||(d.visited=!0,u.selections.forEach(function(f){if(Fr(f,r.variables)){var g=l.clientOnly,x=l.deferred;if(!(g&&x)&&Dt(f.directives)&&f.directives.forEach(function(S){var _=S.name.value;if(_==="client"&&(g=!0),_==="defer"){var y=Vi(S,r.variables);(!y||y.if!==!1)&&(x=!0)}}),ln(f)){var w=a.get(f);w&&(g=g&&w.clientOnly,x=x&&w.deferred),a.set(f,_a(r,g,x))}else{var T=Fi(f,r.lookupFragment);if(!T&&f.kind===K.FRAGMENT_SPREAD)throw vt(13,f.name.value);T&&o.fragmentMatches(T,i,n,r.variables)&&c(T.selectionSet,_a(r,g,x))}}}))}(t,r),a},e.prototype.applyMerges=function(t,n,r,i,a){var o,s=this;if(t.map.size&&!Le(r)){var c=!ze(r)&&(Le(n)||$n(n))?n:void 0,u=r;c&&!a&&(a=[Le(c)?c.__ref:c]);var l,d=function(f,g){return ze(f)?typeof g=="number"?f[g]:void 0:i.store.getFieldValue(f,String(g))};t.map.forEach(function(f,g){var x=d(c,g),w=d(u,g);if(w!==void 0){a&&a.push(g);var T=s.applyMerges(f,x,w,i,a);T!==w&&(l=l||new Map,l.set(g,T)),a&&ie(a.pop()===g)}}),l&&(r=ze(u)?u.slice(0):D({},u),l.forEach(function(f,g){r[g]=f}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,i,a&&(o=i.store).getStorage.apply(o,a)):r},e}(),af=[];function zc(e,t){var n=e.map;return n.has(t)||n.set(t,af.pop()||{map:new Map}),n.get(t)}function to(e,t){if(e===t||!t||wi(t))return e;if(!e||wi(e))return t;var n=e.info&&t.info?D(D({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(s,c){a.map.set(c,to(s,t.map.get(c))),o.delete(c)}),o.forEach(function(s){a.map.set(s,to(t.map.get(s),e.map.get(s)))})}return a}function wi(e){return!e||!(e.info||e.map.size)}function Wc(e,t){var n=e.map,r=n.get(t);r&&wi(r)&&(af.push(r),n.delete(t))}var Qc=new Set;function Vg(e,t,n,r){var i=function(d){var f=r.getFieldValue(d,n);return typeof f=="object"&&f},a=i(e);if(a){var o=i(t);if(o&&!Le(a)&&!je(a,o)&&!Object.keys(a).every(function(d){return r.getFieldValue(o,d)!==void 0})){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),c=dn(n),u="".concat(s,".").concat(c);if(!Qc.has(u)){Qc.add(u);var l=[];!ze(a)&&!ze(o)&&[a,o].forEach(function(d){var f=r.getFieldValue(d,"__typename");typeof f=="string"&&!l.includes(f)&&l.push(f)}),globalThis.__DEV__!==!1&&ie.warn(14,c,s,l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"",u,D({},a),D({},o))}}}}var of=function(e){Gt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new Il(Po),r.assumeImmutableResults=!0,r.makeVar=jg,r.txCount=0,r.config=Sg(n),r.addTypename=!!r.config.addTypename,r.policies=new Ag({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return t.prototype.init=function(){var n=this.data=new Rr.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=n.stump,this.resetResultCache()},t.prototype.resetResultCache=function(n){var r=this,i=this.storeReader,a=this.config.fragments;this.storeWriter=new Fg(this,this.storeReader=new Mg({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Kl(this.config),canon:n?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Lr(function(o,s){return r.broadcastWatch(o,s)},{max:this.config.resultCacheMaxSize||zt["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(o){var s=o.optimistic?r.optimisticData:r.data;if(Sr(s)){var c=o.optimistic,u=o.id,l=o.variables;return s.makeCacheKey(o.query,o.callback,cn({optimistic:c,id:u,variables:l}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(o){return o.resetCaching()})},t.prototype.restore=function(n){return this.init(),n&&this.data.replace(n),this},t.prototype.extract=function(n){return n===void 0&&(n=!1),(n?this.optimisticData:this.data).extract()},t.prototype.read=function(n){var r=n.returnPartialData,i=r===void 0?!1:r;try{return this.storeReader.diffQueryAgainstStore(D(D({},n),{store:n.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof Hl)return null;throw a}},t.prototype.write=function(n){try{return++this.txCount,this.storeWriter.writeToStore(this.data,n)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(n){if(ot.call(n,"id")&&!n.id)return!1;var r=n.optimistic?this.optimisticData:this.data;try{return++this.txCount,r.modify(n.id||"ROOT_QUERY",n.fields)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(n){return this.storeReader.diffQueryAgainstStore(D(D({},n),{store:n.optimistic?this.optimisticData:this.data,rootId:n.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(n){var r=this;return this.watches.size||Rg(this),this.watches.add(n),n.immediate&&this.maybeBroadcastWatch(n),function(){r.watches.delete(n)&&!r.watches.size&&Nc(r),r.maybeBroadcastWatch.forget(n)}},t.prototype.gc=function(n){var r;cn.reset(),Bi.reset(),this.addTypenameTransform.resetCache(),(r=this.config.fragments)===null||r===void 0||r.resetCaches();var i=this.optimisticData.gc();return n&&!this.txCount&&(n.resetResultCache?this.resetResultCache(n.resetResultIdentities):n.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(n,r){return(r?this.optimisticData:this.data).retain(n)},t.prototype.release=function(n,r){return(r?this.optimisticData:this.data).release(n)},t.prototype.identify=function(n){if(Le(n))return n.__ref;try{return this.policies.identify(n)[0]}catch(r){globalThis.__DEV__!==!1&&ie.warn(r)}},t.prototype.evict=function(n){if(!n.id){if(ot.call(n,"id"))return!1;n=D(D({},n),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(n,this.data)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(n){var r=this;return this.init(),cn.reset(),n&&n.discardWatches?(this.watches.forEach(function(i){return r.maybeBroadcastWatch.forget(i)}),this.watches.clear(),Nc(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(n){var r=this.optimisticData.removeLayer(n);r!==this.optimisticData&&(this.optimisticData=r,this.broadcastWatches())},t.prototype.batch=function(n){var r=this,i=n.update,a=n.optimistic,o=a===void 0?!0:a,s=n.removeOptimistic,c=n.onWatchUpdated,u,l=function(f){var g=r,x=g.data,w=g.optimisticData;++r.txCount,f&&(r.data=r.optimisticData=f);try{return u=i(r)}finally{--r.txCount,r.data=x,r.optimisticData=w}},d=new Set;return c&&!this.txCount&&this.broadcastWatches(D(D({},n),{onWatchUpdated:function(f){return d.add(f),!1}})),typeof o=="string"?this.optimisticData=this.optimisticData.addLayer(o,l):o===!1?l(this.data):l(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&d.size?(this.broadcastWatches(D(D({},n),{onWatchUpdated:function(f,g){var x=c.call(this,f,g);return x!==!1&&d.delete(f),x}})),d.size&&d.forEach(function(f){return r.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(n),u},t.prototype.performTransaction=function(n,r){return this.batch({update:n,optimistic:r||r!==null})},t.prototype.transformDocument=function(n){return this.addTypenameToDocument(this.addFragmentsToDocument(n))},t.prototype.broadcastWatches=function(n){var r=this;this.txCount||this.watches.forEach(function(i){return r.maybeBroadcastWatch(i,n)})},t.prototype.addFragmentsToDocument=function(n){var r=this.config.fragments;return r?r.transform(n):n},t.prototype.addTypenameToDocument=function(n){return this.addTypename?this.addTypenameTransform.transformDocument(n):n},t.prototype.broadcastWatch=function(n,r){var i=n.lastDiff,a=this.diff(n);r&&(n.optimistic&&typeof r.optimistic=="string"&&(a.fromOptimisticTransaction=!0),r.onWatchUpdated&&r.onWatchUpdated.call(this,n,a,i)===!1)||(!i||!je(i.result,a.result))&&n.callback(n.lastDiff=a,i)},t}(Ql);globalThis.__DEV__!==!1&&(of.prototype.getMemoryInternals=Fp);var Se;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(Se||(Se={}));function jr(e){return e?e<7:!1}var Hc=Object.assign,qg=Object.hasOwnProperty,no=function(e){Gt(t,e);function t(n){var r=n.queryManager,i=n.queryInfo,a=n.options,o=e.call(this,function(T){try{var S=T._subscription._observer;S&&!S.error&&(S.error=$g)}catch{}var _=!o.observers.size;o.observers.add(T);var y=o.last;return y&&y.error?T.error&&T.error(y.error):y&&y.result&&T.next&&T.next(y.result),_&&o.reobserve().catch(function(){}),function(){o.observers.delete(T)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=i,o.queryManager=r,o.waitForOwnResult=ka(a.fetchPolicy),o.isTornDown=!1,o.subscribeToMore=o.subscribeToMore.bind(o);var s=r.defaultOptions.watchQuery,c=s===void 0?{}:s,u=c.fetchPolicy,l=u===void 0?"cache-first":u,d=a.fetchPolicy,f=d===void 0?l:d,g=a.initialFetchPolicy,x=g===void 0?f==="standby"?l:f:g;o.options=D(D({},a),{initialFetchPolicy:x,fetchPolicy:f}),o.queryId=i.queryId||r.generateQueryId();var w=qr(o.query);return o.queryName=w&&w.name&&w.name.value,o}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var n=this;return new Promise(function(r,i){var a={next:function(s){r(s),n.observers.delete(a),n.observers.size||n.queryManager.removeQuery(n.queryId),setTimeout(function(){o.unsubscribe()},0)},error:i},o=n.subscribe(a)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(n){n===void 0&&(n=!0);var r=this.getLastResult(!0),i=this.queryInfo.networkStatus||r&&r.networkStatus||Se.ready,a=D(D({},r),{loading:jr(i),networkStatus:i}),o=this.options.fetchPolicy,s=o===void 0?"cache-first":o;if(!(ka(s)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(a.data=c.result),je(a.data,{})&&(a.data=void 0),c.complete?(delete a.partial,c.complete&&a.networkStatus===Se.loading&&(s==="cache-first"||s==="cache-only")&&(a.networkStatus=Se.ready,a.loading=!1)):a.partial=!0,globalThis.__DEV__!==!1&&!c.complete&&!this.options.partialRefetch&&!a.loading&&!a.data&&!a.error&&cf(c.missing)}return n&&this.updateLastResult(a),a},t.prototype.isDifferentFromLastResult=function(n,r){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!Wl(this.query,this.last.result,n,this.variables):!je(this.last.result,n);return i||r&&!je(this.last.variables,r)},t.prototype.getLast=function(n,r){var i=this.last;if(i&&i[n]&&(!r||je(i.variables,this.variables)))return i[n]},t.prototype.getLastResult=function(n){return this.getLast("result",n)},t.prototype.getLastError=function(n){return this.getLast("error",n)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(n){var r,i={pollInterval:0},a=this.options.fetchPolicy;if(a==="cache-and-network"?i.fetchPolicy=a:a==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&n&&qg.call(n,"variables")){var o=bl(this.query),s=o.variableDefinitions;(!s||!s.some(function(c){return c.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&ie.warn(20,n,((r=o.name)===null||r===void 0?void 0:r.value)||o)}return n&&!je(this.options.variables,n)&&(i.variables=this.options.variables=D(D({},this.options.variables),n)),this.queryInfo.resetLastWrite(),this.reobserve(i,Se.refetch)},t.prototype.fetchMore=function(n){var r=this,i=D(D({},n.query?n:D(D(D(D({},this.options),{query:this.options.query}),n),{variables:D(D({},this.options.variables),n.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var a=this.queryManager.generateQueryId();this.lastQuery=n.query?this.transformDocument(this.options.query):i.query;var o=this.queryInfo,s=o.networkStatus;o.networkStatus=Se.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set,u=n==null?void 0:n.updateQuery,l=this.options.fetchPolicy!=="no-cache";return l||ie(u,21),this.queryManager.fetchQuery(a,i,Se.fetchMore).then(function(d){if(r.queryManager.removeQuery(a),o.networkStatus===Se.fetchMore&&(o.networkStatus=s),l)r.queryManager.cache.batch({update:function(x){var w=n.updateQuery;w?x.updateQuery({query:r.query,variables:r.variables,returnPartialData:!0,optimistic:!1},function(T){return w(T,{fetchMoreResult:d.data,variables:i.variables})}):x.writeQuery({query:i.query,variables:i.variables,data:d.data})},onWatchUpdated:function(x){c.add(x.query)}});else{var f=r.getLast("result"),g=u(f.data,{fetchMoreResult:d.data,variables:i.variables});r.reportResult(D(D({},f),{data:g}),r.variables)}return d}).finally(function(){l&&!c.has(r.query)&&sf(r)})},t.prototype.subscribeToMore=function(n){var r=this,i=this.queryManager.startGraphQLSubscription({query:n.document,variables:n.variables,context:n.context}).subscribe({next:function(a){var o=n.updateQuery;o&&r.updateQuery(function(s,c){var u=c.variables;return o(s,{subscriptionData:a,variables:u})})},error:function(a){if(n.onError){n.onError(a);return}globalThis.__DEV__!==!1&&ie.error(22,a)}});return this.subscriptions.add(i),function(){r.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(n){return this.reobserve(n)},t.prototype.silentSetOptions=function(n){var r=wn(this.options,n||{});Hc(this.options,r)},t.prototype.setVariables=function(n){return je(this.variables,n)?this.observers.size?this.result():Promise.resolve():(this.options.variables=n,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:n},Se.setVariables):Promise.resolve())},t.prototype.updateQuery=function(n){var r=this.queryManager,i=r.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,a=n(i,{variables:this.variables});a&&(r.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(n){this.options.pollInterval=n,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(n,r){if(r.nextFetchPolicy){var i=r.fetchPolicy,a=i===void 0?"cache-first":i,o=r.initialFetchPolicy,s=o===void 0?a:o;a==="standby"||(typeof r.nextFetchPolicy=="function"?r.fetchPolicy=r.nextFetchPolicy(a,{reason:n,options:r,observable:this,initialFetchPolicy:s}):n==="variables-changed"?r.fetchPolicy=s:r.fetchPolicy=r.nextFetchPolicy)}return r.fetchPolicy},t.prototype.fetch=function(n,r,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,n,r,i)},t.prototype.updatePolling=function(){var n=this;if(!this.queryManager.ssrMode){var r=this,i=r.pollingInfo,a=r.options.pollInterval;if(!a||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){ie(a,23);var o=i||(this.pollingInfo={});o.interval=a;var s=function(){var u,l;n.pollingInfo&&(!jr(n.queryInfo.networkStatus)&&!(!((l=(u=n.options).skipPollAttempt)===null||l===void 0)&&l.call(u))?n.reobserve({fetchPolicy:n.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Se.poll).then(c,c):c())},c=function(){var u=n.pollingInfo;u&&(clearTimeout(u.timeout),u.timeout=setTimeout(s,u.interval))};c()}}},t.prototype.updateLastResult=function(n,r){r===void 0&&(r=this.variables);var i=this.getLastError();return i&&this.last&&!je(r,this.last.variables)&&(i=void 0),this.last=D({result:this.queryManager.assumeImmutableResults?n:Vl(n),variables:r},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(n,r){var i=this;this.isTornDown=!1;var a=r===Se.refetch||r===Se.fetchMore||r===Se.poll,o=this.options.variables,s=this.options.fetchPolicy,c=wn(this.options,n||{}),u=a?c:Hc(this.options,c),l=this.transformDocument(u.query);this.lastQuery=l,a||(this.updatePolling(),n&&n.variables&&!je(n.variables,o)&&u.fetchPolicy!=="standby"&&(u.fetchPolicy===s||typeof u.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",u),r===void 0&&(r=Se.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=ka(u.fetchPolicy));var d=function(){i.concast===x&&(i.waitForOwnResult=!1)},f=u.variables&&D({},u.variables),g=this.fetch(u,r,l),x=g.concast,w=g.fromLink,T={next:function(S){je(i.variables,f)&&(d(),i.reportResult(S,f))},error:function(S){je(i.variables,f)&&(Bl(S)||(S=new Yt({networkError:S})),d(),i.reportError(S,f))}};return!a&&(w||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=x,this.observer=T),x.addObserver(T),x},t.prototype.reobserve=function(n,r){return this.reobserveAsConcast(n,r).promise},t.prototype.resubscribeAfterError=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.last;this.resetLastResults();var a=this.subscribe.apply(this,n);return this.last=i,a},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(n,r){var i=this.getLastError(),a=this.isDifferentFromLastResult(n,r);(i||!n.partial||this.options.returnPartialData)&&this.updateLastResult(n,r),(i||a)&&Or(this.observers,"next",n)},t.prototype.reportError=function(n,r){var i=D(D({},this.getLastResult()),{error:n,errors:n.graphQLErrors,networkStatus:Se.error,loading:!1});this.updateLastResult(i,r),Or(this.observers,"error",this.last.error=n)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(n){return n.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(n){return this.queryManager.transform(n)},t}(Ae);ql(no);function sf(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,a){return this.nextFetchPolicy=r,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,a):n}}):e.reobserve()}function $g(e){globalThis.__DEV__!==!1&&ie.error(24,e.message,e.stack)}function cf(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&ie.debug(25,e)}function ka(e){return e==="network-only"||e==="no-cache"||e==="standby"}var Un=new(er?WeakMap:Map);function Da(e,t){var n=e[t];typeof n=="function"&&(e[t]=function(){return Un.set(e,(Un.get(e)+1)%1e15),n.apply(this,arguments)})}function Gc(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Ma=function(){function e(t,n){n===void 0&&(n=t.generateQueryId()),this.queryId=n,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=t.cache;Un.has(r)||(Un.set(r,0),Da(r,"evict"),Da(r,"modify"),Da(r,"reset"))}return e.prototype.init=function(t){var n=t.networkStatus||Se.loading;return this.variables&&this.networkStatus!==Se.loading&&!je(this.variables,t.variables)&&(n=Se.setVariables),je(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:n}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){Gc(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&je(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(t,n){this.lastDiff=t?{diff:t,options:n||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var n;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(n=this.observableQuery)===null||n===void 0?void 0:n.options.canonizeResults}},e.prototype.setDiff=function(t){var n=this,r,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&(!((r=this.observableQuery)===null||r===void 0)&&r.getLastError())||(this.updateLastDiff(t),!this.dirty&&!je(i&&i.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return n.notify()},0))))},e.prototype.setObservableQuery=function(t){var n=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var r=n.getDiff();r.fromOptimisticTransaction?t.observe():sf(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;Gc(this),this.shouldNotify()&&this.listeners.forEach(function(n){return n(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(jr(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var n=this;t===void 0&&(t=this.variables);var r=this.observableQuery;if(!(r&&r.options.fetchPolicy==="no-cache")){var i=D(D({},this.getDiffOptions(t)),{watcher:this,callback:function(a){return n.setDiff(a)}});(!this.lastWatch||!je(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,n){var r=this.lastWrite;return!(r&&r.dmCount===Un.get(this.cache)&&je(n,r.variables)&&je(t.data,r.result.data))},e.prototype.markResult=function(t,n,r,i){var a=this,o=new hn,s=Dt(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Dt(t.incremental)){var c=$l(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var u=this.getDiff();t.data=o.merge(u.result,t.data)}this.graphQLErrors=s,r.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(r.variables)):i!==0&&(ro(t,r.errorPolicy)?this.cache.performTransaction(function(l){if(a.shouldWrite(t,r.variables))l.writeQuery({query:n,data:t.data,variables:r.variables,overwrite:i===1}),a.lastWrite={result:t,variables:r.variables,dmCount:Un.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){t.data=a.lastDiff.diff.result;return}var d=a.getDiffOptions(r.variables),f=l.diff(d);!a.stopped&&je(a.variables,r.variables)&&a.updateWatch(r.variables),a.updateLastDiff(f,d),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Se.ready},e.prototype.markError=function(t){return this.networkStatus=Se.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function ro(e,t){t===void 0&&(t="none");var n=t==="ignore"||t==="all",r=!di(e);return!r&&n&&e.data&&(r=!0),r}var Ug=Object.prototype.hasOwnProperty,Yc=Object.create(null),Bg=function(){function e(t){var n=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new ko(zt["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Zn(!1);var r=new Il(function(a){return n.cache.transformDocument(a)},{cache:!1});this.cache=t.cache,this.link=t.link,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientAwareness=t.clientAwareness,this.localState=t.localState,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults;var i=t.documentTransform;this.documentTransform=i?r.concat(i).concat(r):r,this.defaultContext=t.defaultContext||Object.create(null),(this.onBroadcast=t.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(n,r){t.stopQueryNoBroadcast(r)}),this.cancelPendingFetches(vt(26))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(n){return n(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return an(this,arguments,void 0,function(n){var r,i,a,o,s,c,u,l=n.mutation,d=n.variables,f=n.optimisticResponse,g=n.updateQueries,x=n.refetchQueries,w=x===void 0?[]:x,T=n.awaitRefetchQueries,S=T===void 0?!1:T,_=n.update,y=n.onQueryUpdated,C=n.fetchPolicy,O=C===void 0?((c=this.defaultOptions.mutate)===null||c===void 0?void 0:c.fetchPolicy)||"network-only":C,R=n.errorPolicy,P=R===void 0?((u=this.defaultOptions.mutate)===null||u===void 0?void 0:u.errorPolicy)||"none":R,F=n.keepRootFields,U=n.context;return on(this,function(V){switch(V.label){case 0:return ie(l,27),ie(O==="network-only"||O==="no-cache",28),r=this.generateMutationId(),l=this.cache.transformForLink(this.transform(l)),i=this.getDocumentInfo(l).hasClientExports,d=this.getVariables(l,d),i?[4,this.localState.addExportedVariables(l,d,U)]:[3,2];case 1:d=V.sent(),V.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[r]={mutation:l,variables:d,loading:!0,error:null}),o=f&&this.markMutationOptimistic(f,{mutationId:r,document:l,variables:d,fetchPolicy:O,errorPolicy:P,context:U,updateQueries:g,update:_,keepRootFields:F}),this.broadcastQueries(),s=this,[2,new Promise(function(ye,_e){return Oa(s.getObservableFromLink(l,D(D({},U),{optimisticResponse:o?f:void 0}),d,{},!1),function(ve){if(di(ve)&&P==="none")throw new Yt({graphQLErrors:Ga(ve)});a&&(a.loading=!1,a.error=null);var we=D({},ve);return typeof w=="function"&&(w=w(we)),P==="ignore"&&di(we)&&delete we.errors,s.markMutationResult({mutationId:r,result:we,document:l,variables:d,fetchPolicy:O,errorPolicy:P,context:U,update:_,updateQueries:g,awaitRefetchQueries:S,refetchQueries:w,removeOptimistic:o?r:void 0,onQueryUpdated:y,keepRootFields:F})}).subscribe({next:function(ve){s.broadcastQueries(),(!("hasNext"in ve)||ve.hasNext===!1)&&ye(ve)},error:function(ve){a&&(a.loading=!1,a.error=ve),o&&s.cache.removeOptimistic(r),s.broadcastQueries(),_e(ve instanceof Yt?ve:new Yt({networkError:ve}))}})})]}})})},e.prototype.markMutationResult=function(t,n){var r=this;n===void 0&&(n=this.cache);var i=t.result,a=[],o=t.fetchPolicy==="no-cache";if(!o&&ro(i,t.errorPolicy)){if(Wn(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),Wn(i)&&Dt(i.incremental)){var s=n.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=$l(s.result,i)),typeof c<"u"&&(i.data=c,a.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var u=t.updateQueries;u&&this.queries.forEach(function(d,f){var g=d.observableQuery,x=g&&g.queryName;if(!(!x||!Ug.call(u,x))){var w=u[x],T=r.queries.get(f),S=T.document,_=T.variables,y=n.diff({query:S,variables:_,returnPartialData:!0,optimistic:!1}),C=y.result,O=y.complete;if(O&&C){var R=w(C,{mutationResult:i,queryName:S&&za(S)||void 0,queryVariables:_});R&&a.push({result:R,dataId:"ROOT_QUERY",query:S,variables:_})}}})}if(a.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(d){o||a.forEach(function(w){return d.write(w)});var f=t.update,g=!Vm(i)||Wn(i)&&!i.hasNext;if(f){if(!o){var x=d.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});x.complete&&(i=D(D({},i),{data:x.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}g&&f(d,i,{context:t.context,variables:t.variables})}!o&&!t.keepRootFields&&g&&d.modify({id:"ROOT_MUTATION",fields:function(w,T){var S=T.fieldName,_=T.DELETE;return S==="__typename"?w:_}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(d){return l.push(d)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(l).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,n){var r=this,i=typeof t=="function"?t(n.variables,{IGNORE:Yc}):t;return i===Yc?!1:(this.cache.recordOptimisticTransaction(function(a){try{r.markMutationResult(D(D({},n),{result:{data:i}}),a)}catch(o){globalThis.__DEV__!==!1&&ie.error(o)}},n.mutationId),!0)},e.prototype.fetchQuery=function(t,n,r){return this.fetchConcastWithInfo(t,n,r).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(n,r){t[r]={variables:n.variables,networkStatus:n.networkStatus,networkError:n.networkError,graphQLErrors:n.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var n=this.queries.get(t);n&&(n.networkError=void 0,n.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var n=this.transformCache;if(!n.has(t)){var r={hasClientExports:bp(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:Dr(["nonreactive"],t),clientQuery:this.localState.clientQuery(t),serverQuery:jl([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],t),defaultVars:Mo(qr(t)),asQuery:D(D({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?D(D({},i),{operation:"query"}):i})})};n.set(t,r)}return n.get(t)},e.prototype.getVariables=function(t,n){return D(D({},this.getDocumentInfo(t).defaultVars),n)},e.prototype.watchQuery=function(t){var n=this.transform(t.query);t=D(D({},t),{variables:this.getVariables(n,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new Ma(this),i=new no({queryManager:this,queryInfo:r,options:t});return i.lastQuery=n,this.queries.set(i.queryId,r),r.init({document:n,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,n){var r=this;return n===void 0&&(n=this.generateQueryId()),ie(t.query,29),ie(t.query.kind==="Document",30),ie(!t.returnPartialData,31),ie(!t.pollInterval,32),this.fetchQuery(n,D(D({},t),{query:this.transform(t.query)})).finally(function(){return r.stopQuery(n)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var n=this.queries.get(t);n&&n.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(vt(33)),this.queries.forEach(function(n){n.observableQuery?n.networkStatus=Se.loading:n.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var n=this;t===void 0&&(t="active");var r=new Map,i=new Map,a=new Set;return Array.isArray(t)&&t.forEach(function(o){typeof o=="string"?i.set(o,!1):Qp(o)?i.set(n.transform(o),!1):Be(o)&&o.query&&a.add(o)}),this.queries.forEach(function(o,s){var c=o.observableQuery,u=o.document;if(c){if(t==="all"){r.set(s,c);return}var l=c.queryName,d=c.options.fetchPolicy;if(d==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||l&&i.has(l)||u&&i.has(u))&&(r.set(s,c),l&&i.set(l,!0),u&&i.set(u,!0))}}),a.size&&a.forEach(function(o){var s=Pa("legacyOneTimeQuery"),c=n.getQuery(s).init({document:o.query,variables:o.variables}),u=new no({queryManager:n,queryInfo:c,options:D(D({},o),{fetchPolicy:"network-only"})});ie(u.queryId===s),c.setObservableQuery(u),r.set(s,u)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(o,s){o||globalThis.__DEV__!==!1&&ie.warn(typeof s=="string"?34:35,s)}),r},e.prototype.reFetchObservableQueries=function(t){var n=this;t===void 0&&(t=!1);var r=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,a){var o=i.options.fetchPolicy;i.resetLastResults(),(t||o!=="standby"&&o!=="cache-only")&&r.push(i.refetch()),n.getQuery(a).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var n=this,r=t.query,i=t.fetchPolicy,a=t.errorPolicy,o=a===void 0?"none":a,s=t.variables,c=t.context,u=c===void 0?{}:c,l=t.extensions,d=l===void 0?{}:l;r=this.transform(r),s=this.getVariables(r,s);var f=function(x){return n.getObservableFromLink(r,u,x,d).map(function(w){i!=="no-cache"&&(ro(w,o)&&n.cache.write({query:r,result:w.data,dataId:"ROOT_SUBSCRIPTION",variables:x}),n.broadcastQueries());var T=di(w),S=tg(w);if(T||S){var _={};if(T&&(_.graphQLErrors=w.errors),S&&(_.protocolErrors=w.extensions[qo]),o==="none"||S)throw new Yt(_)}return o==="ignore"&&delete w.errors,w})};if(this.getDocumentInfo(r).hasClientExports){var g=this.localState.addExportedVariables(r,s,u).then(f);return new Ae(function(x){var w=null;return g.then(function(T){return w=T.subscribe(x)},x.error),function(){return w&&w.unsubscribe()}})}return f(s)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,n,r,i,a){var o=this,s;a===void 0&&(a=(s=n==null?void 0:n.queryDeduplication)!==null&&s!==void 0?s:this.queryDeduplication);var c,u=this.getDocumentInfo(t),l=u.serverQuery,d=u.clientQuery;if(l){var f=this,g=f.inFlightLinkObservables,x=f.link,w={query:l,variables:r,operationName:za(l)||void 0,context:this.prepareContext(D(D({},n),{forceFetch:!a})),extensions:i};if(n=w.context,a){var T=Bi(l),S=cn(r),_=g.lookup(T,S);if(c=_.observable,!c){var y=new Pn([Ya(x,w)]);c=_.observable=y,y.beforeNext(function(){g.remove(T,S)})}}else c=new Pn([Ya(x,w)])}else c=new Pn([Ae.of({data:{}})]),n=this.prepareContext(n);return d&&(c=Oa(c,function(C){return o.localState.runResolvers({document:d,remoteResult:C,context:n,variables:r})})),c},e.prototype.getResultsFromLink=function(t,n,r){var i=t.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(r.query);return Oa(this.getObservableFromLink(a,r.context,r.variables),function(o){var s=Ga(o),c=s.length>0,u=r.errorPolicy;if(i>=t.lastRequestId){if(c&&u==="none")throw t.markError(new Yt({graphQLErrors:s}));t.markResult(o,a,r,n),t.markReady()}var l={data:o.data,loading:!1,networkStatus:Se.ready};return c&&u==="none"&&(l.data=void 0),c&&u!=="ignore"&&(l.errors=s,l.networkStatus=Se.error),l},function(o){var s=Bl(o)?o:new Yt({networkError:o});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchConcastWithInfo=function(t,n,r,i){var a=this;r===void 0&&(r=Se.loading),i===void 0&&(i=n.query);var o=this.getVariables(i,n.variables),s=this.getQuery(t),c=this.defaultOptions.watchQuery,u=n.fetchPolicy,l=u===void 0?c&&c.fetchPolicy||"cache-first":u,d=n.errorPolicy,f=d===void 0?c&&c.errorPolicy||"none":d,g=n.returnPartialData,x=g===void 0?!1:g,w=n.notifyOnNetworkStatusChange,T=w===void 0?!1:w,S=n.context,_=S===void 0?{}:S,y=Object.assign({},n,{query:i,variables:o,fetchPolicy:l,errorPolicy:f,returnPartialData:x,notifyOnNetworkStatusChange:T,context:_}),C=function(U){y.variables=U;var V=a.fetchQueryByPolicy(s,y,r);return y.fetchPolicy!=="standby"&&V.sources.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",n),V},O=function(){return a.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(U){O(),setTimeout(function(){return R.cancel(U)})});var R,P;if(this.getDocumentInfo(y.query).hasClientExports)R=new Pn(this.localState.addExportedVariables(y.query,y.variables,y.context).then(C).then(function(U){return U.sources})),P=!0;else{var F=C(y.variables);P=F.fromLink,R=new Pn(F.sources)}return R.promise.then(O,O),{concast:R,fromLink:P}},e.prototype.refetchQueries=function(t){var n=this,r=t.updateCache,i=t.include,a=t.optimistic,o=a===void 0?!1:a,s=t.removeOptimistic,c=s===void 0?o?Pa("refetchQueries"):void 0:s,u=t.onQueryUpdated,l=new Map;i&&this.getObservableQueries(i).forEach(function(f,g){l.set(g,{oq:f,lastDiff:n.getQuery(g).getDiff()})});var d=new Map;return r&&this.cache.batch({update:r,optimistic:o&&c||!1,removeOptimistic:c,onWatchUpdated:function(f,g,x){var w=f.watcher instanceof Ma&&f.watcher.observableQuery;if(w){if(u){l.delete(w.queryId);var T=u(w,g,x);return T===!0&&(T=w.refetch()),T!==!1&&d.set(w,T),T}u!==null&&l.set(w.queryId,{oq:w,lastDiff:x,diff:g})}}}),l.size&&l.forEach(function(f,g){var x=f.oq,w=f.lastDiff,T=f.diff,S;if(u){if(!T){var _=x.queryInfo;_.reset(),T=_.getDiff()}S=u(x,T,w)}(!u||S===!0)&&(S=x.refetch()),S!==!1&&d.set(x,S),g.indexOf("legacyOneTimeQuery")>=0&&n.stopQueryNoBroadcast(g)}),c&&this.cache.removeOptimistic(c),d},e.prototype.fetchQueryByPolicy=function(t,n,r){var i=this,a=n.query,o=n.variables,s=n.fetchPolicy,c=n.refetchWritePolicy,u=n.errorPolicy,l=n.returnPartialData,d=n.context,f=n.notifyOnNetworkStatusChange,g=t.networkStatus;t.init({document:a,variables:o,networkStatus:r});var x=function(){return t.getDiff()},w=function(C,O){O===void 0&&(O=t.networkStatus||Se.loading);var R=C.result;globalThis.__DEV__!==!1&&!l&&!je(R,{})&&cf(C.missing);var P=function(F){return Ae.of(D({data:F,loading:jr(O),networkStatus:O},C.complete?null:{partial:!0}))};return R&&i.getDocumentInfo(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:R},context:d,variables:o,onlyRunForcedResolvers:!0}).then(function(F){return P(F.data||void 0)}):u==="none"&&O===Se.refetch&&Array.isArray(C.missing)?P(void 0):P(R)},T=s==="no-cache"?0:r===Se.refetch&&c!=="merge"?1:2,S=function(){return i.getResultsFromLink(t,T,{query:a,variables:o,context:d,fetchPolicy:s,errorPolicy:u})},_=f&&typeof g=="number"&&g!==r&&jr(r);switch(s){default:case"cache-first":{var y=x();return y.complete?{fromLink:!1,sources:[w(y,t.markReady())]}:l||_?{fromLink:!0,sources:[w(y),S()]}:{fromLink:!0,sources:[S()]}}case"cache-and-network":{var y=x();return y.complete||l||_?{fromLink:!0,sources:[w(y),S()]}:{fromLink:!0,sources:[S()]}}case"cache-only":return{fromLink:!1,sources:[w(x(),t.markReady())]};case"network-only":return _?{fromLink:!0,sources:[w(x()),S()]}:{fromLink:!0,sources:[S()]};case"no-cache":return _?{fromLink:!0,sources:[w(t.getDiff()),S()]}:{fromLink:!0,sources:[S()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Ma(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var n=this.localState.prepareContext(t);return D(D(D({},this.defaultContext),n),{clientAwareness:this.clientAwareness})},e}(),zg=function(){function e(t){var n=t.cache,r=t.client,i=t.resolvers,a=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=n,r&&(this.client=r),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return e.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(r){n.resolvers=gc(n.resolvers,r)}):this.resolvers=gc(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return an(this,arguments,void 0,function(n){var r=n.document,i=n.remoteResult,a=n.context,o=n.variables,s=n.onlyRunForcedResolvers,c=s===void 0?!1:s;return on(this,function(u){return r?[2,this.resolveDocument(r,i.data,a,o,this.fragmentMatcher,c).then(function(l){return D(D({},i),{data:l.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Dr(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return Pl(t)},e.prototype.prepareContext=function(t){var n=this.cache;return D(D({},t),{cache:n,getCacheKey:function(r){return n.identify(r)}})},e.prototype.addExportedVariables=function(t){return an(this,arguments,void 0,function(n,r,i){return r===void 0&&(r={}),i===void 0&&(i={}),on(this,function(a){return n?[2,this.resolveDocument(n,this.buildRootValueFromCache(n,r)||{},this.prepareContext(i),r).then(function(o){return D(D({},r),o.exportedVariables)})]:[2,D({},r)]})})},e.prototype.shouldForceResolvers=function(t){var n=!1;return Xt(t,{Directive:{enter:function(r){if(r.name.value==="client"&&r.arguments&&(n=r.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),n))return Co}}}),n},e.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:Sm(t),variables:n,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,n){return an(this,arguments,void 0,function(r,i,a,o,s,c){var u,l,d,f,g,x,w,T,S,_,y;return a===void 0&&(a={}),o===void 0&&(o={}),s===void 0&&(s=function(){return!0}),c===void 0&&(c=!1),on(this,function(C){return u=$r(r),l=qi(r),d=Ai(l),f=this.collectSelectionsToResolve(u,d),g=u.operation,x=g?g.charAt(0).toUpperCase()+g.slice(1):"Query",w=this,T=w.cache,S=w.client,_={fragmentMap:d,context:D(D({},a),{cache:T,client:S}),variables:o,fragmentMatcher:s,defaultOperationType:x,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:c},y=!1,[2,this.resolveSelectionSet(u.selectionSet,y,i,_).then(function(O){return{result:O,exportedVariables:_.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,n,r,i){return an(this,void 0,void 0,function(){var a,o,s,c,u,l=this;return on(this,function(d){return a=i.fragmentMap,o=i.context,s=i.variables,c=[r],u=function(f){return an(l,void 0,void 0,function(){var g,x;return on(this,function(w){return!n&&!i.selectionsToResolve.has(f)?[2]:Fr(f,s)?ln(f)?[2,this.resolveField(f,n,r,i).then(function(T){var S;typeof T<"u"&&c.push((S={},S[un(f)]=T,S))})]:(im(f)?g=f:(g=a[f.name.value],ie(g,18,f.name.value)),g&&g.typeCondition&&(x=g.typeCondition.name.value,i.fragmentMatcher(r,x,o))?[2,this.resolveSelectionSet(g.selectionSet,n,r,i).then(function(T){c.push(T)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(u)).then(function(){return zi(c)})]})})},e.prototype.resolveField=function(t,n,r,i){return an(this,void 0,void 0,function(){var a,o,s,c,u,l,d,f,g,x=this;return on(this,function(w){return r?(a=i.variables,o=t.name.value,s=un(t),c=o!==s,u=r[s]||r[o],l=Promise.resolve(u),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(d=r.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[d],f&&(g=f[c?o:s],g&&(l=Promise.resolve($o.withValue(this.cache,g,[r,Vi(t,a),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,l.then(function(T){var S,_;if(T===void 0&&(T=u),t.directives&&t.directives.forEach(function(C){C.name.value==="export"&&C.arguments&&C.arguments.forEach(function(O){O.name.value==="as"&&O.value.kind==="StringValue"&&(i.exportedVariables[O.value.value]=T)})}),!t.selectionSet||T==null)return T;var y=(_=(S=t.directives)===null||S===void 0?void 0:S.some(function(C){return C.name.value==="client"}))!==null&&_!==void 0?_:!1;if(Array.isArray(T))return x.resolveSubSelectedArray(t,n||y,T,i);if(t.selectionSet)return x.resolveSelectionSet(t.selectionSet,n||y,T,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,n,r,i){var a=this;return Promise.all(r.map(function(o){if(o===null)return null;if(Array.isArray(o))return a.resolveSubSelectedArray(t,n,o,i);if(t.selectionSet)return a.resolveSelectionSet(t.selectionSet,n,o,i)}))},e.prototype.collectSelectionsToResolve=function(t,n){var r=function(o){return!Array.isArray(o)},i=this.selectionsToResolveCache;function a(o){if(!i.has(o)){var s=new Set;i.set(o,s),Xt(o,{Directive:function(c,u,l,d,f){c.name.value==="client"&&f.forEach(function(g){r(g)&&oc(g)&&s.add(g)})},FragmentSpread:function(c,u,l,d,f){var g=n[c.name.value];ie(g,19,c.name.value);var x=a(g);x.size>0&&(f.forEach(function(w){r(w)&&oc(w)&&s.add(w)}),s.add(c),x.forEach(function(w){s.add(w)}))}})}return i.get(o)}return a(t)},e}(),Kc=!1,uf=function(){function e(t){var n=this,r;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw vt(15);var i=t.uri,a=t.credentials,o=t.headers,s=t.cache,c=t.documentTransform,u=t.ssrMode,l=u===void 0?!1:u,d=t.ssrForceFetchDelay,f=d===void 0?0:d,g=t.connectToDevTools,x=t.queryDeduplication,w=x===void 0?!0:x,T=t.defaultOptions,S=t.defaultContext,_=t.assumeImmutableResults,y=_===void 0?s.assumeImmutableResults:_,C=t.resolvers,O=t.typeDefs,R=t.fragmentMatcher,P=t.name,F=t.version,U=t.devtools,V=t.link;V||(V=i?new yg({uri:i,credentials:a,headers:o}):Ur.empty()),this.link=V,this.cache=s,this.disableNetworkFetches=l||f>0,this.queryDeduplication=w,this.defaultOptions=T||Object.create(null),this.typeDefs=O,this.devtoolsConfig=D(D({},U),{enabled:(r=U==null?void 0:U.enabled)!==null&&r!==void 0?r:g}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),f&&setTimeout(function(){return n.disableNetworkFetches=!1},f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=Eo,this.localState=new zg({cache:s,client:this,resolvers:C,fragmentMatcher:R}),this.queryManager=new Bg({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:S,documentTransform:c,queryDeduplication:w,ssrMode:l,clientAwareness:{name:P,version:F},localState:this.localState,assumeImmutableResults:y,onBroadcast:this.devtoolsConfig.enabled?function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.getQueryStore(),mutations:n.queryManager.mutationStore||{}},dataWithOptimisticResults:n.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this,!Kc&&globalThis.__DEV__!==!1&&(Kc=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var r=window.navigator,i=r&&r.userAgent,a=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?a="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(a="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),a&&globalThis.__DEV__!==!1&&ie.log("Download the Apollo DevTools for a better development experience: %s",a)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Qn(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=D(D({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=Qn(this.defaultOptions.query,t)),ie(t.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=D(D({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Qn(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!1),this.cache.readQuery(t,n)},e.prototype.watchFragment=function(t){return this.cache.watchFragment(t)},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!1),this.cache.readFragment(t,n)},e.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return Ya(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(n){return n()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(n){return n()}))})},e.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var n=this.queryManager.refetchQueries(t),r=[],i=[];n.forEach(function(o,s){r.push(s),i.push(o)});var a=Promise.all(i);return a.queries=r,a.results=i,a.catch(function(o){globalThis.__DEV__!==!1&&ie.debug(17,o)}),a},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();globalThis.__DEV__!==!1&&(uf.prototype.getMemoryInternals=Ap);var gi=new Map,io=new Map,lf=!0,Oi=!1;function ff(e){return e.replace(/[\s,]+/g," ").trim()}function Wg(e){return ff(e.source.body.substring(e.start,e.end))}function Qg(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,a=Wg(r.loc),o=io.get(i);o&&!o.has(a)?lf&&console.warn("Warning: fragment with name "+i+` already exists.
166
+ `),_=ig(T.slice(0,O)),y=_["content-type"],y&&y.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(C=T.slice(O),C){if(S=Hl(e,C),Object.keys(S).length>1||"data"in S||"incremental"in S||"errors"in S||"payload"in S)if(qp(S)){if(R={},"payload"in S){if(Object.keys(S).length===1&&S.payload===null)return[2];R=D({},S.payload)}"errors"in S&&(R=D(D({},R),{extensions:D(D({},"extensions"in R?R.extensions:null),(F={},F[qo]=S.errors,F))})),t(R)}else t(S);else if(Object.keys(S).length===1&&"hasNext"in S&&!S.hasNext)return[2]}w=s.indexOf(o)}return[3,1];case 3:return[2]}})})}function ig(e){var t={};return e.split(`
167
+ `).forEach(function(n){var r=n.indexOf(":");if(r>-1){var i=n.slice(0,r).trim().toLowerCase(),a=n.slice(r+1).trim();t[i]=a}}),t}function Hl(e,t){if(e.status>=300){var n=function(){try{return JSON.parse(t)}catch{return t}};Ul(e,n(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var r=i;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function ag(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function og(e){return function(t){return t.text().then(function(n){return Hl(t,n)}).then(function(n){return!Array.isArray(n)&&!Oc.call(n,"data")&&!Oc.call(n,"errors")&&Ul(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(r){return r.operationName}):e.operationName,"'.")),n})}}var Ka=function(e,t){var n;try{n=JSON.stringify(e)}catch(i){var r=vt(40,t,i.message);throw r.parseError=i,r}return n},sg={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},cg={accept:"*/*","content-type":"application/json"},ug={method:"POST"},lg={http:sg,headers:cg,options:ug},fg=function(e,t){return t(e)};function hg(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={},a={};n.forEach(function(h){i=D(D(D({},i),h.options),{headers:D(D({},i.headers),h.headers)}),h.credentials&&(i.credentials=h.credentials),a=D(D({},a),h.http)}),i.headers&&(i.headers=dg(i.headers,a.preserveHeaderCase));var o=e.operationName,s=e.extensions,c=e.variables,u=e.query,l={operationName:o,variables:c};return a.includeExtensions&&(l.extensions=s),a.includeQuery&&(l.query=t(u,Bi)),{options:i,body:l}}function dg(e,t){if(!t){var n={};return Object.keys(Object(e)).forEach(function(a){n[a.toLowerCase()]=e[a]}),n}var r={};Object.keys(Object(e)).forEach(function(a){r[a.toLowerCase()]={originalName:a,value:e[a]}});var i={};return Object.keys(r).forEach(function(a){i[r[a].originalName]=r[a].value}),i}var mg=function(e){if(!e&&typeof fetch>"u")throw vt(38)},pg=function(e,t){var n=e.getContext(),r=n.uri;return r||(typeof t=="function"?t(e):t||"/graphql")};function gg(e,t){var n=[],r=function(h,f){n.push("".concat(h,"=").concat(encodeURIComponent(f)))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=Ka(t.variables,"Variables map")}catch(h){return{parseError:h}}r("variables",i)}if(t.extensions){var a=void 0;try{a=Ka(t.extensions,"Extensions map")}catch(h){return{parseError:h}}r("extensions",a)}var o="",s=e,c=e.indexOf("#");c!==-1&&(o=e.substr(c),s=e.substr(0,c));var u=s.indexOf("?")===-1?"?":"&",l=s+u+n.join("&")+o;return{newURI:l}}var Tc=Ft(function(){return fetch}),vg=function(e){e===void 0&&(e={});var t=e.uri,n=t===void 0?"/graphql":t,r=e.fetch,i=e.print,a=i===void 0?fg:i,o=e.includeExtensions,s=e.preserveHeaderCase,c=e.useGETForQueries,u=e.includeUnusedVariables,l=u===void 0?!1:u,h=Vt(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&mg(r||Tc);var f={http:{includeExtensions:o,preserveHeaderCase:s},options:h.fetchOptions,credentials:h.credentials,headers:h.headers};return new Ur(function(g){var x=pg(g,n),w=g.getContext(),T={};if(w.clientAwareness){var O=w.clientAwareness,_=O.name,y=O.version;_&&(T["apollographql-client-name"]=_),y&&(T["apollographql-client-version"]=y)}var C=D(D({},T),w.headers),S={http:w.http,options:w.fetchOptions,credentials:w.credentials,headers:C};if(Dr(["client"],g.query)){var R=Pl(g.query);if(!R)return Oa(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));g.query=R}var P=hg(g,a,lg,f,S),F=P.options,U=P.body;U.variables&&!l&&(U.variables=Hp(U.variables,g.query));var V;!F.signal&&typeof AbortController<"u"&&(V=new AbortController,F.signal=V.signal);var ye=function(Z){return Z.kind==="OperationDefinition"&&Z.operation==="mutation"},_e=function(Z){return Z.kind==="OperationDefinition"&&Z.operation==="subscription"},ve=_e($r(g.query)),we=Dr(["defer"],g.query);if(c&&!g.query.definitions.some(ye)&&(F.method="GET"),we||ve){F.headers=F.headers||{};var Ae="multipart/mixed;";ve&&we&&globalThis.__DEV__!==!1&&ie.warn(39),ve?Ae+="boundary=graphql;subscriptionSpec=1.0,application/json":we&&(Ae+="deferSpec=20220824,application/json"),F.headers.accept=Ae}if(F.method==="GET"){var Ie=gg(x,U),G=Ie.newURI,$=Ie.parseError;if($)return Oa($);x=G}else try{F.body=Ka(U,"Payload")}catch(Z){return Oa(Z)}return new Fe(function(Z){var j=r||Ft(function(){return fetch})||Tc,A=Z.next.bind(Z);return j(x,F).then(function(Y){var se;g.setContext({response:Y});var ee=(se=Y.headers)===null||se===void 0?void 0:se.get("content-type");return ee!==null&&/^multipart\/mixed/i.test(ee)?rg(Y,A):og(g)(Y).then(A)}).then(function(){V=void 0,Z.complete()}).catch(function(Y){V=void 0,ag(Y,Z)}),function(){V&&V.abort()}})})},yg=function(e){Gt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,vg(n).request)||this;return r.options=n,r}return t}(Ur);const{toString:Cc,hasOwnProperty:bg}=Object.prototype,_c=Function.prototype.toString,Xa=new Map;function je(e,t){try{return Ja(e,t)}finally{Xa.clear()}}function Ja(e,t){if(e===t)return!0;const n=Cc.call(e),r=Cc.call(t);if(n!==r)return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Dc(e,t))return!0;const i=kc(e),a=kc(t),o=i.length;if(o!==a.length)return!1;for(let s=0;s<o;++s)if(!bg.call(t,i[s]))return!1;for(let s=0;s<o;++s){const c=i[s];if(!Ja(e[c],t[c]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Dc(e,t))return!0;const i=e.entries(),a=n==="[object Map]";for(;;){const o=i.next();if(o.done)break;const[s,c]=o.value;if(!t.has(s)||a&&!Ja(c,t.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=_c.call(e);return i!==_c.call(t)?!1:!wg(i,Eg)}}return!1}function kc(e){return Object.keys(e).filter(xg,e)}function xg(e){return this[e]!==void 0}const Eg="{ [native code] }";function wg(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function Dc(e,t){let n=Xa.get(e);if(n){if(n.has(t))return!0}else Xa.set(e,n=new Set);return n.add(t),!1}function zl(e,t,n,r){var i=t.data,a=Vt(t,["data"]),o=n.data,s=Vt(n,["data"]);return je(a,s)&&mi($r(e).selectionSet,i,o,{fragmentMap:Ai(qi(e)),variables:r})}function mi(e,t,n,r){if(t===n)return!0;var i=new Set;return e.selections.every(function(a){if(i.has(a)||(i.add(a),!Fr(a,r.variables))||Mc(a))return!0;if(ln(a)){var o=un(a),s=t&&t[o],c=n&&n[o],u=a.selectionSet;if(!u)return je(s,c);var l=Array.isArray(s),h=Array.isArray(c);if(l!==h)return!1;if(l&&h){var f=s.length;if(c.length!==f)return!1;for(var g=0;g<f;++g)if(!mi(u,s[g],c[g],r))return!1;return!0}return mi(u,s,c,r)}else{var x=Fi(a,r.fragmentMap);if(x)return Mc(x)?!0:mi(x.selectionSet,t,n,r)}})}function Mc(e){return!!e.directives&&e.directives.some(Sg)}function Sg(e){return e.name.value==="nonreactive"}var Ql=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=Lr(km,{max:Ht["cache.fragmentQueryDocuments"]||1e3,cache:xi})}return e.prototype.batch=function(t){var n=this,r=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(n)},r),i},e.prototype.recordOptimisticTransaction=function(t,n){this.performTransaction(t,n)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(D(D({},t),{rootId:t.id||"ROOT_QUERY",optimistic:n}))},e.prototype.watchFragment=function(t){var n=this,r=t.fragment,i=t.fragmentName,a=t.from,o=t.optimistic,s=o===void 0?!0:o,c=Vt(t,["fragment","fragmentName","from","optimistic"]),u=this.getFragmentDoc(r,i),l=D(D({},c),{returnPartialData:!0,id:typeof a>"u"||typeof a=="string"?a:this.identify(a),query:u,optimistic:s}),h;return new Fe(function(f){return n.watch(D(D({},l),{immediate:!0,callback:function(g){if(!(h&&zl(u,{data:h==null?void 0:h.result},{data:g.result}))){var x={data:g.result,complete:!!g.complete};g.missing&&(x.missing=Hi(g.missing.map(function(w){return w.missing}))),h=g,f.next(x)}}}))})},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!!t.optimistic),this.read(D(D({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:n}))},e.prototype.writeQuery=function(t){var n=t.id,r=t.data,i=Vt(t,["id","data"]);return this.write(Object.assign(i,{dataId:n||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(t){var n=t.id,r=t.data,i=t.fragment,a=t.fragmentName,o=Vt(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(i,a),dataId:n,result:r}))},e.prototype.updateQuery=function(t,n){return this.batch({update:function(r){var i=r.readQuery(t),a=n(i);return a==null?i:(r.writeQuery(D(D({},t),{data:a})),a)}})},e.prototype.updateFragment=function(t,n){return this.batch({update:function(r){var i=r.readFragment(t),a=n(i);return a==null?i:(r.writeFragment(D(D({},t),{data:a})),a)}})},e}();globalThis.__DEV__!==!1&&(Ql.prototype.getMemoryInternals=Vm);var Wl=function(e){Gt(t,e);function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var c=s.path.length-1;c>=0;--c)s.missing=(o={},o[s.path[c]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return t}(Error),ot=Object.prototype.hasOwnProperty;function yr(e){return e==null}function Gl(e,t){var n=e.__typename,r=e.id,i=e._id;if(typeof n=="string"&&(t&&(t.keyObject=yr(r)?yr(i)?void 0:{_id:i}:{id:r}),yr(r)&&!yr(i)&&(r=i),!yr(r)))return"".concat(n,":").concat(typeof r=="number"||typeof r=="string"?r:JSON.stringify(r))}var Yl={dataIdFromObject:Gl,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Og(e){return wn(Yl,e)}function Kl(e){var t=e.canonizeResults;return t===void 0?Yl.canonizeResults:t}function Tg(e,t){return Le(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var Xl=/^[_a-z][_0-9a-z]*/i;function dn(e){var t=e.match(Xl);return t?t[0]:e}function Za(e,t,n){return Be(t)?He(t)?t.every(function(r){return Za(e,r,n)}):e.selections.every(function(r){if(ln(r)&&Fr(r,n)){var i=un(r);return ot.call(t,i)&&(!r.selectionSet||Za(r.selectionSet,t[i],n))}return!0}):!1}function $n(e){return Be(e)&&!Le(e)&&!He(e)}function Cg(){return new hn}function Jl(e,t){var n=Ai(qi(e));return{fragmentMap:n,lookupFragment:function(r){var i=n[r];return!i&&t&&(i=t.lookup(r)),i||null}}}var pi=Object.create(null),Ta=function(){return pi},Lc=Object.create(null),Rr=function(){function e(t,n){var r=this;this.policies=t,this.group=n,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return Ir(Le(i)?r.get(i.__ref,a):i&&i[a])},this.canRead=function(i){return Le(i)?r.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return Hn(i);if(Le(i))return i;var o=r.policies.identify(i)[0];if(o){var s=Hn(o);return a&&r.merge(o,i),s}}}return e.prototype.toObject=function(){return D({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,n){if(this.group.depend(t,n),ot.call(this.data,t)){var r=this.data[t];if(r&&ot.call(r,n))return r[n]}if(n==="__typename"&&ot.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof rn)return this.parent.get(t,n)},e.prototype.lookup=function(t,n){if(n&&this.group.depend(t,"__exists"),ot.call(this.data,t))return this.data[t];if(this instanceof rn)return this.parent.lookup(t,n);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,n){var r=this,i;Le(t)&&(t=t.__ref),Le(n)&&(n=n.__ref);var a=typeof t=="string"?this.lookup(i=t):t,o=typeof n=="string"?this.lookup(i=n):n;if(o){ie(typeof i=="string",1);var s=new hn(kg).merge(a,o);if(this.data[i]=s,s!==a&&(delete this.refs[i],this.group.caching)){var c=Object.create(null);a||(c.__exists=1),Object.keys(o).forEach(function(u){if(!a||a[u]!==s[u]){c[u]=1;var l=dn(u);l!==u&&!r.policies.hasKeyArgs(s.__typename,l)&&(c[l]=1),s[u]===void 0&&!(r instanceof rn)&&delete s[u]}}),c.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===s.__typename&&delete c.__typename,Object.keys(c).forEach(function(u){return r.group.dirty(i,u)})}}},e.prototype.modify=function(t,n){var r=this,i=this.lookup(t);if(i){var a=Object.create(null),o=!1,s=!0,c={DELETE:pi,INVALIDATE:Lc,isReference:Le,toReference:this.toReference,canRead:this.canRead,readField:function(u,l){return r.policies.readField(typeof u=="string"?{fieldName:u,from:l||Hn(t)}:u,{store:r})}};if(Object.keys(i).forEach(function(u){var l=dn(u),h=i[u];if(h!==void 0){var f=typeof n=="function"?n:n[u]||n[l];if(f){var g=f===Ta?pi:f(Ir(h),D(D({},c),{fieldName:l,storeFieldName:u,storage:r.getStorage(t,u)}));if(g===Lc)r.group.dirty(t,u);else if(g===pi&&(g=void 0),g!==h&&(a[u]=g,o=!0,h=g,globalThis.__DEV__!==!1)){var x=function(S){if(r.lookup(S.__ref)===void 0)return globalThis.__DEV__!==!1&&ie.warn(2,S),!0};if(Le(g))x(g);else if(Array.isArray(g))for(var w=!1,T=void 0,O=0,_=g;O<_.length;O++){var y=_[O];if(Le(y)){if(w=!0,x(y))break}else if(typeof y=="object"&&y){var C=r.policies.identify(y)[0];C&&(T=y)}if(w&&T!==void 0){globalThis.__DEV__!==!1&&ie.warn(3,T);break}}}}h!==void 0&&(s=!1)}}),o)return this.merge(t,a),s&&(this instanceof rn?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,n,r){var i,a=this.lookup(t);if(a){var o=this.getFieldValue(a,"__typename"),s=n&&r?this.policies.getStoreFieldName({typename:o,fieldName:n,args:r}):n;return this.modify(t,s?(i={},i[s]=Ta,i):Ta)}return!1},e.prototype.evict=function(t,n){var r=!1;return t.id&&(ot.call(this.data,t.id)&&(r=this.delete(t.id,t.fieldName,t.args)),this instanceof rn&&this!==n&&(r=this.parent.evict(t,n)||r),(t.fieldName||r)&&this.group.dirty(t.id,t.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,n=this.toObject(),r=[];return this.getRootIdSet().forEach(function(i){ot.call(t.policies.rootTypenamesById,i)||r.push(i)}),r.length&&(n.__META={extraRootIds:r.sort()}),n},e.prototype.replace=function(t){var n=this;if(Object.keys(this.data).forEach(function(a){t&&ot.call(t,a)||n.delete(a)}),t){var r=t.__META,i=Vt(t,["__META"]);Object.keys(i).forEach(function(a){n.merge(a,i[a])}),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof rn?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,n=this.getRootIdSet(),r=this.toObject();n.forEach(function(o){ot.call(r,o)&&(Object.keys(t.findChildRefIds(o)).forEach(n.add,n),delete r[o])});var i=Object.keys(r);if(i.length){for(var a=this;a instanceof rn;)a=a.parent;i.forEach(function(o){return a.delete(o)})}return i},e.prototype.findChildRefIds=function(t){if(!ot.call(this.refs,t)){var n=this.refs[t]=Object.create(null),r=this.data[t];if(!r)return n;var i=new Set([r]);i.forEach(function(a){Le(a)&&(n[a.__ref]=!0),Be(a)&&Object.keys(a).forEach(function(o){var s=a[o];Be(s)&&i.add(s)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Zl=function(){function e(t,n){n===void 0&&(n=null),this.caching=t,this.parent=n,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?Ll():null,this.keyMaker=new Zn(er)},e.prototype.depend=function(t,n){if(this.d){this.d(Ca(t,n));var r=dn(n);r!==n&&this.d(Ca(t,r)),this.parent&&this.parent.depend(t,n)}},e.prototype.dirty=function(t,n){this.d&&this.d.dirty(Ca(t,n),n==="__exists"?"forget":"setDirty")},e}();function Ca(e,t){return t+"#"+e}function Ic(e,t){Or(e)&&e.group.depend(t,"__exists")}(function(e){var t=function(n){Gt(r,n);function r(i){var a=i.policies,o=i.resultCaching,s=o===void 0?!0:o,c=i.seed,u=n.call(this,a,new Zl(s))||this;return u.stump=new _g(u),u.storageTrie=new Zn(er),c&&u.replace(c),u}return r.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},r.prototype.removeLayer=function(){return this},r.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},r}(e);e.Root=t})(Rr||(Rr={}));var rn=function(e){Gt(t,e);function t(n,r,i,a){var o=e.call(this,r.policies,a)||this;return o.id=n,o.parent=r,o.replay=i,o.group=a,i(o),o}return t.prototype.addLayer=function(n,r){return new t(n,this,r,this.group)},t.prototype.removeLayer=function(n){var r=this,i=this.parent.removeLayer(n);return n===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var o=r.data[a],s=i.lookup(a);s?o?o!==s&&Object.keys(o).forEach(function(c){je(o[c],s[c])||r.group.dirty(a,c)}):(r.group.dirty(a,"__exists"),Object.keys(s).forEach(function(c){r.group.dirty(a,c)})):r.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return D(D({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(n){var r=this.parent.findChildRefIds(n);return ot.call(this.data,n)?D(D({},r),e.prototype.findChildRefIds.call(this,n)):r},t.prototype.getStorage=function(){for(var n=this.parent;n.parent;)n=n.parent;return n.getStorage.apply(n,arguments)},t}(Rr),_g=function(e){Gt(t,e);function t(n){return e.call(this,"EntityStore.Stump",n,function(){},new Zl(n.group.caching,n.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(n,r){return this.parent.merge(n,r)},t}(rn);function kg(e,t,n){var r=e[n],i=t[n];return je(r,i)?r:i}function Or(e){return!!(e instanceof Rr&&e.group.caching)}function Dg(e){return Be(e)?He(e)?e.slice(0):D({__proto__:Object.getPrototypeOf(e)},e):e}var Rc=function(){function e(){this.known=new(hl?WeakSet:Set),this.pool=new Zn(er),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Be(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Be(t)){var n=Dg(t);return this.passes.set(n,t),n}return t},e.prototype.admit=function(t){var n=this;if(Be(t)){var r=this.passes.get(t);if(r)return r;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var a=t.map(this.admit,this),o=this.pool.lookupArray(a);return o.array||(this.known.add(o.array=a),globalThis.__DEV__!==!1&&Object.freeze(a)),o.array}case null:case Object.prototype:{if(this.known.has(t))return t;var s=Object.getPrototypeOf(t),c=[s],u=this.sortedKeys(t);c.push(u.json);var l=c.length;u.sorted.forEach(function(g){c.push(n.admit(t[g]))});var o=this.pool.lookupArray(c);if(!o.object){var h=o.object=Object.create(s);this.known.add(h),u.sorted.forEach(function(g,x){h[g]=c[l+x]}),globalThis.__DEV__!==!1&&Object.freeze(h)}return o.object}}}return t},e.prototype.sortedKeys=function(t){var n=Object.keys(t),r=this.pool.lookupArray(n);if(!r.keys){n.sort();var i=JSON.stringify(n);(r.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,r.keys={sorted:n,json:i})}return r.keys},e}();function jc(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var Mg=function(){function e(t){var n=this;this.knownResults=new(er?WeakMap:Map),this.config=wn(t,{addTypename:t.addTypename!==!1,canonizeResults:Kl(t)}),this.canon=t.canon||new Rc,this.executeSelectionSet=Lr(function(r){var i,a=r.context.canonizeResults,o=jc(r);o[3]=!a;var s=(i=n.executeSelectionSet).peek.apply(i,o);return s?a?D(D({},s),{result:n.canon.admit(s.result)}):s:(Ic(r.context.store,r.enclosingRef.__ref),n.execSelectionSetImpl(r))},{max:this.config.resultCacheMaxSize||Ht["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:jc,makeCacheKey:function(r,i,a,o){if(Or(a.store))return a.store.makeCacheKey(r,Le(i)?i.__ref:i,a.varString,o)}}),this.executeSubSelectedArray=Lr(function(r){return Ic(r.context.store,r.enclosingRef.__ref),n.execSubSelectedArrayImpl(r)},{max:this.config.resultCacheMaxSize||Ht["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(r){var i=r.field,a=r.array,o=r.context;if(Or(o.store))return o.store.makeCacheKey(i,a,o.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Rc},e.prototype.diffQueryAgainstStore=function(t){var n=t.store,r=t.query,i=t.rootId,a=i===void 0?"ROOT_QUERY":i,o=t.variables,s=t.returnPartialData,c=s===void 0?!0:s,u=t.canonizeResults,l=u===void 0?this.config.canonizeResults:u,h=this.config.cache.policies;o=D(D({},Mo(bl(r))),o);var f=Hn(a),g=this.executeSelectionSet({selectionSet:$r(r).selectionSet,objectOrReference:f,enclosingRef:f,context:D({store:n,query:r,policies:h,variables:o,varString:cn(o),canonizeResults:l},Jl(r,this.config.fragments))}),x;if(g.missing&&(x=[new Wl(Lg(g.missing),g.missing,r,o)],!c))throw x[0];return{result:g.result,complete:!x,missing:x}},e.prototype.isFresh=function(t,n,r,i){if(Or(i.store)&&this.knownResults.get(t)===r){var a=this.executeSelectionSet.peek(r,n,i,this.canon.isKnown(t));if(a&&t===a.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var n=this,r=t.selectionSet,i=t.objectOrReference,a=t.enclosingRef,o=t.context;if(Le(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,c=o.policies,u=o.store,l=u.getFieldValue(i,"__typename"),h=[],f,g=new hn;this.config.addTypename&&typeof l=="string"&&!c.rootIdsByTypename[l]&&h.push({__typename:l});function x(y,C){var S;return y.missing&&(f=g.merge(f,(S={},S[C]=y.missing,S))),y.result}var w=new Set(r.selections);w.forEach(function(y){var C,S;if(Fr(y,s))if(ln(y)){var R=c.readField({fieldName:y.name.value,field:y,variables:o.variables,from:i},o),P=un(y);R===void 0?Po.added(y)||(f=g.merge(f,(C={},C[P]="Can't find field '".concat(y.name.value,"' on ").concat(Le(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),C))):He(R)?R.length>0&&(R=x(n.executeSubSelectedArray({field:y,array:R,enclosingRef:a,context:o}),P)):y.selectionSet?R!=null&&(R=x(n.executeSelectionSet({selectionSet:y.selectionSet,objectOrReference:R,enclosingRef:Le(R)?R:a,context:o}),P)):o.canonizeResults&&(R=n.canon.pass(R)),R!==void 0&&h.push((S={},S[P]=R,S))}else{var F=Fi(y,o.lookupFragment);if(!F&&y.kind===K.FRAGMENT_SPREAD)throw vt(9,y.name.value);F&&c.fragmentMatches(F,l)&&F.selectionSet.selections.forEach(w.add,w)}});var T=Hi(h),O={result:T,missing:f},_=o.canonizeResults?this.canon.admit(O):Ir(O);return _.result&&this.knownResults.set(_.result,r),_},e.prototype.execSubSelectedArrayImpl=function(t){var n=this,r=t.field,i=t.array,a=t.enclosingRef,o=t.context,s,c=new hn;function u(l,h){var f;return l.missing&&(s=c.merge(s,(f={},f[h]=l.missing,f))),l.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(l,h){return l===null?null:He(l)?u(n.executeSubSelectedArray({field:r,array:l,enclosingRef:a,context:o}),h):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:l,enclosingRef:Le(l)?l:a,context:o}),h):(globalThis.__DEV__!==!1&&Ig(o.store,r,l),l)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:s}},e}();function Lg(e){try{JSON.stringify(e,function(t,n){if(typeof n=="string")throw n;return n})}catch(t){return t}}function Ig(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(i){Be(i)&&(ie(!Le(i),10,Tg(e,i),t.name.value),Object.values(i).forEach(r.add,r))})}}var $o=new xl,Pc=new WeakMap;function Tr(e){var t=Pc.get(e);return t||Pc.set(e,t={vars:new Set,dep:Ll()}),t}function Nc(e){Tr(e).vars.forEach(function(t){return t.forgetCache(e)})}function Rg(e){Tr(e).vars.forEach(function(t){return t.attachCache(e)})}function jg(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(c){Tr(c).dep.dirty(r),Pg(c)});var o=Array.from(n);n.clear(),o.forEach(function(c){return c(e)})}}else{var s=$o.getValue();s&&(i(s),Tr(s).dep(r))}return e};r.onNextChange=function(a){return n.add(a),function(){n.delete(a)}};var i=r.attachCache=function(a){return t.add(a),Tr(a).vars.add(r),r};return r.forgetCache=function(a){return t.delete(a)},r}function Pg(e){e.broadcastWatches&&e.broadcastWatches()}var Ac=Object.create(null);function Uo(e){var t=JSON.stringify(e);return Ac[t]||(Ac[t]=Object.create(null))}function Fc(e){var t=Uo(e);return t.keyFieldsFn||(t.keyFieldsFn=function(n,r){var i=function(o,s){return r.readField(s,o)},a=r.keyObject=Bo(e,function(o){var s=Wn(r.storeObject,o,i);return s===void 0&&n!==r.storeObject&&ot.call(n,o[0])&&(s=Wn(n,o,tf)),ie(s!==void 0,4,o.join("."),n),s});return"".concat(r.typename,":").concat(JSON.stringify(a))})}function Vc(e){var t=Uo(e);return t.keyArgsFn||(t.keyArgsFn=function(n,r){var i=r.field,a=r.variables,o=r.fieldName,s=Bo(e,function(u){var l=u[0],h=l.charAt(0);if(h==="@"){if(i&&Dt(i.directives)){var f=l.slice(1),g=i.directives.find(function(O){return O.name.value===f}),x=g&&Vi(g,a);return x&&Wn(x,u.slice(1))}return}if(h==="$"){var w=l.slice(1);if(a&&ot.call(a,w)){var T=u.slice(0);return T[0]=w,Wn(a,T)}return}if(n)return Wn(n,u)}),c=JSON.stringify(s);return(n||c!=="{}")&&(o+=":"+c),o})}function Bo(e,t){var n=new hn;return ef(e).reduce(function(r,i){var a,o=t(i);if(o!==void 0){for(var s=i.length-1;s>=0;--s)o=(a={},a[i[s]]=o,a);r=n.merge(r,o)}return r},Object.create(null))}function ef(e){var t=Uo(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(i,a){He(i)?(ef(i).forEach(function(o){return n.push(r.concat(o))}),r.length=0):(r.push(i),He(e[a+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function tf(e,t){return e[t]}function Wn(e,t,n){return n=n||tf,nf(t.reduce(function r(i,a){return He(i)?i.map(function(o){return r(o,a)}):i&&n(i,a)},e))}function nf(e){return Be(e)?He(e)?e.map(nf):Bo(Object.keys(e).sort(),function(t){return Wn(e,t)}):e}function eo(e){return e.args!==void 0?e.args:e.field?Vi(e.field,e.variables):null}var Ng=function(){},qc=function(e,t){return t.fieldName},$c=function(e,t,n){var r=n.mergeObjects;return r(e,t)},Uc=function(e,t){return t},Ag=function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=D({dataIdFromObject:Gl},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,n){var r,i=this,a=n&&(n.typename||((r=n.storeObject)===null||r===void 0?void 0:r.__typename))||t.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=n&&n.storeObject||t,s=D(D({},n),{typename:a,storeObject:o,readField:n&&n.readField||function(){var f=Ho(arguments,o);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),c,u=a&&this.getTypePolicy(a),l=u&&u.keyFn||this.config.dataIdFromObject;l;){var h=l(D(D({},t),o),s);if(He(h))l=Fc(h);else{c=h;break}}return c=c?String(c):void 0,s.keyObject?[c,s.keyObject]:[c]},e.prototype.addTypePolicies=function(t){var n=this;Object.keys(t).forEach(function(r){var i=t[r],a=i.queryType,o=i.mutationType,s=i.subscriptionType,c=Vt(i,["queryType","mutationType","subscriptionType"]);a&&n.setRootTypename("Query",r),o&&n.setRootTypename("Mutation",r),s&&n.setRootTypename("Subscription",r),ot.call(n.toBeAdded,r)?n.toBeAdded[r].push(c):n.toBeAdded[r]=[c]})},e.prototype.updateTypePolicy=function(t,n){var r=this,i=this.getTypePolicy(t),a=n.keyFields,o=n.fields;function s(c,u){c.merge=typeof u=="function"?u:u===!0?$c:u===!1?Uc:c.merge}s(i,n.merge),i.keyFn=a===!1?Ng:He(a)?Fc(a):typeof a=="function"?a:i.keyFn,o&&Object.keys(o).forEach(function(c){var u=r.getFieldPolicy(t,c,!0),l=o[c];if(typeof l=="function")u.read=l;else{var h=l.keyArgs,f=l.read,g=l.merge;u.keyFn=h===!1?qc:He(h)?Vc(h):typeof h=="function"?h:u.keyFn,typeof f=="function"&&(u.read=f),s(u,g)}u.read&&u.merge&&(u.keyFn=u.keyFn||qc)})},e.prototype.setRootTypename=function(t,n){n===void 0&&(n=t);var r="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[r];n!==i&&(ie(!i||i===t,5,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)},e.prototype.addPossibleTypes=function(t){var n=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(r){n.getSupertypeSet(r,!0),t[r].forEach(function(i){n.getSupertypeSet(i,!0).add(r);var a=i.match(Xl);(!a||a[0]!==i)&&n.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var n=this;if(!ot.call(this.typePolicies,t)){var r=this.typePolicies[t]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(o,s){if(o.test(t)){var c=n.supertypeMap.get(s);c&&c.forEach(function(u){return i.add(u)})}})),i&&i.size&&i.forEach(function(o){var s=n.getTypePolicy(o),c=s.fields,u=Vt(s,["fields"]);Object.assign(r,u),Object.assign(r.fields,c)})}var a=this.toBeAdded[t];return a&&a.length&&a.splice(0).forEach(function(o){n.updateTypePolicy(t,o)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,n,r){if(t){var i=this.getTypePolicy(t).fields;return i[n]||r&&(i[n]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,n){var r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r},e.prototype.fragmentMatches=function(t,n,r,i){var a=this;if(!t.typeCondition)return!0;if(!n)return!1;var o=t.typeCondition.name.value;if(n===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(n,!0),c=[s],u=function(x){var w=a.getSupertypeSet(x,!1);w&&w.size&&c.indexOf(w)<0&&c.push(w)},l=!!(r&&this.fuzzySubtypes.size),h=!1,f=0;f<c.length;++f){var g=c[f];if(g.has(o))return s.has(o)||(h&&globalThis.__DEV__!==!1&&ie.warn(6,n,o),s.add(o)),!0;g.forEach(u),l&&f===c.length-1&&Za(t.selectionSet,r,i)&&(l=!1,h=!0,this.fuzzySubtypes.forEach(function(x,w){var T=n.match(x);T&&T[0]===n&&u(w)}))}return!1},e.prototype.hasKeyArgs=function(t,n){var r=this.getFieldPolicy(t,n,!1);return!!(r&&r.keyFn)},e.prototype.getStoreFieldName=function(t){var n=t.typename,r=t.fieldName,i=this.getFieldPolicy(n,r,!1),a,o=i&&i.keyFn;if(o&&n)for(var s={typename:n,fieldName:r,field:t.field||null,variables:t.variables},c=eo(t);o;){var u=o(c,s);if(He(u))o=Vc(u);else{a=u||r;break}}return a===void 0&&(a=t.field?np(t.field,t.variables):yl(r,eo(t))),a===!1?r:r===dn(a)?a:r+":"+a},e.prototype.readField=function(t,n){var r=t.from;if(r){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var a=n.store.getFieldValue(r,"__typename");a&&(t.typename=a)}var o=this.getStoreFieldName(t),s=dn(o),c=n.store.getFieldValue(r,o),u=this.getFieldPolicy(t.typename,s,!1),l=u&&u.read;if(l){var h=Bc(this,r,t,n,n.store.getStorage(Le(r)?r.__ref:r,o));return $o.withValue(this.cache,l,[c,h])}return c}}},e.prototype.getReadFunction=function(t,n){var r=this.getFieldPolicy(t,n,!1);return r&&r.read},e.prototype.getMergeFunction=function(t,n,r){var i=this.getFieldPolicy(t,n,!1),a=i&&i.merge;return!a&&r&&(i=this.getTypePolicy(r),a=i&&i.merge),a},e.prototype.runMergeFunction=function(t,n,r,i,a){var o=r.field,s=r.typename,c=r.merge;return c===$c?rf(i.store)(t,n):c===Uc?n:(i.overwrite&&(t=void 0),c(t,n,Bc(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:i.variables},i,a||Object.create(null))))},e}();function Bc(e,t,n,r,i){var a=e.getStoreFieldName(n),o=dn(a),s=n.variables||r.variables,c=r.store,u=c.toReference,l=c.canRead;return{args:eo(n),field:n.field||null,fieldName:o,storeFieldName:a,variables:s,isReference:Le,toReference:u,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(Ho(arguments,t,s),r)},mergeObjects:rf(r.store)}}function Ho(e,t,n){var r=e[0],i=e[1],a=e.length,o;return typeof r=="string"?o={fieldName:r,from:a>1?i:t}:(o=D({},r),ot.call(o,"from")||(o.from=t)),globalThis.__DEV__!==!1&&o.from===void 0&&globalThis.__DEV__!==!1&&ie.warn(7,Ju(Array.from(e))),o.variables===void 0&&(o.variables=n),o}function rf(e){return function(n,r){if(He(n)||He(r))throw vt(8);if(Be(n)&&Be(r)){var i=e.getFieldValue(n,"__typename"),a=e.getFieldValue(r,"__typename"),o=i&&a&&i!==a;if(o)return r;if(Le(n)&&$n(r))return e.merge(n.__ref,r),n;if($n(n)&&Le(r))return e.merge(n,r.__ref),r;if($n(n)&&$n(r))return D(D({},n),r)}return r}}function _a(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:D(D({},e),{clientOnly:t,deferred:n})),i}var Fg=function(){function e(t,n,r){this.cache=t,this.reader=n,this.fragments=r}return e.prototype.writeToStore=function(t,n){var r=this,i=n.query,a=n.result,o=n.dataId,s=n.variables,c=n.overwrite,u=qr(i),l=Cg();s=D(D({},Mo(u)),s);var h=D(D({store:t,written:Object.create(null),merge:function(g,x){return l.merge(g,x)},variables:s,varString:cn(s)},Jl(i,this.fragments)),{overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:a||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:h});if(!Le(f))throw vt(11,a);return h.incomingById.forEach(function(g,x){var w=g.storeObject,T=g.mergeTree,O=g.fieldNodeSet,_=Hn(x);if(T&&T.map.size){var y=r.applyMerges(T,_,w,h);if(Le(y))return;w=y}if(globalThis.__DEV__!==!1&&!h.overwrite){var C=Object.create(null);O.forEach(function(P){P.selectionSet&&(C[P.name.value]=!0)});var S=function(P){return C[dn(P)]===!0},R=function(P){var F=T&&T.map.get(P);return!!(F&&F.info&&F.info.merge)};Object.keys(w).forEach(function(P){S(P)&&!R(P)&&Vg(_,w,P,h.store)})}t.merge(x,w)}),t.retain(f.__ref),f},e.prototype.processSelectionSet=function(t){var n=this,r=t.dataId,i=t.result,a=t.selectionSet,o=t.context,s=t.mergeTree,c=this.cache.policies,u=Object.create(null),l=r&&c.rootTypenamesById[r]||Ba(i,a,o.fragmentMap)||r&&o.store.get(r,"__typename");typeof l=="string"&&(u.__typename=l);var h=function(){var y=Ho(arguments,u,o.variables);if(Le(y.from)){var C=o.incomingById.get(y.from.__ref);if(C){var S=c.readField(D(D({},y),{from:C.storeObject}),o);if(S!==void 0)return S}}return c.readField(y,o)},f=new Set;this.flattenFields(a,i,o,l).forEach(function(y,C){var S,R=un(C),P=i[R];if(f.add(C),P!==void 0){var F=c.getStoreFieldName({typename:l,fieldName:C.name.value,field:C,variables:y.variables}),U=Hc(s,F),V=n.processFieldValue(P,C,C.selectionSet?_a(y,!1,!1):y,U),ye=void 0;C.selectionSet&&(Le(V)||$n(V))&&(ye=h("__typename",V));var _e=c.getMergeFunction(l,C.name.value,ye);_e?U.info={field:C,typename:l,merge:_e}:zc(s,F),u=y.merge(u,(S={},S[F]=V,S))}else globalThis.__DEV__!==!1&&!y.clientOnly&&!y.deferred&&!Po.added(C)&&!c.getReadFunction(l,C.name.value)&&globalThis.__DEV__!==!1&&ie.error(12,un(C),i)});try{var g=c.identify(i,{typename:l,selectionSet:a,fragmentMap:o.fragmentMap,storeObject:u,readField:h}),x=g[0],w=g[1];r=r||x,w&&(u=o.merge(u,w))}catch(y){if(!r)throw y}if(typeof r=="string"){var T=Hn(r),O=o.written[r]||(o.written[r]=[]);if(O.indexOf(a)>=0||(O.push(a),this.reader&&this.reader.isFresh(i,T,a,o)))return T;var _=o.incomingById.get(r);return _?(_.storeObject=o.merge(_.storeObject,u),_.mergeTree=to(_.mergeTree,s),f.forEach(function(y){return _.fieldNodeSet.add(y)})):o.incomingById.set(r,{storeObject:u,mergeTree:wi(s)?void 0:s,fieldNodeSet:f}),T}return u},e.prototype.processFieldValue=function(t,n,r,i){var a=this;return!n.selectionSet||t===null?globalThis.__DEV__!==!1?Vl(t):t:He(t)?t.map(function(o,s){var c=a.processFieldValue(o,n,r,Hc(i,s));return zc(i,s),c}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:i})},e.prototype.flattenFields=function(t,n,r,i){i===void 0&&(i=Ba(n,t,r.fragmentMap));var a=new Map,o=this.cache.policies,s=new Zn(!1);return function c(u,l){var h=s.lookup(u,l.clientOnly,l.deferred);h.visited||(h.visited=!0,u.selections.forEach(function(f){if(Fr(f,r.variables)){var g=l.clientOnly,x=l.deferred;if(!(g&&x)&&Dt(f.directives)&&f.directives.forEach(function(O){var _=O.name.value;if(_==="client"&&(g=!0),_==="defer"){var y=Vi(O,r.variables);(!y||y.if!==!1)&&(x=!0)}}),ln(f)){var w=a.get(f);w&&(g=g&&w.clientOnly,x=x&&w.deferred),a.set(f,_a(r,g,x))}else{var T=Fi(f,r.lookupFragment);if(!T&&f.kind===K.FRAGMENT_SPREAD)throw vt(13,f.name.value);T&&o.fragmentMatches(T,i,n,r.variables)&&c(T.selectionSet,_a(r,g,x))}}}))}(t,r),a},e.prototype.applyMerges=function(t,n,r,i,a){var o,s=this;if(t.map.size&&!Le(r)){var c=!He(r)&&(Le(n)||$n(n))?n:void 0,u=r;c&&!a&&(a=[Le(c)?c.__ref:c]);var l,h=function(f,g){return He(f)?typeof g=="number"?f[g]:void 0:i.store.getFieldValue(f,String(g))};t.map.forEach(function(f,g){var x=h(c,g),w=h(u,g);if(w!==void 0){a&&a.push(g);var T=s.applyMerges(f,x,w,i,a);T!==w&&(l=l||new Map,l.set(g,T)),a&&ie(a.pop()===g)}}),l&&(r=He(u)?u.slice(0):D({},u),l.forEach(function(f,g){r[g]=f}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,i,a&&(o=i.store).getStorage.apply(o,a)):r},e}(),af=[];function Hc(e,t){var n=e.map;return n.has(t)||n.set(t,af.pop()||{map:new Map}),n.get(t)}function to(e,t){if(e===t||!t||wi(t))return e;if(!e||wi(e))return t;var n=e.info&&t.info?D(D({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(s,c){a.map.set(c,to(s,t.map.get(c))),o.delete(c)}),o.forEach(function(s){a.map.set(s,to(t.map.get(s),e.map.get(s)))})}return a}function wi(e){return!e||!(e.info||e.map.size)}function zc(e,t){var n=e.map,r=n.get(t);r&&wi(r)&&(af.push(r),n.delete(t))}var Qc=new Set;function Vg(e,t,n,r){var i=function(h){var f=r.getFieldValue(h,n);return typeof f=="object"&&f},a=i(e);if(a){var o=i(t);if(o&&!Le(a)&&!je(a,o)&&!Object.keys(a).every(function(h){return r.getFieldValue(o,h)!==void 0})){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),c=dn(n),u="".concat(s,".").concat(c);if(!Qc.has(u)){Qc.add(u);var l=[];!He(a)&&!He(o)&&[a,o].forEach(function(h){var f=r.getFieldValue(h,"__typename");typeof f=="string"&&!l.includes(f)&&l.push(f)}),globalThis.__DEV__!==!1&&ie.warn(14,c,s,l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"",u,D({},a),D({},o))}}}}var of=function(e){Gt(t,e);function t(n){n===void 0&&(n={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new Il(Po),r.assumeImmutableResults=!0,r.makeVar=jg,r.txCount=0,r.config=Og(n),r.addTypename=!!r.config.addTypename,r.policies=new Ag({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return t.prototype.init=function(){var n=this.data=new Rr.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=n.stump,this.resetResultCache()},t.prototype.resetResultCache=function(n){var r=this,i=this.storeReader,a=this.config.fragments;this.storeWriter=new Fg(this,this.storeReader=new Mg({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Kl(this.config),canon:n?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Lr(function(o,s){return r.broadcastWatch(o,s)},{max:this.config.resultCacheMaxSize||Ht["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(o){var s=o.optimistic?r.optimisticData:r.data;if(Or(s)){var c=o.optimistic,u=o.id,l=o.variables;return s.makeCacheKey(o.query,o.callback,cn({optimistic:c,id:u,variables:l}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(o){return o.resetCaching()})},t.prototype.restore=function(n){return this.init(),n&&this.data.replace(n),this},t.prototype.extract=function(n){return n===void 0&&(n=!1),(n?this.optimisticData:this.data).extract()},t.prototype.read=function(n){var r=n.returnPartialData,i=r===void 0?!1:r;try{return this.storeReader.diffQueryAgainstStore(D(D({},n),{store:n.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof Wl)return null;throw a}},t.prototype.write=function(n){try{return++this.txCount,this.storeWriter.writeToStore(this.data,n)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(n){if(ot.call(n,"id")&&!n.id)return!1;var r=n.optimistic?this.optimisticData:this.data;try{return++this.txCount,r.modify(n.id||"ROOT_QUERY",n.fields)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(n){return this.storeReader.diffQueryAgainstStore(D(D({},n),{store:n.optimistic?this.optimisticData:this.data,rootId:n.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(n){var r=this;return this.watches.size||Rg(this),this.watches.add(n),n.immediate&&this.maybeBroadcastWatch(n),function(){r.watches.delete(n)&&!r.watches.size&&Nc(r),r.maybeBroadcastWatch.forget(n)}},t.prototype.gc=function(n){var r;cn.reset(),Bi.reset(),this.addTypenameTransform.resetCache(),(r=this.config.fragments)===null||r===void 0||r.resetCaches();var i=this.optimisticData.gc();return n&&!this.txCount&&(n.resetResultCache?this.resetResultCache(n.resetResultIdentities):n.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(n,r){return(r?this.optimisticData:this.data).retain(n)},t.prototype.release=function(n,r){return(r?this.optimisticData:this.data).release(n)},t.prototype.identify=function(n){if(Le(n))return n.__ref;try{return this.policies.identify(n)[0]}catch(r){globalThis.__DEV__!==!1&&ie.warn(r)}},t.prototype.evict=function(n){if(!n.id){if(ot.call(n,"id"))return!1;n=D(D({},n),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(n,this.data)}finally{!--this.txCount&&n.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(n){var r=this;return this.init(),cn.reset(),n&&n.discardWatches?(this.watches.forEach(function(i){return r.maybeBroadcastWatch.forget(i)}),this.watches.clear(),Nc(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(n){var r=this.optimisticData.removeLayer(n);r!==this.optimisticData&&(this.optimisticData=r,this.broadcastWatches())},t.prototype.batch=function(n){var r=this,i=n.update,a=n.optimistic,o=a===void 0?!0:a,s=n.removeOptimistic,c=n.onWatchUpdated,u,l=function(f){var g=r,x=g.data,w=g.optimisticData;++r.txCount,f&&(r.data=r.optimisticData=f);try{return u=i(r)}finally{--r.txCount,r.data=x,r.optimisticData=w}},h=new Set;return c&&!this.txCount&&this.broadcastWatches(D(D({},n),{onWatchUpdated:function(f){return h.add(f),!1}})),typeof o=="string"?this.optimisticData=this.optimisticData.addLayer(o,l):o===!1?l(this.data):l(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),c&&h.size?(this.broadcastWatches(D(D({},n),{onWatchUpdated:function(f,g){var x=c.call(this,f,g);return x!==!1&&h.delete(f),x}})),h.size&&h.forEach(function(f){return r.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(n),u},t.prototype.performTransaction=function(n,r){return this.batch({update:n,optimistic:r||r!==null})},t.prototype.transformDocument=function(n){return this.addTypenameToDocument(this.addFragmentsToDocument(n))},t.prototype.broadcastWatches=function(n){var r=this;this.txCount||this.watches.forEach(function(i){return r.maybeBroadcastWatch(i,n)})},t.prototype.addFragmentsToDocument=function(n){var r=this.config.fragments;return r?r.transform(n):n},t.prototype.addTypenameToDocument=function(n){return this.addTypename?this.addTypenameTransform.transformDocument(n):n},t.prototype.broadcastWatch=function(n,r){var i=n.lastDiff,a=this.diff(n);r&&(n.optimistic&&typeof r.optimistic=="string"&&(a.fromOptimisticTransaction=!0),r.onWatchUpdated&&r.onWatchUpdated.call(this,n,a,i)===!1)||(!i||!je(i.result,a.result))&&n.callback(n.lastDiff=a,i)},t}(Ql);globalThis.__DEV__!==!1&&(of.prototype.getMemoryInternals=Fm);var Oe;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(Oe||(Oe={}));function jr(e){return e?e<7:!1}var Wc=Object.assign,qg=Object.hasOwnProperty,no=function(e){Gt(t,e);function t(n){var r=n.queryManager,i=n.queryInfo,a=n.options,o=e.call(this,function(T){try{var O=T._subscription._observer;O&&!O.error&&(O.error=$g)}catch{}var _=!o.observers.size;o.observers.add(T);var y=o.last;return y&&y.error?T.error&&T.error(y.error):y&&y.result&&T.next&&T.next(y.result),_&&o.reobserve().catch(function(){}),function(){o.observers.delete(T)&&!o.observers.size&&o.tearDownQuery()}})||this;o.observers=new Set,o.subscriptions=new Set,o.queryInfo=i,o.queryManager=r,o.waitForOwnResult=ka(a.fetchPolicy),o.isTornDown=!1,o.subscribeToMore=o.subscribeToMore.bind(o);var s=r.defaultOptions.watchQuery,c=s===void 0?{}:s,u=c.fetchPolicy,l=u===void 0?"cache-first":u,h=a.fetchPolicy,f=h===void 0?l:h,g=a.initialFetchPolicy,x=g===void 0?f==="standby"?l:f:g;o.options=D(D({},a),{initialFetchPolicy:x,fetchPolicy:f}),o.queryId=i.queryId||r.generateQueryId();var w=qr(o.query);return o.queryName=w&&w.name&&w.name.value,o}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var n=this;return new Promise(function(r,i){var a={next:function(s){r(s),n.observers.delete(a),n.observers.size||n.queryManager.removeQuery(n.queryId),setTimeout(function(){o.unsubscribe()},0)},error:i},o=n.subscribe(a)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentResult=function(n){n===void 0&&(n=!0);var r=this.getLastResult(!0),i=this.queryInfo.networkStatus||r&&r.networkStatus||Oe.ready,a=D(D({},r),{loading:jr(i),networkStatus:i}),o=this.options.fetchPolicy,s=o===void 0?"cache-first":o;if(!(ka(s)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(a.data=c.result),je(a.data,{})&&(a.data=void 0),c.complete?(delete a.partial,c.complete&&a.networkStatus===Oe.loading&&(s==="cache-first"||s==="cache-only")&&(a.networkStatus=Oe.ready,a.loading=!1)):a.partial=!0,globalThis.__DEV__!==!1&&!c.complete&&!this.options.partialRefetch&&!a.loading&&!a.data&&!a.error&&cf(c.missing)}return n&&this.updateLastResult(a),a},t.prototype.isDifferentFromLastResult=function(n,r){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!zl(this.query,this.last.result,n,this.variables):!je(this.last.result,n);return i||r&&!je(this.last.variables,r)},t.prototype.getLast=function(n,r){var i=this.last;if(i&&i[n]&&(!r||je(i.variables,this.variables)))return i[n]},t.prototype.getLastResult=function(n){return this.getLast("result",n)},t.prototype.getLastError=function(n){return this.getLast("error",n)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(n){var r,i={pollInterval:0},a=this.options.fetchPolicy;if(a==="cache-and-network"?i.fetchPolicy=a:a==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&n&&qg.call(n,"variables")){var o=bl(this.query),s=o.variableDefinitions;(!s||!s.some(function(c){return c.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&ie.warn(20,n,((r=o.name)===null||r===void 0?void 0:r.value)||o)}return n&&!je(this.options.variables,n)&&(i.variables=this.options.variables=D(D({},this.options.variables),n)),this.queryInfo.resetLastWrite(),this.reobserve(i,Oe.refetch)},t.prototype.fetchMore=function(n){var r=this,i=D(D({},n.query?n:D(D(D(D({},this.options),{query:this.options.query}),n),{variables:D(D({},this.options.variables),n.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var a=this.queryManager.generateQueryId();this.lastQuery=n.query?this.transformDocument(this.options.query):i.query;var o=this.queryInfo,s=o.networkStatus;o.networkStatus=Oe.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var c=new Set,u=n==null?void 0:n.updateQuery,l=this.options.fetchPolicy!=="no-cache";return l||ie(u,21),this.queryManager.fetchQuery(a,i,Oe.fetchMore).then(function(h){if(r.queryManager.removeQuery(a),o.networkStatus===Oe.fetchMore&&(o.networkStatus=s),l)r.queryManager.cache.batch({update:function(x){var w=n.updateQuery;w?x.updateQuery({query:r.query,variables:r.variables,returnPartialData:!0,optimistic:!1},function(T){return w(T,{fetchMoreResult:h.data,variables:i.variables})}):x.writeQuery({query:i.query,variables:i.variables,data:h.data})},onWatchUpdated:function(x){c.add(x.query)}});else{var f=r.getLast("result"),g=u(f.data,{fetchMoreResult:h.data,variables:i.variables});r.reportResult(D(D({},f),{data:g}),r.variables)}return h}).finally(function(){l&&!c.has(r.query)&&sf(r)})},t.prototype.subscribeToMore=function(n){var r=this,i=this.queryManager.startGraphQLSubscription({query:n.document,variables:n.variables,context:n.context}).subscribe({next:function(a){var o=n.updateQuery;o&&r.updateQuery(function(s,c){var u=c.variables;return o(s,{subscriptionData:a,variables:u})})},error:function(a){if(n.onError){n.onError(a);return}globalThis.__DEV__!==!1&&ie.error(22,a)}});return this.subscriptions.add(i),function(){r.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(n){return this.reobserve(n)},t.prototype.silentSetOptions=function(n){var r=wn(this.options,n||{});Wc(this.options,r)},t.prototype.setVariables=function(n){return je(this.variables,n)?this.observers.size?this.result():Promise.resolve():(this.options.variables=n,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:n},Oe.setVariables):Promise.resolve())},t.prototype.updateQuery=function(n){var r=this.queryManager,i=r.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,a=n(i,{variables:this.variables});a&&(r.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),r.broadcastQueries())},t.prototype.startPolling=function(n){this.options.pollInterval=n,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(n,r){if(r.nextFetchPolicy){var i=r.fetchPolicy,a=i===void 0?"cache-first":i,o=r.initialFetchPolicy,s=o===void 0?a:o;a==="standby"||(typeof r.nextFetchPolicy=="function"?r.fetchPolicy=r.nextFetchPolicy(a,{reason:n,options:r,observable:this,initialFetchPolicy:s}):n==="variables-changed"?r.fetchPolicy=s:r.fetchPolicy=r.nextFetchPolicy)}return r.fetchPolicy},t.prototype.fetch=function(n,r,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,n,r,i)},t.prototype.updatePolling=function(){var n=this;if(!this.queryManager.ssrMode){var r=this,i=r.pollingInfo,a=r.options.pollInterval;if(!a||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){ie(a,23);var o=i||(this.pollingInfo={});o.interval=a;var s=function(){var u,l;n.pollingInfo&&(!jr(n.queryInfo.networkStatus)&&!(!((l=(u=n.options).skipPollAttempt)===null||l===void 0)&&l.call(u))?n.reobserve({fetchPolicy:n.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Oe.poll).then(c,c):c())},c=function(){var u=n.pollingInfo;u&&(clearTimeout(u.timeout),u.timeout=setTimeout(s,u.interval))};c()}}},t.prototype.updateLastResult=function(n,r){r===void 0&&(r=this.variables);var i=this.getLastError();return i&&this.last&&!je(r,this.last.variables)&&(i=void 0),this.last=D({result:this.queryManager.assumeImmutableResults?n:Vl(n),variables:r},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(n,r){var i=this;this.isTornDown=!1;var a=r===Oe.refetch||r===Oe.fetchMore||r===Oe.poll,o=this.options.variables,s=this.options.fetchPolicy,c=wn(this.options,n||{}),u=a?c:Wc(this.options,c),l=this.transformDocument(u.query);this.lastQuery=l,a||(this.updatePolling(),n&&n.variables&&!je(n.variables,o)&&u.fetchPolicy!=="standby"&&(u.fetchPolicy===s||typeof u.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",u),r===void 0&&(r=Oe.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=ka(u.fetchPolicy));var h=function(){i.concast===x&&(i.waitForOwnResult=!1)},f=u.variables&&D({},u.variables),g=this.fetch(u,r,l),x=g.concast,w=g.fromLink,T={next:function(O){je(i.variables,f)&&(h(),i.reportResult(O,f))},error:function(O){je(i.variables,f)&&(Bl(O)||(O=new Yt({networkError:O})),h(),i.reportError(O,f))}};return!a&&(w||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=x,this.observer=T),x.addObserver(T),x},t.prototype.reobserve=function(n,r){return this.reobserveAsConcast(n,r).promise},t.prototype.resubscribeAfterError=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.last;this.resetLastResults();var a=this.subscribe.apply(this,n);return this.last=i,a},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(n,r){var i=this.getLastError(),a=this.isDifferentFromLastResult(n,r);(i||!n.partial||this.options.returnPartialData)&&this.updateLastResult(n,r),(i||a)&&Sr(this.observers,"next",n)},t.prototype.reportError=function(n,r){var i=D(D({},this.getLastResult()),{error:n,errors:n.graphQLErrors,networkStatus:Oe.error,loading:!1});this.updateLastResult(i,r),Sr(this.observers,"error",this.last.error=n)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(n){return n.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(n){return this.queryManager.transform(n)},t}(Fe);ql(no);function sf(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,a){return this.nextFetchPolicy=r,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,a):n}}):e.reobserve()}function $g(e){globalThis.__DEV__!==!1&&ie.error(24,e.message,e.stack)}function cf(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&ie.debug(25,e)}function ka(e){return e==="network-only"||e==="no-cache"||e==="standby"}var Un=new(er?WeakMap:Map);function Da(e,t){var n=e[t];typeof n=="function"&&(e[t]=function(){return Un.set(e,(Un.get(e)+1)%1e15),n.apply(this,arguments)})}function Gc(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var Ma=function(){function e(t,n){n===void 0&&(n=t.generateQueryId()),this.queryId=n,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=t.cache;Un.has(r)||(Un.set(r,0),Da(r,"evict"),Da(r,"modify"),Da(r,"reset"))}return e.prototype.init=function(t){var n=t.networkStatus||Oe.loading;return this.variables&&this.networkStatus!==Oe.loading&&!je(this.variables,t.variables)&&(n=Oe.setVariables),je(t.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:n}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.reset=function(){Gc(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&je(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(t,n){this.lastDiff=t?{diff:t,options:n||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var n;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(n=this.observableQuery)===null||n===void 0?void 0:n.options.canonizeResults}},e.prototype.setDiff=function(t){var n=this,r,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&(!((r=this.observableQuery)===null||r===void 0)&&r.getLastError())||(this.updateLastDiff(t),!this.dirty&&!je(i&&i.result,t&&t.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return n.notify()},0))))},e.prototype.setObservableQuery=function(t){var n=this;t!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=t,t?(t.queryInfo=this,this.listeners.add(this.oqListener=function(){var r=n.getDiff();r.fromOptimisticTransaction?t.observe():sf(t)})):delete this.oqListener)},e.prototype.notify=function(){var t=this;Gc(this),this.shouldNotify()&&this.listeners.forEach(function(n){return n(t)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(jr(this.networkStatus)&&this.observableQuery){var t=this.observableQuery.options.fetchPolicy;if(t!=="cache-only"&&t!=="cache-and-network")return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(t){var n=this;t===void 0&&(t=this.variables);var r=this.observableQuery;if(!(r&&r.options.fetchPolicy==="no-cache")){var i=D(D({},this.getDiffOptions(t)),{watcher:this,callback:function(a){return n.setDiff(a)}});(!this.lastWatch||!je(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,n){var r=this.lastWrite;return!(r&&r.dmCount===Un.get(this.cache)&&je(n,r.variables)&&je(t.data,r.result.data))},e.prototype.markResult=function(t,n,r,i){var a=this,o=new hn,s=Dt(t.errors)?t.errors.slice(0):[];if(this.reset(),"incremental"in t&&Dt(t.incremental)){var c=$l(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var u=this.getDiff();t.data=o.merge(u.result,t.data)}this.graphQLErrors=s,r.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(r.variables)):i!==0&&(ro(t,r.errorPolicy)?this.cache.performTransaction(function(l){if(a.shouldWrite(t,r.variables))l.writeQuery({query:n,data:t.data,variables:r.variables,overwrite:i===1}),a.lastWrite={result:t,variables:r.variables,dmCount:Un.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){t.data=a.lastDiff.diff.result;return}var h=a.getDiffOptions(r.variables),f=l.diff(h);!a.stopped&&je(a.variables,r.variables)&&a.updateWatch(r.variables),a.updateLastDiff(f,h),f.complete&&(t.data=f.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Oe.ready},e.prototype.markError=function(t){return this.networkStatus=Oe.error,this.lastWrite=void 0,this.reset(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e}();function ro(e,t){t===void 0&&(t="none");var n=t==="ignore"||t==="all",r=!di(e);return!r&&n&&e.data&&(r=!0),r}var Ug=Object.prototype.hasOwnProperty,Yc=Object.create(null),Bg=function(){function e(t){var n=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new ko(Ht["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Zn(!1);var r=new Il(function(a){return n.cache.transformDocument(a)},{cache:!1});this.cache=t.cache,this.link=t.link,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientAwareness=t.clientAwareness,this.localState=t.localState,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults;var i=t.documentTransform;this.documentTransform=i?r.concat(i).concat(r):r,this.defaultContext=t.defaultContext||Object.create(null),(this.onBroadcast=t.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(n,r){t.stopQueryNoBroadcast(r)}),this.cancelPendingFetches(vt(26))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(n){return n(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return an(this,arguments,void 0,function(n){var r,i,a,o,s,c,u,l=n.mutation,h=n.variables,f=n.optimisticResponse,g=n.updateQueries,x=n.refetchQueries,w=x===void 0?[]:x,T=n.awaitRefetchQueries,O=T===void 0?!1:T,_=n.update,y=n.onQueryUpdated,C=n.fetchPolicy,S=C===void 0?((c=this.defaultOptions.mutate)===null||c===void 0?void 0:c.fetchPolicy)||"network-only":C,R=n.errorPolicy,P=R===void 0?((u=this.defaultOptions.mutate)===null||u===void 0?void 0:u.errorPolicy)||"none":R,F=n.keepRootFields,U=n.context;return on(this,function(V){switch(V.label){case 0:return ie(l,27),ie(S==="network-only"||S==="no-cache",28),r=this.generateMutationId(),l=this.cache.transformForLink(this.transform(l)),i=this.getDocumentInfo(l).hasClientExports,h=this.getVariables(l,h),i?[4,this.localState.addExportedVariables(l,h,U)]:[3,2];case 1:h=V.sent(),V.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[r]={mutation:l,variables:h,loading:!0,error:null}),o=f&&this.markMutationOptimistic(f,{mutationId:r,document:l,variables:h,fetchPolicy:S,errorPolicy:P,context:U,updateQueries:g,update:_,keepRootFields:F}),this.broadcastQueries(),s=this,[2,new Promise(function(ye,_e){return Sa(s.getObservableFromLink(l,D(D({},U),{optimisticResponse:o?f:void 0}),h,{},!1),function(ve){if(di(ve)&&P==="none")throw new Yt({graphQLErrors:Ga(ve)});a&&(a.loading=!1,a.error=null);var we=D({},ve);return typeof w=="function"&&(w=w(we)),P==="ignore"&&di(we)&&delete we.errors,s.markMutationResult({mutationId:r,result:we,document:l,variables:h,fetchPolicy:S,errorPolicy:P,context:U,update:_,updateQueries:g,awaitRefetchQueries:O,refetchQueries:w,removeOptimistic:o?r:void 0,onQueryUpdated:y,keepRootFields:F})}).subscribe({next:function(ve){s.broadcastQueries(),(!("hasNext"in ve)||ve.hasNext===!1)&&ye(ve)},error:function(ve){a&&(a.loading=!1,a.error=ve),o&&s.cache.removeOptimistic(r),s.broadcastQueries(),_e(ve instanceof Yt?ve:new Yt({networkError:ve}))}})})]}})})},e.prototype.markMutationResult=function(t,n){var r=this;n===void 0&&(n=this.cache);var i=t.result,a=[],o=t.fetchPolicy==="no-cache";if(!o&&ro(i,t.errorPolicy)){if(zn(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),zn(i)&&Dt(i.incremental)){var s=n.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),c=void 0;s.result&&(c=$l(s.result,i)),typeof c<"u"&&(i.data=c,a.push({result:c,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var u=t.updateQueries;u&&this.queries.forEach(function(h,f){var g=h.observableQuery,x=g&&g.queryName;if(!(!x||!Ug.call(u,x))){var w=u[x],T=r.queries.get(f),O=T.document,_=T.variables,y=n.diff({query:O,variables:_,returnPartialData:!0,optimistic:!1}),C=y.result,S=y.complete;if(S&&C){var R=w(C,{mutationResult:i,queryName:O&&Ha(O)||void 0,queryVariables:_});R&&a.push({result:R,dataId:"ROOT_QUERY",query:O,variables:_})}}})}if(a.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(h){o||a.forEach(function(w){return h.write(w)});var f=t.update,g=!Vp(i)||zn(i)&&!i.hasNext;if(f){if(!o){var x=h.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});x.complete&&(i=D(D({},i),{data:x.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}g&&f(h,i,{context:t.context,variables:t.variables})}!o&&!t.keepRootFields&&g&&h.modify({id:"ROOT_MUTATION",fields:function(w,T){var O=T.fieldName,_=T.DELETE;return O==="__typename"?w:_}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(h){return l.push(h)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(l).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,n){var r=this,i=typeof t=="function"?t(n.variables,{IGNORE:Yc}):t;return i===Yc?!1:(this.cache.recordOptimisticTransaction(function(a){try{r.markMutationResult(D(D({},n),{result:{data:i}}),a)}catch(o){globalThis.__DEV__!==!1&&ie.error(o)}},n.mutationId),!0)},e.prototype.fetchQuery=function(t,n,r){return this.fetchConcastWithInfo(t,n,r).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(n,r){t[r]={variables:n.variables,networkStatus:n.networkStatus,networkError:n.networkError,graphQLErrors:n.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var n=this.queries.get(t);n&&(n.networkError=void 0,n.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var n=this.transformCache;if(!n.has(t)){var r={hasClientExports:bm(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:Dr(["nonreactive"],t),clientQuery:this.localState.clientQuery(t),serverQuery:jl([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],t),defaultVars:Mo(qr(t)),asQuery:D(D({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?D(D({},i),{operation:"query"}):i})})};n.set(t,r)}return n.get(t)},e.prototype.getVariables=function(t,n){return D(D({},this.getDocumentInfo(t).defaultVars),n)},e.prototype.watchQuery=function(t){var n=this.transform(t.query);t=D(D({},t),{variables:this.getVariables(n,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var r=new Ma(this),i=new no({queryManager:this,queryInfo:r,options:t});return i.lastQuery=n,this.queries.set(i.queryId,r),r.init({document:n,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,n){var r=this;return n===void 0&&(n=this.generateQueryId()),ie(t.query,29),ie(t.query.kind==="Document",30),ie(!t.returnPartialData,31),ie(!t.pollInterval,32),this.fetchQuery(n,D(D({},t),{query:this.transform(t.query)})).finally(function(){return r.stopQuery(n)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var n=this.queries.get(t);n&&n.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(vt(33)),this.queries.forEach(function(n){n.observableQuery?n.networkStatus=Oe.loading:n.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var n=this;t===void 0&&(t="active");var r=new Map,i=new Map,a=new Set;return Array.isArray(t)&&t.forEach(function(o){typeof o=="string"?i.set(o,!1):Qm(o)?i.set(n.transform(o),!1):Be(o)&&o.query&&a.add(o)}),this.queries.forEach(function(o,s){var c=o.observableQuery,u=o.document;if(c){if(t==="all"){r.set(s,c);return}var l=c.queryName,h=c.options.fetchPolicy;if(h==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||l&&i.has(l)||u&&i.has(u))&&(r.set(s,c),l&&i.set(l,!0),u&&i.set(u,!0))}}),a.size&&a.forEach(function(o){var s=Pa("legacyOneTimeQuery"),c=n.getQuery(s).init({document:o.query,variables:o.variables}),u=new no({queryManager:n,queryInfo:c,options:D(D({},o),{fetchPolicy:"network-only"})});ie(u.queryId===s),c.setObservableQuery(u),r.set(s,u)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(o,s){o||globalThis.__DEV__!==!1&&ie.warn(typeof s=="string"?34:35,s)}),r},e.prototype.reFetchObservableQueries=function(t){var n=this;t===void 0&&(t=!1);var r=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,a){var o=i.options.fetchPolicy;i.resetLastResults(),(t||o!=="standby"&&o!=="cache-only")&&r.push(i.refetch()),n.getQuery(a).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(t){this.getQuery(t.queryId).setObservableQuery(t)},e.prototype.startGraphQLSubscription=function(t){var n=this,r=t.query,i=t.fetchPolicy,a=t.errorPolicy,o=a===void 0?"none":a,s=t.variables,c=t.context,u=c===void 0?{}:c,l=t.extensions,h=l===void 0?{}:l;r=this.transform(r),s=this.getVariables(r,s);var f=function(x){return n.getObservableFromLink(r,u,x,h).map(function(w){i!=="no-cache"&&(ro(w,o)&&n.cache.write({query:r,result:w.data,dataId:"ROOT_SUBSCRIPTION",variables:x}),n.broadcastQueries());var T=di(w),O=tg(w);if(T||O){var _={};if(T&&(_.graphQLErrors=w.errors),O&&(_.protocolErrors=w.extensions[qo]),o==="none"||O)throw new Yt(_)}return o==="ignore"&&delete w.errors,w})};if(this.getDocumentInfo(r).hasClientExports){var g=this.localState.addExportedVariables(r,s,u).then(f);return new Fe(function(x){var w=null;return g.then(function(T){return w=T.subscribe(x)},x.error),function(){return w&&w.unsubscribe()}})}return f(s)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){this.fetchCancelFns.delete(t),this.queries.has(t)&&(this.getQuery(t).stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){return t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,n,r,i,a){var o=this,s;a===void 0&&(a=(s=n==null?void 0:n.queryDeduplication)!==null&&s!==void 0?s:this.queryDeduplication);var c,u=this.getDocumentInfo(t),l=u.serverQuery,h=u.clientQuery;if(l){var f=this,g=f.inFlightLinkObservables,x=f.link,w={query:l,variables:r,operationName:Ha(l)||void 0,context:this.prepareContext(D(D({},n),{forceFetch:!a})),extensions:i};if(n=w.context,a){var T=Bi(l),O=cn(r),_=g.lookup(T,O);if(c=_.observable,!c){var y=new Pn([Ya(x,w)]);c=_.observable=y,y.beforeNext(function(){g.remove(T,O)})}}else c=new Pn([Ya(x,w)])}else c=new Pn([Fe.of({data:{}})]),n=this.prepareContext(n);return h&&(c=Sa(c,function(C){return o.localState.runResolvers({document:h,remoteResult:C,context:n,variables:r})})),c},e.prototype.getResultsFromLink=function(t,n,r){var i=t.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(r.query);return Sa(this.getObservableFromLink(a,r.context,r.variables),function(o){var s=Ga(o),c=s.length>0,u=r.errorPolicy;if(i>=t.lastRequestId){if(c&&u==="none")throw t.markError(new Yt({graphQLErrors:s}));t.markResult(o,a,r,n),t.markReady()}var l={data:o.data,loading:!1,networkStatus:Oe.ready};return c&&u==="none"&&(l.data=void 0),c&&u!=="ignore"&&(l.errors=s,l.networkStatus=Oe.error),l},function(o){var s=Bl(o)?o:new Yt({networkError:o});throw i>=t.lastRequestId&&t.markError(s),s})},e.prototype.fetchConcastWithInfo=function(t,n,r,i){var a=this;r===void 0&&(r=Oe.loading),i===void 0&&(i=n.query);var o=this.getVariables(i,n.variables),s=this.getQuery(t),c=this.defaultOptions.watchQuery,u=n.fetchPolicy,l=u===void 0?c&&c.fetchPolicy||"cache-first":u,h=n.errorPolicy,f=h===void 0?c&&c.errorPolicy||"none":h,g=n.returnPartialData,x=g===void 0?!1:g,w=n.notifyOnNetworkStatusChange,T=w===void 0?!1:w,O=n.context,_=O===void 0?{}:O,y=Object.assign({},n,{query:i,variables:o,fetchPolicy:l,errorPolicy:f,returnPartialData:x,notifyOnNetworkStatusChange:T,context:_}),C=function(U){y.variables=U;var V=a.fetchQueryByPolicy(s,y,r);return y.fetchPolicy!=="standby"&&V.sources.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",n),V},S=function(){return a.fetchCancelFns.delete(t)};this.fetchCancelFns.set(t,function(U){S(),setTimeout(function(){return R.cancel(U)})});var R,P;if(this.getDocumentInfo(y.query).hasClientExports)R=new Pn(this.localState.addExportedVariables(y.query,y.variables,y.context).then(C).then(function(U){return U.sources})),P=!0;else{var F=C(y.variables);P=F.fromLink,R=new Pn(F.sources)}return R.promise.then(S,S),{concast:R,fromLink:P}},e.prototype.refetchQueries=function(t){var n=this,r=t.updateCache,i=t.include,a=t.optimistic,o=a===void 0?!1:a,s=t.removeOptimistic,c=s===void 0?o?Pa("refetchQueries"):void 0:s,u=t.onQueryUpdated,l=new Map;i&&this.getObservableQueries(i).forEach(function(f,g){l.set(g,{oq:f,lastDiff:n.getQuery(g).getDiff()})});var h=new Map;return r&&this.cache.batch({update:r,optimistic:o&&c||!1,removeOptimistic:c,onWatchUpdated:function(f,g,x){var w=f.watcher instanceof Ma&&f.watcher.observableQuery;if(w){if(u){l.delete(w.queryId);var T=u(w,g,x);return T===!0&&(T=w.refetch()),T!==!1&&h.set(w,T),T}u!==null&&l.set(w.queryId,{oq:w,lastDiff:x,diff:g})}}}),l.size&&l.forEach(function(f,g){var x=f.oq,w=f.lastDiff,T=f.diff,O;if(u){if(!T){var _=x.queryInfo;_.reset(),T=_.getDiff()}O=u(x,T,w)}(!u||O===!0)&&(O=x.refetch()),O!==!1&&h.set(x,O),g.indexOf("legacyOneTimeQuery")>=0&&n.stopQueryNoBroadcast(g)}),c&&this.cache.removeOptimistic(c),h},e.prototype.fetchQueryByPolicy=function(t,n,r){var i=this,a=n.query,o=n.variables,s=n.fetchPolicy,c=n.refetchWritePolicy,u=n.errorPolicy,l=n.returnPartialData,h=n.context,f=n.notifyOnNetworkStatusChange,g=t.networkStatus;t.init({document:a,variables:o,networkStatus:r});var x=function(){return t.getDiff()},w=function(C,S){S===void 0&&(S=t.networkStatus||Oe.loading);var R=C.result;globalThis.__DEV__!==!1&&!l&&!je(R,{})&&cf(C.missing);var P=function(F){return Fe.of(D({data:F,loading:jr(S),networkStatus:S},C.complete?null:{partial:!0}))};return R&&i.getDocumentInfo(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:R},context:h,variables:o,onlyRunForcedResolvers:!0}).then(function(F){return P(F.data||void 0)}):u==="none"&&S===Oe.refetch&&Array.isArray(C.missing)?P(void 0):P(R)},T=s==="no-cache"?0:r===Oe.refetch&&c!=="merge"?1:2,O=function(){return i.getResultsFromLink(t,T,{query:a,variables:o,context:h,fetchPolicy:s,errorPolicy:u})},_=f&&typeof g=="number"&&g!==r&&jr(r);switch(s){default:case"cache-first":{var y=x();return y.complete?{fromLink:!1,sources:[w(y,t.markReady())]}:l||_?{fromLink:!0,sources:[w(y),O()]}:{fromLink:!0,sources:[O()]}}case"cache-and-network":{var y=x();return y.complete||l||_?{fromLink:!0,sources:[w(y),O()]}:{fromLink:!0,sources:[O()]}}case"cache-only":return{fromLink:!1,sources:[w(x(),t.markReady())]};case"network-only":return _?{fromLink:!0,sources:[w(x()),O()]}:{fromLink:!0,sources:[O()]};case"no-cache":return _?{fromLink:!0,sources:[w(t.getDiff()),O()]}:{fromLink:!0,sources:[O()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Ma(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var n=this.localState.prepareContext(t);return D(D(D({},this.defaultContext),n),{clientAwareness:this.clientAwareness})},e}(),Hg=function(){function e(t){var n=t.cache,r=t.client,i=t.resolvers,a=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=n,r&&(this.client=r),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return e.prototype.addResolvers=function(t){var n=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(r){n.resolvers=gc(n.resolvers,r)}):this.resolvers=gc(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return an(this,arguments,void 0,function(n){var r=n.document,i=n.remoteResult,a=n.context,o=n.variables,s=n.onlyRunForcedResolvers,c=s===void 0?!1:s;return on(this,function(u){return r?[2,this.resolveDocument(r,i.data,a,o,this.fragmentMatcher,c).then(function(l){return D(D({},i),{data:l.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return Dr(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return Pl(t)},e.prototype.prepareContext=function(t){var n=this.cache;return D(D({},t),{cache:n,getCacheKey:function(r){return n.identify(r)}})},e.prototype.addExportedVariables=function(t){return an(this,arguments,void 0,function(n,r,i){return r===void 0&&(r={}),i===void 0&&(i={}),on(this,function(a){return n?[2,this.resolveDocument(n,this.buildRootValueFromCache(n,r)||{},this.prepareContext(i),r).then(function(o){return D(D({},r),o.exportedVariables)})]:[2,D({},r)]})})},e.prototype.shouldForceResolvers=function(t){var n=!1;return Xt(t,{Directive:{enter:function(r){if(r.name.value==="client"&&r.arguments&&(n=r.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),n))return Co}}}),n},e.prototype.buildRootValueFromCache=function(t,n){return this.cache.diff({query:Op(t),variables:n,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,n){return an(this,arguments,void 0,function(r,i,a,o,s,c){var u,l,h,f,g,x,w,T,O,_,y;return a===void 0&&(a={}),o===void 0&&(o={}),s===void 0&&(s=function(){return!0}),c===void 0&&(c=!1),on(this,function(C){return u=$r(r),l=qi(r),h=Ai(l),f=this.collectSelectionsToResolve(u,h),g=u.operation,x=g?g.charAt(0).toUpperCase()+g.slice(1):"Query",w=this,T=w.cache,O=w.client,_={fragmentMap:h,context:D(D({},a),{cache:T,client:O}),variables:o,fragmentMatcher:s,defaultOperationType:x,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:c},y=!1,[2,this.resolveSelectionSet(u.selectionSet,y,i,_).then(function(S){return{result:S,exportedVariables:_.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,n,r,i){return an(this,void 0,void 0,function(){var a,o,s,c,u,l=this;return on(this,function(h){return a=i.fragmentMap,o=i.context,s=i.variables,c=[r],u=function(f){return an(l,void 0,void 0,function(){var g,x;return on(this,function(w){return!n&&!i.selectionsToResolve.has(f)?[2]:Fr(f,s)?ln(f)?[2,this.resolveField(f,n,r,i).then(function(T){var O;typeof T<"u"&&c.push((O={},O[un(f)]=T,O))})]:(ip(f)?g=f:(g=a[f.name.value],ie(g,18,f.name.value)),g&&g.typeCondition&&(x=g.typeCondition.name.value,i.fragmentMatcher(r,x,o))?[2,this.resolveSelectionSet(g.selectionSet,n,r,i).then(function(T){c.push(T)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(u)).then(function(){return Hi(c)})]})})},e.prototype.resolveField=function(t,n,r,i){return an(this,void 0,void 0,function(){var a,o,s,c,u,l,h,f,g,x=this;return on(this,function(w){return r?(a=i.variables,o=t.name.value,s=un(t),c=o!==s,u=r[s]||r[o],l=Promise.resolve(u),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(h=r.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[h],f&&(g=f[c?o:s],g&&(l=Promise.resolve($o.withValue(this.cache,g,[r,Vi(t,a),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,l.then(function(T){var O,_;if(T===void 0&&(T=u),t.directives&&t.directives.forEach(function(C){C.name.value==="export"&&C.arguments&&C.arguments.forEach(function(S){S.name.value==="as"&&S.value.kind==="StringValue"&&(i.exportedVariables[S.value.value]=T)})}),!t.selectionSet||T==null)return T;var y=(_=(O=t.directives)===null||O===void 0?void 0:O.some(function(C){return C.name.value==="client"}))!==null&&_!==void 0?_:!1;if(Array.isArray(T))return x.resolveSubSelectedArray(t,n||y,T,i);if(t.selectionSet)return x.resolveSelectionSet(t.selectionSet,n||y,T,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,n,r,i){var a=this;return Promise.all(r.map(function(o){if(o===null)return null;if(Array.isArray(o))return a.resolveSubSelectedArray(t,n,o,i);if(t.selectionSet)return a.resolveSelectionSet(t.selectionSet,n,o,i)}))},e.prototype.collectSelectionsToResolve=function(t,n){var r=function(o){return!Array.isArray(o)},i=this.selectionsToResolveCache;function a(o){if(!i.has(o)){var s=new Set;i.set(o,s),Xt(o,{Directive:function(c,u,l,h,f){c.name.value==="client"&&f.forEach(function(g){r(g)&&oc(g)&&s.add(g)})},FragmentSpread:function(c,u,l,h,f){var g=n[c.name.value];ie(g,19,c.name.value);var x=a(g);x.size>0&&(f.forEach(function(w){r(w)&&oc(w)&&s.add(w)}),s.add(c),x.forEach(function(w){s.add(w)}))}})}return i.get(o)}return a(t)},e}(),Kc=!1,uf=function(){function e(t){var n=this,r;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw vt(15);var i=t.uri,a=t.credentials,o=t.headers,s=t.cache,c=t.documentTransform,u=t.ssrMode,l=u===void 0?!1:u,h=t.ssrForceFetchDelay,f=h===void 0?0:h,g=t.connectToDevTools,x=t.queryDeduplication,w=x===void 0?!0:x,T=t.defaultOptions,O=t.defaultContext,_=t.assumeImmutableResults,y=_===void 0?s.assumeImmutableResults:_,C=t.resolvers,S=t.typeDefs,R=t.fragmentMatcher,P=t.name,F=t.version,U=t.devtools,V=t.link;V||(V=i?new yg({uri:i,credentials:a,headers:o}):Ur.empty()),this.link=V,this.cache=s,this.disableNetworkFetches=l||f>0,this.queryDeduplication=w,this.defaultOptions=T||Object.create(null),this.typeDefs=S,this.devtoolsConfig=D(D({},U),{enabled:(r=U==null?void 0:U.enabled)!==null&&r!==void 0?r:g}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),f&&setTimeout(function(){return n.disableNetworkFetches=!1},f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=Eo,this.localState=new Hg({cache:s,client:this,resolvers:C,fragmentMatcher:R}),this.queryManager=new Bg({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:O,documentTransform:c,queryDeduplication:w,ssrMode:l,clientAwareness:{name:P,version:F},localState:this.localState,assumeImmutableResults:y,onBroadcast:this.devtoolsConfig.enabled?function(){n.devToolsHookCb&&n.devToolsHookCb({action:{},state:{queries:n.queryManager.getQueryStore(),mutations:n.queryManager.mutationStore||{}},dataWithOptimisticResults:n.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this,!Kc&&globalThis.__DEV__!==!1&&(Kc=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var r=window.navigator,i=r&&r.userAgent,a=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?a="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(a="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),a&&globalThis.__DEV__!==!1&&ie.log("Download the Apollo DevTools for a better development experience: %s",a)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Qn(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=D(D({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=Qn(this.defaultOptions.query,t)),ie(t.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=D(D({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Qn(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},e.prototype.readQuery=function(t,n){return n===void 0&&(n=!1),this.cache.readQuery(t,n)},e.prototype.watchFragment=function(t){return this.cache.watchFragment(t)},e.prototype.readFragment=function(t,n){return n===void 0&&(n=!1),this.cache.readFragment(t,n)},e.prototype.writeQuery=function(t){var n=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.writeFragment=function(t){var n=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),n},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return Ya(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(n){return n()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(n){return n()}))})},e.prototype.onResetStore=function(t){var n=this;return this.resetStoreCallbacks.push(t),function(){n.resetStoreCallbacks=n.resetStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.onClearStore=function(t){var n=this;return this.clearStoreCallbacks.push(t),function(){n.clearStoreCallbacks=n.clearStoreCallbacks.filter(function(r){return r!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var n=this.queryManager.refetchQueries(t),r=[],i=[];n.forEach(function(o,s){r.push(s),i.push(o)});var a=Promise.all(i);return a.queries=r,a.results=i,a.catch(function(o){globalThis.__DEV__!==!1&&ie.debug(17,o)}),a},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();globalThis.__DEV__!==!1&&(uf.prototype.getMemoryInternals=Am);var gi=new Map,io=new Map,lf=!0,Si=!1;function ff(e){return e.replace(/[\s,]+/g," ").trim()}function zg(e){return ff(e.source.body.substring(e.start,e.end))}function Qg(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,a=zg(r.loc),o=io.get(i);o&&!o.has(a)?lf&&console.warn("Warning: fragment with name "+i+` already exists.
168
168
  graphql-tag enforces all fragment names across your application to be unique; read more about
169
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||io.set(i,o=new Set),o.add(a),t.has(a)||(t.add(a),n.push(r))}else n.push(r)}),D(D({},e),{definitions:n})}function Hg(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var a=r[i];a&&typeof a=="object"&&t.add(a)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function Gg(e){var t=ff(e);if(!gi.has(t)){var n=up(e,{experimentalFragmentVariables:Oi,allowLegacyFragmentVariables:Oi});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");gi.set(t,Hg(Qg(n)))}return gi.get(t)}function _t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,a){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[a+1]}),Gg(r)}function Yg(){gi.clear(),io.clear()}function Kg(){lf=!1}function Xg(){Oi=!0}function Jg(){Oi=!1}var br={gql:_t,resetCaches:Yg,disableFragmentWarnings:Kg,enableExperimentalFragmentVariables:Xg,disableExperimentalFragmentVariables:Jg};(function(e){e.gql=br.gql,e.resetCaches=br.resetCaches,e.disableFragmentWarnings=br.disableFragmentWarnings,e.enableExperimentalFragmentVariables=br.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=br.disableExperimentalFragmentVariables})(_t||(_t={}));_t.default=_t;var hf={exports:{}};(function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,E)})(hf);var Ce=hf.exports;const Zg=gu(Ce),df=xh({__proto__:null,default:Zg},[Ce]);var Xc=_o?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function Wo(){ie("createContext"in df,46);var e=Ce.createContext[Xc];return e||(Object.defineProperty(Ce.createContext,Xc,{value:e=Ce.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var ev=function(e){var t=e.client,n=e.children,r=Wo(),i=Ce.useContext(r),a=Ce.useMemo(function(){return D(D({},i),{client:t||i.client})},[i,t]);return ie(a.client,47),Ce.createElement(r.Provider,{value:a},n)};function pf(e){var t=Ce.useContext(Wo()),n=e||t.client;return ie(!!n,50),n}var Jc=!1,tv="useSyncExternalStore",nv=df[tv],rv=nv||function(e,t,n){var r=t();globalThis.__DEV__!==!1&&!Jc&&r!==t()&&(Jc=!0,globalThis.__DEV__!==!1&&ie.error(60));var i=Ce.useState({inst:{value:r,getSnapshot:t}}),a=i[0].inst,o=i[1];return _p?Ce.useLayoutEffect(function(){Object.assign(a,{value:r,getSnapshot:t}),La(a)&&o({inst:a})},[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),Ce.useEffect(function(){return La(a)&&o({inst:a}),e(function(){La(a)&&o({inst:a})})},[e]),r};function La(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch{return!0}}var Kt;(function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"})(Kt||(Kt={}));var xn;function Zc(e){var t;switch(e){case Kt.Query:t="Query";break;case Kt.Mutation:t="Mutation";break;case Kt.Subscription:t="Subscription";break}return t}function mf(e){xn||(xn=new ko(zt.parser||1e3));var t=xn.get(e);if(t)return t;var n,r,i;ie(!!e&&!!e.kind,62,e);for(var a=[],o=[],s=[],c=[],u=0,l=e.definitions;u<l.length;u++){var d=l[u];if(d.kind==="FragmentDefinition"){a.push(d);continue}if(d.kind==="OperationDefinition")switch(d.operation){case"query":o.push(d);break;case"mutation":s.push(d);break;case"subscription":c.push(d);break}}ie(!a.length||o.length||s.length||c.length,63),ie(o.length+s.length+c.length<=1,64,e,o.length,c.length,s.length),r=o.length?Kt.Query:Kt.Mutation,!o.length&&!s.length&&(r=Kt.Subscription);var f=o.length?o:s.length?s:c;ie(f.length===1,65,e,f.length);var g=f[0];n=g.variableDefinitions||[],g.name&&g.name.kind==="Name"?i=g.name.value:i="data";var x={name:i,type:r,variables:n};return xn.set(e,x),x}mf.resetCache=function(){xn=void 0};globalThis.__DEV__!==!1&&Do("parser",function(){return xn?xn.size:0});function iv(e,t){var n=mf(e),r=Zc(t),i=Zc(n.type);ie(n.type===t,66,r,r,i)}var av=dl?Ce.useLayoutEffect:Ce.useEffect,ov=Symbol.for("apollo.hook.wrappers");function sv(e,t,n){var r=n.queryManager,i=r&&r[ov],a=i&&i[e];return a?a(t):t}var cv=Object.prototype.hasOwnProperty;function eu(){}var vi=Symbol();function gf(e,t){return t===void 0&&(t=Object.create(null)),sv("useQuery",uv,pf(t&&t.client))(e,t)}function uv(e,t){var n=vf(e,t),r=n.result,i=n.obsQueryFields;return Ce.useMemo(function(){return D(D({},r),i)},[r,i])}function lv(e,t,n,r,i){function a(d){var f;iv(t,Kt.Query);var g={client:e,query:t,observable:r&&r.getSSRObservable(i())||e.watchQuery(Qo(void 0,e,n,i())),resultData:{previousData:(f=d==null?void 0:d.resultData.current)===null||f===void 0?void 0:f.data}};return g}var o=Ce.useState(a),s=o[0],c=o[1];function u(d){var f,g;Object.assign(s.observable,(f={},f[vi]=d,f));var x=s.resultData;c(D(D({},s),{query:d.query,resultData:Object.assign(x,{previousData:((g=x.current)===null||g===void 0?void 0:g.data)||x.previousData,current:void 0})}))}if(e!==s.client||t!==s.query){var l=a(s);return c(l),[l,u]}return[s,u]}function vf(e,t){var n=pf(t.client),r=Ce.useContext(Wo()).renderPromises,i=!!r,a=n.disableNetworkFetches,o=t.ssr!==!1&&!t.skip,s=t.partialRefetch,c=yf(n,e,t,i),u=lv(n,e,t,r,c),l=u[0],d=l.observable,f=l.resultData,g=u[1],x=c(d);dv(f,d,n,t,x);var w=Ce.useMemo(function(){return vv(d)},[d]);hv(d,r,o);var T=fv(f,d,n,t,x,a,s,i,{onCompleted:t.onCompleted||eu,onError:t.onError||eu});return{result:T,obsQueryFields:w,observable:d,resultData:f,client:n,onQueryExecuted:g}}function fv(e,t,n,r,i,a,o,s,c){var u=Ce.useRef(c);Ce.useEffect(function(){u.current=c});var l=(s||a)&&r.ssr===!1&&!r.skip?bf:r.skip||i.fetchPolicy==="standby"?xf:void 0,d=e.previousData,f=Ce.useMemo(function(){return l&&Si(l,d,t,n)},[n,t,l,d]);return rv(Ce.useCallback(function(g){if(s)return function(){};var x=function(){var S=e.current,_=t.getCurrentResult();S&&S.loading===_.loading&&S.networkStatus===_.networkStatus&&je(S.data,_.data)||ao(_,e,t,n,o,g,u.current)},w=function(S){if(T.current.unsubscribe(),T.current=t.resubscribeAfterError(x,w),!cv.call(S,"graphQLErrors"))throw S;var _=e.current;(!_||_&&_.loading||!je(S,_.error))&&ao({data:_&&_.data,error:S,loading:!1,networkStatus:Se.error},e,t,n,o,g,u.current)},T={current:t.subscribe(x,w)};return function(){setTimeout(function(){return T.current.unsubscribe()})}},[a,s,t,e,o,n]),function(){return f||tu(e,t,u.current,o,n)},function(){return f||tu(e,t,u.current,o,n)})}function hv(e,t,n){t&&n&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}function dv(e,t,n,r,i){var a;t[vi]&&!je(t[vi],i)&&(t.reobserve(Qo(t,n,r,i)),e.previousData=((a=e.current)===null||a===void 0?void 0:a.data)||e.previousData,e.current=void 0),t[vi]=i}function yf(e,t,n,r){n===void 0&&(n={});var i=n.skip;n.ssr,n.onCompleted,n.onError;var a=n.defaultOptions,o=Vt(n,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(s){var c=Object.assign(o,{query:t});return r&&(c.fetchPolicy==="network-only"||c.fetchPolicy==="cache-and-network")&&(c.fetchPolicy="cache-first"),c.variables||(c.variables={}),i?(c.initialFetchPolicy=c.initialFetchPolicy||c.fetchPolicy||oo(a,e.defaultOptions),c.fetchPolicy="standby"):c.fetchPolicy||(c.fetchPolicy=(s==null?void 0:s.options.initialFetchPolicy)||oo(a,e.defaultOptions)),c}}function Qo(e,t,n,r){var i=[],a=t.defaultOptions.watchQuery;return a&&i.push(a),n.defaultOptions&&i.push(n.defaultOptions),i.push(wn(e&&e.options,r)),i.reduce(Qn)}function ao(e,t,n,r,i,a,o){var s=t.current;s&&s.data&&(t.previousData=s.data),!e.error&&Dt(e.errors)&&(e.error=new Yt({graphQLErrors:e.errors})),t.current=Si(gv(e,n,i),t.previousData,n,r),a(),pv(e,s==null?void 0:s.networkStatus,o)}function pv(e,t,n){if(!e.loading){var r=mv(e);Promise.resolve().then(function(){r?n.onError(r):e.data&&t!==e.networkStatus&&e.networkStatus===Se.ready&&n.onCompleted(e.data)}).catch(function(i){globalThis.__DEV__!==!1&&ie.warn(i)})}}function tu(e,t,n,r,i){return e.current||ao(t.getCurrentResult(),e,t,i,r,function(){},n),e.current}function oo(e,t){var n;return(e==null?void 0:e.fetchPolicy)||((n=t==null?void 0:t.watchQuery)===null||n===void 0?void 0:n.fetchPolicy)||"cache-first"}function mv(e){return Dt(e.errors)?new Yt({graphQLErrors:e.errors}):e.error}function Si(e,t,n,r){var i=e.data;e.partial;var a=Vt(e,["data","partial"]),o=D(D({data:i},a),{client:r,observable:n,variables:n.variables,called:e!==bf&&e!==xf,previousData:t});return o}function gv(e,t,n){return e.partial&&n&&!e.loading&&(!e.data||Object.keys(e.data).length===0)&&t.options.fetchPolicy!=="cache-only"?(t.refetch(),D(D({},e),{loading:!0,networkStatus:Se.refetch})):e}var bf=Ir({loading:!0,data:void 0,error:void 0,networkStatus:Se.loading}),xf=Ir({loading:!1,data:void 0,error:void 0,networkStatus:Se.ready});function vv(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}var yv=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function xr(e,t){var n,r=Ce.useRef(),i=Ce.useRef(),a=Ce.useRef(),o=Qn(t,r.current||{}),s=(n=o==null?void 0:o.query)!==null&&n!==void 0?n:e;i.current=t,a.current=s;var c=D(D({},o),{skip:!r.current}),u=vf(s,c),l=u.obsQueryFields,d=u.result,f=u.client,g=u.resultData,x=u.observable,w=u.onQueryExecuted,T=x.options.initialFetchPolicy||oo(c.defaultOptions,f.defaultOptions),S=Ce.useReducer(function(F){return F+1},0)[1],_=Ce.useMemo(function(){for(var F={},U=function(ve){var we=l[ve];F[ve]=function(){return r.current||(r.current=Object.create(null),S()),we.apply(this,arguments)}},V=0,ye=yv;V<ye.length;V++){var _e=ye[V];U(_e)}return F},[S,l]),y=!!r.current,C=Ce.useMemo(function(){return D(D(D({},d),_),{called:y})},[d,_,y]),O=Ce.useCallback(function(F){r.current=F?D(D({},F),{fetchPolicy:F.fetchPolicy||T}):{fetchPolicy:T};var U=Qn(i.current,D({query:a.current},r.current)),V=bv(g,x,f,s,D(D({},U),{skip:!1}),w).then(function(ye){return Object.assign(ye,_)});return V.catch(function(){}),V},[f,s,_,T,x,g,w]),R=Ce.useRef(O);av(function(){R.current=O});var P=Ce.useCallback(function(){for(var F=[],U=0;U<arguments.length;U++)F[U]=arguments[U];return R.current.apply(R,F)},[]);return[P,C]}function bv(e,t,n,r,i,a){var o=i.query||r,s=yf(n,o,i,!1)(t),c=t.reobserveAsConcast(Qo(t,n,i,s));return a(s),new Promise(function(u){var l;c.subscribe({next:function(d){l=d},error:function(){u(Si(t.getCurrentResult(),e.previousData,t,n))},complete:function(){u(Si(l,e.previousData,t,n))}})})}const xv=`
169
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||io.set(i,o=new Set),o.add(a),t.has(a)||(t.add(a),n.push(r))}else n.push(r)}),D(D({},e),{definitions:n})}function Wg(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var a=r[i];a&&typeof a=="object"&&t.add(a)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function Gg(e){var t=ff(e);if(!gi.has(t)){var n=um(e,{experimentalFragmentVariables:Si,allowLegacyFragmentVariables:Si});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");gi.set(t,Wg(Qg(n)))}return gi.get(t)}function _t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,a){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[a+1]}),Gg(r)}function Yg(){gi.clear(),io.clear()}function Kg(){lf=!1}function Xg(){Si=!0}function Jg(){Si=!1}var br={gql:_t,resetCaches:Yg,disableFragmentWarnings:Kg,enableExperimentalFragmentVariables:Xg,disableExperimentalFragmentVariables:Jg};(function(e){e.gql=br.gql,e.resetCaches=br.resetCaches,e.disableFragmentWarnings=br.disableFragmentWarnings,e.enableExperimentalFragmentVariables=br.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=br.disableExperimentalFragmentVariables})(_t||(_t={}));_t.default=_t;var hf={exports:{}};(function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,E)})(hf);var Ce=hf.exports;const Zg=gu(Ce),df=xh({__proto__:null,default:Zg},[Ce]);var Xc=_o?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function zo(){ie("createContext"in df,46);var e=Ce.createContext[Xc];return e||(Object.defineProperty(Ce.createContext,Xc,{value:e=Ce.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var ev=function(e){var t=e.client,n=e.children,r=zo(),i=Ce.useContext(r),a=Ce.useMemo(function(){return D(D({},i),{client:t||i.client})},[i,t]);return ie(a.client,47),Ce.createElement(r.Provider,{value:a},n)};function mf(e){var t=Ce.useContext(zo()),n=e||t.client;return ie(!!n,50),n}var Jc=!1,tv="useSyncExternalStore",nv=df[tv],rv=nv||function(e,t,n){var r=t();globalThis.__DEV__!==!1&&!Jc&&r!==t()&&(Jc=!0,globalThis.__DEV__!==!1&&ie.error(60));var i=Ce.useState({inst:{value:r,getSnapshot:t}}),a=i[0].inst,o=i[1];return _m?Ce.useLayoutEffect(function(){Object.assign(a,{value:r,getSnapshot:t}),La(a)&&o({inst:a})},[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),Ce.useEffect(function(){return La(a)&&o({inst:a}),e(function(){La(a)&&o({inst:a})})},[e]),r};function La(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch{return!0}}var Kt;(function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"})(Kt||(Kt={}));var xn;function Zc(e){var t;switch(e){case Kt.Query:t="Query";break;case Kt.Mutation:t="Mutation";break;case Kt.Subscription:t="Subscription";break}return t}function pf(e){xn||(xn=new ko(Ht.parser||1e3));var t=xn.get(e);if(t)return t;var n,r,i;ie(!!e&&!!e.kind,62,e);for(var a=[],o=[],s=[],c=[],u=0,l=e.definitions;u<l.length;u++){var h=l[u];if(h.kind==="FragmentDefinition"){a.push(h);continue}if(h.kind==="OperationDefinition")switch(h.operation){case"query":o.push(h);break;case"mutation":s.push(h);break;case"subscription":c.push(h);break}}ie(!a.length||o.length||s.length||c.length,63),ie(o.length+s.length+c.length<=1,64,e,o.length,c.length,s.length),r=o.length?Kt.Query:Kt.Mutation,!o.length&&!s.length&&(r=Kt.Subscription);var f=o.length?o:s.length?s:c;ie(f.length===1,65,e,f.length);var g=f[0];n=g.variableDefinitions||[],g.name&&g.name.kind==="Name"?i=g.name.value:i="data";var x={name:i,type:r,variables:n};return xn.set(e,x),x}pf.resetCache=function(){xn=void 0};globalThis.__DEV__!==!1&&Do("parser",function(){return xn?xn.size:0});function iv(e,t){var n=pf(e),r=Zc(t),i=Zc(n.type);ie(n.type===t,66,r,r,i)}var av=dl?Ce.useLayoutEffect:Ce.useEffect,ov=Symbol.for("apollo.hook.wrappers");function sv(e,t,n){var r=n.queryManager,i=r&&r[ov],a=i&&i[e];return a?a(t):t}var cv=Object.prototype.hasOwnProperty;function eu(){}var vi=Symbol();function gf(e,t){return t===void 0&&(t=Object.create(null)),sv("useQuery",uv,mf(t&&t.client))(e,t)}function uv(e,t){var n=vf(e,t),r=n.result,i=n.obsQueryFields;return Ce.useMemo(function(){return D(D({},r),i)},[r,i])}function lv(e,t,n,r,i){function a(h){var f;iv(t,Kt.Query);var g={client:e,query:t,observable:r&&r.getSSRObservable(i())||e.watchQuery(Qo(void 0,e,n,i())),resultData:{previousData:(f=h==null?void 0:h.resultData.current)===null||f===void 0?void 0:f.data}};return g}var o=Ce.useState(a),s=o[0],c=o[1];function u(h){var f,g;Object.assign(s.observable,(f={},f[vi]=h,f));var x=s.resultData;c(D(D({},s),{query:h.query,resultData:Object.assign(x,{previousData:((g=x.current)===null||g===void 0?void 0:g.data)||x.previousData,current:void 0})}))}if(e!==s.client||t!==s.query){var l=a(s);return c(l),[l,u]}return[s,u]}function vf(e,t){var n=mf(t.client),r=Ce.useContext(zo()).renderPromises,i=!!r,a=n.disableNetworkFetches,o=t.ssr!==!1&&!t.skip,s=t.partialRefetch,c=yf(n,e,t,i),u=lv(n,e,t,r,c),l=u[0],h=l.observable,f=l.resultData,g=u[1],x=c(h);dv(f,h,n,t,x);var w=Ce.useMemo(function(){return vv(h)},[h]);hv(h,r,o);var T=fv(f,h,n,t,x,a,s,i,{onCompleted:t.onCompleted||eu,onError:t.onError||eu});return{result:T,obsQueryFields:w,observable:h,resultData:f,client:n,onQueryExecuted:g}}function fv(e,t,n,r,i,a,o,s,c){var u=Ce.useRef(c);Ce.useEffect(function(){u.current=c});var l=(s||a)&&r.ssr===!1&&!r.skip?bf:r.skip||i.fetchPolicy==="standby"?xf:void 0,h=e.previousData,f=Ce.useMemo(function(){return l&&Oi(l,h,t,n)},[n,t,l,h]);return rv(Ce.useCallback(function(g){if(s)return function(){};var x=function(){var O=e.current,_=t.getCurrentResult();O&&O.loading===_.loading&&O.networkStatus===_.networkStatus&&je(O.data,_.data)||ao(_,e,t,n,o,g,u.current)},w=function(O){if(T.current.unsubscribe(),T.current=t.resubscribeAfterError(x,w),!cv.call(O,"graphQLErrors"))throw O;var _=e.current;(!_||_&&_.loading||!je(O,_.error))&&ao({data:_&&_.data,error:O,loading:!1,networkStatus:Oe.error},e,t,n,o,g,u.current)},T={current:t.subscribe(x,w)};return function(){setTimeout(function(){return T.current.unsubscribe()})}},[a,s,t,e,o,n]),function(){return f||tu(e,t,u.current,o,n)},function(){return f||tu(e,t,u.current,o,n)})}function hv(e,t,n){t&&n&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}function dv(e,t,n,r,i){var a;t[vi]&&!je(t[vi],i)&&(t.reobserve(Qo(t,n,r,i)),e.previousData=((a=e.current)===null||a===void 0?void 0:a.data)||e.previousData,e.current=void 0),t[vi]=i}function yf(e,t,n,r){n===void 0&&(n={});var i=n.skip;n.ssr,n.onCompleted,n.onError;var a=n.defaultOptions,o=Vt(n,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(s){var c=Object.assign(o,{query:t});return r&&(c.fetchPolicy==="network-only"||c.fetchPolicy==="cache-and-network")&&(c.fetchPolicy="cache-first"),c.variables||(c.variables={}),i?(c.initialFetchPolicy=c.initialFetchPolicy||c.fetchPolicy||oo(a,e.defaultOptions),c.fetchPolicy="standby"):c.fetchPolicy||(c.fetchPolicy=(s==null?void 0:s.options.initialFetchPolicy)||oo(a,e.defaultOptions)),c}}function Qo(e,t,n,r){var i=[],a=t.defaultOptions.watchQuery;return a&&i.push(a),n.defaultOptions&&i.push(n.defaultOptions),i.push(wn(e&&e.options,r)),i.reduce(Qn)}function ao(e,t,n,r,i,a,o){var s=t.current;s&&s.data&&(t.previousData=s.data),!e.error&&Dt(e.errors)&&(e.error=new Yt({graphQLErrors:e.errors})),t.current=Oi(gv(e,n,i),t.previousData,n,r),a(),mv(e,s==null?void 0:s.networkStatus,o)}function mv(e,t,n){if(!e.loading){var r=pv(e);Promise.resolve().then(function(){r?n.onError(r):e.data&&t!==e.networkStatus&&e.networkStatus===Oe.ready&&n.onCompleted(e.data)}).catch(function(i){globalThis.__DEV__!==!1&&ie.warn(i)})}}function tu(e,t,n,r,i){return e.current||ao(t.getCurrentResult(),e,t,i,r,function(){},n),e.current}function oo(e,t){var n;return(e==null?void 0:e.fetchPolicy)||((n=t==null?void 0:t.watchQuery)===null||n===void 0?void 0:n.fetchPolicy)||"cache-first"}function pv(e){return Dt(e.errors)?new Yt({graphQLErrors:e.errors}):e.error}function Oi(e,t,n,r){var i=e.data;e.partial;var a=Vt(e,["data","partial"]),o=D(D({data:i},a),{client:r,observable:n,variables:n.variables,called:e!==bf&&e!==xf,previousData:t});return o}function gv(e,t,n){return e.partial&&n&&!e.loading&&(!e.data||Object.keys(e.data).length===0)&&t.options.fetchPolicy!=="cache-only"?(t.refetch(),D(D({},e),{loading:!0,networkStatus:Oe.refetch})):e}var bf=Ir({loading:!0,data:void 0,error:void 0,networkStatus:Oe.loading}),xf=Ir({loading:!1,data:void 0,error:void 0,networkStatus:Oe.ready});function vv(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}var yv=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function xr(e,t){var n,r=Ce.useRef(),i=Ce.useRef(),a=Ce.useRef(),o=Qn(t,r.current||{}),s=(n=o==null?void 0:o.query)!==null&&n!==void 0?n:e;i.current=t,a.current=s;var c=D(D({},o),{skip:!r.current}),u=vf(s,c),l=u.obsQueryFields,h=u.result,f=u.client,g=u.resultData,x=u.observable,w=u.onQueryExecuted,T=x.options.initialFetchPolicy||oo(c.defaultOptions,f.defaultOptions),O=Ce.useReducer(function(F){return F+1},0)[1],_=Ce.useMemo(function(){for(var F={},U=function(ve){var we=l[ve];F[ve]=function(){return r.current||(r.current=Object.create(null),O()),we.apply(this,arguments)}},V=0,ye=yv;V<ye.length;V++){var _e=ye[V];U(_e)}return F},[O,l]),y=!!r.current,C=Ce.useMemo(function(){return D(D(D({},h),_),{called:y})},[h,_,y]),S=Ce.useCallback(function(F){r.current=F?D(D({},F),{fetchPolicy:F.fetchPolicy||T}):{fetchPolicy:T};var U=Qn(i.current,D({query:a.current},r.current)),V=bv(g,x,f,s,D(D({},U),{skip:!1}),w).then(function(ye){return Object.assign(ye,_)});return V.catch(function(){}),V},[f,s,_,T,x,g,w]),R=Ce.useRef(S);av(function(){R.current=S});var P=Ce.useCallback(function(){for(var F=[],U=0;U<arguments.length;U++)F[U]=arguments[U];return R.current.apply(R,F)},[]);return[P,C]}function bv(e,t,n,r,i,a){var o=i.query||r,s=yf(n,o,i,!1)(t),c=t.reobserveAsConcast(Qo(t,n,i,s));return a(s),new Promise(function(u){var l;c.subscribe({next:function(h){l=h},error:function(){u(Oi(t.getCurrentResult(),e.previousData,t,n))},complete:function(){u(Oi(l,e.previousData,t,n))}})})}const xv=`
170
170
  query SNP($assembly: String!, $coordinates: [GenomicRangeInput]) {
171
171
  snpQuery(assembly: $assembly, coordinates: $coordinates, common: true) {
172
172
  id
@@ -195,7 +195,7 @@ query LD($assembly: String!, $snpids: [String!]) {
195
195
  `)}
196
196
  }
197
197
  }
198
- `,Ef={titleSize:12,ldThreshold:.7,displayMode:Fe.FULL,canDrag:!0};function wf(e){var c,u;const t=E.useContext(qt),n={...e,trackType:X.LDTRACK,displayMode:e.displayMode},r=Ev(Xs),i=gf(_t(r),{variables:{assembly:"GRCh38",snpids:[e.anchor]}}),a=l=>{t({type:le.UPDATE_PROPS,id:e.id||"",props:{anchor:l.id}})},o=Xs.map(l=>{var d;return{ld:((d=i.data)==null?void 0:d.snpQuery[0][`${l.population}_${l.subpopulation||""}_ld`])||[]}}),s={snps:((c=e.data)==null?void 0:c.snps)||[],ld:o&&((u=o[0])==null?void 0:u.ld)||[]};switch(e.displayMode){case Fe.FULL:return p.jsx(tt,{...n,loading:i.loading,trackType:X.LDTRACK,displayMode:e.displayMode,children:p.jsx(D0,{...e,onVariantMouseOver:l=>{a(l),e.onVariantMouseOver&&e.onVariantMouseOver(l)},data:s})});default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),p.jsx(tt,{...n,children:p.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}const wv=e=>{const t=e.width<1e3?e.width/8:150,n={...e,height:0,marginSize:t,menuHeight:0,preRenderedWidth:e.width-t,zoomLevel:1,delta:0,highlights:e.highlights||[],tracks:e.tracks||[]};return E.useReducer(Td,n)};var nu=Object.prototype.hasOwnProperty;function ru(e,t,n){for(n of e.keys())if(Cr(n,t))return n}function Cr(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Cr(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=ru(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=ru(t,i),!i)||!Cr(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(nu.call(e,n)&&++r&&!nu.call(t,n)||!(n in t)||!Cr(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Ov(e){if(!e||!e.length)throw new Error("useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.");if(e.every(Sv))throw new Error("useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead.")}function Sv(e){return e==null||/^[sbn]/.test(typeof e)}function Tv(e){var t=ci.useRef(e),n=ci.useRef(0);return Cr(e,t.current)||(t.current=e,n.current+=1),ci.useMemo(function(){return t.current},[n.current])}function Cv(e,t){return process.env.NODE_ENV!=="production"&&Ov(t),ci.useEffect(e,Tv(t))}function _v(){const[e,t]=E.useState(null);return{openModal:e,showModal:(i,a,o)=>{t({trackId:i,mouseX:a,mouseY:o})},closeModal:()=>{t(null)}}}function Ti(e,t,n){const[r,i]=E.useState(e),[a,o]=E.useState(n(t)),[s,c]=E.useState(null);return{value:r,valid:a,onChange:l=>{const d=l.target.value,f=d===""?2e3:750;i(d),o(!1),s&&clearTimeout(s);const g=setTimeout(()=>{n(d)||i(t),o(!0)},f);c(g)}}}function Wi({children:e}){return p.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",paddingBlock:"5px"},children:e})}const kv={position:"fixed",top:"0%",left:"0%",boxShadow:"0 0 10px rgba(0, 0, 0, 0.3)",width:"500px",transform:"translate(-50%, -50%)",background:"#ffffff"},Ci={width:"auto",outline:"#ffffff",border:"1px solid #000000",borderRadius:"2px",paddingRight:"5px"},iu={display:"flex",flexDirection:"column",paddingInline:"5px"},_i={WebkitAppearance:"none",margin:"0"},ki={MozAppearance:"textfield",appearance:"textfield"};function au(e){switch(e.trackType){case X.BIGWIG:return e.actualHeight;case X.BIGBED:case X.TRANSCRIPT:return e.rowHeight;default:return e.height}}function Dv({track:e}){const t=E.useContext(Sn),n=E.useContext(qt),[r,i]=E.useState(t.tracks.find(l=>l.id===e.id)||e),[a,o]=E.useState(au(r));E.useEffect(()=>{i(t.tracks.find(l=>l.id===e.id)||e),o(au(r))},[e]);const{value:s,valid:c,onChange:u}=Ti((a==null?void 0:a.toString())||"",(a==null?void 0:a.toString())||"",r.trackType===X.BIGWIG?Mv:Lv);return E.useEffect(()=>{c&&(r.trackType===X.BIGWIG?n({type:le.UPDATE_TRACK,id:r.id,track:{height:parseInt(s)}}):(r.trackType===X.BIGBED||r.trackType===X.TRANSCRIPT)&&n({type:le.UPDATE_TRACK,id:r.id,track:{rowHeight:parseInt(s)}}))},[s,c]),p.jsxs(Wi,{children:[r.trackType===X.BIGWIG?"Height: ":"Row Height: ",p.jsx("input",{id:"heightInput",style:{...Ci,..._i,...ki},type:"number",placeholder:(a==null?void 0:a.toString())||"",value:s,onChange:u})]})}function Of(e){const t=document.getElementById("heightInput");return t?e.length===0?(t.setCustomValidity("Empty input"),t.reportValidity(),!1):isNaN(parseInt(e))?(t.setCustomValidity("Invalid input"),t.reportValidity(),!1):!0:!0}function Mv(e){if(!Of(e))return!1;const t=document.getElementById("heightInput");return t&&parseInt(e)<50?(t.setCustomValidity("Value must be greater than or equal to 50"),t.reportValidity(),!1):!0}function Lv(e){if(!Of(e))return!1;const t=document.getElementById("heightInput");return t&&parseInt(e)<10?(t.setCustomValidity("Value must be greater than or equal to 10"),t.reportValidity(),!1):!0}const Iv=(e,t,n)=>{if(!n)return!1;const r=document.querySelector('input[id="minInput"]'),i=document.querySelector('input[id="maxInput"]');return!r||!i?!0:e>t?(r.setCustomValidity("Minimum value cannot be greater than maximum value."),r.reportValidity(),!0):e==t?(i.setCustomValidity("Values are equal. Please enter different values."),i.reportValidity(),!0):e<n.min?(r.setCustomValidity("Minimum value cannot be less than the default minimum value."),r.reportValidity(),!0):t>n.max?(i.setCustomValidity("Maximum value cannot be greater than the default maximum value."),i.reportValidity(),!0):!1};function Rv({track:e}){var g,x,w,T,S,_;const t=E.useContext(qt),[n]=E.useState(((g=e.props)==null?void 0:g.defaultRange)||{min:0,max:0}),[r]=E.useState(((x=e.props)==null?void 0:x.range)||n),i=y=>{const C=document.getElementById("minInput");return C?y.length===0||isNaN(parseFloat(y))?(C.setCustomValidity("Empty input, using default value"),C.reportValidity(),!1):parseFloat(y)<n.min?(C.setCustomValidity("Value must be greater than or equal to "+n.min),C.reportValidity(),!1):(C.setCustomValidity(""),!0):!0},a=y=>{const C=document.getElementById("maxInput");return C?y.length===0||isNaN(parseFloat(y))?(C.setCustomValidity("Empty input, using default value"),C.reportValidity(),!1):parseFloat(y)>n.max?(C.setCustomValidity("Value must be less than or equal to "+n.max),C.reportValidity(),!1):(C.setCustomValidity(""),!0):!0},{value:o,valid:s,onChange:c}=Ti(r.min.toString(),n.min.toString(),i),{value:u,valid:l,onChange:d}=Ti(r.max.toString(),n.max.toString(),a),f=y=>{y.target.select()};return E.useEffect(()=>{!s||!l||Iv(parseFloat(o),parseFloat(u),n)||t({type:le.UPDATE_PROPS,id:e.id,props:{range:{min:parseFloat(o),max:parseFloat(u)}}})},[s,l,o,u]),p.jsxs(Wi,{children:[p.jsxs("label",{style:iu,children:["Minimum:",p.jsx("input",{id:"minInput",style:{...Ci,..._i,...ki},step:"0.01",type:"number",placeholder:(T=(w=e==null?void 0:e.props)==null?void 0:w.defaultRange)==null?void 0:T.min.toFixed(2),value:Number(o).toFixed(2),onFocus:f,onChange:c})]}),p.jsxs("label",{style:iu,children:["Maximum:",p.jsx("input",{id:"maxInput",style:{...Ci,..._i,...ki},step:"0.01",type:"number",placeholder:(_=(S=e==null?void 0:e.props)==null?void 0:S.defaultRange)==null?void 0:_.max.toFixed(2),value:Number(u).toFixed(2),onChange:d,onFocus:f})]})]})}function jv({track:e}){const t=E.useContext(qt),[n,r]=E.useState(e.version);E.useEffect(()=>{r(e.version)},[e.version]);const i=s=>{r(s);const c=Object.values(bi).includes(s);t({type:le.UPDATE_TRACK,id:e.id,track:{version:s,assembly:c?"GRCH38":"mm10"}})},a=s=>({backgroundColor:n===s?e.color:"#858585",color:"white",marginRight:"5px",padding:"10px",border:"none",borderRadius:"5px",cursor:"pointer"}),o=e.assembly.toLowerCase()==="grch38";return p.jsx(Wi,{children:p.jsxs("div",{children:[p.jsx("div",{children:o?"Human Assembly Version":"Mouse Assembly Version"}),Object.values(o?bi:go).filter(s=>!isNaN(Number(s))).map((s,c)=>p.jsx("button",{onClick:()=>i(Number(s)),style:a(Number(s)),children:s},c))]})})}function Qi(){return(Qi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Sf(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function so(e){var t=E.useRef(e),n=E.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Pr=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},_r=function(e){return"touches"in e},co=function(e){return e&&e.ownerDocument.defaultView||self},ou=function(e,t,n){var r=e.getBoundingClientRect(),i=_r(t)?function(a,o){for(var s=0;s<a.length;s++)if(a[s].identifier===o)return a[s];return a[0]}(t.touches,n):t;return{left:Pr((i.pageX-(r.left+co(e).pageXOffset))/r.width),top:Pr((i.pageY-(r.top+co(e).pageYOffset))/r.height)}},su=function(e){!_r(e)&&e.preventDefault()},Tf=E.memo(function(e){var t=e.onMove,n=e.onKey,r=Sf(e,["onMove","onKey"]),i=E.useRef(null),a=so(t),o=so(n),s=E.useRef(null),c=E.useRef(!1),u=E.useMemo(function(){var g=function(T){su(T),(_r(T)?T.touches.length>0:T.buttons>0)&&i.current?a(ou(i.current,T,s.current)):w(!1)},x=function(){return w(!1)};function w(T){var S=c.current,_=co(i.current),y=T?_.addEventListener:_.removeEventListener;y(S?"touchmove":"mousemove",g),y(S?"touchend":"mouseup",x)}return[function(T){var S=T.nativeEvent,_=i.current;if(_&&(su(S),!function(C,O){return O&&!_r(C)}(S,c.current)&&_)){if(_r(S)){c.current=!0;var y=S.changedTouches||[];y.length&&(s.current=y[0].identifier)}_.focus(),a(ou(_,S,s.current)),w(!0)}},function(T){var S=T.which||T.keyCode;S<37||S>40||(T.preventDefault(),o({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},w]},[o,a]),l=u[0],d=u[1],f=u[2];return E.useEffect(function(){return f},[f]),E.createElement("div",Qi({},r,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),Ho=function(e){return e.filter(Boolean).join(" ")},Cf=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,a=Ho(["react-colorful__pointer",e.className]);return E.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},E.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ht=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Pv=function(e){return qv(uo(e))},uo=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ht(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ht(parseInt(e.substring(6,8),16)/255,2):1}},Nv=function(e){return Vv(Fv(e))},Av=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ht(e.h),s:ht(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ht(i/2),a:ht(r,2)}},lo=function(e){var t=Av(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Fv=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),u=a%6;return{r:ht(255*[r,s,o,o,c,r][u]),g:ht(255*[c,r,r,s,o,o][u]),b:ht(255*[o,o,c,r,r,s][u]),a:ht(i,2)}},si=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Vv=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?si(ht(255*i)):"";return"#"+si(t)+si(n)+si(r)+a},qv=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:ht(60*(s<0?s+6:s)),s:ht(a?o/a*100:0),v:ht(a/255*100),a:i}},$v=E.memo(function(e){var t=e.hue,n=e.onChange,r=Ho(["react-colorful__hue",e.className]);return E.createElement("div",{className:r},E.createElement(Tf,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Pr(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ht(t),"aria-valuemax":"360","aria-valuemin":"0"},E.createElement(Cf,{className:"react-colorful__hue-pointer",left:t/360,color:lo({h:t,s:100,v:100,a:1})})))}),Uv=E.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:lo({h:t.h,s:100,v:100,a:1})};return E.createElement("div",{className:"react-colorful__saturation",style:r},E.createElement(Tf,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Pr(t.s+100*i.left,0,100),v:Pr(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ht(t.s)+"%, Brightness "+ht(t.v)+"%"},E.createElement(Cf,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:lo(t)})))}),_f=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Bv=function(e,t){return e.toLowerCase()===t.toLowerCase()||_f(uo(e),uo(t))};function zv(e,t,n){var r=so(n),i=E.useState(function(){return e.toHsva(t)}),a=i[0],o=i[1],s=E.useRef({color:t,hsva:a});E.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},o(u)}},[t,e]),E.useEffect(function(){var u;_f(a,s.current.hsva)||e.equal(u=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:u},r(u))},[a,e,r]);var c=E.useCallback(function(u){o(function(l){return Object.assign({},l,u)})},[]);return[a,c]}var Wv=typeof window<"u"?E.useLayoutEffect:E.useEffect,Qv=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},cu=new Map,Hv=function(e){Wv(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!cu.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,cu.set(t,n);var r=Qv();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Gv=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,a=e.onChange,o=Sf(e,["className","colorModel","color","onChange"]),s=E.useRef(null);Hv(s);var c=zv(n,i,a),u=c[0],l=c[1],d=Ho(["react-colorful",t]);return E.createElement("div",Qi({},o,{ref:s,className:d}),E.createElement(Uv,{hsva:u,onChange:l}),E.createElement($v,{hue:u.h,onChange:l,className:"react-colorful__last-control"}))},Yv={defaultColor:"000",toHsva:Pv,fromHsva:function(e){return Nv({h:e.h,s:e.s,v:e.v,a:1})},equal:Bv},Kv=function(e){return E.createElement(Gv,Qi({},e,{colorModel:Yv}))};function Xv({track:e}){const t=E.useContext(qt),[n,r]=E.useState(e),[i,a]=E.useState(n.color),{value:o,valid:s,onChange:c}=Ti(n.title,n.title,Zv);E.useEffect(()=>{r(e),a(e.color)},[e.id]);const u=l=>{t({type:le.UPDATE_TRACK,id:n.id,track:l})};return E.useEffect(()=>{i!==n.color&&u({color:i}),s&&o!==n.title&&u({title:o})},[i,s,o]),p.jsxs(Wi,{children:[p.jsx("div",{children:"Color: "}),p.jsx(Jv,{color:i||"",onChange:a}),p.jsx("div",{children:"Title: "}),p.jsx("input",{style:{...Ci,..._i,...ki},id:"titleInput",type:"text",value:o,placeholder:n.title,onChange:c})]})}function Jv({color:e,onChange:t}){const[n,r]=E.useState(!1),i={width:"28px",height:"28px",borderRadius:"8px",border:"3px solid #fff",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1)",cursor:"pointer",backgroundColor:e},a={position:"absolute",top:"calc(100% + 2px)",left:"0",borderRadius:"9px",boxShadow:"0 6px 12px rgba(0, 0, 0, 0.15)"};return p.jsxs("div",{style:{position:"relative"},children:[p.jsx("div",{style:i,onClick:()=>r(!n)}),n&&p.jsx("div",{style:a,children:p.jsx(Kv,{color:e,onChange:t})})]})}function Zv(e){const t=document.getElementById("titleInput");return t==null?!1:e.length===0?(t.setCustomValidity("Empty input"),t.reportValidity(),!1):!0}function ey(){const{openModal:e,closeModal:t}=E.useContext(yo),[n,r]=E.useState(!1),i=E.useContext(Sn),[a,o]=E.useState(i.tracks.find(l=>l.id===(e==null?void 0:e.trackId))||{});E.useEffect(()=>{o(i.tracks.find(l=>l.id===(e==null?void 0:e.trackId))||{})},[e,i.tracks]);const s=()=>{r(!0)},c=()=>{r(!1)};E.useEffect(()=>{const l=d=>{d.key==="Escape"&&t()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t]);const u=E.useRef(null);return e?Nr.createPortal(p.jsx("div",{className:"modal",children:p.jsx(yi,{nodeRef:u,handle:".header",onStart:s,onStop:c,children:p.jsxs("div",{ref:u,className:"content",style:{...kv,position:"absolute",top:e==null?void 0:e.mouseY,left:e==null?void 0:e.mouseX,zIndex:1400},children:[p.jsxs("div",{className:"header",style:{backgroundColor:a.color||"transparent",color:uu(a.color||"transparent"),cursor:n?"grabbing":"grab",display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[p.jsx(ty,{handleClose:t,color:uu(a.color||"transparent")}),p.jsx("div",{style:{margin:"10px"},children:p.jsxs("div",{style:{paddingBottom:"0px",fontSize:"1.2em",fontWeight:"bold"},children:["Configure ",a.title]})})]}),p.jsxs("div",{style:{padding:"5px"},children:[p.jsx(Xv,{track:a}),p.jsx(Dv,{track:a}),(()=>{switch(a.trackType){case X.BIGWIG:return p.jsx(Rv,{track:a});case X.TRANSCRIPT:return p.jsx(jv,{track:a});default:return null}})()]})]})})}),document.body):null}function ty({handleClose:e,color:t}){const n="25px";return p.jsx("svg",{style:{color:t,fontSize:n,cursor:"pointer",position:"absolute",top:"5px",right:"5px"},onClick:e,width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z",fill:t})})}function uu(e){if(!e)return"#000000";let t,n,r;const i=e.slice(1);return t=parseInt(i.slice(0,2),16),n=parseInt(i.slice(2,4),16),r=parseInt(i.slice(4,6),16),(.299*t+.587*n+.114*r)/255>.5?"#000000":"#ffffff"}function ny(e){return e>=1e9?Math.round(e/1e9)+" Gb":e>=1e6?Math.round(e/1e6)+" Mb":e>=1e3?Math.round(e/1e3)+" kb":e+" bp"}const ry=e=>{const t=E.useMemo(()=>{const n=e.domain.end-e.domain.start,r={start:e.domain.start,end:e.domain.end},i=Ct(r,e.width),o=Math.pow(10,Math.floor(Math.log10(Math.ceil(n/10))))*6,s=(Math.ceil(r.end/o)-Math.ceil(r.start/o))*o/2,c={start:r.start+s/2,end:r.end-s/2},u=[];for(let l=Math.ceil(r.start/o);l<Math.ceil(r.end/o);++l)u.push(p.jsxs("g",{children:[p.jsx("line",{x1:i(l*o),x2:i(l*o),y1:e.height*.6,y2:e.height*.9,stroke:"#000",strokeWidth:.5}),l>=Math.ceil(r.start/o)&&p.jsx("text",{style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},textAnchor:"end",fontSize:e.height/4+"px",x:i(l*o)-5,y:e.height*.85,children:l*o})]},"ruler_"+l));return p.jsxs("g",{width:e.width,height:e.height,children:[p.jsx("line",{x1:i(c.start),x2:i(c.start),y1:e.height*.1,y2:e.height*.4,stroke:"#000",strokeWidth:.5}),p.jsx("line",{x1:i(c.end),x2:i(c.end),y1:e.height*.1,y2:e.height*.4,stroke:"#000",strokeWidth:.5}),p.jsx("line",{x1:i(c.start),x2:i(c.end),y1:e.height*.25,y2:e.height*.25,stroke:"#000",strokeWidth:.5}),p.jsx("text",{style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},x:i(c.start)-5,y:e.height*.35,fontSize:e.height/4+"px",textAnchor:"end",children:ny(c.end-c.start)}),u]})},[e.canDrag===!1&&e.domain]);return p.jsx(Mt,{canDrag:!0,children:t})};function iy(e){return p.jsx(tt,{...e,id:"ruler",trackType:X.RULER,children:p.jsx(ry,{...e})})}const ay=e=>{const{x:t,y:n,show:r}=E.useContext(Jt);return p.jsx("g",{transform:`translate(${t}, ${n})`,style:{visibility:r?"visible":"hidden"},children:p.jsx("foreignObject",{width:e.width,height:e.height,style:{overflow:"visible"},children:e.children})})},oy={cursor:"default",fontSize:"12px",padding:"6px 15px 5px 5px"},sy=e=>{var i;const t=E.useCallback(a=>{switch(a){case"download":e.data.downloadSVG&&e.data.downloadSVG();break;default:e.onModeChange&&e.onModeChange(e.data.id,a)}e.setContextMenu({show:!1,x:0,y:0,id:""})},[e.data,e.onModeChange]),[n,r]=E.useState(null);return p.jsx("div",{style:{position:"fixed",background:"white",boxShadow:"0px 2px 10px #999999"},children:(i=e.data.displayModeOptions)==null?void 0:i.map(a=>p.jsx("div",{onMouseOver:()=>r(a),onMouseOut:()=>r(null),onClick:()=>t(a),style:{backgroundColor:e.data.displayMode===a?"#d0d0d0":a===n?"#f0f0f0":"white",...oy},children:e.data.displayMode===a?p.jsx("li",{children:a}):a},a))})};function cy(e,t){switch(t.type){case"tooltipChanged":return{...e,tooltip:t.tooltip};case"contextMenuChanged":return{...e,contextmenu:t.contextmenu};default:return e}}function uy({children:e,onModeChange:t}){const[n,r]=E.useReducer(cy,{tooltip:{show:!1,x:0,y:0,width:0,height:0,content:void 0},contextmenu:{show:!1,x:0,y:0,id:"",displayMode:void 0,displayModeOptions:void 0}}),i=E.useCallback(o=>{r({type:"tooltipChanged",tooltip:o})},[r]),a=E.useCallback(o=>{r({type:"contextMenuChanged",contextmenu:o})},[r]);return p.jsx(Jt.Provider,{value:{...n.tooltip,setTooltip:i},children:p.jsxs(xo.Provider,{value:{...n.contextmenu,setContextMenu:a},children:[e,p.jsx(ay,{width:n.tooltip.width,height:n.tooltip.height,children:p.jsx("div",{style:{position:"fixed"},children:n.tooltip.content})}),p.jsx(Rd,{width:80,height:150,children:p.jsx(sy,{data:n.contextmenu,onModeChange:t,setContextMenu:a})})]})})}const ly=e=>{const[t,n]=E.useState([0,0]),[r,i]=E.useState(!1),a=E.useCallback((u,l)=>{const d=l.createSVGPoint();d.x=u.clientX,d.y=u.clientY;const f=l.getScreenCTM();return f?d.matrixTransform(f.inverse()):null},[]),o=E.useCallback(u=>{const l=document.getElementById("browserSVG");if(!(l instanceof SVGSVGElement))return;const d=a(u,l);if(!d)return;const f=d.x;n([f,f]),i(!0)},[a]),s=E.useCallback(u=>{if(!r)return;const l=document.getElementById("browserSVG");if(!(l instanceof SVGSVGElement))return;const d=a(u,l);if(!d)return;let f=d.x;f<e.leftMargin&&(f=e.leftMargin),f>e.width&&(f=e.width),n(g=>[g[0],f])},[r,e.width,e.leftMargin,a]),c=E.useCallback(u=>{if(!r||(i(!1),t[1]-t[0]<10))return;u.preventDefault();const l=e.domain.end-e.domain.start,d=e.width-e.leftMargin,f=(Math.min(t[0],t[1])-e.leftMargin)/d,g=(Math.max(t[0],t[1])-e.leftMargin)/d,x={chromosome:e.domain.chromosome,start:Math.floor(e.domain.start+f*l),end:Math.floor(e.domain.start+g*l)};n([0,0]),e.onSelectionEnd(x)},[t]);return E.useEffect(()=>(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}),[s,c]),p.jsxs(p.Fragment,{children:[r?Nr.createPortal(p.jsx("rect",{id:"selectRegion",fill:"#6666aaaa",stroke:"#000000",strokeWidth:.5,strokeDasharray:"5 5",x:Math.min(t[0],t[1]),y:0,width:Math.abs(t[1]-t[0]),height:e.height}),document.getElementById("browserSVG")):null,p.jsx("rect",{fill:"#ffffff",width:e.width-e.leftMargin,height:e.dragRegionHeight,x:e.leftMargin,y:0,onMouseDown:o})]})};function fy({width:e,innerWidth:t,height:n,svgRef:r,children:i}){return p.jsx("svg",{id:"browserSVG",width:e,viewBox:`0 0 ${t} ${n}`,ref:r,children:i})}function hy({children:e,browserState:t,rulerHeight:n}){const[r,i]=E.useState([]);return E.useEffect(()=>{let a=n;const o=t.tracks.map(s=>{const c=a;return a+=s.actualHeight??s.height??0,c});i(o)},[t.tracks]),p.jsx(p.Fragment,{children:r.length>0&&E.Children.map(e,(a,o)=>{const s=a.props,c=r[o];return p.jsx("g",{id:`stacked-track-${s.track.id}`,transform:typeof c=="number"?`translate(0, ${c})`:void 0,children:a},o)})})}const lu=_t`
198
+ `,Ef={titleSize:12,ldThreshold:.7,displayMode:Pe.FULL,canDrag:!0};function wf(e){var c,u,l;const t=E.useContext(qt),n={...e,trackType:J.LDTRACK,displayMode:e.displayMode},r=Ev(Xs),i=gf(_t(r),{variables:{assembly:"GRCh38",snpids:[e.anchor]}}),a=h=>{t({type:le.UPDATE_PROPS,id:e.id||"",props:{anchor:h.id}})};let o=[];if(i.data){if(i.data.snpQuery.length===0)return;o=Xs.map(h=>{var f;return{ld:((f=i.data)==null?void 0:f.snpQuery[0][`${h.population}_${h.subpopulation||""}_ld`])||[]}})}const s={snps:((c=e.data)==null?void 0:c.snps)||[],ld:o&&((u=o[0])==null?void 0:u.ld)||((l=e.data)==null?void 0:l.ld)||[]};switch(e.displayMode){case Pe.FULL:return m.jsx(tt,{...n,loading:i.loading,trackType:J.LDTRACK,displayMode:e.displayMode,children:m.jsx(D0,{...e,onVariantMouseOver:h=>{a(h),e.onVariantMouseOver&&e.onVariantMouseOver(h)},data:s})});default:return console.warn(`Display mode "${e.displayMode}" not supported on BigWig`),m.jsx(tt,{...n,children:m.jsx(Xn,{...e,error:!0,text:`Error: Unsupported display mode "${e.displayMode}"`})})}}const wv=e=>{const t=e.width<1e3?e.width/8:150,n={...e,height:0,marginSize:t,menuHeight:0,preRenderedWidth:e.width-t,zoomLevel:1,delta:0,highlights:e.highlights||[],tracks:e.tracks||[]};return E.useReducer(Td,n)};var nu=Object.prototype.hasOwnProperty;function ru(e,t,n){for(n of e.keys())if(Cr(n,t))return n}function Cr(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Cr(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=ru(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=ru(t,i),!i)||!Cr(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(nu.call(e,n)&&++r&&!nu.call(t,n)||!(n in t)||!Cr(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Sv(e){if(!e||!e.length)throw new Error("useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.");if(e.every(Ov))throw new Error("useDeepCompareEffect should not be used with dependencies that are all primitive values. Use React.useEffect instead.")}function Ov(e){return e==null||/^[sbn]/.test(typeof e)}function Tv(e){var t=ci.useRef(e),n=ci.useRef(0);return Cr(e,t.current)||(t.current=e,n.current+=1),ci.useMemo(function(){return t.current},[n.current])}function Cv(e,t){return process.env.NODE_ENV!=="production"&&Sv(t),ci.useEffect(e,Tv(t))}function _v(){const[e,t]=E.useState(null);return{openModal:e,showModal:(i,a,o)=>{t({trackId:i,mouseX:a,mouseY:o})},closeModal:()=>{t(null)}}}function Ti(e,t,n){const[r,i]=E.useState(e),[a,o]=E.useState(n(t)),[s,c]=E.useState(null);return{value:r,valid:a,onChange:l=>{const h=l.target.value,f=h===""?2e3:750;i(h),o(!1),s&&clearTimeout(s);const g=setTimeout(()=>{n(h)||i(t),o(!0)},f);c(g)}}}function zi({children:e}){return m.jsx("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",paddingBlock:"5px"},children:e})}const kv={position:"fixed",top:"0%",left:"0%",boxShadow:"0 0 10px rgba(0, 0, 0, 0.3)",width:"500px",transform:"translate(-50%, -50%)",background:"#ffffff"},Ci={width:"auto",outline:"#ffffff",border:"1px solid #000000",borderRadius:"2px",paddingRight:"5px"},iu={display:"flex",flexDirection:"column",paddingInline:"5px"},_i={WebkitAppearance:"none",margin:"0"},ki={MozAppearance:"textfield",appearance:"textfield"};function au(e){switch(e.trackType){case J.BIGWIG:return e.actualHeight;case J.BIGBED:return e.displayMode===Pe.DENSE?e.actualHeight:e.rowHeight;case J.TRANSCRIPT:return e.rowHeight;default:return e.height}}function Dv({track:e}){const t=E.useContext(On),n=E.useContext(qt),[r,i]=E.useState(t.tracks.find(h=>h.id===e.id)||e),[a,o]=E.useState(au(r)),s=Iv(r);E.useEffect(()=>{i(t.tracks.find(h=>h.id===e.id)||e),o(au(r))},[e]);const{value:c,valid:u,onChange:l}=Ti((a==null?void 0:a.toString())||"",(a==null?void 0:a.toString())||"",r.trackType===J.BIGWIG?Mv:Lv);return E.useEffect(()=>{u&&(s==="Height"?n({type:le.UPDATE_TRACK,id:r.id,track:{height:parseInt(c)}}):s==="Row Height"&&n({type:le.UPDATE_TRACK,id:r.id,track:{rowHeight:parseInt(c)}}))},[c,u]),m.jsxs(zi,{children:[s,":",m.jsx("input",{id:"heightInput",style:{...Ci,..._i,...ki},type:"number",placeholder:(a==null?void 0:a.toString())||"",value:c,onChange:l})]})}function Sf(e){const t=document.getElementById("heightInput");return t?e.length===0?(t.setCustomValidity("Empty input"),t.reportValidity(),!1):isNaN(parseInt(e))?(t.setCustomValidity("Invalid input"),t.reportValidity(),!1):!0:!0}function Mv(e){if(!Sf(e))return!1;const t=document.getElementById("heightInput");return t&&parseInt(e)<50?(t.setCustomValidity("Value must be greater than or equal to 50"),t.reportValidity(),!1):!0}function Lv(e){if(!Sf(e))return!1;const t=document.getElementById("heightInput");return t&&parseInt(e)<10?(t.setCustomValidity("Value must be greater than or equal to 10"),t.reportValidity(),!1):!0}function Iv(e){switch(e.trackType){case J.BIGBED:return e.displayMode===Pe.DENSE?"Height":"Row Height";case J.TRANSCRIPT:return"Row Height";default:return"Height"}}const Rv=(e,t,n)=>{if(!n)return!1;const r=document.querySelector('input[id="minInput"]'),i=document.querySelector('input[id="maxInput"]');return!r||!i?!0:e>t?(r.setCustomValidity("Minimum value cannot be greater than maximum value."),r.reportValidity(),!0):e==t?(i.setCustomValidity("Values are equal. Please enter different values."),i.reportValidity(),!0):e<n.min?(r.setCustomValidity("Minimum value cannot be less than the default minimum value."),r.reportValidity(),!0):t>n.max?(i.setCustomValidity("Maximum value cannot be greater than the default maximum value."),i.reportValidity(),!0):!1};function jv({track:e}){var g,x,w,T,O,_;const t=E.useContext(qt),[n]=E.useState(((g=e.props)==null?void 0:g.defaultRange)||{min:0,max:0}),[r]=E.useState(((x=e.props)==null?void 0:x.range)||n),i=y=>{const C=document.getElementById("minInput");return C?y.length===0||isNaN(parseFloat(y))?(C.setCustomValidity("Empty input, using default value"),C.reportValidity(),!1):parseFloat(y)<n.min?(C.setCustomValidity("Value must be greater than or equal to "+n.min),C.reportValidity(),!1):(C.setCustomValidity(""),!0):!0},a=y=>{const C=document.getElementById("maxInput");return C?y.length===0||isNaN(parseFloat(y))?(C.setCustomValidity("Empty input, using default value"),C.reportValidity(),!1):parseFloat(y)>n.max?(C.setCustomValidity("Value must be less than or equal to "+n.max),C.reportValidity(),!1):(C.setCustomValidity(""),!0):!0},{value:o,valid:s,onChange:c}=Ti(r.min.toString(),n.min.toString(),i),{value:u,valid:l,onChange:h}=Ti(r.max.toString(),n.max.toString(),a),f=y=>{y.target.select()};return E.useEffect(()=>{!s||!l||Rv(parseFloat(o),parseFloat(u),n)||t({type:le.UPDATE_PROPS,id:e.id,props:{range:{min:parseFloat(o),max:parseFloat(u)}}})},[s,l,o,u]),m.jsxs(zi,{children:[m.jsxs("label",{style:iu,children:["Minimum:",m.jsx("input",{id:"minInput",style:{...Ci,..._i,...ki},step:"0.01",type:"number",placeholder:(T=(w=e==null?void 0:e.props)==null?void 0:w.defaultRange)==null?void 0:T.min.toFixed(2),value:Number(o).toFixed(2),onFocus:f,onChange:c})]}),m.jsxs("label",{style:iu,children:["Maximum:",m.jsx("input",{id:"maxInput",style:{...Ci,..._i,...ki},step:"0.01",type:"number",placeholder:(_=(O=e==null?void 0:e.props)==null?void 0:O.defaultRange)==null?void 0:_.max.toFixed(2),value:Number(u).toFixed(2),onChange:h,onFocus:f})]})]})}function Pv({track:e}){const t=E.useContext(qt),[n,r]=E.useState(e.version);E.useEffect(()=>{r(e.version)},[e.version]);const i=s=>{r(s);const c=Object.values(bi).includes(s);t({type:le.UPDATE_TRACK,id:e.id,track:{version:s,assembly:c?"GRCH38":"mm10"}})},a=s=>({backgroundColor:n===s?e.color:"#858585",color:"white",marginRight:"5px",padding:"10px",border:"none",borderRadius:"5px",cursor:"pointer"}),o=e.assembly.toLowerCase()==="grch38";return m.jsx(zi,{children:m.jsxs("div",{children:[m.jsx("div",{children:o?"Human Assembly Version":"Mouse Assembly Version"}),Object.values(o?bi:go).filter(s=>!isNaN(Number(s))).map((s,c)=>m.jsx("button",{onClick:()=>i(Number(s)),style:a(Number(s)),children:s},c))]})})}function Qi(){return(Qi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Of(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function so(e){var t=E.useRef(e),n=E.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Pr=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},_r=function(e){return"touches"in e},co=function(e){return e&&e.ownerDocument.defaultView||self},ou=function(e,t,n){var r=e.getBoundingClientRect(),i=_r(t)?function(a,o){for(var s=0;s<a.length;s++)if(a[s].identifier===o)return a[s];return a[0]}(t.touches,n):t;return{left:Pr((i.pageX-(r.left+co(e).pageXOffset))/r.width),top:Pr((i.pageY-(r.top+co(e).pageYOffset))/r.height)}},su=function(e){!_r(e)&&e.preventDefault()},Tf=E.memo(function(e){var t=e.onMove,n=e.onKey,r=Of(e,["onMove","onKey"]),i=E.useRef(null),a=so(t),o=so(n),s=E.useRef(null),c=E.useRef(!1),u=E.useMemo(function(){var g=function(T){su(T),(_r(T)?T.touches.length>0:T.buttons>0)&&i.current?a(ou(i.current,T,s.current)):w(!1)},x=function(){return w(!1)};function w(T){var O=c.current,_=co(i.current),y=T?_.addEventListener:_.removeEventListener;y(O?"touchmove":"mousemove",g),y(O?"touchend":"mouseup",x)}return[function(T){var O=T.nativeEvent,_=i.current;if(_&&(su(O),!function(C,S){return S&&!_r(C)}(O,c.current)&&_)){if(_r(O)){c.current=!0;var y=O.changedTouches||[];y.length&&(s.current=y[0].identifier)}_.focus(),a(ou(_,O,s.current)),w(!0)}},function(T){var O=T.which||T.keyCode;O<37||O>40||(T.preventDefault(),o({left:O===39?.05:O===37?-.05:0,top:O===40?.05:O===38?-.05:0}))},w]},[o,a]),l=u[0],h=u[1],f=u[2];return E.useEffect(function(){return f},[f]),E.createElement("div",Qi({},r,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),Wo=function(e){return e.filter(Boolean).join(" ")},Cf=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,a=Wo(["react-colorful__pointer",e.className]);return E.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},E.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ht=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Nv=function(e){return $v(uo(e))},uo=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ht(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ht(parseInt(e.substring(6,8),16)/255,2):1}},Av=function(e){return qv(Vv(e))},Fv=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ht(e.h),s:ht(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ht(i/2),a:ht(r,2)}},lo=function(e){var t=Fv(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Vv=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),u=a%6;return{r:ht(255*[r,s,o,o,c,r][u]),g:ht(255*[c,r,r,s,o,o][u]),b:ht(255*[o,o,c,r,r,s][u]),a:ht(i,2)}},si=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},qv=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?si(ht(255*i)):"";return"#"+si(t)+si(n)+si(r)+a},$v=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:ht(60*(s<0?s+6:s)),s:ht(a?o/a*100:0),v:ht(a/255*100),a:i}},Uv=E.memo(function(e){var t=e.hue,n=e.onChange,r=Wo(["react-colorful__hue",e.className]);return E.createElement("div",{className:r},E.createElement(Tf,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Pr(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":ht(t),"aria-valuemax":"360","aria-valuemin":"0"},E.createElement(Cf,{className:"react-colorful__hue-pointer",left:t/360,color:lo({h:t,s:100,v:100,a:1})})))}),Bv=E.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:lo({h:t.h,s:100,v:100,a:1})};return E.createElement("div",{className:"react-colorful__saturation",style:r},E.createElement(Tf,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Pr(t.s+100*i.left,0,100),v:Pr(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ht(t.s)+"%, Brightness "+ht(t.v)+"%"},E.createElement(Cf,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:lo(t)})))}),_f=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Hv=function(e,t){return e.toLowerCase()===t.toLowerCase()||_f(uo(e),uo(t))};function zv(e,t,n){var r=so(n),i=E.useState(function(){return e.toHsva(t)}),a=i[0],o=i[1],s=E.useRef({color:t,hsva:a});E.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},o(u)}},[t,e]),E.useEffect(function(){var u;_f(a,s.current.hsva)||e.equal(u=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:u},r(u))},[a,e,r]);var c=E.useCallback(function(u){o(function(l){return Object.assign({},l,u)})},[]);return[a,c]}var Qv=typeof window<"u"?E.useLayoutEffect:E.useEffect,Wv=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},cu=new Map,Gv=function(e){Qv(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!cu.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,cu.set(t,n);var r=Wv();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Yv=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,a=e.onChange,o=Of(e,["className","colorModel","color","onChange"]),s=E.useRef(null);Gv(s);var c=zv(n,i,a),u=c[0],l=c[1],h=Wo(["react-colorful",t]);return E.createElement("div",Qi({},o,{ref:s,className:h}),E.createElement(Bv,{hsva:u,onChange:l}),E.createElement(Uv,{hue:u.h,onChange:l,className:"react-colorful__last-control"}))},Kv={defaultColor:"000",toHsva:Nv,fromHsva:function(e){return Av({h:e.h,s:e.s,v:e.v,a:1})},equal:Hv},Xv=function(e){return E.createElement(Yv,Qi({},e,{colorModel:Kv}))};function Jv({track:e}){const t=E.useContext(qt),[n,r]=E.useState(e),[i,a]=E.useState(n.color),{value:o,valid:s,onChange:c}=Ti(n.title,n.title,ey);E.useEffect(()=>{r(e),a(e.color)},[e.id]);const u=l=>{t({type:le.UPDATE_TRACK,id:n.id,track:l})};return E.useEffect(()=>{i!==n.color&&u({color:i}),s&&o!==n.title&&u({title:o})},[i,s,o]),m.jsxs(zi,{children:[m.jsx("div",{children:"Color: "}),m.jsx(Zv,{color:i||"",onChange:a}),m.jsx("div",{children:"Title: "}),m.jsx("input",{style:{...Ci,..._i,...ki},id:"titleInput",type:"text",value:o,placeholder:n.title,onChange:c})]})}function Zv({color:e,onChange:t}){const[n,r]=E.useState(!1),i={width:"28px",height:"28px",borderRadius:"8px",border:"3px solid #fff",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1)",cursor:"pointer",backgroundColor:e},a={position:"absolute",top:"calc(100% + 2px)",left:"0",borderRadius:"9px",boxShadow:"0 6px 12px rgba(0, 0, 0, 0.15)"};return m.jsxs("div",{style:{position:"relative"},children:[m.jsx("div",{style:i,onClick:()=>r(!n)}),n&&m.jsx("div",{style:a,children:m.jsx(Xv,{color:e,onChange:t})})]})}function ey(e){const t=document.getElementById("titleInput");return t==null?!1:e.length===0?(t.setCustomValidity("Empty input"),t.reportValidity(),!1):!0}function ty(){const{openModal:e,closeModal:t}=E.useContext(yo),[n,r]=E.useState(!1),i=E.useContext(On),[a,o]=E.useState(i.tracks.find(l=>l.id===(e==null?void 0:e.trackId))||{});E.useEffect(()=>{o(i.tracks.find(l=>l.id===(e==null?void 0:e.trackId))||{})},[e,i.tracks]);const s=()=>{r(!0)},c=()=>{r(!1)};E.useEffect(()=>{const l=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t]);const u=E.useRef(null);return e?Nr.createPortal(m.jsx("div",{className:"modal",children:m.jsx(yi,{nodeRef:u,handle:".header",onStart:s,onStop:c,children:m.jsxs("div",{ref:u,className:"content",style:{...kv,position:"absolute",top:e==null?void 0:e.mouseY,left:e==null?void 0:e.mouseX,zIndex:1400},children:[m.jsxs("div",{className:"header",style:{backgroundColor:a.color||"transparent",color:uu(a.color||"transparent"),cursor:n?"grabbing":"grab",display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[m.jsx(ny,{handleClose:t,color:uu(a.color||"transparent")}),m.jsx("div",{style:{margin:"10px"},children:m.jsxs("div",{style:{paddingBottom:"0px",fontSize:"1.2em",fontWeight:"bold"},children:["Configure ",a.title]})})]}),m.jsxs("div",{style:{padding:"5px"},children:[m.jsx(Jv,{track:a}),m.jsx(Dv,{track:a}),(()=>{switch(a.trackType){case J.BIGWIG:return m.jsx(jv,{track:a});case J.TRANSCRIPT:return m.jsx(Pv,{track:a});default:return null}})()]})]})})}),document.body):null}function ny({handleClose:e,color:t}){const n="25px";return m.jsx("svg",{style:{color:t,fontSize:n,cursor:"pointer",position:"absolute",top:"5px",right:"5px"},onClick:e,width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z",fill:t})})}function uu(e){if(!e)return"#000000";const t=e.slice(1),n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return(.299*n+.587*r+.114*i)/255>.5?"#000000":"#ffffff"}function ry(e){return e>=1e9?Math.round(e/1e9)+" Gb":e>=1e6?Math.round(e/1e6)+" Mb":e>=1e3?Math.round(e/1e3)+" kb":e+" bp"}const iy=e=>{const t=E.useMemo(()=>{const n=e.domain.end-e.domain.start,r={start:e.domain.start,end:e.domain.end},i=Ct(r,e.width),o=Math.pow(10,Math.floor(Math.log10(Math.ceil(n/10))))*6,s=(Math.ceil(r.end/o)-Math.ceil(r.start/o))*o/2,c={start:r.start+s/2,end:r.end-s/2},u=[];for(let l=Math.ceil(r.start/o);l<Math.ceil(r.end/o);++l)u.push(m.jsxs("g",{children:[m.jsx("line",{x1:i(l*o),x2:i(l*o),y1:e.height*.6,y2:e.height*.9,stroke:"#000",strokeWidth:.5}),l>=Math.ceil(r.start/o)&&m.jsx("text",{style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},textAnchor:"end",fontSize:e.height/4+"px",x:i(l*o)-5,y:e.height*.85,children:l*o})]},"ruler_"+l));return m.jsxs("g",{width:e.width,height:e.height,children:[m.jsx("line",{x1:i(c.start),x2:i(c.start),y1:e.height*.1,y2:e.height*.4,stroke:"#000",strokeWidth:.5}),m.jsx("line",{x1:i(c.end),x2:i(c.end),y1:e.height*.1,y2:e.height*.4,stroke:"#000",strokeWidth:.5}),m.jsx("line",{x1:i(c.start),x2:i(c.end),y1:e.height*.25,y2:e.height*.25,stroke:"#000",strokeWidth:.5}),m.jsx("text",{style:{pointerEvents:"none",WebkitTouchCallout:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},x:i(c.start)-5,y:e.height*.35,fontSize:e.height/4+"px",textAnchor:"end",children:ry(c.end-c.start)}),u]})},[e.canDrag===!1&&e.domain]);return m.jsx(Mt,{canDrag:!0,children:t})};function ay(e){return m.jsx(tt,{...e,id:"ruler",trackType:J.RULER,children:m.jsx(iy,{...e})})}const oy=e=>{const{x:t,y:n,show:r}=E.useContext(Jt);return m.jsx("g",{transform:`translate(${t}, ${n})`,style:{visibility:r?"visible":"hidden"},children:m.jsx("foreignObject",{width:e.width,height:e.height,style:{overflow:"visible"},children:e.children})})},sy={cursor:"default",fontSize:"12px",padding:"6px 15px 5px 5px"},cy=e=>{var i;const t=E.useCallback(a=>{switch(a){case"download":e.data.downloadSVG&&e.data.downloadSVG();break;default:e.onModeChange&&e.onModeChange(e.data.id,a)}e.setContextMenu({show:!1,x:0,y:0,id:""})},[e.data,e.onModeChange]),[n,r]=E.useState(null);return m.jsx("div",{style:{position:"fixed",background:"white",boxShadow:"0px 2px 10px #999999"},children:(i=e.data.displayModeOptions)==null?void 0:i.map(a=>m.jsx("div",{onMouseOver:()=>r(a),onMouseOut:()=>r(null),onClick:()=>t(a),style:{backgroundColor:e.data.displayMode===a?"#d0d0d0":a===n?"#f0f0f0":"white",...sy},children:e.data.displayMode===a?m.jsx("li",{children:a}):a},a))})};function uy(e,t){switch(t.type){case"tooltipChanged":return{...e,tooltip:t.tooltip};case"contextMenuChanged":return{...e,contextmenu:t.contextmenu};default:return e}}function ly({children:e,onModeChange:t}){const[n,r]=E.useReducer(uy,{tooltip:{show:!1,x:0,y:0,width:0,height:0,content:void 0},contextmenu:{show:!1,x:0,y:0,id:"",displayMode:void 0,displayModeOptions:void 0}}),i=E.useCallback(o=>{r({type:"tooltipChanged",tooltip:o})},[r]),a=E.useCallback(o=>{r({type:"contextMenuChanged",contextmenu:o})},[r]);return m.jsx(Jt.Provider,{value:{...n.tooltip,setTooltip:i},children:m.jsxs(xo.Provider,{value:{...n.contextmenu,setContextMenu:a},children:[e,m.jsx(oy,{width:n.tooltip.width,height:n.tooltip.height,children:m.jsx("div",{style:{position:"fixed"},children:n.tooltip.content})}),m.jsx(Rd,{width:80,height:150,children:m.jsx(cy,{data:n.contextmenu,onModeChange:t,setContextMenu:a})})]})})}const fy=e=>{const[t,n]=E.useState([0,0]),[r,i]=E.useState(!1),a=E.useCallback((u,l)=>{const h=l.createSVGPoint();h.x=u.clientX,h.y=u.clientY;const f=l.getScreenCTM();return f?h.matrixTransform(f.inverse()):null},[]),o=E.useCallback(u=>{const l=document.getElementById("browserSVG");if(!(l instanceof SVGSVGElement))return;const h=a(u,l);if(!h)return;const f=h.x;n([f,f]),i(!0)},[a]),s=E.useCallback(u=>{if(!r)return;const l=document.getElementById("browserSVG");if(!(l instanceof SVGSVGElement))return;const h=a(u,l);if(!h)return;let f=h.x;f<e.leftMargin&&(f=e.leftMargin),f>e.width&&(f=e.width),n(g=>[g[0],f])},[r,e.width,e.leftMargin,a]),c=E.useCallback(u=>{if(!r||(i(!1),t[1]-t[0]<10))return;u.preventDefault();const l=e.domain.end-e.domain.start,h=e.width-e.leftMargin,f=(Math.min(t[0],t[1])-e.leftMargin)/h,g=(Math.max(t[0],t[1])-e.leftMargin)/h,x={chromosome:e.domain.chromosome,start:Math.floor(e.domain.start+f*l),end:Math.floor(e.domain.start+g*l)};n([0,0]),e.onSelectionEnd(x)},[t]);return E.useEffect(()=>(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}),[s,c]),m.jsxs(m.Fragment,{children:[r?Nr.createPortal(m.jsx("rect",{id:"selectRegion",fill:"#6666aaaa",stroke:"#000000",strokeWidth:.5,strokeDasharray:"5 5",x:Math.min(t[0],t[1]),y:0,width:Math.abs(t[1]-t[0]),height:e.height}),document.getElementById("browserSVG")):null,m.jsx("rect",{fill:"#ffffff",width:e.width-e.leftMargin,height:e.dragRegionHeight,x:e.leftMargin,y:0,onMouseDown:o})]})};function hy({width:e,innerWidth:t,height:n,svgRef:r,children:i}){return m.jsx("svg",{id:"browserSVG",width:e,viewBox:`0 0 ${t} ${n}`,ref:r,children:i})}function dy({children:e,browserState:t,rulerHeight:n}){const[r,i]=E.useState([]);return E.useEffect(()=>{let a=n;const o=t.tracks.map(s=>{const c=a;return a+=s.actualHeight??s.height??0,c});i(o)},[t.tracks]),m.jsx(m.Fragment,{children:r.length>0&&E.Children.map(e,(a,o)=>{const s=a.props,c=r[o];return m.jsx("g",{id:`stacked-track-${s.track.id}`,transform:typeof c=="number"?`translate(0, ${c})`:void 0,children:a},o)})})}const lu=_t`
199
199
  query BigRequests($bigRequests: [BigRequest!]!) {
200
200
  bigRequests(requests: $bigRequests) {
201
201
  data
@@ -205,7 +205,7 @@ query LD($assembly: String!, $snpids: [String!]) {
205
205
  }
206
206
  }
207
207
  }
208
- `,dy=_t` query occurrences($prange: [ChromosomeRangeInput]!, $range: [GenomicRegionInput!],$peaks_accession: String, $consensus_regex: String, $limit: Int, $offset: Int, $assembly: String!) {
208
+ `,my=_t` query occurrences($prange: [ChromosomeRangeInput]!, $range: [GenomicRegionInput!],$peaks_accession: String, $consensus_regex: String, $limit: Int, $offset: Int, $assembly: String!) {
209
209
  meme_occurrences(genomic_region: $range, peaks_accession: $peaks_accession, consensus_regex: $consensus_regex, limit: $limit, offset: $offset) {
210
210
  motif {
211
211
  pwm
@@ -308,7 +308,7 @@ query Gene($chromosome: String, $assembly: String!, $start: Int, $end: Int, $ver
308
308
  }
309
309
  }
310
310
  }
311
- `;function my({browserState:e,browserDispatch:t}){const[n,r]=E.useState(),[i,a]=E.useState(),[o,s]=E.useState(),[c,u]=E.useState(),[l,d]=E.useState(),[f,{data:g,loading:x,error:w}]=xr(lu),[T,{data:S,loading:_,error:y}]=xr(dy),[C,{data:O,loading:R,error:P}]=xr(py),[F,{data:U,loading:V,error:ye}]=xr(lu),[_e,{data:ve,loading:we,error:Ne}]=xr(_t(xv)),{setDelta:Ie}=E.useContext(vo);return E.useEffect(()=>{r(e.tracks.filter(A=>A.trackType===X.BIGWIG||A.trackType===X.BIGBED).map(A=>({url:A.url||"",chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end,preRenderedWidth:e.preRenderedWidth,zoomLevel:e.zoomLevel})));const G=e.tracks.find(A=>A.trackType===X.TRANSCRIPT);G?(t({type:le.UPDATE_TRACK,id:G.id,track:{refetch:C}}),a({chromosome:e.domain.chromosome||"chr11",assembly:G.assembly,start:e.domain.start,end:e.domain.end,version:G.version})):a(void 0);const $=e.tracks.find(A=>A.trackType===X.MOTIF);$&&s({range:{chromosome:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end},prange:{chrom:e.domain.chromosome||"chr11",chrom_start:e.domain.start,chrom_end:e.domain.end},assembly:$.assembly,consensus_regex:$.consensusRegex,peaks_accession:$.peaksAccession});const Z=e.tracks.find(A=>A.trackType===X.IMPORTANCE);if(Z){const A=[];A.push({url:Z.url||"",chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}),A.push({url:Z.signalURL,chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}),u(A)}const j=e.tracks.find(A=>A.trackType===X.LDTRACK);j&&d({assembly:j.assembly,coordinates:{chromosome:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}})},[e.tracks.length,e.domain,e.preRenderedWidth,e.zoomLevel]),E.useEffect(()=>{n&&f({variables:{bigRequests:n}})},[n]),E.useEffect(()=>{i&&C({variables:i})},[i]),E.useEffect(()=>{o&&T({variables:o})},[o]),E.useEffect(()=>{c&&F({variables:{bigRequests:c}})},[c]),E.useEffect(()=>{l&&_e({variables:l})},[l]),E.useEffect(()=>{if(x||R||_||V||we)return;let G=0;e.tracks.forEach($=>{if($.trackType===X.BIGWIG||$.trackType===X.BIGBED)w?t({type:le.UPDATE_TRACK,id:$.id,track:{error:w.message||""}}):g&&t({type:le.UPDATE_TRACK,id:$.id,track:{data:g.bigRequests[G++].data}});else if($.trackType===X.TRANSCRIPT)P?t({type:le.UPDATE_TRACK,id:$.id,track:{error:P.message||""}}):O&&t({type:le.UPDATE_TRACK,id:$.id,track:{data:O.gene}});else if($.trackType===X.MOTIF){if(y)t({type:le.UPDATE_TRACK,id:$.id,track:{error:y.message||""}});else if(S){const Z=S.peaks.peaks.map(A=>({start:A.chrom_start,end:A.chrom_end})),j=S.meme_occurrences.map(A=>({start:A.genomic_region.start,end:A.genomic_region.end,pwm:A.motif.pwm}));t({type:le.UPDATE_TRACK,id:$.id,track:{data:j,peaks:Z}})}}else if($.trackType===X.IMPORTANCE){if(ye)t({type:le.UPDATE_TRACK,id:$.id,track:{error:ye.message||""}});else if(U){const Z=U.bigRequests[0].data[0],j=U.bigRequests[1].data.map(Y=>Y.value),A={sequence:Z,importance:j};t({type:le.UPDATE_TRACK,id:$.id,track:{data:A}})}}else if($.trackType===X.LDTRACK){if(Ne)t({type:le.UPDATE_TRACK,id:$.id,track:{error:Ne.message||""}});else if(ve){const Z=ve.snpQuery.filter(j=>j.coordinates).map(j=>({...j,domain:j.coordinates}));t({type:le.UPDATE_TRACK,id:$.id,track:{data:{snps:Z,ld:[]}}})}}}),Ie(0)},[g,O,S,U,w,P,y,ye,ve,Ne]),null}function gy({domain:e,color:t}){const n=E.useContext(Sn);if(e.chromosome&&n.domain.chromosome!=e.chromosome)return null;const[r,i]=E.useState(e.chromosome==null||e.chromosome==""?{start:e.start,end:e.end}:fu(e,n));return E.useEffect(()=>{n.delta==0&&i(e.chromosome==null||e.chromosome==""?{start:e.start,end:e.end}:fu(e,n))},[n.domain,n.delta==0]),p.jsx(Mt,{canDrag:!0,children:p.jsx("rect",{x:r.start-(e.chromosome?0:150),width:r.end-r.start,height:n.height-n.menuHeight,fill:t,fillOpacity:.2,style:{pointerEvents:"none"}})})}function fu(e,t){const n=(e.start-t.domain.start)/(t.domain.end-t.domain.start)*t.preRenderedWidth,r=(e.end-t.domain.start)/(t.domain.end-t.domain.start)*t.preRenderedWidth;return{start:n,end:r}}function vy({children:e,width:t,browserState:n,browserDispatch:r}){const i=E.useRef(null),[a,o]=E.useState(0),s=_v(),c=80,u=100,l=x=>{g(1),r({type:le.SET_LOADING}),r({type:le.SET_DOMAIN,domain:x}),g(0)},d=(x,w)=>{r({type:le.UPDATE_TRACK,id:x,track:{displayMode:w}}),w===Fe.HIDE&&r({type:le.DELETE_TRACK,id:x})};Cv(()=>{const x=n.tracks.reduce((w,T)=>w+(T.actualHeight??T.height),0);o(x)},[n.tracks,n.tracks.length]),n.height=c+a+u,n.menuHeight=u,n.marginSize=n.width<1e3?n.width/8:150;const f=E.useRef(!1);E.useEffect(()=>{var w;if(f.current)return;f.current=!0;const x=(w=E.Children.map(e,T=>E.isValidElement(T)?T.props:null))==null?void 0:w.filter(Boolean);x==null||x.forEach(T=>{r({type:le.ADD_TRACK,track:T}),r({type:le.BRING_TO_TOP,id:T.id})})},[e,r]);const g=x=>{r({type:le.SET_DELTA,delta:x})};return p.jsxs(_d,{browserState:n,browserDispatch:r,modalState:s,deltaContext:{delta:n.delta,setDelta:g},children:[p.jsx(fy,{innerWidth:n.width,width:t,height:n.height,svgRef:i,children:p.jsxs(uy,{onModeChange:d,children:[p.jsx(ly,{width:n.width,height:n.height-c,dragRegionHeight:c,leftMargin:n.marginSize,domain:n.domain,onSelectionEnd:x=>l(x)}),p.jsx(iy,{canDrag:n.delta!=0,width:n.width,height:c,title:"scale",id:"ruler",domain:n.domain,titleSize:12,trackMargin:12}),p.jsx(my,{browserState:n,browserDispatch:r}),p.jsx(hy,{browserState:n,rulerHeight:c,children:n.tracks.map(x=>p.jsx(yy,{track:x,svgRef:i,browserState:n},x.id+x.height))}),p.jsx("svg",{id:"gb-highlights",x:n.marginSize,x2:n.width,y:0,height:n.height-n.menuHeight,viewBox:`0 0 1500 ${n.height-n.menuHeight}`,children:n.highlights.map(x=>p.jsx(gy,{domain:x.domain,color:x.color},`${x.domain.end}-${x.domain.start}`))})]})}),s.openModal&&p.jsx(ey,{})]})}function yy({track:e,browserState:t,svgRef:n}){return E.useMemo(()=>{const a=(e.props||{}).transform;if(e.displayMode===Fe.HIDE)return null;const{width:o,domain:s}=t;return p.jsx("g",{id:"swap-track-"+e.id,transform:a,children:(()=>{switch(e.trackType){case X.BIGWIG:return p.jsx(Au,{svgRef:n,...Nu,width:o,domain:s,...e,...e.props,data:e.data});case X.BIGBED:return p.jsx($u,{svgRef:n,...qu,width:o,domain:s,...e,...e.props,data:e.data});case X.TRANSCRIPT:return p.jsx(zu,{svgRef:n,...Bu,width:o,domain:s,...e,...e.props,data:e.data});case X.IMPORTANCE:return p.jsx(Hu,{svgRef:n,...Qu,width:o,domain:s,...e,...e.props,data:e.data});case X.MOTIF:return p.jsx(Yu,{svgRef:n,...Gu,width:o,domain:s,...e,...e.props,data:e.data});case X.LDTRACK:return p.jsx(wf,{svgRef:n,...Ef,...e,width:o,domain:s,...e.props,data:e.data});default:return null}})()})},[e,e.props,t,n])}const by=new uf({uri:"https://ga.staging.wenglab.org/graphql",cache:new of,connectToDevTools:!0});function xy({children:e}){return p.jsx(ev,{client:by,children:e})}const Ey=new Map([["stalk",e=>e.stalk],["gvar",e=>e.default],["gneg",e=>Ri(e.default,.9)]]),wy=e=>{var n;const t=e.type.slice(0,4)==="gpos"?Ri(e.colors.default,1-+e.type.replace(/gpos/g,"")/100):(n=Ey.get(e.type))==null?void 0:n.call(null,e.colors);return t===void 0?null:p.jsx("rect",{width:e.width,height:e.height*.8,y:e.height*.1,x:e.x,fill:t,fillOpacity:e.opacity})};function Oy(e,t,n,r){return r?`M ${e} ${n*.1} L ${e+t} ${n/2} L ${e} ${n*.9}`:`M ${e+t} ${n*.1} L ${e} ${n/2} L ${e+t} ${n*.9}`}const Sy=e=>p.jsx("path",{d:Oy(e.x,e.width,e.height,e.opening),fill:e.color}),Ty=({highlight:e,height:t,x:n})=>{const r=`M ${n(e.start)-5} 0 L ${n(e.start)} ${t*.2} L ${n(e.start)+5} 0`,i=`M ${n(e.start)-5} ${t} L ${n(e.start)} ${t*.8} L ${n(e.start)+5} ${t}`;return p.jsxs(p.Fragment,{children:[p.jsx("path",{d:r,stroke:e.color||"#ff0000",strokeWidth:3,fill:"none"}),p.jsx("path",{d:i,stroke:e.color||"#ff0000",strokeWidth:3,fill:"none"})]})},hu=e=>e.x(e.highlight.end)-e.x(e.highlight.start)<10?p.jsx(Ty,{highlight:e.highlight,x:e.x,height:e.height}):p.jsx("rect",{x:e.x(e.highlight.start),y:0,width:e.x(e.highlight.end)-e.x(e.highlight.start),height:e.height,fill:e.highlight.color||"#ff000088",onMouseOver:e.onMouseOver,onMouseOut:e.onMouseOut,onClick:e.onClick}),Cy={default:"#000000",centromere:"#880000",stalk:"#ff0000"},_y=e=>{const t=e.colors||Cy,n=e.domain||{start:0,end:Math.max(...e.data.map(a=>a.coordinates.end))},r=Ct(n,e.width);let i=0;return p.jsxs("g",{width:e.width,height:e.height,transform:e.transform,children:[e.data.map((a,o)=>{const s=r(a.coordinates.start),c=r(a.coordinates.end)-s;return a.stain==="acen"?p.jsx(Sy,{width:c,x:s,height:e.height,color:t.centromere,opening:i++===0},o):p.jsx(wy,{type:a.stain,width:c,x:s,height:e.height,colors:t,opacity:e.opacity},o)}),e.highlight?p.jsx(hu,{onMouseOut:e.onHighlightMouseOut,onMouseOver:()=>e.onHighlightMouseOver&&e.onHighlightMouseOver(e.highlight,r((e.highlight.start+e.highlight.end)/2),0),onClick:()=>e.onHighlightClick&&e.onHighlightClick(e.highlight,r((e.highlight.start+e.highlight.end)/2),0),highlight:e.highlight,x:r,height:e.height,width:e.width}):null,e.highlights?e.highlights.map((a,o)=>p.jsx(hu,{onMouseOut:e.onHighlightMouseOut,onMouseOver:()=>e.onHighlightMouseOver&&e.onHighlightMouseOver(a,r((a.start+a.end)/2),o),highlight:a,x:r,height:e.height,width:e.width,onClick:()=>e.onHighlightClick&&e.onHighlightClick(a,r((a.start+a.end)/2),o)})):null,e.children]})},ky=_t`
311
+ `;function gy({browserState:e,browserDispatch:t}){const[n,r]=E.useState(),[i,a]=E.useState(),[o,s]=E.useState(),[c,u]=E.useState(),[l,h]=E.useState(),[f,{data:g,loading:x,error:w}]=xr(lu),[T,{data:O,loading:_,error:y}]=xr(my),[C,{data:S,loading:R,error:P}]=xr(py),[F,{data:U,loading:V,error:ye}]=xr(lu),[_e,{data:ve,loading:we,error:Ae}]=xr(_t(xv)),{setDelta:Ie}=E.useContext(vo);return E.useEffect(()=>{r(e.tracks.filter(A=>A.trackType===J.BIGWIG||A.trackType===J.BIGBED).map(A=>({url:A.url||"",chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end,preRenderedWidth:e.preRenderedWidth,zoomLevel:e.zoomLevel})));const G=e.tracks.find(A=>A.trackType===J.TRANSCRIPT);G?(t({type:le.UPDATE_TRACK,id:G.id,track:{refetch:C}}),a({chromosome:e.domain.chromosome||"chr11",assembly:G.assembly,start:e.domain.start,end:e.domain.end,version:G.version})):a(void 0);const $=e.tracks.find(A=>A.trackType===J.MOTIF);$&&s({range:{chromosome:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end},prange:{chrom:e.domain.chromosome||"chr11",chrom_start:e.domain.start,chrom_end:e.domain.end},assembly:$.assembly,consensus_regex:$.consensusRegex,peaks_accession:$.peaksAccession});const Z=e.tracks.find(A=>A.trackType===J.IMPORTANCE);if(Z){const A=[];A.push({url:Z.url||"",chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}),A.push({url:Z.signalURL,chr1:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}),u(A)}const j=e.tracks.find(A=>A.trackType===J.LDTRACK);j&&h({assembly:j.assembly,coordinates:{chromosome:e.domain.chromosome||"chr11",start:e.domain.start,end:e.domain.end}})},[e.tracks.length,e.domain,e.preRenderedWidth,e.zoomLevel]),E.useEffect(()=>{n&&f({variables:{bigRequests:n}})},[n]),E.useEffect(()=>{i&&C({variables:i})},[i]),E.useEffect(()=>{o&&T({variables:o})},[o]),E.useEffect(()=>{c&&F({variables:{bigRequests:c}})},[c]),E.useEffect(()=>{l&&_e({variables:l})},[l]),E.useEffect(()=>{if(x||R||_||V||we)return;let G=0;e.tracks.forEach($=>{if($.trackType===J.BIGWIG||$.trackType===J.BIGBED){if(w)t({type:le.UPDATE_TRACK,id:$.id,track:{error:w.message||""}});else if(g){if(g.bigRequests.length===0)return;t({type:le.UPDATE_TRACK,id:$.id,track:{data:g.bigRequests[G++].data}})}}else if($.trackType===J.TRANSCRIPT)P?t({type:le.UPDATE_TRACK,id:$.id,track:{error:P.message||""}}):S&&t({type:le.UPDATE_TRACK,id:$.id,track:{data:S.gene}});else if($.trackType===J.MOTIF){if(y)t({type:le.UPDATE_TRACK,id:$.id,track:{error:y.message||""}});else if(O){const Z=O.peaks.peaks.map(A=>({start:A.chrom_start,end:A.chrom_end})),j=O.meme_occurrences.map(A=>({start:A.genomic_region.start,end:A.genomic_region.end,pwm:A.motif.pwm}));t({type:le.UPDATE_TRACK,id:$.id,track:{data:j,peaks:Z}})}}else if($.trackType===J.IMPORTANCE){if(ye)t({type:le.UPDATE_TRACK,id:$.id,track:{error:ye.message||""}});else if(U){const Z=U.bigRequests[0].data[0],j=U.bigRequests[1].data.map(Y=>Y.value),A={sequence:Z,importance:j};t({type:le.UPDATE_TRACK,id:$.id,track:{data:A}})}}else if($.trackType===J.LDTRACK){if(Ae)t({type:le.UPDATE_TRACK,id:$.id,track:{error:Ae.message||""}});else if(ve){const Z=ve.snpQuery.filter(j=>j.coordinates).map(j=>({...j,domain:j.coordinates}));t({type:le.UPDATE_TRACK,id:$.id,track:{data:{snps:Z,ld:[]}}})}}}),Ie(0)},[g,S,O,U,w,P,y,ye,ve,Ae]),null}function vy({domain:e,color:t}){const n=E.useContext(On);if(e.chromosome&&n.domain.chromosome!=e.chromosome)return null;const[r,i]=E.useState(e.chromosome==null||e.chromosome==""?{start:e.start,end:e.end}:fu(e,n));return E.useEffect(()=>{n.delta==0&&i(e.chromosome==null||e.chromosome==""?{start:e.start,end:e.end}:fu(e,n))},[n.domain,n.delta==0]),m.jsx(Mt,{canDrag:!0,children:m.jsx("rect",{x:r.start-(e.chromosome?0:150),width:r.end-r.start,height:n.height-n.menuHeight,fill:t,fillOpacity:.2,style:{pointerEvents:"none"}})})}function fu(e,t){const n=(e.start-t.domain.start)/(t.domain.end-t.domain.start)*t.preRenderedWidth,r=(e.end-t.domain.start)/(t.domain.end-t.domain.start)*t.preRenderedWidth;return{start:n,end:r}}function yy({children:e,width:t,browserState:n,browserDispatch:r}){const i=E.useRef(null),[a,o]=E.useState(0),s=_v(),c=80,u=100,l=x=>{g(1),r({type:le.SET_LOADING}),r({type:le.SET_DOMAIN,domain:x}),g(0)},h=(x,w)=>{r({type:le.UPDATE_TRACK,id:x,track:{displayMode:w}}),w===Pe.HIDE&&r({type:le.DELETE_TRACK,id:x})};Cv(()=>{const x=n.tracks.reduce((w,T)=>w+(T.actualHeight??T.height),0);o(x)},[n.tracks,n.tracks.length]),n.height=c+a+u,n.menuHeight=u,n.marginSize=n.width<1e3?n.width/8:150;const f=E.useRef(!1);E.useEffect(()=>{var w;if(f.current)return;f.current=!0;const x=(w=E.Children.map(e,T=>E.isValidElement(T)?T.props:null))==null?void 0:w.filter(Boolean);x==null||x.forEach(T=>{r({type:le.ADD_TRACK,track:T}),r({type:le.BRING_TO_TOP,id:T.id})})},[e,r]);const g=x=>{r({type:le.SET_DELTA,delta:x})};return m.jsxs(_d,{browserState:n,browserDispatch:r,modalState:s,deltaContext:{delta:n.delta,setDelta:g},children:[m.jsx(hy,{innerWidth:n.width,width:t,height:n.height,svgRef:i,children:m.jsxs(ly,{onModeChange:h,children:[m.jsx(fy,{width:n.width,height:n.height-c,dragRegionHeight:c,leftMargin:n.marginSize,domain:n.domain,onSelectionEnd:x=>l(x)}),m.jsx(ay,{canDrag:n.delta!=0,width:n.width,height:c,title:"scale",id:"ruler",domain:n.domain,titleSize:12,trackMargin:12}),m.jsx(gy,{browserState:n,browserDispatch:r}),m.jsx(dy,{browserState:n,rulerHeight:c,children:n.tracks.map(x=>m.jsx(by,{track:x,svgRef:i,browserState:n},x.id+x.height))}),m.jsx("svg",{id:"gb-highlights",x:n.marginSize,x2:n.width,y:0,height:n.height-n.menuHeight,viewBox:`0 0 1500 ${n.height-n.menuHeight}`,children:n.highlights.map(x=>m.jsx(vy,{domain:x.domain,color:x.color},`${x.domain.end}-${x.domain.start}`))})]})}),s.openModal&&m.jsx(ty,{})]})}function by({track:e,browserState:t,svgRef:n}){return E.useMemo(()=>{const a=(e.props||{}).transform;if(e.displayMode===Pe.HIDE)return null;const{width:o,domain:s}=t;return m.jsx("g",{id:"swap-track-"+e.id,transform:a,children:(()=>{switch(e.trackType){case J.BIGWIG:return m.jsx(Au,{svgRef:n,...Nu,width:o,domain:s,...e,...e.props,data:e.data});case J.BIGBED:return m.jsx($u,{svgRef:n,...qu,width:o,domain:s,...e,...e.props,data:e.data});case J.TRANSCRIPT:return m.jsx(Hu,{svgRef:n,...Bu,width:o,domain:s,...e,...e.props,data:e.data});case J.IMPORTANCE:return m.jsx(Wu,{svgRef:n,...Qu,width:o,domain:s,...e,...e.props,data:e.data});case J.MOTIF:return m.jsx(Yu,{svgRef:n,...Gu,width:o,domain:s,...e,...e.props,data:e.data});case J.LDTRACK:return m.jsx(wf,{svgRef:n,...Ef,...e,width:o,domain:s,...e.props,data:e.data});default:return null}})()})},[e,e.props,t,n])}const xy=new uf({uri:"https://ga.staging.wenglab.org/graphql",cache:new of,connectToDevTools:!0});function Ey({children:e}){return m.jsx(ev,{client:xy,children:e})}const wy=new Map([["stalk",e=>e.stalk],["gvar",e=>e.default],["gneg",e=>Ri(e.default,.9)]]),Sy=e=>{var n;const t=e.type.slice(0,4)==="gpos"?Ri(e.colors.default,1-+e.type.replace(/gpos/g,"")/100):(n=wy.get(e.type))==null?void 0:n.call(null,e.colors);return t===void 0?null:m.jsx("rect",{width:e.width,height:e.height*.8,y:e.height*.1,x:e.x,fill:t,fillOpacity:e.opacity})};function Oy(e,t,n,r){return r?`M ${e} ${n*.1} L ${e+t} ${n/2} L ${e} ${n*.9}`:`M ${e+t} ${n*.1} L ${e} ${n/2} L ${e+t} ${n*.9}`}const Ty=e=>m.jsx("path",{d:Oy(e.x,e.width,e.height,e.opening),fill:e.color}),Cy=({highlight:e,height:t,x:n})=>{const r=`M ${n(e.start)-5} 0 L ${n(e.start)} ${t*.2} L ${n(e.start)+5} 0`,i=`M ${n(e.start)-5} ${t} L ${n(e.start)} ${t*.8} L ${n(e.start)+5} ${t}`;return m.jsxs(m.Fragment,{children:[m.jsx("path",{d:r,stroke:e.color||"#ff0000",strokeWidth:3,fill:"none"}),m.jsx("path",{d:i,stroke:e.color||"#ff0000",strokeWidth:3,fill:"none"})]})},hu=e=>e.x(e.highlight.end)-e.x(e.highlight.start)<10?m.jsx(Cy,{highlight:e.highlight,x:e.x,height:e.height}):m.jsx("rect",{x:e.x(e.highlight.start),y:0,width:e.x(e.highlight.end)-e.x(e.highlight.start),height:e.height,fill:e.highlight.color||"#ff000088",onMouseOver:e.onMouseOver,onMouseOut:e.onMouseOut,onClick:e.onClick}),_y={default:"#000000",centromere:"#880000",stalk:"#ff0000"},ky=e=>{const t=e.colors||_y,n=e.domain||{start:0,end:Math.max(...e.data.map(a=>a.coordinates.end))},r=Ct(n,e.width);let i=0;return m.jsxs("g",{width:e.width,height:e.height,transform:e.transform,children:[e.data.map((a,o)=>{const s=r(a.coordinates.start),c=r(a.coordinates.end)-s;return a.stain==="acen"?m.jsx(Ty,{width:c,x:s,height:e.height,color:t.centromere,opening:i++===0},o):m.jsx(Sy,{type:a.stain,width:c,x:s,height:e.height,colors:t,opacity:e.opacity},o)}),e.highlight?m.jsx(hu,{onMouseOut:e.onHighlightMouseOut,onMouseOver:()=>e.onHighlightMouseOver&&e.onHighlightMouseOver(e.highlight,r((e.highlight.start+e.highlight.end)/2),0),onClick:()=>e.onHighlightClick&&e.onHighlightClick(e.highlight,r((e.highlight.start+e.highlight.end)/2),0),highlight:e.highlight,x:r,height:e.height,width:e.width}):null,e.highlights?e.highlights.map((a,o)=>m.jsx(hu,{onMouseOut:e.onHighlightMouseOut,onMouseOver:()=>e.onHighlightMouseOver&&e.onHighlightMouseOver(a,r((a.start+a.end)/2),o),highlight:a,x:r,height:e.height,width:e.width,onClick:()=>e.onHighlightClick&&e.onHighlightClick(a,r((a.start+a.end)/2),o)})):null,e.children]})},Dy=_t`
312
312
  query cytobands($assembly: String!, $chromosome: String) {
313
313
  cytoband(assembly: $assembly, chromosome: $chromosome) {
314
314
  stain
@@ -319,5 +319,5 @@ query Gene($chromosome: String, $assembly: String!, $start: Int, $end: Int, $ver
319
319
  }
320
320
  }
321
321
  }
322
- `;function Dy({assembly:e,currentDomain:t}){const{data:n,loading:r,error:i}=gf(ky,{variables:{assembly:e,chromosome:t.chromosome||""}});if(r)return p.jsx("g",{width:700,height:20,children:p.jsx("text",{x:"350",y:"15",textAnchor:"middle",style:{fontSize:"14px",fontFamily:"sans-serif"},children:"Loading..."})});if(i)return p.jsx("g",{width:700,height:20,children:p.jsxs("text",{x:"350",y:"15",textAnchor:"middle",style:{fontSize:"14px",fontFamily:"sans-serif"},children:["Error: ",i.message]})});const a={...t,color:"rgba(50,50,255,0.75)"};return p.jsx(_y,{data:n.cytoband,width:700,height:20,id:"cytobands",highlight:a})}function In({text:e,shift:t,dispatch:n,style:r,buttonComponent:i}){return i?E.cloneElement(i,{value:e,style:r,type:"button",children:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.SLIDE_DOMAIN,delta:Math.floor(t)})}}):p.jsx(p.Fragment,{children:p.jsx("button",{className:"shift-button",type:"button",value:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.SLIDE_DOMAIN,delta:Math.floor(t)})},style:r,children:e})})}const Rn=({text:e,factor:t,dispatch:n,style:r,buttonComponent:i})=>i?E.cloneElement(i,{value:e,style:r,type:"button",children:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.ZOOM_DOMAIN,factor:t})}}):p.jsx("button",{className:"zoom-button",style:r,value:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.ZOOM_DOMAIN,factor:t})},children:e});function My({domain:e,size:t,dispatch:n,style:r,inputComponent:i,inputButtonComponent:a}){const o="GRCh38",s=e.chromosome+":"+e.start+"-"+e.end,c=du(o,s),[u,l]=E.useState(s),[d,f]=E.useState(c),g=E.useCallback(T=>{l(T.target.value),f(du(o,T.target.value))},[u]),x=E.useCallback(()=>{if(!d){const T=document.getElementById("region-input-gbc");T==null||T.setCustomValidity("Invalid input"),T==null||T.reportValidity();return}n({type:le.SET_DOMAIN,domain:{start:d.start,end:d.end,chromosome:"chr"+d.chromosome}})},[d]),w=T=>{T.key==="Tab"&&T.currentTarget.value===""&&c&&(T.preventDefault(),T.currentTarget.value=s,g({target:{value:s}}))};return i&&a?p.jsxs("form",{onSubmit:x,style:{display:"flex",flexDirection:"row"},children:[E.cloneElement(i,{onChange:g,onKeyDown:w,placeholder:s}),E.cloneElement(a,{onClick:x})]}):p.jsxs("div",{style:{display:"flex",flexDirection:"row",...r},children:[p.jsx("input",{id:"region-input-gbc",placeholder:s,type:"text",size:t,value:u,onChange:g,style:{outline:"none",border:d?"2px solid #000":"2px solid red",borderRadius:"4px"},onKeyDown:w}),p.jsx("input",{type:"button",onClick:x,value:"Go",style:{outline:"none"}})]})}const du=(e,t)=>{var i;const n=/^chr(\d+|X|Y):[0-9,]*-[0-9,]*$/;if(t.includes(" ")){const a=t.split(" "),o=a[0],s=a[1].replace(/,/g,""),c=a[2].replace(/,/g,"");t=`${o}:${s}-${c}`}const r=t.match(/^chr(\d+|X|Y):/);if(n.test(t)){const a=r?r[1]:null,o=(i=t.split(":")[1])==null?void 0:i.split("-"),s=o!=null&&o[0]?parseInt(o[0].replace(/,/g,"")):null,c=o!=null&&o[1]?parseInt(o[1].replace(/,/g,"")):null;if(a&&s!==null&&c!==null&&a in pu[e]&&s<c&&s>0&&c<=pu[e][a])return{chromosome:a,start:s,end:c}}return null},pu={GRCh38:{1:248956422,2:242193529,3:198295559,4:190214555,5:181538259,6:170805979,7:159345973,8:145138636,9:138394717,10:133797422,11:135086622,12:133275309,13:114364328,14:107043718,15:101991189,16:90338345,17:83257441,18:80373285,19:58617616,20:64444167,21:46709983,22:50818468,X:156040895,Y:57227415},mm10:{1:195471971,2:182113224,3:160039680,4:156508116,5:151834684,6:149736546,7:145441459,8:129401213,9:124595110,10:130694993,11:122082543,12:120129022,13:120421639,14:124902244,15:104043685,16:98207768,17:94987271,18:90702639,19:61431566,X:171031299,Y:91744698}};function Ly({buttonComponent:e,domain:t,dispatch:n}){return p.jsxs(p.Fragment,{children:[p.jsxs("div",{id:"gb-shift-left-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Move Left",p.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[p.jsx(In,{buttonComponent:e,text:"◄◄◄",shift:t.start-t.end,dispatch:n}),p.jsx(In,{buttonComponent:e,text:"◄◄",shift:(t.start-t.end)/2,dispatch:n}),p.jsx(In,{buttonComponent:e,text:"◄",shift:(t.start-t.end)/4,dispatch:n})]})]}),p.jsx("div",{style:{width:10}}),p.jsxs("div",{id:"gb-shift-right-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Move Right",p.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[p.jsx(In,{buttonComponent:e,text:"►",shift:(t.end-t.start)/4,dispatch:n}),p.jsx(In,{buttonComponent:e,text:"►►",shift:(t.end-t.start)/2,dispatch:n}),p.jsx(In,{buttonComponent:e,text:"►►►",shift:t.end-t.start,dispatch:n})]})]})]})}function Iy({buttonComponent:e,domain:t,dispatch:n}){return p.jsxs(p.Fragment,{children:[p.jsxs("div",{id:"gb-zoom-in-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Zoom In",p.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[p.jsx(Rn,{buttonComponent:e,text:"+1.5x",factor:1/1.5,domain:t,dispatch:n}),p.jsx(Rn,{buttonComponent:e,text:"+3x",factor:1/3,domain:t,dispatch:n}),p.jsx(Rn,{buttonComponent:e,text:"+10x",factor:1/10,domain:t,dispatch:n})]})]}),p.jsx("div",{style:{width:10}}),p.jsxs("div",{id:"gb-zoom-out-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Zoom Out",p.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[p.jsx(Rn,{buttonComponent:e,text:"-1.5x",factor:1.5,domain:t,dispatch:n}),p.jsx(Rn,{buttonComponent:e,text:"-3x",factor:3,domain:t,dispatch:n}),p.jsx(Rn,{buttonComponent:e,text:"-10x",factor:10,domain:t,dispatch:n})]})]})]})}function Ry({buttonComponent:e,inputComponent:t,inputButtonComponent:n,domain:r,dispatch:i,withInput:a,style:o}){return p.jsxs("div",{id:"gb-controls",style:{display:"flex",flexDirection:"column",alignItems:"center",...o},children:[p.jsxs("div",{id:"gb-controls-buttons",style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:[p.jsx(Ly,{buttonComponent:e||void 0,domain:r,dispatch:i}),p.jsx("div",{style:{width:35}}),p.jsx(Iy,{buttonComponent:e||void 0,domain:r,dispatch:i}),p.jsx("div",{style:{width:35}}),a&&p.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end"},children:[t?null:"Set Region",p.jsx(My,{inputButtonComponent:n||void 0,inputComponent:t||void 0,size:20,domain:r,dispatch:i})]})]}),!a&&p.jsxs("div",{id:"gb-controls-region",style:{fontSize:12},children:[r.chromosome,":",r.start,"-",r.end]})]})}exports.Bam=h0;exports.BigBed=$u;exports.BigBedTrack=Od;exports.BigWig=Au;exports.BigWigTrack=wd;exports.BrowserActionType=le;exports.Controls=Ry;exports.DefaultBam=f0;exports.DefaultBigBed=qu;exports.DefaultBigWig=Nu;exports.DefaultImportance=Qu;exports.DefaultLD=Ef;exports.DefaultMotif=Gu;exports.DefaultTranscript=Bu;exports.DisplayMode=Fe;exports.GQLCytobands=Dy;exports.GQLWrapper=xy;exports.GenomeBrowser=vy;exports.Importance=Hu;exports.LD=wf;exports.Motif=Yu;exports.TrackType=X;exports.Transcript=zu;exports.TranscriptHumanVersion=bi;exports.TranscriptMouseVersion=go;exports.TranscriptTrack=Sd;exports.useBrowserState=wv;
322
+ `;function My({assembly:e,currentDomain:t}){const{data:n,loading:r,error:i}=gf(Dy,{variables:{assembly:e,chromosome:t.chromosome||""}});if(r)return m.jsx("g",{width:700,height:20,children:m.jsx("text",{x:"350",y:"15",textAnchor:"middle",style:{fontSize:"14px",fontFamily:"sans-serif"},children:"Loading..."})});if(i)return m.jsx("g",{width:700,height:20,children:m.jsxs("text",{x:"350",y:"15",textAnchor:"middle",style:{fontSize:"14px",fontFamily:"sans-serif"},children:["Error: ",i.message]})});const a={...t,color:"rgba(50,50,255,0.75)"};return m.jsx(ky,{data:n.cytoband,width:700,height:20,id:"cytobands",highlight:a})}function In({text:e,shift:t,dispatch:n,style:r,buttonComponent:i}){return i?E.cloneElement(i,{value:e,style:r,type:"button",children:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.SLIDE_DOMAIN,delta:Math.floor(t)})}}):m.jsx(m.Fragment,{children:m.jsx("button",{className:"shift-button",type:"button",value:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.SLIDE_DOMAIN,delta:Math.floor(t)})},style:r,children:e})})}const Rn=({text:e,factor:t,dispatch:n,style:r,buttonComponent:i})=>i?E.cloneElement(i,{value:e,style:r,type:"button",children:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.ZOOM_DOMAIN,factor:t})}}):m.jsx("button",{className:"zoom-button",style:r,value:e,onClick:()=>{n({type:le.SET_LOADING}),n({type:le.ZOOM_DOMAIN,factor:t})},children:e});function Ly({domain:e,size:t,dispatch:n,style:r,inputComponent:i,inputButtonComponent:a}){const o="GRCh38",s=e.chromosome+":"+e.start+"-"+e.end,c=du(o,s),[u,l]=E.useState(s),[h,f]=E.useState(c),g=E.useCallback(T=>{l(T.target.value),f(du(o,T.target.value))},[u]),x=E.useCallback(()=>{if(!h){const T=document.getElementById("region-input-gbc");T==null||T.setCustomValidity("Invalid input"),T==null||T.reportValidity();return}n({type:le.SET_DOMAIN,domain:{start:h.start,end:h.end,chromosome:"chr"+h.chromosome}})},[h]),w=T=>{T.key==="Tab"&&T.currentTarget.value===""&&c&&(T.preventDefault(),T.currentTarget.value=s,g({target:{value:s}}))};return i&&a?m.jsxs("form",{onSubmit:x,style:{display:"flex",flexDirection:"row"},children:[E.cloneElement(i,{onChange:g,onKeyDown:w,placeholder:s}),E.cloneElement(a,{onClick:x})]}):m.jsxs("div",{style:{display:"flex",flexDirection:"row",...r},children:[m.jsx("input",{id:"region-input-gbc",placeholder:s,type:"text",size:t,value:u,onChange:g,style:{outline:"none",border:h?"2px solid #000":"2px solid red",borderRadius:"4px"},onKeyDown:w}),m.jsx("input",{type:"button",onClick:x,value:"Go",style:{outline:"none"}})]})}const du=(e,t)=>{var i;const n=/^chr(\d+|X|Y):[0-9,]*-[0-9,]*$/;if(t.includes(" ")){const a=t.split(" "),o=a[0],s=a[1].replace(/,/g,""),c=a[2].replace(/,/g,"");t=`${o}:${s}-${c}`}const r=t.match(/^chr(\d+|X|Y):/);if(n.test(t)){const a=r?r[1]:null,o=(i=t.split(":")[1])==null?void 0:i.split("-"),s=o!=null&&o[0]?parseInt(o[0].replace(/,/g,"")):null,c=o!=null&&o[1]?parseInt(o[1].replace(/,/g,"")):null;if(a&&s!==null&&c!==null&&a in mu[e]&&s<c&&s>0&&c<=mu[e][a])return{chromosome:a,start:s,end:c}}return null},mu={GRCh38:{1:248956422,2:242193529,3:198295559,4:190214555,5:181538259,6:170805979,7:159345973,8:145138636,9:138394717,10:133797422,11:135086622,12:133275309,13:114364328,14:107043718,15:101991189,16:90338345,17:83257441,18:80373285,19:58617616,20:64444167,21:46709983,22:50818468,X:156040895,Y:57227415},mm10:{1:195471971,2:182113224,3:160039680,4:156508116,5:151834684,6:149736546,7:145441459,8:129401213,9:124595110,10:130694993,11:122082543,12:120129022,13:120421639,14:124902244,15:104043685,16:98207768,17:94987271,18:90702639,19:61431566,X:171031299,Y:91744698}};function Iy({buttonComponent:e,domain:t,dispatch:n}){return m.jsxs(m.Fragment,{children:[m.jsxs("div",{id:"gb-shift-left-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Move Left",m.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[m.jsx(In,{buttonComponent:e,text:"◄◄◄",shift:t.start-t.end,dispatch:n}),m.jsx(In,{buttonComponent:e,text:"◄◄",shift:(t.start-t.end)/2,dispatch:n}),m.jsx(In,{buttonComponent:e,text:"◄",shift:(t.start-t.end)/4,dispatch:n})]})]}),m.jsx("div",{style:{width:10}}),m.jsxs("div",{id:"gb-shift-right-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Move Right",m.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[m.jsx(In,{buttonComponent:e,text:"►",shift:(t.end-t.start)/4,dispatch:n}),m.jsx(In,{buttonComponent:e,text:"►►",shift:(t.end-t.start)/2,dispatch:n}),m.jsx(In,{buttonComponent:e,text:"►►►",shift:t.end-t.start,dispatch:n})]})]})]})}function Ry({buttonComponent:e,domain:t,dispatch:n}){return m.jsxs(m.Fragment,{children:[m.jsxs("div",{id:"gb-zoom-in-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Zoom In",m.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[m.jsx(Rn,{buttonComponent:e,text:"+1.5x",factor:1/1.5,domain:t,dispatch:n}),m.jsx(Rn,{buttonComponent:e,text:"+3x",factor:1/3,domain:t,dispatch:n}),m.jsx(Rn,{buttonComponent:e,text:"+10x",factor:1/10,domain:t,dispatch:n})]})]}),m.jsx("div",{style:{width:10}}),m.jsxs("div",{id:"gb-zoom-out-buttons",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:["Zoom Out",m.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[m.jsx(Rn,{buttonComponent:e,text:"-1.5x",factor:1.5,domain:t,dispatch:n}),m.jsx(Rn,{buttonComponent:e,text:"-3x",factor:3,domain:t,dispatch:n}),m.jsx(Rn,{buttonComponent:e,text:"-10x",factor:10,domain:t,dispatch:n})]})]})]})}function jy({buttonComponent:e,inputComponent:t,inputButtonComponent:n,domain:r,dispatch:i,withInput:a,style:o}){return m.jsxs("div",{id:"gb-controls",style:{display:"flex",flexDirection:"column",alignItems:"center",...o},children:[m.jsxs("div",{id:"gb-controls-buttons",style:{display:"flex",flexDirection:"row",justifyContent:"center"},children:[m.jsx(Iy,{buttonComponent:e||void 0,domain:r,dispatch:i}),m.jsx("div",{style:{width:35}}),m.jsx(Ry,{buttonComponent:e||void 0,domain:r,dispatch:i}),m.jsx("div",{style:{width:35}}),a&&m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end"},children:[t?null:"Set Region",m.jsx(Ly,{inputButtonComponent:n||void 0,inputComponent:t||void 0,size:20,domain:r,dispatch:i})]})]}),!a&&m.jsxs("div",{id:"gb-controls-region",style:{fontSize:12},children:[r.chromosome,":",r.start,"-",r.end]})]})}exports.Bam=h0;exports.BigBed=$u;exports.BigBedTrack=Sd;exports.BigWig=Au;exports.BigWigTrack=wd;exports.BrowserActionType=le;exports.Controls=jy;exports.DefaultBam=f0;exports.DefaultBigBed=qu;exports.DefaultBigWig=Nu;exports.DefaultImportance=Qu;exports.DefaultLD=Ef;exports.DefaultMotif=Gu;exports.DefaultTranscript=Bu;exports.DisplayMode=Pe;exports.GQLCytobands=My;exports.GQLWrapper=Ey;exports.GenomeBrowser=yy;exports.Importance=Wu;exports.LD=wf;exports.Motif=Yu;exports.TrackType=J;exports.Transcript=Hu;exports.TranscriptHumanVersion=bi;exports.TranscriptMouseVersion=go;exports.TranscriptTrack=Od;exports.useBrowserState=wv;
323
323
  //# sourceMappingURL=gbc.cjs.js.map