diff --git a/CNAME b/CNAME deleted file mode 100644 index a208c65..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -lokman.fr \ No newline at end of file diff --git a/assets/BONX-Frame-7bfbc64f.otf b/assets/BONX-Frame-7bfbc64f.otf new file mode 100644 index 0000000..44d3e69 Binary files /dev/null and b/assets/BONX-Frame-7bfbc64f.otf differ diff --git a/assets/BONX-Silhouette-99324bfd.otf b/assets/BONX-Silhouette-99324bfd.otf new file mode 100644 index 0000000..74ce0dc Binary files /dev/null and b/assets/BONX-Silhouette-99324bfd.otf differ diff --git a/assets/MS-PGothic-66db9983.ttf b/assets/MS-PGothic-66db9983.ttf new file mode 100644 index 0000000..a3ac9be Binary files /dev/null and b/assets/MS-PGothic-66db9983.ttf differ diff --git a/assets/index-d7b1f508.js b/assets/index-4c6e18dd.js similarity index 90% rename from assets/index-d7b1f508.js rename to assets/index-4c6e18dd.js index c4f0470..6a6badf 100644 --- a/assets/index-d7b1f508.js +++ b/assets/index-4c6e18dd.js @@ -22,7 +22,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(H,j){var M=H.length;H.push(j);e:for(;0>>1,D=H[O];if(0>>1;O<$;){var V=2*(O+1)-1,q=H[V],R=V+1,U=H[R];if(0>i(q,M))Ri(U,q)?(H[O]=U,H[R]=M,O=R):(H[O]=q,H[V]=M,O=V);else if(Ri(U,M))H[O]=U,H[R]=M,O=R;else break e}}return j}function i(H,j){var M=H.sortIndex-j.sortIndex;return M!==0?M:H.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],u=[],f=1,h=null,c=3,d=!1,w=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(H){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=H)r(u),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(u)}}function g(H){if(v=!1,y(H),!w)if(n(l)!==null)w=!0,z(_);else{var j=n(u);j!==null&&B(g,j.startTime-H)}}function _(H,j){w=!1,v&&(v=!1,m(T),T=-1),d=!0;var M=c;try{for(y(j),h=n(l);h!==null&&(!(h.expirationTime>j)||H&&!b());){var O=h.callback;if(typeof O=="function"){h.callback=null,c=h.priorityLevel;var D=O(h.expirationTime<=j);j=t.unstable_now(),typeof D=="function"?h.callback=D:h===n(l)&&r(l),y(j)}else r(l);h=n(l)}if(h!==null)var $=!0;else{var V=n(u);V!==null&&B(g,V.startTime-j),$=!1}return $}finally{h=null,c=M,d=!1}}var k=!1,S=null,T=-1,x=5,I=-1;function b(){return!(t.unstable_now()-IH||125O?(H.sortIndex=M,e(u,H),n(l)===null&&H===n(u)&&(v?(m(T),T=-1):v=!0,B(g,M-O))):(H.sortIndex=D,e(l,H),w||d||(w=!0,z(_))),H},t.unstable_shouldYield=b,t.unstable_wrapCallback=function(H){var j=c;return function(){var M=c;c=j;try{return H.apply(this,arguments)}finally{c=M}}}})(Aw);Ow.exports=Aw;var mN=Ow.exports;/** + */(function(t){function e(H,j){var M=H.length;H.push(j);e:for(;0>>1,D=H[O];if(0>>1;O<$;){var V=2*(O+1)-1,q=H[V],R=V+1,U=H[R];if(0>i(q,M))Ri(U,q)?(H[O]=U,H[R]=M,O=R):(H[O]=q,H[V]=M,O=V);else if(Ri(U,M))H[O]=U,H[R]=M,O=R;else break e}}return j}function i(H,j){var M=H.sortIndex-j.sortIndex;return M!==0?M:H.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,h=null,f=3,d=!1,w=!1,v=!1,E=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(H){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=H)r(u),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(u)}}function g(H){if(v=!1,y(H),!w)if(n(l)!==null)w=!0,z(_);else{var j=n(u);j!==null&&B(g,j.startTime-H)}}function _(H,j){w=!1,v&&(v=!1,m(T),T=-1),d=!0;var M=f;try{for(y(j),h=n(l);h!==null&&(!(h.expirationTime>j)||H&&!b());){var O=h.callback;if(typeof O=="function"){h.callback=null,f=h.priorityLevel;var D=O(h.expirationTime<=j);j=t.unstable_now(),typeof D=="function"?h.callback=D:h===n(l)&&r(l),y(j)}else r(l);h=n(l)}if(h!==null)var $=!0;else{var V=n(u);V!==null&&B(g,V.startTime-j),$=!1}return $}finally{h=null,f=M,d=!1}}var k=!1,S=null,T=-1,x=5,I=-1;function b(){return!(t.unstable_now()-IH||125O?(H.sortIndex=M,e(u,H),n(l)===null&&H===n(u)&&(v?(m(T),T=-1):v=!0,B(g,M-O))):(H.sortIndex=D,e(l,H),w||d||(w=!0,z(_))),H},t.unstable_shouldYield=b,t.unstable_wrapCallback=function(H){var j=f;return function(){var M=f;f=j;try{return H.apply(this,arguments)}finally{f=M}}}})(Aw);Ow.exports=Aw;var mN=Ow.exports;/** * @license React * react-dom.production.min.js * @@ -34,10 +34,10 @@ `+Ff+t}var jf=!1;function Uf(t,e){if(!t||jf)return"";jf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(` `),o=r.stack.split(` `),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{jf=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?xs(t):""}function EN(t){switch(t.tag){case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 2:case 15:return t=Uf(t.type,!1),t;case 11:return t=Uf(t.type.render,!1),t;case 1:return t=Uf(t.type,!0),t;default:return""}}function Zh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case so:return"Fragment";case oo:return"Portal";case Yh:return"Profiler";case Yp:return"StrictMode";case Xh:return"Suspense";case Jh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Pw:return(t.displayName||"Context")+".Consumer";case Rw:return(t._context.displayName||"Context")+".Provider";case Xp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Jp:return e=t.displayName||null,e!==null?e:Zh(t.type)||"Memo";case Nr:e=t._payload,t=t._init;try{return Zh(t(e))}catch{}}return null}function _N(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zh(e);case 8:return e===Yp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Jr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Dw(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function TN(t){var e=Dw(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yl(t){t._valueTracker||(t._valueTracker=TN(t))}function Mw(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Dw(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function fu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ed(t,e){var n=e.checked;return Ke({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Lv(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Jr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $w(t,e){e=e.checked,e!=null&&Qp(t,"checked",e,!1)}function td(t,e){$w(t,e);var n=Jr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?nd(t,e.type,n):e.hasOwnProperty("defaultValue")&&nd(t,e.type,Jr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Dv(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function nd(t,e,n){(e!=="number"||fu(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Rs=Array.isArray;function Eo(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=wl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function oa(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Vs={animationIterationCount:!0,aspectRatio:!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},SN=["Webkit","ms","Moz","O"];Object.keys(Vs).forEach(function(t){SN.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Vs[e]=Vs[t]})});function Bw(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Vs.hasOwnProperty(t)&&Vs[t]?(""+e).trim():e+"px"}function qw(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bw(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var bN=Ke({menuitem:!0},{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});function od(t,e){if(e){if(bN[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function sd(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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":return!1;default:return!0}}var ad=null;function Zp(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ld=null,_o=null,To=null;function Fv(t){if(t=Ha(t)){if(typeof ld!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=bc(e),ld(t.stateNode,t.type,e))}}function Vw(t){_o?To?To.push(t):To=[t]:_o=t}function zw(){if(_o){var t=_o,e=To;if(To=_o=null,Fv(t),e)for(t=0;t>>=0,t===0?32:31-(DN(t)/MN|0)|0}var El=64,_l=4194304;function Ps(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function mu(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Ps(a):(o&=s,o!==0&&(r=Ps(o)))}else s=n&~i,s!==0?r=Ps(s):o!==0&&(r=Ps(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Va(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Nn(e),t[e]=n}function UN(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Hs),Wv=String.fromCharCode(32),Gv=!1;function cE(t,e){switch(t){case"keyup":return pO.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fE(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ao=!1;function gO(t,e){switch(t){case"compositionend":return fE(e);case"keypress":return e.which!==32?null:(Gv=!0,Wv);case"textInput":return t=e.data,t===Wv&&Gv?null:t;default:return null}}function vO(t,e){if(ao)return t==="compositionend"||!am&&cE(t,e)?(t=lE(),Gl=im=Dr=null,ao=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jv(n)}}function mE(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?mE(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gE(){for(var t=window,e=fu();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=fu(t.document)}return e}function lm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function IO(t){var e=gE(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&mE(n.ownerDocument.documentElement,n)){if(r!==null&&lm(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=Zv(n,o);var s=Zv(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,lo=null,pd=null,Ws=null,md=!1;function ey(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;md||lo==null||lo!==fu(r)||(r=lo,"selectionStart"in r&&lm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ws&&fa(Ws,r)||(Ws=r,r=yu(pd,"onSelect"),0fo||(t.current=_d[fo],_d[fo]=null,fo--)}function Pe(t,e){fo++,_d[fo]=t.current,t.current=e}var Zr={},Rt=oi(Zr),Kt=oi(!1),Oi=Zr;function Lo(t,e){var n=t.type.contextTypes;if(!n)return Zr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Wt(t){return t=t.childContextTypes,t!=null}function Eu(){Fe(Kt),Fe(Rt)}function ay(t,e,n){if(Rt.current!==Zr)throw Error(ee(168));Pe(Rt,e),Pe(Kt,n)}function kE(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ee(108,_N(t)||"Unknown",i));return Ke({},n,r)}function _u(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Zr,Oi=Rt.current,Pe(Rt,t),Pe(Kt,Kt.current),!0}function ly(t,e,n){var r=t.stateNode;if(!r)throw Error(ee(169));n?(t=kE(t,e,Oi),r.__reactInternalMemoizedMergedChildContext=t,Fe(Kt),Fe(Rt),Pe(Rt,t)):Fe(Kt),Pe(Kt,n)}var Yn=null,kc=!1,eh=!1;function IE(t){Yn===null?Yn=[t]:Yn.push(t)}function FO(t){kc=!0,IE(t)}function si(){if(!eh&&Yn!==null){eh=!0;var t=0,e=Ce;try{var n=Yn;for(Ce=1;t>=s,i-=s,Zn=1<<32-Nn(e)+i|n<T?(x=S,S=null):x=S.sibling;var I=c(m,S,y[T],g);if(I===null){S===null&&(S=x);break}t&&S&&I.alternate===null&&e(m,S),p=o(I,p,T),k===null?_=I:k.sibling=I,k=I,S=x}if(T===y.length)return n(m,S),Be&&fi(m,T),_;if(S===null){for(;TT?(x=S,S=null):x=S.sibling;var b=c(m,S,I.value,g);if(b===null){S===null&&(S=x);break}t&&S&&b.alternate===null&&e(m,S),p=o(b,p,T),k===null?_=b:k.sibling=b,k=b,S=x}if(I.done)return n(m,S),Be&&fi(m,T),_;if(S===null){for(;!I.done;T++,I=y.next())I=h(m,I.value,g),I!==null&&(p=o(I,p,T),k===null?_=I:k.sibling=I,k=I);return Be&&fi(m,T),_}for(S=r(m,S);!I.done;T++,I=y.next())I=d(S,m,T,I.value,g),I!==null&&(t&&I.alternate!==null&&S.delete(I.key===null?T:I.key),p=o(I,p,T),k===null?_=I:k.sibling=I,k=I);return t&&S.forEach(function(N){return e(m,N)}),Be&&fi(m,T),_}function E(m,p,y,g){if(typeof y=="object"&&y!==null&&y.type===so&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case vl:e:{for(var _=y.key,k=p;k!==null;){if(k.key===_){if(_=y.type,_===so){if(k.tag===7){n(m,k.sibling),p=i(k,y.props.children),p.return=m,m=p;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Nr&&my(_)===k.type){n(m,k.sibling),p=i(k,y.props),p.ref=Ss(m,k,y),p.return=m,m=p;break e}n(m,k);break}else e(m,k);k=k.sibling}y.type===so?(p=ki(y.props.children,m.mode,g,y.key),p.return=m,m=p):(g=nu(y.type,y.key,y.props,null,m.mode,g),g.ref=Ss(m,p,y),g.return=m,m=g)}return s(m);case oo:e:{for(k=y.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=i(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else e(m,p);p=p.sibling}p=lh(y,m.mode,g),p.return=m,m=p}return s(m);case Nr:return k=y._init,E(m,p,k(y._payload),g)}if(Rs(y))return w(m,p,y,g);if(ys(y))return v(m,p,y,g);Ol(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,y),p.return=m,m=p):(n(m,p),p=ah(y,m.mode,g),p.return=m,m=p),s(m)):n(m,p)}return E}var Mo=LE(!0),DE=LE(!1),Ka={},Bn=oi(Ka),ma=oi(Ka),ga=oi(Ka);function yi(t){if(t===Ka)throw Error(ee(174));return t}function vm(t,e){switch(Pe(ga,e),Pe(ma,t),Pe(Bn,Ka),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:id(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=id(e,t)}Fe(Bn),Pe(Bn,e)}function $o(){Fe(Bn),Fe(ma),Fe(ga)}function ME(t){yi(ga.current);var e=yi(Bn.current),n=id(e,t.type);e!==n&&(Pe(ma,t),Pe(Bn,n))}function ym(t){ma.current===t&&(Fe(Bn),Fe(ma))}var ze=oi(0);function Nu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var th=[];function wm(){for(var t=0;tn?n:4,t(!0);var r=nh.transition;nh.transition={};try{t(!1),e()}finally{Ce=n,nh.transition=r}}function JE(){return vn().memoizedState}function qO(t,e,n){var r=Hr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ZE(t))e_(e,n);else if(n=CE(t,e,n,r),n!==null){var i=$t();On(n,t,r,i),t_(n,e,r)}}function VO(t,e,n){var r=Hr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ZE(t))e_(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,An(a,s)){var l=e.interleaved;l===null?(i.next=i,mm(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=CE(t,e,i,r),n!==null&&(i=$t(),On(n,t,r,i),t_(n,e,r))}}function ZE(t){var e=t.alternate;return t===He||e!==null&&e===He}function e_(t,e){Gs=Ou=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function t_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,tm(t,n)}}var Au={readContext:gn,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useInsertionEffect:_t,useLayoutEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useMutableSource:_t,useSyncExternalStore:_t,useId:_t,unstable_isNewReconciler:!1},zO={readContext:gn,useCallback:function(t,e){return Mn().memoizedState=[t,e===void 0?null:e],t},useContext:gn,useEffect:vy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Jl(4194308,4,WE.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Jl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Jl(4,2,t,e)},useMemo:function(t,e){var n=Mn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Mn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=qO.bind(null,He,t),[r.memoizedState,t]},useRef:function(t){var e=Mn();return t={current:t},e.memoizedState=t},useState:gy,useDebugValue:bm,useDeferredValue:function(t){return Mn().memoizedState=t},useTransition:function(){var t=gy(!1),e=t[0];return t=BO.bind(null,t[1]),Mn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=He,i=Mn();if(Be){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=e(),ut===null)throw Error(ee(349));Ci&30||jE(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,vy(BE.bind(null,r,o,t),[t]),r.flags|=2048,wa(9,UE.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Mn(),e=ut.identifierPrefix;if(Be){var n=er,r=Zn;n=(r&~(1<<32-Nn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=va++,0")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{jf=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?xs(t):""}function EN(t){switch(t.tag){case 5:return xs(t.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 2:case 15:return t=Uf(t.type,!1),t;case 11:return t=Uf(t.type.render,!1),t;case 1:return t=Uf(t.type,!0),t;default:return""}}function Zh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case so:return"Fragment";case oo:return"Portal";case Yh:return"Profiler";case Yp:return"StrictMode";case Xh:return"Suspense";case Jh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Pw:return(t.displayName||"Context")+".Consumer";case Rw:return(t._context.displayName||"Context")+".Provider";case Xp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Jp:return e=t.displayName||null,e!==null?e:Zh(t.type)||"Memo";case Nr:e=t._payload,t=t._init;try{return Zh(t(e))}catch{}}return null}function _N(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zh(e);case 8:return e===Yp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Jr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Dw(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function TN(t){var e=Dw(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yl(t){t._valueTracker||(t._valueTracker=TN(t))}function Mw(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Dw(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function fu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ed(t,e){var n=e.checked;return Ke({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Lv(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Jr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function $w(t,e){e=e.checked,e!=null&&Qp(t,"checked",e,!1)}function td(t,e){$w(t,e);var n=Jr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?nd(t,e.type,n):e.hasOwnProperty("defaultValue")&&nd(t,e.type,Jr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Dv(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function nd(t,e,n){(e!=="number"||fu(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Rs=Array.isArray;function Eo(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=wl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function oa(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Vs={animationIterationCount:!0,aspectRatio:!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},SN=["Webkit","ms","Moz","O"];Object.keys(Vs).forEach(function(t){SN.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Vs[e]=Vs[t]})});function Bw(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Vs.hasOwnProperty(t)&&Vs[t]?(""+e).trim():e+"px"}function qw(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bw(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var bN=Ke({menuitem:!0},{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});function od(t,e){if(e){if(bN[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ee(62))}}function sd(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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":return!1;default:return!0}}var ad=null;function Zp(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ld=null,_o=null,To=null;function Fv(t){if(t=Ha(t)){if(typeof ld!="function")throw Error(ee(280));var e=t.stateNode;e&&(e=bc(e),ld(t.stateNode,t.type,e))}}function Vw(t){_o?To?To.push(t):To=[t]:_o=t}function zw(){if(_o){var t=_o,e=To;if(To=_o=null,Fv(t),e)for(t=0;t>>=0,t===0?32:31-(DN(t)/MN|0)|0}var El=64,_l=4194304;function Ps(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function mu(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Ps(a):(o&=s,o!==0&&(r=Ps(o)))}else s=n&~i,s!==0?r=Ps(s):o!==0&&(r=Ps(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Va(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Nn(e),t[e]=n}function UN(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Hs),Wv=String.fromCharCode(32),Gv=!1;function cE(t,e){switch(t){case"keyup":return pO.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fE(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ao=!1;function gO(t,e){switch(t){case"compositionend":return fE(e);case"keypress":return e.which!==32?null:(Gv=!0,Wv);case"textInput":return t=e.data,t===Wv&&Gv?null:t;default:return null}}function vO(t,e){if(ao)return t==="compositionend"||!am&&cE(t,e)?(t=lE(),Gl=im=Dr=null,ao=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jv(n)}}function mE(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?mE(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gE(){for(var t=window,e=fu();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=fu(t.document)}return e}function lm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function IO(t){var e=gE(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&mE(n.ownerDocument.documentElement,n)){if(r!==null&&lm(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=Zv(n,o);var s=Zv(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,lo=null,pd=null,Ws=null,md=!1;function ey(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;md||lo==null||lo!==fu(r)||(r=lo,"selectionStart"in r&&lm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ws&&fa(Ws,r)||(Ws=r,r=yu(pd,"onSelect"),0fo||(t.current=_d[fo],_d[fo]=null,fo--)}function Pe(t,e){fo++,_d[fo]=t.current,t.current=e}var Zr={},Rt=oi(Zr),Kt=oi(!1),Oi=Zr;function Lo(t,e){var n=t.type.contextTypes;if(!n)return Zr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Wt(t){return t=t.childContextTypes,t!=null}function Eu(){Fe(Kt),Fe(Rt)}function ay(t,e,n){if(Rt.current!==Zr)throw Error(ee(168));Pe(Rt,e),Pe(Kt,n)}function kE(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ee(108,_N(t)||"Unknown",i));return Ke({},n,r)}function _u(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Zr,Oi=Rt.current,Pe(Rt,t),Pe(Kt,Kt.current),!0}function ly(t,e,n){var r=t.stateNode;if(!r)throw Error(ee(169));n?(t=kE(t,e,Oi),r.__reactInternalMemoizedMergedChildContext=t,Fe(Kt),Fe(Rt),Pe(Rt,t)):Fe(Kt),Pe(Kt,n)}var Yn=null,kc=!1,eh=!1;function IE(t){Yn===null?Yn=[t]:Yn.push(t)}function FO(t){kc=!0,IE(t)}function si(){if(!eh&&Yn!==null){eh=!0;var t=0,e=Ce;try{var n=Yn;for(Ce=1;t>=s,i-=s,Zn=1<<32-Nn(e)+i|n<T?(x=S,S=null):x=S.sibling;var I=f(m,S,y[T],g);if(I===null){S===null&&(S=x);break}t&&S&&I.alternate===null&&e(m,S),p=o(I,p,T),k===null?_=I:k.sibling=I,k=I,S=x}if(T===y.length)return n(m,S),Be&&fi(m,T),_;if(S===null){for(;TT?(x=S,S=null):x=S.sibling;var b=f(m,S,I.value,g);if(b===null){S===null&&(S=x);break}t&&S&&b.alternate===null&&e(m,S),p=o(b,p,T),k===null?_=b:k.sibling=b,k=b,S=x}if(I.done)return n(m,S),Be&&fi(m,T),_;if(S===null){for(;!I.done;T++,I=y.next())I=h(m,I.value,g),I!==null&&(p=o(I,p,T),k===null?_=I:k.sibling=I,k=I);return Be&&fi(m,T),_}for(S=r(m,S);!I.done;T++,I=y.next())I=d(S,m,T,I.value,g),I!==null&&(t&&I.alternate!==null&&S.delete(I.key===null?T:I.key),p=o(I,p,T),k===null?_=I:k.sibling=I,k=I);return t&&S.forEach(function(N){return e(m,N)}),Be&&fi(m,T),_}function E(m,p,y,g){if(typeof y=="object"&&y!==null&&y.type===so&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case vl:e:{for(var _=y.key,k=p;k!==null;){if(k.key===_){if(_=y.type,_===so){if(k.tag===7){n(m,k.sibling),p=i(k,y.props.children),p.return=m,m=p;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Nr&&my(_)===k.type){n(m,k.sibling),p=i(k,y.props),p.ref=Ss(m,k,y),p.return=m,m=p;break e}n(m,k);break}else e(m,k);k=k.sibling}y.type===so?(p=ki(y.props.children,m.mode,g,y.key),p.return=m,m=p):(g=nu(y.type,y.key,y.props,null,m.mode,g),g.ref=Ss(m,p,y),g.return=m,m=g)}return s(m);case oo:e:{for(k=y.key;p!==null;){if(p.key===k)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=i(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else e(m,p);p=p.sibling}p=lh(y,m.mode,g),p.return=m,m=p}return s(m);case Nr:return k=y._init,E(m,p,k(y._payload),g)}if(Rs(y))return w(m,p,y,g);if(ys(y))return v(m,p,y,g);Ol(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,y),p.return=m,m=p):(n(m,p),p=ah(y,m.mode,g),p.return=m,m=p),s(m)):n(m,p)}return E}var Mo=LE(!0),DE=LE(!1),Ka={},Bn=oi(Ka),ma=oi(Ka),ga=oi(Ka);function yi(t){if(t===Ka)throw Error(ee(174));return t}function vm(t,e){switch(Pe(ga,e),Pe(ma,t),Pe(Bn,Ka),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:id(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=id(e,t)}Fe(Bn),Pe(Bn,e)}function $o(){Fe(Bn),Fe(ma),Fe(ga)}function ME(t){yi(ga.current);var e=yi(Bn.current),n=id(e,t.type);e!==n&&(Pe(ma,t),Pe(Bn,n))}function ym(t){ma.current===t&&(Fe(Bn),Fe(ma))}var ze=oi(0);function Nu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var th=[];function wm(){for(var t=0;tn?n:4,t(!0);var r=nh.transition;nh.transition={};try{t(!1),e()}finally{Ce=n,nh.transition=r}}function JE(){return vn().memoizedState}function qO(t,e,n){var r=Hr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ZE(t))e_(e,n);else if(n=CE(t,e,n,r),n!==null){var i=$t();On(n,t,r,i),t_(n,e,r)}}function VO(t,e,n){var r=Hr(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ZE(t))e_(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,An(a,s)){var l=e.interleaved;l===null?(i.next=i,mm(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=CE(t,e,i,r),n!==null&&(i=$t(),On(n,t,r,i),t_(n,e,r))}}function ZE(t){var e=t.alternate;return t===He||e!==null&&e===He}function e_(t,e){Gs=Ou=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function t_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,tm(t,n)}}var Au={readContext:gn,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useInsertionEffect:_t,useLayoutEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useMutableSource:_t,useSyncExternalStore:_t,useId:_t,unstable_isNewReconciler:!1},zO={readContext:gn,useCallback:function(t,e){return Mn().memoizedState=[t,e===void 0?null:e],t},useContext:gn,useEffect:vy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Jl(4194308,4,WE.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Jl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Jl(4,2,t,e)},useMemo:function(t,e){var n=Mn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Mn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=qO.bind(null,He,t),[r.memoizedState,t]},useRef:function(t){var e=Mn();return t={current:t},e.memoizedState=t},useState:gy,useDebugValue:bm,useDeferredValue:function(t){return Mn().memoizedState=t},useTransition:function(){var t=gy(!1),e=t[0];return t=BO.bind(null,t[1]),Mn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=He,i=Mn();if(Be){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=e(),ut===null)throw Error(ee(349));Ci&30||jE(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,vy(BE.bind(null,r,o,t),[t]),r.flags|=2048,wa(9,UE.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Mn(),e=ut.identifierPrefix;if(Be){var n=er,r=Zn;n=(r&~(1<<32-Nn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=va++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[$n]=e,t[pa]=r,c_(t,e,!1,!1),e.stateNode=t;e:{switch(s=sd(n,r),n){case"dialog":De("cancel",t),De("close",t),i=r;break;case"iframe":case"object":case"embed":De("load",t),i=r;break;case"video":case"audio":for(i=0;ijo&&(e.flags|=128,r=!0,bs(o,!1),e.lanes=4194304)}else{if(!r)if(t=Nu(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),bs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Be)return Tt(e),null}else 2*Je()-o.renderingStartTime>jo&&n!==1073741824&&(e.flags|=128,r=!0,bs(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Je(),e.sibling=null,n=ze.current,Pe(ze,r?n&1|2:n&1),e):(Tt(e),null);case 22:case 23:return Cm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Xt&1073741824&&(Tt(e),e.subtreeFlags&6&&(e.flags|=8192)):Tt(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function JO(t,e){switch(cm(e),e.tag){case 1:return Wt(e.type)&&Eu(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return $o(),Fe(Kt),Fe(Rt),wm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ym(e),null;case 13:if(Fe(ze),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));Do()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Fe(ze),null;case 4:return $o(),null;case 10:return pm(e.type._context),null;case 22:case 23:return Cm(),null;case 24:return null;default:return null}}var Cl=!1,kt=!1,ZO=typeof WeakSet=="function"?WeakSet:Set,ae=null;function go(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(t,e,r)}else n.current=null}function Pd(t,e,n){try{n()}catch(r){Ge(t,e,r)}}var Iy=!1;function eA(t,e){if(gd=gu,t=gE(),lm(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,f=0,h=t,c=null;t:for(;;){for(var d;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(d=h.firstChild)!==null;)c=h,h=d;for(;;){if(h===t)break t;if(c===n&&++u===i&&(a=s),c===o&&++f===r&&(l=s),(d=h.nextSibling)!==null)break;h=c,c=h.parentNode}h=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(vd={focusedElem:t,selectionRange:n},gu=!1,ae=e;ae!==null;)if(e=ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ae=t;else for(;ae!==null;){e=ae;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,E=w.memoizedState,m=e.stateNode,p=m.getSnapshotBeforeUpdate(e.elementType===e.type?v:Tn(e.type,v),E);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(g){Ge(e,e.return,g)}if(t=e.sibling,t!==null){t.return=e.return,ae=t;break}ae=e.return}return w=Iy,Iy=!1,w}function Qs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Pd(e,n,o)}i=i.next}while(i!==r)}}function Oc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Ld(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function d_(t){var e=t.alternate;e!==null&&(t.alternate=null,d_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[$n],delete e[pa],delete e[Ed],delete e[MO],delete e[$O])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function p_(t){return t.tag===5||t.tag===3||t.tag===4}function Ny(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||p_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dd(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=wu));else if(r!==4&&(t=t.child,t!==null))for(Dd(t,e,n),t=t.sibling;t!==null;)Dd(t,e,n),t=t.sibling}function Md(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Md(t,e,n),t=t.sibling;t!==null;)Md(t,e,n),t=t.sibling}var dt=null,Sn=!1;function kr(t,e,n){for(n=n.child;n!==null;)m_(t,e,n),n=n.sibling}function m_(t,e,n){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(Ec,n)}catch{}switch(n.tag){case 5:kt||go(n,e);case 6:var r=dt,i=Sn;dt=null,kr(t,e,n),dt=r,Sn=i,dt!==null&&(Sn?(t=dt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(Sn?(t=dt,n=n.stateNode,t.nodeType===8?Zf(t.parentNode,n):t.nodeType===1&&Zf(t,n),ua(t)):Zf(dt,n.stateNode));break;case 4:r=dt,i=Sn,dt=n.stateNode.containerInfo,Sn=!0,kr(t,e,n),dt=r,Sn=i;break;case 0:case 11:case 14:case 15:if(!kt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Pd(n,e,s),i=i.next}while(i!==r)}kr(t,e,n);break;case 1:if(!kt&&(go(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ge(n,e,a)}kr(t,e,n);break;case 21:kr(t,e,n);break;case 22:n.mode&1?(kt=(r=kt)||n.memoizedState!==null,kr(t,e,n),kt=r):kr(t,e,n);break;default:kr(t,e,n)}}function Oy(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new ZO),e.forEach(function(r){var i=uA.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function _n(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nA(r/1960))-r,10t?16:t,Mr===null)var r=!1;else{if(t=Mr,Mr=null,Ru=0,Ie&6)throw Error(ee(331));var i=Ie;for(Ie|=4,ae=t.current;ae!==null;){var o=ae,s=o.child;if(ae.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lJe()-Om?bi(t,0):Nm|=n),Gt(t,e)}function S_(t,e){e===0&&(t.mode&1?(e=_l,_l<<=1,!(_l&130023424)&&(_l=4194304)):e=1);var n=$t();t=hr(t,e),t!==null&&(Va(t,e,n),Gt(t,n))}function lA(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),S_(t,n)}function uA(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ee(314))}r!==null&&r.delete(e),S_(t,n)}var b_;b_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Kt.current)Ht=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ht=!1,YO(t,e,n);Ht=!!(t.flags&131072)}else Ht=!1,Be&&e.flags&1048576&&NE(e,Su,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Zl(t,e),t=e.pendingProps;var i=Lo(e,Rt.current);bo(e,n),i=_m(null,e,r,t,i,n);var o=Tm();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Wt(r)?(o=!0,_u(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,gm(e),i.updater=Ic,e.stateNode=i,i._reactInternals=e,Id(e,r,t,n),e=Ad(null,e,r,!0,o,n)):(e.tag=0,Be&&o&&um(e),Dt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Zl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=fA(r),t=Tn(r,t),i){case 0:e=Od(null,e,r,t,n);break e;case 1:e=Sy(null,e,r,t,n);break e;case 11:e=_y(null,e,r,t,n);break e;case 14:e=Ty(null,e,r,Tn(r.type,t),n);break e}throw Error(ee(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Od(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Sy(t,e,r,i,n);case 3:e:{if(a_(e),t===null)throw Error(ee(387));r=e.pendingProps,o=e.memoizedState,i=o.element,xE(t,e),Iu(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Fo(Error(ee(423)),e),e=by(t,e,r,n,i);break e}else if(r!==i){i=Fo(Error(ee(424)),e),e=by(t,e,r,n,i);break e}else for(en=qr(e.stateNode.containerInfo.firstChild),nn=e,Be=!0,bn=null,n=DE(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Do(),r===i){e=dr(t,e,n);break e}Dt(t,e,r,n)}e=e.child}return e;case 5:return ME(e),t===null&&Sd(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,yd(r,i)?s=null:o!==null&&yd(r,o)&&(e.flags|=32),s_(t,e),Dt(t,e,s,n),e.child;case 6:return t===null&&Sd(e),null;case 13:return l_(t,e,n);case 4:return vm(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Mo(e,null,r,n):Dt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),_y(t,e,r,i,n);case 7:return Dt(t,e,e.pendingProps,n),e.child;case 8:return Dt(t,e,e.pendingProps.children,n),e.child;case 12:return Dt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Pe(bu,r._currentValue),r._currentValue=s,o!==null)if(An(o.value,s)){if(o.children===i.children&&!Kt.current){e=dr(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=or(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),bd(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),bd(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Dt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,bo(e,n),i=gn(i),r=r(i),e.flags|=1,Dt(t,e,r,n),e.child;case 14:return r=e.type,i=Tn(r,e.pendingProps),i=Tn(r.type,i),Ty(t,e,r,i,n);case 15:return i_(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Zl(t,e),e.tag=1,Wt(r)?(t=!0,_u(e)):t=!1,bo(e,n),PE(e,r,i),Id(e,r,i,n),Ad(null,e,r,!0,t,n);case 19:return u_(t,e,n);case 22:return o_(t,e,n)}throw Error(ee(156,e.tag))};function k_(t,e){return Xw(t,e)}function cA(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(t,e,n,r){return new cA(t,e,n,r)}function Rm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function fA(t){if(typeof t=="function")return Rm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Xp)return 11;if(t===Jp)return 14}return 2}function Kr(t,e){var n=t.alternate;return n===null?(n=hn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function nu(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")Rm(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case so:return ki(n.children,i,o,e);case Yp:s=8,i|=8;break;case Yh:return t=hn(12,n,e,i|2),t.elementType=Yh,t.lanes=o,t;case Xh:return t=hn(13,n,e,i),t.elementType=Xh,t.lanes=o,t;case Jh:return t=hn(19,n,e,i),t.elementType=Jh,t.lanes=o,t;case Lw:return Cc(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Rw:s=10;break e;case Pw:s=9;break e;case Xp:s=11;break e;case Jp:s=14;break e;case Nr:s=16,r=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=hn(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function ki(t,e,n,r){return t=hn(7,t,r,e),t.lanes=n,t}function Cc(t,e,n,r){return t=hn(22,t,r,e),t.elementType=Lw,t.lanes=n,t.stateNode={isHidden:!1},t}function ah(t,e,n){return t=hn(6,t,null,e),t.lanes=n,t}function lh(t,e,n){return e=hn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function hA(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qf(0),this.expirationTimes=qf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pm(t,e,n,r,i,o,s,a,l){return t=new hA(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=hn(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gm(o),t}function dA(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A_)}catch(t){console.error(t)}}A_(),Nw.exports=an;var $m=Nw.exports;const yo=Ba($m);var My=$m;Gh.createRoot=My.createRoot,Gh.hydrateRoot=My.hydrateRoot;/** +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function oh(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Nd(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var WO=typeof WeakMap=="function"?WeakMap:Map;function n_(t,e,n){n=or(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){xu||(xu=!0,$d=r),Nd(t,e)},n}function r_(t,e,n){n=or(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Nd(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Nd(t,e),typeof r!="function"&&(zr===null?zr=new Set([this]):zr.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function yy(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new WO;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=aA.bind(null,t,e,n),e.then(t,t))}function wy(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ey(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=or(-1,1),e.tag=2,Vr(n,e,1))),n.lanes|=1),t)}var GO=_r.ReactCurrentOwner,Ht=!1;function Dt(t,e,n,r){e.child=t===null?DE(e,null,n,r):Mo(e,t.child,n,r)}function _y(t,e,n,r,i){n=n.render;var o=e.ref;return bo(e,i),r=_m(t,e,n,r,o,i),n=Tm(),t!==null&&!Ht?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,dr(t,e,i)):(Be&&n&&um(e),e.flags|=1,Dt(t,e,r,i),e.child)}function Ty(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!Rm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,i_(t,e,o,r,i)):(t=nu(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:fa,n(s,r)&&t.ref===e.ref)return dr(t,e,i)}return e.flags|=1,t=Kr(o,r),t.ref=e.ref,t.return=e,e.child=t}function i_(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(fa(o,r)&&t.ref===e.ref)if(Ht=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(Ht=!0);else return e.lanes=t.lanes,dr(t,e,i)}return Od(t,e,n,r,i)}function o_(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(vo,Xt),Xt|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Pe(vo,Xt),Xt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Pe(vo,Xt),Xt|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Pe(vo,Xt),Xt|=r;return Dt(t,e,i,n),e.child}function s_(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Od(t,e,n,r,i){var o=Wt(n)?Oi:Rt.current;return o=Lo(e,o),bo(e,i),n=_m(t,e,n,r,o,i),r=Tm(),t!==null&&!Ht?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,dr(t,e,i)):(Be&&r&&um(e),e.flags|=1,Dt(t,e,n,i),e.child)}function Sy(t,e,n,r,i){if(Wt(n)){var o=!0;_u(e)}else o=!1;if(bo(e,i),e.stateNode===null)Zl(t,e),PE(e,n,r),Id(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=gn(u):(u=Wt(n)?Oi:Rt.current,u=Lo(e,u));var c=n.getDerivedStateFromProps,h=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&py(e,s,r,u),Or=!1;var f=e.memoizedState;s.state=f,Iu(e,r,s,i),l=e.memoizedState,a!==r||f!==l||Kt.current||Or?(typeof c=="function"&&(kd(e,n,c,r),l=e.memoizedState),(a=Or||dy(e,n,a,r,f,l,u))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,xE(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Tn(e.type,a),s.props=u,h=e.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=gn(l):(l=Wt(n)?Oi:Rt.current,l=Lo(e,l));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||f!==l)&&py(e,s,r,l),Or=!1,f=e.memoizedState,s.state=f,Iu(e,r,s,i);var w=e.memoizedState;a!==h||f!==w||Kt.current||Or?(typeof d=="function"&&(kd(e,n,d,r),w=e.memoizedState),(u=Or||dy(e,n,u,r,f,w,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,w,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,w,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=w),s.props=r,s.state=w,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return Ad(t,e,n,r,o,i)}function Ad(t,e,n,r,i,o){s_(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&ly(e,n,!1),dr(t,e,o);r=e.stateNode,GO.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=Mo(e,t.child,null,o),e.child=Mo(e,null,a,o)):Dt(t,e,a,o),e.memoizedState=r.state,i&&ly(e,n,!0),e.child}function a_(t){var e=t.stateNode;e.pendingContext?ay(t,e.pendingContext,e.pendingContext!==e.context):e.context&&ay(t,e.context,!1),vm(t,e.containerInfo)}function by(t,e,n,r,i){return Do(),fm(i),e.flags|=256,Dt(t,e,n,r),e.child}var Cd={dehydrated:null,treeContext:null,retryLane:0};function xd(t){return{baseLanes:t,cachePool:null,transitions:null}}function l_(t,e,n){var r=e.pendingProps,i=ze.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Pe(ze,i&1),t===null)return Sd(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Cc(s,r,0,null),t=ki(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=xd(n),e.memoizedState=Cd,t):km(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return QO(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Kr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Kr(a,o):(o=ki(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?xd(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=Cd,r}return o=t.child,t=o.sibling,r=Kr(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function km(t,e){return e=Cc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Al(t,e,n,r){return r!==null&&fm(r),Mo(e,t.child,null,n),t=km(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function QO(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=oh(Error(ee(422))),Al(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Cc({mode:"visible",children:r.children},i,0,null),o=ki(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&Mo(e,t.child,null,s),e.child.memoizedState=xd(s),e.memoizedState=Cd,o);if(!(e.mode&1))return Al(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ee(419)),r=oh(o,r,void 0),Al(t,e,s,r)}if(a=(s&t.childLanes)!==0,Ht||a){if(r=ut,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,hr(t,i),On(r,t,i,-1))}return xm(),r=oh(Error(ee(421))),Al(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=lA.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,en=qr(i.nextSibling),nn=e,Be=!0,bn=null,t!==null&&(un[cn++]=Zn,un[cn++]=er,un[cn++]=Ai,Zn=t.id,er=t.overflow,Ai=e),e=km(e,r.children),e.flags|=4096,e)}function ky(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),bd(t.return,e,n)}function sh(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function u_(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Dt(t,e,r.children,n),r=ze.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ky(t,n,e);else if(t.tag===19)ky(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Pe(ze,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Nu(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),sh(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Nu(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}sh(e,!0,n,null,o);break;case"together":sh(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Zl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function dr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),xi|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ee(153));if(e.child!==null){for(t=e.child,n=Kr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Kr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function YO(t,e,n){switch(e.tag){case 3:a_(e),Do();break;case 5:ME(e);break;case 1:Wt(e.type)&&_u(e);break;case 4:vm(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Pe(bu,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Pe(ze,ze.current&1),e.flags|=128,null):n&e.child.childLanes?l_(t,e,n):(Pe(ze,ze.current&1),t=dr(t,e,n),t!==null?t.sibling:null);Pe(ze,ze.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return u_(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Pe(ze,ze.current),r)break;return null;case 22:case 23:return e.lanes=0,o_(t,e,n)}return dr(t,e,n)}var c_,Rd,f_,h_;c_=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rd=function(){};f_=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,yi(Bn.current);var o=null;switch(n){case"input":i=ed(t,i),r=ed(t,r),o=[];break;case"select":i=Ke({},i,{value:void 0}),r=Ke({},r,{value:void 0}),o=[];break;case"textarea":i=rd(t,i),r=rd(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=wu)}od(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ia.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ia.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&De("scroll",t),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};h_=function(t,e,n,r){n!==r&&(e.flags|=4)};function bs(t,e){if(!Be)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Tt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function XO(t,e,n){var r=e.pendingProps;switch(cm(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(e),null;case 1:return Wt(e.type)&&Eu(),Tt(e),null;case 3:return r=e.stateNode,$o(),Fe(Kt),Fe(Rt),wm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Nl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,bn!==null&&(Ud(bn),bn=null))),Rd(t,e),Tt(e),null;case 5:ym(e);var i=yi(ga.current);if(n=e.type,t!==null&&e.stateNode!=null)f_(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(ee(166));return Tt(e),null}if(t=yi(Bn.current),Nl(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[$n]=e,r[pa]=o,t=(e.mode&1)!==0,n){case"dialog":De("cancel",r),De("close",r);break;case"iframe":case"object":case"embed":De("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[$n]=e,t[pa]=r,c_(t,e,!1,!1),e.stateNode=t;e:{switch(s=sd(n,r),n){case"dialog":De("cancel",t),De("close",t),i=r;break;case"iframe":case"object":case"embed":De("load",t),i=r;break;case"video":case"audio":for(i=0;ijo&&(e.flags|=128,r=!0,bs(o,!1),e.lanes=4194304)}else{if(!r)if(t=Nu(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),bs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Be)return Tt(e),null}else 2*Je()-o.renderingStartTime>jo&&n!==1073741824&&(e.flags|=128,r=!0,bs(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Je(),e.sibling=null,n=ze.current,Pe(ze,r?n&1|2:n&1),e):(Tt(e),null);case 22:case 23:return Cm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Xt&1073741824&&(Tt(e),e.subtreeFlags&6&&(e.flags|=8192)):Tt(e),null;case 24:return null;case 25:return null}throw Error(ee(156,e.tag))}function JO(t,e){switch(cm(e),e.tag){case 1:return Wt(e.type)&&Eu(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return $o(),Fe(Kt),Fe(Rt),wm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ym(e),null;case 13:if(Fe(ze),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ee(340));Do()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Fe(ze),null;case 4:return $o(),null;case 10:return pm(e.type._context),null;case 22:case 23:return Cm(),null;case 24:return null;default:return null}}var Cl=!1,kt=!1,ZO=typeof WeakSet=="function"?WeakSet:Set,ae=null;function go(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(t,e,r)}else n.current=null}function Pd(t,e,n){try{n()}catch(r){Ge(t,e,r)}}var Iy=!1;function eA(t,e){if(gd=gu,t=gE(),lm(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,h=t,f=null;t:for(;;){for(var d;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(vd={focusedElem:t,selectionRange:n},gu=!1,ae=e;ae!==null;)if(e=ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ae=t;else for(;ae!==null;){e=ae;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,E=w.memoizedState,m=e.stateNode,p=m.getSnapshotBeforeUpdate(e.elementType===e.type?v:Tn(e.type,v),E);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ee(163))}}catch(g){Ge(e,e.return,g)}if(t=e.sibling,t!==null){t.return=e.return,ae=t;break}ae=e.return}return w=Iy,Iy=!1,w}function Qs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Pd(e,n,o)}i=i.next}while(i!==r)}}function Oc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Ld(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function d_(t){var e=t.alternate;e!==null&&(t.alternate=null,d_(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[$n],delete e[pa],delete e[Ed],delete e[MO],delete e[$O])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function p_(t){return t.tag===5||t.tag===3||t.tag===4}function Ny(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||p_(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dd(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=wu));else if(r!==4&&(t=t.child,t!==null))for(Dd(t,e,n),t=t.sibling;t!==null;)Dd(t,e,n),t=t.sibling}function Md(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Md(t,e,n),t=t.sibling;t!==null;)Md(t,e,n),t=t.sibling}var dt=null,Sn=!1;function kr(t,e,n){for(n=n.child;n!==null;)m_(t,e,n),n=n.sibling}function m_(t,e,n){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(Ec,n)}catch{}switch(n.tag){case 5:kt||go(n,e);case 6:var r=dt,i=Sn;dt=null,kr(t,e,n),dt=r,Sn=i,dt!==null&&(Sn?(t=dt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(Sn?(t=dt,n=n.stateNode,t.nodeType===8?Zf(t.parentNode,n):t.nodeType===1&&Zf(t,n),ua(t)):Zf(dt,n.stateNode));break;case 4:r=dt,i=Sn,dt=n.stateNode.containerInfo,Sn=!0,kr(t,e,n),dt=r,Sn=i;break;case 0:case 11:case 14:case 15:if(!kt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Pd(n,e,s),i=i.next}while(i!==r)}kr(t,e,n);break;case 1:if(!kt&&(go(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ge(n,e,a)}kr(t,e,n);break;case 21:kr(t,e,n);break;case 22:n.mode&1?(kt=(r=kt)||n.memoizedState!==null,kr(t,e,n),kt=r):kr(t,e,n);break;default:kr(t,e,n)}}function Oy(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new ZO),e.forEach(function(r){var i=uA.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function _n(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nA(r/1960))-r,10t?16:t,Mr===null)var r=!1;else{if(t=Mr,Mr=null,Ru=0,Ie&6)throw Error(ee(331));var i=Ie;for(Ie|=4,ae=t.current;ae!==null;){var o=ae,s=o.child;if(ae.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lJe()-Om?bi(t,0):Nm|=n),Gt(t,e)}function S_(t,e){e===0&&(t.mode&1?(e=_l,_l<<=1,!(_l&130023424)&&(_l=4194304)):e=1);var n=$t();t=hr(t,e),t!==null&&(Va(t,e,n),Gt(t,n))}function lA(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),S_(t,n)}function uA(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ee(314))}r!==null&&r.delete(e),S_(t,n)}var b_;b_=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Kt.current)Ht=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ht=!1,YO(t,e,n);Ht=!!(t.flags&131072)}else Ht=!1,Be&&e.flags&1048576&&NE(e,Su,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Zl(t,e),t=e.pendingProps;var i=Lo(e,Rt.current);bo(e,n),i=_m(null,e,r,t,i,n);var o=Tm();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Wt(r)?(o=!0,_u(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,gm(e),i.updater=Ic,e.stateNode=i,i._reactInternals=e,Id(e,r,t,n),e=Ad(null,e,r,!0,o,n)):(e.tag=0,Be&&o&&um(e),Dt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Zl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=fA(r),t=Tn(r,t),i){case 0:e=Od(null,e,r,t,n);break e;case 1:e=Sy(null,e,r,t,n);break e;case 11:e=_y(null,e,r,t,n);break e;case 14:e=Ty(null,e,r,Tn(r.type,t),n);break e}throw Error(ee(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Od(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Sy(t,e,r,i,n);case 3:e:{if(a_(e),t===null)throw Error(ee(387));r=e.pendingProps,o=e.memoizedState,i=o.element,xE(t,e),Iu(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Fo(Error(ee(423)),e),e=by(t,e,r,n,i);break e}else if(r!==i){i=Fo(Error(ee(424)),e),e=by(t,e,r,n,i);break e}else for(en=qr(e.stateNode.containerInfo.firstChild),nn=e,Be=!0,bn=null,n=DE(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Do(),r===i){e=dr(t,e,n);break e}Dt(t,e,r,n)}e=e.child}return e;case 5:return ME(e),t===null&&Sd(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,yd(r,i)?s=null:o!==null&&yd(r,o)&&(e.flags|=32),s_(t,e),Dt(t,e,s,n),e.child;case 6:return t===null&&Sd(e),null;case 13:return l_(t,e,n);case 4:return vm(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Mo(e,null,r,n):Dt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),_y(t,e,r,i,n);case 7:return Dt(t,e,e.pendingProps,n),e.child;case 8:return Dt(t,e,e.pendingProps.children,n),e.child;case 12:return Dt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Pe(bu,r._currentValue),r._currentValue=s,o!==null)if(An(o.value,s)){if(o.children===i.children&&!Kt.current){e=dr(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=or(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),bd(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),bd(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Dt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,bo(e,n),i=gn(i),r=r(i),e.flags|=1,Dt(t,e,r,n),e.child;case 14:return r=e.type,i=Tn(r,e.pendingProps),i=Tn(r.type,i),Ty(t,e,r,i,n);case 15:return i_(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Tn(r,i),Zl(t,e),e.tag=1,Wt(r)?(t=!0,_u(e)):t=!1,bo(e,n),PE(e,r,i),Id(e,r,i,n),Ad(null,e,r,!0,t,n);case 19:return u_(t,e,n);case 22:return o_(t,e,n)}throw Error(ee(156,e.tag))};function k_(t,e){return Xw(t,e)}function cA(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(t,e,n,r){return new cA(t,e,n,r)}function Rm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function fA(t){if(typeof t=="function")return Rm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Xp)return 11;if(t===Jp)return 14}return 2}function Kr(t,e){var n=t.alternate;return n===null?(n=hn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function nu(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")Rm(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case so:return ki(n.children,i,o,e);case Yp:s=8,i|=8;break;case Yh:return t=hn(12,n,e,i|2),t.elementType=Yh,t.lanes=o,t;case Xh:return t=hn(13,n,e,i),t.elementType=Xh,t.lanes=o,t;case Jh:return t=hn(19,n,e,i),t.elementType=Jh,t.lanes=o,t;case Lw:return Cc(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Rw:s=10;break e;case Pw:s=9;break e;case Xp:s=11;break e;case Jp:s=14;break e;case Nr:s=16,r=null;break e}throw Error(ee(130,t==null?t:typeof t,""))}return e=hn(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function ki(t,e,n,r){return t=hn(7,t,r,e),t.lanes=n,t}function Cc(t,e,n,r){return t=hn(22,t,r,e),t.elementType=Lw,t.lanes=n,t.stateNode={isHidden:!1},t}function ah(t,e,n){return t=hn(6,t,null,e),t.lanes=n,t}function lh(t,e,n){return e=hn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function hA(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qf(0),this.expirationTimes=qf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pm(t,e,n,r,i,o,s,a,l){return t=new hA(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=hn(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gm(o),t}function dA(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A_)}catch(t){console.error(t)}}A_(),Nw.exports=an;var $m=Nw.exports;const yo=Ba($m);var My=$m;Gh.createRoot=My.createRoot,Gh.hydrateRoot=My.hydrateRoot;/** * @remix-run/router v1.6.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function _a(){return _a=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Dc(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function wA(){return Math.random().toString(36).substr(2,8)}function Fy(t,e){return{usr:t.state,key:t.key,idx:e}}function Bd(t,e,n,r){return n===void 0&&(n=null),_a({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Vi(e):e,{state:n,key:e&&e.key||r||wA()})}function Du(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Vi(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function EA(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=$r.Pop,l=null,u=f();u==null&&(u=0,s.replaceState(_a({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function h(){a=$r.Pop;let E=f(),m=E==null?null:E-u;u=E,l&&l({action:a,location:v.location,delta:m})}function c(E,m){a=$r.Push;let p=Bd(v.location,E,m);n&&n(p,E),u=f()+1;let y=Fy(p,u),g=v.createHref(p);try{s.pushState(y,"",g)}catch{i.location.assign(g)}o&&l&&l({action:a,location:v.location,delta:1})}function d(E,m){a=$r.Replace;let p=Bd(v.location,E,m);n&&n(p,E),u=f();let y=Fy(p,u),g=v.createHref(p);s.replaceState(y,"",g),o&&l&&l({action:a,location:v.location,delta:0})}function w(E){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof E=="string"?E:Du(E);return rt(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let v={get action(){return a},get location(){return t(i,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($y,h),l=E,()=>{i.removeEventListener($y,h),l=null}},createHref(E){return e(i,E)},createURL:w,encodeLocation(E){let m=w(E);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:c,replace:d,go(E){return s.go(E)}};return v}var jy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(jy||(jy={}));function _A(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Vi(e):e,i=Fm(r.pathname||"/",n);if(i==null)return null;let o=C_(t);TA(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(rt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Wr([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(rt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),C_(o.children,e,f,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:AA(u,o.index),routesMeta:f})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of x_(o.path))i(o,s,l)}),e}function x_(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=x_(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function TA(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:CA(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const SA=/^:\w+$/,bA=3,kA=2,IA=1,NA=10,OA=-2,Uy=t=>t==="*";function AA(t,e){let n=t.split("/"),r=n.length;return n.some(Uy)&&(r+=OA),e&&(r+=kA),n.filter(i=>!Uy(i)).reduce((i,o)=>i+(SA.test(o)?bA:o===""?IA:NA),r)}function CA(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function xA(t,e){let{routesMeta:n}=t,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let c=a[h]||"";s=o.slice(0,o.length-c.length).replace(/(.)\/+$/,"$1")}return u[f]=DA(a[h]||"",f),u},{}),pathname:o,pathnameBase:s,pattern:t}}function PA(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Dc(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function LA(t){try{return decodeURI(t)}catch(e){return Dc(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function DA(t,e){try{return decodeURIComponent(t)}catch(n){return Dc(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function Fm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function MA(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Vi(t):t;return{pathname:n?n.startsWith("/")?n:$A(n,e):e,search:jA(r),hash:UA(i)}}function $A(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function uh(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function R_(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function P_(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Vi(t):(i=_a({},t),rt(!i.pathname||!i.pathname.includes("?"),uh("?","pathname","search",i)),rt(!i.pathname||!i.pathname.includes("#"),uh("#","pathname","hash",i)),rt(!i.search||!i.search.includes("#"),uh("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=e.length-1;if(s.startsWith("..")){let c=s.split("/");for(;c[0]==="..";)c.shift(),h-=1;i.pathname=c.join("/")}a=h>=0?e[h]:"/"}let l=MA(i,a),u=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Wr=t=>t.join("/").replace(/\/\/+/g,"/"),FA=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jA=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,UA=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function BA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}/** + */function _a(){return _a=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Dc(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function wA(){return Math.random().toString(36).substr(2,8)}function Fy(t,e){return{usr:t.state,key:t.key,idx:e}}function Bd(t,e,n,r){return n===void 0&&(n=null),_a({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Vi(e):e,{state:n,key:e&&e.key||r||wA()})}function Du(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Vi(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function EA(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=$r.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(_a({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function h(){a=$r.Pop;let E=c(),m=E==null?null:E-u;u=E,l&&l({action:a,location:v.location,delta:m})}function f(E,m){a=$r.Push;let p=Bd(v.location,E,m);n&&n(p,E),u=c()+1;let y=Fy(p,u),g=v.createHref(p);try{s.pushState(y,"",g)}catch{i.location.assign(g)}o&&l&&l({action:a,location:v.location,delta:1})}function d(E,m){a=$r.Replace;let p=Bd(v.location,E,m);n&&n(p,E),u=c();let y=Fy(p,u),g=v.createHref(p);s.replaceState(y,"",g),o&&l&&l({action:a,location:v.location,delta:0})}function w(E){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof E=="string"?E:Du(E);return rt(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let v={get action(){return a},get location(){return t(i,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($y,h),l=E,()=>{i.removeEventListener($y,h),l=null}},createHref(E){return e(i,E)},createURL:w,encodeLocation(E){let m=w(E);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:d,go(E){return s.go(E)}};return v}var jy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(jy||(jy={}));function _A(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?Vi(e):e,i=Fm(r.pathname||"/",n);if(i==null)return null;let o=C_(t);TA(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(rt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Wr([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(rt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),C_(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:AA(u,o.index),routesMeta:c})};return t.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of x_(o.path))i(o,s,l)}),e}function x_(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=x_(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function TA(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:CA(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const SA=/^:\w+$/,bA=3,kA=2,IA=1,NA=10,OA=-2,Uy=t=>t==="*";function AA(t,e){let n=t.split("/"),r=n.length;return n.some(Uy)&&(r+=OA),e&&(r+=kA),n.filter(i=>!Uy(i)).reduce((i,o)=>i+(SA.test(o)?bA:o===""?IA:NA),r)}function CA(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function xA(t,e){let{routesMeta:n}=t,r={},i="/",o=[];for(let s=0;s{if(c==="*"){let f=a[h]||"";s=o.slice(0,o.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=DA(a[h]||"",c),u},{}),pathname:o,pathnameBase:s,pattern:t}}function PA(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Dc(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function LA(t){try{return decodeURI(t)}catch(e){return Dc(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function DA(t,e){try{return decodeURIComponent(t)}catch(n){return Dc(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function Fm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function MA(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Vi(t):t;return{pathname:n?n.startsWith("/")?n:$A(n,e):e,search:jA(r),hash:UA(i)}}function $A(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function uh(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function R_(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function P_(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Vi(t):(i=_a({},t),rt(!i.pathname||!i.pathname.includes("?"),uh("?","pathname","search",i)),rt(!i.pathname||!i.pathname.includes("#"),uh("#","pathname","hash",i)),rt(!i.search||!i.search.includes("#"),uh("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=e.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}a=h>=0?e[h]:"/"}let l=MA(i,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Wr=t=>t.join("/").replace(/\/\/+/g,"/"),FA=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jA=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,UA=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function BA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}/** * React Router v6.11.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Mu(){return Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;ea.pathnameBase)),o=L.useRef(!1);return D_(()=>{o.current=!0}),L.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){e.go(a);return}let u=P_(a,JSON.parse(i),r,l.relative==="path");t!=="/"&&(u.pathname=u.pathname==="/"?t:Wr([t,u.pathname])),(l.replace?e.replace:e.push)(u,l.state,l)},[t,e,i,r])}function M_(){let{matches:t}=L.useContext(zi),e=t[t.length-1];return e?e.params:{}}function $_(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=L.useContext(zi),{pathname:i}=$c(),o=JSON.stringify(R_(r).map(s=>s.pathnameBase));return L.useMemo(()=>P_(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function HA(t,e){return KA(t,e)}function KA(t,e,n){Wa()||rt(!1);let{navigator:r}=L.useContext(Zo),{matches:i}=L.useContext(zi),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=$c(),u;if(e){var f;let v=typeof e=="string"?Vi(e):e;a==="/"||(f=v.pathname)!=null&&f.startsWith(a)||rt(!1),u=v}else u=l;let h=u.pathname||"/",c=a==="/"?h:h.slice(a.length)||"/",d=_A(t,{pathname:c}),w=XA(d&&d.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Wr([a,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:Wr([a,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n);return e&&w?L.createElement(Mc.Provider,{value:{location:Mu({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:$r.Pop}},w):w}function WA(){let t=tC(),e=BA(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),n?L.createElement("pre",{style:i},n):null,o)}const GA=L.createElement(WA,null);class QA extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?L.createElement(zi.Provider,{value:this.props.routeContext},L.createElement(L_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YA(t){let{routeContext:e,match:n,children:r}=t,i=L.useContext(jm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),L.createElement(zi.Provider,{value:e},r)}function XA(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let o=t,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||rt(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,l,u)=>{let f=l.route.id?s==null?void 0:s[l.route.id]:null,h=null;n&&(h=l.route.errorElement||GA);let c=e.concat(o.slice(0,u+1)),d=()=>{let w;return f?w=h:l.route.element?w=l.route.element:w=a,L.createElement(YA,{match:l,routeContext:{outlet:a,matches:c},children:w})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?L.createElement(QA,{location:n.location,revalidation:n.revalidation,component:h,error:f,children:d(),routeContext:{outlet:null,matches:c}}):d()},null)}var qd;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate"})(qd||(qd={}));var Ta;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId"})(Ta||(Ta={}));function JA(t){let e=L.useContext(jm);return e||rt(!1),e}function ZA(t){let e=L.useContext(qA);return e||rt(!1),e}function eC(t){let e=L.useContext(zi);return e||rt(!1),e}function F_(t){let e=eC(),n=e.matches[e.matches.length-1];return n.route.id||rt(!1),n.route.id}function tC(){var t;let e=L.useContext(L_),n=ZA(Ta.UseRouteError),r=F_(Ta.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function nC(){let{router:t}=JA(qd.UseNavigateStable),e=F_(Ta.UseNavigateStable),n=L.useRef(!1);return D_(()=>{n.current=!0}),L.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Mu({fromRouteId:e},o)))},[t,e])}function ht(t){rt(!1)}function rC(t){let{basename:e="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:o,static:s=!1}=t;Wa()&&rt(!1);let a=e.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Vi(r));let{pathname:u="/",search:f="",hash:h="",state:c=null,key:d="default"}=r,w=L.useMemo(()=>{let v=Fm(u,a);return v==null?null:{location:{pathname:v,search:f,hash:h,state:c,key:d},navigationType:i}},[a,u,f,h,c,d,i]);return w==null?null:L.createElement(Zo.Provider,{value:l},L.createElement(Mc.Provider,{children:n,value:w}))}function iC(t){let{children:e,location:n}=t;return HA(Vd(e),n)}var By;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(By||(By={}));new Promise(()=>{});function Vd(t,e){e===void 0&&(e=[]);let n=[];return L.Children.forEach(t,(r,i)=>{if(!L.isValidElement(r))return;let o=[...e,i];if(r.type===L.Fragment){n.push.apply(n,Vd(r.props.children,o));return}r.type!==ht&&rt(!1),!r.props.index||!r.props.children||rt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Vd(r.props.children,o)),n.push(s)}),n}/** + */function Mu(){return Mu=Object.assign?Object.assign.bind():function(t){for(var e=1;ea.pathnameBase)),o=L.useRef(!1);return D_(()=>{o.current=!0}),L.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){e.go(a);return}let u=P_(a,JSON.parse(i),r,l.relative==="path");t!=="/"&&(u.pathname=u.pathname==="/"?t:Wr([t,u.pathname])),(l.replace?e.replace:e.push)(u,l.state,l)},[t,e,i,r])}function M_(){let{matches:t}=L.useContext(zi),e=t[t.length-1];return e?e.params:{}}function $_(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=L.useContext(zi),{pathname:i}=$c(),o=JSON.stringify(R_(r).map(s=>s.pathnameBase));return L.useMemo(()=>P_(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function HA(t,e){return KA(t,e)}function KA(t,e,n){Wa()||rt(!1);let{navigator:r}=L.useContext(Zo),{matches:i}=L.useContext(zi),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=$c(),u;if(e){var c;let v=typeof e=="string"?Vi(e):e;a==="/"||(c=v.pathname)!=null&&c.startsWith(a)||rt(!1),u=v}else u=l;let h=u.pathname||"/",f=a==="/"?h:h.slice(a.length)||"/",d=_A(t,{pathname:f}),w=XA(d&&d.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Wr([a,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?a:Wr([a,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n);return e&&w?L.createElement(Mc.Provider,{value:{location:Mu({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:$r.Pop}},w):w}function WA(){let t=tC(),e=BA(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),n?L.createElement("pre",{style:i},n):null,o)}const GA=L.createElement(WA,null);class QA extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?L.createElement(zi.Provider,{value:this.props.routeContext},L.createElement(L_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YA(t){let{routeContext:e,match:n,children:r}=t,i=L.useContext(jm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),L.createElement(zi.Provider,{value:e},r)}function XA(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let o=t,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||rt(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,h=null;n&&(h=l.route.errorElement||GA);let f=e.concat(o.slice(0,u+1)),d=()=>{let w;return c?w=h:l.route.element?w=l.route.element:w=a,L.createElement(YA,{match:l,routeContext:{outlet:a,matches:f},children:w})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?L.createElement(QA,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:d(),routeContext:{outlet:null,matches:f}}):d()},null)}var qd;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate"})(qd||(qd={}));var Ta;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId"})(Ta||(Ta={}));function JA(t){let e=L.useContext(jm);return e||rt(!1),e}function ZA(t){let e=L.useContext(qA);return e||rt(!1),e}function eC(t){let e=L.useContext(zi);return e||rt(!1),e}function F_(t){let e=eC(),n=e.matches[e.matches.length-1];return n.route.id||rt(!1),n.route.id}function tC(){var t;let e=L.useContext(L_),n=ZA(Ta.UseRouteError),r=F_(Ta.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function nC(){let{router:t}=JA(qd.UseNavigateStable),e=F_(Ta.UseNavigateStable),n=L.useRef(!1);return D_(()=>{n.current=!0}),L.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Mu({fromRouteId:e},o)))},[t,e])}function ht(t){rt(!1)}function rC(t){let{basename:e="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:o,static:s=!1}=t;Wa()&&rt(!1);let a=e.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Vi(r));let{pathname:u="/",search:c="",hash:h="",state:f=null,key:d="default"}=r,w=L.useMemo(()=>{let v=Fm(u,a);return v==null?null:{location:{pathname:v,search:c,hash:h,state:f,key:d},navigationType:i}},[a,u,c,h,f,d,i]);return w==null?null:L.createElement(Zo.Provider,{value:l},L.createElement(Mc.Provider,{children:n,value:w}))}function iC(t){let{children:e,location:n}=t;return HA(Vd(e),n)}var By;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(By||(By={}));new Promise(()=>{});function Vd(t,e){e===void 0&&(e=[]);let n=[];return L.Children.forEach(t,(r,i)=>{if(!L.isValidElement(r))return;let o=[...e,i];if(r.type===L.Fragment){n.push.apply(n,Vd(r.props.children,o));return}r.type!==ht&&rt(!1),!r.props.index||!r.props.children||rt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Vd(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.11.0 * * Copyright (c) Remix Software Inc. @@ -64,11 +64,11 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zd(){return zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function sC(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function aC(t,e){return t.button===0&&(!e||e==="_self")&&!sC(t)}const lC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function uC(t){let{basename:e,children:n,window:r}=t,i=L.useRef();i.current==null&&(i.current=yA({window:r,v5Compat:!0}));let o=i.current,[s,a]=L.useState({action:o.action,location:o.location});return L.useLayoutEffect(()=>o.listen(a),[o]),L.createElement(rC,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:o})}const cC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mt=L.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:f}=e,h=oC(e,lC),{basename:c}=L.useContext(Zo),d,w=!1;if(typeof u=="string"&&fC.test(u)&&(d=u,cC))try{let p=new URL(window.location.href),y=u.startsWith("//")?new URL(p.protocol+u):new URL(u),g=Fm(y.pathname,c);y.origin===p.origin&&g!=null?u=g+y.search+y.hash:w=!0}catch{}let v=VA(u,{relative:i}),E=hC(u,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function m(p){r&&r(p),p.defaultPrevented||E(p)}return L.createElement("a",zd({},h,{href:d||v,onClick:w||o?r:m,ref:n,target:l}))});var qy;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(qy||(qy={}));var Vy;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Vy||(Vy={}));function hC(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=e===void 0?{}:e,a=Hi(),l=$c(),u=$_(t,{relative:s});return L.useCallback(f=>{if(aC(f,n)){f.preventDefault();let h=r!==void 0?r:Du(l)===Du(u);a(t,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,u,r,i,n,t,o,s])}var j_={exports:{}};/*! + */function zd(){return zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function sC(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function aC(t,e){return t.button===0&&(!e||e==="_self")&&!sC(t)}const lC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function uC(t){let{basename:e,children:n,window:r}=t,i=L.useRef();i.current==null&&(i.current=yA({window:r,v5Compat:!0}));let o=i.current,[s,a]=L.useState({action:o.action,location:o.location});return L.useLayoutEffect(()=>o.listen(a),[o]),L.createElement(rC,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:o})}const cC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mt=L.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c}=e,h=oC(e,lC),{basename:f}=L.useContext(Zo),d,w=!1;if(typeof u=="string"&&fC.test(u)&&(d=u,cC))try{let p=new URL(window.location.href),y=u.startsWith("//")?new URL(p.protocol+u):new URL(u),g=Fm(y.pathname,f);y.origin===p.origin&&g!=null?u=g+y.search+y.hash:w=!0}catch{}let v=VA(u,{relative:i}),E=hC(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:i});function m(p){r&&r(p),p.defaultPrevented||E(p)}return L.createElement("a",zd({},h,{href:d||v,onClick:w||o?r:m,ref:n,target:l}))});var qy;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(qy||(qy={}));var Vy;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Vy||(Vy={}));function hC(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=e===void 0?{}:e,a=Hi(),l=$c(),u=$_(t,{relative:s});return L.useCallback(c=>{if(aC(c,n)){c.preventDefault();let h=r!==void 0?r:Du(l)===Du(u);a(t,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,u,r,i,n,t,o,s])}var j_={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i=0)&&(n[i]=t[i]);return n}function zy(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function pC(t){var e=mC(t,"string");return typeof e=="symbol"?e:String(e)}function mC(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gC(t,e,n){var r=L.useRef(t!==void 0),i=L.useState(e),o=i[0],s=i[1],a=t!==void 0,l=r.current;return r.current=a,!a&&l&&o!==e&&s(e),[a?t:o,L.useCallback(function(u){for(var f=arguments.length,h=new Array(f>1?f-1:0),c=1;c{o.target===t&&(i(),e(o))},n+r)}function Is(...t){return t.filter(e=>e!=null).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...i){e.apply(this,i),n.apply(this,i)}},null)}function qm(t){t.offsetHeight}var Wy=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function VC(t,e){var n=Wy(t),r=Wy(e);return function(i){n&&n(i),r&&r(i)}}function Bc(t,e){return L.useMemo(function(){return VC(t,e)},[t,e])}function zC(t){return t&&"setState"in t?yo.findDOMNode(t):t??null}const HC=Zt.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:s,children:a,childRef:l,...u},f)=>{const h=L.useRef(null),c=Bc(h,l),d=k=>{c(zC(k))},w=k=>S=>{k&&h.current&&k(h.current,S)},v=L.useCallback(w(t),[t]),E=L.useCallback(w(e),[e]),m=L.useCallback(w(n),[n]),p=L.useCallback(w(r),[r]),y=L.useCallback(w(i),[i]),g=L.useCallback(w(o),[o]),_=L.useCallback(w(s),[s]);return A(MC,{ref:f,...u,onEnter:v,onEntered:m,onEntering:E,onExit:p,onExited:g,onExiting:y,addEndListener:_,nodeRef:h,children:typeof a=="function"?(k,S)=>a(k,{...S,ref:d}):Zt.cloneElement(a,{ref:d})})}),qc=HC,KC={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function WC(t,e){const n=`offset${t[0].toUpperCase()}${t.slice(1)}`,r=e[n],i=KC[t];return r+parseInt(sr(e,i[0]),10)+parseInt(sr(e,i[1]),10)}const GC={[Ar]:"collapse",[Sa]:"collapsing",[kn]:"collapsing",[Xn]:"collapse show"},QC=Zt.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,className:o,children:s,dimension:a="height",in:l=!1,timeout:u=300,mountOnEnter:f=!1,unmountOnExit:h=!1,appear:c=!1,getDimensionValue:d=WC,...w},v)=>{const E=typeof a=="function"?a():a,m=L.useMemo(()=>Is(k=>{k.style[E]="0"},t),[E,t]),p=L.useMemo(()=>Is(k=>{const S=`scroll${E[0].toUpperCase()}${E.slice(1)}`;k.style[E]=`${k[S]}px`},e),[E,e]),y=L.useMemo(()=>Is(k=>{k.style[E]=null},n),[E,n]),g=L.useMemo(()=>Is(k=>{k.style[E]=`${d(E,k)}px`,qm(k)},r),[r,d,E]),_=L.useMemo(()=>Is(k=>{k.style[E]=null},i),[E,i]);return A(qc,{ref:v,addEndListener:Uc,...w,"aria-expanded":w.role?l:null,onEnter:m,onEntering:p,onEntered:y,onExit:g,onExiting:_,childRef:s.ref,in:l,timeout:u,mountOnEnter:f,unmountOnExit:h,appear:c,children:(k,S)=>Zt.cloneElement(s,{...S,className:Oe(o,s.props.className,GC[k],E==="width"&&"collapse-horizontal")})})}),YC=QC;function H_(t){var e=L.useRef(t);return L.useEffect(function(){e.current=t},[t]),e}function qt(t){var e=H_(t);return L.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}function K_(){var t=L.useRef(!0),e=L.useRef(function(){return t.current});return L.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function XC(t){var e=L.useRef(null);return L.useEffect(function(){e.current=t}),e.current}var JC=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",ZC=typeof document<"u";const Qd=ZC||JC?L.useLayoutEffect:L.useEffect,e2=["as","disabled"];function t2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function n2(t){return!t||t.trim()==="#"}function Vm({tagName:t,disabled:e,href:n,target:r,rel:i,role:o,onClick:s,tabIndex:a=0,type:l}){t||(n!=null||r!=null||i!=null?t="a":t="button");const u={tagName:t};if(t==="button")return[{type:l||"button",disabled:e},u];const f=c=>{if((e||t==="a"&&n2(n))&&c.preventDefault(),e){c.stopPropagation();return}s==null||s(c)},h=c=>{c.key===" "&&(c.preventDefault(),f(c))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:a,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?i:void 0,onClick:f,onKeyDown:h},u]}const W_=L.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=t2(t,e2);const[o,{tagName:s}]=Vm(Object.assign({tagName:n,disabled:r},i));return A(s,Object.assign({},i,o,{ref:e}))});W_.displayName="Button";const r2=["onKeyDown"];function i2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function o2(t){return!t||t.trim()==="#"}const G_=L.forwardRef((t,e)=>{let{onKeyDown:n}=t,r=i2(t,r2);const[i]=Vm(Object.assign({tagName:"a"},r)),o=qt(s=>{i.onKeyDown(s),n==null||n(s)});return o2(r.href)||r.role==="button"?A("a",Object.assign({ref:e},r,i,{onKeyDown:o})):A("a",Object.assign({ref:e},r,{onKeyDown:n}))});G_.displayName="Anchor";const Yd=G_,s2={[kn]:"show",[Xn]:"show"},Q_=L.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},a=L.useCallback((l,u)=>{qm(l),r==null||r(l,u)},[r]);return A(qc,{ref:o,addEndListener:Uc,...s,onEnter:a,childRef:e.ref,children:(l,u)=>L.cloneElement(e,{...u,className:Oe("fade",t,e.props.className,s2[l],n[l])})})});Q_.displayName="Fade";const a2=Q_,l2={"aria-label":ar.string,onClick:ar.func,variant:ar.oneOf(["white"])},zm=L.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>A("button",{ref:i,type:"button",className:Oe("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));zm.displayName="CloseButton";zm.propTypes=l2;const u2=zm,c2=t=>L.forwardRef((e,n)=>A("div",{...e,ref:n,className:Oe(e.className,t)}));var f2=/-(.)/g;function h2(t){return t.replace(f2,function(e,n){return n.toUpperCase()})}const d2=t=>t[0].toUpperCase()+h2(t).slice(1);function es(t,{displayName:e=d2(t),Component:n,defaultProps:r}={}){const i=L.forwardRef(({className:o,bsPrefix:s,as:a=n||"div",...l},u)=>{const f={...r,...l},h=Ve(s,t);return A(a,{ref:u,className:Oe(o,h),...f})});return i.displayName=e,i}const Y_=L.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:s,...a},l)=>{const u=Ve(e,"btn"),[f,{tagName:h}]=Vm({tagName:t,disabled:o,...a});return A(h,{...f,...a,ref:l,disabled:o,className:Oe(s,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,a.href&&o&&"disabled")})});Y_.displayName="Button";const X_=Y_,J_=L.createContext(null);J_.displayName="CardHeaderContext";const p2=J_;function m2(t,e){var n=L.useRef(!0);L.useEffect(function(){if(n.current){n.current=!1;return}return t()},e)}function g2(t){var e=L.useRef(t);return e.current=t,e}function Z_(t){var e=g2(t);L.useEffect(function(){return function(){return e.current()}},[])}var Xd=Math.pow(2,31)-1;function eT(t,e,n){var r=n-Date.now();t.current=r<=Xd?setTimeout(e,r):setTimeout(function(){return eT(t,e,n)},Xd)}function v2(){var t=K_(),e=L.useRef();return Z_(function(){return clearTimeout(e.current)}),L.useMemo(function(){var n=function(){return clearTimeout(e.current)};function r(i,o){o===void 0&&(o=0),t()&&(n(),o<=Xd?e.current=setTimeout(i,o):eT(e,i,Date.now()+o))}return{set:r,clear:n}},[])}const y2=es("carousel-caption"),tT=L.forwardRef(({as:t="div",bsPrefix:e,className:n,...r},i)=>{const o=Oe(n,Ve(e,"carousel-item"));return A(t,{ref:i,...r,className:o})});tT.displayName="CarouselItem";const w2=tT;function Gy(t,e){let n=0;return L.Children.map(t,r=>L.isValidElement(r)?e(r,n++):r)}function E2(t,e){let n=0;L.Children.forEach(t,r=>{L.isValidElement(r)&&e(r,n++)})}function _2(t,e){return L.Children.toArray(t).some(n=>L.isValidElement(n)&&n.type===e)}const T2=40;function S2(t){if(!t||!t.style||!t.parentNode||!t.parentNode.style)return!1;const e=getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&getComputedStyle(t.parentNode).display!=="none"}const nT=L.forwardRef(({defaultActiveIndex:t=0,...e},n)=>{const{as:r="div",bsPrefix:i,slide:o=!0,fade:s=!1,controls:a=!0,indicators:l=!0,indicatorLabels:u=[],activeIndex:f,onSelect:h,onSlide:c,onSlid:d,interval:w=5e3,keyboard:v=!0,onKeyDown:E,pause:m="hover",onMouseOver:p,onMouseOut:y,wrap:g=!0,touch:_=!0,onTouchStart:k,onTouchMove:S,onTouchEnd:T,prevIcon:x=A("span",{"aria-hidden":"true",className:"carousel-control-prev-icon"}),prevLabel:I="Previous",nextIcon:b=A("span",{"aria-hidden":"true",className:"carousel-control-next-icon"}),nextLabel:N="Next",variant:C,className:P,children:F,...z}=Um({defaultActiveIndex:t,...e},{activeIndex:"onSelect"}),B=Ve(i,"carousel"),H=TC(),j=L.useRef(null),[M,O]=L.useState("next"),[D,$]=L.useState(!1),[V,q]=L.useState(!1),[R,U]=L.useState(f||0);L.useEffect(()=>{!V&&f!==R&&(j.current?O(j.current):O((f||0)>R?"next":"prev"),o&&q(!0),U(f||0))},[f,V,R,o]),L.useEffect(()=>{j.current&&(j.current=null)});let K=0,W;E2(F,(ye,Re)=>{++K,Re===f&&(W=ye.props.interval)});const X=H_(W),ne=L.useCallback(ye=>{if(V)return;let Re=R-1;if(Re<0){if(!g)return;Re=K-1}j.current="prev",h==null||h(Re,ye)},[V,R,h,g,K]),ue=qt(ye=>{if(V)return;let Re=R+1;if(Re>=K){if(!g)return;Re=0}j.current="next",h==null||h(Re,ye)}),he=L.useRef();L.useImperativeHandle(n,()=>({element:he.current,prev:ne,next:ue}));const le=qt(()=>{!document.hidden&&S2(he.current)&&(H?ne():ue())}),Te=M==="next"?"start":"end";m2(()=>{o||(c==null||c(R,Te),d==null||d(R,Te))},[R]);const Et=`${B}-item-${M}`,Xe=`${B}-item-${Te}`,G=L.useCallback(ye=>{qm(ye),c==null||c(R,Te)},[c,R,Te]),Q=L.useCallback(()=>{q(!1),d==null||d(R,Te)},[d,R,Te]),re=L.useCallback(ye=>{if(v&&!/input|textarea/i.test(ye.target.tagName))switch(ye.key){case"ArrowLeft":ye.preventDefault(),H?ue(ye):ne(ye);return;case"ArrowRight":ye.preventDefault(),H?ne(ye):ue(ye);return}E==null||E(ye)},[v,E,ne,ue,H]),oe=L.useCallback(ye=>{m==="hover"&&$(!0),p==null||p(ye)},[m,p]),Z=L.useCallback(ye=>{$(!1),y==null||y(ye)},[y]),Ee=L.useRef(0),ve=L.useRef(0),_e=v2(),Ut=L.useCallback(ye=>{Ee.current=ye.touches[0].clientX,ve.current=0,m==="hover"&&$(!0),k==null||k(ye)},[m,k]),wn=L.useCallback(ye=>{ye.touches&&ye.touches.length>1?ve.current=0:ve.current=ye.touches[0].clientX-Ee.current,S==null||S(ye)},[S]),Le=L.useCallback(ye=>{if(_){const Re=ve.current;Math.abs(Re)>T2&&(Re>0?ne(ye):ue(ye))}m==="hover"&&_e.set(()=>{$(!1)},w||void 0),T==null||T(ye)},[_,m,ne,ue,_e,w,T]),ml=w!=null&&!D&&!V,Ue=L.useRef();L.useEffect(()=>{var ye,Re;if(!ml)return;const Gn=H?ne:ue;return Ue.current=window.setInterval(document.visibilityState?le:Gn,(ye=(Re=X.current)!=null?Re:w)!=null?ye:void 0),()=>{Ue.current!==null&&clearInterval(Ue.current)}},[ml,ne,ue,X,w,le,H]);const En=L.useMemo(()=>l&&Array.from({length:K},(ye,Re)=>Gn=>{h==null||h(Re,Gn)}),[l,K,h]);return J(r,{ref:he,...z,onKeyDown:re,onMouseOver:oe,onMouseOut:Z,onTouchStart:Ut,onTouchMove:wn,onTouchEnd:Le,className:Oe(P,B,o&&"slide",s&&`${B}-fade`,C&&`${B}-${C}`),children:[l&&A("div",{className:`${B}-indicators`,children:Gy(F,(ye,Re)=>A("button",{type:"button","data-bs-target":"","aria-label":u!=null&&u.length?u[Re]:`Slide ${Re+1}`,className:Re===R?"active":void 0,onClick:En?En[Re]:void 0,"aria-current":Re===R},Re))}),A("div",{className:`${B}-inner`,children:Gy(F,(ye,Re)=>{const Gn=Re===R;return o?A(qc,{in:Gn,onEnter:Gn?G:void 0,onEntered:Gn?Q:void 0,addEndListener:Uc,children:(vs,WI)=>L.cloneElement(ye,{...WI,className:Oe(ye.props.className,Gn&&vs!=="entered"&&Et,(vs==="entered"||vs==="exiting")&&"active",(vs==="entering"||vs==="exiting")&&Xe)})}):L.cloneElement(ye,{className:Oe(ye.props.className,Gn&&"active")})})}),a&&J(Hn,{children:[(g||f!==0)&&J(Yd,{className:`${B}-control-prev`,onClick:ne,children:[x,I&&A("span",{className:"visually-hidden",children:I})]}),(g||f!==K-1)&&J(Yd,{className:`${B}-control-next`,onClick:ue,children:[b,N&&A("span",{className:"visually-hidden",children:N})]})]})]})});nT.displayName="Carousel";const fh=Object.assign(nT,{Caption:y2,Item:w2});function b2({as:t,bsPrefix:e,className:n,...r}){e=Ve(e,"col");const i=EC(),o=_C(),s=[],a=[];return i.forEach(l=>{const u=r[l];delete r[l];let f,h,c;typeof u=="object"&&u!=null?{span:f,offset:h,order:c}=u:f=u;const d=l!==o?`-${l}`:"";f&&s.push(f===!0?`${e}${d}`:`${e}${d}-${f}`),c!=null&&a.push(`order${d}-${c}`),h!=null&&a.push(`offset${d}-${h}`)}),[{...r,className:Oe(n,...s,...a)},{as:t,bsPrefix:e,spans:s}]}const rT=L.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:s}]=b2(t);return A(i,{...r,ref:e,className:Oe(n,!s.length&&o)})});rT.displayName="Col";const k2=rT;var I2=Function.prototype.bind.call(Function.prototype.call,[].slice);function di(t,e){return I2(t.querySelectorAll(e))}function N2(){var t=L.useReducer(function(n){return!n},!1),e=t[1];return e}function Qy(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const O2=L.createContext(null),Hm=(t,e=null)=>t!=null?String(t):e||null,Fu=O2,iT=L.createContext(null);iT.displayName="NavContext";const oT=iT,A2="data-rr-ui-",C2="rrUi";function Vc(t){return`${A2}${t}`}function x2(t){return`${C2}${t}`}const sT=L.createContext(jc?window:void 0);sT.Provider;function aT(){return L.useContext(sT)}const lT=L.createContext(null);lT.displayName="NavbarContext";const ts=lT,R2={type:ar.string,tooltip:ar.bool,as:ar.elementType},Km=L.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},o)=>A(t,{...i,ref:o,className:Oe(e,`${n}-${r?"tooltip":"feedback"}`)}));Km.displayName="Feedback";Km.propTypes=R2;const uT=Km,P2=L.createContext({}),pr=P2,cT=L.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:s="input",...a},l)=>{const{controlId:u}=L.useContext(pr);return e=Ve(e,"form-check-input"),A(s,{...a,ref:l,type:r,id:t||u,className:Oe(n,e,i&&"is-valid",o&&"is-invalid")})});cT.displayName="FormCheckInput";const fT=cT,hT=L.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:o}=L.useContext(pr);return t=Ve(t,"form-check-label"),A("label",{...r,ref:i,htmlFor:n||o,className:Oe(e,t)})});hT.displayName="FormCheckLabel";const Jd=hT,dT=L.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:s=!1,isInvalid:a=!1,feedbackTooltip:l=!1,feedback:u,feedbackType:f,className:h,style:c,title:d="",type:w="checkbox",label:v,children:E,as:m="input",...p},y)=>{e=Ve(e,"form-check"),n=Ve(n,"form-switch");const{controlId:g}=L.useContext(pr),_=L.useMemo(()=>({controlId:t||g}),[g,t]),k=!E&&v!=null&&v!==!1||_2(E,Jd),S=A(fT,{...p,type:w==="switch"?"checkbox":w,ref:y,isValid:s,isInvalid:a,disabled:o,as:m});return A(pr.Provider,{value:_,children:A("div",{style:c,className:Oe(h,k&&e,r&&`${e}-inline`,i&&`${e}-reverse`,w==="switch"&&n),children:E||J(Hn,{children:[S,k&&A(Jd,{title:d,children:v}),u&&A(uT,{type:f,tooltip:l,children:u})]})})})});dT.displayName="FormCheck";const ju=Object.assign(dT,{Input:fT,Label:Jd}),pT=L.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:o,isValid:s=!1,isInvalid:a=!1,plaintext:l,readOnly:u,as:f="input",...h},c)=>{const{controlId:d}=L.useContext(pr);t=Ve(t,"form-control");let w;return l?w={[`${t}-plaintext`]:!0}:w={[t]:!0,[`${t}-${n}`]:n},A(f,{...h,type:e,size:r,ref:c,readOnly:u,id:i||d,className:Oe(o,w,s&&"is-valid",a&&"is-invalid",e==="color"&&`${t}-color`)})});pT.displayName="FormControl";const L2=Object.assign(pT,{Feedback:uT}),D2=es("form-floating"),mT=L.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=L.useMemo(()=>({controlId:t}),[t]);return A(pr.Provider,{value:i,children:A(e,{...n,ref:r})})});mT.displayName="FormGroup";const gT=mT,vT=L.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...s},a)=>{const{controlId:l}=L.useContext(pr);e=Ve(e,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const f=Oe(i,e,r&&"visually-hidden",n&&u);return o=o||l,n?A(k2,{ref:a,as:"label",className:f,htmlFor:o,...s}):A(t,{ref:a,className:f,htmlFor:o,...s})});vT.displayName="FormLabel";const M2=vT,yT=L.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:o}=L.useContext(pr);return t=Ve(t,"form-range"),A("input",{...r,type:"range",ref:i,className:Oe(e,t),id:n||o})});yT.displayName="FormRange";const $2=yT,wT=L.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:s,...a},l)=>{const{controlId:u}=L.useContext(pr);return t=Ve(t,"form-select"),A("select",{...a,size:n,ref:l,className:Oe(r,t,e&&`${t}-${e}`,i&&"is-valid",o&&"is-invalid"),id:s||u})});wT.displayName="FormSelect";const F2=wT,ET=L.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},o)=>(t=Ve(t,"form-text"),A(n,{...i,ref:o,className:Oe(e,t,r&&"text-muted")})));ET.displayName="FormText";const j2=ET,_T=L.forwardRef((t,e)=>A(ju,{...t,ref:e,type:"switch"}));_T.displayName="Switch";const U2=Object.assign(_T,{Input:ju.Input,Label:ju.Label}),TT=L.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...o},s)=>(t=Ve(t,"form-floating"),J(gT,{ref:s,className:Oe(e,t),controlId:r,...o,children:[n,A("label",{htmlFor:r,children:i})]})));TT.displayName="FloatingLabel";const B2=TT,q2={_ref:ar.any,validated:ar.bool,as:ar.elementType},Wm=L.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>A(n,{...r,ref:i,className:Oe(t,e&&"was-validated")}));Wm.displayName="Form";Wm.propTypes=q2;const In=Object.assign(Wm,{Group:gT,Control:L2,Floating:D2,Check:ju,Switch:U2,Label:M2,Text:j2,Range:$2,Select:F2,FloatingLabel:B2}),V2=L.createContext(null),ST=V2,z2=["as","active","eventKey"];function H2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function bT({key:t,onClick:e,active:n,id:r,role:i,disabled:o}){const s=L.useContext(Fu),a=L.useContext(oT),l=L.useContext(ST);let u=n;const f={role:i};if(a){!i&&a.role==="tablist"&&(f.role="tab");const h=a.getControllerId(t??null),c=a.getControlledId(t??null);f[Vc("event-key")]=t,f.id=h||r,u=n==null&&t!=null?a.activeKey===t:n,(u||!(l!=null&&l.unmountOnExit)&&!(l!=null&&l.mountOnEnter))&&(f["aria-controls"]=c)}return f.role==="tab"&&(f["aria-selected"]=u,u||(f.tabIndex=-1),o&&(f.tabIndex=-1,f["aria-disabled"]=!0)),f.onClick=qt(h=>{o||(e==null||e(h),t!=null&&s&&!h.isPropagationStopped()&&s(t,h))}),[f,{isActive:u}]}const kT=L.forwardRef((t,e)=>{let{as:n=W_,active:r,eventKey:i}=t,o=H2(t,z2);const[s,a]=bT(Object.assign({key:Hm(i,o.href),active:r},o));return s[Vc("active")]=a.isActive,A(n,Object.assign({},o,s,{ref:e}))});kT.displayName="NavItem";const K2=kT,W2=["as","onSelect","activeKey","role","onKeyDown"];function G2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}const Yy=()=>{},Xy=Vc("event-key"),IT=L.forwardRef((t,e)=>{let{as:n="div",onSelect:r,activeKey:i,role:o,onKeyDown:s}=t,a=G2(t,W2);const l=N2(),u=L.useRef(!1),f=L.useContext(Fu),h=L.useContext(ST);let c,d;h&&(o=o||"tablist",i=h.activeKey,c=h.getControlledId,d=h.getControllerId);const w=L.useRef(null),v=y=>{const g=w.current;if(!g)return null;const _=di(g,`[${Xy}]:not([aria-disabled=true])`),k=g.querySelector("[aria-selected=true]");if(!k||k!==document.activeElement)return null;const S=_.indexOf(k);if(S===-1)return null;let T=S+y;return T>=_.length&&(T=0),T<0&&(T=_.length-1),_[T]},E=(y,g)=>{y!=null&&(r==null||r(y,g),f==null||f(y,g))},m=y=>{if(s==null||s(y),!h)return;let g;switch(y.key){case"ArrowLeft":case"ArrowUp":g=v(-1);break;case"ArrowRight":case"ArrowDown":g=v(1);break;default:return}g&&(y.preventDefault(),E(g.dataset[x2("EventKey")]||null,y),u.current=!0,l())};L.useEffect(()=>{if(w.current&&u.current){const y=w.current.querySelector(`[${Xy}][aria-selected=true]`);y==null||y.focus()}u.current=!1});const p=Bc(e,w);return A(Fu.Provider,{value:E,children:A(oT.Provider,{value:{role:o,activeKey:Hm(i),getControlledId:c||Yy,getControllerId:d||Yy},children:A(n,Object.assign({},a,{onKeyDown:m,ref:p,role:o}))})})});IT.displayName="Nav";const Q2=Object.assign(IT,{Item:K2});function hh(t){t===void 0&&(t=Bm());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Y2(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Jy=Vc("modal-open");class X2{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return Y2(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(sr(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(Jy,""),sr(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Jy),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Gm=X2,dh=(t,e)=>jc?t==null?(e||Bm()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function J2(t,e){const n=aT(),[r,i]=L.useState(()=>dh(t,n==null?void 0:n.document));if(!r){const o=dh(t);o&&i(o)}return L.useEffect(()=>{e&&r&&e(r)},[e,r]),L.useEffect(()=>{const o=dh(t);o!==r&&i(o)},[t,r]),r}function Z2({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=L.useRef(null),s=L.useRef(e),a=qt(n);L.useEffect(()=>{e?s.current=!0:a(o.current)},[e,a]);const l=Bc(o,t.ref),u=L.cloneElement(t,{ref:l});return e?u:i||!s.current&&r?null:u}function ex({in:t,onTransition:e}){const n=L.useRef(null),r=L.useRef(!0),i=qt(e);return Qd(()=>{if(!n.current)return;let o=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[t,i]),Qd(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function tx({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[o,s]=L.useState(!e);e&&o&&s(!1);const a=ex({in:!!e,onTransition:u=>{const f=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(s(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(f,h=>{throw u.in||s(!0),h})}}),l=Bc(a,t.ref);return o&&!e?null:L.cloneElement(t,{ref:l})}function Zy(t,e,n){return t?A(t,Object.assign({},n)):e?A(tx,Object.assign({},n,{transition:e})):A(Z2,Object.assign({},n))}function nx(t){return t.code==="Escape"||t.keyCode===27}const rx=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function ix(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}let ph;function ox(t){return ph||(ph=new Gm({ownerDocument:t==null?void 0:t.document})),ph}function sx(t){const e=aT(),n=t||ox(e),r=L.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:L.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:L.useCallback(i=>{r.current.backdrop=i},[])})}const NT=L.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:s,backdrop:a=!0,keyboard:l=!0,onBackdropClick:u,onEscapeKeyDown:f,transition:h,runTransition:c,backdropTransition:d,runBackdropTransition:w,autoFocus:v=!0,enforceFocus:E=!0,restoreFocus:m=!0,restoreFocusOptions:p,renderDialog:y,renderBackdrop:g=le=>A("div",Object.assign({},le)),manager:_,container:k,onShow:S,onHide:T=()=>{},onExit:x,onExited:I,onExiting:b,onEnter:N,onEntering:C,onEntered:P}=t,F=ix(t,rx);const z=J2(k),B=sx(_),H=K_(),j=XC(n),[M,O]=L.useState(!n),D=L.useRef(null);L.useImperativeHandle(e,()=>B,[B]),jc&&!j&&n&&(D.current=hh()),n&&M&&O(!1);const $=qt(()=>{if(B.add(),W.current=$u(document,"keydown",U),K.current=$u(document,"focus",()=>setTimeout(q),!0),S&&S(),v){const le=hh(document);B.dialog&&le&&!Qy(B.dialog,le)&&(D.current=le,B.dialog.focus())}}),V=qt(()=>{if(B.remove(),W.current==null||W.current(),K.current==null||K.current(),m){var le;(le=D.current)==null||le.focus==null||le.focus(p),D.current=null}});L.useEffect(()=>{!n||!z||$()},[n,z,$]),L.useEffect(()=>{M&&V()},[M,V]),Z_(()=>{V()});const q=qt(()=>{if(!E||!H()||!B.isTopModal())return;const le=hh();B.dialog&&le&&!Qy(B.dialog,le)&&B.dialog.focus()}),R=qt(le=>{le.target===le.currentTarget&&(u==null||u(le),a===!0&&T())}),U=qt(le=>{l&&nx(le)&&B.isTopModal()&&(f==null||f(le),le.defaultPrevented||T())}),K=L.useRef(),W=L.useRef(),X=(...le)=>{O(!0),I==null||I(...le)};if(!z)return null;const ne=Object.assign({role:r,ref:B.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:o,className:i,tabIndex:-1});let ue=y?y(ne):A("div",Object.assign({},ne,{children:L.cloneElement(s,{role:"document"})}));ue=Zy(h,c,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:x,onExiting:b,onExited:X,onEnter:N,onEntering:C,onEntered:P,children:ue});let he=null;return a&&(he=g({ref:B.setBackdropRef,onClick:R}),he=Zy(d,w,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:he})),A(Hn,{children:yo.createPortal(J(Hn,{children:[he,ue]}),z)})});NT.displayName="Modal";const ax=Object.assign(NT,{Manager:Gm});function lx(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function ux(t,e){t.classList?t.classList.add(e):lx(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function e0(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function cx(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=e0(t.className,e):t.setAttribute("class",e0(t.className&&t.className.baseVal||"",e))}const to={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class OT extends Gm{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,sr(n,{[e]:`${parseFloat(sr(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],sr(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(ux(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";di(n,to.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth)),di(n,to.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-e.scrollBarWidth)),di(n,to.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();cx(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";di(n,to.FIXED_CONTENT).forEach(o=>this.restore(r,o)),di(n,to.STICKY_CONTENT).forEach(o=>this.restore(i,o)),di(n,to.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let mh;function fx(t){return mh||(mh=new OT(t)),mh}const hx=OT,dx=L.createContext({onHide(){}}),AT=dx,px=L.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...o},s)=>{const a=L.useContext(AT),l=qt(()=>{a==null||a.onHide(),r==null||r()});return J("div",{ref:s,...o,children:[i,n&&A(u2,{"aria-label":t,variant:e,onClick:l})]})}),mx=px;var t0={exports:{}},Zd={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(r){function i(s,a,l,u,f,h){var c=u||"<>",d=h||l;if(a[l]==null)return s?new Error("Required "+f+" `"+d+"` was not specified "+("in `"+c+"`.")):null;for(var w=arguments.length,v=Array(w>6?w-6:0),E=6;E{t=Ve(t,"nav-link");const[l,u]=bT({key:Hm(i,s.href),active:r,disabled:o,...s});return A(n,{...s,...l,ref:a,disabled:o,className:Oe(e,t,o&&"disabled",u.isActive&&"active")})});CT.displayName="NavLink";const yx=CT,xT=L.forwardRef((t,e)=>{const{as:n="div",bsPrefix:r,variant:i,fill:o=!1,justify:s=!1,navbar:a,navbarScroll:l,className:u,activeKey:f,...h}=Um(t,{activeKey:"onSelect"}),c=Ve(r,"nav");let d,w,v=!1;const E=L.useContext(ts),m=L.useContext(p2);return E?(d=E.bsPrefix,v=a??!0):m&&({cardHeaderBsPrefix:w}=m),A(Q2,{as:n,ref:e,activeKey:f,className:Oe(u,{[c]:!v,[`${d}-nav`]:v,[`${d}-nav-scroll`]:v&&l,[`${w}-${i}`]:!!w,[`${c}-${i}`]:!!i,[`${c}-fill`]:o,[`${c}-justified`]:s}),...h})});xT.displayName="Nav";const ci=Object.assign(xT,{Item:vx,Link:yx}),RT=L.forwardRef(({bsPrefix:t,className:e,as:n,...r},i)=>{t=Ve(t,"navbar-brand");const o=n||(r.href?"a":"span");return A(o,{...r,ref:i,className:Oe(e,t)})});RT.displayName="NavbarBrand";const wx=RT,PT=L.forwardRef(({children:t,bsPrefix:e,...n},r)=>{e=Ve(e,"navbar-collapse");const i=L.useContext(ts);return A(YC,{in:!!(i&&i.expanded),...n,children:A("div",{ref:r,className:e,children:t})})});PT.displayName="NavbarCollapse";const Ex=PT,LT=L.forwardRef(({bsPrefix:t,className:e,children:n,label:r="Toggle navigation",as:i="button",onClick:o,...s},a)=>{t=Ve(t,"navbar-toggler");const{onToggle:l,expanded:u}=L.useContext(ts)||{},f=qt(h=>{o&&o(h),l&&l()});return i==="button"&&(s.type="button"),A(i,{...s,ref:a,onClick:f,"aria-label":r,className:Oe(e,t,!u&&"collapsed"),children:n||A("span",{className:`${t}-icon`})})});LT.displayName="NavbarToggle";const _x=LT;var ep=new WeakMap,n0=function(e,n){if(!(!e||!n)){var r=ep.get(n)||new Map;ep.set(n,r);var i=r.get(e);return i||(i=n.matchMedia(e),i.refCount=0,r.set(i.media,i)),i}};function Tx(t,e){e===void 0&&(e=typeof window>"u"?void 0:window);var n=n0(t,e),r=L.useState(function(){return n?n.matches:!1}),i=r[0],o=r[1];return Qd(function(){var s=n0(t,e);if(!s)return o(!1);var a=ep.get(e),l=function(){o(s.matches)};return s.refCount++,s.addListener(l),l(),function(){s.removeListener(l),s.refCount--,s.refCount<=0&&(a==null||a.delete(s.media)),s=void 0}},[t]),i}function Sx(t){var e=Object.keys(t);function n(a,l){return a===l?l:a?a+" and "+l:l}function r(a){return e[Math.min(e.indexOf(a)+1,e.length-1)]}function i(a){var l=r(a),u=t[l];return typeof u=="number"?u=u-.2+"px":u="calc("+u+" - 0.2px)","(max-width: "+u+")"}function o(a){var l=t[a];return typeof l=="number"&&(l=l+"px"),"(min-width: "+l+")"}function s(a,l,u){var f;if(typeof a=="object")f=a,u=l,l=!0;else{var h;l=l||!0,f=(h={},h[a]=l,h)}var c=L.useMemo(function(){return Object.entries(f).reduce(function(d,w){var v=w[0],E=w[1];return(E==="up"||E===!0)&&(d=n(d,o(v))),(E==="down"||E===!0)&&(d=n(d,i(v))),d},"")},[JSON.stringify(f)]);return Tx(c,u)}return s}var bx=Sx({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});const kx=es("offcanvas-body"),Ix={[kn]:"show",[Xn]:"show"},DT=L.forwardRef(({bsPrefix:t,className:e,children:n,in:r=!1,mountOnEnter:i=!1,unmountOnExit:o=!1,appear:s=!1,...a},l)=>(t=Ve(t,"offcanvas"),A(qc,{ref:l,addEndListener:Uc,in:r,mountOnEnter:i,unmountOnExit:o,appear:s,...a,childRef:n.ref,children:(u,f)=>L.cloneElement(n,{...f,className:Oe(e,n.props.className,(u===kn||u===Sa)&&`${t}-toggling`,Ix[u])})})));DT.displayName="OffcanvasToggling";const Nx=DT,MT=L.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(t=Ve(t,"offcanvas-header"),A(mx,{ref:o,...i,className:Oe(e,t),closeLabel:n,closeButton:r})));MT.displayName="OffcanvasHeader";const Ox=MT,Ax=c2("h5"),Cx=es("offcanvas-title",{Component:Ax});function xx(t){return A(Nx,{...t})}function Rx(t){return A(a2,{...t})}const $T=L.forwardRef(({bsPrefix:t,className:e,children:n,"aria-labelledby":r,placement:i="start",responsive:o,show:s=!1,backdrop:a=!0,keyboard:l=!0,scroll:u=!1,onEscapeKeyDown:f,onShow:h,onHide:c,container:d,autoFocus:w=!0,enforceFocus:v=!0,restoreFocus:E=!0,restoreFocusOptions:m,onEntered:p,onExit:y,onExiting:g,onEnter:_,onEntering:k,onExited:S,backdropClassName:T,manager:x,renderStaticNode:I=!1,...b},N)=>{const C=L.useRef();t=Ve(t,"offcanvas");const{onToggle:P}=L.useContext(ts)||{},[F,z]=L.useState(!1),B=bx(o||"xs","up");L.useEffect(()=>{z(o?s&&!B:s)},[s,o,B]);const H=qt(()=>{P==null||P(),c==null||c()}),j=L.useMemo(()=>({onHide:H}),[H]);function M(){return x||(u?(C.current||(C.current=new hx({handleContainerOverflow:!1})),C.current):fx())}const O=(q,...R)=>{q&&(q.style.visibility="visible"),_==null||_(q,...R)},D=(q,...R)=>{q&&(q.style.visibility=""),S==null||S(...R)},$=L.useCallback(q=>A("div",{...q,className:Oe(`${t}-backdrop`,T)}),[T,t]),V=q=>A("div",{...q,...b,className:Oe(e,o?`${t}-${o}`:t,`${t}-${i}`),"aria-labelledby":r,children:n});return J(Hn,{children:[!F&&(o||I)&&V({}),A(AT.Provider,{value:j,children:A(ax,{show:F,ref:N,backdrop:a,container:d,keyboard:l,autoFocus:w,enforceFocus:v&&!u,restoreFocus:E,restoreFocusOptions:m,onEscapeKeyDown:f,onShow:h,onHide:H,onEnter:O,onEntering:k,onEntered:p,onExit:y,onExiting:g,onExited:D,manager:M(),transition:xx,backdropTransition:Rx,renderBackdrop:$,renderDialog:V})})]})});$T.displayName="Offcanvas";const Px=Object.assign($T,{Body:kx,Header:Ox,Title:Cx}),FT=L.forwardRef((t,e)=>{const n=L.useContext(ts);return A(Px,{ref:e,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0})});FT.displayName="NavbarOffcanvas";const Lx=FT,Dx=es("navbar-text",{Component:"span"}),jT=L.forwardRef((t,e)=>{const{bsPrefix:n,expand:r=!0,variant:i="light",bg:o,fixed:s,sticky:a,className:l,as:u="nav",expanded:f,onToggle:h,onSelect:c,collapseOnSelect:d=!1,...w}=Um(t,{expanded:"onToggle"}),v=Ve(n,"navbar"),E=L.useCallback((...y)=>{c==null||c(...y),d&&f&&(h==null||h(!1))},[c,d,f,h]);w.role===void 0&&u!=="nav"&&(w.role="navigation");let m=`${v}-expand`;typeof r=="string"&&(m=`${m}-${r}`);const p=L.useMemo(()=>({onToggle:()=>h==null?void 0:h(!f),bsPrefix:v,expanded:!!f,expand:r}),[v,f,r,h]);return A(ts.Provider,{value:p,children:A(Fu.Provider,{value:E,children:A(u,{ref:e,...w,className:Oe(l,v,r&&m,i&&`${v}-${i}`,o&&`bg-${o}`,a&&`sticky-${a}`,s&&`fixed-${s}`)})})})});jT.displayName="Navbar";const gh=Object.assign(jT,{Brand:wx,Collapse:Ex,Offcanvas:Lx,Text:Dx,Toggle:_x});const Mx=()=>J(gh,{expand:"lg",className:"bg-transparent",children:[A(gh.Toggle,{"aria-controls":"basic-navbar-nav",style:{color:"white"}}),A(gh.Collapse,{id:"basic-navbar-nav",children:J(ci,{className:"mr-auto nav-centered",children:[A(ci.Item,{children:J(mt,{className:"nav-link",to:"/introduction",children:[A("span",{className:"japanese-text",children:"作品紹介"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Introduction"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/blog",children:[A("span",{className:"japanese-text",children:"ニュース"})," ",A("br",{})," ",A("span",{className:"english-text",children:"News"})]})}),J(ci.Link,{href:"https://github.com/Loke-60000",target:"_blank",rel:"noopener noreferrer",children:[A("span",{className:"japanese-text",children:"ギットハブ"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Github"})]}),J(mt,{className:"nav-link",to:"/projects",children:[A("span",{className:"japanese-text",children:"プロジェクト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Projects"})]}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/illustrations",children:[A("span",{className:"japanese-text",children:"イラスト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Illustrations"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/links",children:[A("span",{className:"japanese-text",children:"リンクス"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Links"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/contact",children:[A("span",{className:"japanese-text",children:"コンタクト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Contact"})]})})]})})]});const r0="/assets/divergence_meter_tube-8013128c.webp";function $x(){const[t,e]=L.useState(new Date),n=L.useRef(),r=()=>{e(new Date),n.current=requestAnimationFrame(r)};L.useEffect(()=>(n.current=requestAnimationFrame(r),()=>cancelAnimationFrame(n.current)),[]);const i=[t.getHours().toString().padStart(2,"0"),t.getMinutes().toString().padStart(2,"0"),t.getSeconds().toString().padStart(2,"0"),t.getMilliseconds().toString().padStart(3,"0")];return J("div",{className:"nixie__wrapper",children:[A("div",{className:"nixie__mesh"}),A("div",{className:"nixie__value",children:i.map((o,s)=>J(Zt.Fragment,{children:[o.split("").map((a,l)=>J("span",{className:"nixie__digit-container",children:[A("span",{className:"nixie__digit",children:a}),A("span",{className:"nixie__number-background",style:{backgroundImage:`url(${r0})`}})]},l)),sL.useContext(UT),jx=({children:t})=>{const[e,n]=Zt.useState("en"),i={language:e,toggleLanguage:()=>{n(o=>o==="en"?"fr":"en")}};return A(UT.Provider,{value:i,children:t})},Ux=({images:t})=>A(fh,{className:"custom-carousel",children:t.map((e,n)=>J(fh.Item,{children:[A("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:A("img",{className:"d-block w-100",src:e.src,alt:e.alt})}),e.caption&&A(fh.Caption,{children:A("h3",{children:e.caption})})]},n))}),BT="/assets/amadeus-fbfe58f2.webp",qT="/assets/rakugaki-b7537d6f.webp",VT="/assets/atchan-a8a39b57.webp",Bx="/assets/WEBSITE_Gadgetlab_website-fe56e292.webp",qx="/assets/WEBSITE_bannerr_contactme_1-93124380.webp",Vx="/assets/WEBSITE_bannerr_amadeus_1-b568a1b6.webp",zx="/assets/atchan_banner-2c72e868.webp";/** +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i=0)&&(n[i]=t[i]);return n}function zy(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function pC(t){var e=mC(t,"string");return typeof e=="symbol"?e:String(e)}function mC(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gC(t,e,n){var r=L.useRef(t!==void 0),i=L.useState(e),o=i[0],s=i[1],a=t!==void 0,l=r.current;return r.current=a,!a&&l&&o!==e&&s(e),[a?t:o,L.useCallback(function(u){for(var c=arguments.length,h=new Array(c>1?c-1:0),f=1;f{o.target===t&&(i(),e(o))},n+r)}function Is(...t){return t.filter(e=>e!=null).reduce((e,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return e===null?n:function(...i){e.apply(this,i),n.apply(this,i)}},null)}function qm(t){t.offsetHeight}var Wy=function(e){return!e||typeof e=="function"?e:function(n){e.current=n}};function VC(t,e){var n=Wy(t),r=Wy(e);return function(i){n&&n(i),r&&r(i)}}function Bc(t,e){return L.useMemo(function(){return VC(t,e)},[t,e])}function zC(t){return t&&"setState"in t?yo.findDOMNode(t):t??null}const HC=Zt.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:o,addEndListener:s,children:a,childRef:l,...u},c)=>{const h=L.useRef(null),f=Bc(h,l),d=k=>{f(zC(k))},w=k=>S=>{k&&h.current&&k(h.current,S)},v=L.useCallback(w(t),[t]),E=L.useCallback(w(e),[e]),m=L.useCallback(w(n),[n]),p=L.useCallback(w(r),[r]),y=L.useCallback(w(i),[i]),g=L.useCallback(w(o),[o]),_=L.useCallback(w(s),[s]);return A(MC,{ref:c,...u,onEnter:v,onEntered:m,onEntering:E,onExit:p,onExited:g,onExiting:y,addEndListener:_,nodeRef:h,children:typeof a=="function"?(k,S)=>a(k,{...S,ref:d}):Zt.cloneElement(a,{ref:d})})}),qc=HC,KC={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function WC(t,e){const n=`offset${t[0].toUpperCase()}${t.slice(1)}`,r=e[n],i=KC[t];return r+parseInt(sr(e,i[0]),10)+parseInt(sr(e,i[1]),10)}const GC={[Ar]:"collapse",[Sa]:"collapsing",[kn]:"collapsing",[Xn]:"collapse show"},QC=Zt.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,className:o,children:s,dimension:a="height",in:l=!1,timeout:u=300,mountOnEnter:c=!1,unmountOnExit:h=!1,appear:f=!1,getDimensionValue:d=WC,...w},v)=>{const E=typeof a=="function"?a():a,m=L.useMemo(()=>Is(k=>{k.style[E]="0"},t),[E,t]),p=L.useMemo(()=>Is(k=>{const S=`scroll${E[0].toUpperCase()}${E.slice(1)}`;k.style[E]=`${k[S]}px`},e),[E,e]),y=L.useMemo(()=>Is(k=>{k.style[E]=null},n),[E,n]),g=L.useMemo(()=>Is(k=>{k.style[E]=`${d(E,k)}px`,qm(k)},r),[r,d,E]),_=L.useMemo(()=>Is(k=>{k.style[E]=null},i),[E,i]);return A(qc,{ref:v,addEndListener:Uc,...w,"aria-expanded":w.role?l:null,onEnter:m,onEntering:p,onEntered:y,onExit:g,onExiting:_,childRef:s.ref,in:l,timeout:u,mountOnEnter:c,unmountOnExit:h,appear:f,children:(k,S)=>Zt.cloneElement(s,{...S,className:Oe(o,s.props.className,GC[k],E==="width"&&"collapse-horizontal")})})}),YC=QC;function H_(t){var e=L.useRef(t);return L.useEffect(function(){e.current=t},[t]),e}function qt(t){var e=H_(t);return L.useCallback(function(){return e.current&&e.current.apply(e,arguments)},[e])}function K_(){var t=L.useRef(!0),e=L.useRef(function(){return t.current});return L.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e.current}function XC(t){var e=L.useRef(null);return L.useEffect(function(){e.current=t}),e.current}var JC=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",ZC=typeof document<"u";const Qd=ZC||JC?L.useLayoutEffect:L.useEffect,e2=["as","disabled"];function t2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function n2(t){return!t||t.trim()==="#"}function Vm({tagName:t,disabled:e,href:n,target:r,rel:i,role:o,onClick:s,tabIndex:a=0,type:l}){t||(n!=null||r!=null||i!=null?t="a":t="button");const u={tagName:t};if(t==="button")return[{type:l||"button",disabled:e},u];const c=f=>{if((e||t==="a"&&n2(n))&&f.preventDefault(),e){f.stopPropagation();return}s==null||s(f)},h=f=>{f.key===" "&&(f.preventDefault(),c(f))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:o??"button",disabled:void 0,tabIndex:e?void 0:a,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?i:void 0,onClick:c,onKeyDown:h},u]}const W_=L.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=t2(t,e2);const[o,{tagName:s}]=Vm(Object.assign({tagName:n,disabled:r},i));return A(s,Object.assign({},i,o,{ref:e}))});W_.displayName="Button";const r2=["onKeyDown"];function i2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function o2(t){return!t||t.trim()==="#"}const G_=L.forwardRef((t,e)=>{let{onKeyDown:n}=t,r=i2(t,r2);const[i]=Vm(Object.assign({tagName:"a"},r)),o=qt(s=>{i.onKeyDown(s),n==null||n(s)});return o2(r.href)||r.role==="button"?A("a",Object.assign({ref:e},r,i,{onKeyDown:o})):A("a",Object.assign({ref:e},r,{onKeyDown:n}))});G_.displayName="Anchor";const Yd=G_,s2={[kn]:"show",[Xn]:"show"},Q_=L.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},o)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},a=L.useCallback((l,u)=>{qm(l),r==null||r(l,u)},[r]);return A(qc,{ref:o,addEndListener:Uc,...s,onEnter:a,childRef:e.ref,children:(l,u)=>L.cloneElement(e,{...u,className:Oe("fade",t,e.props.className,s2[l],n[l])})})});Q_.displayName="Fade";const a2=Q_,l2={"aria-label":ar.string,onClick:ar.func,variant:ar.oneOf(["white"])},zm=L.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>A("button",{ref:i,type:"button",className:Oe("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));zm.displayName="CloseButton";zm.propTypes=l2;const u2=zm,c2=t=>L.forwardRef((e,n)=>A("div",{...e,ref:n,className:Oe(e.className,t)}));var f2=/-(.)/g;function h2(t){return t.replace(f2,function(e,n){return n.toUpperCase()})}const d2=t=>t[0].toUpperCase()+h2(t).slice(1);function es(t,{displayName:e=d2(t),Component:n,defaultProps:r}={}){const i=L.forwardRef(({className:o,bsPrefix:s,as:a=n||"div",...l},u)=>{const c={...r,...l},h=Ve(s,t);return A(a,{ref:u,className:Oe(o,h),...c})});return i.displayName=e,i}const Y_=L.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:o=!1,className:s,...a},l)=>{const u=Ve(e,"btn"),[c,{tagName:h}]=Vm({tagName:t,disabled:o,...a});return A(h,{...c,...a,ref:l,disabled:o,className:Oe(s,u,i&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,a.href&&o&&"disabled")})});Y_.displayName="Button";const X_=Y_,J_=L.createContext(null);J_.displayName="CardHeaderContext";const p2=J_;function m2(t,e){var n=L.useRef(!0);L.useEffect(function(){if(n.current){n.current=!1;return}return t()},e)}function g2(t){var e=L.useRef(t);return e.current=t,e}function Z_(t){var e=g2(t);L.useEffect(function(){return function(){return e.current()}},[])}var Xd=Math.pow(2,31)-1;function eT(t,e,n){var r=n-Date.now();t.current=r<=Xd?setTimeout(e,r):setTimeout(function(){return eT(t,e,n)},Xd)}function v2(){var t=K_(),e=L.useRef();return Z_(function(){return clearTimeout(e.current)}),L.useMemo(function(){var n=function(){return clearTimeout(e.current)};function r(i,o){o===void 0&&(o=0),t()&&(n(),o<=Xd?e.current=setTimeout(i,o):eT(e,i,Date.now()+o))}return{set:r,clear:n}},[])}const y2=es("carousel-caption"),tT=L.forwardRef(({as:t="div",bsPrefix:e,className:n,...r},i)=>{const o=Oe(n,Ve(e,"carousel-item"));return A(t,{ref:i,...r,className:o})});tT.displayName="CarouselItem";const w2=tT;function Gy(t,e){let n=0;return L.Children.map(t,r=>L.isValidElement(r)?e(r,n++):r)}function E2(t,e){let n=0;L.Children.forEach(t,r=>{L.isValidElement(r)&&e(r,n++)})}function _2(t,e){return L.Children.toArray(t).some(n=>L.isValidElement(n)&&n.type===e)}const T2=40;function S2(t){if(!t||!t.style||!t.parentNode||!t.parentNode.style)return!1;const e=getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&getComputedStyle(t.parentNode).display!=="none"}const nT=L.forwardRef(({defaultActiveIndex:t=0,...e},n)=>{const{as:r="div",bsPrefix:i,slide:o=!0,fade:s=!1,controls:a=!0,indicators:l=!0,indicatorLabels:u=[],activeIndex:c,onSelect:h,onSlide:f,onSlid:d,interval:w=5e3,keyboard:v=!0,onKeyDown:E,pause:m="hover",onMouseOver:p,onMouseOut:y,wrap:g=!0,touch:_=!0,onTouchStart:k,onTouchMove:S,onTouchEnd:T,prevIcon:x=A("span",{"aria-hidden":"true",className:"carousel-control-prev-icon"}),prevLabel:I="Previous",nextIcon:b=A("span",{"aria-hidden":"true",className:"carousel-control-next-icon"}),nextLabel:N="Next",variant:C,className:P,children:F,...z}=Um({defaultActiveIndex:t,...e},{activeIndex:"onSelect"}),B=Ve(i,"carousel"),H=TC(),j=L.useRef(null),[M,O]=L.useState("next"),[D,$]=L.useState(!1),[V,q]=L.useState(!1),[R,U]=L.useState(c||0);L.useEffect(()=>{!V&&c!==R&&(j.current?O(j.current):O((c||0)>R?"next":"prev"),o&&q(!0),U(c||0))},[c,V,R,o]),L.useEffect(()=>{j.current&&(j.current=null)});let K=0,W;E2(F,(ye,Re)=>{++K,Re===c&&(W=ye.props.interval)});const X=H_(W),ne=L.useCallback(ye=>{if(V)return;let Re=R-1;if(Re<0){if(!g)return;Re=K-1}j.current="prev",h==null||h(Re,ye)},[V,R,h,g,K]),ue=qt(ye=>{if(V)return;let Re=R+1;if(Re>=K){if(!g)return;Re=0}j.current="next",h==null||h(Re,ye)}),he=L.useRef();L.useImperativeHandle(n,()=>({element:he.current,prev:ne,next:ue}));const le=qt(()=>{!document.hidden&&S2(he.current)&&(H?ne():ue())}),Te=M==="next"?"start":"end";m2(()=>{o||(f==null||f(R,Te),d==null||d(R,Te))},[R]);const Et=`${B}-item-${M}`,Xe=`${B}-item-${Te}`,G=L.useCallback(ye=>{qm(ye),f==null||f(R,Te)},[f,R,Te]),Q=L.useCallback(()=>{q(!1),d==null||d(R,Te)},[d,R,Te]),re=L.useCallback(ye=>{if(v&&!/input|textarea/i.test(ye.target.tagName))switch(ye.key){case"ArrowLeft":ye.preventDefault(),H?ue(ye):ne(ye);return;case"ArrowRight":ye.preventDefault(),H?ne(ye):ue(ye);return}E==null||E(ye)},[v,E,ne,ue,H]),oe=L.useCallback(ye=>{m==="hover"&&$(!0),p==null||p(ye)},[m,p]),Z=L.useCallback(ye=>{$(!1),y==null||y(ye)},[y]),Ee=L.useRef(0),ve=L.useRef(0),_e=v2(),Ut=L.useCallback(ye=>{Ee.current=ye.touches[0].clientX,ve.current=0,m==="hover"&&$(!0),k==null||k(ye)},[m,k]),wn=L.useCallback(ye=>{ye.touches&&ye.touches.length>1?ve.current=0:ve.current=ye.touches[0].clientX-Ee.current,S==null||S(ye)},[S]),Le=L.useCallback(ye=>{if(_){const Re=ve.current;Math.abs(Re)>T2&&(Re>0?ne(ye):ue(ye))}m==="hover"&&_e.set(()=>{$(!1)},w||void 0),T==null||T(ye)},[_,m,ne,ue,_e,w,T]),ml=w!=null&&!D&&!V,Ue=L.useRef();L.useEffect(()=>{var ye,Re;if(!ml)return;const Gn=H?ne:ue;return Ue.current=window.setInterval(document.visibilityState?le:Gn,(ye=(Re=X.current)!=null?Re:w)!=null?ye:void 0),()=>{Ue.current!==null&&clearInterval(Ue.current)}},[ml,ne,ue,X,w,le,H]);const En=L.useMemo(()=>l&&Array.from({length:K},(ye,Re)=>Gn=>{h==null||h(Re,Gn)}),[l,K,h]);return J(r,{ref:he,...z,onKeyDown:re,onMouseOver:oe,onMouseOut:Z,onTouchStart:Ut,onTouchMove:wn,onTouchEnd:Le,className:Oe(P,B,o&&"slide",s&&`${B}-fade`,C&&`${B}-${C}`),children:[l&&A("div",{className:`${B}-indicators`,children:Gy(F,(ye,Re)=>A("button",{type:"button","data-bs-target":"","aria-label":u!=null&&u.length?u[Re]:`Slide ${Re+1}`,className:Re===R?"active":void 0,onClick:En?En[Re]:void 0,"aria-current":Re===R},Re))}),A("div",{className:`${B}-inner`,children:Gy(F,(ye,Re)=>{const Gn=Re===R;return o?A(qc,{in:Gn,onEnter:Gn?G:void 0,onEntered:Gn?Q:void 0,addEndListener:Uc,children:(vs,WI)=>L.cloneElement(ye,{...WI,className:Oe(ye.props.className,Gn&&vs!=="entered"&&Et,(vs==="entered"||vs==="exiting")&&"active",(vs==="entering"||vs==="exiting")&&Xe)})}):L.cloneElement(ye,{className:Oe(ye.props.className,Gn&&"active")})})}),a&&J(Hn,{children:[(g||c!==0)&&J(Yd,{className:`${B}-control-prev`,onClick:ne,children:[x,I&&A("span",{className:"visually-hidden",children:I})]}),(g||c!==K-1)&&J(Yd,{className:`${B}-control-next`,onClick:ue,children:[b,N&&A("span",{className:"visually-hidden",children:N})]})]})]})});nT.displayName="Carousel";const fh=Object.assign(nT,{Caption:y2,Item:w2});function b2({as:t,bsPrefix:e,className:n,...r}){e=Ve(e,"col");const i=EC(),o=_C(),s=[],a=[];return i.forEach(l=>{const u=r[l];delete r[l];let c,h,f;typeof u=="object"&&u!=null?{span:c,offset:h,order:f}=u:c=u;const d=l!==o?`-${l}`:"";c&&s.push(c===!0?`${e}${d}`:`${e}${d}-${c}`),f!=null&&a.push(`order${d}-${f}`),h!=null&&a.push(`offset${d}-${h}`)}),[{...r,className:Oe(n,...s,...a)},{as:t,bsPrefix:e,spans:s}]}const rT=L.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:s}]=b2(t);return A(i,{...r,ref:e,className:Oe(n,!s.length&&o)})});rT.displayName="Col";const k2=rT;var I2=Function.prototype.bind.call(Function.prototype.call,[].slice);function di(t,e){return I2(t.querySelectorAll(e))}function N2(){var t=L.useReducer(function(n){return!n},!1),e=t[1];return e}function Qy(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const O2=L.createContext(null),Hm=(t,e=null)=>t!=null?String(t):e||null,Fu=O2,iT=L.createContext(null);iT.displayName="NavContext";const oT=iT,A2="data-rr-ui-",C2="rrUi";function Vc(t){return`${A2}${t}`}function x2(t){return`${C2}${t}`}const sT=L.createContext(jc?window:void 0);sT.Provider;function aT(){return L.useContext(sT)}const lT=L.createContext(null);lT.displayName="NavbarContext";const ts=lT,R2={type:ar.string,tooltip:ar.bool,as:ar.elementType},Km=L.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},o)=>A(t,{...i,ref:o,className:Oe(e,`${n}-${r?"tooltip":"feedback"}`)}));Km.displayName="Feedback";Km.propTypes=R2;const uT=Km,P2=L.createContext({}),pr=P2,cT=L.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:o=!1,as:s="input",...a},l)=>{const{controlId:u}=L.useContext(pr);return e=Ve(e,"form-check-input"),A(s,{...a,ref:l,type:r,id:t||u,className:Oe(n,e,i&&"is-valid",o&&"is-invalid")})});cT.displayName="FormCheckInput";const fT=cT,hT=L.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:o}=L.useContext(pr);return t=Ve(t,"form-check-label"),A("label",{...r,ref:i,htmlFor:n||o,className:Oe(e,t)})});hT.displayName="FormCheckLabel";const Jd=hT,dT=L.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:o=!1,isValid:s=!1,isInvalid:a=!1,feedbackTooltip:l=!1,feedback:u,feedbackType:c,className:h,style:f,title:d="",type:w="checkbox",label:v,children:E,as:m="input",...p},y)=>{e=Ve(e,"form-check"),n=Ve(n,"form-switch");const{controlId:g}=L.useContext(pr),_=L.useMemo(()=>({controlId:t||g}),[g,t]),k=!E&&v!=null&&v!==!1||_2(E,Jd),S=A(fT,{...p,type:w==="switch"?"checkbox":w,ref:y,isValid:s,isInvalid:a,disabled:o,as:m});return A(pr.Provider,{value:_,children:A("div",{style:f,className:Oe(h,k&&e,r&&`${e}-inline`,i&&`${e}-reverse`,w==="switch"&&n),children:E||J(Hn,{children:[S,k&&A(Jd,{title:d,children:v}),u&&A(uT,{type:c,tooltip:l,children:u})]})})})});dT.displayName="FormCheck";const ju=Object.assign(dT,{Input:fT,Label:Jd}),pT=L.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:o,isValid:s=!1,isInvalid:a=!1,plaintext:l,readOnly:u,as:c="input",...h},f)=>{const{controlId:d}=L.useContext(pr);t=Ve(t,"form-control");let w;return l?w={[`${t}-plaintext`]:!0}:w={[t]:!0,[`${t}-${n}`]:n},A(c,{...h,type:e,size:r,ref:f,readOnly:u,id:i||d,className:Oe(o,w,s&&"is-valid",a&&"is-invalid",e==="color"&&`${t}-color`)})});pT.displayName="FormControl";const L2=Object.assign(pT,{Feedback:uT}),D2=es("form-floating"),mT=L.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=L.useMemo(()=>({controlId:t}),[t]);return A(pr.Provider,{value:i,children:A(e,{...n,ref:r})})});mT.displayName="FormGroup";const gT=mT,vT=L.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:o,...s},a)=>{const{controlId:l}=L.useContext(pr);e=Ve(e,"form-label");let u="col-form-label";typeof n=="string"&&(u=`${u} ${u}-${n}`);const c=Oe(i,e,r&&"visually-hidden",n&&u);return o=o||l,n?A(k2,{ref:a,as:"label",className:c,htmlFor:o,...s}):A(t,{ref:a,className:c,htmlFor:o,...s})});vT.displayName="FormLabel";const M2=vT,yT=L.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:o}=L.useContext(pr);return t=Ve(t,"form-range"),A("input",{...r,type:"range",ref:i,className:Oe(e,t),id:n||o})});yT.displayName="FormRange";const $2=yT,wT=L.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:o=!1,id:s,...a},l)=>{const{controlId:u}=L.useContext(pr);return t=Ve(t,"form-select"),A("select",{...a,size:n,ref:l,className:Oe(r,t,e&&`${t}-${e}`,i&&"is-valid",o&&"is-invalid"),id:s||u})});wT.displayName="FormSelect";const F2=wT,ET=L.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},o)=>(t=Ve(t,"form-text"),A(n,{...i,ref:o,className:Oe(e,t,r&&"text-muted")})));ET.displayName="FormText";const j2=ET,_T=L.forwardRef((t,e)=>A(ju,{...t,ref:e,type:"switch"}));_T.displayName="Switch";const U2=Object.assign(_T,{Input:ju.Input,Label:ju.Label}),TT=L.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...o},s)=>(t=Ve(t,"form-floating"),J(gT,{ref:s,className:Oe(e,t),controlId:r,...o,children:[n,A("label",{htmlFor:r,children:i})]})));TT.displayName="FloatingLabel";const B2=TT,q2={_ref:ar.any,validated:ar.bool,as:ar.elementType},Wm=L.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>A(n,{...r,ref:i,className:Oe(t,e&&"was-validated")}));Wm.displayName="Form";Wm.propTypes=q2;const In=Object.assign(Wm,{Group:gT,Control:L2,Floating:D2,Check:ju,Switch:U2,Label:M2,Text:j2,Range:$2,Select:F2,FloatingLabel:B2}),V2=L.createContext(null),ST=V2,z2=["as","active","eventKey"];function H2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function bT({key:t,onClick:e,active:n,id:r,role:i,disabled:o}){const s=L.useContext(Fu),a=L.useContext(oT),l=L.useContext(ST);let u=n;const c={role:i};if(a){!i&&a.role==="tablist"&&(c.role="tab");const h=a.getControllerId(t??null),f=a.getControlledId(t??null);c[Vc("event-key")]=t,c.id=h||r,u=n==null&&t!=null?a.activeKey===t:n,(u||!(l!=null&&l.unmountOnExit)&&!(l!=null&&l.mountOnEnter))&&(c["aria-controls"]=f)}return c.role==="tab"&&(c["aria-selected"]=u,u||(c.tabIndex=-1),o&&(c.tabIndex=-1,c["aria-disabled"]=!0)),c.onClick=qt(h=>{o||(e==null||e(h),t!=null&&s&&!h.isPropagationStopped()&&s(t,h))}),[c,{isActive:u}]}const kT=L.forwardRef((t,e)=>{let{as:n=W_,active:r,eventKey:i}=t,o=H2(t,z2);const[s,a]=bT(Object.assign({key:Hm(i,o.href),active:r},o));return s[Vc("active")]=a.isActive,A(n,Object.assign({},o,s,{ref:e}))});kT.displayName="NavItem";const K2=kT,W2=["as","onSelect","activeKey","role","onKeyDown"];function G2(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}const Yy=()=>{},Xy=Vc("event-key"),IT=L.forwardRef((t,e)=>{let{as:n="div",onSelect:r,activeKey:i,role:o,onKeyDown:s}=t,a=G2(t,W2);const l=N2(),u=L.useRef(!1),c=L.useContext(Fu),h=L.useContext(ST);let f,d;h&&(o=o||"tablist",i=h.activeKey,f=h.getControlledId,d=h.getControllerId);const w=L.useRef(null),v=y=>{const g=w.current;if(!g)return null;const _=di(g,`[${Xy}]:not([aria-disabled=true])`),k=g.querySelector("[aria-selected=true]");if(!k||k!==document.activeElement)return null;const S=_.indexOf(k);if(S===-1)return null;let T=S+y;return T>=_.length&&(T=0),T<0&&(T=_.length-1),_[T]},E=(y,g)=>{y!=null&&(r==null||r(y,g),c==null||c(y,g))},m=y=>{if(s==null||s(y),!h)return;let g;switch(y.key){case"ArrowLeft":case"ArrowUp":g=v(-1);break;case"ArrowRight":case"ArrowDown":g=v(1);break;default:return}g&&(y.preventDefault(),E(g.dataset[x2("EventKey")]||null,y),u.current=!0,l())};L.useEffect(()=>{if(w.current&&u.current){const y=w.current.querySelector(`[${Xy}][aria-selected=true]`);y==null||y.focus()}u.current=!1});const p=Bc(e,w);return A(Fu.Provider,{value:E,children:A(oT.Provider,{value:{role:o,activeKey:Hm(i),getControlledId:f||Yy,getControllerId:d||Yy},children:A(n,Object.assign({},a,{onKeyDown:m,ref:p,role:o}))})})});IT.displayName="Nav";const Q2=Object.assign(IT,{Item:K2});function hh(t){t===void 0&&(t=Bm());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Y2(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const Jy=Vc("modal-open");class X2{constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return Y2(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(sr(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(Jy,""),sr(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(Jy),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Gm=X2,dh=(t,e)=>jc?t==null?(e||Bm()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function J2(t,e){const n=aT(),[r,i]=L.useState(()=>dh(t,n==null?void 0:n.document));if(!r){const o=dh(t);o&&i(o)}return L.useEffect(()=>{e&&r&&e(r)},[e,r]),L.useEffect(()=>{const o=dh(t);o!==r&&i(o)},[t,r]),r}function Z2({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const o=L.useRef(null),s=L.useRef(e),a=qt(n);L.useEffect(()=>{e?s.current=!0:a(o.current)},[e,a]);const l=Bc(o,t.ref),u=L.cloneElement(t,{ref:l});return e?u:i||!s.current&&r?null:u}function ex({in:t,onTransition:e}){const n=L.useRef(null),r=L.useRef(!0),i=qt(e);return Qd(()=>{if(!n.current)return;let o=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>o}),()=>{o=!0}},[t,i]),Qd(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function tx({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[o,s]=L.useState(!e);e&&o&&s(!1);const a=ex({in:!!e,onTransition:u=>{const c=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(s(!0),n==null||n(u.element)))};Promise.resolve(i(u)).then(c,h=>{throw u.in||s(!0),h})}}),l=Bc(a,t.ref);return o&&!e?null:L.cloneElement(t,{ref:l})}function Zy(t,e,n){return t?A(t,Object.assign({},n)):e?A(tx,Object.assign({},n,{transition:e})):A(Z2,Object.assign({},n))}function nx(t){return t.code==="Escape"||t.keyCode===27}const rx=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function ix(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}let ph;function ox(t){return ph||(ph=new Gm({ownerDocument:t==null?void 0:t.document})),ph}function sx(t){const e=aT(),n=t||ox(e),r=L.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:L.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:L.useCallback(i=>{r.current.backdrop=i},[])})}const NT=L.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:o,children:s,backdrop:a=!0,keyboard:l=!0,onBackdropClick:u,onEscapeKeyDown:c,transition:h,runTransition:f,backdropTransition:d,runBackdropTransition:w,autoFocus:v=!0,enforceFocus:E=!0,restoreFocus:m=!0,restoreFocusOptions:p,renderDialog:y,renderBackdrop:g=le=>A("div",Object.assign({},le)),manager:_,container:k,onShow:S,onHide:T=()=>{},onExit:x,onExited:I,onExiting:b,onEnter:N,onEntering:C,onEntered:P}=t,F=ix(t,rx);const z=J2(k),B=sx(_),H=K_(),j=XC(n),[M,O]=L.useState(!n),D=L.useRef(null);L.useImperativeHandle(e,()=>B,[B]),jc&&!j&&n&&(D.current=hh()),n&&M&&O(!1);const $=qt(()=>{if(B.add(),W.current=$u(document,"keydown",U),K.current=$u(document,"focus",()=>setTimeout(q),!0),S&&S(),v){const le=hh(document);B.dialog&&le&&!Qy(B.dialog,le)&&(D.current=le,B.dialog.focus())}}),V=qt(()=>{if(B.remove(),W.current==null||W.current(),K.current==null||K.current(),m){var le;(le=D.current)==null||le.focus==null||le.focus(p),D.current=null}});L.useEffect(()=>{!n||!z||$()},[n,z,$]),L.useEffect(()=>{M&&V()},[M,V]),Z_(()=>{V()});const q=qt(()=>{if(!E||!H()||!B.isTopModal())return;const le=hh();B.dialog&&le&&!Qy(B.dialog,le)&&B.dialog.focus()}),R=qt(le=>{le.target===le.currentTarget&&(u==null||u(le),a===!0&&T())}),U=qt(le=>{l&&nx(le)&&B.isTopModal()&&(c==null||c(le),le.defaultPrevented||T())}),K=L.useRef(),W=L.useRef(),X=(...le)=>{O(!0),I==null||I(...le)};if(!z)return null;const ne=Object.assign({role:r,ref:B.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:o,className:i,tabIndex:-1});let ue=y?y(ne):A("div",Object.assign({},ne,{children:L.cloneElement(s,{role:"document"})}));ue=Zy(h,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:x,onExiting:b,onExited:X,onEnter:N,onEntering:C,onEntered:P,children:ue});let he=null;return a&&(he=g({ref:B.setBackdropRef,onClick:R}),he=Zy(d,w,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:he})),A(Hn,{children:yo.createPortal(J(Hn,{children:[he,ue]}),z)})});NT.displayName="Modal";const ax=Object.assign(NT,{Manager:Gm});function lx(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function ux(t,e){t.classList?t.classList.add(e):lx(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function e0(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function cx(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=e0(t.className,e):t.setAttribute("class",e0(t.className&&t.className.baseVal||"",e))}const to={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class OT extends Gm{adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,sr(n,{[e]:`${parseFloat(sr(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],sr(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(ux(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";di(n,to.FIXED_CONTENT).forEach(o=>this.adjustAndStore(r,o,e.scrollBarWidth)),di(n,to.STICKY_CONTENT).forEach(o=>this.adjustAndStore(i,o,-e.scrollBarWidth)),di(n,to.NAVBAR_TOGGLER).forEach(o=>this.adjustAndStore(i,o,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();cx(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";di(n,to.FIXED_CONTENT).forEach(o=>this.restore(r,o)),di(n,to.STICKY_CONTENT).forEach(o=>this.restore(i,o)),di(n,to.NAVBAR_TOGGLER).forEach(o=>this.restore(i,o))}}let mh;function fx(t){return mh||(mh=new OT(t)),mh}const hx=OT,dx=L.createContext({onHide(){}}),AT=dx,px=L.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...o},s)=>{const a=L.useContext(AT),l=qt(()=>{a==null||a.onHide(),r==null||r()});return J("div",{ref:s,...o,children:[i,n&&A(u2,{"aria-label":t,variant:e,onClick:l})]})}),mx=px;var t0={exports:{}},Zd={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function n(r){function i(s,a,l,u,c,h){var f=u||"<>",d=h||l;if(a[l]==null)return s?new Error("Required "+c+" `"+d+"` was not specified "+("in `"+f+"`.")):null;for(var w=arguments.length,v=Array(w>6?w-6:0),E=6;E{t=Ve(t,"nav-link");const[l,u]=bT({key:Hm(i,s.href),active:r,disabled:o,...s});return A(n,{...s,...l,ref:a,disabled:o,className:Oe(e,t,o&&"disabled",u.isActive&&"active")})});CT.displayName="NavLink";const yx=CT,xT=L.forwardRef((t,e)=>{const{as:n="div",bsPrefix:r,variant:i,fill:o=!1,justify:s=!1,navbar:a,navbarScroll:l,className:u,activeKey:c,...h}=Um(t,{activeKey:"onSelect"}),f=Ve(r,"nav");let d,w,v=!1;const E=L.useContext(ts),m=L.useContext(p2);return E?(d=E.bsPrefix,v=a??!0):m&&({cardHeaderBsPrefix:w}=m),A(Q2,{as:n,ref:e,activeKey:c,className:Oe(u,{[f]:!v,[`${d}-nav`]:v,[`${d}-nav-scroll`]:v&&l,[`${w}-${i}`]:!!w,[`${f}-${i}`]:!!i,[`${f}-fill`]:o,[`${f}-justified`]:s}),...h})});xT.displayName="Nav";const ci=Object.assign(xT,{Item:vx,Link:yx}),RT=L.forwardRef(({bsPrefix:t,className:e,as:n,...r},i)=>{t=Ve(t,"navbar-brand");const o=n||(r.href?"a":"span");return A(o,{...r,ref:i,className:Oe(e,t)})});RT.displayName="NavbarBrand";const wx=RT,PT=L.forwardRef(({children:t,bsPrefix:e,...n},r)=>{e=Ve(e,"navbar-collapse");const i=L.useContext(ts);return A(YC,{in:!!(i&&i.expanded),...n,children:A("div",{ref:r,className:e,children:t})})});PT.displayName="NavbarCollapse";const Ex=PT,LT=L.forwardRef(({bsPrefix:t,className:e,children:n,label:r="Toggle navigation",as:i="button",onClick:o,...s},a)=>{t=Ve(t,"navbar-toggler");const{onToggle:l,expanded:u}=L.useContext(ts)||{},c=qt(h=>{o&&o(h),l&&l()});return i==="button"&&(s.type="button"),A(i,{...s,ref:a,onClick:c,"aria-label":r,className:Oe(e,t,!u&&"collapsed"),children:n||A("span",{className:`${t}-icon`})})});LT.displayName="NavbarToggle";const _x=LT;var ep=new WeakMap,n0=function(e,n){if(!(!e||!n)){var r=ep.get(n)||new Map;ep.set(n,r);var i=r.get(e);return i||(i=n.matchMedia(e),i.refCount=0,r.set(i.media,i)),i}};function Tx(t,e){e===void 0&&(e=typeof window>"u"?void 0:window);var n=n0(t,e),r=L.useState(function(){return n?n.matches:!1}),i=r[0],o=r[1];return Qd(function(){var s=n0(t,e);if(!s)return o(!1);var a=ep.get(e),l=function(){o(s.matches)};return s.refCount++,s.addListener(l),l(),function(){s.removeListener(l),s.refCount--,s.refCount<=0&&(a==null||a.delete(s.media)),s=void 0}},[t]),i}function Sx(t){var e=Object.keys(t);function n(a,l){return a===l?l:a?a+" and "+l:l}function r(a){return e[Math.min(e.indexOf(a)+1,e.length-1)]}function i(a){var l=r(a),u=t[l];return typeof u=="number"?u=u-.2+"px":u="calc("+u+" - 0.2px)","(max-width: "+u+")"}function o(a){var l=t[a];return typeof l=="number"&&(l=l+"px"),"(min-width: "+l+")"}function s(a,l,u){var c;if(typeof a=="object")c=a,u=l,l=!0;else{var h;l=l||!0,c=(h={},h[a]=l,h)}var f=L.useMemo(function(){return Object.entries(c).reduce(function(d,w){var v=w[0],E=w[1];return(E==="up"||E===!0)&&(d=n(d,o(v))),(E==="down"||E===!0)&&(d=n(d,i(v))),d},"")},[JSON.stringify(c)]);return Tx(f,u)}return s}var bx=Sx({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});const kx=es("offcanvas-body"),Ix={[kn]:"show",[Xn]:"show"},DT=L.forwardRef(({bsPrefix:t,className:e,children:n,in:r=!1,mountOnEnter:i=!1,unmountOnExit:o=!1,appear:s=!1,...a},l)=>(t=Ve(t,"offcanvas"),A(qc,{ref:l,addEndListener:Uc,in:r,mountOnEnter:i,unmountOnExit:o,appear:s,...a,childRef:n.ref,children:(u,c)=>L.cloneElement(n,{...c,className:Oe(e,n.props.className,(u===kn||u===Sa)&&`${t}-toggling`,Ix[u])})})));DT.displayName="OffcanvasToggling";const Nx=DT,MT=L.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},o)=>(t=Ve(t,"offcanvas-header"),A(mx,{ref:o,...i,className:Oe(e,t),closeLabel:n,closeButton:r})));MT.displayName="OffcanvasHeader";const Ox=MT,Ax=c2("h5"),Cx=es("offcanvas-title",{Component:Ax});function xx(t){return A(Nx,{...t})}function Rx(t){return A(a2,{...t})}const $T=L.forwardRef(({bsPrefix:t,className:e,children:n,"aria-labelledby":r,placement:i="start",responsive:o,show:s=!1,backdrop:a=!0,keyboard:l=!0,scroll:u=!1,onEscapeKeyDown:c,onShow:h,onHide:f,container:d,autoFocus:w=!0,enforceFocus:v=!0,restoreFocus:E=!0,restoreFocusOptions:m,onEntered:p,onExit:y,onExiting:g,onEnter:_,onEntering:k,onExited:S,backdropClassName:T,manager:x,renderStaticNode:I=!1,...b},N)=>{const C=L.useRef();t=Ve(t,"offcanvas");const{onToggle:P}=L.useContext(ts)||{},[F,z]=L.useState(!1),B=bx(o||"xs","up");L.useEffect(()=>{z(o?s&&!B:s)},[s,o,B]);const H=qt(()=>{P==null||P(),f==null||f()}),j=L.useMemo(()=>({onHide:H}),[H]);function M(){return x||(u?(C.current||(C.current=new hx({handleContainerOverflow:!1})),C.current):fx())}const O=(q,...R)=>{q&&(q.style.visibility="visible"),_==null||_(q,...R)},D=(q,...R)=>{q&&(q.style.visibility=""),S==null||S(...R)},$=L.useCallback(q=>A("div",{...q,className:Oe(`${t}-backdrop`,T)}),[T,t]),V=q=>A("div",{...q,...b,className:Oe(e,o?`${t}-${o}`:t,`${t}-${i}`),"aria-labelledby":r,children:n});return J(Hn,{children:[!F&&(o||I)&&V({}),A(AT.Provider,{value:j,children:A(ax,{show:F,ref:N,backdrop:a,container:d,keyboard:l,autoFocus:w,enforceFocus:v&&!u,restoreFocus:E,restoreFocusOptions:m,onEscapeKeyDown:c,onShow:h,onHide:H,onEnter:O,onEntering:k,onEntered:p,onExit:y,onExiting:g,onExited:D,manager:M(),transition:xx,backdropTransition:Rx,renderBackdrop:$,renderDialog:V})})]})});$T.displayName="Offcanvas";const Px=Object.assign($T,{Body:kx,Header:Ox,Title:Cx}),FT=L.forwardRef((t,e)=>{const n=L.useContext(ts);return A(Px,{ref:e,show:!!(n!=null&&n.expanded),...t,renderStaticNode:!0})});FT.displayName="NavbarOffcanvas";const Lx=FT,Dx=es("navbar-text",{Component:"span"}),jT=L.forwardRef((t,e)=>{const{bsPrefix:n,expand:r=!0,variant:i="light",bg:o,fixed:s,sticky:a,className:l,as:u="nav",expanded:c,onToggle:h,onSelect:f,collapseOnSelect:d=!1,...w}=Um(t,{expanded:"onToggle"}),v=Ve(n,"navbar"),E=L.useCallback((...y)=>{f==null||f(...y),d&&c&&(h==null||h(!1))},[f,d,c,h]);w.role===void 0&&u!=="nav"&&(w.role="navigation");let m=`${v}-expand`;typeof r=="string"&&(m=`${m}-${r}`);const p=L.useMemo(()=>({onToggle:()=>h==null?void 0:h(!c),bsPrefix:v,expanded:!!c,expand:r}),[v,c,r,h]);return A(ts.Provider,{value:p,children:A(Fu.Provider,{value:E,children:A(u,{ref:e,...w,className:Oe(l,v,r&&m,i&&`${v}-${i}`,o&&`bg-${o}`,a&&`sticky-${a}`,s&&`fixed-${s}`)})})})});jT.displayName="Navbar";const gh=Object.assign(jT,{Brand:wx,Collapse:Ex,Offcanvas:Lx,Text:Dx,Toggle:_x});const Mx=()=>J(gh,{expand:"lg",className:"bg-transparent",children:[A(gh.Toggle,{"aria-controls":"basic-navbar-nav",style:{color:"white"}}),A(gh.Collapse,{id:"basic-navbar-nav",children:J(ci,{className:"mr-auto nav-centered",children:[A(ci.Item,{children:J(mt,{className:"nav-link",to:"/introduction",children:[A("span",{className:"japanese-text",children:"作品紹介"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Introduction"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/blog",children:[A("span",{className:"japanese-text",children:"ニュース"})," ",A("br",{})," ",A("span",{className:"english-text",children:"News"})]})}),J(ci.Link,{href:"https://github.com/Loke-60000",target:"_blank",rel:"noopener noreferrer",children:[A("span",{className:"japanese-text",children:"ギットハブ"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Github"})]}),J(mt,{className:"nav-link",to:"/projects",children:[A("span",{className:"japanese-text",children:"プロジェクト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Projects"})]}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/illustrations",children:[A("span",{className:"japanese-text",children:"イラスト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Illustrations"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/links",children:[A("span",{className:"japanese-text",children:"リンクス"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Links"})]})}),A(ci.Item,{children:J(mt,{className:"nav-link",to:"/contact",children:[A("span",{className:"japanese-text",children:"コンタクト"})," ",A("br",{})," ",A("span",{className:"english-text",children:"Contact"})]})})]})})]});const r0="/assets/divergence_meter_tube-8013128c.webp";function $x(){const[t,e]=L.useState(new Date),n=L.useRef(),r=()=>{e(new Date),n.current=requestAnimationFrame(r)};L.useEffect(()=>(n.current=requestAnimationFrame(r),()=>cancelAnimationFrame(n.current)),[]);const i=[t.getHours().toString().padStart(2,"0"),t.getMinutes().toString().padStart(2,"0"),t.getSeconds().toString().padStart(2,"0"),t.getMilliseconds().toString().padStart(3,"0")],o="0",s="0";return J("div",{className:"nixie__wrapper",children:[A("div",{className:"nixie__mesh"}),A("div",{className:"nixie__value",children:i.map((a,l)=>J(Zt.Fragment,{children:[a.split("").map((u,c)=>J("span",{className:"nixie__digit-container",children:[A("span",{className:"nixie__decorative-number",children:o[c%o.length]}),A("span",{className:"nixie__decorative-number-layer2",children:s[c%s.length]}),A("span",{className:"nixie__digit",children:u}),A("span",{className:"nixie__number-background",style:{backgroundImage:`url(${r0})`}})]},c)),lL.useContext(UT),jx=({children:t})=>{const[e,n]=Zt.useState("en"),i={language:e,toggleLanguage:()=>{n(o=>o==="en"?"fr":"en")}};return A(UT.Provider,{value:i,children:t})},Ux=({images:t})=>A(fh,{className:"custom-carousel",children:t.map((e,n)=>J(fh.Item,{children:[A("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:A("img",{className:"d-block w-100",src:e.src,alt:e.alt})}),e.caption&&A(fh.Caption,{children:A("h3",{children:e.caption})})]},n))}),BT="/assets/amadeus-fbfe58f2.webp",qT="/assets/rakugaki-b7537d6f.webp",VT="/assets/atchan-a8a39b57.webp",Bx="/assets/WEBSITE_Gadgetlab_website-fe56e292.webp",qx="/assets/WEBSITE_bannerr_contactme_1-93124380.webp",Vx="/assets/WEBSITE_bannerr_amadeus_1-b568a1b6.webp",zx="/assets/atchan_banner-2c72e868.webp";/** * @license * Copyright 2017 Google LLC * @@ -98,7 +98,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const zT=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},Hx=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const o=t[n++];e[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=t[n++],s=t[n++],a=t[n++],l=((i&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const o=t[n++],s=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}}return e.join("")},HT={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,h=(o&3)<<4|a>>4;let c=(a&15)<<2|u>>6,d=u&63;l||(d=64,s||(c=64)),r.push(n[f],n[h],n[c],n[d])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(zT(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Hx(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(c),u!==64){const d=a<<4&240|u>>2;if(r.push(d),h!==64){const w=u<<6&192|h;r.push(w)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Kx extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Wx=function(t){const e=zT(t);return HT.encodeByteArray(e,!0)},Uu=function(t){return Wx(t).replace(/\./g,"")},KT=function(t){try{return HT.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** + */const zT=function(t){const e=[];let n=0;for(let r=0;r>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},Hx=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const o=t[n++];e[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=t[n++],s=t[n++],a=t[n++],l=((i&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const o=t[n++],s=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}}return e.join("")},HT={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,h=(o&3)<<4|a>>4;let f=(a&15)<<2|u>>6,d=u&63;l||(d=64,s||(f=64)),r.push(n[c],n[h],n[f],n[d])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(zT(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Hx(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(f),u!==64){const d=a<<4&240|u>>2;if(r.push(d),h!==64){const w=u<<6&192|h;r.push(w)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Kx extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Wx=function(t){const e=zT(t);return HT.encodeByteArray(e,!0)},Uu=function(t){return Wx(t).replace(/\./g,"")},KT=function(t){try{return HT.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2022 Google LLC * @@ -443,14 +443,14 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function _P(t){Kn(new Cn("platform-logger",e=>new MR(e),"PRIVATE")),Kn(new Cn("heartbeat",e=>new yP(e),"PRIVATE")),pn(rp,u0,t),pn(rp,u0,"esm2017"),pn("fire-js","")}_P("");var TP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ie,Jm=Jm||{},me=TP||self;function qu(){}function Hc(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function Qa(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function SP(t){return Object.prototype.hasOwnProperty.call(t,Th)&&t[Th]||(t[Th]=++bP)}var Th="closure_uid_"+(1e9*Math.random()>>>0),bP=0;function kP(t,e,n){return t.call.apply(t.bind,arguments)}function IP(t,e,n){if(!t)throw Error();if(2e?1:0}function Kc(){var t=me.navigator;return t&&(t=t.userAgent)?t:""}function Fn(t){return Kc().indexOf(t)!=-1}function eg(t){return eg[" "](t),t}eg[" "]=qu;function iS(t,e,n){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=n(e)}var AP=Fn("Opera"),Uo=Fn("Trident")||Fn("MSIE"),oS=Fn("Edge"),sp=oS||Uo,sS=Fn("Gecko")&&!(Kc().toLowerCase().indexOf("webkit")!=-1&&!Fn("Edge"))&&!(Fn("Trident")||Fn("MSIE"))&&!Fn("Edge"),CP=Kc().toLowerCase().indexOf("webkit")!=-1&&!Fn("Edge");function aS(){var t=me.document;return t?t.documentMode:void 0}var zu;e:{var bh="",kh=function(){var t=Kc();if(sS)return/rv:([^\);]+)(\)|;)/.exec(t);if(oS)return/Edge\/([\d\.]+)/.exec(t);if(Uo)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(CP)return/WebKit\/(\S+)/.exec(t);if(AP)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(kh&&(bh=kh?kh[1]:""),Uo){var Ih=aS();if(Ih!=null&&Ih>parseFloat(bh)){zu=String(Ih);break e}}zu=bh}var xP={};function RP(){return iS(xP,9,function(){let t=0;const e=p0(String(zu)).split("."),n=p0("9").split("."),r=Math.max(e.length,n.length);for(let s=0;t==0&&s>>0);function og(t){return typeof t=="function"?t:(t[Oh]||(t[Oh]=function(e){return t.handleEvent(e)}),t[Oh])}function ct(){ai.call(this),this.i=new Gc(this),this.S=this,this.J=null}ft(ct,ai);ct.prototype[Ya]=!0;ct.prototype.removeEventListener=function(t,e,n,r){dS(this,t,e,n,r)};function yt(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,typeof e=="string")e=new At(e,t);else if(e instanceof At)e.target=e.target||t;else{var i=e;e=new At(r,t),uS(e,i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var s=e.g=n[o];i=Dl(s,r,!0,e)&&i}if(s=e.g=t,i=Dl(s,r,!0,e)&&i,i=Dl(s,r,!1,e)&&i,n)for(o=0;onew BP,t=>t.reset());class BP{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function qP(t){me.setTimeout(()=>{throw t},0)}function gS(t,e){cp||VP(),fp||(cp(),fp=!0),vS.add(t,e)}var cp;function VP(){var t=me.Promise.resolve(void 0);cp=function(){t.then(zP)}}var fp=!1,vS=new UP;function zP(){for(var t;t=jP();){try{t.h.call(t.g)}catch(n){qP(n)}var e=mS;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}fp=!1}function Qc(t,e){ct.call(this),this.h=t||1,this.g=e||me,this.j=Ot(this.qb,this),this.l=Date.now()}ft(Qc,ct);ie=Qc.prototype;ie.ga=!1;ie.T=null;ie.qb=function(){if(this.ga){var t=Date.now()-this.l;0{t.g=null,t.i&&(t.i=!1,yS(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class HP extends ai{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:yS(this)}N(){super.N(),this.g&&(me.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Na(t){ai.call(this),this.h=t,this.g={}}ft(Na,ai);var v0=[];function wS(t,e,n,r){Array.isArray(n)||(n&&(v0[0]=n.toString()),n=v0);for(var i=0;inew MR(e),"PRIVATE")),Kn(new Cn("heartbeat",e=>new yP(e),"PRIVATE")),pn(rp,u0,t),pn(rp,u0,"esm2017"),pn("fire-js","")}_P("");var TP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ie,Jm=Jm||{},me=TP||self;function qu(){}function Hc(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function Qa(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function SP(t){return Object.prototype.hasOwnProperty.call(t,Th)&&t[Th]||(t[Th]=++bP)}var Th="closure_uid_"+(1e9*Math.random()>>>0),bP=0;function kP(t,e,n){return t.call.apply(t.bind,arguments)}function IP(t,e,n){if(!t)throw Error();if(2e?1:0}function Kc(){var t=me.navigator;return t&&(t=t.userAgent)?t:""}function Fn(t){return Kc().indexOf(t)!=-1}function eg(t){return eg[" "](t),t}eg[" "]=qu;function iS(t,e,n){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:t[e]=n(e)}var AP=Fn("Opera"),Uo=Fn("Trident")||Fn("MSIE"),oS=Fn("Edge"),sp=oS||Uo,sS=Fn("Gecko")&&!(Kc().toLowerCase().indexOf("webkit")!=-1&&!Fn("Edge"))&&!(Fn("Trident")||Fn("MSIE"))&&!Fn("Edge"),CP=Kc().toLowerCase().indexOf("webkit")!=-1&&!Fn("Edge");function aS(){var t=me.document;return t?t.documentMode:void 0}var zu;e:{var bh="",kh=function(){var t=Kc();if(sS)return/rv:([^\);]+)(\)|;)/.exec(t);if(oS)return/Edge\/([\d\.]+)/.exec(t);if(Uo)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(CP)return/WebKit\/(\S+)/.exec(t);if(AP)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(kh&&(bh=kh?kh[1]:""),Uo){var Ih=aS();if(Ih!=null&&Ih>parseFloat(bh)){zu=String(Ih);break e}}zu=bh}var xP={};function RP(){return iS(xP,9,function(){let t=0;const e=p0(String(zu)).split("."),n=p0("9").split("."),r=Math.max(e.length,n.length);for(let s=0;t==0&&s>>0);function og(t){return typeof t=="function"?t:(t[Oh]||(t[Oh]=function(e){return t.handleEvent(e)}),t[Oh])}function ct(){ai.call(this),this.i=new Gc(this),this.S=this,this.J=null}ft(ct,ai);ct.prototype[Ya]=!0;ct.prototype.removeEventListener=function(t,e,n,r){dS(this,t,e,n,r)};function yt(t,e){var n,r=t.J;if(r)for(n=[];r;r=r.J)n.push(r);if(t=t.S,r=e.type||e,typeof e=="string")e=new At(e,t);else if(e instanceof At)e.target=e.target||t;else{var i=e;e=new At(r,t),uS(e,i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var s=e.g=n[o];i=Dl(s,r,!0,e)&&i}if(s=e.g=t,i=Dl(s,r,!0,e)&&i,i=Dl(s,r,!1,e)&&i,n)for(o=0;onew BP,t=>t.reset());class BP{constructor(){this.next=this.g=this.h=null}set(e,n){this.h=e,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function qP(t){me.setTimeout(()=>{throw t},0)}function gS(t,e){cp||VP(),fp||(cp(),fp=!0),vS.add(t,e)}var cp;function VP(){var t=me.Promise.resolve(void 0);cp=function(){t.then(zP)}}var fp=!1,vS=new UP;function zP(){for(var t;t=jP();){try{t.h.call(t.g)}catch(n){qP(n)}var e=mS;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}fp=!1}function Qc(t,e){ct.call(this),this.h=t||1,this.g=e||me,this.j=Ot(this.qb,this),this.l=Date.now()}ft(Qc,ct);ie=Qc.prototype;ie.ga=!1;ie.T=null;ie.qb=function(){if(this.ga){var t=Date.now()-this.l;0{t.g=null,t.i&&(t.i=!1,yS(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class HP extends ai{constructor(e,n){super(),this.m=e,this.j=n,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:yS(this)}N(){super.N(),this.g&&(me.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Na(t){ai.call(this),this.h=t,this.g={}}ft(Na,ai);var v0=[];function wS(t,e,n,r){Array.isArray(n)||(n&&(v0[0]=n.toString()),n=v0);for(var i=0;ir.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if(o!="noop"&&o!="stop"&&o!="close")for(var s=1;sf)&&(f!=3||sp||this.g&&(this.h.h||this.g.ja()||S0(this.g)))){this.J||f!=4||e==7||(e==8||0>=h?Oa(3):Oa(2)),ef(this);var n=this.g.da();this.aa=n;t:if(OS(this)){var r=S0(this.g);t="";var i=r.length,o=tr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){wi(this),Js(this);var s="";break t}this.h.i=new me.TextDecoder}for(e=0;ee.length?Hu:(e=e.substr(r,n),t.C=r+n,e)))}ie.cancel=function(){this.J=!0,wi(this)};function el(t){t.Y=Date.now()+t.P,CS(t,t.P)}function CS(t,e){if(t.B!=null)throw Error("WatchDog timer not null");t.B=Xa(Ot(t.lb,t),e)}function ef(t){t.B&&(me.clearTimeout(t.B),t.B=null)}ie.lb=function(){this.B=null;const t=Date.now();0<=t-this.Y?(GP(this.j,this.A),this.L!=2&&(Oa(),Mt(17)),wi(this),this.o=2,Js(this)):CS(this,this.Y-t)};function Js(t){t.l.H==0||t.J||JS(t.l,t)}function wi(t){ef(t);var e=t.M;e&&typeof e.ra=="function"&&e.ra(),t.M=null,ag(t.V),ES(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.ra())}function mp(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||gp(n.h,t))){if(!t.K&&gp(n.h,t)&&n.H==3){try{var r=n.Ja.g.parse(e)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3i[2]&&n.M&&n.A==0&&!n.v&&(n.v=Xa(Ot(n.ib,n),6e3));if(1>=FS(n.h)&&n.na){try{n.na()}catch{}n.na=void 0}}else Ei(n,11)}else if((t.K||n.g==t)&&Gu(n),!Vu(e))for(i=n.Ja.g.parse(e),e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function E0(t,e,n){e instanceof Aa?(t.i=e,sL(t.i,t.h)):(n||(e=js(e,iL)),t.i=new Aa(e,t.h))}function qe(t,e,n){t.i.set(e,n)}function tf(t){return qe(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Fs(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function js(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,tL),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function tL(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var _0=/[#\/\?@]/g,nL=/[#\?:]/g,rL=/[#\?]/g,iL=/[#\?@]/g,oL=/#/g;function Aa(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function li(t){t.g||(t.g=new Map,t.h=0,t.i&&eL(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}ie=Aa.prototype;ie.add=function(t,e){li(this),this.i=null,t=rs(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function PS(t,e){li(t),e=rs(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function LS(t,e){return li(t),e=rs(t,e),t.g.has(e)}ie.forEach=function(t,e){li(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)};ie.sa=function(){li(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r=t.j:!1}function FS(t){return t.h?1:t.g?t.g.size:0}function gp(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function hg(t,e){t.g?t.g.add(e):t.h=e}function jS(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}MS.prototype.cancel=function(){if(this.i=US(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function US(t){if(t.h!=null)return t.i.concat(t.h.F);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const n of t.g.values())e=e.concat(n.F);return e}return Zm(t.i)}function dg(){}dg.prototype.stringify=function(t){return me.JSON.stringify(t,void 0)};dg.prototype.parse=function(t){return me.JSON.parse(t,void 0)};function uL(){this.g=new dg}function cL(t,e,n){const r=n||"";try{xS(t,function(i,o){let s=i;Qa(i)&&(s=sg(i)),e.push(r+o+"="+encodeURIComponent(s))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function fL(t,e){const n=new Yc;if(me.Image){const r=new Image;r.onload=Ll(Ml,n,r,"TestLoadImage: loaded",!0,e),r.onerror=Ll(Ml,n,r,"TestLoadImage: error",!1,e),r.onabort=Ll(Ml,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=Ll(Ml,n,r,"TestLoadImage: timeout",!1,e),me.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function Ml(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function tl(t){this.l=t.fc||null,this.j=t.ob||!1}ft(tl,ug);tl.prototype.g=function(){return new nf(this.l,this.j)};tl.prototype.i=function(t){return function(){return t}}({});function nf(t,e){ct.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=pg,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}ft(nf,ct);var pg=0;ie=nf.prototype;ie.open=function(t,e){if(this.readyState!=pg)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Ca(this)};ie.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||me).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};ie.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,nl(this)),this.readyState=pg};ie.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Ca(this)),this.g&&(this.readyState=3,Ca(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof me.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;BS(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function BS(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}ie.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?nl(this):Ca(this),this.readyState==3&&BS(this)}};ie.Za=function(t){this.g&&(this.response=this.responseText=t,nl(this))};ie.Ya=function(t){this.g&&(this.response=t,nl(this))};ie.ka=function(){this.g&&nl(this)};function nl(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Ca(t)}ie.setRequestHeader=function(t,e){this.v.append(t,e)};ie.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};ie.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join(`\r +`+o+" "+s})}function wo(t,e,n,r){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+QP(t,n)+(r?" "+r:"")})}function GP(t,e){t.info(function(){return"TIMEOUT: "+e})}Yc.prototype.info=function(){};function QP(t,e){if(!t.g)return e;if(!e)return null;try{var n=JSON.parse(e);if(n){for(t=0;tr.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if(o!="noop"&&o!="stop"&&o!="close")for(var s=1;sc)&&(c!=3||sp||this.g&&(this.h.h||this.g.ja()||S0(this.g)))){this.J||c!=4||e==7||(e==8||0>=h?Oa(3):Oa(2)),ef(this);var n=this.g.da();this.aa=n;t:if(OS(this)){var r=S0(this.g);t="";var i=r.length,o=tr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){wi(this),Js(this);var s="";break t}this.h.i=new me.TextDecoder}for(e=0;ee.length?Hu:(e=e.substr(r,n),t.C=r+n,e)))}ie.cancel=function(){this.J=!0,wi(this)};function el(t){t.Y=Date.now()+t.P,CS(t,t.P)}function CS(t,e){if(t.B!=null)throw Error("WatchDog timer not null");t.B=Xa(Ot(t.lb,t),e)}function ef(t){t.B&&(me.clearTimeout(t.B),t.B=null)}ie.lb=function(){this.B=null;const t=Date.now();0<=t-this.Y?(GP(this.j,this.A),this.L!=2&&(Oa(),Mt(17)),wi(this),this.o=2,Js(this)):CS(this,this.Y-t)};function Js(t){t.l.H==0||t.J||JS(t.l,t)}function wi(t){ef(t);var e=t.M;e&&typeof e.ra=="function"&&e.ra(),t.M=null,ag(t.V),ES(t.U),t.g&&(e=t.g,t.g=null,e.abort(),e.ra())}function mp(t,e){try{var n=t.l;if(n.H!=0&&(n.g==t||gp(n.h,t))){if(!t.K&&gp(n.h,t)&&n.H==3){try{var r=n.Ja.g.parse(e)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3i[2]&&n.M&&n.A==0&&!n.v&&(n.v=Xa(Ot(n.ib,n),6e3));if(1>=FS(n.h)&&n.na){try{n.na()}catch{}n.na=void 0}}else Ei(n,11)}else if((t.K||n.g==t)&&Gu(n),!Vu(e))for(i=n.Ja.g.parse(e),e=0;ee)throw Error("Bad port number "+e);t.m=e}else t.m=null}function E0(t,e,n){e instanceof Aa?(t.i=e,sL(t.i,t.h)):(n||(e=js(e,iL)),t.i=new Aa(e,t.h))}function qe(t,e,n){t.i.set(e,n)}function tf(t){return qe(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function Fs(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function js(t,e,n){return typeof t=="string"?(t=encodeURI(t).replace(e,tL),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function tL(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var _0=/[#\/\?@]/g,nL=/[#\?:]/g,rL=/[#\?]/g,iL=/[#\?@]/g,oL=/#/g;function Aa(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function li(t){t.g||(t.g=new Map,t.h=0,t.i&&eL(t.i,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}ie=Aa.prototype;ie.add=function(t,e){li(this),this.i=null,t=rs(this,t);var n=this.g.get(t);return n||this.g.set(t,n=[]),n.push(e),this.h+=1,this};function PS(t,e){li(t),e=rs(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function LS(t,e){return li(t),e=rs(t,e),t.g.has(e)}ie.forEach=function(t,e){li(this),this.g.forEach(function(n,r){n.forEach(function(i){t.call(e,i,r,this)},this)},this)};ie.sa=function(){li(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),n=[];for(let r=0;r=t.j:!1}function FS(t){return t.h?1:t.g?t.g.size:0}function gp(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function hg(t,e){t.g?t.g.add(e):t.h=e}function jS(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}MS.prototype.cancel=function(){if(this.i=US(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function US(t){if(t.h!=null)return t.i.concat(t.h.F);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const n of t.g.values())e=e.concat(n.F);return e}return Zm(t.i)}function dg(){}dg.prototype.stringify=function(t){return me.JSON.stringify(t,void 0)};dg.prototype.parse=function(t){return me.JSON.parse(t,void 0)};function uL(){this.g=new dg}function cL(t,e,n){const r=n||"";try{xS(t,function(i,o){let s=i;Qa(i)&&(s=sg(i)),e.push(r+o+"="+encodeURIComponent(s))})}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function fL(t,e){const n=new Yc;if(me.Image){const r=new Image;r.onload=Ll(Ml,n,r,"TestLoadImage: loaded",!0,e),r.onerror=Ll(Ml,n,r,"TestLoadImage: error",!1,e),r.onabort=Ll(Ml,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=Ll(Ml,n,r,"TestLoadImage: timeout",!1,e),me.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=t}else e(!1)}function Ml(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch{}}function tl(t){this.l=t.fc||null,this.j=t.ob||!1}ft(tl,ug);tl.prototype.g=function(){return new nf(this.l,this.j)};tl.prototype.i=function(t){return function(){return t}}({});function nf(t,e){ct.call(this),this.F=t,this.u=e,this.m=void 0,this.readyState=pg,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}ft(nf,ct);var pg=0;ie=nf.prototype;ie.open=function(t,e){if(this.readyState!=pg)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Ca(this)};ie.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.F||me).fetch(new Request(this.B,e)).then(this.$a.bind(this),this.ka.bind(this))};ie.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,nl(this)),this.readyState=pg};ie.$a=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Ca(this)),this.g&&(this.readyState=3,Ca(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof me.ReadableStream<"u"&&"body"in t){if(this.j=t.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;BS(this)}else t.text().then(this.Za.bind(this),this.ka.bind(this))};function BS(t){t.j.read().then(t.Xa.bind(t)).catch(t.ka.bind(t))}ie.Xa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?nl(this):Ca(this),this.readyState==3&&BS(this)}};ie.Za=function(t){this.g&&(this.response=this.responseText=t,nl(this))};ie.Ya=function(t){this.g&&(this.response=t,nl(this))};ie.ka=function(){this.g&&nl(this)};function nl(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Ca(t)}ie.setRequestHeader=function(t,e){this.v.append(t,e)};ie.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};ie.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join(`\r `)};function Ca(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(nf.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var hL=me.JSON.parse;function Ye(t){ct.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=qS,this.L=this.M=!1}ft(Ye,ct);var qS="",dL=/^https?$/i,pL=["POST","PUT"];ie=Ye.prototype;ie.Oa=function(t){this.M=t};ie.ha=function(t,e,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+t);e=e?e.toUpperCase():"GET",this.I=t,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():hp.g(),this.C=this.u?w0(this.u):w0(hp),this.g.onreadystatechange=Ot(this.La,this);try{this.G=!0,this.g.open(e,String(t),!0),this.G=!1}catch(o){T0(this,o);return}if(t=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if(typeof r.keys=="function"&&typeof r.get=="function")for(const o of r.keys())n.set(o,r.get(o));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(o=>o.toLowerCase()=="content-type"),i=me.FormData&&t instanceof me.FormData,!(0<=rS(pL,e))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[o,s]of n)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{HS(this),0=t.h.j-(t.m?1:0)?!1:t.m?(t.i=e.F.concat(t.i),!0):t.H==1||t.H==2||t.C>=(t.cb?0:t.eb)?!1:(t.m=Xa(Ot(t.Na,t,e),ZS(t,t.C)),t.C++,!0)}ie.Na=function(t){if(this.m)if(this.m=null,this.H==1){if(!t){this.W=Math.floor(1e5*Math.random()),t=this.W++;const i=new Za(this,this.j,t,void 0);let o=this.s;if(this.U&&(o?(o=lS(o),uS(o,this.U)):o=this.U),this.o!==null||this.O||(i.I=o,o=null),this.P)e:{for(var e=0,n=0;nu)o=Math.max(0,i[l].h-100),a=!1;else try{cL(f,s,"req"+u+"_")}catch{r&&r(f)}}if(a){r=s.join("&");break e}}}return t=t.i.splice(0,n),e.F=t,r}function YS(t){t.g||t.u||(t.ba=1,gS(t.Ma,t),t.A=0)}function vg(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=Xa(Ot(t.Ma,t),ZS(t,t.A)),t.A++,!0)}ie.Ma=function(){if(this.u=null,XS(this),this.ca&&!(this.L||this.g==null||0>=this.S)){var t=2*this.S;this.j.info("BP detection timer enabled: "+t),this.B=Xa(Ot(this.jb,this),t)}};ie.jb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.M=!1,this.L=!0,Mt(10),of(this),XS(this))};function yg(t){t.B!=null&&(me.clearTimeout(t.B),t.B=null)}function XS(t){t.g=new Za(t,t.j,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=mr(t.wa);qe(e,"RID","rpc"),qe(e,"SID",t.J),qe(e,"CI",t.M?"0":"1"),qe(e,"AID",t.V),qe(e,"TYPE","xmlhttp"),rl(t,e),t.o&&t.s&&mg(e,t.o,t.s),t.K&&t.g.setTimeout(t.K);var n=t.g;t=t.oa,n.L=1,n.v=tf(mr(e)),n.s=null,n.S=!0,NS(n,t)}ie.ib=function(){this.v!=null&&(this.v=null,of(this),vg(this),Mt(19))};function Gu(t){t.v!=null&&(me.clearTimeout(t.v),t.v=null)}function JS(t,e){var n=null;if(t.g==e){Gu(t),yg(t),t.g=null;var r=2}else if(gp(t.h,e))n=e.F,jS(t.h,e),r=1;else return;if(t.H!=0){if(t.ta=e.aa,e.i)if(r==1){n=e.s?e.s.length:0,e=Date.now()-e.G;var i=t.C;r=Xc(),yt(r,new SS(r,n)),sf(t)}else YS(t);else if(i=e.o,i==3||i==0&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var o=t.g[3],s=e+(o^n&(i^o))+r[0]+3614090360&4294967295;e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[1]+3905402710&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[2]+606105819&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[3]+3250441966&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[4]+4118548399&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[5]+1200080426&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[6]+2821735955&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[7]+4249261313&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[8]+1770035416&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[9]+2336552879&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[10]+4294925233&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[11]+2304563134&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[12]+1804603682&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[13]+4254626195&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[14]+2792965006&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[15]+1236535329&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(i^o&(n^i))+r[1]+4129170786&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[6]+3225465664&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[11]+643717713&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[0]+3921069994&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[5]+3593408605&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[10]+38016083&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[15]+3634488961&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[4]+3889429448&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[9]+568446438&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[14]+3275163606&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[3]+4107603335&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[8]+1163531501&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[13]+2850285829&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[2]+4243563512&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[7]+1735328473&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[12]+2368359562&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(n^i^o)+r[5]+4294588738&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[8]+2272392833&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[11]+1839030562&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[14]+4259657740&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[1]+2763975236&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[4]+1272893353&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[7]+4139469664&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[10]+3200236656&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[13]+681279174&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[0]+3936430074&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[3]+3572445317&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[6]+76029189&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[9]+3654602809&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[12]+3873151461&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[15]+530742520&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[2]+3299628645&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(i^(n|~o))+r[0]+4096336452&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[7]+1126891415&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[14]+2878612391&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[5]+4237533241&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[12]+1700485571&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[3]+2399980690&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[10]+4293915773&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[1]+2240044497&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[8]+1873313359&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[15]+4264355552&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[6]+2734768916&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[13]+1309151649&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[4]+4149444226&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[11]+3174756917&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[2]+718787259&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+o&4294967295}xn.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function xe(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var o=t[i]|0;r&&o==e||(n[i]=o,r=!1)}this.g=n}var yL={};function wg(t){return-128<=t&&128>t?iS(yL,t,function(e){return new xe([e|0],0>e?-1:0)}):new xe([t|0],0>t?-1:0)}function jn(t){if(isNaN(t)||!isFinite(t))return Io;if(0>t)return gt(jn(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=vp;return new xe(e,0)}function sb(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36o?(o=jn(Math.pow(e,o)),r=r.R(o).add(jn(s))):(r=r.R(n),r=r.add(jn(s)))}return r}var vp=4294967296,Io=wg(0),yp=wg(1),k0=wg(16777216);ie=xe.prototype;ie.ea=function(){if(fn(this))return-gt(this).ea();for(var t=0,e=1,n=0;nt||36>>0).toString(t);if(n=i,nr(n))return o+r;for(;6>o.length;)o="0"+o;r=o+r}};ie.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=s>>>16,o&=65535,s&=65535,n[i]=s<<16|o}return new xe(n,n[n.length-1]&-2147483648?-1:0)};function Yu(t,e){return t.add(gt(e))}ie.R=function(t){if(nr(this)||nr(t))return Io;if(fn(this))return fn(t)?gt(this).R(gt(t)):gt(gt(this).R(t));if(fn(t))return gt(this.R(gt(t)));if(0>this.X(k0)&&0>t.X(k0))return jn(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,s=this.D(r)&65535,a=t.D(i)>>>16,l=t.D(i)&65535;n[2*r+2*i]+=s*l,$l(n,2*r+2*i),n[2*r+2*i+1]+=o*l,$l(n,2*r+2*i+1),n[2*r+2*i+1]+=s*a,$l(n,2*r+2*i+1),n[2*r+2*i+2]+=o*a,$l(n,2*r+2*i+2)}for(r=0;r>>16,t[e]&=65535,e++}function Os(t,e){this.g=t,this.h=e}function Xu(t,e){if(nr(e))throw Error("division by zero");if(nr(t))return new Os(Io,Io);if(fn(t))return e=Xu(gt(t),e),new Os(gt(e.g),gt(e.h));if(fn(e))return e=Xu(t,gt(e)),new Os(gt(e.g),e.h);if(30=r.X(t);)n=I0(n),r=I0(r);var i=no(n,1),o=no(r,1);for(r=no(r,2),n=no(n,2);!nr(r);){var s=o.add(r);0>=s.X(t)&&(i=i.add(n),o=s),r=no(r,1),n=no(n,1)}return e=Yu(t,i.R(e)),new Os(i,e)}for(i=Io;0<=t.X(e);){for(n=Math.max(1,Math.floor(t.ea()/e.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),o=jn(n),s=o.R(e);fn(s)||0>>31;return new xe(n,t.h)}function no(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],o=0;o>>e|t.D(o+n+1)<<32-e:t.D(o+n);return new xe(i,t.h)}Qu.prototype.createWebChannel=Qu.prototype.g;sn.prototype.send=sn.prototype.u;sn.prototype.open=sn.prototype.m;sn.prototype.close=sn.prototype.close;Jc.NO_ERROR=0;Jc.TIMEOUT=8;Jc.HTTP_ERROR=6;bS.COMPLETE="complete";kS.EventType=Ja;Ja.OPEN="a";Ja.CLOSE="b";Ja.ERROR="c";Ja.MESSAGE="d";ct.prototype.listen=ct.prototype.O;Ye.prototype.listenOnce=Ye.prototype.P;Ye.prototype.getLastError=Ye.prototype.Sa;Ye.prototype.getLastErrorCode=Ye.prototype.Ia;Ye.prototype.getStatus=Ye.prototype.da;Ye.prototype.getResponseJson=Ye.prototype.Wa;Ye.prototype.getResponseText=Ye.prototype.ja;Ye.prototype.send=Ye.prototype.ha;Ye.prototype.setWithCredentials=Ye.prototype.Oa;xn.prototype.digest=xn.prototype.l;xn.prototype.reset=xn.prototype.reset;xn.prototype.update=xn.prototype.j;xe.prototype.add=xe.prototype.add;xe.prototype.multiply=xe.prototype.R;xe.prototype.modulo=xe.prototype.gb;xe.prototype.compare=xe.prototype.X;xe.prototype.toNumber=xe.prototype.ea;xe.prototype.toString=xe.prototype.toString;xe.prototype.getBits=xe.prototype.D;xe.fromNumber=jn;xe.fromString=sb;var wL=function(){return new Qu},EL=function(){return Xc()},Ch=Jc,_L=bS,TL=Gi,N0={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},SL=tl,Fl=kS,bL=Ye,kL=xn,No=xe;const O0="@firebase/firestore";/** +`}),e}function mg(t,e,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=KS(n),typeof t=="string"?n!=null&&encodeURIComponent(String(n)):qe(t,e,n))}function Ns(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function WS(t){this.Ga=0,this.i=[],this.j=new Yc,this.oa=this.wa=this.G=this.Y=this.g=this.Da=this.F=this.ma=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=Ns("failFast",!1,t),this.M=this.v=this.u=this.m=this.l=null,this.aa=!0,this.ta=this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=Ns("baseRetryDelayMs",5e3,t),this.hb=Ns("retryDelaySeedMs",1e4,t),this.eb=Ns("forwardChannelMaxRetries",2,t),this.xa=Ns("forwardChannelRequestTimeoutMs",2e4,t),this.va=t&&t.xmlHttpFactory||void 0,this.Ha=t&&t.dc||!1,this.K=void 0,this.I=t&&t.supportsCrossDomainXhr||!1,this.J="",this.h=new MS(t&&t.concurrentRequestLimit),this.Ja=new uL,this.P=t&&t.fastHandshake||!1,this.O=t&&t.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=t&&t.bc||!1,t&&t.Ea&&this.j.Ea(),t&&t.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&t&&t.detectBufferingProxy||!1,this.na=void 0,this.S=0,this.L=!1,this.pa=this.B=null}ie=WS.prototype;ie.qa=8;ie.H=1;function gg(t){if(GS(t),t.H==3){var e=t.W++,n=mr(t.G);qe(n,"SID",t.J),qe(n,"RID",e),qe(n,"TYPE","terminate"),rl(t,n),e=new Za(t,t.j,e,void 0),e.L=2,e.v=tf(mr(n)),n=!1,me.navigator&&me.navigator.sendBeacon&&(n=me.navigator.sendBeacon(e.v.toString(),"")),!n&&me.Image&&(new Image().src=e.v,n=!0),n||(e.g=nb(e.l,null),e.g.ha(e.v)),e.G=Date.now(),el(e)}eb(t)}function of(t){t.g&&(yg(t),t.g.cancel(),t.g=null)}function GS(t){of(t),t.u&&(me.clearTimeout(t.u),t.u=null),Gu(t),t.h.cancel(),t.m&&(typeof t.m=="number"&&me.clearTimeout(t.m),t.m=null)}function sf(t){$S(t.h)||t.m||(t.m=!0,gS(t.Na,t),t.C=0)}function gL(t,e){return FS(t.h)>=t.h.j-(t.m?1:0)?!1:t.m?(t.i=e.F.concat(t.i),!0):t.H==1||t.H==2||t.C>=(t.cb?0:t.eb)?!1:(t.m=Xa(Ot(t.Na,t,e),ZS(t,t.C)),t.C++,!0)}ie.Na=function(t){if(this.m)if(this.m=null,this.H==1){if(!t){this.W=Math.floor(1e5*Math.random()),t=this.W++;const i=new Za(this,this.j,t,void 0);let o=this.s;if(this.U&&(o?(o=lS(o),uS(o,this.U)):o=this.U),this.o!==null||this.O||(i.I=o,o=null),this.P)e:{for(var e=0,n=0;nu)o=Math.max(0,i[l].h-100),a=!1;else try{cL(c,s,"req"+u+"_")}catch{r&&r(c)}}if(a){r=s.join("&");break e}}}return t=t.i.splice(0,n),e.F=t,r}function YS(t){t.g||t.u||(t.ba=1,gS(t.Ma,t),t.A=0)}function vg(t){return t.g||t.u||3<=t.A?!1:(t.ba++,t.u=Xa(Ot(t.Ma,t),ZS(t,t.A)),t.A++,!0)}ie.Ma=function(){if(this.u=null,XS(this),this.ca&&!(this.L||this.g==null||0>=this.S)){var t=2*this.S;this.j.info("BP detection timer enabled: "+t),this.B=Xa(Ot(this.jb,this),t)}};ie.jb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.M=!1,this.L=!0,Mt(10),of(this),XS(this))};function yg(t){t.B!=null&&(me.clearTimeout(t.B),t.B=null)}function XS(t){t.g=new Za(t,t.j,"rpc",t.ba),t.o===null&&(t.g.I=t.s),t.g.O=0;var e=mr(t.wa);qe(e,"RID","rpc"),qe(e,"SID",t.J),qe(e,"CI",t.M?"0":"1"),qe(e,"AID",t.V),qe(e,"TYPE","xmlhttp"),rl(t,e),t.o&&t.s&&mg(e,t.o,t.s),t.K&&t.g.setTimeout(t.K);var n=t.g;t=t.oa,n.L=1,n.v=tf(mr(e)),n.s=null,n.S=!0,NS(n,t)}ie.ib=function(){this.v!=null&&(this.v=null,of(this),vg(this),Mt(19))};function Gu(t){t.v!=null&&(me.clearTimeout(t.v),t.v=null)}function JS(t,e){var n=null;if(t.g==e){Gu(t),yg(t),t.g=null;var r=2}else if(gp(t.h,e))n=e.F,jS(t.h,e),r=1;else return;if(t.H!=0){if(t.ta=e.aa,e.i)if(r==1){n=e.s?e.s.length:0,e=Date.now()-e.G;var i=t.C;r=Xc(),yt(r,new SS(r,n)),sf(t)}else YS(t);else if(i=e.o,i==3||i==0&&0i;++i)r[i]=e.charCodeAt(n++)|e.charCodeAt(n++)<<8|e.charCodeAt(n++)<<16|e.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24;e=t.g[0],n=t.g[1],i=t.g[2];var o=t.g[3],s=e+(o^n&(i^o))+r[0]+3614090360&4294967295;e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[1]+3905402710&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[2]+606105819&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[3]+3250441966&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[4]+4118548399&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[5]+1200080426&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[6]+2821735955&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[7]+4249261313&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[8]+1770035416&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[9]+2336552879&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[10]+4294925233&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[11]+2304563134&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(o^n&(i^o))+r[12]+1804603682&4294967295,e=n+(s<<7&4294967295|s>>>25),s=o+(i^e&(n^i))+r[13]+4254626195&4294967295,o=e+(s<<12&4294967295|s>>>20),s=i+(n^o&(e^n))+r[14]+2792965006&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(e^i&(o^e))+r[15]+1236535329&4294967295,n=i+(s<<22&4294967295|s>>>10),s=e+(i^o&(n^i))+r[1]+4129170786&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[6]+3225465664&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[11]+643717713&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[0]+3921069994&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[5]+3593408605&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[10]+38016083&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[15]+3634488961&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[4]+3889429448&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[9]+568446438&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[14]+3275163606&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[3]+4107603335&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[8]+1163531501&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(i^o&(n^i))+r[13]+2850285829&4294967295,e=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(e^n))+r[2]+4243563512&4294967295,o=e+(s<<9&4294967295|s>>>23),s=i+(e^n&(o^e))+r[7]+1735328473&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^e&(i^o))+r[12]+2368359562&4294967295,n=i+(s<<20&4294967295|s>>>12),s=e+(n^i^o)+r[5]+4294588738&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[8]+2272392833&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[11]+1839030562&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[14]+4259657740&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[1]+2763975236&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[4]+1272893353&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[7]+4139469664&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[10]+3200236656&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[13]+681279174&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[0]+3936430074&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[3]+3572445317&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[6]+76029189&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(n^i^o)+r[9]+3654602809&4294967295,e=n+(s<<4&4294967295|s>>>28),s=o+(e^n^i)+r[12]+3873151461&4294967295,o=e+(s<<11&4294967295|s>>>21),s=i+(o^e^n)+r[15]+530742520&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^e)+r[2]+3299628645&4294967295,n=i+(s<<23&4294967295|s>>>9),s=e+(i^(n|~o))+r[0]+4096336452&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[7]+1126891415&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[14]+2878612391&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[5]+4237533241&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[12]+1700485571&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[3]+2399980690&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[10]+4293915773&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[1]+2240044497&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[8]+1873313359&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[15]+4264355552&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[6]+2734768916&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[13]+1309151649&4294967295,n=i+(s<<21&4294967295|s>>>11),s=e+(i^(n|~o))+r[4]+4149444226&4294967295,e=n+(s<<6&4294967295|s>>>26),s=o+(n^(e|~i))+r[11]+3174756917&4294967295,o=e+(s<<10&4294967295|s>>>22),s=i+(e^(o|~n))+r[2]+718787259&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~e))+r[9]+3951481745&4294967295,t.g[0]=t.g[0]+e&4294967295,t.g[1]=t.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,t.g[2]=t.g[2]+i&4294967295,t.g[3]=t.g[3]+o&4294967295}xn.prototype.j=function(t,e){e===void 0&&(e=t.length);for(var n=e-this.blockSize,r=this.m,i=this.h,o=0;othis.h?this.blockSize:2*this.blockSize)-this.h);t[0]=128;for(var e=1;ee;++e)for(var r=0;32>r;r+=8)t[n++]=this.g[e]>>>r&255;return t};function xe(t,e){this.h=e;for(var n=[],r=!0,i=t.length-1;0<=i;i--){var o=t[i]|0;r&&o==e||(n[i]=o,r=!1)}this.g=n}var yL={};function wg(t){return-128<=t&&128>t?iS(yL,t,function(e){return new xe([e|0],0>e?-1:0)}):new xe([t|0],0>t?-1:0)}function jn(t){if(isNaN(t)||!isFinite(t))return Io;if(0>t)return gt(jn(-t));for(var e=[],n=1,r=0;t>=n;r++)e[r]=t/n|0,n*=vp;return new xe(e,0)}function sb(t,e){if(t.length==0)throw Error("number format error: empty string");if(e=e||10,2>e||36o?(o=jn(Math.pow(e,o)),r=r.R(o).add(jn(s))):(r=r.R(n),r=r.add(jn(s)))}return r}var vp=4294967296,Io=wg(0),yp=wg(1),k0=wg(16777216);ie=xe.prototype;ie.ea=function(){if(fn(this))return-gt(this).ea();for(var t=0,e=1,n=0;nt||36>>0).toString(t);if(n=i,nr(n))return o+r;for(;6>o.length;)o="0"+o;r=o+r}};ie.D=function(t){return 0>t?0:t>>16)+(this.D(i)>>>16)+(t.D(i)>>>16);r=s>>>16,o&=65535,s&=65535,n[i]=s<<16|o}return new xe(n,n[n.length-1]&-2147483648?-1:0)};function Yu(t,e){return t.add(gt(e))}ie.R=function(t){if(nr(this)||nr(t))return Io;if(fn(this))return fn(t)?gt(this).R(gt(t)):gt(gt(this).R(t));if(fn(t))return gt(this.R(gt(t)));if(0>this.X(k0)&&0>t.X(k0))return jn(this.ea()*t.ea());for(var e=this.g.length+t.g.length,n=[],r=0;r<2*e;r++)n[r]=0;for(r=0;r>>16,s=this.D(r)&65535,a=t.D(i)>>>16,l=t.D(i)&65535;n[2*r+2*i]+=s*l,$l(n,2*r+2*i),n[2*r+2*i+1]+=o*l,$l(n,2*r+2*i+1),n[2*r+2*i+1]+=s*a,$l(n,2*r+2*i+1),n[2*r+2*i+2]+=o*a,$l(n,2*r+2*i+2)}for(r=0;r>>16,t[e]&=65535,e++}function Os(t,e){this.g=t,this.h=e}function Xu(t,e){if(nr(e))throw Error("division by zero");if(nr(t))return new Os(Io,Io);if(fn(t))return e=Xu(gt(t),e),new Os(gt(e.g),gt(e.h));if(fn(e))return e=Xu(t,gt(e)),new Os(gt(e.g),e.h);if(30=r.X(t);)n=I0(n),r=I0(r);var i=no(n,1),o=no(r,1);for(r=no(r,2),n=no(n,2);!nr(r);){var s=o.add(r);0>=s.X(t)&&(i=i.add(n),o=s),r=no(r,1),n=no(n,1)}return e=Yu(t,i.R(e)),new Os(i,e)}for(i=Io;0<=t.X(e);){for(n=Math.max(1,Math.floor(t.ea()/e.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),o=jn(n),s=o.R(e);fn(s)||0>>31;return new xe(n,t.h)}function no(t,e){var n=e>>5;e%=32;for(var r=t.g.length-n,i=[],o=0;o>>e|t.D(o+n+1)<<32-e:t.D(o+n);return new xe(i,t.h)}Qu.prototype.createWebChannel=Qu.prototype.g;sn.prototype.send=sn.prototype.u;sn.prototype.open=sn.prototype.m;sn.prototype.close=sn.prototype.close;Jc.NO_ERROR=0;Jc.TIMEOUT=8;Jc.HTTP_ERROR=6;bS.COMPLETE="complete";kS.EventType=Ja;Ja.OPEN="a";Ja.CLOSE="b";Ja.ERROR="c";Ja.MESSAGE="d";ct.prototype.listen=ct.prototype.O;Ye.prototype.listenOnce=Ye.prototype.P;Ye.prototype.getLastError=Ye.prototype.Sa;Ye.prototype.getLastErrorCode=Ye.prototype.Ia;Ye.prototype.getStatus=Ye.prototype.da;Ye.prototype.getResponseJson=Ye.prototype.Wa;Ye.prototype.getResponseText=Ye.prototype.ja;Ye.prototype.send=Ye.prototype.ha;Ye.prototype.setWithCredentials=Ye.prototype.Oa;xn.prototype.digest=xn.prototype.l;xn.prototype.reset=xn.prototype.reset;xn.prototype.update=xn.prototype.j;xe.prototype.add=xe.prototype.add;xe.prototype.multiply=xe.prototype.R;xe.prototype.modulo=xe.prototype.gb;xe.prototype.compare=xe.prototype.X;xe.prototype.toNumber=xe.prototype.ea;xe.prototype.toString=xe.prototype.toString;xe.prototype.getBits=xe.prototype.D;xe.fromNumber=jn;xe.fromString=sb;var wL=function(){return new Qu},EL=function(){return Xc()},Ch=Jc,_L=bS,TL=Gi,N0={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},SL=tl,Fl=kS,bL=Ye,kL=xn,No=xe;const O0="@firebase/firestore";/** * @license * Copyright 2017 Google LLC * @@ -705,7 +705,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class te{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&pe(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new te((r,i)=>{this.nextCallback=o=>{this.wrapSuccess(e,o).next(r,i)},this.catchCallback=o=>{this.wrapFailure(n,o).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof te?n:te.resolve(n)}catch(n){return te.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):te.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):te.reject(n)}static resolve(e){return new te((n,r)=>{n(e)})}static reject(e){return new te((n,r)=>{r(e)})}static waitFor(e){return new te((n,r)=>{let i=0,o=0,s=!1;e.forEach(a=>{++i,a.next(()=>{++o,s&&o===i&&n()},l=>r(l))}),s=!0,o===i&&n()})}static or(e){let n=te.resolve(!1);for(const r of e)n=n.next(i=>i?te.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,o)=>{r.push(n.call(this,i,o))}),this.waitFor(r)}static mapArray(e,n){return new te((r,i)=>{const o=e.length,s=new Array(o);let a=0;for(let l=0;l{s[u]=f,++a,a===o&&r(s)},f=>i(f))}})}static doWhile(e,n){return new te((r,i)=>{const o=()=>{e()===!0?n().next(()=>{o()},i):r()};o()})}}function ol(t){return t.name==="IndexedDbTransactionError"}/** + */class te{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&pe(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new te((r,i)=>{this.nextCallback=o=>{this.wrapSuccess(e,o).next(r,i)},this.catchCallback=o=>{this.wrapFailure(n,o).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof te?n:te.resolve(n)}catch(n){return te.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):te.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):te.reject(n)}static resolve(e){return new te((n,r)=>{n(e)})}static reject(e){return new te((n,r)=>{r(e)})}static waitFor(e){return new te((n,r)=>{let i=0,o=0,s=!1;e.forEach(a=>{++i,a.next(()=>{++o,s&&o===i&&n()},l=>r(l))}),s=!0,o===i&&n()})}static or(e){let n=te.resolve(!1);for(const r of e)n=n.next(i=>i?te.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,o)=>{r.push(n.call(this,i,o))}),this.waitFor(r)}static mapArray(e,n){return new te((r,i)=>{const o=e.length,s=new Array(o);let a=0;for(let l=0;l{s[u]=c,++a,a===o&&r(s)},c=>i(c))}})}static doWhile(e,n){return new te((r,i)=>{const o=()=>{e()===!0?n().next(()=>{o()},i):r()};o()})}}function ol(t){return t.name==="IndexedDbTransactionError"}/** * @license * Copyright 2018 Google LLC * @@ -855,7 +855,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const Ul={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Mi(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Tg(t)?4:VL(t)?9007199254740991:10:pe()}function Wn(t,e){if(t===e)return!0;const n=Mi(t);if(n!==Mi(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Ra(t).isEqual(Ra(e));case 3:return function(r,i){if(typeof r.timestampValue=="string"&&typeof i.timestampValue=="string"&&r.timestampValue.length===i.timestampValue.length)return r.timestampValue===i.timestampValue;const o=ti(r.timestampValue),s=ti(i.timestampValue);return o.seconds===s.seconds&&o.nanos===s.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(r,i){return Di(r.bytesValue).isEqual(Di(i.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(r,i){return et(r.geoPointValue.latitude)===et(i.geoPointValue.latitude)&&et(r.geoPointValue.longitude)===et(i.geoPointValue.longitude)}(t,e);case 2:return function(r,i){if("integerValue"in r&&"integerValue"in i)return et(r.integerValue)===et(i.integerValue);if("doubleValue"in r&&"doubleValue"in i){const o=et(r.doubleValue),s=et(i.doubleValue);return o===s?Ju(o)===Ju(s):isNaN(o)&&isNaN(s)}return!1}(t,e);case 9:return qo(t.arrayValue.values||[],e.arrayValue.values||[],Wn);case 10:return function(r,i){const o=r.mapValue.fields||{},s=i.mapValue.fields||{};if(C0(o)!==C0(s))return!1;for(const a in o)if(o.hasOwnProperty(a)&&(s[a]===void 0||!Wn(o[a],s[a])))return!1;return!0}(t,e);default:return pe()}}function La(t,e){return(t.values||[]).find(n=>Wn(n,e))!==void 0}function Vo(t,e){if(t===e)return 0;const n=Mi(t),r=Mi(e);if(n!==r)return Ae(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ae(t.booleanValue,e.booleanValue);case 2:return function(i,o){const s=et(i.integerValue||i.doubleValue),a=et(o.integerValue||o.doubleValue);return sa?1:s===a?0:isNaN(s)?isNaN(a)?0:-1:1}(t,e);case 3:return R0(t.timestampValue,e.timestampValue);case 4:return R0(Ra(t),Ra(e));case 5:return Ae(t.stringValue,e.stringValue);case 6:return function(i,o){const s=Di(i),a=Di(o);return s.compareTo(a)}(t.bytesValue,e.bytesValue);case 7:return function(i,o){const s=i.split("/"),a=o.split("/");for(let l=0;le.mapValue.fields[n]=Zs(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Zs(t.arrayValue.values[n]);return e}return Object.assign({},t)}function VL(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** + */const Ul={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Mi(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Tg(t)?4:VL(t)?9007199254740991:10:pe()}function Wn(t,e){if(t===e)return!0;const n=Mi(t);if(n!==Mi(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Ra(t).isEqual(Ra(e));case 3:return function(r,i){if(typeof r.timestampValue=="string"&&typeof i.timestampValue=="string"&&r.timestampValue.length===i.timestampValue.length)return r.timestampValue===i.timestampValue;const o=ti(r.timestampValue),s=ti(i.timestampValue);return o.seconds===s.seconds&&o.nanos===s.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(r,i){return Di(r.bytesValue).isEqual(Di(i.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(r,i){return et(r.geoPointValue.latitude)===et(i.geoPointValue.latitude)&&et(r.geoPointValue.longitude)===et(i.geoPointValue.longitude)}(t,e);case 2:return function(r,i){if("integerValue"in r&&"integerValue"in i)return et(r.integerValue)===et(i.integerValue);if("doubleValue"in r&&"doubleValue"in i){const o=et(r.doubleValue),s=et(i.doubleValue);return o===s?Ju(o)===Ju(s):isNaN(o)&&isNaN(s)}return!1}(t,e);case 9:return qo(t.arrayValue.values||[],e.arrayValue.values||[],Wn);case 10:return function(r,i){const o=r.mapValue.fields||{},s=i.mapValue.fields||{};if(C0(o)!==C0(s))return!1;for(const a in o)if(o.hasOwnProperty(a)&&(s[a]===void 0||!Wn(o[a],s[a])))return!1;return!0}(t,e);default:return pe()}}function La(t,e){return(t.values||[]).find(n=>Wn(n,e))!==void 0}function Vo(t,e){if(t===e)return 0;const n=Mi(t),r=Mi(e);if(n!==r)return Ae(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ae(t.booleanValue,e.booleanValue);case 2:return function(i,o){const s=et(i.integerValue||i.doubleValue),a=et(o.integerValue||o.doubleValue);return sa?1:s===a?0:isNaN(s)?isNaN(a)?0:-1:1}(t,e);case 3:return R0(t.timestampValue,e.timestampValue);case 4:return R0(Ra(t),Ra(e));case 5:return Ae(t.stringValue,e.stringValue);case 6:return function(i,o){const s=Di(i),a=Di(o);return s.compareTo(a)}(t.bytesValue,e.bytesValue);case 7:return function(i,o){const s=i.split("/"),a=o.split("/");for(let l=0;le.mapValue.fields[n]=Zs(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Zs(t.arrayValue.values[n]);return e}return Object.assign({},t)}function VL(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** * @license * Copyright 2017 Google LLC * @@ -1020,7 +1020,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class hf{constructor(){this._=void 0}}function uD(t,e,n){return t instanceof tc?function(r,i){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return i&&Tg(i)&&(i=Sg(i)),i&&(o.fields.__previous_value__=i),{mapValue:o}}(n,e):t instanceof Da?Nb(t,e):t instanceof Ma?Ob(t,e):function(r,i){const o=Ib(r,i),s=U0(o)+U0(r.wt);return Ep(o)&&Ep(r.wt)?kb(s):bb(r.serializer,s)}(t,e)}function cD(t,e,n){return t instanceof Da?Nb(t,e):t instanceof Ma?Ob(t,e):n}function Ib(t,e){return t instanceof nc?Ep(n=e)||function(r){return!!r&&"doubleValue"in r}(n)?e:{integerValue:0}:null;var n}class tc extends hf{}class Da extends hf{constructor(e){super(),this.elements=e}}function Nb(t,e){const n=Ab(e);for(const r of t.elements)n.some(i=>Wn(i,r))||n.push(r);return{arrayValue:{values:n}}}class Ma extends hf{constructor(e){super(),this.elements=e}}function Ob(t,e){let n=Ab(e);for(const r of t.elements)n=n.filter(i=>!Wn(i,r));return{arrayValue:{values:n}}}class nc extends hf{constructor(e,n){super(),this.serializer=e,this.wt=n}}function U0(t){return et(t.integerValue||t.doubleValue)}function Ab(t){return bg(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function fD(t,e){return t.field.isEqual(e.field)&&function(n,r){return n instanceof Da&&r instanceof Da||n instanceof Ma&&r instanceof Ma?qo(n.elements,r.elements,Wn):n instanceof nc&&r instanceof nc?Wn(n.wt,r.wt):n instanceof tc&&r instanceof tc}(t.transform,e.transform)}class hD{constructor(e,n){this.version=e,this.transformResults=n}}class mn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new mn}static exists(e){return new mn(void 0,e)}static updateTime(e){return new mn(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function iu(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class df{}function Cb(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new Og(t.key,mn.none()):new sl(t.key,t.data,mn.none());{const n=t.data,r=Vt.empty();let i=new Ct(Nt.comparator);for(let o of e.fields)if(!i.has(o)){let s=n.field(o);s===null&&o.length>1&&(o=o.popLast(),s=n.field(o)),s===null?r.delete(o):r.set(o,s),i=i.add(o)}return new ui(t.key,r,new tn(i.toArray()),mn.none())}}function dD(t,e,n){t instanceof sl?function(r,i,o){const s=r.value.clone(),a=q0(r.fieldTransforms,i,o.transformResults);s.setAll(a),i.convertToFoundDocument(o.version,s).setHasCommittedMutations()}(t,e,n):t instanceof ui?function(r,i,o){if(!iu(r.precondition,i))return void i.convertToUnknownDocument(o.version);const s=q0(r.fieldTransforms,i,o.transformResults),a=i.data;a.setAll(xb(r)),a.setAll(s),i.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):function(r,i,o){i.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function ta(t,e,n,r){return t instanceof sl?function(i,o,s,a){if(!iu(i.precondition,o))return s;const l=i.value.clone(),u=V0(i.fieldTransforms,a,o);return l.setAll(u),o.convertToFoundDocument(o.version,l).setHasLocalMutations(),null}(t,e,n,r):t instanceof ui?function(i,o,s,a){if(!iu(i.precondition,o))return s;const l=V0(i.fieldTransforms,a,o),u=o.data;return u.setAll(xb(i)),u.setAll(l),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),s===null?null:s.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(i,o,s){return iu(i.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):s}(t,e,n)}function pD(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),o=Ib(r.transform,i||null);o!=null&&(n===null&&(n=Vt.empty()),n.set(r.field,o))}return n||null}function B0(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(n,r){return n===void 0&&r===void 0||!(!n||!r)&&qo(n,r,(i,o)=>fD(i,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class sl extends df{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class ui extends df{constructor(e,n,r,i,o=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function xb(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function q0(t,e,n){const r=new Map;je(t.length===n.length);for(let i=0;iWn(i,r))||n.push(r);return{arrayValue:{values:n}}}class Ma extends hf{constructor(e){super(),this.elements=e}}function Ob(t,e){let n=Ab(e);for(const r of t.elements)n=n.filter(i=>!Wn(i,r));return{arrayValue:{values:n}}}class nc extends hf{constructor(e,n){super(),this.serializer=e,this.wt=n}}function U0(t){return et(t.integerValue||t.doubleValue)}function Ab(t){return bg(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function fD(t,e){return t.field.isEqual(e.field)&&function(n,r){return n instanceof Da&&r instanceof Da||n instanceof Ma&&r instanceof Ma?qo(n.elements,r.elements,Wn):n instanceof nc&&r instanceof nc?Wn(n.wt,r.wt):n instanceof tc&&r instanceof tc}(t.transform,e.transform)}class hD{constructor(e,n){this.version=e,this.transformResults=n}}class mn{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new mn}static exists(e){return new mn(void 0,e)}static updateTime(e){return new mn(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function iu(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class df{}function Cb(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new Og(t.key,mn.none()):new sl(t.key,t.data,mn.none());{const n=t.data,r=Vt.empty();let i=new Ct(Nt.comparator);for(let o of e.fields)if(!i.has(o)){let s=n.field(o);s===null&&o.length>1&&(o=o.popLast(),s=n.field(o)),s===null?r.delete(o):r.set(o,s),i=i.add(o)}return new ui(t.key,r,new tn(i.toArray()),mn.none())}}function dD(t,e,n){t instanceof sl?function(r,i,o){const s=r.value.clone(),a=q0(r.fieldTransforms,i,o.transformResults);s.setAll(a),i.convertToFoundDocument(o.version,s).setHasCommittedMutations()}(t,e,n):t instanceof ui?function(r,i,o){if(!iu(r.precondition,i))return void i.convertToUnknownDocument(o.version);const s=q0(r.fieldTransforms,i,o.transformResults),a=i.data;a.setAll(xb(r)),a.setAll(s),i.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):function(r,i,o){i.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function ta(t,e,n,r){return t instanceof sl?function(i,o,s,a){if(!iu(i.precondition,o))return s;const l=i.value.clone(),u=V0(i.fieldTransforms,a,o);return l.setAll(u),o.convertToFoundDocument(o.version,l).setHasLocalMutations(),null}(t,e,n,r):t instanceof ui?function(i,o,s,a){if(!iu(i.precondition,o))return s;const l=V0(i.fieldTransforms,a,o),u=o.data;return u.setAll(xb(i)),u.setAll(l),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),s===null?null:s.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map(c=>c.field))}(t,e,n,r):function(i,o,s){return iu(i.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):s}(t,e,n)}function pD(t,e){let n=null;for(const r of t.fieldTransforms){const i=e.data.field(r.field),o=Ib(r.transform,i||null);o!=null&&(n===null&&(n=Vt.empty()),n.set(r.field,o))}return n||null}function B0(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(n,r){return n===void 0&&r===void 0||!(!n||!r)&&qo(n,r,(i,o)=>fD(i,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class sl extends df{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class ui extends df{constructor(e,n,r,i,o=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function xb(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function q0(t,e,n){const r=new Map;je(t.length===n.length);for(let i=0;i0&&(this.xt=!0,this.Dt=e)}Ot(){let e=Se(),n=Se(),r=Se();return this.St.forEach((i,o)=>{switch(o){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:pe()}}),new al(this.Dt,this.Ct,e,n,r)}$t(){this.xt=!1,this.St=G0()}Ft(e,n){this.xt=!0,this.St=this.St.insert(e,n)}Bt(e){this.xt=!0,this.St=this.St.remove(e)}Lt(){this.Vt+=1}qt(){this.Vt-=1}Ut(){this.xt=!0,this.Ct=!0}}class TD{constructor(e){this.Kt=e,this.Gt=new Map,this.Qt=yr(),this.jt=W0(),this.zt=new We(Ae)}Wt(e){for(const n of e.vt)e.Pt&&e.Pt.isFoundDocument()?this.Ht(n,e.Pt):this.Jt(n,e.key,e.Pt);for(const n of e.removedTargetIds)this.Jt(n,e.key,e.Pt)}Yt(e){this.forEachTarget(e,n=>{const r=this.Xt(n);switch(e.state){case 0:this.Zt(n)&&r.Mt(e.resumeToken);break;case 1:r.qt(),r.Nt||r.$t(),r.Mt(e.resumeToken);break;case 2:r.qt(),r.Nt||this.removeTarget(n);break;case 3:this.Zt(n)&&(r.Ut(),r.Mt(e.resumeToken));break;case 4:this.Zt(n)&&(this.te(n),r.Mt(e.resumeToken));break;default:pe()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Gt.forEach((r,i)=>{this.Zt(i)&&n(i)})}ee(e){var n;const r=e.targetId,i=e.bt.count,o=this.ne(r);if(o){const s=o.target;if(Tp(s))if(i===0){const a=new fe(s.path);this.Jt(r,a,It.newNoDocument(a,ge.min()))}else je(i===1);else{const a=this.se(r);if(a!==i){const l=this.ie(e,a);if(l!==0){this.te(r);const u=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.zt=this.zt.insert(r,u)}(n=Cg.instance)===null||n===void 0||n.notifyOnExistenceFilterMismatch(function(u,f,h){var c,d,w,v,E,m;const p={localCacheCount:f,existenceFilterCount:h.count},y=h.unchangedNames;return y&&(p.bloomFilter={applied:u===0,hashCount:(c=y==null?void 0:y.hashCount)!==null&&c!==void 0?c:0,bitmapLength:(v=(w=(d=y==null?void 0:y.bits)===null||d===void 0?void 0:d.bitmap)===null||w===void 0?void 0:w.length)!==null&&v!==void 0?v:0,padding:(m=(E=y==null?void 0:y.bits)===null||E===void 0?void 0:E.padding)!==null&&m!==void 0?m:0}),p}(l,a,e.bt))}}}}ie(e,n){const{unchangedNames:r,count:i}=e.bt;if(!r||!r.bits)return 1;const{bits:{bitmap:o="",padding:s=0},hashCount:a=0}=r;let l,u;try{l=Di(o).toUint8Array()}catch(f){if(f instanceof cb)return Bo("Decoding the base64 bloom filter in existence filter failed ("+f.message+"); ignoring the bloom filter and falling back to full re-query."),1;throw f}try{u=new xg(l,s,a)}catch(f){return Bo(f instanceof Bs?"BloomFilter error: ":"Applying bloom filter failed: ",f),1}return u.yt===0?1:i!==n-this.re(e.targetId,u)?2:0}re(e,n){const r=this.Kt.getRemoteKeysForTarget(e);let i=0;return r.forEach(o=>{const s=this.Kt.oe(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;n.At(a)||(this.Jt(e,o,null),i++)}),i}ue(e){const n=new Map;this.Gt.forEach((o,s)=>{const a=this.ne(s);if(a){if(o.current&&Tp(a.target)){const l=new fe(a.target.path);this.Qt.get(l)!==null||this.ce(s,l)||this.Jt(s,l,It.newNoDocument(l,e))}o.kt&&(n.set(s,o.Ot()),o.$t())}});let r=Se();this.jt.forEach((o,s)=>{let a=!0;s.forEachWhile(l=>{const u=this.ne(l);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(o))}),this.Qt.forEach((o,s)=>s.setReadTime(e));const i=new pf(e,n,this.zt,this.Qt,r);return this.Qt=yr(),this.jt=W0(),this.zt=new We(Ae),i}Ht(e,n){if(!this.Zt(e))return;const r=this.ce(e,n.key)?2:0;this.Xt(e).Ft(n.key,r),this.Qt=this.Qt.insert(n.key,n),this.jt=this.jt.insert(n.key,this.ae(n.key).add(e))}Jt(e,n,r){if(!this.Zt(e))return;const i=this.Xt(e);this.ce(e,n)?i.Ft(n,1):i.Bt(n),this.jt=this.jt.insert(n,this.ae(n).delete(e)),r&&(this.Qt=this.Qt.insert(n,r))}removeTarget(e){this.Gt.delete(e)}se(e){const n=this.Xt(e).Ot();return this.Kt.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Lt(e){this.Xt(e).Lt()}Xt(e){let n=this.Gt.get(e);return n||(n=new K0,this.Gt.set(e,n)),n}ae(e){let n=this.jt.get(e);return n||(n=new Ct(Ae),this.jt=this.jt.insert(e,n)),n}Zt(e){const n=this.ne(e)!==null;return n||ce("WatchChangeAggregator","Detected inactive target",e),n}ne(e){const n=this.Gt.get(e);return n&&n.Nt?null:this.Kt.he(e)}te(e){this.Gt.set(e,new K0),this.Kt.getRemoteKeysForTarget(e).forEach(n=>{this.Jt(e,n,null)})}ce(e,n){return this.Kt.getRemoteKeysForTarget(e).has(n)}}function W0(){return new We(fe.comparator)}function G0(){return new We(fe.comparator)}const SD=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),bD=(()=>({"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"}))(),kD=(()=>({and:"AND",or:"OR"}))();class ID{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function kp(t,e){return t.useProto3Json||af(e)?e:{value:e}}function rc(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Db(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function ND(t,e){return rc(t,e.toTimestamp())}function qn(t){return je(!!t),ge.fromTimestamp(function(e){const n=ti(e);return new st(n.seconds,n.nanos)}(t))}function Rg(t,e){return function(n){return new $e(["projects",n.projectId,"databases",n.database])}(t).child("documents").child(e).canonicalString()}function Mb(t){const e=$e.fromString(t);return je(Ub(e)),e}function Ip(t,e){return Rg(t.databaseId,e.path)}function xh(t,e){const n=Mb(e);if(n.get(1)!==t.databaseId.projectId)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new fe($b(n))}function Np(t,e){return Rg(t.databaseId,e)}function OD(t){const e=Mb(t);return e.length===4?$e.emptyPath():$b(e)}function Op(t){return new $e(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function $b(t){return je(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function Q0(t,e,n){return{name:Ip(t,e),fields:n.value.mapValue.fields}}function AD(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:pe()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(l,u){return l.useProto3Json?(je(u===void 0||typeof u=="string"),Lt.fromBase64String(u||"")):(je(u===void 0||u instanceof Uint8Array),Lt.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),s=e.targetChange.cause,a=s&&function(l){const u=l.code===void 0?Y.UNKNOWN:Rb(l.code);return new se(u,l.message||"")}(s);n=new Lb(r,i,o,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=xh(t,r.document.name),o=qn(r.document.updateTime),s=r.document.createTime?qn(r.document.createTime):ge.min(),a=new Vt({mapValue:{fields:r.document.fields}}),l=It.newFoundDocument(i,o,s,a),u=r.targetIds||[],f=r.removedTargetIds||[];n=new ou(u,f,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=xh(t,r.document),o=r.readTime?qn(r.readTime):ge.min(),s=It.newNoDocument(i,o),a=r.removedTargetIds||[];n=new ou([],a,s.key,s)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=xh(t,r.document),o=r.removedTargetIds||[];n=new ou([],o,i,null)}else{if(!("filter"in e))return pe();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:o}=r,s=new yD(i,o),a=r.targetId;n=new Pb(a,s)}}return n}function CD(t,e){let n;if(e instanceof sl)n={update:Q0(t,e.key,e.value)};else if(e instanceof Og)n={delete:Ip(t,e.key)};else if(e instanceof ui)n={update:Q0(t,e.key,e.data),updateMask:jD(e.fieldMask)};else{if(!(e instanceof mD))return pe();n={verify:Ip(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(i,o){const s=o.transform;if(s instanceof tc)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(s instanceof Da)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:s.elements}};if(s instanceof Ma)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:s.elements}};if(s instanceof nc)return{fieldPath:o.field.canonicalString(),increment:s.wt};throw pe()}(0,r))),e.precondition.isNone||(n.currentDocument=function(r,i){return i.updateTime!==void 0?{updateTime:ND(r,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:pe()}(t,e.precondition)),n}function xD(t,e){return t&&t.length>0?(je(e!==void 0),t.map(n=>function(r,i){let o=r.updateTime?qn(r.updateTime):qn(i);return o.isEqual(ge.min())&&(o=qn(i)),new hD(o,r.transformResults||[])}(n,e))):[]}function RD(t,e){return{documents:[Np(t,e.path)]}}function PD(t,e){const n={structuredQuery:{}},r=e.path;e.collectionGroup!==null?(n.parent=Np(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Np(t,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(l){if(l.length!==0)return jb(Rn.create(l,"and"))}(e.filters);i&&(n.structuredQuery.where=i);const o=function(l){if(l.length!==0)return l.map(u=>function(f){return{field:ro(f.field),direction:MD(f.dir)}}(u))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const s=kp(t,e.limit);var a;return s!==null&&(n.structuredQuery.limit=s),e.startAt&&(n.structuredQuery.startAt={before:(a=e.startAt).inclusive,values:a.position}),e.endAt&&(n.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(e.endAt)),n}function LD(t){let e=OD(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){je(r===1);const f=n.from[0];f.allDescendants?i=f.collectionId:e=e.child(f.collectionId)}let o=[];n.where&&(o=function(f){const h=Fb(f);return h instanceof Rn&&pb(h)?h.getFilters():[h]}(n.where));let s=[];n.orderBy&&(s=n.orderBy.map(f=>function(h){return new Oo(io(h.field),function(c){switch(c){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(h.direction))}(f)));let a=null;n.limit&&(a=function(f){let h;return h=typeof f=="object"?f.value:f,af(h)?null:h}(n.limit));let l=null;n.startAt&&(l=function(f){const h=!!f.before,c=f.values||[];return new Zu(c,h)}(n.startAt));let u=null;return n.endAt&&(u=function(f){const h=!f.before,c=f.values||[];return new Zu(c,h)}(n.endAt)),eD(e,i,s,o,a,"F",l,u)}function DD(t,e){const n=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return pe()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function Fb(t){return t.unaryFilter!==void 0?function(e){switch(e.unaryFilter.op){case"IS_NAN":const n=io(e.unaryFilter.field);return nt.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=io(e.unaryFilter.field);return nt.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const i=io(e.unaryFilter.field);return nt.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=io(e.unaryFilter.field);return nt.create(o,"!=",{nullValue:"NULL_VALUE"});default:return pe()}}(t):t.fieldFilter!==void 0?function(e){return nt.create(io(e.fieldFilter.field),function(n){switch(n){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return pe()}}(e.fieldFilter.op),e.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(e){return Rn.create(e.compositeFilter.filters.map(n=>Fb(n)),function(n){switch(n){case"AND":return"and";case"OR":return"or";default:return pe()}}(e.compositeFilter.op))}(t):pe()}function MD(t){return SD[t]}function $D(t){return bD[t]}function FD(t){return kD[t]}function ro(t){return{fieldPath:t.canonicalString()}}function io(t){return Nt.fromServerFormat(t.fieldPath)}function jb(t){return t instanceof nt?function(e){if(e.op==="=="){if(D0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NAN"}};if(L0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NULL"}}}else if(e.op==="!="){if(D0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NOT_NAN"}};if(L0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ro(e.field),op:$D(e.op),value:e.value}}}(t):t instanceof Rn?function(e){const n=e.getFilters().map(r=>jb(r));return n.length===1?n[0]:{compositeFilter:{op:FD(e.op),filters:n}}}(t):pe()}function jD(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function Ub(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** + */class ou{constructor(e,n,r,i){this.vt=e,this.removedTargetIds=n,this.key=r,this.Pt=i}}class Pb{constructor(e,n){this.targetId=e,this.bt=n}}class Lb{constructor(e,n,r=Lt.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class K0{constructor(){this.Vt=0,this.St=G0(),this.Dt=Lt.EMPTY_BYTE_STRING,this.Ct=!1,this.xt=!0}get current(){return this.Ct}get resumeToken(){return this.Dt}get Nt(){return this.Vt!==0}get kt(){return this.xt}Mt(e){e.approximateByteSize()>0&&(this.xt=!0,this.Dt=e)}Ot(){let e=Se(),n=Se(),r=Se();return this.St.forEach((i,o)=>{switch(o){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:pe()}}),new al(this.Dt,this.Ct,e,n,r)}$t(){this.xt=!1,this.St=G0()}Ft(e,n){this.xt=!0,this.St=this.St.insert(e,n)}Bt(e){this.xt=!0,this.St=this.St.remove(e)}Lt(){this.Vt+=1}qt(){this.Vt-=1}Ut(){this.xt=!0,this.Ct=!0}}class TD{constructor(e){this.Kt=e,this.Gt=new Map,this.Qt=yr(),this.jt=W0(),this.zt=new We(Ae)}Wt(e){for(const n of e.vt)e.Pt&&e.Pt.isFoundDocument()?this.Ht(n,e.Pt):this.Jt(n,e.key,e.Pt);for(const n of e.removedTargetIds)this.Jt(n,e.key,e.Pt)}Yt(e){this.forEachTarget(e,n=>{const r=this.Xt(n);switch(e.state){case 0:this.Zt(n)&&r.Mt(e.resumeToken);break;case 1:r.qt(),r.Nt||r.$t(),r.Mt(e.resumeToken);break;case 2:r.qt(),r.Nt||this.removeTarget(n);break;case 3:this.Zt(n)&&(r.Ut(),r.Mt(e.resumeToken));break;case 4:this.Zt(n)&&(this.te(n),r.Mt(e.resumeToken));break;default:pe()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Gt.forEach((r,i)=>{this.Zt(i)&&n(i)})}ee(e){var n;const r=e.targetId,i=e.bt.count,o=this.ne(r);if(o){const s=o.target;if(Tp(s))if(i===0){const a=new fe(s.path);this.Jt(r,a,It.newNoDocument(a,ge.min()))}else je(i===1);else{const a=this.se(r);if(a!==i){const l=this.ie(e,a);if(l!==0){this.te(r);const u=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.zt=this.zt.insert(r,u)}(n=Cg.instance)===null||n===void 0||n.notifyOnExistenceFilterMismatch(function(u,c,h){var f,d,w,v,E,m;const p={localCacheCount:c,existenceFilterCount:h.count},y=h.unchangedNames;return y&&(p.bloomFilter={applied:u===0,hashCount:(f=y==null?void 0:y.hashCount)!==null&&f!==void 0?f:0,bitmapLength:(v=(w=(d=y==null?void 0:y.bits)===null||d===void 0?void 0:d.bitmap)===null||w===void 0?void 0:w.length)!==null&&v!==void 0?v:0,padding:(m=(E=y==null?void 0:y.bits)===null||E===void 0?void 0:E.padding)!==null&&m!==void 0?m:0}),p}(l,a,e.bt))}}}}ie(e,n){const{unchangedNames:r,count:i}=e.bt;if(!r||!r.bits)return 1;const{bits:{bitmap:o="",padding:s=0},hashCount:a=0}=r;let l,u;try{l=Di(o).toUint8Array()}catch(c){if(c instanceof cb)return Bo("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),1;throw c}try{u=new xg(l,s,a)}catch(c){return Bo(c instanceof Bs?"BloomFilter error: ":"Applying bloom filter failed: ",c),1}return u.yt===0?1:i!==n-this.re(e.targetId,u)?2:0}re(e,n){const r=this.Kt.getRemoteKeysForTarget(e);let i=0;return r.forEach(o=>{const s=this.Kt.oe(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;n.At(a)||(this.Jt(e,o,null),i++)}),i}ue(e){const n=new Map;this.Gt.forEach((o,s)=>{const a=this.ne(s);if(a){if(o.current&&Tp(a.target)){const l=new fe(a.target.path);this.Qt.get(l)!==null||this.ce(s,l)||this.Jt(s,l,It.newNoDocument(l,e))}o.kt&&(n.set(s,o.Ot()),o.$t())}});let r=Se();this.jt.forEach((o,s)=>{let a=!0;s.forEachWhile(l=>{const u=this.ne(l);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(o))}),this.Qt.forEach((o,s)=>s.setReadTime(e));const i=new pf(e,n,this.zt,this.Qt,r);return this.Qt=yr(),this.jt=W0(),this.zt=new We(Ae),i}Ht(e,n){if(!this.Zt(e))return;const r=this.ce(e,n.key)?2:0;this.Xt(e).Ft(n.key,r),this.Qt=this.Qt.insert(n.key,n),this.jt=this.jt.insert(n.key,this.ae(n.key).add(e))}Jt(e,n,r){if(!this.Zt(e))return;const i=this.Xt(e);this.ce(e,n)?i.Ft(n,1):i.Bt(n),this.jt=this.jt.insert(n,this.ae(n).delete(e)),r&&(this.Qt=this.Qt.insert(n,r))}removeTarget(e){this.Gt.delete(e)}se(e){const n=this.Xt(e).Ot();return this.Kt.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}Lt(e){this.Xt(e).Lt()}Xt(e){let n=this.Gt.get(e);return n||(n=new K0,this.Gt.set(e,n)),n}ae(e){let n=this.jt.get(e);return n||(n=new Ct(Ae),this.jt=this.jt.insert(e,n)),n}Zt(e){const n=this.ne(e)!==null;return n||ce("WatchChangeAggregator","Detected inactive target",e),n}ne(e){const n=this.Gt.get(e);return n&&n.Nt?null:this.Kt.he(e)}te(e){this.Gt.set(e,new K0),this.Kt.getRemoteKeysForTarget(e).forEach(n=>{this.Jt(e,n,null)})}ce(e,n){return this.Kt.getRemoteKeysForTarget(e).has(n)}}function W0(){return new We(fe.comparator)}function G0(){return new We(fe.comparator)}const SD=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),bD=(()=>({"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"}))(),kD=(()=>({and:"AND",or:"OR"}))();class ID{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function kp(t,e){return t.useProto3Json||af(e)?e:{value:e}}function rc(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Db(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function ND(t,e){return rc(t,e.toTimestamp())}function qn(t){return je(!!t),ge.fromTimestamp(function(e){const n=ti(e);return new st(n.seconds,n.nanos)}(t))}function Rg(t,e){return function(n){return new $e(["projects",n.projectId,"databases",n.database])}(t).child("documents").child(e).canonicalString()}function Mb(t){const e=$e.fromString(t);return je(Ub(e)),e}function Ip(t,e){return Rg(t.databaseId,e.path)}function xh(t,e){const n=Mb(e);if(n.get(1)!==t.databaseId.projectId)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new se(Y.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new fe($b(n))}function Np(t,e){return Rg(t.databaseId,e)}function OD(t){const e=Mb(t);return e.length===4?$e.emptyPath():$b(e)}function Op(t){return new $e(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function $b(t){return je(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function Q0(t,e,n){return{name:Ip(t,e),fields:n.value.mapValue.fields}}function AD(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:pe()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(l,u){return l.useProto3Json?(je(u===void 0||typeof u=="string"),Lt.fromBase64String(u||"")):(je(u===void 0||u instanceof Uint8Array),Lt.fromUint8Array(u||new Uint8Array))}(t,e.targetChange.resumeToken),s=e.targetChange.cause,a=s&&function(l){const u=l.code===void 0?Y.UNKNOWN:Rb(l.code);return new se(u,l.message||"")}(s);n=new Lb(r,i,o,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=xh(t,r.document.name),o=qn(r.document.updateTime),s=r.document.createTime?qn(r.document.createTime):ge.min(),a=new Vt({mapValue:{fields:r.document.fields}}),l=It.newFoundDocument(i,o,s,a),u=r.targetIds||[],c=r.removedTargetIds||[];n=new ou(u,c,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=xh(t,r.document),o=r.readTime?qn(r.readTime):ge.min(),s=It.newNoDocument(i,o),a=r.removedTargetIds||[];n=new ou([],a,s.key,s)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=xh(t,r.document),o=r.removedTargetIds||[];n=new ou([],o,i,null)}else{if(!("filter"in e))return pe();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:o}=r,s=new yD(i,o),a=r.targetId;n=new Pb(a,s)}}return n}function CD(t,e){let n;if(e instanceof sl)n={update:Q0(t,e.key,e.value)};else if(e instanceof Og)n={delete:Ip(t,e.key)};else if(e instanceof ui)n={update:Q0(t,e.key,e.data),updateMask:jD(e.fieldMask)};else{if(!(e instanceof mD))return pe();n={verify:Ip(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(r=>function(i,o){const s=o.transform;if(s instanceof tc)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(s instanceof Da)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:s.elements}};if(s instanceof Ma)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:s.elements}};if(s instanceof nc)return{fieldPath:o.field.canonicalString(),increment:s.wt};throw pe()}(0,r))),e.precondition.isNone||(n.currentDocument=function(r,i){return i.updateTime!==void 0?{updateTime:ND(r,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:pe()}(t,e.precondition)),n}function xD(t,e){return t&&t.length>0?(je(e!==void 0),t.map(n=>function(r,i){let o=r.updateTime?qn(r.updateTime):qn(i);return o.isEqual(ge.min())&&(o=qn(i)),new hD(o,r.transformResults||[])}(n,e))):[]}function RD(t,e){return{documents:[Np(t,e.path)]}}function PD(t,e){const n={structuredQuery:{}},r=e.path;e.collectionGroup!==null?(n.parent=Np(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Np(t,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(l){if(l.length!==0)return jb(Rn.create(l,"and"))}(e.filters);i&&(n.structuredQuery.where=i);const o=function(l){if(l.length!==0)return l.map(u=>function(c){return{field:ro(c.field),direction:MD(c.dir)}}(u))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const s=kp(t,e.limit);var a;return s!==null&&(n.structuredQuery.limit=s),e.startAt&&(n.structuredQuery.startAt={before:(a=e.startAt).inclusive,values:a.position}),e.endAt&&(n.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(e.endAt)),n}function LD(t){let e=OD(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){je(r===1);const c=n.from[0];c.allDescendants?i=c.collectionId:e=e.child(c.collectionId)}let o=[];n.where&&(o=function(c){const h=Fb(c);return h instanceof Rn&&pb(h)?h.getFilters():[h]}(n.where));let s=[];n.orderBy&&(s=n.orderBy.map(c=>function(h){return new Oo(io(h.field),function(f){switch(f){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(h.direction))}(c)));let a=null;n.limit&&(a=function(c){let h;return h=typeof c=="object"?c.value:c,af(h)?null:h}(n.limit));let l=null;n.startAt&&(l=function(c){const h=!!c.before,f=c.values||[];return new Zu(f,h)}(n.startAt));let u=null;return n.endAt&&(u=function(c){const h=!c.before,f=c.values||[];return new Zu(f,h)}(n.endAt)),eD(e,i,s,o,a,"F",l,u)}function DD(t,e){const n=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return pe()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function Fb(t){return t.unaryFilter!==void 0?function(e){switch(e.unaryFilter.op){case"IS_NAN":const n=io(e.unaryFilter.field);return nt.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=io(e.unaryFilter.field);return nt.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const i=io(e.unaryFilter.field);return nt.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=io(e.unaryFilter.field);return nt.create(o,"!=",{nullValue:"NULL_VALUE"});default:return pe()}}(t):t.fieldFilter!==void 0?function(e){return nt.create(io(e.fieldFilter.field),function(n){switch(n){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return pe()}}(e.fieldFilter.op),e.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(e){return Rn.create(e.compositeFilter.filters.map(n=>Fb(n)),function(n){switch(n){case"AND":return"and";case"OR":return"or";default:return pe()}}(e.compositeFilter.op))}(t):pe()}function MD(t){return SD[t]}function $D(t){return bD[t]}function FD(t){return kD[t]}function ro(t){return{fieldPath:t.canonicalString()}}function io(t){return Nt.fromServerFormat(t.fieldPath)}function jb(t){return t instanceof nt?function(e){if(e.op==="=="){if(D0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NAN"}};if(L0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NULL"}}}else if(e.op==="!="){if(D0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NOT_NAN"}};if(L0(e.value))return{unaryFilter:{field:ro(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ro(e.field),op:$D(e.op),value:e.value}}}(t):t instanceof Rn?function(e){const n=e.getFilters().map(r=>jb(r));return n.length===1?n[0]:{compositeFilter:{op:FD(e.op),filters:n}}}(t):pe()}function jD(t){const e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function Ub(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** * @license * Copyright 2017 Google LLC * @@ -1278,7 +1278,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class KD{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&ta(r.mutation,i,tn.empty(),st.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Se()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Se()){const i=_i();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(o=>{let s=Us();return o.forEach((a,l)=>{s=s.insert(a,l.overlayedDocument)}),s}))}getOverlayedDocuments(e,n){const r=_i();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Se()))}populateOverlays(e,n,r){const i=[];return r.forEach(o=>{n.has(o)||i.push(o)}),this.documentOverlayCache.getOverlays(e,i).next(o=>{o.forEach((s,a)=>{n.set(s,a)})})}computeViews(e,n,r,i){let o=yr();const s=ea(),a=ea();return n.forEach((l,u)=>{const f=r.get(u.key);i.has(u.key)&&(f===void 0||f.mutation instanceof ui)?o=o.insert(u.key,u):f!==void 0?(s.set(u.key,f.mutation.getFieldMask()),ta(f.mutation,u,f.mutation.getFieldMask(),st.now())):s.set(u.key,tn.empty())}),this.recalculateAndSaveOverlays(e,o).next(l=>(l.forEach((u,f)=>s.set(u,f)),n.forEach((u,f)=>{var h;return a.set(u,new HD(f,(h=s.get(u))!==null&&h!==void 0?h:null))}),a))}recalculateAndSaveOverlays(e,n){const r=ea();let i=new We((s,a)=>s-a),o=Se();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(s=>{for(const a of s)a.keys().forEach(l=>{const u=n.get(l);if(u===null)return;let f=r.get(l)||tn.empty();f=a.applyToLocalView(u,f),r.set(l,f);const h=(i.get(a.batchId)||Se()).add(l);i=i.insert(a.batchId,h)})}).next(()=>{const s=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),u=l.key,f=l.value,h=Sb();f.forEach(c=>{if(!o.has(c)){const d=Cb(n.get(c),r.get(c));d!==null&&h.set(c,d),o=o.add(c)}}),s.push(this.documentOverlayCache.saveOverlays(e,u,h))}return te.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r){return function(i){return fe.isDocumentKey(i.path)&&i.collectionGroup===null&&i.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):yb(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r):this.getDocumentsMatchingCollectionQuery(e,n,r)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(o=>{const s=i-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-o.size):te.resolve(_i());let a=-1,l=o;return s.next(u=>te.forEach(u,(f,h)=>(a{l=l.insert(f,c)}))).next(()=>this.populateOverlays(e,u,o)).next(()=>this.computeViews(e,l,u,Se())).next(f=>({batchId:a,changes:Tb(f)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new fe(n)).next(r=>{let i=Us();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r){const i=n.collectionGroup;let o=Us();return this.indexManager.getCollectionParents(e,i).next(s=>te.forEach(s,a=>{const l=function(u,f){return new ss(f,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,a.child(i));return this.getDocumentsMatchingCollectionQuery(e,l,r).next(u=>{u.forEach((f,h)=>{o=o.insert(f,h)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,i))).next(o=>{i.forEach((a,l)=>{const u=l.getKey();o.get(u)===null&&(o=o.insert(u,It.newInvalidDocument(u)))});let s=Us();return o.forEach((a,l)=>{const u=i.get(a);u!==void 0&&ta(u.mutation,l,tn.empty(),st.now()),ff(n,l)&&(s=s.insert(a,l))}),s})}}/** + */class KD{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&ta(r.mutation,i,tn.empty(),st.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Se()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Se()){const i=_i();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(o=>{let s=Us();return o.forEach((a,l)=>{s=s.insert(a,l.overlayedDocument)}),s}))}getOverlayedDocuments(e,n){const r=_i();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Se()))}populateOverlays(e,n,r){const i=[];return r.forEach(o=>{n.has(o)||i.push(o)}),this.documentOverlayCache.getOverlays(e,i).next(o=>{o.forEach((s,a)=>{n.set(s,a)})})}computeViews(e,n,r,i){let o=yr();const s=ea(),a=ea();return n.forEach((l,u)=>{const c=r.get(u.key);i.has(u.key)&&(c===void 0||c.mutation instanceof ui)?o=o.insert(u.key,u):c!==void 0?(s.set(u.key,c.mutation.getFieldMask()),ta(c.mutation,u,c.mutation.getFieldMask(),st.now())):s.set(u.key,tn.empty())}),this.recalculateAndSaveOverlays(e,o).next(l=>(l.forEach((u,c)=>s.set(u,c)),n.forEach((u,c)=>{var h;return a.set(u,new HD(c,(h=s.get(u))!==null&&h!==void 0?h:null))}),a))}recalculateAndSaveOverlays(e,n){const r=ea();let i=new We((s,a)=>s-a),o=Se();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(s=>{for(const a of s)a.keys().forEach(l=>{const u=n.get(l);if(u===null)return;let c=r.get(l)||tn.empty();c=a.applyToLocalView(u,c),r.set(l,c);const h=(i.get(a.batchId)||Se()).add(l);i=i.insert(a.batchId,h)})}).next(()=>{const s=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),u=l.key,c=l.value,h=Sb();c.forEach(f=>{if(!o.has(f)){const d=Cb(n.get(f),r.get(f));d!==null&&h.set(f,d),o=o.add(f)}}),s.push(this.documentOverlayCache.saveOverlays(e,u,h))}return te.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r){return function(i){return fe.isDocumentKey(i.path)&&i.collectionGroup===null&&i.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):yb(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r):this.getDocumentsMatchingCollectionQuery(e,n,r)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(o=>{const s=i-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-o.size):te.resolve(_i());let a=-1,l=o;return s.next(u=>te.forEach(u,(c,h)=>(a{l=l.insert(c,f)}))).next(()=>this.populateOverlays(e,u,o)).next(()=>this.computeViews(e,l,u,Se())).next(c=>({batchId:a,changes:Tb(c)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new fe(n)).next(r=>{let i=Us();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r){const i=n.collectionGroup;let o=Us();return this.indexManager.getCollectionParents(e,i).next(s=>te.forEach(s,a=>{const l=function(u,c){return new ss(c,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,a.child(i));return this.getDocumentsMatchingCollectionQuery(e,l,r).next(u=>{u.forEach((c,h)=>{o=o.insert(c,h)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,i))).next(o=>{i.forEach((a,l)=>{const u=l.getKey();o.get(u)===null&&(o=o.insert(u,It.newInvalidDocument(u)))});let s=Us();return o.forEach((a,l)=>{const u=i.get(a);u!==void 0&&ta(u.mutation,l,tn.empty(),st.now()),ff(n,l)&&(s=s.insert(a,l))}),s})}}/** * @license * Copyright 2020 Google LLC * @@ -1308,7 +1308,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class GD{constructor(){this.overlays=new We(fe.comparator),this.hs=new Map}getOverlay(e,n){return te.resolve(this.overlays.get(n))}getOverlays(e,n){const r=_i();return te.forEach(n,i=>this.getOverlay(e,i).next(o=>{o!==null&&r.set(i,o)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,o)=>{this.de(e,n,o)}),te.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hs.get(r);return i!==void 0&&(i.forEach(o=>this.overlays=this.overlays.remove(o)),this.hs.delete(r)),te.resolve()}getOverlaysForCollection(e,n,r){const i=_i(),o=n.length+1,s=new fe(n.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const l=a.getNext().value,u=l.getKey();if(!n.isPrefixOf(u.path))break;u.path.length===o&&l.largestBatchId>r&&i.set(l.getKey(),l)}return te.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let o=new We((u,f)=>u-f);const s=this.overlays.getIterator();for(;s.hasNext();){const u=s.getNext().value;if(u.getKey().getCollectionGroup()===n&&u.largestBatchId>r){let f=o.get(u.largestBatchId);f===null&&(f=_i(),o=o.insert(u.largestBatchId,f)),f.set(u.getKey(),u)}}const a=_i(),l=o.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((u,f)=>a.set(u,f)),!(a.size()>=i)););return te.resolve(a)}de(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const s=this.hs.get(i.largestBatchId).delete(r.key);this.hs.set(i.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new vD(n,r));let o=this.hs.get(n);o===void 0&&(o=Se(),this.hs.set(n,o)),this.hs.set(n,o.add(r.key))}}/** + */class GD{constructor(){this.overlays=new We(fe.comparator),this.hs=new Map}getOverlay(e,n){return te.resolve(this.overlays.get(n))}getOverlays(e,n){const r=_i();return te.forEach(n,i=>this.getOverlay(e,i).next(o=>{o!==null&&r.set(i,o)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,o)=>{this.de(e,n,o)}),te.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.hs.get(r);return i!==void 0&&(i.forEach(o=>this.overlays=this.overlays.remove(o)),this.hs.delete(r)),te.resolve()}getOverlaysForCollection(e,n,r){const i=_i(),o=n.length+1,s=new fe(n.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const l=a.getNext().value,u=l.getKey();if(!n.isPrefixOf(u.path))break;u.path.length===o&&l.largestBatchId>r&&i.set(l.getKey(),l)}return te.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let o=new We((u,c)=>u-c);const s=this.overlays.getIterator();for(;s.hasNext();){const u=s.getNext().value;if(u.getKey().getCollectionGroup()===n&&u.largestBatchId>r){let c=o.get(u.largestBatchId);c===null&&(c=_i(),o=o.insert(u.largestBatchId,c)),c.set(u.getKey(),u)}}const a=_i(),l=o.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((u,c)=>a.set(u,c)),!(a.size()>=i)););return te.resolve(a)}de(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const s=this.hs.get(i.largestBatchId).delete(r.key);this.hs.set(i.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new vD(n,r));let o=this.hs.get(n);o===void 0&&(o=Se(),this.hs.set(n,o)),this.hs.set(n,o.add(r.key))}}/** * @license * Copyright 2017 Google LLC * @@ -1353,7 +1353,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class YD{constructor(e){this.Ss=e,this.docs=new We(fe.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),o=i?i.size:0,s=this.Ss(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return te.resolve(r?r.document.mutableCopy():It.newInvalidDocument(n))}getEntries(e,n){let r=yr();return n.forEach(i=>{const o=this.docs.get(i);r=r.insert(i,o?o.document.mutableCopy():It.newInvalidDocument(i))}),te.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let o=yr();const s=n.path,a=new fe(s.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:u,value:{document:f}}=l.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||$L(ML(f),r)<=0||(i.has(f.key)||ff(n,f))&&(o=o.insert(f.key,f.mutableCopy()))}return te.resolve(o)}getAllFromCollectionGroup(e,n,r,i){pe()}Ds(e,n){return te.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new XD(this)}getSize(e){return te.resolve(this.size)}}class XD extends zD{constructor(e){super(),this.rs=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.rs.addEntry(e,i)):this.rs.removeEntry(r)}),te.waitFor(n)}getFromCache(e,n){return this.rs.getEntry(e,n)}getAllFromCache(e,n){return this.rs.getEntries(e,n)}}/** + */class YD{constructor(e){this.Ss=e,this.docs=new We(fe.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),o=i?i.size:0,s=this.Ss(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return te.resolve(r?r.document.mutableCopy():It.newInvalidDocument(n))}getEntries(e,n){let r=yr();return n.forEach(i=>{const o=this.docs.get(i);r=r.insert(i,o?o.document.mutableCopy():It.newInvalidDocument(i))}),te.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let o=yr();const s=n.path,a=new fe(s.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:u,value:{document:c}}=l.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||$L(ML(c),r)<=0||(i.has(c.key)||ff(n,c))&&(o=o.insert(c.key,c.mutableCopy()))}return te.resolve(o)}getAllFromCollectionGroup(e,n,r,i){pe()}Ds(e,n){return te.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new XD(this)}getSize(e){return te.resolve(this.size)}}class XD extends zD{constructor(e){super(),this.rs=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.rs.addEntry(e,i)):this.rs.removeEntry(r)}),te.waitFor(n)}getFromCache(e,n){return this.rs.getEntry(e,n)}getAllFromCache(e,n){return this.rs.getEntries(e,n)}}/** * @license * Copyright 2017 Google LLC * @@ -1428,7 +1428,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class nM{constructor(e,n,r,i){this.persistence=e,this.Wi=n,this.serializer=i,this.Hi=new We(Ae),this.Ji=new as(o=>kg(o),Ig),this.Yi=new Map,this.Xi=e.getRemoteDocumentCache(),this.Fs=e.getTargetCache(),this.Ls=e.getBundleCache(),this.Zi(r)}Zi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new KD(this.Xi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Xi.setIndexManager(this.indexManager),this.Wi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.Hi))}}function rM(t,e,n,r){return new nM(t,e,n,r)}async function Bb(t,e){const n=we(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(o=>(i=o,n.Zi(e),n.mutationQueue.getAllMutationBatches(r))).next(o=>{const s=[],a=[];let l=Se();for(const u of i){s.push(u.batchId);for(const f of u.mutations)l=l.add(f.key)}for(const u of o){a.push(u.batchId);for(const f of u.mutations)l=l.add(f.key)}return n.localDocuments.getDocuments(r,l).next(u=>({tr:u,removedBatchIds:s,addedBatchIds:a}))})})}function iM(t,e){const n=we(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),o=n.Xi.newChangeBuffer({trackRemovals:!0});return function(s,a,l,u){const f=l.batch,h=f.keys();let c=te.resolve();return h.forEach(d=>{c=c.next(()=>u.getEntry(a,d)).next(w=>{const v=l.docVersions.get(d);je(v!==null),w.version.compareTo(v)<0&&(f.applyToRemoteDocument(w,l),w.isValidDocument()&&(w.setReadTime(l.commitVersion),u.addEntry(w)))})}),c.next(()=>s.mutationQueue.removeMutationBatch(a,f))}(n,r,e,o).next(()=>o.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(s){let a=Se();for(let l=0;l0&&(a=a.add(s.batch.mutations[l].key));return a}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function qb(t){const e=we(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Fs.getLastRemoteSnapshotVersion(n))}function oM(t,e){const n=we(t),r=e.snapshotVersion;let i=n.Hi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=n.Xi.newChangeBuffer({trackRemovals:!0});i=n.Hi;const a=[];e.targetChanges.forEach((f,h)=>{const c=i.get(h);if(!c)return;a.push(n.Fs.removeMatchingKeys(o,f.removedDocuments,h).next(()=>n.Fs.addMatchingKeys(o,f.addedDocuments,h)));let d=c.withSequenceNumber(o.currentSequenceNumber);e.targetMismatches.get(h)!==null?d=d.withResumeToken(Lt.EMPTY_BYTE_STRING,ge.min()).withLastLimboFreeSnapshotVersion(ge.min()):f.resumeToken.approximateByteSize()>0&&(d=d.withResumeToken(f.resumeToken,r)),i=i.insert(h,d),function(w,v,E){return w.resumeToken.approximateByteSize()===0||v.snapshotVersion.toMicroseconds()-w.snapshotVersion.toMicroseconds()>=3e8?!0:E.addedDocuments.size+E.modifiedDocuments.size+E.removedDocuments.size>0}(c,d,f)&&a.push(n.Fs.updateTargetData(o,d))});let l=yr(),u=Se();if(e.documentUpdates.forEach(f=>{e.resolvedLimboDocuments.has(f)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(o,f))}),a.push(sM(o,s,e.documentUpdates).next(f=>{l=f.er,u=f.nr})),!r.isEqual(ge.min())){const f=n.Fs.getLastRemoteSnapshotVersion(o).next(h=>n.Fs.setTargetsMetadata(o,o.currentSequenceNumber,r));a.push(f)}return te.waitFor(a).next(()=>s.apply(o)).next(()=>n.localDocuments.getLocalViewOfDocuments(o,l,u)).next(()=>l)}).then(o=>(n.Hi=i,o))}function sM(t,e,n){let r=Se(),i=Se();return n.forEach(o=>r=r.add(o)),e.getEntries(t,r).next(o=>{let s=yr();return n.forEach((a,l)=>{const u=o.get(a);l.isFoundDocument()!==u.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(ge.min())?(e.removeEntry(a,l.readTime),s=s.insert(a,l)):!u.isValidDocument()||l.version.compareTo(u.version)>0||l.version.compareTo(u.version)===0&&u.hasPendingWrites?(e.addEntry(l),s=s.insert(a,l)):ce("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",l.version)}),{er:s,nr:i}})}function aM(t,e){const n=we(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function lM(t,e){const n=we(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Fs.getTargetData(r,e).next(o=>o?(i=o,te.resolve(i)):n.Fs.allocateTargetId(r).next(s=>(i=new Fr(e,s,"TargetPurposeListen",r.currentSequenceNumber),n.Fs.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.Hi.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Hi=n.Hi.insert(r.targetId,r),n.Ji.set(e,r.targetId)),r})}async function Ap(t,e,n){const r=we(t),i=r.Hi.get(e),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,s=>r.persistence.referenceDelegate.removeTarget(s,i))}catch(s){if(!ol(s))throw s;ce("LocalStore",`Failed to update sequence numbers for target ${e}: ${s}`)}r.Hi=r.Hi.remove(e),r.Ji.delete(i.target)}function Y0(t,e,n){const r=we(t);let i=ge.min(),o=Se();return r.persistence.runTransaction("Execute query","readonly",s=>function(a,l,u){const f=we(a),h=f.Ji.get(u);return h!==void 0?te.resolve(f.Hi.get(h)):f.Fs.getTargetData(l,u)}(r,s,vr(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Fs.getMatchingKeysForTargetId(s,a.targetId).next(l=>{o=l})}).next(()=>r.Wi.getDocumentsMatchingQuery(s,e,n?i:ge.min(),n?o:Se())).next(a=>(uM(r,tD(e),a),{documents:a,sr:o})))}function uM(t,e,n){let r=t.Yi.get(e)||ge.min();n.forEach((i,o)=>{o.readTime.compareTo(r)>0&&(r=o.readTime)}),t.Yi.set(e,r)}class X0{constructor(){this.activeTargetIds=aD()}hr(e){this.activeTargetIds=this.activeTargetIds.add(e)}lr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ar(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class cM{constructor(){this.Wr=new X0,this.Hr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.Wr.hr(e),this.Hr[e]||"not-current"}updateQueryState(e,n,r){this.Hr[e]=n}removeLocalQueryTarget(e){this.Wr.lr(e)}isLocalQueryTarget(e){return this.Wr.activeTargetIds.has(e)}clearQueryState(e){delete this.Hr[e]}getAllActiveQueryTargets(){return this.Wr.activeTargetIds}isActiveQueryTarget(e){return this.Wr.activeTargetIds.has(e)}start(){return this.Wr=new X0,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** + */class nM{constructor(e,n,r,i){this.persistence=e,this.Wi=n,this.serializer=i,this.Hi=new We(Ae),this.Ji=new as(o=>kg(o),Ig),this.Yi=new Map,this.Xi=e.getRemoteDocumentCache(),this.Fs=e.getTargetCache(),this.Ls=e.getBundleCache(),this.Zi(r)}Zi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new KD(this.Xi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Xi.setIndexManager(this.indexManager),this.Wi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.Hi))}}function rM(t,e,n,r){return new nM(t,e,n,r)}async function Bb(t,e){const n=we(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(o=>(i=o,n.Zi(e),n.mutationQueue.getAllMutationBatches(r))).next(o=>{const s=[],a=[];let l=Se();for(const u of i){s.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}for(const u of o){a.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}return n.localDocuments.getDocuments(r,l).next(u=>({tr:u,removedBatchIds:s,addedBatchIds:a}))})})}function iM(t,e){const n=we(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=e.batch.keys(),o=n.Xi.newChangeBuffer({trackRemovals:!0});return function(s,a,l,u){const c=l.batch,h=c.keys();let f=te.resolve();return h.forEach(d=>{f=f.next(()=>u.getEntry(a,d)).next(w=>{const v=l.docVersions.get(d);je(v!==null),w.version.compareTo(v)<0&&(c.applyToRemoteDocument(w,l),w.isValidDocument()&&(w.setReadTime(l.commitVersion),u.addEntry(w)))})}),f.next(()=>s.mutationQueue.removeMutationBatch(a,c))}(n,r,e,o).next(()=>o.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(s){let a=Se();for(let l=0;l0&&(a=a.add(s.batch.mutations[l].key));return a}(e))).next(()=>n.localDocuments.getDocuments(r,i))})}function qb(t){const e=we(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Fs.getLastRemoteSnapshotVersion(n))}function oM(t,e){const n=we(t),r=e.snapshotVersion;let i=n.Hi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=n.Xi.newChangeBuffer({trackRemovals:!0});i=n.Hi;const a=[];e.targetChanges.forEach((c,h)=>{const f=i.get(h);if(!f)return;a.push(n.Fs.removeMatchingKeys(o,c.removedDocuments,h).next(()=>n.Fs.addMatchingKeys(o,c.addedDocuments,h)));let d=f.withSequenceNumber(o.currentSequenceNumber);e.targetMismatches.get(h)!==null?d=d.withResumeToken(Lt.EMPTY_BYTE_STRING,ge.min()).withLastLimboFreeSnapshotVersion(ge.min()):c.resumeToken.approximateByteSize()>0&&(d=d.withResumeToken(c.resumeToken,r)),i=i.insert(h,d),function(w,v,E){return w.resumeToken.approximateByteSize()===0||v.snapshotVersion.toMicroseconds()-w.snapshotVersion.toMicroseconds()>=3e8?!0:E.addedDocuments.size+E.modifiedDocuments.size+E.removedDocuments.size>0}(f,d,c)&&a.push(n.Fs.updateTargetData(o,d))});let l=yr(),u=Se();if(e.documentUpdates.forEach(c=>{e.resolvedLimboDocuments.has(c)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(o,c))}),a.push(sM(o,s,e.documentUpdates).next(c=>{l=c.er,u=c.nr})),!r.isEqual(ge.min())){const c=n.Fs.getLastRemoteSnapshotVersion(o).next(h=>n.Fs.setTargetsMetadata(o,o.currentSequenceNumber,r));a.push(c)}return te.waitFor(a).next(()=>s.apply(o)).next(()=>n.localDocuments.getLocalViewOfDocuments(o,l,u)).next(()=>l)}).then(o=>(n.Hi=i,o))}function sM(t,e,n){let r=Se(),i=Se();return n.forEach(o=>r=r.add(o)),e.getEntries(t,r).next(o=>{let s=yr();return n.forEach((a,l)=>{const u=o.get(a);l.isFoundDocument()!==u.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(ge.min())?(e.removeEntry(a,l.readTime),s=s.insert(a,l)):!u.isValidDocument()||l.version.compareTo(u.version)>0||l.version.compareTo(u.version)===0&&u.hasPendingWrites?(e.addEntry(l),s=s.insert(a,l)):ce("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",l.version)}),{er:s,nr:i}})}function aM(t,e){const n=we(t);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,e)))}function lM(t,e){const n=we(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Fs.getTargetData(r,e).next(o=>o?(i=o,te.resolve(i)):n.Fs.allocateTargetId(r).next(s=>(i=new Fr(e,s,"TargetPurposeListen",r.currentSequenceNumber),n.Fs.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.Hi.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Hi=n.Hi.insert(r.targetId,r),n.Ji.set(e,r.targetId)),r})}async function Ap(t,e,n){const r=we(t),i=r.Hi.get(e),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,s=>r.persistence.referenceDelegate.removeTarget(s,i))}catch(s){if(!ol(s))throw s;ce("LocalStore",`Failed to update sequence numbers for target ${e}: ${s}`)}r.Hi=r.Hi.remove(e),r.Ji.delete(i.target)}function Y0(t,e,n){const r=we(t);let i=ge.min(),o=Se();return r.persistence.runTransaction("Execute query","readonly",s=>function(a,l,u){const c=we(a),h=c.Ji.get(u);return h!==void 0?te.resolve(c.Hi.get(h)):c.Fs.getTargetData(l,u)}(r,s,vr(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Fs.getMatchingKeysForTargetId(s,a.targetId).next(l=>{o=l})}).next(()=>r.Wi.getDocumentsMatchingQuery(s,e,n?i:ge.min(),n?o:Se())).next(a=>(uM(r,tD(e),a),{documents:a,sr:o})))}function uM(t,e,n){let r=t.Yi.get(e)||ge.min();n.forEach((i,o)=>{o.readTime.compareTo(r)>0&&(r=o.readTime)}),t.Yi.set(e,r)}class X0{constructor(){this.activeTargetIds=aD()}hr(e){this.activeTargetIds=this.activeTargetIds.add(e)}lr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ar(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class cM{constructor(){this.Wr=new X0,this.Hr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e){return this.Wr.hr(e),this.Hr[e]||"not-current"}updateQueryState(e,n,r){this.Hr[e]=n}removeLocalQueryTarget(e){this.Wr.lr(e)}isLocalQueryTarget(e){return this.Wr.activeTargetIds.has(e)}clearQueryState(e){delete this.Hr[e]}getAllActiveQueryTargets(){return this.Wr.activeTargetIds}isActiveQueryTarget(e){return this.Wr.activeTargetIds.has(e)}start(){return this.Wr=new X0,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** * @license * Copyright 2019 Google LLC * @@ -1518,7 +1518,7 @@ Error generating stack: `+o.message+` * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const St="WebChannelConnection";class pM extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const n=e.ssl?"https":"http";this.wo=n+"://"+e.host,this.mo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get yo(){return!1}po(e,n,r,i,o){const s=Rh(),a=this.Io(e,n);ce("RestConnection",`Sending RPC '${e}' ${s}:`,a,r);const l={};return this.To(l,i,o),this.Eo(e,a,l,r).then(u=>(ce("RestConnection",`Received RPC '${e}' ${s}: `,u),u),u=>{throw Bo("RestConnection",`RPC '${e}' ${s} failed with error: `,u,"url: ",a,"request:",r),u})}Ao(e,n,r,i,o,s){return this.po(e,n,r,i,o)}To(e,n,r){e["X-Goog-Api-Client"]="gl-js/ fire/"+os,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((i,o)=>e[o]=i),r&&r.headers.forEach((i,o)=>e[o]=i)}Io(e,n){const r=hM[e];return`${this.wo}/v1/${n}:${r}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}Eo(e,n,r,i){const o=Rh();return new Promise((s,a)=>{const l=new bL;l.setWithCredentials(!0),l.listenOnce(_L.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case Ch.NO_ERROR:const f=l.getResponseJson();ce(St,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(f)),s(f);break;case Ch.TIMEOUT:ce(St,`RPC '${e}' ${o} timed out`),a(new se(Y.DEADLINE_EXCEEDED,"Request time out"));break;case Ch.HTTP_ERROR:const h=l.getStatus();if(ce(St,`RPC '${e}' ${o} failed with status:`,h,"response text:",l.getResponseText()),h>0){let c=l.getResponseJson();Array.isArray(c)&&(c=c[0]);const d=c==null?void 0:c.error;if(d&&d.status&&d.message){const w=function(v){const E=v.toLowerCase().replace(/_/g,"-");return Object.values(Y).indexOf(E)>=0?E:Y.UNKNOWN}(d.status);a(new se(w,d.message))}else a(new se(Y.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new se(Y.UNAVAILABLE,"Connection failed."));break;default:pe()}}finally{ce(St,`RPC '${e}' ${o} completed.`)}});const u=JSON.stringify(i);ce(St,`RPC '${e}' ${o} sending request:`,i),l.send(n,"POST",u,r,15)})}Ro(e,n,r){const i=Rh(),o=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=wL(),a=EL(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(l.xmlHttpFactory=new SL({})),this.To(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const u=o.join("");ce(St,`Creating RPC '${e}' stream ${i}: ${u}`,l);const f=s.createWebChannel(u,l);let h=!1,c=!1;const d=new dM({io:v=>{c?ce(St,`Not sending because RPC '${e}' stream ${i} is closed:`,v):(h||(ce(St,`Opening RPC '${e}' stream ${i} transport.`),f.open(),h=!0),ce(St,`RPC '${e}' stream ${i} sending:`,v),f.send(v))},ro:()=>f.close()}),w=(v,E,m)=>{v.listen(E,p=>{try{m(p)}catch(y){setTimeout(()=>{throw y},0)}})};return w(f,Fl.EventType.OPEN,()=>{c||ce(St,`RPC '${e}' stream ${i} transport opened.`)}),w(f,Fl.EventType.CLOSE,()=>{c||(c=!0,ce(St,`RPC '${e}' stream ${i} transport closed`),d.fo())}),w(f,Fl.EventType.ERROR,v=>{c||(c=!0,Bo(St,`RPC '${e}' stream ${i} transport errored:`,v),d.fo(new se(Y.UNAVAILABLE,"The operation could not be completed")))}),w(f,Fl.EventType.MESSAGE,v=>{var E;if(!c){const m=v.data[0];je(!!m);const p=m,y=p.error||((E=p[0])===null||E===void 0?void 0:E.error);if(y){ce(St,`RPC '${e}' stream ${i} received error:`,y);const g=y.status;let _=function(S){const T=Ze[S];if(T!==void 0)return Rb(T)}(g),k=y.message;_===void 0&&(_=Y.INTERNAL,k="Unknown error status: "+g+" with message "+y.message),c=!0,d.fo(new se(_,k)),f.close()}else ce(St,`RPC '${e}' stream ${i} received:`,m),d._o(m)}}),w(a,TL.STAT_EVENT,v=>{v.stat===N0.PROXY?ce(St,`RPC '${e}' stream ${i} detected buffering proxy`):v.stat===N0.NOPROXY&&ce(St,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{d.lo()},0),d}}function Ph(){return typeof document<"u"?document:null}/** + */const St="WebChannelConnection";class pM extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const n=e.ssl?"https":"http";this.wo=n+"://"+e.host,this.mo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get yo(){return!1}po(e,n,r,i,o){const s=Rh(),a=this.Io(e,n);ce("RestConnection",`Sending RPC '${e}' ${s}:`,a,r);const l={};return this.To(l,i,o),this.Eo(e,a,l,r).then(u=>(ce("RestConnection",`Received RPC '${e}' ${s}: `,u),u),u=>{throw Bo("RestConnection",`RPC '${e}' ${s} failed with error: `,u,"url: ",a,"request:",r),u})}Ao(e,n,r,i,o,s){return this.po(e,n,r,i,o)}To(e,n,r){e["X-Goog-Api-Client"]="gl-js/ fire/"+os,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((i,o)=>e[o]=i),r&&r.headers.forEach((i,o)=>e[o]=i)}Io(e,n){const r=hM[e];return`${this.wo}/v1/${n}:${r}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}Eo(e,n,r,i){const o=Rh();return new Promise((s,a)=>{const l=new bL;l.setWithCredentials(!0),l.listenOnce(_L.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case Ch.NO_ERROR:const c=l.getResponseJson();ce(St,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(c)),s(c);break;case Ch.TIMEOUT:ce(St,`RPC '${e}' ${o} timed out`),a(new se(Y.DEADLINE_EXCEEDED,"Request time out"));break;case Ch.HTTP_ERROR:const h=l.getStatus();if(ce(St,`RPC '${e}' ${o} failed with status:`,h,"response text:",l.getResponseText()),h>0){let f=l.getResponseJson();Array.isArray(f)&&(f=f[0]);const d=f==null?void 0:f.error;if(d&&d.status&&d.message){const w=function(v){const E=v.toLowerCase().replace(/_/g,"-");return Object.values(Y).indexOf(E)>=0?E:Y.UNKNOWN}(d.status);a(new se(w,d.message))}else a(new se(Y.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new se(Y.UNAVAILABLE,"Connection failed."));break;default:pe()}}finally{ce(St,`RPC '${e}' ${o} completed.`)}});const u=JSON.stringify(i);ce(St,`RPC '${e}' ${o} sending request:`,i),l.send(n,"POST",u,r,15)})}Ro(e,n,r){const i=Rh(),o=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=wL(),a=EL(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(l.xmlHttpFactory=new SL({})),this.To(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const u=o.join("");ce(St,`Creating RPC '${e}' stream ${i}: ${u}`,l);const c=s.createWebChannel(u,l);let h=!1,f=!1;const d=new dM({io:v=>{f?ce(St,`Not sending because RPC '${e}' stream ${i} is closed:`,v):(h||(ce(St,`Opening RPC '${e}' stream ${i} transport.`),c.open(),h=!0),ce(St,`RPC '${e}' stream ${i} sending:`,v),c.send(v))},ro:()=>c.close()}),w=(v,E,m)=>{v.listen(E,p=>{try{m(p)}catch(y){setTimeout(()=>{throw y},0)}})};return w(c,Fl.EventType.OPEN,()=>{f||ce(St,`RPC '${e}' stream ${i} transport opened.`)}),w(c,Fl.EventType.CLOSE,()=>{f||(f=!0,ce(St,`RPC '${e}' stream ${i} transport closed`),d.fo())}),w(c,Fl.EventType.ERROR,v=>{f||(f=!0,Bo(St,`RPC '${e}' stream ${i} transport errored:`,v),d.fo(new se(Y.UNAVAILABLE,"The operation could not be completed")))}),w(c,Fl.EventType.MESSAGE,v=>{var E;if(!f){const m=v.data[0];je(!!m);const p=m,y=p.error||((E=p[0])===null||E===void 0?void 0:E.error);if(y){ce(St,`RPC '${e}' stream ${i} received error:`,y);const g=y.status;let _=function(S){const T=Ze[S];if(T!==void 0)return Rb(T)}(g),k=y.message;_===void 0&&(_=Y.INTERNAL,k="Unknown error status: "+g+" with message "+y.message),f=!0,d.fo(new se(_,k)),c.close()}else ce(St,`RPC '${e}' stream ${i} received:`,m),d._o(m)}}),w(a,TL.STAT_EVENT,v=>{v.stat===N0.PROXY?ce(St,`RPC '${e}' stream ${i} detected buffering proxy`):v.stat===N0.NOPROXY&&ce(St,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{d.lo()},0),d}}function Ph(){return typeof document<"u"?document:null}/** * @license * Copyright 2020 Google LLC * @@ -1594,7 +1594,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class wM{constructor(e,n,r,i,o){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Tu=[],this.Eu=new Map,this.Au=new Set,this.Ru=[],this.vu=o,this.vu.Jr(s=>{r.enqueueAndForget(async()=>{Yi(this)&&(ce("RemoteStore","Restarting streams for network reachability change."),await async function(a){const l=we(a);l.Au.add(4),await ll(l),l.Pu.set("Unknown"),l.Au.delete(4),await gf(l)}(this))})}),this.Pu=new yM(r,i)}}async function gf(t){if(Yi(t))for(const e of t.Ru)await e(!0)}async function ll(t){for(const e of t.Ru)await e(!1)}function Hb(t,e){const n=we(t);n.Eu.has(e.targetId)||(n.Eu.set(e.targetId,e),Fg(n)?$g(n):ls(n).Uo()&&Mg(n,e))}function Kb(t,e){const n=we(t),r=ls(n);n.Eu.delete(e),r.Uo()&&Wb(n,e),n.Eu.size===0&&(r.Uo()?r.Qo():Yi(n)&&n.Pu.set("Unknown"))}function Mg(t,e){if(t.bu.Lt(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(ge.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}ls(t).nu(e)}function Wb(t,e){t.bu.Lt(e),ls(t).su(e)}function $g(t){t.bu=new TD({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),he:e=>t.Eu.get(e)||null,oe:()=>t.datastore.serializer.databaseId}),ls(t).start(),t.Pu.mu()}function Fg(t){return Yi(t)&&!ls(t).qo()&&t.Eu.size>0}function Yi(t){return we(t).Au.size===0}function Gb(t){t.bu=void 0}async function EM(t){t.Eu.forEach((e,n)=>{Mg(t,e)})}async function _M(t,e){Gb(t),Fg(t)?(t.Pu.pu(e),$g(t)):t.Pu.set("Unknown")}async function TM(t,e,n){if(t.Pu.set("Online"),e instanceof Lb&&e.state===2&&e.cause)try{await async function(r,i){const o=i.cause;for(const s of i.targetIds)r.Eu.has(s)&&(await r.remoteSyncer.rejectListen(s,o),r.Eu.delete(s),r.bu.removeTarget(s))}(t,e)}catch(r){ce("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await ic(t,r)}else if(e instanceof ou?t.bu.Wt(e):e instanceof Pb?t.bu.ee(e):t.bu.Yt(e),!n.isEqual(ge.min()))try{const r=await qb(t.localStore);n.compareTo(r)>=0&&await function(i,o){const s=i.bu.ue(o);return s.targetChanges.forEach((a,l)=>{if(a.resumeToken.approximateByteSize()>0){const u=i.Eu.get(l);u&&i.Eu.set(l,u.withResumeToken(a.resumeToken,o))}}),s.targetMismatches.forEach((a,l)=>{const u=i.Eu.get(a);if(!u)return;i.Eu.set(a,u.withResumeToken(Lt.EMPTY_BYTE_STRING,u.snapshotVersion)),Wb(i,a);const f=new Fr(u.target,a,l,u.sequenceNumber);Mg(i,f)}),i.remoteSyncer.applyRemoteEvent(s)}(t,n)}catch(r){ce("RemoteStore","Failed to raise snapshot:",r),await ic(t,r)}}async function ic(t,e,n){if(!ol(e))throw e;t.Au.add(1),await ll(t),t.Pu.set("Offline"),n||(n=()=>qb(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ce("RemoteStore","Retrying IndexedDB access"),await n(),t.Au.delete(1),await gf(t)})}function Qb(t,e){return e().catch(n=>ic(t,n,e))}async function vf(t){const e=we(t),n=ni(e);let r=e.Tu.length>0?e.Tu[e.Tu.length-1].batchId:-1;for(;SM(e);)try{const i=await aM(e.localStore,r);if(i===null){e.Tu.length===0&&n.Qo();break}r=i.batchId,bM(e,i)}catch(i){await ic(e,i)}Yb(e)&&Xb(e)}function SM(t){return Yi(t)&&t.Tu.length<10}function bM(t,e){t.Tu.push(e);const n=ni(t);n.Uo()&&n.ru&&n.ou(e.mutations)}function Yb(t){return Yi(t)&&!ni(t).qo()&&t.Tu.length>0}function Xb(t){ni(t).start()}async function kM(t){ni(t).au()}async function IM(t){const e=ni(t);for(const n of t.Tu)e.ou(n.mutations)}async function NM(t,e,n){const r=t.Tu.shift(),i=Ag.from(r,e,n);await Qb(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await vf(t)}async function OM(t,e){e&&ni(t).ru&&await async function(n,r){if(i=r.code,wD(i)&&i!==Y.ABORTED){const o=n.Tu.shift();ni(n).Go(),await Qb(n,()=>n.remoteSyncer.rejectFailedWrite(o.batchId,r)),await vf(n)}var i}(t,e),Yb(t)&&Xb(t)}async function Z0(t,e){const n=we(t);n.asyncQueue.verifyOperationInProgress(),ce("RemoteStore","RemoteStore received new credentials");const r=Yi(n);n.Au.add(3),await ll(n),r&&n.Pu.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Au.delete(3),await gf(n)}async function AM(t,e){const n=we(t);e?(n.Au.delete(2),await gf(n)):e||(n.Au.add(2),await ll(n),n.Pu.set("Unknown"))}function ls(t){return t.Vu||(t.Vu=function(e,n,r){const i=we(e);return i.lu(),new mM(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(t.datastore,t.asyncQueue,{oo:EM.bind(null,t),co:_M.bind(null,t),eu:TM.bind(null,t)}),t.Ru.push(async e=>{e?(t.Vu.Go(),Fg(t)?$g(t):t.Pu.set("Unknown")):(await t.Vu.stop(),Gb(t))})),t.Vu}function ni(t){return t.Su||(t.Su=function(e,n,r){const i=we(e);return i.lu(),new gM(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(t.datastore,t.asyncQueue,{oo:kM.bind(null,t),co:OM.bind(null,t),cu:IM.bind(null,t),uu:NM.bind(null,t)}),t.Ru.push(async e=>{e?(t.Su.Go(),await vf(t)):(await t.Su.stop(),t.Tu.length>0&&(ce("RemoteStore",`Stopping write stream with ${t.Tu.length} pending writes`),t.Tu=[]))})),t.Su}/** + */class wM{constructor(e,n,r,i,o){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Tu=[],this.Eu=new Map,this.Au=new Set,this.Ru=[],this.vu=o,this.vu.Jr(s=>{r.enqueueAndForget(async()=>{Yi(this)&&(ce("RemoteStore","Restarting streams for network reachability change."),await async function(a){const l=we(a);l.Au.add(4),await ll(l),l.Pu.set("Unknown"),l.Au.delete(4),await gf(l)}(this))})}),this.Pu=new yM(r,i)}}async function gf(t){if(Yi(t))for(const e of t.Ru)await e(!0)}async function ll(t){for(const e of t.Ru)await e(!1)}function Hb(t,e){const n=we(t);n.Eu.has(e.targetId)||(n.Eu.set(e.targetId,e),Fg(n)?$g(n):ls(n).Uo()&&Mg(n,e))}function Kb(t,e){const n=we(t),r=ls(n);n.Eu.delete(e),r.Uo()&&Wb(n,e),n.Eu.size===0&&(r.Uo()?r.Qo():Yi(n)&&n.Pu.set("Unknown"))}function Mg(t,e){if(t.bu.Lt(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(ge.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}ls(t).nu(e)}function Wb(t,e){t.bu.Lt(e),ls(t).su(e)}function $g(t){t.bu=new TD({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),he:e=>t.Eu.get(e)||null,oe:()=>t.datastore.serializer.databaseId}),ls(t).start(),t.Pu.mu()}function Fg(t){return Yi(t)&&!ls(t).qo()&&t.Eu.size>0}function Yi(t){return we(t).Au.size===0}function Gb(t){t.bu=void 0}async function EM(t){t.Eu.forEach((e,n)=>{Mg(t,e)})}async function _M(t,e){Gb(t),Fg(t)?(t.Pu.pu(e),$g(t)):t.Pu.set("Unknown")}async function TM(t,e,n){if(t.Pu.set("Online"),e instanceof Lb&&e.state===2&&e.cause)try{await async function(r,i){const o=i.cause;for(const s of i.targetIds)r.Eu.has(s)&&(await r.remoteSyncer.rejectListen(s,o),r.Eu.delete(s),r.bu.removeTarget(s))}(t,e)}catch(r){ce("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await ic(t,r)}else if(e instanceof ou?t.bu.Wt(e):e instanceof Pb?t.bu.ee(e):t.bu.Yt(e),!n.isEqual(ge.min()))try{const r=await qb(t.localStore);n.compareTo(r)>=0&&await function(i,o){const s=i.bu.ue(o);return s.targetChanges.forEach((a,l)=>{if(a.resumeToken.approximateByteSize()>0){const u=i.Eu.get(l);u&&i.Eu.set(l,u.withResumeToken(a.resumeToken,o))}}),s.targetMismatches.forEach((a,l)=>{const u=i.Eu.get(a);if(!u)return;i.Eu.set(a,u.withResumeToken(Lt.EMPTY_BYTE_STRING,u.snapshotVersion)),Wb(i,a);const c=new Fr(u.target,a,l,u.sequenceNumber);Mg(i,c)}),i.remoteSyncer.applyRemoteEvent(s)}(t,n)}catch(r){ce("RemoteStore","Failed to raise snapshot:",r),await ic(t,r)}}async function ic(t,e,n){if(!ol(e))throw e;t.Au.add(1),await ll(t),t.Pu.set("Offline"),n||(n=()=>qb(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{ce("RemoteStore","Retrying IndexedDB access"),await n(),t.Au.delete(1),await gf(t)})}function Qb(t,e){return e().catch(n=>ic(t,n,e))}async function vf(t){const e=we(t),n=ni(e);let r=e.Tu.length>0?e.Tu[e.Tu.length-1].batchId:-1;for(;SM(e);)try{const i=await aM(e.localStore,r);if(i===null){e.Tu.length===0&&n.Qo();break}r=i.batchId,bM(e,i)}catch(i){await ic(e,i)}Yb(e)&&Xb(e)}function SM(t){return Yi(t)&&t.Tu.length<10}function bM(t,e){t.Tu.push(e);const n=ni(t);n.Uo()&&n.ru&&n.ou(e.mutations)}function Yb(t){return Yi(t)&&!ni(t).qo()&&t.Tu.length>0}function Xb(t){ni(t).start()}async function kM(t){ni(t).au()}async function IM(t){const e=ni(t);for(const n of t.Tu)e.ou(n.mutations)}async function NM(t,e,n){const r=t.Tu.shift(),i=Ag.from(r,e,n);await Qb(t,()=>t.remoteSyncer.applySuccessfulWrite(i)),await vf(t)}async function OM(t,e){e&&ni(t).ru&&await async function(n,r){if(i=r.code,wD(i)&&i!==Y.ABORTED){const o=n.Tu.shift();ni(n).Go(),await Qb(n,()=>n.remoteSyncer.rejectFailedWrite(o.batchId,r)),await vf(n)}var i}(t,e),Yb(t)&&Xb(t)}async function Z0(t,e){const n=we(t);n.asyncQueue.verifyOperationInProgress(),ce("RemoteStore","RemoteStore received new credentials");const r=Yi(n);n.Au.add(3),await ll(n),r&&n.Pu.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.Au.delete(3),await gf(n)}async function AM(t,e){const n=we(t);e?(n.Au.delete(2),await gf(n)):e||(n.Au.add(2),await ll(n),n.Pu.set("Unknown"))}function ls(t){return t.Vu||(t.Vu=function(e,n,r){const i=we(e);return i.lu(),new mM(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(t.datastore,t.asyncQueue,{oo:EM.bind(null,t),co:_M.bind(null,t),eu:TM.bind(null,t)}),t.Ru.push(async e=>{e?(t.Vu.Go(),Fg(t)?$g(t):t.Pu.set("Unknown")):(await t.Vu.stop(),Gb(t))})),t.Vu}function ni(t){return t.Su||(t.Su=function(e,n,r){const i=we(e);return i.lu(),new gM(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(t.datastore,t.asyncQueue,{oo:kM.bind(null,t),co:OM.bind(null,t),cu:IM.bind(null,t),uu:NM.bind(null,t)}),t.Ru.push(async e=>{e?(t.Su.Go(),await vf(t)):(await t.Su.stop(),t.Tu.length>0&&(ce("RemoteStore",`Stopping write stream with ${t.Tu.length} pending writes`),t.Tu=[]))})),t.Su}/** * @license * Copyright 2017 Google LLC * @@ -1672,7 +1672,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class Jb{constructor(e){this.key=e}}class Zb{constructor(e){this.key=e}}class LM{constructor(e,n){this.query=e,this.Ju=n,this.Yu=null,this.hasCachedResults=!1,this.current=!1,this.Xu=Se(),this.mutatedKeys=Se(),this.Zu=Eb(e),this.tc=new Co(this.Zu)}get ec(){return this.Ju}nc(e,n){const r=n?n.sc:new e1,i=n?n.tc:this.tc;let o=n?n.mutatedKeys:this.mutatedKeys,s=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,u=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((f,h)=>{const c=i.get(f),d=ff(this.query,h)?h:null,w=!!c&&this.mutatedKeys.has(c.key),v=!!d&&(d.hasLocalMutations||this.mutatedKeys.has(d.key)&&d.hasCommittedMutations);let E=!1;c&&d?c.data.isEqual(d.data)?w!==v&&(r.track({type:3,doc:d}),E=!0):this.ic(c,d)||(r.track({type:2,doc:d}),E=!0,(l&&this.Zu(d,l)>0||u&&this.Zu(d,u)<0)&&(a=!0)):!c&&d?(r.track({type:0,doc:d}),E=!0):c&&!d&&(r.track({type:1,doc:c}),E=!0,(l||u)&&(a=!0)),E&&(d?(s=s.add(d),o=v?o.add(f):o.delete(f)):(s=s.delete(f),o=o.delete(f)))}),this.query.limit!==null)for(;s.size>this.query.limit;){const f=this.query.limitType==="F"?s.last():s.first();s=s.delete(f.key),o=o.delete(f.key),r.track({type:1,doc:f})}return{tc:s,sc:r,ji:a,mutatedKeys:o}}ic(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r){const i=this.tc;this.tc=e.tc,this.mutatedKeys=e.mutatedKeys;const o=e.sc.Cu();o.sort((u,f)=>function(h,c){const d=w=>{switch(w){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return pe()}};return d(h)-d(c)}(u.type,f.type)||this.Zu(u.doc,f.doc)),this.rc(r);const s=n?this.oc():[],a=this.Xu.size===0&&this.current?1:0,l=a!==this.Yu;return this.Yu=a,o.length!==0||l?{snapshot:new Ko(this.query,e.tc,i,o,e.mutatedKeys,a===0,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),uc:s}:{uc:s}}ku(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tc:this.tc,sc:new e1,mutatedKeys:this.mutatedKeys,ji:!1},!1)):{uc:[]}}cc(e){return!this.Ju.has(e)&&!!this.tc.has(e)&&!this.tc.get(e).hasLocalMutations}rc(e){e&&(e.addedDocuments.forEach(n=>this.Ju=this.Ju.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.Ju=this.Ju.delete(n)),this.current=e.current)}oc(){if(!this.current)return[];const e=this.Xu;this.Xu=Se(),this.tc.forEach(r=>{this.cc(r.key)&&(this.Xu=this.Xu.add(r.key))});const n=[];return e.forEach(r=>{this.Xu.has(r)||n.push(new Zb(r))}),this.Xu.forEach(r=>{e.has(r)||n.push(new Jb(r))}),n}ac(e){this.Ju=e.sr,this.Xu=Se();const n=this.nc(e.documents);return this.applyChanges(n,!0)}hc(){return Ko.fromInitialDocuments(this.query,this.tc,this.mutatedKeys,this.Yu===0,this.hasCachedResults)}}class DM{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class MM{constructor(e){this.key=e,this.lc=!1}}class $M{constructor(e,n,r,i,o,s){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.fc={},this.dc=new as(a=>wb(a),cf),this._c=new Map,this.wc=new Set,this.mc=new We(fe.comparator),this.gc=new Map,this.yc=new Pg,this.Ic={},this.Tc=new Map,this.Ec=Ho.kn(),this.onlineState="Unknown",this.Ac=void 0}get isPrimaryClient(){return this.Ac===!0}}async function FM(t,e){const n=GM(t);let r,i;const o=n.dc.get(e);if(o)r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.hc();else{const s=await lM(n.localStore,vr(e)),a=n.sharedClientState.addLocalQueryTarget(s.targetId);r=s.targetId,i=await jM(n,e,r,a==="current",s.resumeToken),n.isPrimaryClient&&Hb(n.remoteStore,s)}return i}async function jM(t,e,n,r,i){t.Rc=(h,c,d)=>async function(w,v,E,m){let p=v.view.nc(E);p.ji&&(p=await Y0(w.localStore,v.query,!1).then(({documents:_})=>v.view.nc(_,p)));const y=m&&m.targetChanges.get(v.targetId),g=v.view.applyChanges(p,w.isPrimaryClient,y);return n1(w,v.targetId,g.uc),g.snapshot}(t,h,c,d);const o=await Y0(t.localStore,e,!0),s=new LM(e,o.sr),a=s.nc(o.documents),l=al.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),u=s.applyChanges(a,t.isPrimaryClient,l);n1(t,n,u.uc);const f=new DM(e,n,s);return t.dc.set(e,f),t._c.has(n)?t._c.get(n).push(e):t._c.set(n,[e]),u.snapshot}async function UM(t,e){const n=we(t),r=n.dc.get(e),i=n._c.get(r.targetId);if(i.length>1)return n._c.set(r.targetId,i.filter(o=>!cf(o,e))),void n.dc.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Ap(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),Kb(n.remoteStore,r.targetId),Cp(n,r.targetId)}).catch(il)):(Cp(n,r.targetId),await Ap(n.localStore,r.targetId,!0))}async function BM(t,e,n){const r=QM(t);try{const i=await function(o,s){const a=we(o),l=st.now(),u=s.reduce((c,d)=>c.add(d.key),Se());let f,h;return a.persistence.runTransaction("Locally write mutations","readwrite",c=>{let d=yr(),w=Se();return a.Xi.getEntries(c,u).next(v=>{d=v,d.forEach((E,m)=>{m.isValidDocument()||(w=w.add(E))})}).next(()=>a.localDocuments.getOverlayedDocuments(c,d)).next(v=>{f=v;const E=[];for(const m of s){const p=pD(m,f.get(m.key).overlayedDocument);p!=null&&E.push(new ui(m.key,p,fb(p.value.mapValue),mn.exists(!0)))}return a.mutationQueue.addMutationBatch(c,l,E,s)}).next(v=>{h=v;const E=v.applyToLocalDocumentSet(f,w);return a.documentOverlayCache.saveOverlays(c,v.batchId,E)})}).then(()=>({batchId:h.batchId,changes:Tb(f)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,s,a){let l=o.Ic[o.currentUser.toKey()];l||(l=new We(Ae)),l=l.insert(s,a),o.Ic[o.currentUser.toKey()]=l}(r,i.batchId,n),await ul(r,i.changes),await vf(r.remoteStore)}catch(i){const o=Ug(i,"Failed to persist write");n.reject(o)}}async function ek(t,e){const n=we(t);try{const r=await oM(n.localStore,e);e.targetChanges.forEach((i,o)=>{const s=n.gc.get(o);s&&(je(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?s.lc=!0:i.modifiedDocuments.size>0?je(s.lc):i.removedDocuments.size>0&&(je(s.lc),s.lc=!1))}),await ul(n,r,e)}catch(r){await il(r)}}function t1(t,e,n){const r=we(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.dc.forEach((o,s)=>{const a=s.view.ku(e);a.snapshot&&i.push(a.snapshot)}),function(o,s){const a=we(o);a.onlineState=s;let l=!1;a.queries.forEach((u,f)=>{for(const h of f.listeners)h.ku(s)&&(l=!0)}),l&&Vg(a)}(r.eventManager,e),i.length&&r.fc.eu(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function qM(t,e,n){const r=we(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.gc.get(e),o=i&&i.key;if(o){let s=new We(fe.comparator);s=s.insert(o,It.newNoDocument(o,ge.min()));const a=Se().add(o),l=new pf(ge.min(),new Map,new We(Ae),s,a);await ek(r,l),r.mc=r.mc.remove(o),r.gc.delete(e),Hg(r)}else await Ap(r.localStore,e,!1).then(()=>Cp(r,e,n)).catch(il)}async function VM(t,e){const n=we(t),r=e.batch.batchId;try{const i=await iM(n.localStore,e);nk(n,r,null),tk(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await ul(n,i)}catch(i){await il(i)}}async function zM(t,e,n){const r=we(t);try{const i=await function(o,s){const a=we(o);return a.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let u;return a.mutationQueue.lookupMutationBatch(l,s).next(f=>(je(f!==null),u=f.keys(),a.mutationQueue.removeMutationBatch(l,f))).next(()=>a.mutationQueue.performConsistencyCheck(l)).next(()=>a.documentOverlayCache.removeOverlaysForBatchId(l,u,s)).next(()=>a.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,u)).next(()=>a.localDocuments.getDocuments(l,u))})}(r.localStore,e);nk(r,e,n),tk(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await ul(r,i)}catch(i){await il(i)}}function tk(t,e){(t.Tc.get(e)||[]).forEach(n=>{n.resolve()}),t.Tc.delete(e)}function nk(t,e,n){const r=we(t);let i=r.Ic[r.currentUser.toKey()];if(i){const o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Ic[r.currentUser.toKey()]=i}}function Cp(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t._c.get(e))t.dc.delete(r),n&&t.fc.vc(r,n);t._c.delete(e),t.isPrimaryClient&&t.yc.ps(e).forEach(r=>{t.yc.containsKey(r)||rk(t,r)})}function rk(t,e){t.wc.delete(e.path.canonicalString());const n=t.mc.get(e);n!==null&&(Kb(t.remoteStore,n),t.mc=t.mc.remove(e),t.gc.delete(n),Hg(t))}function n1(t,e,n){for(const r of n)r instanceof Jb?(t.yc.addReference(r.key,e),HM(t,r)):r instanceof Zb?(ce("SyncEngine","Document no longer in limbo: "+r.key),t.yc.removeReference(r.key,e),t.yc.containsKey(r.key)||rk(t,r.key)):pe()}function HM(t,e){const n=e.key,r=n.path.canonicalString();t.mc.get(n)||t.wc.has(r)||(ce("SyncEngine","New document in limbo: "+n),t.wc.add(r),Hg(t))}function Hg(t){for(;t.wc.size>0&&t.mc.size{s.push(r.Rc(l,e,n).then(u=>{if((u||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(l.targetId,u!=null&&u.fromCache?"not-current":"current"),u){i.push(u);const f=Dg.Bi(l.targetId,u);o.push(f)}}))}),await Promise.all(s),r.fc.eu(i),await async function(a,l){const u=we(a);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>te.forEach(l,h=>te.forEach(h.$i,c=>u.persistence.referenceDelegate.addReference(f,h.targetId,c)).next(()=>te.forEach(h.Fi,c=>u.persistence.referenceDelegate.removeReference(f,h.targetId,c)))))}catch(f){if(!ol(f))throw f;ce("LocalStore","Failed to update sequence numbers: "+f)}for(const f of l){const h=f.targetId;if(!f.fromCache){const c=u.Hi.get(h),d=c.snapshotVersion,w=c.withLastLimboFreeSnapshotVersion(d);u.Hi=u.Hi.insert(h,w)}}}(r.localStore,o))}async function KM(t,e){const n=we(t);if(!n.currentUser.isEqual(e)){ce("SyncEngine","User change. New user:",e.toKey());const r=await Bb(n.localStore,e);n.currentUser=e,function(i,o){i.Tc.forEach(s=>{s.forEach(a=>{a.reject(new se(Y.CANCELLED,o))})}),i.Tc.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await ul(n,r.tr)}}function WM(t,e){const n=we(t),r=n.gc.get(e);if(r&&r.lc)return Se().add(r.key);{let i=Se();const o=n._c.get(e);if(!o)return i;for(const s of o){const a=n.dc.get(s);i=i.unionWith(a.view.ec)}return i}}function GM(t){const e=we(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=ek.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=WM.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=qM.bind(null,e),e.fc.eu=RM.bind(null,e.eventManager),e.fc.vc=PM.bind(null,e.eventManager),e}function QM(t){const e=we(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=VM.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=zM.bind(null,e),e}class r1{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=mf(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return rM(this.persistence,new tM,e.initialUser,this.serializer)}createPersistence(e){return new ZD(Lg.js,this.serializer)}createSharedClientState(e){return new cM}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class YM{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>t1(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=KM.bind(null,this.syncEngine),await AM(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new xM}createDatastore(e){const n=mf(e.databaseInfo.databaseId),r=(i=e.databaseInfo,new pM(i));var i;return function(o,s,a,l){return new vM(o,s,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return n=this.localStore,r=this.datastore,i=e.asyncQueue,o=a=>t1(this.syncEngine,a,0),s=J0.D()?new J0:new fM,new wM(n,r,i,o,s);var n,r,i,o,s}createSyncEngine(e,n){return function(r,i,o,s,a,l,u){const f=new $M(r,i,o,s,a,l);return u&&(f.Ac=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}terminate(){return async function(e){const n=we(e);ce("RemoteStore","RemoteStore shutting down."),n.Au.add(5),await ll(n),n.vu.shutdown(),n.Pu.set("Unknown")}(this.remoteStore)}}/** + */class Jb{constructor(e){this.key=e}}class Zb{constructor(e){this.key=e}}class LM{constructor(e,n){this.query=e,this.Ju=n,this.Yu=null,this.hasCachedResults=!1,this.current=!1,this.Xu=Se(),this.mutatedKeys=Se(),this.Zu=Eb(e),this.tc=new Co(this.Zu)}get ec(){return this.Ju}nc(e,n){const r=n?n.sc:new e1,i=n?n.tc:this.tc;let o=n?n.mutatedKeys:this.mutatedKeys,s=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,u=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((c,h)=>{const f=i.get(c),d=ff(this.query,h)?h:null,w=!!f&&this.mutatedKeys.has(f.key),v=!!d&&(d.hasLocalMutations||this.mutatedKeys.has(d.key)&&d.hasCommittedMutations);let E=!1;f&&d?f.data.isEqual(d.data)?w!==v&&(r.track({type:3,doc:d}),E=!0):this.ic(f,d)||(r.track({type:2,doc:d}),E=!0,(l&&this.Zu(d,l)>0||u&&this.Zu(d,u)<0)&&(a=!0)):!f&&d?(r.track({type:0,doc:d}),E=!0):f&&!d&&(r.track({type:1,doc:f}),E=!0,(l||u)&&(a=!0)),E&&(d?(s=s.add(d),o=v?o.add(c):o.delete(c)):(s=s.delete(c),o=o.delete(c)))}),this.query.limit!==null)for(;s.size>this.query.limit;){const c=this.query.limitType==="F"?s.last():s.first();s=s.delete(c.key),o=o.delete(c.key),r.track({type:1,doc:c})}return{tc:s,sc:r,ji:a,mutatedKeys:o}}ic(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r){const i=this.tc;this.tc=e.tc,this.mutatedKeys=e.mutatedKeys;const o=e.sc.Cu();o.sort((u,c)=>function(h,f){const d=w=>{switch(w){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return pe()}};return d(h)-d(f)}(u.type,c.type)||this.Zu(u.doc,c.doc)),this.rc(r);const s=n?this.oc():[],a=this.Xu.size===0&&this.current?1:0,l=a!==this.Yu;return this.Yu=a,o.length!==0||l?{snapshot:new Ko(this.query,e.tc,i,o,e.mutatedKeys,a===0,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),uc:s}:{uc:s}}ku(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tc:this.tc,sc:new e1,mutatedKeys:this.mutatedKeys,ji:!1},!1)):{uc:[]}}cc(e){return!this.Ju.has(e)&&!!this.tc.has(e)&&!this.tc.get(e).hasLocalMutations}rc(e){e&&(e.addedDocuments.forEach(n=>this.Ju=this.Ju.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.Ju=this.Ju.delete(n)),this.current=e.current)}oc(){if(!this.current)return[];const e=this.Xu;this.Xu=Se(),this.tc.forEach(r=>{this.cc(r.key)&&(this.Xu=this.Xu.add(r.key))});const n=[];return e.forEach(r=>{this.Xu.has(r)||n.push(new Zb(r))}),this.Xu.forEach(r=>{e.has(r)||n.push(new Jb(r))}),n}ac(e){this.Ju=e.sr,this.Xu=Se();const n=this.nc(e.documents);return this.applyChanges(n,!0)}hc(){return Ko.fromInitialDocuments(this.query,this.tc,this.mutatedKeys,this.Yu===0,this.hasCachedResults)}}class DM{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class MM{constructor(e){this.key=e,this.lc=!1}}class $M{constructor(e,n,r,i,o,s){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.fc={},this.dc=new as(a=>wb(a),cf),this._c=new Map,this.wc=new Set,this.mc=new We(fe.comparator),this.gc=new Map,this.yc=new Pg,this.Ic={},this.Tc=new Map,this.Ec=Ho.kn(),this.onlineState="Unknown",this.Ac=void 0}get isPrimaryClient(){return this.Ac===!0}}async function FM(t,e){const n=GM(t);let r,i;const o=n.dc.get(e);if(o)r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.hc();else{const s=await lM(n.localStore,vr(e)),a=n.sharedClientState.addLocalQueryTarget(s.targetId);r=s.targetId,i=await jM(n,e,r,a==="current",s.resumeToken),n.isPrimaryClient&&Hb(n.remoteStore,s)}return i}async function jM(t,e,n,r,i){t.Rc=(h,f,d)=>async function(w,v,E,m){let p=v.view.nc(E);p.ji&&(p=await Y0(w.localStore,v.query,!1).then(({documents:_})=>v.view.nc(_,p)));const y=m&&m.targetChanges.get(v.targetId),g=v.view.applyChanges(p,w.isPrimaryClient,y);return n1(w,v.targetId,g.uc),g.snapshot}(t,h,f,d);const o=await Y0(t.localStore,e,!0),s=new LM(e,o.sr),a=s.nc(o.documents),l=al.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),u=s.applyChanges(a,t.isPrimaryClient,l);n1(t,n,u.uc);const c=new DM(e,n,s);return t.dc.set(e,c),t._c.has(n)?t._c.get(n).push(e):t._c.set(n,[e]),u.snapshot}async function UM(t,e){const n=we(t),r=n.dc.get(e),i=n._c.get(r.targetId);if(i.length>1)return n._c.set(r.targetId,i.filter(o=>!cf(o,e))),void n.dc.delete(e);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Ap(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),Kb(n.remoteStore,r.targetId),Cp(n,r.targetId)}).catch(il)):(Cp(n,r.targetId),await Ap(n.localStore,r.targetId,!0))}async function BM(t,e,n){const r=QM(t);try{const i=await function(o,s){const a=we(o),l=st.now(),u=s.reduce((f,d)=>f.add(d.key),Se());let c,h;return a.persistence.runTransaction("Locally write mutations","readwrite",f=>{let d=yr(),w=Se();return a.Xi.getEntries(f,u).next(v=>{d=v,d.forEach((E,m)=>{m.isValidDocument()||(w=w.add(E))})}).next(()=>a.localDocuments.getOverlayedDocuments(f,d)).next(v=>{c=v;const E=[];for(const m of s){const p=pD(m,c.get(m.key).overlayedDocument);p!=null&&E.push(new ui(m.key,p,fb(p.value.mapValue),mn.exists(!0)))}return a.mutationQueue.addMutationBatch(f,l,E,s)}).next(v=>{h=v;const E=v.applyToLocalDocumentSet(c,w);return a.documentOverlayCache.saveOverlays(f,v.batchId,E)})}).then(()=>({batchId:h.batchId,changes:Tb(c)}))}(r.localStore,e);r.sharedClientState.addPendingMutation(i.batchId),function(o,s,a){let l=o.Ic[o.currentUser.toKey()];l||(l=new We(Ae)),l=l.insert(s,a),o.Ic[o.currentUser.toKey()]=l}(r,i.batchId,n),await ul(r,i.changes),await vf(r.remoteStore)}catch(i){const o=Ug(i,"Failed to persist write");n.reject(o)}}async function ek(t,e){const n=we(t);try{const r=await oM(n.localStore,e);e.targetChanges.forEach((i,o)=>{const s=n.gc.get(o);s&&(je(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?s.lc=!0:i.modifiedDocuments.size>0?je(s.lc):i.removedDocuments.size>0&&(je(s.lc),s.lc=!1))}),await ul(n,r,e)}catch(r){await il(r)}}function t1(t,e,n){const r=we(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.dc.forEach((o,s)=>{const a=s.view.ku(e);a.snapshot&&i.push(a.snapshot)}),function(o,s){const a=we(o);a.onlineState=s;let l=!1;a.queries.forEach((u,c)=>{for(const h of c.listeners)h.ku(s)&&(l=!0)}),l&&Vg(a)}(r.eventManager,e),i.length&&r.fc.eu(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function qM(t,e,n){const r=we(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.gc.get(e),o=i&&i.key;if(o){let s=new We(fe.comparator);s=s.insert(o,It.newNoDocument(o,ge.min()));const a=Se().add(o),l=new pf(ge.min(),new Map,new We(Ae),s,a);await ek(r,l),r.mc=r.mc.remove(o),r.gc.delete(e),Hg(r)}else await Ap(r.localStore,e,!1).then(()=>Cp(r,e,n)).catch(il)}async function VM(t,e){const n=we(t),r=e.batch.batchId;try{const i=await iM(n.localStore,e);nk(n,r,null),tk(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await ul(n,i)}catch(i){await il(i)}}async function zM(t,e,n){const r=we(t);try{const i=await function(o,s){const a=we(o);return a.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let u;return a.mutationQueue.lookupMutationBatch(l,s).next(c=>(je(c!==null),u=c.keys(),a.mutationQueue.removeMutationBatch(l,c))).next(()=>a.mutationQueue.performConsistencyCheck(l)).next(()=>a.documentOverlayCache.removeOverlaysForBatchId(l,u,s)).next(()=>a.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,u)).next(()=>a.localDocuments.getDocuments(l,u))})}(r.localStore,e);nk(r,e,n),tk(r,e),r.sharedClientState.updateMutationState(e,"rejected",n),await ul(r,i)}catch(i){await il(i)}}function tk(t,e){(t.Tc.get(e)||[]).forEach(n=>{n.resolve()}),t.Tc.delete(e)}function nk(t,e,n){const r=we(t);let i=r.Ic[r.currentUser.toKey()];if(i){const o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Ic[r.currentUser.toKey()]=i}}function Cp(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t._c.get(e))t.dc.delete(r),n&&t.fc.vc(r,n);t._c.delete(e),t.isPrimaryClient&&t.yc.ps(e).forEach(r=>{t.yc.containsKey(r)||rk(t,r)})}function rk(t,e){t.wc.delete(e.path.canonicalString());const n=t.mc.get(e);n!==null&&(Kb(t.remoteStore,n),t.mc=t.mc.remove(e),t.gc.delete(n),Hg(t))}function n1(t,e,n){for(const r of n)r instanceof Jb?(t.yc.addReference(r.key,e),HM(t,r)):r instanceof Zb?(ce("SyncEngine","Document no longer in limbo: "+r.key),t.yc.removeReference(r.key,e),t.yc.containsKey(r.key)||rk(t,r.key)):pe()}function HM(t,e){const n=e.key,r=n.path.canonicalString();t.mc.get(n)||t.wc.has(r)||(ce("SyncEngine","New document in limbo: "+n),t.wc.add(r),Hg(t))}function Hg(t){for(;t.wc.size>0&&t.mc.size{s.push(r.Rc(l,e,n).then(u=>{if((u||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(l.targetId,u!=null&&u.fromCache?"not-current":"current"),u){i.push(u);const c=Dg.Bi(l.targetId,u);o.push(c)}}))}),await Promise.all(s),r.fc.eu(i),await async function(a,l){const u=we(a);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",c=>te.forEach(l,h=>te.forEach(h.$i,f=>u.persistence.referenceDelegate.addReference(c,h.targetId,f)).next(()=>te.forEach(h.Fi,f=>u.persistence.referenceDelegate.removeReference(c,h.targetId,f)))))}catch(c){if(!ol(c))throw c;ce("LocalStore","Failed to update sequence numbers: "+c)}for(const c of l){const h=c.targetId;if(!c.fromCache){const f=u.Hi.get(h),d=f.snapshotVersion,w=f.withLastLimboFreeSnapshotVersion(d);u.Hi=u.Hi.insert(h,w)}}}(r.localStore,o))}async function KM(t,e){const n=we(t);if(!n.currentUser.isEqual(e)){ce("SyncEngine","User change. New user:",e.toKey());const r=await Bb(n.localStore,e);n.currentUser=e,function(i,o){i.Tc.forEach(s=>{s.forEach(a=>{a.reject(new se(Y.CANCELLED,o))})}),i.Tc.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await ul(n,r.tr)}}function WM(t,e){const n=we(t),r=n.gc.get(e);if(r&&r.lc)return Se().add(r.key);{let i=Se();const o=n._c.get(e);if(!o)return i;for(const s of o){const a=n.dc.get(s);i=i.unionWith(a.view.ec)}return i}}function GM(t){const e=we(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=ek.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=WM.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=qM.bind(null,e),e.fc.eu=RM.bind(null,e.eventManager),e.fc.vc=PM.bind(null,e.eventManager),e}function QM(t){const e=we(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=VM.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=zM.bind(null,e),e}class r1{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=mf(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return rM(this.persistence,new tM,e.initialUser,this.serializer)}createPersistence(e){return new ZD(Lg.js,this.serializer)}createSharedClientState(e){return new cM}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class YM{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>t1(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=KM.bind(null,this.syncEngine),await AM(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new xM}createDatastore(e){const n=mf(e.databaseInfo.databaseId),r=(i=e.databaseInfo,new pM(i));var i;return function(o,s,a,l){return new vM(o,s,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return n=this.localStore,r=this.datastore,i=e.asyncQueue,o=a=>t1(this.syncEngine,a,0),s=J0.D()?new J0:new fM,new wM(n,r,i,o,s);var n,r,i,o,s}createSyncEngine(e,n){return function(r,i,o,s,a,l,u){const c=new $M(r,i,o,s,a,l);return u&&(c.Ac=!0),c}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}terminate(){return async function(e){const n=we(e);ce("RemoteStore","RemoteStore shutting down."),n.Au.add(5),await ll(n),n.vu.shutdown(),n.Pu.set("Unknown")}(this.remoteStore)}}/** * @license * Copyright 2020 Google LLC * @@ -1717,7 +1717,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class XM{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=bt.UNAUTHENTICATED,this.clientId=lb.A(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async o=>{ce("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(ce("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new se(Y.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new lr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=Ug(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Lh(t,e){t.asyncQueue.verifyOperationInProgress(),ce("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await Bb(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function i1(t,e){t.asyncQueue.verifyOperationInProgress();const n=await ZM(t);ce("FirestoreClient","Initializing OnlineComponentProvider");const r=await t.getConfiguration();await e.initialize(n,r),t.setCredentialChangeListener(i=>Z0(e.remoteStore,i)),t.setAppCheckTokenChangeListener((i,o)=>Z0(e.remoteStore,o)),t._onlineComponents=e}function JM(t){return t.name==="FirebaseError"?t.code===Y.FAILED_PRECONDITION||t.code===Y.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function ZM(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ce("FirestoreClient","Using user provided OfflineComponentProvider");try{await Lh(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!JM(n))throw n;Bo("Error using user provided cache. Falling back to memory cache: "+n),await Lh(t,new r1)}}else ce("FirestoreClient","Using default OfflineComponentProvider"),await Lh(t,new r1);return t._offlineComponents}async function ik(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ce("FirestoreClient","Using user provided OnlineComponentProvider"),await i1(t,t._uninitializedComponentsProvider._online)):(ce("FirestoreClient","Using default OnlineComponentProvider"),await i1(t,new YM))),t._onlineComponents}function e$(t){return ik(t).then(e=>e.syncEngine)}async function oc(t){const e=await ik(t),n=e.eventManager;return n.onListen=FM.bind(null,e.syncEngine),n.onUnlisten=UM.bind(null,e.syncEngine),n}function t$(t,e,n={}){const r=new lr;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,s,a,l){const u=new Kg({next:h=>{o.enqueueAndForget(()=>qg(i,f));const c=h.docs.has(s);!c&&h.fromCache?l.reject(new se(Y.UNAVAILABLE,"Failed to get document because the client is offline.")):c&&h.fromCache&&a&&a.source==="server"?l.reject(new se(Y.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):l.resolve(h)},error:h=>l.reject(h)}),f=new zg(lf(s.path),u,{includeMetadataChanges:!0,Uu:!0});return Bg(i,f)}(await oc(t),t.asyncQueue,e,n,r)),r.promise}function n$(t,e,n={}){const r=new lr;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,s,a,l){const u=new Kg({next:h=>{o.enqueueAndForget(()=>qg(i,f)),h.fromCache&&a.source==="server"?l.reject(new se(Y.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),f=new zg(s,u,{includeMetadataChanges:!0,Uu:!0});return Bg(i,f)}(await oc(t),t.asyncQueue,e,n,r)),r.promise}/** + */class XM{constructor(e,n,r,i){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=bt.UNAUTHENTICATED,this.clientId=lb.A(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async o=>{ce("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(ce("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new se(Y.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new lr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=Ug(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Lh(t,e){t.asyncQueue.verifyOperationInProgress(),ce("FirestoreClient","Initializing OfflineComponentProvider");const n=await t.getConfiguration();await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await Bb(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function i1(t,e){t.asyncQueue.verifyOperationInProgress();const n=await ZM(t);ce("FirestoreClient","Initializing OnlineComponentProvider");const r=await t.getConfiguration();await e.initialize(n,r),t.setCredentialChangeListener(i=>Z0(e.remoteStore,i)),t.setAppCheckTokenChangeListener((i,o)=>Z0(e.remoteStore,o)),t._onlineComponents=e}function JM(t){return t.name==="FirebaseError"?t.code===Y.FAILED_PRECONDITION||t.code===Y.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}async function ZM(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){ce("FirestoreClient","Using user provided OfflineComponentProvider");try{await Lh(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!JM(n))throw n;Bo("Error using user provided cache. Falling back to memory cache: "+n),await Lh(t,new r1)}}else ce("FirestoreClient","Using default OfflineComponentProvider"),await Lh(t,new r1);return t._offlineComponents}async function ik(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(ce("FirestoreClient","Using user provided OnlineComponentProvider"),await i1(t,t._uninitializedComponentsProvider._online)):(ce("FirestoreClient","Using default OnlineComponentProvider"),await i1(t,new YM))),t._onlineComponents}function e$(t){return ik(t).then(e=>e.syncEngine)}async function oc(t){const e=await ik(t),n=e.eventManager;return n.onListen=FM.bind(null,e.syncEngine),n.onUnlisten=UM.bind(null,e.syncEngine),n}function t$(t,e,n={}){const r=new lr;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,s,a,l){const u=new Kg({next:h=>{o.enqueueAndForget(()=>qg(i,c));const f=h.docs.has(s);!f&&h.fromCache?l.reject(new se(Y.UNAVAILABLE,"Failed to get document because the client is offline.")):f&&h.fromCache&&a&&a.source==="server"?l.reject(new se(Y.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):l.resolve(h)},error:h=>l.reject(h)}),c=new zg(lf(s.path),u,{includeMetadataChanges:!0,Uu:!0});return Bg(i,c)}(await oc(t),t.asyncQueue,e,n,r)),r.promise}function n$(t,e,n={}){const r=new lr;return t.asyncQueue.enqueueAndForget(async()=>function(i,o,s,a,l){const u=new Kg({next:h=>{o.enqueueAndForget(()=>qg(i,c)),h.fromCache&&a.source==="server"?l.reject(new se(Y.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):l.resolve(h)},error:h=>l.reject(h)}),c=new zg(s,u,{includeMetadataChanges:!0,Uu:!0});return Bg(i,c)}(await oc(t),t.asyncQueue,e,n,r)),r.promise}/** * @license * Copyright 2020 Google LLC * @@ -1883,7 +1883,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const l$=/^__.*__$/;class u${constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new ui(e,this.data,this.fieldMask,n,this.fieldTransforms):new sl(e,this.data,n,this.fieldTransforms)}}class ak{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new ui(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function lk(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw pe()}}class Qg{constructor(e,n,r,i,o,s){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,o===void 0&&this.oa(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get ua(){return this.settings.ua}ca(e){return new Qg(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}aa(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.ca({path:r,ha:!1});return i.la(e),i}fa(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.ca({path:r,ha:!1});return i.oa(),i}da(e){return this.ca({path:void 0,ha:!0})}_a(e){return sc(e,this.settings.methodName,this.settings.wa||!1,this.path,this.settings.ma)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}oa(){if(this.path)for(let e=0;el.covers(h.field))}else l=null,u=s.fieldTransforms;return new u$(new Vt(a),l,u)}class Sf extends Wg{_toFieldTransform(e){if(e.ua!==2)throw e.ua===1?e._a(`${this._methodName}() can only appear at the top level of your update data`):e._a(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Sf}}function f$(t,e,n,r){const i=t.ga(1,e,n);Yg("Data must be an object, but it was:",i,r);const o=[],s=Vt.empty();Qi(r,(l,u)=>{const f=Xg(e,l,n);u=Qe(u);const h=i.fa(f);if(u instanceof Sf)o.push(f);else{const c=cl(u,h);c!=null&&(o.push(f),s.set(f,c))}});const a=new tn(o);return new ak(s,a,i.fieldTransforms)}function h$(t,e,n,r,i,o){const s=t.ga(1,e,n),a=[xp(e,r,n)],l=[i];if(o.length%2!=0)throw new se(Y.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let c=0;c=0;--c)if(!hk(u,a[c])){const d=a[c];let w=l[c];w=Qe(w);const v=s.fa(d);if(w instanceof Sf)u.push(d);else{const E=cl(w,v);E!=null&&(u.push(d),f.set(d,E))}}const h=new tn(u);return new ak(f,h,s.fieldTransforms)}function d$(t,e,n,r=!1){return cl(n,t.ga(r?4:3,e))}function cl(t,e){if(fk(t=Qe(t)))return Yg("Unsupported field value:",e,t),ck(t,e);if(t instanceof Wg)return function(n,r){if(!lk(r.ua))throw r._a(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r._a(`${n._methodName}() is not currently supported inside arrays`);const i=n._toFieldTransform(r);i&&r.fieldTransforms.push(i)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.ha&&e.ua!==4)throw e._a("Nested arrays are not supported");return function(n,r){const i=[];let o=0;for(const s of n){let a=cl(s,r.da(o));a==null&&(a={nullValue:"NULL_VALUE"}),i.push(a),o++}return{arrayValue:{values:i}}}(t,e)}return function(n,r){if((n=Qe(n))===null)return{nullValue:"NULL_VALUE"};if(typeof n=="number")return lD(r.serializer,n);if(typeof n=="boolean")return{booleanValue:n};if(typeof n=="string")return{stringValue:n};if(n instanceof Date){const i=st.fromDate(n);return{timestampValue:rc(r.serializer,i)}}if(n instanceof st){const i=new st(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:rc(r.serializer,i)}}if(n instanceof Gg)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof Wo)return{bytesValue:Db(r.serializer,n._byteString)};if(n instanceof xt){const i=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(i))throw r._a(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:Rg(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r._a(`Unsupported field value: ${yf(n)}`)}(t,e)}function ck(t,e){const n={};return ub(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Qi(t,(r,i)=>{const o=cl(i,e.aa(r));o!=null&&(n[r]=o)}),{mapValue:{fields:n}}}function fk(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof st||t instanceof Gg||t instanceof Wo||t instanceof xt||t instanceof Wg)}function Yg(t,e,n){if(!fk(n)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(n)){const r=yf(n);throw r==="an object"?e._a(t+" a custom object"):e._a(t+" "+r)}}function xp(t,e,n){if((e=Qe(e))instanceof _f)return e._internalPath;if(typeof e=="string")return Xg(t,e);throw sc("Field path arguments must be of type string or ",t,!1,void 0,n)}const p$=new RegExp("[~\\*/\\[\\]]");function Xg(t,e,n){if(e.search(p$)>=0)throw sc(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new _f(...e.split("."))._internalPath}catch{throw sc(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function sc(t,e,n,r,i){const o=r&&!r.isEmpty(),s=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new se(Y.INVALID_ARGUMENT,a+t+l)}function hk(t,e){return t.some(n=>n.isEqual(e))}/** + */const l$=/^__.*__$/;class u${constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return this.fieldMask!==null?new ui(e,this.data,this.fieldMask,n,this.fieldTransforms):new sl(e,this.data,n,this.fieldTransforms)}}class ak{constructor(e,n,r){this.data=e,this.fieldMask=n,this.fieldTransforms=r}toMutation(e,n){return new ui(e,this.data,this.fieldMask,n,this.fieldTransforms)}}function lk(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw pe()}}class Qg{constructor(e,n,r,i,o,s){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,o===void 0&&this.oa(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get ua(){return this.settings.ua}ca(e){return new Qg(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}aa(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.ca({path:r,ha:!1});return i.la(e),i}fa(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.ca({path:r,ha:!1});return i.oa(),i}da(e){return this.ca({path:void 0,ha:!0})}_a(e){return sc(e,this.settings.methodName,this.settings.wa||!1,this.path,this.settings.ma)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}oa(){if(this.path)for(let e=0;el.covers(h.field))}else l=null,u=s.fieldTransforms;return new u$(new Vt(a),l,u)}class Sf extends Wg{_toFieldTransform(e){if(e.ua!==2)throw e.ua===1?e._a(`${this._methodName}() can only appear at the top level of your update data`):e._a(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Sf}}function f$(t,e,n,r){const i=t.ga(1,e,n);Yg("Data must be an object, but it was:",i,r);const o=[],s=Vt.empty();Qi(r,(l,u)=>{const c=Xg(e,l,n);u=Qe(u);const h=i.fa(c);if(u instanceof Sf)o.push(c);else{const f=cl(u,h);f!=null&&(o.push(c),s.set(c,f))}});const a=new tn(o);return new ak(s,a,i.fieldTransforms)}function h$(t,e,n,r,i,o){const s=t.ga(1,e,n),a=[xp(e,r,n)],l=[i];if(o.length%2!=0)throw new se(Y.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let f=0;f=0;--f)if(!hk(u,a[f])){const d=a[f];let w=l[f];w=Qe(w);const v=s.fa(d);if(w instanceof Sf)u.push(d);else{const E=cl(w,v);E!=null&&(u.push(d),c.set(d,E))}}const h=new tn(u);return new ak(c,h,s.fieldTransforms)}function d$(t,e,n,r=!1){return cl(n,t.ga(r?4:3,e))}function cl(t,e){if(fk(t=Qe(t)))return Yg("Unsupported field value:",e,t),ck(t,e);if(t instanceof Wg)return function(n,r){if(!lk(r.ua))throw r._a(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r._a(`${n._methodName}() is not currently supported inside arrays`);const i=n._toFieldTransform(r);i&&r.fieldTransforms.push(i)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.ha&&e.ua!==4)throw e._a("Nested arrays are not supported");return function(n,r){const i=[];let o=0;for(const s of n){let a=cl(s,r.da(o));a==null&&(a={nullValue:"NULL_VALUE"}),i.push(a),o++}return{arrayValue:{values:i}}}(t,e)}return function(n,r){if((n=Qe(n))===null)return{nullValue:"NULL_VALUE"};if(typeof n=="number")return lD(r.serializer,n);if(typeof n=="boolean")return{booleanValue:n};if(typeof n=="string")return{stringValue:n};if(n instanceof Date){const i=st.fromDate(n);return{timestampValue:rc(r.serializer,i)}}if(n instanceof st){const i=new st(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:rc(r.serializer,i)}}if(n instanceof Gg)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof Wo)return{bytesValue:Db(r.serializer,n._byteString)};if(n instanceof xt){const i=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(i))throw r._a(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:Rg(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r._a(`Unsupported field value: ${yf(n)}`)}(t,e)}function ck(t,e){const n={};return ub(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Qi(t,(r,i)=>{const o=cl(i,e.aa(r));o!=null&&(n[r]=o)}),{mapValue:{fields:n}}}function fk(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof st||t instanceof Gg||t instanceof Wo||t instanceof xt||t instanceof Wg)}function Yg(t,e,n){if(!fk(n)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(n)){const r=yf(n);throw r==="an object"?e._a(t+" a custom object"):e._a(t+" "+r)}}function xp(t,e,n){if((e=Qe(e))instanceof _f)return e._internalPath;if(typeof e=="string")return Xg(t,e);throw sc("Field path arguments must be of type string or ",t,!1,void 0,n)}const p$=new RegExp("[~\\*/\\[\\]]");function Xg(t,e,n){if(e.search(p$)>=0)throw sc(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new _f(...e.split("."))._internalPath}catch{throw sc(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function sc(t,e,n,r,i){const o=r&&!r.isEmpty(),s=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new se(Y.INVALID_ARGUMENT,a+t+l)}function hk(t,e){return t.some(n=>n.isEqual(e))}/** * @license * Copyright 2020 Google LLC * @@ -1913,7 +1913,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function pk(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new se(Y.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Zg{}class ev extends Zg{}function g$(t,e,...n){let r=[];e instanceof Zg&&r.push(e),r=r.concat(n),function(i){const o=i.filter(a=>a instanceof nv).length,s=i.filter(a=>a instanceof tv).length;if(o>1||o>0&&s>0)throw new se(Y.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class tv extends ev{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new tv(e,n,r)}_apply(e){const n=this._parse(e);return mk(e._query,n),new Sr(e.firestore,e.converter,Sp(e._query,n))}_parse(e){const n=Tf(e.firestore);return function(i,o,s,a,l,u,f){let h;if(l.isKeyField()){if(u==="array-contains"||u==="array-contains-any")throw new se(Y.INVALID_ARGUMENT,`Invalid Query. You can't perform '${u}' queries on documentId().`);if(u==="in"||u==="not-in"){f1(f,u);const c=[];for(const d of f)c.push(c1(a,i,d));h={arrayValue:{values:c}}}else h=c1(a,i,f)}else u!=="in"&&u!=="not-in"&&u!=="array-contains-any"||f1(f,u),h=d$(s,o,f,u==="in"||u==="not-in");return nt.create(l,u,h)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}class nv extends Zg{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new nv(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:Rn.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(r,i){let o=r;const s=i.getFlattenedFilters();for(const a of s)mk(o,a),o=Sp(o,a)}(e._query,n),new Sr(e.firestore,e.converter,Sp(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class rv extends ev{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new rv(e,n)}_apply(e){const n=function(r,i,o){if(r.startAt!==null)throw new se(Y.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(r.endAt!==null)throw new se(Y.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const s=new Oo(i,o);return function(a,l){if(Ng(a)===null){const u=uf(a);u!==null&&gk(a,u,l.field)}}(r,s),s}(e._query,this._field,this._direction);return new Sr(e.firestore,e.converter,function(r,i){const o=r.explicitOrderBy.concat([i]);return new ss(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(e._query,n))}}function v$(t,e="asc"){const n=e,r=Jg("orderBy",t);return rv._create(r,n)}class iv extends ev{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new iv(e,n,r)}_apply(e){return new Sr(e.firestore,e.converter,ec(e._query,this._limit,this._limitType))}}function y$(t){return i$("limit",t),iv._create("limit",t,"F")}function c1(t,e,n){if(typeof(n=Qe(n))=="string"){if(n==="")throw new se(Y.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!yb(e)&&n.indexOf("/")!==-1)throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child($e.fromString(n));if(!fe.isDocumentKey(r))throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return P0(t,new fe(r))}if(n instanceof xt)return P0(t,n._key);throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${yf(n)}.`)}function f1(t,e){if(!Array.isArray(t)||t.length===0)throw new se(Y.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function mk(t,e){if(e.isInequality()){const r=uf(t),i=e.field;if(r!==null&&!r.isEqual(i))throw new se(Y.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${r.toString()}' and '${i.toString()}'`);const o=Ng(t);o!==null&&gk(t,i,o)}const n=function(r,i){for(const o of r)for(const s of o.getFlattenedFilters())if(i.indexOf(s.op)>=0)return s.op;return null}(t.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}function gk(t,e,n){if(!n.isEqual(e))throw new se(Y.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}class w${convertValue(e,n="none"){switch(Mi(e)){case 0:return null;case 1:return e.booleanValue;case 2:return et(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Di(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw pe()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Qi(e,(i,o)=>{r[i]=this.convertValue(o,n)}),r}convertGeoPoint(e){return new Gg(et(e.latitude),et(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Sg(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Ra(e));default:return null}}convertTimestamp(e){const n=ti(e);return new st(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=$e.fromString(e);je(Ub(r));const i=new Pa(r.get(1),r.get(3)),o=new fe(r.popFirst(5));return i.isEqual(n)||gr(`Document ${o} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),o}}/** + */function pk(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new se(Y.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Zg{}class ev extends Zg{}function g$(t,e,...n){let r=[];e instanceof Zg&&r.push(e),r=r.concat(n),function(i){const o=i.filter(a=>a instanceof nv).length,s=i.filter(a=>a instanceof tv).length;if(o>1||o>0&&s>0)throw new se(Y.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class tv extends ev{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new tv(e,n,r)}_apply(e){const n=this._parse(e);return mk(e._query,n),new Sr(e.firestore,e.converter,Sp(e._query,n))}_parse(e){const n=Tf(e.firestore);return function(i,o,s,a,l,u,c){let h;if(l.isKeyField()){if(u==="array-contains"||u==="array-contains-any")throw new se(Y.INVALID_ARGUMENT,`Invalid Query. You can't perform '${u}' queries on documentId().`);if(u==="in"||u==="not-in"){f1(c,u);const f=[];for(const d of c)f.push(c1(a,i,d));h={arrayValue:{values:f}}}else h=c1(a,i,c)}else u!=="in"&&u!=="not-in"&&u!=="array-contains-any"||f1(c,u),h=d$(s,o,c,u==="in"||u==="not-in");return nt.create(l,u,h)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}class nv extends Zg{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new nv(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:Rn.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(r,i){let o=r;const s=i.getFlattenedFilters();for(const a of s)mk(o,a),o=Sp(o,a)}(e._query,n),new Sr(e.firestore,e.converter,Sp(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class rv extends ev{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new rv(e,n)}_apply(e){const n=function(r,i,o){if(r.startAt!==null)throw new se(Y.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(r.endAt!==null)throw new se(Y.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const s=new Oo(i,o);return function(a,l){if(Ng(a)===null){const u=uf(a);u!==null&&gk(a,u,l.field)}}(r,s),s}(e._query,this._field,this._direction);return new Sr(e.firestore,e.converter,function(r,i){const o=r.explicitOrderBy.concat([i]);return new ss(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(e._query,n))}}function v$(t,e="asc"){const n=e,r=Jg("orderBy",t);return rv._create(r,n)}class iv extends ev{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new iv(e,n,r)}_apply(e){return new Sr(e.firestore,e.converter,ec(e._query,this._limit,this._limitType))}}function y$(t){return i$("limit",t),iv._create("limit",t,"F")}function c1(t,e,n){if(typeof(n=Qe(n))=="string"){if(n==="")throw new se(Y.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!yb(e)&&n.indexOf("/")!==-1)throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child($e.fromString(n));if(!fe.isDocumentKey(r))throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return P0(t,new fe(r))}if(n instanceof xt)return P0(t,n._key);throw new se(Y.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${yf(n)}.`)}function f1(t,e){if(!Array.isArray(t)||t.length===0)throw new se(Y.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function mk(t,e){if(e.isInequality()){const r=uf(t),i=e.field;if(r!==null&&!r.isEqual(i))throw new se(Y.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${r.toString()}' and '${i.toString()}'`);const o=Ng(t);o!==null&&gk(t,i,o)}const n=function(r,i){for(const o of r)for(const s of o.getFlattenedFilters())if(i.indexOf(s.op)>=0)return s.op;return null}(t.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new se(Y.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}function gk(t,e,n){if(!n.isEqual(e))throw new se(Y.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}class w${convertValue(e,n="none"){switch(Mi(e)){case 0:return null;case 1:return e.booleanValue;case 2:return et(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Di(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw pe()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Qi(e,(i,o)=>{r[i]=this.convertValue(o,n)}),r}convertGeoPoint(e){return new Gg(et(e.latitude),et(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=Sg(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Ra(e));default:return null}}convertTimestamp(e){const n=ti(e);return new st(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=$e.fromString(e);je(Ub(r));const i=new Pa(r.get(1),r.get(3)),o=new fe(r.popFirst(5));return i.isEqual(n)||gr(`Document ${o} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),o}}/** * @license * Copyright 2020 Google LLC * @@ -1958,7 +1958,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function ov(t){t=Qt(t,xt);const e=Qt(t.firestore,wr);return t$(Ef(e),t._key).then(n=>_k(e,t,n))}class sv extends w${constructor(e){super(),this.firestore=e}convertBytes(e){return new Wo(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new xt(this.firestore,null,n)}}function $a(t){t=Qt(t,Sr);const e=Qt(t.firestore,wr),n=Ef(e),r=new sv(e);return pk(t._query),n$(n,t._query).then(i=>new wk(e,r,t,i))}function _$(t,e,n){t=Qt(t,xt);const r=Qt(t.firestore,wr),i=vk(t.converter,e,n);return bf(r,[uk(Tf(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,mn.none())])}function T$(t,e,n,...r){t=Qt(t,xt);const i=Qt(t.firestore,wr),o=Tf(i);let s;return s=typeof(e=Qe(e))=="string"||e instanceof _f?h$(o,"updateDoc",t._key,e,n,r):f$(o,"updateDoc",t._key,e),bf(i,[s.toMutation(t._key,mn.exists(!0))])}function h1(t){return bf(Qt(t.firestore,wr),[new Og(t._key,mn.none())])}function Ek(t,e){const n=Qt(t.firestore,wr),r=ri(t),i=vk(t.converter,e);return bf(n,[uk(Tf(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,mn.exists(!1))]).then(()=>r)}function S$(t,...e){var n,r,i;t=Qe(t);let o={includeMetadataChanges:!1},s=0;typeof e[s]!="object"||u1(e[s])||(o=e[s],s++);const a={includeMetadataChanges:o.includeMetadataChanges};if(u1(e[s])){const h=e[s];e[s]=(n=h.next)===null||n===void 0?void 0:n.bind(h),e[s+1]=(r=h.error)===null||r===void 0?void 0:r.bind(h),e[s+2]=(i=h.complete)===null||i===void 0?void 0:i.bind(h)}let l,u,f;if(t instanceof xt)u=Qt(t.firestore,wr),f=lf(t._key.path),l={next:h=>{e[s]&&e[s](_k(u,t,h))},error:e[s+1],complete:e[s+2]};else{const h=Qt(t,Sr);u=Qt(h.firestore,wr),f=h._query;const c=new sv(u);l={next:d=>{e[s]&&e[s](new wk(u,c,h,d))},error:e[s+1],complete:e[s+2]},pk(t._query)}return function(h,c,d,w){const v=new Kg(w),E=new zg(c,v,d);return h.asyncQueue.enqueueAndForget(async()=>Bg(await oc(h),E)),()=>{v.Sc(),h.asyncQueue.enqueueAndForget(async()=>qg(await oc(h),E))}}(Ef(u),f,a,l)}function bf(t,e){return function(n,r){const i=new lr;return n.asyncQueue.enqueueAndForget(async()=>BM(await e$(n),r,i)),i.promise}(Ef(t),e)}function _k(t,e,n){const r=n.docs.get(e._key),i=new sv(t);return new yk(t,i,e._key,r,new qs(n.hasPendingWrites,n.fromCache),e.converter)}(function(t,e=!0){(function(n){os=n})(ns),Kn(new Cn("firestore",(n,{instanceIdentifier:r,options:i})=>{const o=n.getProvider("app").getImmediate(),s=new wr(new OL(n.getProvider("auth-internal")),new RL(n.getProvider("app-check-internal")),function(a,l){if(!Object.prototype.hasOwnProperty.apply(a.options,["projectId"]))throw new se(Y.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Pa(a.options.projectId,l)}(o,r),o);return i=Object.assign({useFetchStreams:e},i),s._setSettings(i),s},"PUBLIC").setMultipleInstances(!0)),pn(O0,"3.11.0",t),pn(O0,"3.11.0","esm2017")})();var b$="firebase",k$="9.21.0";/** + */function ov(t){t=Qt(t,xt);const e=Qt(t.firestore,wr);return t$(Ef(e),t._key).then(n=>_k(e,t,n))}class sv extends w${constructor(e){super(),this.firestore=e}convertBytes(e){return new Wo(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new xt(this.firestore,null,n)}}function $a(t){t=Qt(t,Sr);const e=Qt(t.firestore,wr),n=Ef(e),r=new sv(e);return pk(t._query),n$(n,t._query).then(i=>new wk(e,r,t,i))}function _$(t,e,n){t=Qt(t,xt);const r=Qt(t.firestore,wr),i=vk(t.converter,e,n);return bf(r,[uk(Tf(r),"setDoc",t._key,i,t.converter!==null,n).toMutation(t._key,mn.none())])}function T$(t,e,n,...r){t=Qt(t,xt);const i=Qt(t.firestore,wr),o=Tf(i);let s;return s=typeof(e=Qe(e))=="string"||e instanceof _f?h$(o,"updateDoc",t._key,e,n,r):f$(o,"updateDoc",t._key,e),bf(i,[s.toMutation(t._key,mn.exists(!0))])}function h1(t){return bf(Qt(t.firestore,wr),[new Og(t._key,mn.none())])}function Ek(t,e){const n=Qt(t.firestore,wr),r=ri(t),i=vk(t.converter,e);return bf(n,[uk(Tf(t.firestore),"addDoc",r._key,i,t.converter!==null,{}).toMutation(r._key,mn.exists(!1))]).then(()=>r)}function S$(t,...e){var n,r,i;t=Qe(t);let o={includeMetadataChanges:!1},s=0;typeof e[s]!="object"||u1(e[s])||(o=e[s],s++);const a={includeMetadataChanges:o.includeMetadataChanges};if(u1(e[s])){const h=e[s];e[s]=(n=h.next)===null||n===void 0?void 0:n.bind(h),e[s+1]=(r=h.error)===null||r===void 0?void 0:r.bind(h),e[s+2]=(i=h.complete)===null||i===void 0?void 0:i.bind(h)}let l,u,c;if(t instanceof xt)u=Qt(t.firestore,wr),c=lf(t._key.path),l={next:h=>{e[s]&&e[s](_k(u,t,h))},error:e[s+1],complete:e[s+2]};else{const h=Qt(t,Sr);u=Qt(h.firestore,wr),c=h._query;const f=new sv(u);l={next:d=>{e[s]&&e[s](new wk(u,f,h,d))},error:e[s+1],complete:e[s+2]},pk(t._query)}return function(h,f,d,w){const v=new Kg(w),E=new zg(f,v,d);return h.asyncQueue.enqueueAndForget(async()=>Bg(await oc(h),E)),()=>{v.Sc(),h.asyncQueue.enqueueAndForget(async()=>qg(await oc(h),E))}}(Ef(u),c,a,l)}function bf(t,e){return function(n,r){const i=new lr;return n.asyncQueue.enqueueAndForget(async()=>BM(await e$(n),r,i)),i.promise}(Ef(t),e)}function _k(t,e,n){const r=n.docs.get(e._key),i=new sv(t);return new yk(t,i,e._key,r,new qs(n.hasPendingWrites,n.fromCache),e.converter)}(function(t,e=!0){(function(n){os=n})(ns),Kn(new Cn("firestore",(n,{instanceIdentifier:r,options:i})=>{const o=n.getProvider("app").getImmediate(),s=new wr(new OL(n.getProvider("auth-internal")),new RL(n.getProvider("app-check-internal")),function(a,l){if(!Object.prototype.hasOwnProperty.apply(a.options,["projectId"]))throw new se(Y.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Pa(a.options.projectId,l)}(o,r),o);return i=Object.assign({useFetchStreams:e},i),s._setSettings(i),s},"PUBLIC").setMultipleInstances(!0)),pn(O0,"3.11.0",t),pn(O0,"3.11.0","esm2017")})();var b$="firebase",k$="9.21.0";/** * @license * Copyright 2020 Google LLC * @@ -2288,7 +2288,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function N4(t){if(!t.startsWith(hv)){const e=rn.create("invalid-gtag-resource",{gtagURL:t});return Yt.warn(e.message),""}return t}function qk(t){return Promise.all(t.map(e=>e.catch(n=>n)))}function O4(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}function A4(t,e){const n=O4("firebase-js-sdk-policy",{createScriptURL:N4}),r=document.createElement("script"),i=`${hv}?l=${t}&id=${e}`;r.src=n?n==null?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function C4(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function x4(t,e,n,r,i,o){const s=r[i];try{if(s)await e[s];else{const l=(await qk(n)).find(u=>u.measurementId===i);l&&await e[l.appId]}}catch(a){Yt.error(a)}t("config",i,o)}async function R4(t,e,n,r,i){try{let o=[];if(i&&i.send_to){let s=i.send_to;Array.isArray(s)||(s=[s]);const a=await qk(n);for(const l of s){const u=a.find(h=>h.measurementId===l),f=u&&e[u.appId];if(f)o.push(f);else{o=[];break}}}o.length===0&&(o=Object.values(e)),await Promise.all(o),t("event",r,i||{})}catch(o){Yt.error(o)}}function P4(t,e,n,r){async function i(o,...s){try{if(o==="event"){const[a,l]=s;await R4(t,e,n,a,l)}else if(o==="config"){const[a,l]=s;await x4(t,e,n,r,a,l)}else if(o==="consent"){const[a]=s;t("consent","update",a)}else if(o==="get"){const[a,l,u]=s;t("get",a,l,u)}else if(o==="set"){const[a]=s;t("set",a)}else t(o,...s)}catch(a){Yt.error(a)}}return i}function L4(t,e,n,r,i){let o=function(...s){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(o=window[i]),window[i]=P4(o,t,e,n),{gtagCore:o,wrappedGtag:window[i]}}function D4(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(hv)&&n.src.includes(t))return n;return null}/** + */function N4(t){if(!t.startsWith(hv)){const e=rn.create("invalid-gtag-resource",{gtagURL:t});return Yt.warn(e.message),""}return t}function qk(t){return Promise.all(t.map(e=>e.catch(n=>n)))}function O4(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}function A4(t,e){const n=O4("firebase-js-sdk-policy",{createScriptURL:N4}),r=document.createElement("script"),i=`${hv}?l=${t}&id=${e}`;r.src=n?n==null?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function C4(t){let e=[];return Array.isArray(window[t])?e=window[t]:window[t]=e,e}async function x4(t,e,n,r,i,o){const s=r[i];try{if(s)await e[s];else{const l=(await qk(n)).find(u=>u.measurementId===i);l&&await e[l.appId]}}catch(a){Yt.error(a)}t("config",i,o)}async function R4(t,e,n,r,i){try{let o=[];if(i&&i.send_to){let s=i.send_to;Array.isArray(s)||(s=[s]);const a=await qk(n);for(const l of s){const u=a.find(h=>h.measurementId===l),c=u&&e[u.appId];if(c)o.push(c);else{o=[];break}}}o.length===0&&(o=Object.values(e)),await Promise.all(o),t("event",r,i||{})}catch(o){Yt.error(o)}}function P4(t,e,n,r){async function i(o,...s){try{if(o==="event"){const[a,l]=s;await R4(t,e,n,a,l)}else if(o==="config"){const[a,l]=s;await x4(t,e,n,r,a,l)}else if(o==="consent"){const[a]=s;t("consent","update",a)}else if(o==="get"){const[a,l,u]=s;t("get",a,l,u)}else if(o==="set"){const[a]=s;t("set",a)}else t(o,...s)}catch(a){Yt.error(a)}}return i}function L4(t,e,n,r,i){let o=function(...s){window[r].push(arguments)};return window[i]&&typeof window[i]=="function"&&(o=window[i]),window[i]=P4(o,t,e,n),{gtagCore:o,wrappedGtag:window[i]}}function D4(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(hv)&&n.src.includes(t))return n;return null}/** * @license * Copyright 2020 Google LLC * @@ -2303,7 +2303,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const M4=30,$4=1e3;class F4{constructor(e={},n=$4){this.throttleMetadata=e,this.intervalMillis=n}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,n){this.throttleMetadata[e]=n}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const Vk=new F4;function j4(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function U4(t){var e;const{appId:n,apiKey:r}=t,i={method:"GET",headers:j4(r)},o=k4.replace("{app-id}",n),s=await fetch(o,i);if(s.status!==200&&s.status!==304){let a="";try{const l=await s.json();!((e=l.error)===null||e===void 0)&&e.message&&(a=l.error.message)}catch{}throw rn.create("config-fetch-failed",{httpStatus:s.status,responseMessage:a})}return s.json()}async function B4(t,e=Vk,n){const{appId:r,apiKey:i,measurementId:o}=t.options;if(!r)throw rn.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:r};throw rn.create("no-api-key")}const s=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new z4;return setTimeout(async()=>{a.abort()},n!==void 0?n:b4),zk({appId:r,apiKey:i,measurementId:o},s,a,e)}async function zk(t,{throttleEndTimeMillis:e,backoffCount:n},r,i=Vk){var o;const{appId:s,measurementId:a}=t;try{await q4(r,e)}catch(l){if(a)return Yt.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:s,measurementId:a};throw l}try{const l=await U4(t);return i.deleteThrottleMetadata(s),l}catch(l){const u=l;if(!V4(u)){if(i.deleteThrottleMetadata(s),a)return Yt.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${u==null?void 0:u.message}]`),{appId:s,measurementId:a};throw l}const f=Number((o=u==null?void 0:u.customData)===null||o===void 0?void 0:o.httpStatus)===503?o0(n,i.intervalMillis,M4):o0(n,i.intervalMillis),h={throttleEndTimeMillis:Date.now()+f,backoffCount:n+1};return i.setThrottleMetadata(s,h),Yt.debug(`Calling attemptFetch again in ${f} millis`),zk(t,h,r,i)}}function q4(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(o),r(rn.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function V4(t){if(!(t instanceof Pn)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class z4{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function H4(t,e,n,r,i){if(i&&i.global){t("event",n,r);return}else{const o=await e,s=Object.assign(Object.assign({},r),{send_to:o});t("event",n,s)}}/** + */const M4=30,$4=1e3;class F4{constructor(e={},n=$4){this.throttleMetadata=e,this.intervalMillis=n}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,n){this.throttleMetadata[e]=n}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}const Vk=new F4;function j4(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function U4(t){var e;const{appId:n,apiKey:r}=t,i={method:"GET",headers:j4(r)},o=k4.replace("{app-id}",n),s=await fetch(o,i);if(s.status!==200&&s.status!==304){let a="";try{const l=await s.json();!((e=l.error)===null||e===void 0)&&e.message&&(a=l.error.message)}catch{}throw rn.create("config-fetch-failed",{httpStatus:s.status,responseMessage:a})}return s.json()}async function B4(t,e=Vk,n){const{appId:r,apiKey:i,measurementId:o}=t.options;if(!r)throw rn.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:r};throw rn.create("no-api-key")}const s=e.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new z4;return setTimeout(async()=>{a.abort()},n!==void 0?n:b4),zk({appId:r,apiKey:i,measurementId:o},s,a,e)}async function zk(t,{throttleEndTimeMillis:e,backoffCount:n},r,i=Vk){var o;const{appId:s,measurementId:a}=t;try{await q4(r,e)}catch(l){if(a)return Yt.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:s,measurementId:a};throw l}try{const l=await U4(t);return i.deleteThrottleMetadata(s),l}catch(l){const u=l;if(!V4(u)){if(i.deleteThrottleMetadata(s),a)return Yt.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${u==null?void 0:u.message}]`),{appId:s,measurementId:a};throw l}const c=Number((o=u==null?void 0:u.customData)===null||o===void 0?void 0:o.httpStatus)===503?o0(n,i.intervalMillis,M4):o0(n,i.intervalMillis),h={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return i.setThrottleMetadata(s,h),Yt.debug(`Calling attemptFetch again in ${c} millis`),zk(t,h,r,i)}}function q4(t,e){return new Promise((n,r)=>{const i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener(()=>{clearTimeout(o),r(rn.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}function V4(t){if(!(t instanceof Pn)||!t.customData)return!1;const e=Number(t.customData.httpStatus);return e===429||e===500||e===503||e===504}class z4{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function H4(t,e,n,r,i){if(i&&i.global){t("event",n,r);return}else{const o=await e,s=Object.assign(Object.assign({},r),{send_to:o});t("event",n,s)}}/** * @license * Copyright 2020 Google LLC * @@ -2318,7 +2318,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function K4(){if(YT())try{await XT()}catch(t){return Yt.warn(rn.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return Yt.warn(rn.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function W4(t,e,n,r,i,o,s){var a;const l=B4(t);l.then(d=>{n[d.measurementId]=d.appId,t.options.measurementId&&d.measurementId!==t.options.measurementId&&Yt.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${d.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(d=>Yt.error(d)),e.push(l);const u=K4().then(d=>{if(d)return r.getId()}),[f,h]=await Promise.all([l,u]);D4(o)||A4(o,f.measurementId),i("js",new Date);const c=(a=s==null?void 0:s.config)!==null&&a!==void 0?a:{};return c[S4]="firebase",c.update=!0,h!=null&&(c[T4]=h),i("config",f.measurementId,c),f.measurementId}/** + */async function K4(){if(YT())try{await XT()}catch(t){return Yt.warn(rn.create("indexeddb-unavailable",{errorInfo:t==null?void 0:t.toString()}).message),!1}else return Yt.warn(rn.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function W4(t,e,n,r,i,o,s){var a;const l=B4(t);l.then(d=>{n[d.measurementId]=d.appId,t.options.measurementId&&d.measurementId!==t.options.measurementId&&Yt.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${d.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(d=>Yt.error(d)),e.push(l);const u=K4().then(d=>{if(d)return r.getId()}),[c,h]=await Promise.all([l,u]);D4(o)||A4(o,c.measurementId),i("js",new Date);const f=(a=s==null?void 0:s.config)!==null&&a!==void 0?a:{};return f[S4]="firebase",f.update=!0,h!=null&&(f[T4]=h),i("config",c.measurementId,f),c.measurementId}/** * @license * Copyright 2019 Google LLC * @@ -2468,7 +2468,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const u3=new fl(3e4,6e4);function us(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function Xi(t,e,n,r,i={}){return Yk(t,i,async()=>{let o={},s={};r&&(e==="GET"?s=r:o={body:JSON.stringify(r)});const a=Ga(Object.assign({key:t.config.apiKey},s)).slice(1),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode),Qk.fetch()(Xk(t,t.config.apiHost,n,a),Object.assign({method:e,headers:l,referrerPolicy:"no-referrer"},o))})}async function Yk(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},l3),e);try{const i=new c3(t),o=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const s=await o.json();if("needConfirmation"in s)throw Vl(t,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{const a=o.ok?s.errorMessage:s.error.message,[l,u]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Vl(t,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw Vl(t,"email-already-in-use",s);if(l==="USER_DISABLED")throw Vl(t,"user-disabled",s);const f=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw Gk(t,f,u);yn(t,f)}}catch(i){if(i instanceof Pn)throw i;yn(t,"network-request-failed",{message:String(i)})}}async function hl(t,e,n,r,i={}){const o=await Xi(t,e,n,r,i);return"mfaPendingCredential"in o&&yn(t,"multi-factor-auth-required",{_serverResponse:o}),o}function Xk(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?mv(t.config,i):`${t.config.apiScheme}://${i}`}class c3{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Vn(this.auth,"network-request-failed")),u3.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Vl(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Vn(t,e,r);return i.customData._tokenResponse=n,i}/** + */const u3=new fl(3e4,6e4);function us(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function Xi(t,e,n,r,i={}){return Yk(t,i,async()=>{let o={},s={};r&&(e==="GET"?s=r:o={body:JSON.stringify(r)});const a=Ga(Object.assign({key:t.config.apiKey},s)).slice(1),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/json",t.languageCode&&(l["X-Firebase-Locale"]=t.languageCode),Qk.fetch()(Xk(t,t.config.apiHost,n,a),Object.assign({method:e,headers:l,referrerPolicy:"no-referrer"},o))})}async function Yk(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},l3),e);try{const i=new c3(t),o=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const s=await o.json();if("needConfirmation"in s)throw Vl(t,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{const a=o.ok?s.errorMessage:s.error.message,[l,u]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Vl(t,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw Vl(t,"email-already-in-use",s);if(l==="USER_DISABLED")throw Vl(t,"user-disabled",s);const c=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw Gk(t,c,u);yn(t,c)}}catch(i){if(i instanceof Pn)throw i;yn(t,"network-request-failed",{message:String(i)})}}async function hl(t,e,n,r,i={}){const o=await Xi(t,e,n,r,i);return"mfaPendingCredential"in o&&yn(t,"multi-factor-auth-required",{_serverResponse:o}),o}function Xk(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?mv(t.config,i):`${t.config.apiScheme}://${i}`}class c3{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Vn(this.auth,"network-request-failed")),u3.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Vl(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Vn(t,e,r);return i.customData._tokenResponse=n,i}/** * @license * Copyright 2020 Google LLC * @@ -2558,7 +2558,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function cc(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Go(t,h3(n,{idToken:r}));de(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];t._notifyReloadListener(o);const s=!((e=o.providerUserInfo)===null||e===void 0)&&e.length?w3(o.providerUserInfo):[],a=y3(t.providerData,s),l=t.isAnonymous,u=!(t.email&&o.passwordHash)&&!(a!=null&&a.length),f=l?u:!1,h={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Jk(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(t,h)}async function v3(t){const e=Qe(t);await cc(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function y3(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function w3(t){return t.map(e=>{var{providerId:n}=e,r=dv(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** + */async function cc(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Go(t,h3(n,{idToken:r}));de(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];t._notifyReloadListener(o);const s=!((e=o.providerUserInfo)===null||e===void 0)&&e.length?w3(o.providerUserInfo):[],a=y3(t.providerData,s),l=t.isAnonymous,u=!(t.email&&o.passwordHash)&&!(a!=null&&a.length),c=l?u:!1,h={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new Jk(o.createdAt,o.lastLoginAt),isAnonymous:c};Object.assign(t,h)}async function v3(t){const e=Qe(t);await cc(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function y3(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function w3(t){return t.map(e=>{var{providerId:n}=e,r=dv(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/** * @license * Copyright 2020 Google LLC * @@ -2603,7 +2603,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ir(t,e){de(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Ni{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,o=dv(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new g3(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Jk(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const n=await Go(this,this.stsTokenManager.getToken(this.auth,e));return de(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return d3(this,e)}reload(){return v3(this)}_assign(e){this!==e&&(de(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Ni(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){de(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await cc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Go(this,f3(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,o,s,a,l,u,f;const h=(r=n.displayName)!==null&&r!==void 0?r:void 0,c=(i=n.email)!==null&&i!==void 0?i:void 0,d=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,w=(s=n.photoURL)!==null&&s!==void 0?s:void 0,v=(a=n.tenantId)!==null&&a!==void 0?a:void 0,E=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,m=(u=n.createdAt)!==null&&u!==void 0?u:void 0,p=(f=n.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:y,emailVerified:g,isAnonymous:_,providerData:k,stsTokenManager:S}=n;de(y&&S,e,"internal-error");const T=Fa.fromJSON(this.name,S);de(typeof y=="string",e,"internal-error"),Ir(h,e.name),Ir(c,e.name),de(typeof g=="boolean",e,"internal-error"),de(typeof _=="boolean",e,"internal-error"),Ir(d,e.name),Ir(w,e.name),Ir(v,e.name),Ir(E,e.name),Ir(m,e.name),Ir(p,e.name);const x=new Ni({uid:y,auth:e,email:c,emailVerified:g,displayName:h,isAnonymous:_,photoURL:w,phoneNumber:d,tenantId:v,stsTokenManager:T,createdAt:m,lastLoginAt:p});return k&&Array.isArray(k)&&(x.providerData=k.map(I=>Object.assign({},I))),E&&(x._redirectEventId=E),x}static async _fromIdTokenResponse(e,n,r=!1){const i=new Fa;i.updateFromServerResponse(n);const o=new Ni({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await cc(o),o}}/** + */function Ir(t,e){de(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Ni{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,o=dv(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new g3(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Jk(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const n=await Go(this,this.stsTokenManager.getToken(this.auth,e));return de(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return d3(this,e)}reload(){return v3(this)}_assign(e){this!==e&&(de(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const n=new Ni(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){de(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await cc(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Go(this,f3(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,o,s,a,l,u,c;const h=(r=n.displayName)!==null&&r!==void 0?r:void 0,f=(i=n.email)!==null&&i!==void 0?i:void 0,d=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,w=(s=n.photoURL)!==null&&s!==void 0?s:void 0,v=(a=n.tenantId)!==null&&a!==void 0?a:void 0,E=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,m=(u=n.createdAt)!==null&&u!==void 0?u:void 0,p=(c=n.lastLoginAt)!==null&&c!==void 0?c:void 0,{uid:y,emailVerified:g,isAnonymous:_,providerData:k,stsTokenManager:S}=n;de(y&&S,e,"internal-error");const T=Fa.fromJSON(this.name,S);de(typeof y=="string",e,"internal-error"),Ir(h,e.name),Ir(f,e.name),de(typeof g=="boolean",e,"internal-error"),de(typeof _=="boolean",e,"internal-error"),Ir(d,e.name),Ir(w,e.name),Ir(v,e.name),Ir(E,e.name),Ir(m,e.name),Ir(p,e.name);const x=new Ni({uid:y,auth:e,email:f,emailVerified:g,displayName:h,isAnonymous:_,photoURL:w,phoneNumber:d,tenantId:v,stsTokenManager:T,createdAt:m,lastLoginAt:p});return k&&Array.isArray(k)&&(x.providerData=k.map(I=>Object.assign({},I))),E&&(x._redirectEventId=E),x}static async _fromIdTokenResponse(e,n,r=!1){const i=new Fa;i.updateFromServerResponse(n);const o=new Ni({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await cc(o),o}}/** * @license * Copyright 2020 Google LLC * @@ -2648,7 +2648,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function lu(t,e,n){return`firebase:${t}:${e}:${n}`}class xo{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=lu(this.userKey,i.apiKey,o),this.fullPersistenceKey=lu("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Ni._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new xo(ir(I1),e,r);const i=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let o=i[0]||ir(I1);const s=lu(r,e.config.apiKey,e.name);let a=null;for(const u of n)try{const f=await u._get(s);if(f){const h=Ni._fromJSON(e,f);u!==o&&(a=h),o=u;break}}catch{}const l=i.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!l.length?new xo(o,e,r):(o=l[0],a&&await o._set(s,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==o)try{await u._remove(s)}catch{}})),new xo(o,e,r))}}/** + */function lu(t,e,n){return`firebase:${t}:${e}:${n}`}class xo{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=lu(this.userKey,i.apiKey,o),this.fullPersistenceKey=lu("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Ni._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new xo(ir(I1),e,r);const i=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let o=i[0]||ir(I1);const s=lu(r,e.config.apiKey,e.name);let a=null;for(const u of n)try{const c=await u._get(s);if(c){const h=Ni._fromJSON(e,c);u!==o&&(a=h),o=u;break}}catch{}const l=i.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!l.length?new xo(o,e,r):(o=l[0],a&&await o._set(s,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==o)try{await u._remove(s)}catch{}})),new xo(o,e,r))}}/** * @license * Copyright 2020 Google LLC * @@ -2843,7 +2843,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function U3(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function B3(t){const e=Ms($s(t)).link,n=e?Ms($s(e)).deep_link_id:null,r=Ms($s(t)).deep_link_id;return(r?Ms($s(r)).link:null)||r||n||e||t}class wv{constructor(e){var n,r,i,o,s,a;const l=Ms($s(e)),u=(n=l.apiKey)!==null&&n!==void 0?n:null,f=(r=l.oobCode)!==null&&r!==void 0?r:null,h=U3((i=l.mode)!==null&&i!==void 0?i:null);de(u&&f&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=f,this.continueUrl=(o=l.continueUrl)!==null&&o!==void 0?o:null,this.languageCode=(s=l.languageCode)!==null&&s!==void 0?s:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(e){const n=B3(e);try{return new wv(n)}catch{return null}}}/** + */function U3(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function B3(t){const e=Ms($s(t)).link,n=e?Ms($s(e)).deep_link_id:null,r=Ms($s(t)).deep_link_id;return(r?Ms($s(r)).link:null)||r||n||e||t}class wv{constructor(e){var n,r,i,o,s,a;const l=Ms($s(e)),u=(n=l.apiKey)!==null&&n!==void 0?n:null,c=(r=l.oobCode)!==null&&r!==void 0?r:null,h=U3((i=l.mode)!==null&&i!==void 0?i:null);de(u&&c&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=c,this.continueUrl=(o=l.continueUrl)!==null&&o!==void 0?o:null,this.languageCode=(s=l.languageCode)!==null&&s!==void 0?s:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(e){const n=B3(e);try{return new wv(n)}catch{return null}}}/** * @license * Copyright 2020 Google LLC * @@ -3023,7 +3023,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */async function pI(t,e,n=!1){const r="signIn",i=await dI(t,r,e),o=await Ui._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(o.user),o}async function z3(t,e){return pI(Ji(t),e)}async function H3(t,e,n){var r;const i=Ji(t),o={returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"};let s;if(!((r=i._getRecaptchaConfig())===null||r===void 0)&&r.emailPasswordEnabled){const u=await fc(i,o,"signUpPassword");s=Vh(i,u)}else s=Vh(i,o).catch(async u=>{if(u.code==="auth/missing-recaptcha-token"){console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow.");const f=await fc(i,o,"signUpPassword");return Vh(i,f)}else return Promise.reject(u)});const a=await s.catch(u=>Promise.reject(u)),l=await Ui._fromIdTokenResponse(i,"signIn",a);return await i._updateCurrentUser(l.user),l}function K3(t,e,n){return z3(Qe(t),cs.credential(e,n))}/** + */async function pI(t,e,n=!1){const r="signIn",i=await dI(t,r,e),o=await Ui._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(o.user),o}async function z3(t,e){return pI(Ji(t),e)}async function H3(t,e,n){var r;const i=Ji(t),o={returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"};let s;if(!((r=i._getRecaptchaConfig())===null||r===void 0)&&r.emailPasswordEnabled){const u=await fc(i,o,"signUpPassword");s=Vh(i,u)}else s=Vh(i,o).catch(async u=>{if(u.code==="auth/missing-recaptcha-token"){console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow.");const c=await fc(i,o,"signUpPassword");return Vh(i,c)}else return Promise.reject(u)});const a=await s.catch(u=>Promise.reject(u)),l=await Ui._fromIdTokenResponse(i,"signIn",a);return await i._updateCurrentUser(l.user),l}function K3(t,e,n){return z3(Qe(t),cs.credential(e,n))}/** * @license * Copyright 2020 Google LLC * @@ -3158,7 +3158,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */class rF{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,s;return new Promise((a,l)=>{const u=_v("",20);i.port1.start();const f=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:i,onMessage(h){const c=h;if(c.data.eventId===u)switch(c.data.status){case"ack":clearTimeout(f),o=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(c.data.response);break;default:clearTimeout(f),clearTimeout(o),l(new Error("invalid_response"));break}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:u,data:n},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/** + */class rF{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,s;return new Promise((a,l)=>{const u=_v("",20);i.port1.start();const c=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:i,onMessage(h){const f=h;if(f.data.eventId===u)switch(f.data.status){case"ack":clearTimeout(c),o=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(f.data.response);break;default:clearTimeout(c),clearTimeout(o),l(new Error("invalid_response"));break}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:u,data:n},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/** * @license * Copyright 2020 Google LLC * @@ -3368,7 +3368,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const zF={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},HF=500,KF=600,WF="_blank",GF="http://localhost";class M1{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function QF(t,e,n,r=HF,i=KF){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},zF),{width:r.toString(),height:i.toString(),top:o,left:s}),u=Pt().toLowerCase();n&&(a=tI(u)?WF:n),eI(u)&&(e=e||GF,l.scrollbars="yes");const f=Object.entries(l).reduce((c,[d,w])=>`${c}${d}=${w},`,"");if(_3(u)&&a!=="_self")return YF(e||"",a),new M1(null);const h=window.open(e||"",a,f);de(h,t,"popup-blocked");try{h.focus()}catch{}return new M1(h)}function YF(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** + */const zF={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},HF=500,KF=600,WF="_blank",GF="http://localhost";class M1{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function QF(t,e,n,r=HF,i=KF){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},zF),{width:r.toString(),height:i.toString(),top:o,left:s}),u=Pt().toLowerCase();n&&(a=tI(u)?WF:n),eI(u)&&(e=e||GF,l.scrollbars="yes");const c=Object.entries(l).reduce((f,[d,w])=>`${f}${d}=${w},`,"");if(_3(u)&&a!=="_self")return YF(e||"",a),new M1(null);const h=window.open(e||"",a,c);de(h,t,"popup-blocked");try{h.focus()}catch{}return new M1(h)}function YF(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/** * @license * Copyright 2021 Google LLC * @@ -3383,7 +3383,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const XF="__/auth/handler",JF="emulator/auth/handler",ZF=encodeURIComponent("fac");async function $1(t,e,n,r,i,o){de(t.config.authDomain,t,"auth-domain-config-required"),de(t.config.apiKey,t,"invalid-api-key");const s={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:ns,eventId:i};if(e instanceof Ev){e.setDefaultLanguage(t.languageCode),s.providerId=e.providerId||"",uR(e.getCustomParameters())||(s.customParameters=JSON.stringify(e.getCustomParameters()));for(const[f,h]of Object.entries(o||{}))s[f]=h}if(e instanceof dl){const f=e.getScopes().filter(h=>h!=="");f.length>0&&(s.scopes=f.join(","))}t.tenantId&&(s.tid=t.tenantId);const a=s;for(const f of Object.keys(a))a[f]===void 0&&delete a[f];const l=await t._getAppCheckToken(),u=l?`#${ZF}=${encodeURIComponent(l)}`:"";return`${e5(t)}?${Ga(a).slice(1)}${u}`}function e5({config:t}){return t.emulator?mv(t,JF):`https://${t.authDomain}/${XF}`}/** + */const XF="__/auth/handler",JF="emulator/auth/handler",ZF=encodeURIComponent("fac");async function $1(t,e,n,r,i,o){de(t.config.authDomain,t,"auth-domain-config-required"),de(t.config.apiKey,t,"invalid-api-key");const s={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:ns,eventId:i};if(e instanceof Ev){e.setDefaultLanguage(t.languageCode),s.providerId=e.providerId||"",uR(e.getCustomParameters())||(s.customParameters=JSON.stringify(e.getCustomParameters()));for(const[c,h]of Object.entries(o||{}))s[c]=h}if(e instanceof dl){const c=e.getScopes().filter(h=>h!=="");c.length>0&&(s.scopes=c.join(","))}t.tenantId&&(s.tid=t.tenantId);const a=s;for(const c of Object.keys(a))a[c]===void 0&&delete a[c];const l=await t._getAppCheckToken(),u=l?`#${ZF}=${encodeURIComponent(l)}`:"";return`${e5(t)}?${Ga(a).slice(1)}${u}`}function e5({config:t}){return t.emulator?mv(t,JF):`https://${t.authDomain}/${XF}`}/** * @license * Copyright 2020 Google LLC * @@ -3443,17 +3443,17 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */const s5=5*60,a5=GT("authIdTokenMaxAge")||s5;let U1=null;const l5=t=>async e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>a5)return;const i=n==null?void 0:n.token;U1!==i&&(U1=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function u5(t=Xm()){const e=Wi(t,"auth");if(e.isInitialized())return e.getImmediate();const n=x3(t,{popupRedirectResolver:n5,persistence:[dF,tF,wI]}),r=GT("authTokenSyncURL");if(r){const o=l5(r);Y3(n,o,()=>o(n.currentUser)),Q3(n,s=>o(s))}const i=WT("auth");return i&&P3(n,`http://${i}`),n}o5("Browser");const c5={apiKey:"AIzaSyDBZLyfmV-Qw5Rqe9lp8wJCjuU4IpzRZd8",authDomain:"lokman-blog.firebaseapp.com",projectId:"lokman-blog",storageBucket:"lokman-blog.appspot.com",messagingSenderId:"189504006380",appId:"1:189504006380:web:977571cde229fc2c421dc9",measurementId:"G-XX4FTFKRGY"},Sv=eS(c5);J4(Sv);const zt=a$(Sv),Qo=u5(Sv),f5=new Jn,B1=()=>{const[t,e]=L.useState([]);Fx(),L.useEffect(()=>{(async()=>{const a=g$(ur(zt,"posts"),v$("createdAt","desc"),y$(10)),u=(await $a(a)).docs.map(f=>({...f.data(),id:f.id}));e(u)})()},[]);const n=[{src:Bx,alt:"Get a website!",caption:"",link:"https://www.fiverr.com/s/w5EEmr"},{src:qx,alt:"Contact me for more informations!",caption:"",link:"https://lokman.fr/#/contact"},{src:Vx,alt:"Amadeus Project",caption:"",link:"https://lokman.fr/#/post/sBpyBH39fyK2qWyi0rfu"},{src:zx,alt:"Atto Channel soon available",caption:"",link:"https://github.com/Loke-60000/Atto-channel"}],i=(s=>{const a=new Date(s),l=new Date;let u=l.getFullYear()-a.getFullYear();const f=l.getMonth()-a.getMonth();return(f<0||f===0&&l.getDate(){const a=new Date,l=new Date(s),u=30*24*60*60*1e3;return a-lJ("li",{className:"PostList",children:[A("span",{className:"postDate",children:new Date(s.createdAt).toLocaleDateString()}),A(mt,{to:`/post/${s.id}`,className:"postName",children:s.title}),o(s.createdAt)&&A("span",{style:{color:"#d26600"},children:" [New!]"})]},s.id))})]}),J("div",{className:"Projectsicon",children:[A("h1",{children:"Projects"}),A("div",{className:"project-container",children:J(mt,{to:"https://lokman.fr/post/ZbJ9NdhxWIlsgVlZ1GFc",children:[A("img",{className:"project_icons",src:BT,alt:"Amadeus Fan-Project Realisation 2.0"}),A("span",{children:"Fan-Project: Amadeus Reborn (name subject to change)"})]})}),A("div",{className:"project-container",children:J(mt,{to:"https://github.com/Loke-60000/Atto-channel",children:[A("img",{className:"project_icons",src:VT,alt:"@Chan"}),A("span",{children:"@Chan (still in development)"})]})}),A("div",{className:"project-container",children:J(mt,{to:"/lokman/projects",children:[A("img",{className:"project_icons",src:qT,alt:"Rakugaki"}),A("span",{children:"Rakugaki"})]})})]})]})]})},Ua={_origin:"https://api.emailjs.com"},h5=(t,e="https://api.emailjs.com")=>{Ua._userID=t,Ua._origin=e},NI=(t,e,n)=>{if(!t)throw"The user ID is required. Visit https://dashboard.emailjs.com/admin/integration";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!n)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class q1{constructor(e){this.status=e.status,this.text=e.responseText}}const OI=(t,e,n={})=>new Promise((r,i)=>{const o=new XMLHttpRequest;o.addEventListener("load",({target:s})=>{const a=new q1(s);a.status===200||a.text==="OK"?r(a):i(a)}),o.addEventListener("error",({target:s})=>{i(new q1(s))}),o.open("POST",Ua._origin+t,!0),Object.keys(n).forEach(s=>{o.setRequestHeader(s,n[s])}),o.send(e)}),d5=(t,e,n,r)=>{const i=r||Ua._userID;return NI(i,t,e),OI("/api/v1.0/email/send",JSON.stringify({lib_version:"3.2.0",user_id:i,service_id:t,template_id:e,template_params:n}),{"Content-type":"application/json"})},p5=t=>{let e;if(typeof t=="string"?e=document.querySelector(t):e=t,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},m5=(t,e,n,r)=>{const i=r||Ua._userID,o=p5(n);NI(i,t,e);const s=new FormData(o);return s.append("lib_version","3.2.0"),s.append("service_id",t),s.append("template_id",e),s.append("user_id",i),OI("/api/v1.0/email/send-form",s)},g5={init:h5,send:d5,sendForm:m5},v5=()=>{const[t,e]=L.useState(""),[n,r]=L.useState(""),[i,o]=L.useState(""),[s,a]=L.useState(""),[l,u]=L.useState(""),[f,h]=L.useState({}),[c,d]=L.useState(!1),[w,v]=L.useState(!1),[E,m]=L.useState("");return J("div",{className:"container",children:[J("h1",{children:[A("span",{className:"ColoredLetter",children:"C"}),"ontact Me"]}),J("form",{onSubmit:y=>{if(y.preventDefault(),!t||!n||!l){h({name:!t&&"Name is required",email:!n&&"Email is required",message:!l&&"Message is required"});return}d(!0);const g={from_name:t,from_email:n,phone:i,subject:s||"New message from your website",message:l};g5.send(window.REACT_APP_EMAILJS_SERVICE_ID,window.REACT_APP_EMAILJS_TEMPLATE_ID,g,window.REACT_APP_EMAILJS_USER_ID).then(_=>{console.log(_.text),d(!1),v(!0),e(""),r(""),o(""),a(""),u(""),h({})},_=>{console.log(_.text),d(!1),m("There was an error sending your email. Please try again later.")})},children:[J("div",{className:"form-group",children:[A("label",{htmlFor:"name",children:"Name"}),A("input",{type:"text",className:`form-control ${f.name?"is-invalid":""}`,id:"name",value:t,onChange:y=>e(y.target.value),required:!0}),f.name&&A("div",{className:"invalid-feedback",children:f.name})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"email",children:"Email"}),A("input",{type:"email",className:`form-control ${f.email?"is-invalid":""}`,id:"email",value:n,onChange:y=>r(y.target.value),required:!0}),f.email&&A("div",{className:"invalid-feedback",children:f.email})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"phone",children:"Phone (optional)"}),A("input",{type:"tel",className:`form-control ${f.phone?"is-invalid":""}`,id:"phone",value:i,onChange:y=>o(y.target.value)}),f.phone&&A("div",{className:"invalid-feedback",children:f.phone})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"subject",children:"Subject (optional)"}),A("input",{type:"text",className:"form-control",id:"subject",value:s,onChange:y=>a(y.target.value)})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"message",children:"Message"}),A("textarea",{className:`form-control ${f.message?"is-invalid":""}`,id:"message",rows:"5",value:l,onChange:y=>u(y.target.value),required:!0}),f.message&&A("div",{className:"invalid-feedback",children:f.message})]}),c&&A("div",{className:"alert alert-info",role:"alert",children:"Sending your message..."}),w&&A("div",{className:"alert alert-success",role:"alert",children:"Your message has been sent. Thank you!"}),E&&A("div",{className:"alert alert-danger",role:"alert",children:E}),A("div",{className:"contactButtonContainer",children:A("button",{type:"submit",className:"contactButton",disabled:c,children:c?"Sending...":"Send"})})]})]})},y5=()=>{const[t,e]=L.useState([]),n=ur(zt,"posts");L.useEffect(()=>{(async()=>{const a=(await $a(n)).docs.map(l=>({...l.data(),id:l.id})).sort((l,u)=>new Date(u.createdAt)-new Date(l.createdAt));console.log(a),e(a)})()},[]);const r=i=>{const o=new Date,s=new Date(i),a=30*24*60*60*1e3;return o-sJ("div",{className:"post",children:[J("div",{style:{display:"flex",alignItems:"center"},children:[A("p",{style:{color:"#d26600",margin:0,marginRight:"8px"},children:new Date(i.createdAt).toLocaleString()}),A(mt,{to:`/post/${i.id}`,children:A("h1",{style:{margin:0,marginRight:"8px"},children:i.title})}),r(i.createdAt)&&A("span",{style:{color:"#d26600"},children:" [New!]"})]}),A("hr",{})]},i.id))})]})},AI=({user:t,setUser:e})=>{if(t)return null;let n=Hi();const r=()=>{yF(Qo,f5).then(i=>{const o=i.user;e({email:o.email,displayName:o.displayName}),n("/lokman/blog")})};return L.useEffect(()=>{t&&n("/blog")},[t,n]),J("div",{className:"login_page",children:[A("h1",{children:"Sign In with Google"}),A("button",{className:"login-with-google-btn",onClick:r,children:"Sign In with Google"})]})};function w5(){this.__data__=[],this.size=0}var E5=w5;function _5(t,e){return t===e||t!==t&&e!==e}var CI=_5,T5=CI;function S5(t,e){for(var n=t.length;n--;)if(T5(t[n][0],e))return n;return-1}var Cf=S5,b5=Cf,k5=Array.prototype,I5=k5.splice;function N5(t){var e=this.__data__,n=b5(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():I5.call(e,n,1),--this.size,!0}var O5=N5,A5=Cf;function C5(t){var e=this.__data__,n=A5(e,t);return n<0?void 0:e[n][1]}var x5=C5,R5=Cf;function P5(t){return R5(this.__data__,t)>-1}var L5=P5,D5=Cf;function M5(t,e){var n=this.__data__,r=D5(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $5=M5,F5=E5,j5=O5,U5=x5,B5=L5,q5=$5;function fs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++ea))return!1;var u=o.get(t),f=o.get(e);if(u&&f)return u==e&&f==t;var h=-1,c=!0,d=n&OU?new bU:void 0;for(o.set(t,e),o.set(e,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=F6}var UI=j6,U6=Rf,B6=UI,q6=Df,V6="[object Arguments]",z6="[object Array]",H6="[object Boolean]",K6="[object Date]",W6="[object Error]",G6="[object Function]",Q6="[object Map]",Y6="[object Number]",X6="[object Object]",J6="[object RegExp]",Z6="[object Set]",eB="[object String]",tB="[object WeakMap]",nB="[object ArrayBuffer]",rB="[object DataView]",iB="[object Float32Array]",oB="[object Float64Array]",sB="[object Int8Array]",aB="[object Int16Array]",lB="[object Int32Array]",uB="[object Uint8Array]",cB="[object Uint8ClampedArray]",fB="[object Uint16Array]",hB="[object Uint32Array]",Me={};Me[iB]=Me[oB]=Me[sB]=Me[aB]=Me[lB]=Me[uB]=Me[cB]=Me[fB]=Me[hB]=!0;Me[V6]=Me[z6]=Me[nB]=Me[H6]=Me[rB]=Me[K6]=Me[W6]=Me[G6]=Me[Q6]=Me[Y6]=Me[X6]=Me[J6]=Me[Z6]=Me[eB]=Me[tB]=!1;function dB(t){return q6(t)&&B6(t.length)&&!!Me[U6(t)]}var pB=dB;function mB(t){return function(e){return t(e)}}var gB=mB,vc={exports:{}};vc.exports;(function(t,e){var n=xI,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a})(vc,vc.exports);var vB=vc.exports,yB=pB,wB=gB,ew=vB,tw=ew&&ew.isTypedArray,EB=tw?wB(tw):yB,BI=EB,_B=E6,TB=x6,SB=Iv,bB=jI,kB=$6,IB=BI,NB=Object.prototype,OB=NB.hasOwnProperty;function AB(t,e){var n=SB(t),r=!n&&TB(t),i=!n&&!r&&bB(t),o=!n&&!r&&!i&&IB(t),s=n||r||i||o,a=s?_B(t.length,String):[],l=a.length;for(var u in t)(e||OB.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||kB(u,l)))&&a.push(u);return a}var CB=AB,xB=Object.prototype;function RB(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||xB;return t===n}var PB=RB;function LB(t,e){return function(n){return t(e(n))}}var DB=LB,MB=DB,$B=MB(Object.keys,Object),FB=$B,jB=PB,UB=FB,BB=Object.prototype,qB=BB.hasOwnProperty;function VB(t){if(!jB(t))return UB(t);var e=[];for(var n in Object(t))qB.call(t,n)&&n!="constructor"&&e.push(n);return e}var zB=VB,HB=LI,KB=UI;function WB(t){return t!=null&&KB(t.length)&&!HB(t)}var GB=WB,QB=CB,YB=zB,XB=GB;function JB(t){return XB(t)?QB(t):YB(t)}var ZB=JB,eq=l6,tq=y6,nq=ZB;function rq(t){return eq(t,nq,tq)}var iq=rq,nw=iq,oq=1,sq=Object.prototype,aq=sq.hasOwnProperty;function lq(t,e,n,r,i,o){var s=n&oq,a=nw(t),l=a.length,u=nw(e),f=u.length;if(l!=f&&!s)return!1;for(var h=l;h--;){var c=a[h];if(!(s?c in e:aq.call(e,c)))return!1}var d=o.get(t),w=o.get(e);if(d&&w)return d==e&&w==t;var v=!0;o.set(t,e),o.set(e,t);for(var E=s;++hasync e=>{const n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>a5)return;const i=n==null?void 0:n.token;U1!==i&&(U1=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function u5(t=Xm()){const e=Wi(t,"auth");if(e.isInitialized())return e.getImmediate();const n=x3(t,{popupRedirectResolver:n5,persistence:[dF,tF,wI]}),r=GT("authTokenSyncURL");if(r){const o=l5(r);Y3(n,o,()=>o(n.currentUser)),Q3(n,s=>o(s))}const i=WT("auth");return i&&P3(n,`http://${i}`),n}o5("Browser");const c5={apiKey:"AIzaSyDBZLyfmV-Qw5Rqe9lp8wJCjuU4IpzRZd8",authDomain:"lokman-blog.firebaseapp.com",projectId:"lokman-blog",storageBucket:"lokman-blog.appspot.com",messagingSenderId:"189504006380",appId:"1:189504006380:web:977571cde229fc2c421dc9",measurementId:"G-XX4FTFKRGY"},Sv=eS(c5);J4(Sv);const zt=a$(Sv),Qo=u5(Sv),f5=new Jn,B1=()=>{const[t,e]=L.useState([]);Fx(),L.useEffect(()=>{(async()=>{const a=g$(ur(zt,"posts"),v$("createdAt","desc"),y$(10)),u=(await $a(a)).docs.map(c=>({...c.data(),id:c.id}));e(u)})()},[]);const n=[{src:Bx,alt:"Get a website!",caption:"",link:"https://www.fiverr.com/s/w5EEmr"},{src:qx,alt:"Contact me for more informations!",caption:"",link:"https://lokman.fr/#/contact"},{src:Vx,alt:"Amadeus Project",caption:"",link:"https://lokman.fr/#/post/sBpyBH39fyK2qWyi0rfu"},{src:zx,alt:"Atto Channel soon available",caption:"",link:"https://github.com/Loke-60000/Atto-channel"}],i=(s=>{const a=new Date(s),l=new Date;let u=l.getFullYear()-a.getFullYear();const c=l.getMonth()-a.getMonth();return(c<0||c===0&&l.getDate(){const a=new Date,l=new Date(s),u=30*24*60*60*1e3;return a-lJ("li",{className:"PostList",children:[A("span",{className:"postDate",children:new Date(s.createdAt).toLocaleDateString()}),A(mt,{to:`/post/${s.id}`,className:"postName",children:s.title}),o(s.createdAt)&&A("span",{style:{color:"#d26600"},children:" [New!]"})]},s.id))})]}),J("div",{className:"Projectsicon",children:[J("h1",{className:"ProjectTitleIntro",children:[A("span",{className:"ColoredLetter",children:"P"}),"rojects"]}),A("div",{className:"project-container",children:J(mt,{to:"https://lokman.fr/post/ZbJ9NdhxWIlsgVlZ1GFc",children:[A("img",{className:"project_icons",src:BT,alt:"Amadeus Fan-Project Realisation 2.0"}),A("span",{children:"Fan-Project: Amadeus Reborn (name subject to change)"})]})}),A("div",{className:"project-container",children:J(mt,{to:"https://github.com/Loke-60000/Atto-channel",children:[A("img",{className:"project_icons",src:VT,alt:"@Chan"}),A("span",{children:"@Chan (still in development)"})]})}),A("div",{className:"project-container",children:J(mt,{to:"/lokman/projects",children:[A("img",{className:"project_icons",src:qT,alt:"Rakugaki"}),A("span",{children:"Rakugaki"})]})})]})]})]})},Ua={_origin:"https://api.emailjs.com"},h5=(t,e="https://api.emailjs.com")=>{Ua._userID=t,Ua._origin=e},NI=(t,e,n)=>{if(!t)throw"The user ID is required. Visit https://dashboard.emailjs.com/admin/integration";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!n)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class q1{constructor(e){this.status=e.status,this.text=e.responseText}}const OI=(t,e,n={})=>new Promise((r,i)=>{const o=new XMLHttpRequest;o.addEventListener("load",({target:s})=>{const a=new q1(s);a.status===200||a.text==="OK"?r(a):i(a)}),o.addEventListener("error",({target:s})=>{i(new q1(s))}),o.open("POST",Ua._origin+t,!0),Object.keys(n).forEach(s=>{o.setRequestHeader(s,n[s])}),o.send(e)}),d5=(t,e,n,r)=>{const i=r||Ua._userID;return NI(i,t,e),OI("/api/v1.0/email/send",JSON.stringify({lib_version:"3.2.0",user_id:i,service_id:t,template_id:e,template_params:n}),{"Content-type":"application/json"})},p5=t=>{let e;if(typeof t=="string"?e=document.querySelector(t):e=t,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},m5=(t,e,n,r)=>{const i=r||Ua._userID,o=p5(n);NI(i,t,e);const s=new FormData(o);return s.append("lib_version","3.2.0"),s.append("service_id",t),s.append("template_id",e),s.append("user_id",i),OI("/api/v1.0/email/send-form",s)},g5={init:h5,send:d5,sendForm:m5},v5=()=>{const[t,e]=L.useState(""),[n,r]=L.useState(""),[i,o]=L.useState(""),[s,a]=L.useState(""),[l,u]=L.useState(""),[c,h]=L.useState({}),[f,d]=L.useState(!1),[w,v]=L.useState(!1),[E,m]=L.useState("");return J("div",{className:"container",children:[J("h1",{children:[A("span",{className:"ColoredLetter",children:"C"}),"ontact Me"]}),J("form",{onSubmit:y=>{if(y.preventDefault(),!t||!n||!l){h({name:!t&&"Name is required",email:!n&&"Email is required",message:!l&&"Message is required"});return}d(!0);const g={from_name:t,from_email:n,phone:i,subject:s||"New message from your website",message:l};g5.send(window.REACT_APP_EMAILJS_SERVICE_ID,window.REACT_APP_EMAILJS_TEMPLATE_ID,g,window.REACT_APP_EMAILJS_USER_ID).then(_=>{console.log(_.text),d(!1),v(!0),e(""),r(""),o(""),a(""),u(""),h({})},_=>{console.log(_.text),d(!1),m("There was an error sending your email. Please try again later.")})},children:[J("div",{className:"form-group",children:[A("label",{htmlFor:"name",children:"Name"}),A("input",{type:"text",className:`form-control ${c.name?"is-invalid":""}`,id:"name",value:t,onChange:y=>e(y.target.value),required:!0}),c.name&&A("div",{className:"invalid-feedback",children:c.name})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"email",children:"Email"}),A("input",{type:"email",className:`form-control ${c.email?"is-invalid":""}`,id:"email",value:n,onChange:y=>r(y.target.value),required:!0}),c.email&&A("div",{className:"invalid-feedback",children:c.email})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"phone",children:"Phone (optional)"}),A("input",{type:"tel",className:`form-control ${c.phone?"is-invalid":""}`,id:"phone",value:i,onChange:y=>o(y.target.value)}),c.phone&&A("div",{className:"invalid-feedback",children:c.phone})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"subject",children:"Subject (optional)"}),A("input",{type:"text",className:"form-control",id:"subject",value:s,onChange:y=>a(y.target.value)})]}),J("div",{className:"form-group",children:[A("label",{htmlFor:"message",children:"Message"}),A("textarea",{className:`form-control ${c.message?"is-invalid":""}`,id:"message",rows:"5",value:l,onChange:y=>u(y.target.value),required:!0}),c.message&&A("div",{className:"invalid-feedback",children:c.message})]}),f&&A("div",{className:"alert alert-info",role:"alert",children:"Sending your message..."}),w&&A("div",{className:"alert alert-success",role:"alert",children:"Your message has been sent. Thank you!"}),E&&A("div",{className:"alert alert-danger",role:"alert",children:E}),A("div",{className:"contactButtonContainer",children:A("button",{type:"submit",className:"contactButton",disabled:f,children:f?"Sending...":"Send"})})]})]})},y5=()=>{const[t,e]=L.useState([]),n=ur(zt,"posts");L.useEffect(()=>{(async()=>{const a=(await $a(n)).docs.map(l=>({...l.data(),id:l.id})).sort((l,u)=>new Date(u.createdAt)-new Date(l.createdAt));console.log(a),e(a)})()},[]);const r=i=>{const o=new Date,s=new Date(i),a=30*24*60*60*1e3;return o-sJ("div",{className:"post",children:[J("div",{style:{display:"flex",alignItems:"center"},children:[A("p",{style:{color:"#d26600",margin:0,marginRight:"8px"},children:new Date(i.createdAt).toLocaleString()}),A(mt,{to:`/post/${i.id}`,children:A("h1",{style:{margin:0,marginRight:"8px"},children:i.title})}),r(i.createdAt)&&A("span",{style:{color:"#d26600"},children:" [New!]"})]}),A("hr",{})]},i.id))})]})},AI=({user:t,setUser:e})=>{if(t)return null;let n=Hi();const r=()=>{yF(Qo,f5).then(i=>{const o=i.user;e({email:o.email,displayName:o.displayName}),n("/lokman/blog")})};return L.useEffect(()=>{t&&n("/blog")},[t,n]),J("div",{className:"login_page",children:[A("h1",{children:"Sign In with Google"}),A("button",{className:"login-with-google-btn",onClick:r,children:"Sign In with Google"})]})};function w5(){this.__data__=[],this.size=0}var E5=w5;function _5(t,e){return t===e||t!==t&&e!==e}var CI=_5,T5=CI;function S5(t,e){for(var n=t.length;n--;)if(T5(t[n][0],e))return n;return-1}var Cf=S5,b5=Cf,k5=Array.prototype,I5=k5.splice;function N5(t){var e=this.__data__,n=b5(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():I5.call(e,n,1),--this.size,!0}var O5=N5,A5=Cf;function C5(t){var e=this.__data__,n=A5(e,t);return n<0?void 0:e[n][1]}var x5=C5,R5=Cf;function P5(t){return R5(this.__data__,t)>-1}var L5=P5,D5=Cf;function M5(t,e){var n=this.__data__,r=D5(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $5=M5,F5=E5,j5=O5,U5=x5,B5=L5,q5=$5;function fs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++ea))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,f=!0,d=n&OU?new bU:void 0;for(o.set(t,e),o.set(e,t);++h-1&&t%1==0&&t-1&&t%1==0&&t<=F6}var UI=j6,U6=Rf,B6=UI,q6=Df,V6="[object Arguments]",z6="[object Array]",H6="[object Boolean]",K6="[object Date]",W6="[object Error]",G6="[object Function]",Q6="[object Map]",Y6="[object Number]",X6="[object Object]",J6="[object RegExp]",Z6="[object Set]",eB="[object String]",tB="[object WeakMap]",nB="[object ArrayBuffer]",rB="[object DataView]",iB="[object Float32Array]",oB="[object Float64Array]",sB="[object Int8Array]",aB="[object Int16Array]",lB="[object Int32Array]",uB="[object Uint8Array]",cB="[object Uint8ClampedArray]",fB="[object Uint16Array]",hB="[object Uint32Array]",Me={};Me[iB]=Me[oB]=Me[sB]=Me[aB]=Me[lB]=Me[uB]=Me[cB]=Me[fB]=Me[hB]=!0;Me[V6]=Me[z6]=Me[nB]=Me[H6]=Me[rB]=Me[K6]=Me[W6]=Me[G6]=Me[Q6]=Me[Y6]=Me[X6]=Me[J6]=Me[Z6]=Me[eB]=Me[tB]=!1;function dB(t){return q6(t)&&B6(t.length)&&!!Me[U6(t)]}var pB=dB;function mB(t){return function(e){return t(e)}}var gB=mB,vc={exports:{}};vc.exports;(function(t,e){var n=xI,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a})(vc,vc.exports);var vB=vc.exports,yB=pB,wB=gB,ew=vB,tw=ew&&ew.isTypedArray,EB=tw?wB(tw):yB,BI=EB,_B=E6,TB=x6,SB=Iv,bB=jI,kB=$6,IB=BI,NB=Object.prototype,OB=NB.hasOwnProperty;function AB(t,e){var n=SB(t),r=!n&&TB(t),i=!n&&!r&&bB(t),o=!n&&!r&&!i&&IB(t),s=n||r||i||o,a=s?_B(t.length,String):[],l=a.length;for(var u in t)(e||OB.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||kB(u,l)))&&a.push(u);return a}var CB=AB,xB=Object.prototype;function RB(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||xB;return t===n}var PB=RB;function LB(t,e){return function(n){return t(e(n))}}var DB=LB,MB=DB,$B=MB(Object.keys,Object),FB=$B,jB=PB,UB=FB,BB=Object.prototype,qB=BB.hasOwnProperty;function VB(t){if(!jB(t))return UB(t);var e=[];for(var n in Object(t))qB.call(t,n)&&n!="constructor"&&e.push(n);return e}var zB=VB,HB=LI,KB=UI;function WB(t){return t!=null&&KB(t.length)&&!HB(t)}var GB=WB,QB=CB,YB=zB,XB=GB;function JB(t){return XB(t)?QB(t):YB(t)}var ZB=JB,eq=l6,tq=y6,nq=ZB;function rq(t){return eq(t,nq,tq)}var iq=rq,nw=iq,oq=1,sq=Object.prototype,aq=sq.hasOwnProperty;function lq(t,e,n,r,i,o){var s=n&oq,a=nw(t),l=a.length,u=nw(e),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var f=a[h];if(!(s?f in e:aq.call(e,f)))return!1}var d=o.get(t),w=o.get(e);if(d&&w)return d==e&&w==t;var v=!0;o.set(t,e),o.set(e,t);for(var E=s;++h1)return E.map(function(g){return v(g)});var p=E[0];if(typeof p.blotName!="string"&&typeof p.attrName!="string")throw new s("Invalid definition");if(p.blotName==="abstract")throw new s("Cannot register abstract class");if(f[p.blotName||p.attrName]=p,typeof p.keyName=="string")a[p.keyName]=p;else if(p.className!=null&&(l[p.className]=p),p.tagName!=null){Array.isArray(p.tagName)?p.tagName=p.tagName.map(function(g){return g.toUpperCase()}):p.tagName=p.tagName.toUpperCase();var y=Array.isArray(p.tagName)?p.tagName:[p.tagName];y.forEach(function(g){(u[g]==null||p.className==null)&&(u[g]=p)})}return p}r.register=v},function(n,r,i){var o=i(51),s=i(11),a=i(3),l=i(20),u=String.fromCharCode(0),f=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};f.prototype.insert=function(h,c){var d={};return h.length===0?this:(d.insert=h,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(d.attributes=c),this.push(d))},f.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},f.prototype.retain=function(h,c){if(h<=0)return this;var d={retain:h};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(d.attributes=c),this.push(d)},f.prototype.push=function(h){var c=this.ops.length,d=this.ops[c-1];if(h=a(!0,{},h),typeof d=="object"){if(typeof h.delete=="number"&&typeof d.delete=="number")return this.ops[c-1]={delete:d.delete+h.delete},this;if(typeof d.delete=="number"&&h.insert!=null&&(c-=1,d=this.ops[c-1],typeof d!="object"))return this.ops.unshift(h),this;if(s(h.attributes,d.attributes)){if(typeof h.insert=="string"&&typeof d.insert=="string")return this.ops[c-1]={insert:d.insert+h.insert},typeof h.attributes=="object"&&(this.ops[c-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof d.retain=="number")return this.ops[c-1]={retain:d.retain+h.retain},typeof h.attributes=="object"&&(this.ops[c-1].attributes=h.attributes),this}}return c===this.ops.length?this.ops.push(h):this.ops.splice(c,0,h),this},f.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},f.prototype.filter=function(h){return this.ops.filter(h)},f.prototype.forEach=function(h){this.ops.forEach(h)},f.prototype.map=function(h){return this.ops.map(h)},f.prototype.partition=function(h){var c=[],d=[];return this.forEach(function(w){var v=h(w)?c:d;v.push(w)}),[c,d]},f.prototype.reduce=function(h,c){return this.ops.reduce(h,c)},f.prototype.changeLength=function(){return this.reduce(function(h,c){return c.insert?h+l.length(c):c.delete?h-c.delete:h},0)},f.prototype.length=function(){return this.reduce(function(h,c){return h+l.length(c)},0)},f.prototype.slice=function(h,c){h=h||0,typeof c!="number"&&(c=1/0);for(var d=[],w=l.iterator(this.ops),v=0;v0&&d.next(v.retain-E)}for(var m=new f(w);c.hasNext()||d.hasNext();)if(d.peekType()==="insert")m.push(d.next());else if(c.peekType()==="delete")m.push(c.next());else{var p=Math.min(c.peekLength(),d.peekLength()),y=c.next(p),g=d.next(p);if(typeof g.retain=="number"){var _={};typeof y.retain=="number"?_.retain=p:_.insert=y.insert;var k=l.attributes.compose(y.attributes,g.attributes,typeof y.retain=="number");if(k&&(_.attributes=k),m.push(_),!d.hasNext()&&s(m.ops[m.ops.length-1],_)){var S=new f(c.rest());return m.concat(S).chop()}}else typeof g.delete=="number"&&typeof y.retain=="number"&&m.push(g)}return m.chop()},f.prototype.concat=function(h){var c=new f(this.ops.slice());return h.ops.length>0&&(c.push(h.ops[0]),c.ops=c.ops.concat(h.ops.slice(1))),c},f.prototype.diff=function(h,c){if(this.ops===h.ops)return new f;var d=[this,h].map(function(p){return p.map(function(y){if(y.insert!=null)return typeof y.insert=="string"?y.insert:u;var g=p===h?"on":"with";throw new Error("diff() called "+g+" non-document")}).join("")}),w=new f,v=o(d[0],d[1],c),E=l.iterator(this.ops),m=l.iterator(h.ops);return v.forEach(function(p){for(var y=p[1].length;y>0;){var g=0;switch(p[0]){case o.INSERT:g=Math.min(m.peekLength(),y),w.push(m.next(g));break;case o.DELETE:g=Math.min(y,E.peekLength()),E.next(g),w.delete(g);break;case o.EQUAL:g=Math.min(E.peekLength(),m.peekLength(),y);var _=E.next(g),k=m.next(g);s(_.insert,k.insert)?w.retain(g,l.attributes.diff(_.attributes,k.attributes)):w.push(k).delete(g);break}y-=g}}),w.chop()},f.prototype.eachLine=function(h,c){c=c||` -`;for(var d=l.iterator(this.ops),w=new f,v=0;d.hasNext();){if(d.peekType()!=="insert")return;var E=d.peek(),m=l.length(E)-d.peekLength(),p=typeof E.insert=="string"?E.insert.indexOf(c,m)-m:-1;if(p<0)w.push(d.next());else if(p>0)w.push(d.next(p));else{if(h(w,d.next(1).attributes||{},v)===!1)return;v+=1,w=new f}}w.length()>0&&h(w,{},v)},f.prototype.transform=function(h,c){if(c=!!c,typeof h=="number")return this.transformPosition(h,c);for(var d=l.iterator(this.ops),w=l.iterator(h.ops),v=new f;d.hasNext()||w.hasNext();)if(d.peekType()==="insert"&&(c||w.peekType()!=="insert"))v.retain(l.length(d.next()));else if(w.peekType()==="insert")v.push(w.next());else{var E=Math.min(d.peekLength(),w.peekLength()),m=d.next(E),p=w.next(E);if(m.delete)continue;p.delete?v.push(p):v.retain(E,l.attributes.transform(m.attributes,p.attributes,c))}return v.chop()},f.prototype.transformPosition=function(h,c){c=!!c;for(var d=l.iterator(this.ops),w=0;d.hasNext()&&w<=h;){var v=d.peekLength(),E=d.peekType();if(d.next(),E==="delete"){h-=Math.min(v,h-w);continue}else E==="insert"&&(w"u"||i.call(d,E)},f=function(d,w){s&&w.name==="__proto__"?s(d,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):d[w.name]=w.newValue},h=function(d,w){if(w==="__proto__")if(i.call(d,w)){if(a)return a(d,w).value}else return;return d[w]};n.exports=function c(){var d,w,v,E,m,p,y=arguments[0],g=1,_=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<_;++g)if(d=arguments[g],d!=null)for(w in d)v=h(y,w),E=h(d,w),y!==E&&(k&&E&&(u(E)||(m=l(E)))?(m?(m=!1,p=v&&l(v)?v:[]):p=v&&u(v)?v:{},f(y,{name:w,newValue:c(k,p,E)})):typeof E<"u"&&f(y,{name:w,newValue:E}));return y}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var o=function(){function b(N,C){for(var P=0;P0&&(P1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(P===0||P>=this.length()-S)){var z=this.clone();return P===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var B=s(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"split",this).call(this,P,F);return this.cache={},B}}}]),N}(c.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[E.default,c.default.Embed,p.default];function I(b){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(N=(0,l.default)(N,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?N:I(b.parent,N)}r.bubbleFormats=I,r.BlockEmbed=T,r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},s=function(){function j(M,O){var D=[],$=!0,V=!1,q=void 0;try{for(var R=M[Symbol.iterator](),U;!($=(U=R.next()).done)&&(D.push(U.value),!(O&&D.length===O));$=!0);}catch(K){V=!0,q=K}finally{try{!$&&R.return&&R.return()}finally{if(V)throw q}}return D}return function(M,O){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return j(M,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function j(M,O){for(var D=0;D2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof O!="string"){var q=O.attrName||O.blotName;typeof q=="string"?this.register("formats/"+q,O,D):Object.keys(O).forEach(function(R){$.register(R,O[R],D)})}else this.imports[O]!=null&&!V&&C.warn("Overwriting "+O+" with",D),this.imports[O]=D,(O.startsWith("blots/")||O.startsWith("formats/"))&&D.blotName!=="abstract"?m.default.register(D):O.startsWith("modules")&&typeof D.register=="function"&&D.register()}}]);function j(M){var O=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(N(this,j),this.options=F(M,D),this.container=this.options.container,this.container==null)return C.error("Invalid Quill container",M);this.options.debug&&j.debug(this.options.debug);var $=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new d.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new y.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(d.default.events.EDITOR_CHANGE,function(q){q===d.default.events.TEXT_CHANGE&&O.root.classList.toggle("ql-blank",O.editor.isBlank())}),this.emitter.on(d.default.events.SCROLL_UPDATE,function(q,R){var U=O.selection.lastRange,K=U&&U.length===0?U.index:void 0;z.call(O,function(){return O.editor.update(null,R,K)},q)});var V=this.clipboard.convert(`
`+$+"


");this.setContents(V),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return a(j,[{key:"addContainer",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof O=="string"){var $=O;O=document.createElement("div"),O.classList.add($)}return this.container.insertBefore(O,D),O}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(O,D,$){var V=this,q=B(O,D,$),R=s(q,4);return O=R[0],D=R[1],$=R[3],z.call(this,function(){return V.editor.deleteText(O,D)},$,O,-1*D)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(O),this.container.classList.toggle("ql-disabled",!O)}},{key:"focus",value:function(){var O=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=O,this.scrollIntoView()}},{key:"format",value:function(O,D){var $=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;return z.call(this,function(){var q=$.getSelection(!0),R=new u.default;if(q==null)return R;if(m.default.query(O,m.default.Scope.BLOCK))R=$.editor.formatLine(q.index,q.length,b({},O,D));else{if(q.length===0)return $.selection.format(O,D),R;R=$.editor.formatText(q.index,q.length,b({},O,D))}return $.setSelection(q,d.default.sources.SILENT),R},V)}},{key:"formatLine",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,D,$,V,q),W=s(K,4);return O=W[0],D=W[1],U=W[2],q=W[3],z.call(this,function(){return R.editor.formatLine(O,D,U)},q,O,0)}},{key:"formatText",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,D,$,V,q),W=s(K,4);return O=W[0],D=W[1],U=W[2],q=W[3],z.call(this,function(){return R.editor.formatText(O,D,U)},q,O,0)}},{key:"getBounds",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=void 0;typeof O=="number"?$=this.selection.getBounds(O,D):$=this.selection.getBounds(O.index,O.length);var V=this.container.getBoundingClientRect();return{bottom:$.bottom-V.top,height:$.height,left:$.left-V.left,right:$.right-V.left,top:$.top-V.top,width:$.width}}},{key:"getContents",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-O,$=B(O,D),V=s($,2);return O=V[0],D=V[1],this.editor.getContents(O,D)}},{key:"getFormat",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof O=="number"?this.editor.getFormat(O,D):this.editor.getFormat(O.index,O.length)}},{key:"getIndex",value:function(O){return O.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(O){return this.scroll.leaf(O)}},{key:"getLine",value:function(O){return this.scroll.line(O)}},{key:"getLines",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof O!="number"?this.scroll.lines(O.index,O.length):this.scroll.lines(O,D)}},{key:"getModule",value:function(O){return this.theme.modules[O]}},{key:"getSelection",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return O&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-O,$=B(O,D),V=s($,2);return O=V[0],D=V[1],this.editor.getText(O,D)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(O,D,$){var V=this,q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j.sources.API;return z.call(this,function(){return V.editor.insertEmbed(O,D,$)},q,O)}},{key:"insertText",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,0,$,V,q),W=s(K,4);return O=W[0],U=W[2],q=W[3],z.call(this,function(){return R.editor.insertText(O,D,U)},q,O,D.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(O,D,$){this.clipboard.dangerouslyPasteHTML(O,D,$)}},{key:"removeFormat",value:function(O,D,$){var V=this,q=B(O,D,$),R=s(q,4);return O=R[0],D=R[1],$=R[3],z.call(this,function(){return V.editor.removeFormat(O,D)},$,O)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(O){var D=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return z.call(this,function(){O=new u.default(O);var V=D.getLength(),q=D.editor.deleteText(0,V),R=D.editor.applyDelta(O),U=R.ops[R.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` -`&&(D.editor.deleteText(D.getLength()-1,1),R.delete(1));var K=q.compose(R);return K},$)}},{key:"setSelection",value:function(O,D,$){if(O==null)this.selection.setRange(null,D||j.sources.API);else{var V=B(O,D,$),q=s(V,4);O=q[0],D=q[1],$=q[3],this.selection.setRange(new p.Range(O,D),$),$!==d.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API,$=new u.default().insert(O);return this.setContents($,D)}},{key:"update",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,D=this.scroll.update(O);return this.selection.update(O),D}},{key:"updateContents",value:function(O){var D=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return z.call(this,function(){return O=new u.default(O),D.editor.applyDelta(O,$)},$,!0)}}]),j}();P.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},P.events=d.default.events,P.sources=d.default.sources,P.version="1.3.7",P.imports={delta:u.default,parchment:m.default,"core/module":v.default,"core/theme":x.default};function F(j,M){if(M=(0,_.default)(!0,{container:j,modules:{clipboard:!0,keyboard:!0,history:!0}},M),!M.theme||M.theme===P.DEFAULTS.theme)M.theme=x.default;else if(M.theme=P.import("themes/"+M.theme),M.theme==null)throw new Error("Invalid theme "+M.theme+". Did you register it?");var O=(0,_.default)(!0,{},M.theme.DEFAULTS);[O,M].forEach(function(V){V.modules=V.modules||{},Object.keys(V.modules).forEach(function(q){V.modules[q]===!0&&(V.modules[q]={})})});var D=Object.keys(O.modules).concat(Object.keys(M.modules)),$=D.reduce(function(V,q){var R=P.import("modules/"+q);return R==null?C.error("Cannot load "+q+" module. Are you sure you registered it?"):V[q]=R.DEFAULTS||{},V},{});return M.modules!=null&&M.modules.toolbar&&M.modules.toolbar.constructor!==Object&&(M.modules.toolbar={container:M.modules.toolbar}),M=(0,_.default)(!0,{},P.DEFAULTS,{modules:$},O,M),["bounds","container","scrollingContainer"].forEach(function(V){typeof M[V]=="string"&&(M[V]=document.querySelector(M[V]))}),M.modules=Object.keys(M.modules).reduce(function(V,q){return M.modules[q]&&(V[q]=M.modules[q]),V},{}),M}function z(j,M,O,D){if(this.options.strict&&!this.isEnabled()&&M===d.default.sources.USER)return new u.default;var $=O==null?null:this.getSelection(),V=this.editor.delta,q=j();if($!=null&&(O===!0&&(O=$.index),D==null?$=H($,q,M):D!==0&&($=H($,O,D,M)),this.setSelection($,d.default.sources.SILENT)),q.length()>0){var R,U=[d.default.events.TEXT_CHANGE,q,V,M];if((R=this.emitter).emit.apply(R,[d.default.events.EDITOR_CHANGE].concat(U)),M!==d.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,U)}}return q}function B(j,M,O,D,$){var V={};return typeof j.index=="number"&&typeof j.length=="number"?typeof M!="number"?($=D,D=O,O=M,M=j.length,j=j.index):(M=j.length,j=j.index):typeof M!="number"&&($=D,D=O,O=M,M=0),(typeof O>"u"?"undefined":o(O))==="object"?(V=O,$=D):typeof O=="string"&&(D!=null?V[O]=D:$=O),$=$||d.default.sources.API,[j,M,V,$]}function H(j,M,O,D){if(j==null)return null;var $=void 0,V=void 0;if(M instanceof u.default){var q=[j.index,j.index+j.length].map(function(W){return M.transformPosition(W,D!==d.default.sources.USER)}),R=s(q,2);$=R[0],V=R[1]}else{var U=[j.index,j.index+j.length].map(function(W){return W=0?W+O:Math.max(M,W+O)}),K=s(U,2);$=K[0],V=K[1]}return new p.Range($,V-$)}r.expandConfig=F,r.overload=B,r.default=P},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function E(m,p){for(var y=0;y0){var g=this.parent.isolate(this.offset(),this.length());this.moveChildren(g),g.wrap(this)}}}],[{key:"compare",value:function(y,g){var _=m.order.indexOf(y),k=m.order.indexOf(g);return _>=0||k>=0?_-k:y===g?0:y1?k-1:0),T=1;T1&&arguments[1]!==void 0?arguments[1]:{};o(this,a),this.quill=l,this.options=u};s.DEFAULTS={},r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=["error","warn","log","info"],s="warn";function a(u){if(o.indexOf(u)<=o.indexOf(s)){for(var f,h=arguments.length,c=Array(h>1?h-1:0),d=1;d0&&typeof c[0]!="number")}function h(c,d,w){var v,E;if(u(c)||u(d)||c.prototype!==d.prototype)return!1;if(a(c))return a(d)?(c=o.call(c),d=o.call(d),l(c,d,w)):!1;if(f(c)){if(!f(d)||c.length!==d.length)return!1;for(v=0;v=0;v--)if(m[v]!=p[v])return!1;for(v=m.length-1;v>=0;v--)if(E=m[v],!l(c[E],d[E],w))return!1;return typeof c==typeof d}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),s=function(){function a(l,u,f){f===void 0&&(f={}),this.attrName=l,this.keyName=u;var h=o.Scope.TYPE&o.Scope.ATTRIBUTE;f.scope!=null?this.scope=f.scope&o.Scope.LEVEL|h:this.scope=o.Scope.ATTRIBUTE,f.whitelist!=null&&(this.whitelist=f.whitelist)}return a.keys=function(l){return[].map.call(l.attributes,function(u){return u.name})},a.prototype.add=function(l,u){return this.canAdd(l,u)?(l.setAttribute(this.keyName,u),!0):!1},a.prototype.canAdd=function(l,u){var f=o.query(l,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return f==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},a.prototype.remove=function(l){l.removeAttribute(this.keyName)},a.prototype.value=function(l){var u=l.getAttribute(this.keyName);return this.canAdd(l,u)&&u?u:""},a}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var o=function(){function T(x,I){var b=[],N=!0,C=!1,P=void 0;try{for(var F=x[Symbol.iterator](),z;!(N=(z=F.next()).done)&&(b.push(z.value),!(I&&b.length===I));N=!0);}catch(B){C=!0,P=B}finally{try{!N&&F.return&&F.return()}finally{if(C)throw P}}return b}return function(x,I){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(x,I){for(var b=0;b1)return E.map(function(g){return v(g)});var p=E[0];if(typeof p.blotName!="string"&&typeof p.attrName!="string")throw new s("Invalid definition");if(p.blotName==="abstract")throw new s("Cannot register abstract class");if(c[p.blotName||p.attrName]=p,typeof p.keyName=="string")a[p.keyName]=p;else if(p.className!=null&&(l[p.className]=p),p.tagName!=null){Array.isArray(p.tagName)?p.tagName=p.tagName.map(function(g){return g.toUpperCase()}):p.tagName=p.tagName.toUpperCase();var y=Array.isArray(p.tagName)?p.tagName:[p.tagName];y.forEach(function(g){(u[g]==null||p.className==null)&&(u[g]=p)})}return p}r.register=v},function(n,r,i){var o=i(51),s=i(11),a=i(3),l=i(20),u=String.fromCharCode(0),c=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};c.prototype.insert=function(h,f){var d={};return h.length===0?this:(d.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(d.attributes=f),this.push(d))},c.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},c.prototype.retain=function(h,f){if(h<=0)return this;var d={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(d.attributes=f),this.push(d)},c.prototype.push=function(h){var f=this.ops.length,d=this.ops[f-1];if(h=a(!0,{},h),typeof d=="object"){if(typeof h.delete=="number"&&typeof d.delete=="number")return this.ops[f-1]={delete:d.delete+h.delete},this;if(typeof d.delete=="number"&&h.insert!=null&&(f-=1,d=this.ops[f-1],typeof d!="object"))return this.ops.unshift(h),this;if(s(h.attributes,d.attributes)){if(typeof h.insert=="string"&&typeof d.insert=="string")return this.ops[f-1]={insert:d.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof d.retain=="number")return this.ops[f-1]={retain:d.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this},c.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},c.prototype.filter=function(h){return this.ops.filter(h)},c.prototype.forEach=function(h){this.ops.forEach(h)},c.prototype.map=function(h){return this.ops.map(h)},c.prototype.partition=function(h){var f=[],d=[];return this.forEach(function(w){var v=h(w)?f:d;v.push(w)}),[f,d]},c.prototype.reduce=function(h,f){return this.ops.reduce(h,f)},c.prototype.changeLength=function(){return this.reduce(function(h,f){return f.insert?h+l.length(f):f.delete?h-f.delete:h},0)},c.prototype.length=function(){return this.reduce(function(h,f){return h+l.length(f)},0)},c.prototype.slice=function(h,f){h=h||0,typeof f!="number"&&(f=1/0);for(var d=[],w=l.iterator(this.ops),v=0;v0&&d.next(v.retain-E)}for(var m=new c(w);f.hasNext()||d.hasNext();)if(d.peekType()==="insert")m.push(d.next());else if(f.peekType()==="delete")m.push(f.next());else{var p=Math.min(f.peekLength(),d.peekLength()),y=f.next(p),g=d.next(p);if(typeof g.retain=="number"){var _={};typeof y.retain=="number"?_.retain=p:_.insert=y.insert;var k=l.attributes.compose(y.attributes,g.attributes,typeof y.retain=="number");if(k&&(_.attributes=k),m.push(_),!d.hasNext()&&s(m.ops[m.ops.length-1],_)){var S=new c(f.rest());return m.concat(S).chop()}}else typeof g.delete=="number"&&typeof y.retain=="number"&&m.push(g)}return m.chop()},c.prototype.concat=function(h){var f=new c(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f},c.prototype.diff=function(h,f){if(this.ops===h.ops)return new c;var d=[this,h].map(function(p){return p.map(function(y){if(y.insert!=null)return typeof y.insert=="string"?y.insert:u;var g=p===h?"on":"with";throw new Error("diff() called "+g+" non-document")}).join("")}),w=new c,v=o(d[0],d[1],f),E=l.iterator(this.ops),m=l.iterator(h.ops);return v.forEach(function(p){for(var y=p[1].length;y>0;){var g=0;switch(p[0]){case o.INSERT:g=Math.min(m.peekLength(),y),w.push(m.next(g));break;case o.DELETE:g=Math.min(y,E.peekLength()),E.next(g),w.delete(g);break;case o.EQUAL:g=Math.min(E.peekLength(),m.peekLength(),y);var _=E.next(g),k=m.next(g);s(_.insert,k.insert)?w.retain(g,l.attributes.diff(_.attributes,k.attributes)):w.push(k).delete(g);break}y-=g}}),w.chop()},c.prototype.eachLine=function(h,f){f=f||` +`;for(var d=l.iterator(this.ops),w=new c,v=0;d.hasNext();){if(d.peekType()!=="insert")return;var E=d.peek(),m=l.length(E)-d.peekLength(),p=typeof E.insert=="string"?E.insert.indexOf(f,m)-m:-1;if(p<0)w.push(d.next());else if(p>0)w.push(d.next(p));else{if(h(w,d.next(1).attributes||{},v)===!1)return;v+=1,w=new c}}w.length()>0&&h(w,{},v)},c.prototype.transform=function(h,f){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);for(var d=l.iterator(this.ops),w=l.iterator(h.ops),v=new c;d.hasNext()||w.hasNext();)if(d.peekType()==="insert"&&(f||w.peekType()!=="insert"))v.retain(l.length(d.next()));else if(w.peekType()==="insert")v.push(w.next());else{var E=Math.min(d.peekLength(),w.peekLength()),m=d.next(E),p=w.next(E);if(m.delete)continue;p.delete?v.push(p):v.retain(E,l.attributes.transform(m.attributes,p.attributes,f))}return v.chop()},c.prototype.transformPosition=function(h,f){f=!!f;for(var d=l.iterator(this.ops),w=0;d.hasNext()&&w<=h;){var v=d.peekLength(),E=d.peekType();if(d.next(),E==="delete"){h-=Math.min(v,h-w);continue}else E==="insert"&&(w"u"||i.call(d,E)},c=function(d,w){s&&w.name==="__proto__"?s(d,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):d[w.name]=w.newValue},h=function(d,w){if(w==="__proto__")if(i.call(d,w)){if(a)return a(d,w).value}else return;return d[w]};n.exports=function f(){var d,w,v,E,m,p,y=arguments[0],g=1,_=arguments.length,k=!1;for(typeof y=="boolean"&&(k=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<_;++g)if(d=arguments[g],d!=null)for(w in d)v=h(y,w),E=h(d,w),y!==E&&(k&&E&&(u(E)||(m=l(E)))?(m?(m=!1,p=v&&l(v)?v:[]):p=v&&u(v)?v:{},c(y,{name:w,newValue:f(k,p,E)})):typeof E<"u"&&c(y,{name:w,newValue:E}));return y}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var o=function(){function b(N,C){for(var P=0;P0&&(P1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(P===0||P>=this.length()-S)){var z=this.clone();return P===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var B=s(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"split",this).call(this,P,F);return this.cache={},B}}}]),N}(f.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[E.default,f.default.Embed,p.default];function I(b){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(N=(0,l.default)(N,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?N:I(b.parent,N)}r.bubbleFormats=I,r.BlockEmbed=T,r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},s=function(){function j(M,O){var D=[],$=!0,V=!1,q=void 0;try{for(var R=M[Symbol.iterator](),U;!($=(U=R.next()).done)&&(D.push(U.value),!(O&&D.length===O));$=!0);}catch(K){V=!0,q=K}finally{try{!$&&R.return&&R.return()}finally{if(V)throw q}}return D}return function(M,O){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return j(M,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function j(M,O){for(var D=0;D2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof O!="string"){var q=O.attrName||O.blotName;typeof q=="string"?this.register("formats/"+q,O,D):Object.keys(O).forEach(function(R){$.register(R,O[R],D)})}else this.imports[O]!=null&&!V&&C.warn("Overwriting "+O+" with",D),this.imports[O]=D,(O.startsWith("blots/")||O.startsWith("formats/"))&&D.blotName!=="abstract"?m.default.register(D):O.startsWith("modules")&&typeof D.register=="function"&&D.register()}}]);function j(M){var O=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(N(this,j),this.options=F(M,D),this.container=this.options.container,this.container==null)return C.error("Invalid Quill container",M);this.options.debug&&j.debug(this.options.debug);var $=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new d.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new y.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(d.default.events.EDITOR_CHANGE,function(q){q===d.default.events.TEXT_CHANGE&&O.root.classList.toggle("ql-blank",O.editor.isBlank())}),this.emitter.on(d.default.events.SCROLL_UPDATE,function(q,R){var U=O.selection.lastRange,K=U&&U.length===0?U.index:void 0;z.call(O,function(){return O.editor.update(null,R,K)},q)});var V=this.clipboard.convert(`
`+$+"


");this.setContents(V),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return a(j,[{key:"addContainer",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof O=="string"){var $=O;O=document.createElement("div"),O.classList.add($)}return this.container.insertBefore(O,D),O}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(O,D,$){var V=this,q=B(O,D,$),R=s(q,4);return O=R[0],D=R[1],$=R[3],z.call(this,function(){return V.editor.deleteText(O,D)},$,O,-1*D)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(O),this.container.classList.toggle("ql-disabled",!O)}},{key:"focus",value:function(){var O=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=O,this.scrollIntoView()}},{key:"format",value:function(O,D){var $=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.default.sources.API;return z.call(this,function(){var q=$.getSelection(!0),R=new u.default;if(q==null)return R;if(m.default.query(O,m.default.Scope.BLOCK))R=$.editor.formatLine(q.index,q.length,b({},O,D));else{if(q.length===0)return $.selection.format(O,D),R;R=$.editor.formatText(q.index,q.length,b({},O,D))}return $.setSelection(q,d.default.sources.SILENT),R},V)}},{key:"formatLine",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,D,$,V,q),W=s(K,4);return O=W[0],D=W[1],U=W[2],q=W[3],z.call(this,function(){return R.editor.formatLine(O,D,U)},q,O,0)}},{key:"formatText",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,D,$,V,q),W=s(K,4);return O=W[0],D=W[1],U=W[2],q=W[3],z.call(this,function(){return R.editor.formatText(O,D,U)},q,O,0)}},{key:"getBounds",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=void 0;typeof O=="number"?$=this.selection.getBounds(O,D):$=this.selection.getBounds(O.index,O.length);var V=this.container.getBoundingClientRect();return{bottom:$.bottom-V.top,height:$.height,left:$.left-V.left,right:$.right-V.left,top:$.top-V.top,width:$.width}}},{key:"getContents",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-O,$=B(O,D),V=s($,2);return O=V[0],D=V[1],this.editor.getContents(O,D)}},{key:"getFormat",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof O=="number"?this.editor.getFormat(O,D):this.editor.getFormat(O.index,O.length)}},{key:"getIndex",value:function(O){return O.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(O){return this.scroll.leaf(O)}},{key:"getLine",value:function(O){return this.scroll.line(O)}},{key:"getLines",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof O!="number"?this.scroll.lines(O.index,O.length):this.scroll.lines(O,D)}},{key:"getModule",value:function(O){return this.theme.modules[O]}},{key:"getSelection",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return O&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-O,$=B(O,D),V=s($,2);return O=V[0],D=V[1],this.editor.getText(O,D)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(O,D,$){var V=this,q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j.sources.API;return z.call(this,function(){return V.editor.insertEmbed(O,D,$)},q,O)}},{key:"insertText",value:function(O,D,$,V,q){var R=this,U=void 0,K=B(O,0,$,V,q),W=s(K,4);return O=W[0],U=W[2],q=W[3],z.call(this,function(){return R.editor.insertText(O,D,U)},q,O,D.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(O,D,$){this.clipboard.dangerouslyPasteHTML(O,D,$)}},{key:"removeFormat",value:function(O,D,$){var V=this,q=B(O,D,$),R=s(q,4);return O=R[0],D=R[1],$=R[3],z.call(this,function(){return V.editor.removeFormat(O,D)},$,O)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(O){var D=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return z.call(this,function(){O=new u.default(O);var V=D.getLength(),q=D.editor.deleteText(0,V),R=D.editor.applyDelta(O),U=R.ops[R.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` +`&&(D.editor.deleteText(D.getLength()-1,1),R.delete(1));var K=q.compose(R);return K},$)}},{key:"setSelection",value:function(O,D,$){if(O==null)this.selection.setRange(null,D||j.sources.API);else{var V=B(O,D,$),q=s(V,4);O=q[0],D=q[1],$=q[3],this.selection.setRange(new p.Range(O,D),$),$!==d.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API,$=new u.default().insert(O);return this.setContents($,D)}},{key:"update",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.default.sources.USER,D=this.scroll.update(O);return this.selection.update(O),D}},{key:"updateContents",value:function(O){var D=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.default.sources.API;return z.call(this,function(){return O=new u.default(O),D.editor.applyDelta(O,$)},$,!0)}}]),j}();P.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},P.events=d.default.events,P.sources=d.default.sources,P.version="1.3.7",P.imports={delta:u.default,parchment:m.default,"core/module":v.default,"core/theme":x.default};function F(j,M){if(M=(0,_.default)(!0,{container:j,modules:{clipboard:!0,keyboard:!0,history:!0}},M),!M.theme||M.theme===P.DEFAULTS.theme)M.theme=x.default;else if(M.theme=P.import("themes/"+M.theme),M.theme==null)throw new Error("Invalid theme "+M.theme+". Did you register it?");var O=(0,_.default)(!0,{},M.theme.DEFAULTS);[O,M].forEach(function(V){V.modules=V.modules||{},Object.keys(V.modules).forEach(function(q){V.modules[q]===!0&&(V.modules[q]={})})});var D=Object.keys(O.modules).concat(Object.keys(M.modules)),$=D.reduce(function(V,q){var R=P.import("modules/"+q);return R==null?C.error("Cannot load "+q+" module. Are you sure you registered it?"):V[q]=R.DEFAULTS||{},V},{});return M.modules!=null&&M.modules.toolbar&&M.modules.toolbar.constructor!==Object&&(M.modules.toolbar={container:M.modules.toolbar}),M=(0,_.default)(!0,{},P.DEFAULTS,{modules:$},O,M),["bounds","container","scrollingContainer"].forEach(function(V){typeof M[V]=="string"&&(M[V]=document.querySelector(M[V]))}),M.modules=Object.keys(M.modules).reduce(function(V,q){return M.modules[q]&&(V[q]=M.modules[q]),V},{}),M}function z(j,M,O,D){if(this.options.strict&&!this.isEnabled()&&M===d.default.sources.USER)return new u.default;var $=O==null?null:this.getSelection(),V=this.editor.delta,q=j();if($!=null&&(O===!0&&(O=$.index),D==null?$=H($,q,M):D!==0&&($=H($,O,D,M)),this.setSelection($,d.default.sources.SILENT)),q.length()>0){var R,U=[d.default.events.TEXT_CHANGE,q,V,M];if((R=this.emitter).emit.apply(R,[d.default.events.EDITOR_CHANGE].concat(U)),M!==d.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,U)}}return q}function B(j,M,O,D,$){var V={};return typeof j.index=="number"&&typeof j.length=="number"?typeof M!="number"?($=D,D=O,O=M,M=j.length,j=j.index):(M=j.length,j=j.index):typeof M!="number"&&($=D,D=O,O=M,M=0),(typeof O>"u"?"undefined":o(O))==="object"?(V=O,$=D):typeof O=="string"&&(D!=null?V[O]=D:$=O),$=$||d.default.sources.API,[j,M,V,$]}function H(j,M,O,D){if(j==null)return null;var $=void 0,V=void 0;if(M instanceof u.default){var q=[j.index,j.index+j.length].map(function(W){return M.transformPosition(W,D!==d.default.sources.USER)}),R=s(q,2);$=R[0],V=R[1]}else{var U=[j.index,j.index+j.length].map(function(W){return W=0?W+O:Math.max(M,W+O)}),K=s(U,2);$=K[0],V=K[1]}return new p.Range($,V-$)}r.expandConfig=F,r.overload=B,r.default=P},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function E(m,p){for(var y=0;y0){var g=this.parent.isolate(this.offset(),this.length());this.moveChildren(g),g.wrap(this)}}}],[{key:"compare",value:function(y,g){var _=m.order.indexOf(y),k=m.order.indexOf(g);return _>=0||k>=0?_-k:y===g?0:y1?k-1:0),T=1;T1&&arguments[1]!==void 0?arguments[1]:{};o(this,a),this.quill=l,this.options=u};s.DEFAULTS={},r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=["error","warn","log","info"],s="warn";function a(u){if(o.indexOf(u)<=o.indexOf(s)){for(var c,h=arguments.length,f=Array(h>1?h-1:0),d=1;d0&&typeof f[0]!="number")}function h(f,d,w){var v,E;if(u(f)||u(d)||f.prototype!==d.prototype)return!1;if(a(f))return a(d)?(f=o.call(f),d=o.call(d),l(f,d,w)):!1;if(c(f)){if(!c(d)||f.length!==d.length)return!1;for(v=0;v=0;v--)if(m[v]!=p[v])return!1;for(v=m.length-1;v>=0;v--)if(E=m[v],!l(f[E],d[E],w))return!1;return typeof f==typeof d}},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),s=function(){function a(l,u,c){c===void 0&&(c={}),this.attrName=l,this.keyName=u;var h=o.Scope.TYPE&o.Scope.ATTRIBUTE;c.scope!=null?this.scope=c.scope&o.Scope.LEVEL|h:this.scope=o.Scope.ATTRIBUTE,c.whitelist!=null&&(this.whitelist=c.whitelist)}return a.keys=function(l){return[].map.call(l.attributes,function(u){return u.name})},a.prototype.add=function(l,u){return this.canAdd(l,u)?(l.setAttribute(this.keyName,u),!0):!1},a.prototype.canAdd=function(l,u){var c=o.query(l,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return c==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},a.prototype.remove=function(l){l.removeAttribute(this.keyName)},a.prototype.value=function(l){var u=l.getAttribute(this.keyName);return this.canAdd(l,u)&&u?u:""},a}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var o=function(){function T(x,I){var b=[],N=!0,C=!1,P=void 0;try{for(var F=x[Symbol.iterator](),z;!(N=(z=F.next()).done)&&(b.push(z.value),!(I&&b.length===I));N=!0);}catch(B){C=!0,P=B}finally{try{!N&&F.return&&F.return()}finally{if(C)throw P}}return b}return function(x,I){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(x,I){for(var b=0;b=b+N)){var z=this.newlineIndex(b,!0)+1,B=F-z+1,H=this.isolate(z,B),j=H.next;H.format(C,P),j instanceof x&&j.formatAt(0,b-z+N-B,C,P)}}}},{key:"insertAt",value:function(b,N,C){if(C==null){var P=this.descendant(m.default,b),F=o(P,2),z=F[0],B=F[1];z.insertAt(B,N)}}},{key:"length",value:function(){var b=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` @@ -3461,20 +3461,20 @@ This typically indicates that your device does not have a healthy Internet conne `);var C=this.domNode.textContent.slice(b).indexOf(` `);return C>-1?b+C:-1}},{key:"optimize",value:function(b){this.domNode.textContent.endsWith(` `)||this.appendChild(h.default.create("text",` -`)),a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,b);var N=this.next;N!=null&&N.prev===this&&N.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===N.statics.formats(N.domNode)&&(N.optimize(b),N.moveChildren(this),N.remove())}},{key:"replace",value:function(b){a(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,b),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(N){var C=h.default.find(N);C==null?N.parentNode.removeChild(N):C instanceof h.default.Embed?C.remove():C.unwrap()})}}],[{key:"create",value:function(b){var N=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,b);return N.setAttribute("spellcheck",!1),N}},{key:"formats",value:function(){return!0}}]),x}(d.default);S.blotName="code-block",S.tagName="PRE",S.TAB=" ",r.Code=k,r.default=S},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},s=function(){function j(M,O){var D=[],$=!0,V=!1,q=void 0;try{for(var R=M[Symbol.iterator](),U;!($=(U=R.next()).done)&&(D.push(U.value),!(O&&D.length===O));$=!0);}catch(K){V=!0,q=K}finally{try{!$&&R.return&&R.return()}finally{if(V)throw q}}return D}return function(M,O){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return j(M,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function j(M,O){for(var D=0;D=V&&!W.endsWith(` `)&&($=!0),D.scroll.insertAt(q,W);var X=D.scroll.line(q),ne=s(X,2),ue=ne[0],he=ne[1],le=(0,b.default)({},(0,p.bubbleFormats)(ue));if(ue instanceof y.default){var Te=ue.descendant(d.default.Leaf,he),Et=s(Te,1),Xe=Et[0];le=(0,b.default)(le,(0,p.bubbleFormats)(Xe))}K=h.default.attributes.diff(le,K)||{}}else if(o(R.insert)==="object"){var G=Object.keys(R.insert)[0];if(G==null)return q;D.scroll.insertAt(q,G,R.insert[G])}V+=U}return Object.keys(K).forEach(function(Q){D.scroll.formatAt(q,U,Q,K[Q])}),q+U},0),O.reduce(function(q,R){return typeof R.delete=="number"?(D.scroll.deleteAt(q,R.delete),q):q+(R.retain||R.insert.length||1)},0),this.scroll.batchEnd(),this.update(O)}},{key:"deleteText",value:function(O,D){return this.scroll.deleteAt(O,D),this.update(new u.default().retain(O).delete(D))}},{key:"formatLine",value:function(O,D){var $=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(V).forEach(function(q){if(!($.scroll.whitelist!=null&&!$.scroll.whitelist[q])){var R=$.scroll.lines(O,Math.max(D,1)),U=D;R.forEach(function(K){var W=K.length();if(!(K instanceof v.default))K.format(q,V[q]);else{var X=O-K.offset($.scroll),ne=K.newlineIndex(X+U)-X+1;K.formatAt(X,ne,q,V[q])}U-=W})}}),this.scroll.optimize(),this.update(new u.default().retain(O).retain(D,(0,S.default)(V)))}},{key:"formatText",value:function(O,D){var $=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(V).forEach(function(q){$.scroll.formatAt(O,D,q,V[q])}),this.update(new u.default().retain(O).retain(D,(0,S.default)(V)))}},{key:"getContents",value:function(O,D){return this.delta.slice(O,O+D)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(O,D){return O.concat(D.delta())},new u.default)}},{key:"getFormat",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=[],V=[];D===0?this.scroll.path(O).forEach(function(R){var U=s(R,1),K=U[0];K instanceof y.default?$.push(K):K instanceof d.default.Leaf&&V.push(K)}):($=this.scroll.lines(O,D),V=this.scroll.descendants(d.default.Leaf,O,D));var q=[$,V].map(function(R){if(R.length===0)return{};for(var U=(0,p.bubbleFormats)(R.shift());Object.keys(U).length>0;){var K=R.shift();if(K==null)return U;U=B((0,p.bubbleFormats)(K),U)}return U});return b.default.apply(b.default,q)}},{key:"getText",value:function(O,D){return this.getContents(O,D).filter(function($){return typeof $.insert=="string"}).map(function($){return $.insert}).join("")}},{key:"insertEmbed",value:function(O,D,$){return this.scroll.insertAt(O,D,$),this.update(new u.default().retain(O).insert(C({},D,$)))}},{key:"insertText",value:function(O,D){var $=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D=D.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(O,D),Object.keys(V).forEach(function(q){$.scroll.formatAt(O,D.length,q,V[q])}),this.update(new u.default().retain(O).insert(D,(0,S.default)(V)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var O=this.scroll.children.head;return O.statics.blotName!==y.default.blotName||O.children.length>1?!1:O.children.head instanceof _.default}},{key:"removeFormat",value:function(O,D){var $=this.getText(O,D),V=this.scroll.line(O+D),q=s(V,2),R=q[0],U=q[1],K=0,W=new u.default;R!=null&&(R instanceof v.default?K=R.newlineIndex(U)-U+1:K=R.length()-U,W=R.delta().slice(U,U+K-1).insert(` `));var X=this.getContents(O,D+K),ne=X.diff(new u.default().insert($).concat(W)),ue=new u.default().retain(O).concat(ne);return this.applyDelta(ue)}},{key:"update",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,V=this.delta;if(D.length===1&&D[0].type==="characterData"&&D[0].target.data.match(F)&&d.default.find(D[0].target)){var q=d.default.find(D[0].target),R=(0,p.bubbleFormats)(q),U=q.offset(this.scroll),K=D[0].oldValue.replace(m.default.CONTENTS,""),W=new u.default().insert(K),X=new u.default().insert(q.value()),ne=new u.default().retain(U).concat(W.diff(X,$));O=ne.reduce(function(ue,he){return he.insert?ue.insert(he.insert,R):ue.push(he)},new u.default),this.delta=V.compose(O)}else this.delta=this.getDelta(),(!O||!(0,x.default)(V.compose(O),this.delta))&&(O=V.diff(this.delta,$));return O}}]),j}();function B(j,M){return Object.keys(M).reduce(function(O,D){return j[D]==null||(M[D]===j[D]?O[D]=M[D]:Array.isArray(M[D])?M[D].indexOf(j[D])<0&&(O[D]=M[D].concat([j[D]])):O[D]=[M[D],j[D]]),O},{})}function H(j){return j.reduce(function(M,O){if(O.insert===1){var D=(0,S.default)(O.attributes);return delete D.image,M.insert({image:O.attributes.image},D)}if(O.attributes!=null&&(O.attributes.list===!0||O.attributes.bullet===!0)&&(O=(0,S.default)(O),O.attributes.list?O.attributes.list="ordered":(O.attributes.list="bullet",delete O.attributes.bullet)),typeof O.insert=="string"){var $=O.insert.replace(/\r\n/g,` `).replace(/\r/g,` -`);return M.insert($,O.attributes)}return M.push(O)},new u.default)}r.default=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var o=function(){function T(x,I){var b=[],N=!0,C=!1,P=void 0;try{for(var F=x[Symbol.iterator](),z;!(N=(z=F.next()).done)&&(b.push(z.value),!(I&&b.length===I));N=!0);}catch(B){C=!0,P=B}finally{try{!N&&F.return&&F.return()}finally{if(C)throw P}}return b}return function(x,I){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(x,I){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;y(this,T),this.index=x,this.length=I},k=function(){function T(x,I){var b=this;y(this,T),this.emitter=I,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=l.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,w.default.sources.USER),1)}),this.emitter.on(w.default.events.EDITOR_CHANGE,function(N,C){N===w.default.events.TEXT_CHANGE&&C.length()>0&&b.update(w.default.sources.SILENT)}),this.emitter.on(w.default.events.SCROLL_BEFORE_UPDATE,function(){if(b.hasFocus()){var N=b.getNativeRange();N!=null&&N.start.node!==b.cursor.textNode&&b.emitter.once(w.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(N.start.node,N.start.offset,N.end.node,N.end.offset)}catch{}})}}),this.emitter.on(w.default.events.SCROLL_OPTIMIZE,function(N,C){if(C.range){var P=C.range,F=P.startNode,z=P.startOffset,B=P.endNode,H=P.endOffset;b.setNativeRange(F,z,B,H)}}),this.update(w.default.sources.SILENT)}return s(T,[{key:"handleComposition",value:function(){var I=this;this.root.addEventListener("compositionstart",function(){I.composing=!0}),this.root.addEventListener("compositionend",function(){if(I.composing=!1,I.cursor.parent){var b=I.cursor.restore();if(!b)return;setTimeout(function(){I.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var I=this;this.emitter.listenDOM("mousedown",document.body,function(){I.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){I.mouseDown=!1,I.update(w.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(I,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[I])){this.scroll.update();var N=this.getNativeRange();if(!(N==null||!N.native.collapsed||l.default.query(I,l.default.Scope.BLOCK))){if(N.start.node!==this.cursor.textNode){var C=l.default.find(N.start.node,!1);if(C==null)return;if(C instanceof l.default.Leaf){var P=C.split(N.start.offset);C.parent.insertBefore(this.cursor,P)}else C.insertBefore(this.cursor,N.start.node);this.cursor.attach()}this.cursor.format(I,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(I){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=this.scroll.length();I=Math.min(I,N-1),b=Math.min(I+b,N-1)-I;var C=void 0,P=this.scroll.leaf(I),F=o(P,2),z=F[0],B=F[1];if(z==null)return null;var H=z.position(B,!0),j=o(H,2);C=j[0],B=j[1];var M=document.createRange();if(b>0){M.setStart(C,B);var O=this.scroll.leaf(I+b),D=o(O,2);if(z=D[0],B=D[1],z==null)return null;var $=z.position(B,!0),V=o($,2);return C=V[0],B=V[1],M.setEnd(C,B),M.getBoundingClientRect()}else{var q="left",R=void 0;return C instanceof Text?(B0&&(q="right")),{bottom:R.top+R.height,height:R.height,left:R[q],right:R[q],top:R.top,width:0}}}},{key:"getNativeRange",value:function(){var I=document.getSelection();if(I==null||I.rangeCount<=0)return null;var b=I.getRangeAt(0);if(b==null)return null;var N=this.normalizeNative(b);return g.info("getNativeRange",N),N}},{key:"getRange",value:function(){var I=this.getNativeRange();if(I==null)return[null,null];var b=this.normalizedToRange(I);return[b,I]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(I){var b=this,N=[[I.start.node,I.start.offset]];I.native.collapsed||N.push([I.end.node,I.end.offset]);var C=N.map(function(z){var B=o(z,2),H=B[0],j=B[1],M=l.default.find(H,!0),O=M.offset(b.scroll);return j===0?O:M instanceof l.default.Container?O+M.length():O+M.index(H,j)}),P=Math.min(Math.max.apply(Math,p(C)),this.scroll.length()-1),F=Math.min.apply(Math,[P].concat(p(C)));return new _(F,P-F)}},{key:"normalizeNative",value:function(I){if(!S(this.root,I.startContainer)||!I.collapsed&&!S(this.root,I.endContainer))return null;var b={start:{node:I.startContainer,offset:I.startOffset},end:{node:I.endContainer,offset:I.endOffset},native:I};return[b.start,b.end].forEach(function(N){for(var C=N.node,P=N.offset;!(C instanceof Text)&&C.childNodes.length>0;)if(C.childNodes.length>P)C=C.childNodes[P],P=0;else if(C.childNodes.length===P)C=C.lastChild,P=C instanceof Text?C.data.length:C.childNodes.length+1;else break;N.node=C,N.offset=P}),b}},{key:"rangeToNative",value:function(I){var b=this,N=I.collapsed?[I.index]:[I.index,I.index+I.length],C=[],P=this.scroll.length();return N.forEach(function(F,z){F=Math.min(P-1,F);var B=void 0,H=b.scroll.leaf(F),j=o(H,2),M=j[0],O=j[1],D=M.position(O,z!==0),$=o(D,2);B=$[0],O=$[1],C.push(B,O)}),C.length<2&&(C=C.concat(C)),C}},{key:"scrollIntoView",value:function(I){var b=this.lastRange;if(b!=null){var N=this.getBounds(b.index,b.length);if(N!=null){var C=this.scroll.length()-1,P=this.scroll.line(Math.min(b.index,C)),F=o(P,1),z=F[0],B=z;if(b.length>0){var H=this.scroll.line(Math.min(b.index+b.length,C)),j=o(H,1);B=j[0]}if(!(z==null||B==null)){var M=I.getBoundingClientRect();N.topM.bottom&&(I.scrollTop+=N.bottom-M.bottom)}}}}},{key:"setNativeRange",value:function(I,b){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(g.info("setNativeRange",I,b,N,C),!(I!=null&&(this.root.parentNode==null||I.parentNode==null||N.parentNode==null))){var F=document.getSelection();if(F!=null)if(I!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||P||I!==z.startContainer||b!==z.startOffset||N!==z.endContainer||C!==z.endOffset){I.tagName=="BR"&&(b=[].indexOf.call(I.parentNode.childNodes,I),I=I.parentNode),N.tagName=="BR"&&(C=[].indexOf.call(N.parentNode.childNodes,N),N=N.parentNode);var B=document.createRange();B.setStart(I,b),B.setEnd(N,C),F.removeAllRanges(),F.addRange(B)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(I){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.default.sources.API;if(typeof b=="string"&&(N=b,b=!1),g.info("setRange",I),I!=null){var C=this.rangeToNative(I);this.setNativeRange.apply(this,p(C).concat([b]))}else this.setNativeRange(null);this.update(N)}},{key:"update",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.default.sources.USER,b=this.lastRange,N=this.getRange(),C=o(N,2),P=C[0],F=C[1];if(this.lastRange=P,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(b,this.lastRange)){var z;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var B=[w.default.events.SELECTION_CHANGE,(0,f.default)(this.lastRange),(0,f.default)(b),I];if((z=this.emitter).emit.apply(z,[w.default.events.EDITOR_CHANGE].concat(B)),I!==w.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,B)}}}}]),T}();function S(T,x){try{x.parentNode}catch{return!1}return x instanceof Text&&(x=x.parentNode),T.contains(x)}r.Range=_,r.default=k},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function w(v,E){for(var m=0;m0&&(d+=1),[this.parent.domNode,d]},f.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},f.scope=a.Scope.INLINE_BLOT,f}(s.default);r.default=l},function(n,r,i){var o=i(11),s=i(3),a={attributes:{compose:function(u,f,h){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});var c=s(!0,{},f);h||(c=Object.keys(c).reduce(function(w,v){return c[v]!=null&&(w[v]=c[v]),w},{}));for(var d in u)u[d]!==void 0&&f[d]===void 0&&(c[d]=u[d]);return Object.keys(c).length>0?c:void 0},diff:function(u,f){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});var h=Object.keys(u).concat(Object.keys(f)).reduce(function(c,d){return o(u[d],f[d])||(c[d]=f[d]===void 0?null:f[d]),c},{});return Object.keys(h).length>0?h:void 0},transform:function(u,f,h){if(typeof u!="object")return f;if(typeof f=="object"){if(!h)return f;var c=Object.keys(f).reduce(function(d,w){return u[w]===void 0&&(d[w]=f[w]),d},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(u){return new l(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function l(u){this.ops=u,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(u){u||(u=1/0);var f=this.ops[this.index];if(f){var h=this.offset,c=a.length(f);if(u>=c-h?(u=c-h,this.index+=1,this.offset=0):this.offset+=u,typeof f.delete=="number")return{delete:u};var d={};return f.attributes&&(d.attributes=f.attributes),typeof f.retain=="number"?d.retain=u:typeof f.insert=="string"?d.insert=f.insert.substr(h,u):d.insert=f.insert,d}else return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,f=this.index,h=this.next(),c=this.ops.slice(this.index);return this.offset=u,this.index=f,[h].concat(c)}else return[]},n.exports=a},function(n,r){var i=function(){function o(v,E){return E!=null&&v instanceof E}var s;try{s=Map}catch{s=function(){}}var a;try{a=Set}catch{a=function(){}}var l;try{l=Promise}catch{l=function(){}}function u(v,E,m,p,y){typeof E=="object"&&(m=E.depth,p=E.prototype,y=E.includeNonEnumerable,E=E.circular);var g=[],_=[],k=typeof Buffer<"u";typeof E>"u"&&(E=!0),typeof m>"u"&&(m=1/0);function S(T,x){if(T===null)return null;if(x===0)return T;var I,b;if(typeof T!="object")return T;if(o(T,s))I=new s;else if(o(T,a))I=new a;else if(o(T,l))I=new l(function(M,O){T.then(function(D){M(S(D,x-1))},function(D){O(S(D,x-1))})});else if(u.__isArray(T))I=[];else if(u.__isRegExp(T))I=new RegExp(T.source,w(T)),T.lastIndex&&(I.lastIndex=T.lastIndex);else if(u.__isDate(T))I=new Date(T.getTime());else{if(k&&Buffer.isBuffer(T))return Buffer.allocUnsafe?I=Buffer.allocUnsafe(T.length):I=new Buffer(T.length),T.copy(I),I;o(T,Error)?I=Object.create(T):typeof p>"u"?(b=Object.getPrototypeOf(T),I=Object.create(b)):(I=Object.create(p),b=p)}if(E){var N=g.indexOf(T);if(N!=-1)return _[N];g.push(T),_.push(I)}o(T,s)&&T.forEach(function(M,O){var D=S(O,x-1),$=S(M,x-1);I.set(D,$)}),o(T,a)&&T.forEach(function(M){var O=S(M,x-1);I.add(O)});for(var C in T){var P;b&&(P=Object.getOwnPropertyDescriptor(b,C)),!(P&&P.set==null)&&(I[C]=S(T[C],x-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(T),C=0;C0){if(B instanceof c.BlockEmbed||O instanceof c.BlockEmbed){this.optimize();return}if(B instanceof m.default){var D=B.newlineIndex(B.length(),!0);if(D>-1&&(B=B.split(D+1),B===O)){this.optimize();return}}else if(O instanceof m.default){var $=O.newlineIndex(0);$>-1&&O.split($+1)}var V=O.children.head instanceof v.default?null:O.children.head;B.moveChildren(O,V),B.remove()}this.optimize()}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",C)}},{key:"formatAt",value:function(C,P,F,z){this.whitelist!=null&&!this.whitelist[F]||(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,C,P,F,z),this.optimize())}},{key:"insertAt",value:function(C,P,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[P])){if(C>=this.length())if(F==null||u.default.query(P,u.default.Scope.BLOCK)==null){var z=u.default.create(this.statics.defaultChild);this.appendChild(z),F==null&&P.endsWith(` -`)&&(P=P.slice(0,-1)),z.insertAt(0,P,F)}else{var B=u.default.create(P,F);this.appendChild(B)}else a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,C,P,F);this.optimize()}}},{key:"insertBefore",value:function(C,P){if(C.statics.scope===u.default.Scope.INLINE_BLOT){var F=u.default.create(this.statics.defaultChild);F.appendChild(C),C=F}a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,C,P)}},{key:"leaf",value:function(C){return this.path(C).pop()||[null,-1]}},{key:"line",value:function(C){return C===this.length()?this.line(C-1):this.descendant(T,C)}},{key:"lines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function z(B,H,j){var M=[],O=j;return B.children.forEachAt(H,j,function(D,$,V){T(D)?M.push(D):D instanceof u.default.Container&&(M=M.concat(z(D,$,O))),O-=V}),M};return F(this,C,P)}},{key:"optimize",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,C,P),C.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,C,P))}},{key:"path",value:function(C){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,C).slice(1)}},{key:"update",value:function(C){if(this.batch!==!0){var P=h.default.sources.USER;typeof C=="string"&&(P=C),Array.isArray(C)||(C=this.observer.takeRecords()),C.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,P,C),a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,C.concat([])),C.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,P,C)}}}]),b}(u.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[d.default,c.BlockEmbed,y.default],r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s=function(){function R(U,K){var W=[],X=!0,ne=!1,ue=void 0;try{for(var he=U[Symbol.iterator](),le;!(X=(le=he.next()).done)&&(W.push(le.value),!(K&&W.length===K));X=!0);}catch(Te){ne=!0,ue=Te}finally{try{!X&&he.return&&he.return()}finally{if(ne)throw ue}}return W}return function(U,K){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return R(U,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(U,K){for(var W=0;W1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ue=q(W);if(ue==null||ue.key==null)return F.warn("Attempted to add invalid keyboard binding",ue);typeof X=="function"&&(X={handler:X}),typeof ne=="function"&&(ne={handler:ne}),ue=(0,d.default)(ue,X,ne),this.bindings[ue.key]=this.bindings[ue.key]||[],this.bindings[ue.key].push(ue)}},{key:"listen",value:function(){var W=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var ne=X.which||X.keyCode,ue=(W.bindings[ne]||[]).filter(function(Ue){return U.match(X,Ue)});if(ue.length!==0){var he=W.quill.getSelection();if(!(he==null||!W.quill.hasFocus())){var le=W.quill.getLine(he.index),Te=s(le,2),Et=Te[0],Xe=Te[1],G=W.quill.getLeaf(he.index),Q=s(G,2),re=Q[0],oe=Q[1],Z=he.length===0?[re,oe]:W.quill.getLeaf(he.index+he.length),Ee=s(Z,2),ve=Ee[0],_e=Ee[1],Ut=re instanceof y.default.Text?re.value().slice(0,oe):"",wn=ve instanceof y.default.Text?ve.value().slice(_e):"",Le={collapsed:he.length===0,empty:he.length===0&&Et.length()<=1,format:W.quill.getFormat(he),offset:Xe,prefix:Ut,suffix:wn},ml=ue.some(function(Ue){if(Ue.collapsed!=null&&Ue.collapsed!==Le.collapsed||Ue.empty!=null&&Ue.empty!==Le.empty||Ue.offset!=null&&Ue.offset!==Le.offset)return!1;if(Array.isArray(Ue.format)){if(Ue.format.every(function(En){return Le.format[En]==null}))return!1}else if(o(Ue.format)==="object"&&!Object.keys(Ue.format).every(function(En){return Ue.format[En]===!0?Le.format[En]!=null:Ue.format[En]===!1?Le.format[En]==null:(0,h.default)(Ue.format[En],Le.format[En])}))return!1;return Ue.prefix!=null&&!Ue.prefix.test(Le.prefix)||Ue.suffix!=null&&!Ue.suffix.test(Le.suffix)?!1:Ue.handler.call(W,he,Le)!==!0});ml&&X.preventDefault()}}}})}}]),U}(x.default);B.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},B.DEFAULTS={bindings:{bold:V("bold"),italic:V("italic"),underline:V("underline"),indent:{key:B.keys.TAB,format:["blockquote","indent","list"],handler:function(U,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:B.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",_.default.sources.USER)}},"outdent backspace":{key:B.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,K){K.format.indent!=null?this.quill.format("indent","-1",_.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":$(!0),"outdent code-block":$(!1),"remove tab":{key:B.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,_.default.sources.USER)}},tab:{key:B.keys.TAB,handler:function(U){this.quill.history.cutoff();var K=new v.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(K,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,_.default.sources.SILENT)}},"list empty enter":{key:B.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,K){this.quill.format("list",!1,_.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:B.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var K=this.quill.getLine(U.index),W=s(K,2),X=W[0],ne=W[1],ue=(0,d.default)({},X.formats(),{list:"checked"}),he=new v.default().retain(U.index).insert(` +`);return M.insert($,O.attributes)}return M.push(O)},new u.default)}r.default=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var o=function(){function T(x,I){var b=[],N=!0,C=!1,P=void 0;try{for(var F=x[Symbol.iterator](),z;!(N=(z=F.next()).done)&&(b.push(z.value),!(I&&b.length===I));N=!0);}catch(B){C=!0,P=B}finally{try{!N&&F.return&&F.return()}finally{if(C)throw P}}return b}return function(x,I){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return T(x,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function T(x,I){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;y(this,T),this.index=x,this.length=I},k=function(){function T(x,I){var b=this;y(this,T),this.emitter=I,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=l.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,w.default.sources.USER),1)}),this.emitter.on(w.default.events.EDITOR_CHANGE,function(N,C){N===w.default.events.TEXT_CHANGE&&C.length()>0&&b.update(w.default.sources.SILENT)}),this.emitter.on(w.default.events.SCROLL_BEFORE_UPDATE,function(){if(b.hasFocus()){var N=b.getNativeRange();N!=null&&N.start.node!==b.cursor.textNode&&b.emitter.once(w.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(N.start.node,N.start.offset,N.end.node,N.end.offset)}catch{}})}}),this.emitter.on(w.default.events.SCROLL_OPTIMIZE,function(N,C){if(C.range){var P=C.range,F=P.startNode,z=P.startOffset,B=P.endNode,H=P.endOffset;b.setNativeRange(F,z,B,H)}}),this.update(w.default.sources.SILENT)}return s(T,[{key:"handleComposition",value:function(){var I=this;this.root.addEventListener("compositionstart",function(){I.composing=!0}),this.root.addEventListener("compositionend",function(){if(I.composing=!1,I.cursor.parent){var b=I.cursor.restore();if(!b)return;setTimeout(function(){I.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var I=this;this.emitter.listenDOM("mousedown",document.body,function(){I.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){I.mouseDown=!1,I.update(w.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(I,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[I])){this.scroll.update();var N=this.getNativeRange();if(!(N==null||!N.native.collapsed||l.default.query(I,l.default.Scope.BLOCK))){if(N.start.node!==this.cursor.textNode){var C=l.default.find(N.start.node,!1);if(C==null)return;if(C instanceof l.default.Leaf){var P=C.split(N.start.offset);C.parent.insertBefore(this.cursor,P)}else C.insertBefore(this.cursor,N.start.node);this.cursor.attach()}this.cursor.format(I,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(I){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=this.scroll.length();I=Math.min(I,N-1),b=Math.min(I+b,N-1)-I;var C=void 0,P=this.scroll.leaf(I),F=o(P,2),z=F[0],B=F[1];if(z==null)return null;var H=z.position(B,!0),j=o(H,2);C=j[0],B=j[1];var M=document.createRange();if(b>0){M.setStart(C,B);var O=this.scroll.leaf(I+b),D=o(O,2);if(z=D[0],B=D[1],z==null)return null;var $=z.position(B,!0),V=o($,2);return C=V[0],B=V[1],M.setEnd(C,B),M.getBoundingClientRect()}else{var q="left",R=void 0;return C instanceof Text?(B0&&(q="right")),{bottom:R.top+R.height,height:R.height,left:R[q],right:R[q],top:R.top,width:0}}}},{key:"getNativeRange",value:function(){var I=document.getSelection();if(I==null||I.rangeCount<=0)return null;var b=I.getRangeAt(0);if(b==null)return null;var N=this.normalizeNative(b);return g.info("getNativeRange",N),N}},{key:"getRange",value:function(){var I=this.getNativeRange();if(I==null)return[null,null];var b=this.normalizedToRange(I);return[b,I]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(I){var b=this,N=[[I.start.node,I.start.offset]];I.native.collapsed||N.push([I.end.node,I.end.offset]);var C=N.map(function(z){var B=o(z,2),H=B[0],j=B[1],M=l.default.find(H,!0),O=M.offset(b.scroll);return j===0?O:M instanceof l.default.Container?O+M.length():O+M.index(H,j)}),P=Math.min(Math.max.apply(Math,p(C)),this.scroll.length()-1),F=Math.min.apply(Math,[P].concat(p(C)));return new _(F,P-F)}},{key:"normalizeNative",value:function(I){if(!S(this.root,I.startContainer)||!I.collapsed&&!S(this.root,I.endContainer))return null;var b={start:{node:I.startContainer,offset:I.startOffset},end:{node:I.endContainer,offset:I.endOffset},native:I};return[b.start,b.end].forEach(function(N){for(var C=N.node,P=N.offset;!(C instanceof Text)&&C.childNodes.length>0;)if(C.childNodes.length>P)C=C.childNodes[P],P=0;else if(C.childNodes.length===P)C=C.lastChild,P=C instanceof Text?C.data.length:C.childNodes.length+1;else break;N.node=C,N.offset=P}),b}},{key:"rangeToNative",value:function(I){var b=this,N=I.collapsed?[I.index]:[I.index,I.index+I.length],C=[],P=this.scroll.length();return N.forEach(function(F,z){F=Math.min(P-1,F);var B=void 0,H=b.scroll.leaf(F),j=o(H,2),M=j[0],O=j[1],D=M.position(O,z!==0),$=o(D,2);B=$[0],O=$[1],C.push(B,O)}),C.length<2&&(C=C.concat(C)),C}},{key:"scrollIntoView",value:function(I){var b=this.lastRange;if(b!=null){var N=this.getBounds(b.index,b.length);if(N!=null){var C=this.scroll.length()-1,P=this.scroll.line(Math.min(b.index,C)),F=o(P,1),z=F[0],B=z;if(b.length>0){var H=this.scroll.line(Math.min(b.index+b.length,C)),j=o(H,1);B=j[0]}if(!(z==null||B==null)){var M=I.getBoundingClientRect();N.topM.bottom&&(I.scrollTop+=N.bottom-M.bottom)}}}}},{key:"setNativeRange",value:function(I,b){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(g.info("setNativeRange",I,b,N,C),!(I!=null&&(this.root.parentNode==null||I.parentNode==null||N.parentNode==null))){var F=document.getSelection();if(F!=null)if(I!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||P||I!==z.startContainer||b!==z.startOffset||N!==z.endContainer||C!==z.endOffset){I.tagName=="BR"&&(b=[].indexOf.call(I.parentNode.childNodes,I),I=I.parentNode),N.tagName=="BR"&&(C=[].indexOf.call(N.parentNode.childNodes,N),N=N.parentNode);var B=document.createRange();B.setStart(I,b),B.setEnd(N,C),F.removeAllRanges(),F.addRange(B)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(I){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.default.sources.API;if(typeof b=="string"&&(N=b,b=!1),g.info("setRange",I),I!=null){var C=this.rangeToNative(I);this.setNativeRange.apply(this,p(C).concat([b]))}else this.setNativeRange(null);this.update(N)}},{key:"update",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.default.sources.USER,b=this.lastRange,N=this.getRange(),C=o(N,2),P=C[0],F=C[1];if(this.lastRange=P,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,f.default)(b,this.lastRange)){var z;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var B=[w.default.events.SELECTION_CHANGE,(0,c.default)(this.lastRange),(0,c.default)(b),I];if((z=this.emitter).emit.apply(z,[w.default.events.EDITOR_CHANGE].concat(B)),I!==w.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,B)}}}}]),T}();function S(T,x){try{x.parentNode}catch{return!1}return x instanceof Text&&(x=x.parentNode),T.contains(x)}r.Range=_,r.default=k},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function w(v,E){for(var m=0;m0&&(d+=1),[this.parent.domNode,d]},c.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},c.scope=a.Scope.INLINE_BLOT,c}(s.default);r.default=l},function(n,r,i){var o=i(11),s=i(3),a={attributes:{compose:function(u,c,h){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});var f=s(!0,{},c);h||(f=Object.keys(f).reduce(function(w,v){return f[v]!=null&&(w[v]=f[v]),w},{}));for(var d in u)u[d]!==void 0&&c[d]===void 0&&(f[d]=u[d]);return Object.keys(f).length>0?f:void 0},diff:function(u,c){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});var h=Object.keys(u).concat(Object.keys(c)).reduce(function(f,d){return o(u[d],c[d])||(f[d]=c[d]===void 0?null:c[d]),f},{});return Object.keys(h).length>0?h:void 0},transform:function(u,c,h){if(typeof u!="object")return c;if(typeof c=="object"){if(!h)return c;var f=Object.keys(c).reduce(function(d,w){return u[w]===void 0&&(d[w]=c[w]),d},{});return Object.keys(f).length>0?f:void 0}}},iterator:function(u){return new l(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function l(u){this.ops=u,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(u){u||(u=1/0);var c=this.ops[this.index];if(c){var h=this.offset,f=a.length(c);if(u>=f-h?(u=f-h,this.index+=1,this.offset=0):this.offset+=u,typeof c.delete=="number")return{delete:u};var d={};return c.attributes&&(d.attributes=c.attributes),typeof c.retain=="number"?d.retain=u:typeof c.insert=="string"?d.insert=c.insert.substr(h,u):d.insert=c.insert,d}else return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?a.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,c=this.index,h=this.next(),f=this.ops.slice(this.index);return this.offset=u,this.index=c,[h].concat(f)}else return[]},n.exports=a},function(n,r){var i=function(){function o(v,E){return E!=null&&v instanceof E}var s;try{s=Map}catch{s=function(){}}var a;try{a=Set}catch{a=function(){}}var l;try{l=Promise}catch{l=function(){}}function u(v,E,m,p,y){typeof E=="object"&&(m=E.depth,p=E.prototype,y=E.includeNonEnumerable,E=E.circular);var g=[],_=[],k=typeof Buffer<"u";typeof E>"u"&&(E=!0),typeof m>"u"&&(m=1/0);function S(T,x){if(T===null)return null;if(x===0)return T;var I,b;if(typeof T!="object")return T;if(o(T,s))I=new s;else if(o(T,a))I=new a;else if(o(T,l))I=new l(function(M,O){T.then(function(D){M(S(D,x-1))},function(D){O(S(D,x-1))})});else if(u.__isArray(T))I=[];else if(u.__isRegExp(T))I=new RegExp(T.source,w(T)),T.lastIndex&&(I.lastIndex=T.lastIndex);else if(u.__isDate(T))I=new Date(T.getTime());else{if(k&&Buffer.isBuffer(T))return Buffer.allocUnsafe?I=Buffer.allocUnsafe(T.length):I=new Buffer(T.length),T.copy(I),I;o(T,Error)?I=Object.create(T):typeof p>"u"?(b=Object.getPrototypeOf(T),I=Object.create(b)):(I=Object.create(p),b=p)}if(E){var N=g.indexOf(T);if(N!=-1)return _[N];g.push(T),_.push(I)}o(T,s)&&T.forEach(function(M,O){var D=S(O,x-1),$=S(M,x-1);I.set(D,$)}),o(T,a)&&T.forEach(function(M){var O=S(M,x-1);I.add(O)});for(var C in T){var P;b&&(P=Object.getOwnPropertyDescriptor(b,C)),!(P&&P.set==null)&&(I[C]=S(T[C],x-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(T),C=0;C0){if(B instanceof f.BlockEmbed||O instanceof f.BlockEmbed){this.optimize();return}if(B instanceof m.default){var D=B.newlineIndex(B.length(),!0);if(D>-1&&(B=B.split(D+1),B===O)){this.optimize();return}}else if(O instanceof m.default){var $=O.newlineIndex(0);$>-1&&O.split($+1)}var V=O.children.head instanceof v.default?null:O.children.head;B.moveChildren(O,V),B.remove()}this.optimize()}},{key:"enable",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",C)}},{key:"formatAt",value:function(C,P,F,z){this.whitelist!=null&&!this.whitelist[F]||(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,C,P,F,z),this.optimize())}},{key:"insertAt",value:function(C,P,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[P])){if(C>=this.length())if(F==null||u.default.query(P,u.default.Scope.BLOCK)==null){var z=u.default.create(this.statics.defaultChild);this.appendChild(z),F==null&&P.endsWith(` +`)&&(P=P.slice(0,-1)),z.insertAt(0,P,F)}else{var B=u.default.create(P,F);this.appendChild(B)}else a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,C,P,F);this.optimize()}}},{key:"insertBefore",value:function(C,P){if(C.statics.scope===u.default.Scope.INLINE_BLOT){var F=u.default.create(this.statics.defaultChild);F.appendChild(C),C=F}a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,C,P)}},{key:"leaf",value:function(C){return this.path(C).pop()||[null,-1]}},{key:"line",value:function(C){return C===this.length()?this.line(C-1):this.descendant(T,C)}},{key:"lines",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function z(B,H,j){var M=[],O=j;return B.children.forEachAt(H,j,function(D,$,V){T(D)?M.push(D):D instanceof u.default.Container&&(M=M.concat(z(D,$,O))),O-=V}),M};return F(this,C,P)}},{key:"optimize",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,C,P),C.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,C,P))}},{key:"path",value:function(C){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,C).slice(1)}},{key:"update",value:function(C){if(this.batch!==!0){var P=h.default.sources.USER;typeof C=="string"&&(P=C),Array.isArray(C)||(C=this.observer.takeRecords()),C.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,P,C),a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,C.concat([])),C.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,P,C)}}}]),b}(u.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[d.default,f.BlockEmbed,y.default],r.default=x},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s=function(){function R(U,K){var W=[],X=!0,ne=!1,ue=void 0;try{for(var he=U[Symbol.iterator](),le;!(X=(le=he.next()).done)&&(W.push(le.value),!(K&&W.length===K));X=!0);}catch(Te){ne=!0,ue=Te}finally{try{!X&&he.return&&he.return()}finally{if(ne)throw ue}}return W}return function(U,K){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return R(U,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(U,K){for(var W=0;W1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ue=q(W);if(ue==null||ue.key==null)return F.warn("Attempted to add invalid keyboard binding",ue);typeof X=="function"&&(X={handler:X}),typeof ne=="function"&&(ne={handler:ne}),ue=(0,d.default)(ue,X,ne),this.bindings[ue.key]=this.bindings[ue.key]||[],this.bindings[ue.key].push(ue)}},{key:"listen",value:function(){var W=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var ne=X.which||X.keyCode,ue=(W.bindings[ne]||[]).filter(function(Ue){return U.match(X,Ue)});if(ue.length!==0){var he=W.quill.getSelection();if(!(he==null||!W.quill.hasFocus())){var le=W.quill.getLine(he.index),Te=s(le,2),Et=Te[0],Xe=Te[1],G=W.quill.getLeaf(he.index),Q=s(G,2),re=Q[0],oe=Q[1],Z=he.length===0?[re,oe]:W.quill.getLeaf(he.index+he.length),Ee=s(Z,2),ve=Ee[0],_e=Ee[1],Ut=re instanceof y.default.Text?re.value().slice(0,oe):"",wn=ve instanceof y.default.Text?ve.value().slice(_e):"",Le={collapsed:he.length===0,empty:he.length===0&&Et.length()<=1,format:W.quill.getFormat(he),offset:Xe,prefix:Ut,suffix:wn},ml=ue.some(function(Ue){if(Ue.collapsed!=null&&Ue.collapsed!==Le.collapsed||Ue.empty!=null&&Ue.empty!==Le.empty||Ue.offset!=null&&Ue.offset!==Le.offset)return!1;if(Array.isArray(Ue.format)){if(Ue.format.every(function(En){return Le.format[En]==null}))return!1}else if(o(Ue.format)==="object"&&!Object.keys(Ue.format).every(function(En){return Ue.format[En]===!0?Le.format[En]!=null:Ue.format[En]===!1?Le.format[En]==null:(0,h.default)(Ue.format[En],Le.format[En])}))return!1;return Ue.prefix!=null&&!Ue.prefix.test(Le.prefix)||Ue.suffix!=null&&!Ue.suffix.test(Le.suffix)?!1:Ue.handler.call(W,he,Le)!==!0});ml&&X.preventDefault()}}}})}}]),U}(x.default);B.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},B.DEFAULTS={bindings:{bold:V("bold"),italic:V("italic"),underline:V("underline"),indent:{key:B.keys.TAB,format:["blockquote","indent","list"],handler:function(U,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:B.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",_.default.sources.USER)}},"outdent backspace":{key:B.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,K){K.format.indent!=null?this.quill.format("indent","-1",_.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":$(!0),"outdent code-block":$(!1),"remove tab":{key:B.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,_.default.sources.USER)}},tab:{key:B.keys.TAB,handler:function(U){this.quill.history.cutoff();var K=new v.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(K,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,_.default.sources.SILENT)}},"list empty enter":{key:B.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,K){this.quill.format("list",!1,_.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:B.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var K=this.quill.getLine(U.index),W=s(K,2),X=W[0],ne=W[1],ue=(0,d.default)({},X.formats(),{list:"checked"}),he=new v.default().retain(U.index).insert(` `,ue).retain(X.length()-ne-1).retain(1,{list:"unchecked"});this.quill.updateContents(he,_.default.sources.USER),this.quill.setSelection(U.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:B.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(U,K){var W=this.quill.getLine(U.index),X=s(W,2),ne=X[0],ue=X[1],he=new v.default().retain(U.index).insert(` `,K.format).retain(ne.length()-ue-1).retain(1,{header:null});this.quill.updateContents(he,_.default.sources.USER),this.quill.setSelection(U.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(U,K){var W=K.prefix.length,X=this.quill.getLine(U.index),ne=s(X,2),ue=ne[0],he=ne[1];if(he>W)return!0;var le=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":le="unchecked";break;case"[x]":le="checked";break;case"-":case"*":le="bullet";break;default:le="ordered"}this.quill.insertText(U.index," ",_.default.sources.USER),this.quill.history.cutoff();var Te=new v.default().retain(U.index-he).delete(W+1).retain(ue.length()-2-he).retain(1,{list:le});this.quill.updateContents(Te,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-W,_.default.sources.SILENT)}},"code exit":{key:B.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(U){var K=this.quill.getLine(U.index),W=s(K,2),X=W[0],ne=W[1],ue=new v.default().retain(U.index+X.length()-ne-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ue,_.default.sources.USER)}},"embed left":H(B.keys.LEFT,!1),"embed left shift":H(B.keys.LEFT,!0),"embed right":H(B.keys.RIGHT,!1),"embed right shift":H(B.keys.RIGHT,!0)}};function H(R,U){var K,W=R===B.keys.LEFT?"prefix":"suffix";return K={key:R,shiftKey:U,altKey:null},b(K,W,/^$/),b(K,"handler",function(ne){var ue=ne.index;R===B.keys.RIGHT&&(ue+=ne.length+1);var he=this.quill.getLeaf(ue),le=s(he,1),Te=le[0];return Te instanceof y.default.Embed?(R===B.keys.LEFT?U?this.quill.setSelection(ne.index-1,ne.length+1,_.default.sources.USER):this.quill.setSelection(ne.index-1,_.default.sources.USER):U?this.quill.setSelection(ne.index,ne.length+1,_.default.sources.USER):this.quill.setSelection(ne.index+ne.length+1,_.default.sources.USER),!1):!0}),K}function j(R,U){if(!(R.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(R.index),W=s(K,1),X=W[0],ne={};if(U.offset===0){var ue=this.quill.getLine(R.index-1),he=s(ue,1),le=he[0];if(le!=null&&le.length()>1){var Te=X.formats(),Et=this.quill.getFormat(R.index-1,1);ne=m.default.attributes.diff(Te,Et)||{}}}var Xe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(U.prefix)?2:1;this.quill.deleteText(R.index-Xe,Xe,_.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(R.index-Xe,Xe,ne,_.default.sources.USER),this.quill.focus()}}function M(R,U){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(U.suffix)?2:1;if(!(R.index>=this.quill.getLength()-K)){var W={},X=0,ne=this.quill.getLine(R.index),ue=s(ne,1),he=ue[0];if(U.offset>=he.length()-1){var le=this.quill.getLine(R.index+1),Te=s(le,1),Et=Te[0];if(Et){var Xe=he.formats(),G=this.quill.getFormat(R.index,1);W=m.default.attributes.diff(Xe,G)||{},X=Et.length()}}this.quill.deleteText(R.index,K,_.default.sources.USER),Object.keys(W).length>0&&this.quill.formatLine(R.index+X-1,K,W,_.default.sources.USER)}}function O(R){var U=this.quill.getLines(R),K={};if(U.length>1){var W=U[0].formats(),X=U[U.length-1].formats();K=m.default.attributes.diff(X,W)||{}}this.quill.deleteText(R,_.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(R.index,1,K,_.default.sources.USER),this.quill.setSelection(R.index,_.default.sources.SILENT),this.quill.focus()}function D(R,U){var K=this;R.length>0&&this.quill.scroll.deleteAt(R.index,R.length);var W=Object.keys(U.format).reduce(function(X,ne){return y.default.query(ne,y.default.Scope.BLOCK)&&!Array.isArray(U.format[ne])&&(X[ne]=U.format[ne]),X},{});this.quill.insertText(R.index,` `,W,_.default.sources.USER),this.quill.setSelection(R.index+1,_.default.sources.SILENT),this.quill.focus(),Object.keys(U.format).forEach(function(X){W[X]==null&&(Array.isArray(U.format[X])||X!=="link"&&K.quill.format(X,U.format[X],_.default.sources.USER))})}function $(R){return{key:B.keys.TAB,shiftKey:!R,format:{"code-block":!0},handler:function(K){var W=y.default.query("code-block"),X=K.index,ne=K.length,ue=this.quill.scroll.descendant(W,X),he=s(ue,2),le=he[0],Te=he[1];if(le!=null){var Et=this.quill.getIndex(le),Xe=le.newlineIndex(Te,!0)+1,G=le.newlineIndex(Et+Te+ne),Q=le.domNode.textContent.slice(Xe,G).split(` -`);Te=0,Q.forEach(function(re,oe){R?(le.insertAt(Xe+Te,W.TAB),Te+=W.TAB.length,oe===0?X+=W.TAB.length:ne+=W.TAB.length):re.startsWith(W.TAB)&&(le.deleteAt(Xe+Te,W.TAB.length),Te-=W.TAB.length,oe===0?X-=W.TAB.length:ne-=W.TAB.length),Te+=re.length+1}),this.quill.update(_.default.sources.USER),this.quill.setSelection(X,ne,_.default.sources.SILENT)}}}}function V(R){return{key:R[0].toUpperCase(),shortKey:!0,handler:function(K,W){this.quill.format(R,!W.format[R],_.default.sources.USER)}}}function q(R){if(typeof R=="string"||typeof R=="number")return q({key:R});if((typeof R>"u"?"undefined":o(R))==="object"&&(R=(0,u.default)(R,!1)),typeof R.key=="string")if(B.keys[R.key.toUpperCase()]!=null)R.key=B.keys[R.key.toUpperCase()];else if(R.key.length===1)R.key=R.key.toUpperCase().charCodeAt(0);else return null;return R.shortKey&&(R[z]=R.shortKey,delete R.shortKey),R}r.default=B,r.SHORTKEY=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(p,y){var g=[],_=!0,k=!1,S=void 0;try{for(var T=p[Symbol.iterator](),x;!(_=(x=T.next()).done)&&(g.push(x.value),!(y&&g.length===y));_=!0);}catch(I){k=!0,S=I}finally{try{!_&&T.return&&T.return()}finally{if(k)throw S}}return g}return function(p,y){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return m(p,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function m(p,y,g){p===null&&(p=Function.prototype);var _=Object.getOwnPropertyDescriptor(p,y);if(_===void 0){var k=Object.getPrototypeOf(p);return k===null?void 0:m(k,y,g)}else{if("value"in _)return _.value;var S=_.get;return S===void 0?void 0:S.call(g)}},a=function(){function m(p,y){for(var g=0;g-1}r.default=d,r.sanitize=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},s=function(){function E(m,p){for(var y=0;y1&&arguments[1]!==void 0?arguments[1]:!1,g=this.container.querySelector(".ql-selected");if(p!==g&&(g!=null&&g.classList.remove("ql-selected"),p!=null&&(p.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(p.parentNode.children,p),p.hasAttribute("data-value")?this.label.setAttribute("data-value",p.getAttribute("data-value")):this.label.removeAttribute("data-value"),p.hasAttribute("data-label")?this.label.setAttribute("data-label",p.getAttribute("data-label")):this.label.removeAttribute("data-label"),y))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var _=document.createEvent("Event");_.initEvent("change",!0,!0),this.select.dispatchEvent(_)}this.close()}}},{key:"update",value:function(){var p=void 0;if(this.select.selectedIndex>-1){var y=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];p=this.select.options[this.select.selectedIndex],this.selectItem(y)}else this.selectItem(null);var g=p!=null&&p!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",g)}}]),E}();r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),s=F(o),a=i(5),l=F(a),u=i(4),f=F(u),h=i(16),c=F(h),d=i(25),w=F(d),v=i(24),E=F(v),m=i(35),p=F(m),y=i(6),g=F(y),_=i(22),k=F(_),S=i(7),T=F(S),x=i(55),I=F(x),b=i(42),N=F(b),C=i(23),P=F(C);function F(z){return z&&z.__esModule?z:{default:z}}l.default.register({"blots/block":f.default,"blots/block/embed":u.BlockEmbed,"blots/break":c.default,"blots/container":w.default,"blots/cursor":E.default,"blots/embed":p.default,"blots/inline":g.default,"blots/scroll":k.default,"blots/text":T.default,"modules/clipboard":I.default,"modules/history":N.default,"modules/keyboard":P.default}),s.default.register(f.default,c.default,E.default,g.default,k.default,T.default),r.default=l.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),s=function(){function a(l){this.domNode=l,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(a.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),a.create=function(l){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof l=="string"&&(l=l.toUpperCase(),parseInt(l).toString()===l&&(l=parseInt(l))),typeof l=="number"?u=document.createElement(this.tagName[l-1]):this.tagName.indexOf(l)>-1?u=document.createElement(l):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},a.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},a.prototype.clone=function(){var l=this.domNode.cloneNode(!1);return o.create(l)},a.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},a.prototype.deleteAt=function(l,u){var f=this.isolate(l,u);f.remove()},a.prototype.formatAt=function(l,u,f,h){var c=this.isolate(l,u);if(o.query(f,o.Scope.BLOT)!=null&&h)c.wrap(f,h);else if(o.query(f,o.Scope.ATTRIBUTE)!=null){var d=o.create(this.statics.scope);c.wrap(d),d.format(f,h)}},a.prototype.insertAt=function(l,u,f){var h=f==null?o.create("text",u):o.create(u,f),c=this.split(l);this.parent.insertBefore(h,c)},a.prototype.insertInto=function(l,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var f=null;l.children.insertBefore(this,u),u!=null&&(f=u.domNode),(this.domNode.parentNode!=l.domNode||this.domNode.nextSibling!=f)&&l.domNode.insertBefore(this.domNode,f),this.parent=l,this.attach()},a.prototype.isolate=function(l,u){var f=this.split(l);return f.split(u),f},a.prototype.length=function(){return 1},a.prototype.offset=function(l){return l===void 0&&(l=this.parent),this.parent==null||this==l?0:this.parent.children.offset(this)+this.parent.offset(l)},a.prototype.optimize=function(l){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},a.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},a.prototype.replace=function(l){l.parent!=null&&(l.parent.insertBefore(this,l.next),l.remove())},a.prototype.replaceWith=function(l,u){var f=typeof l=="string"?o.create(l,u):l;return f.replace(this),f},a.prototype.split=function(l,u){return l===0?this:this.next},a.prototype.update=function(l,u){},a.prototype.wrap=function(l,u){var f=typeof l=="string"?o.create(l,u):l;return this.parent!=null&&this.parent.insertBefore(f,this.next),f.appendChild(this),f},a.blotName="abstract",a}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),s=i(32),a=i(33),l=i(1),u=function(){function f(h){this.attributes={},this.domNode=h,this.build()}return f.prototype.attribute=function(h,c){c?h.add(this.domNode,c)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},f.prototype.build=function(){var h=this;this.attributes={};var c=o.default.keys(this.domNode),d=s.default.keys(this.domNode),w=a.default.keys(this.domNode);c.concat(d).concat(w).forEach(function(v){var E=l.query(v,l.Scope.ATTRIBUTE);E instanceof o.default&&(h.attributes[E.attrName]=E)})},f.prototype.copy=function(h){var c=this;Object.keys(this.attributes).forEach(function(d){var w=c.attributes[d].value(c.domNode);h.format(d,w)})},f.prototype.move=function(h){var c=this;this.copy(h),Object.keys(this.attributes).forEach(function(d){c.attributes[d].remove(c.domNode)}),this.attributes={}},f.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(c,d){return c[d]=h.attributes[d].value(h.domNode),c},{})},f}();r.default=u},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var c in h)h.hasOwnProperty(c)&&(f[c]=h[c])};return function(f,h){u(f,h);function c(){this.constructor=f}f.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(12);function a(u,f){var h=u.getAttribute("class")||"";return h.split(/\s+/).filter(function(c){return c.indexOf(f+"-")===0})}var l=function(u){o(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},f.prototype.add=function(h,c){return this.canAdd(h,c)?(this.remove(h),h.classList.add(this.keyName+"-"+c),!0):!1},f.prototype.remove=function(h){var c=a(h,this.keyName);c.forEach(function(d){h.classList.remove(d)}),h.classList.length===0&&h.removeAttribute("class")},f.prototype.value=function(h){var c=a(h,this.keyName)[0]||"",d=c.slice(this.keyName.length+1);return this.canAdd(h,d)?d:""},f}(s.default);r.default=l},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var c in h)h.hasOwnProperty(c)&&(f[c]=h[c])};return function(f,h){u(f,h);function c(){this.constructor=f}f.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(12);function a(u){var f=u.split("-"),h=f.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return f[0]+h}var l=function(u){o(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(c){var d=c.split(":");return d[0].trim()})},f.prototype.add=function(h,c){return this.canAdd(h,c)?(h.style[a(this.keyName)]=c,!0):!1},f.prototype.remove=function(h){h.style[a(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},f.prototype.value=function(h){var c=h.style[a(this.keyName)];return this.canAdd(h,c)?c:""},f}(s.default);r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function l(u,f){for(var h=0;hx&&this.stack.undo.length>0){var I=this.stack.undo.pop();T=T.compose(I.undo),k=I.redo.compose(k)}else this.lastRecorded=x;this.stack.undo.push({redo:k,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(S){S.undo=k.transform(S.undo,!0),S.redo=k.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=k.transform(S.undo,!0),S.redo=k.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),g}(h.default);E.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(y){var g=y.ops[y.ops.length-1];return g==null?!1:g.insert!=null?typeof g.insert=="string"&&g.insert.endsWith(` -`):g.attributes!=null?Object.keys(g.attributes).some(function(_){return a.default.query(_,a.default.Scope.BLOCK)!=null}):!1}function p(y){var g=y.reduce(function(k,S){return k+=S.delete||0,k},0),_=y.length()-g;return m(y)&&(_-=1),_}r.default=E,r.getLastChangeIndex=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var o=function(){function D($,V){for(var q=0;q0&&arguments[0]!==void 0?arguments[0]:"link",R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),R!=null?this.textbox.value=R:q!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+q)||""),this.root.setAttribute("data-mode",q)}},{key:"restoreFocus",value:function(){var q=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=q}},{key:"save",value:function(){var q=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var R=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",q,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",q,c.default.sources.USER)),this.quill.root.scrollTop=R;break}case"video":q=M(q);case"formula":{if(!q)break;var U=this.quill.getSelection(!0);if(U!=null){var K=U.index+U.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),q,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",c.default.sources.USER),this.quill.setSelection(K+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),$}(T.default);function M(D){var $=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return $?($[1]||"https")+"://www.youtube.com/embed/"+$[2]+"?showinfo=0":($=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?($[1]||"https")+"://player.vimeo.com/video/"+$[2]+"/":D}function O(D,$){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$.forEach(function(q){var R=document.createElement("option");q===V?R.setAttribute("selected","selected"):R.setAttribute("value",q),D.appendChild(R)})}r.BaseTooltip=j,r.default=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function s(){this.head=this.tail=null,this.length=0}return s.prototype.append=function(){for(var a=[],l=0;l1&&this.append.apply(this,a.slice(1))},s.prototype.contains=function(a){for(var l,u=this.iterator();l=u();)if(l===a)return!0;return!1},s.prototype.insertBefore=function(a,l){a&&(a.next=l,l!=null?(a.prev=l.prev,l.prev!=null&&(l.prev.next=a),l.prev=a,l===this.head&&(this.head=a)):this.tail!=null?(this.tail.next=a,a.prev=this.tail,this.tail=a):(a.prev=null,this.head=this.tail=a),this.length+=1)},s.prototype.offset=function(a){for(var l=0,u=this.head;u!=null;){if(u===a)return l;l+=u.length(),u=u.next}return-1},s.prototype.remove=function(a){this.contains(a)&&(a.prev!=null&&(a.prev.next=a.next),a.next!=null&&(a.next.prev=a.prev),a===this.head&&(this.head=a.next),a===this.tail&&(this.tail=a.prev),this.length-=1)},s.prototype.iterator=function(a){return a===void 0&&(a=this.head),function(){var l=a;return a!=null&&(a=a.next),l}},s.prototype.find=function(a,l){l===void 0&&(l=!1);for(var u,f=this.iterator();u=f();){var h=u.length();if(aw?u(d,a-w,Math.min(l,w+E-a)):u(d,0,Math.min(E,a+l-w)),w+=E}},s.prototype.map=function(a){return this.reduce(function(l,u){return l.push(a(u)),l},[])},s.prototype.reduce=function(a,l){for(var u,f=this.iterator();u=f();)l=a(l,u);return l},s}();r.default=o},function(n,r,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var w in d)d.hasOwnProperty(w)&&(c[w]=d[w])};return function(c,d){h(c,d);function w(){this.constructor=c}c.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(17),a=i(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,f=function(h){o(c,h);function c(d){var w=h.call(this,d)||this;return w.scroll=w,w.observer=new MutationObserver(function(v){w.update(v)}),w.observer.observe(w.domNode,l),w.attach(),w}return c.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(d,w){this.update(),d===0&&w===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,d,w)},c.prototype.formatAt=function(d,w,v,E){this.update(),h.prototype.formatAt.call(this,d,w,v,E)},c.prototype.insertAt=function(d,w,v){this.update(),h.prototype.insertAt.call(this,d,w,v)},c.prototype.optimize=function(d,w){var v=this;d===void 0&&(d=[]),w===void 0&&(w={}),h.prototype.optimize.call(this,w);for(var E=[].slice.call(this.observer.takeRecords());E.length>0;)d.push(E.pop());for(var m=function(_,k){k===void 0&&(k=!0),!(_==null||_===v)&&_.domNode.parentNode!=null&&(_.domNode[a.DATA_KEY].mutations==null&&(_.domNode[a.DATA_KEY].mutations=[]),k&&m(_.parent))},p=function(_){_.domNode[a.DATA_KEY]==null||_.domNode[a.DATA_KEY].mutations==null||(_ instanceof s.default&&_.children.forEach(p),_.optimize(w))},y=d,g=0;y.length>0;g+=1){if(g>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(y.forEach(function(_){var k=a.find(_.target,!0);k!=null&&(k.domNode===_.target&&(_.type==="childList"?(m(a.find(_.previousSibling,!1)),[].forEach.call(_.addedNodes,function(S){var T=a.find(S,!1);m(T,!1),T instanceof s.default&&T.children.forEach(function(x){m(x,!1)})})):_.type==="attributes"&&m(k.prev)),m(k))}),this.children.forEach(p),y=[].slice.call(this.observer.takeRecords()),E=y.slice();E.length>0;)d.push(E.pop())}},c.prototype.update=function(d,w){var v=this;w===void 0&&(w={}),d=d||this.observer.takeRecords(),d.map(function(E){var m=a.find(E.target,!0);return m==null?null:m.domNode[a.DATA_KEY].mutations==null?(m.domNode[a.DATA_KEY].mutations=[E],m):(m.domNode[a.DATA_KEY].mutations.push(E),null)}).forEach(function(E){E==null||E===v||E.domNode[a.DATA_KEY]==null||E.update(E.domNode[a.DATA_KEY].mutations||[],w)}),this.domNode[a.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,w),this.optimize(d,w)},c.blotName="scroll",c.defaultChild="block",c.scope=a.Scope.BLOCK_BLOT,c.tagName="DIV",c}(s.default);r.default=f},function(n,r,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var d in c)c.hasOwnProperty(d)&&(h[d]=c[d])};return function(h,c){f(h,c);function d(){this.constructor=h}h.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(18),a=i(1);function l(f,h){if(Object.keys(f).length!==Object.keys(h).length)return!1;for(var c in f)if(f[c]!==h[c])return!1;return!0}var u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(c){if(c.tagName!==h.tagName)return f.formats.call(this,c)},h.prototype.format=function(c,d){var w=this;c===this.statics.blotName&&!d?(this.children.forEach(function(v){v instanceof s.default||(v=v.wrap(h.blotName,!0)),w.attributes.copy(v)}),this.unwrap()):f.prototype.format.call(this,c,d)},h.prototype.formatAt=function(c,d,w,v){if(this.formats()[w]!=null||a.query(w,a.Scope.ATTRIBUTE)){var E=this.isolate(c,d);E.format(w,v)}else f.prototype.formatAt.call(this,c,d,w,v)},h.prototype.optimize=function(c){f.prototype.optimize.call(this,c);var d=this.formats();if(Object.keys(d).length===0)return this.unwrap();var w=this.next;w instanceof h&&w.prev===this&&l(d,w.formats())&&(w.moveChildren(this),w.remove())},h.blotName="inline",h.scope=a.Scope.INLINE_BLOT,h.tagName="SPAN",h}(s.default);r.default=u},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var c in h)h.hasOwnProperty(c)&&(f[c]=h[c])};return function(f,h){u(f,h);function c(){this.constructor=f}f.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(18),a=i(1),l=function(u){o(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.formats=function(h){var c=a.query(f.blotName).tagName;if(h.tagName!==c)return u.formats.call(this,h)},f.prototype.format=function(h,c){a.query(h,a.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!c?this.replaceWith(f.blotName):u.prototype.format.call(this,h,c))},f.prototype.formatAt=function(h,c,d,w){a.query(d,a.Scope.BLOCK)!=null?this.format(d,w):u.prototype.formatAt.call(this,h,c,d,w)},f.prototype.insertAt=function(h,c,d){if(d==null||a.query(c,a.Scope.INLINE)!=null)u.prototype.insertAt.call(this,h,c,d);else{var w=this.split(h),v=a.create(c,d);w.parent.insertBefore(v,w)}},f.prototype.update=function(h,c){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,h,c)},f.blotName="block",f.scope=a.Scope.BLOCK_BLOT,f.tagName="P",f}(s.default);r.default=l},function(n,r,i){var o=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var h in f)f.hasOwnProperty(h)&&(u[h]=f[h])};return function(u,f){l(u,f);function h(){this.constructor=u}u.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(19),a=function(l){o(u,l);function u(){return l!==null&&l.apply(this,arguments)||this}return u.formats=function(f){},u.prototype.format=function(f,h){l.prototype.formatAt.call(this,0,this.length(),f,h)},u.prototype.formatAt=function(f,h,c,d){f===0&&h===this.length()?this.format(c,d):l.prototype.formatAt.call(this,f,h,c,d)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(s.default);r.default=a},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var c in h)h.hasOwnProperty(c)&&(f[c]=h[c])};return function(f,h){u(f,h);function c(){this.constructor=f}f.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(19),a=i(1),l=function(u){o(f,u);function f(h){var c=u.call(this,h)||this;return c.text=c.statics.value(c.domNode),c}return f.create=function(h){return document.createTextNode(h)},f.value=function(h){var c=h.data;return c.normalize&&(c=c.normalize()),c},f.prototype.deleteAt=function(h,c){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+c)},f.prototype.index=function(h,c){return this.domNode===h?c:-1},f.prototype.insertAt=function(h,c,d){d==null?(this.text=this.text.slice(0,h)+c+this.text.slice(h),this.domNode.data=this.text):u.prototype.insertAt.call(this,h,c,d)},f.prototype.length=function(){return this.text.length},f.prototype.optimize=function(h){u.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof f&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},f.prototype.position=function(h,c){return[this.domNode,h]},f.prototype.split=function(h,c){if(c===void 0&&(c=!1),!c){if(h===0)return this;if(h===this.length())return this.next}var d=a.create(this.domNode.splitText(h));return this.parent.insertBefore(d,this.next),this.text=this.statics.value(this.domNode),d},f.prototype.update=function(h,c){var d=this;h.some(function(w){return w.type==="characterData"&&w.target===d.domNode})&&(this.text=this.statics.value(this.domNode))},f.prototype.value=function(){return this.text},f.blotName="text",f.scope=a.Scope.INLINE_BLOT,f}(s.default);r.default=l},function(n,r,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var s=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(a,l){return arguments.length>1&&!this.contains(a)==!l?l:s.call(this,a)}}String.prototype.startsWith||(String.prototype.startsWith=function(a,l){return l=l||0,this.substr(l,a.length)===a}),String.prototype.endsWith||(String.prototype.endsWith=function(a,l){var u=this.toString();(typeof l!="number"||!isFinite(l)||Math.floor(l)!==l||l>u.length)&&(l=u.length),l-=a.length;var f=u.indexOf(a,l);return f!==-1&&f===l}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(l){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof l!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),f=u.length>>>0,h=arguments[1],c,d=0;d_.length?g:_,T=g.length>_.length?_:g,x=S.indexOf(T);if(x!=-1)return k=[[o,S.substring(0,x)],[s,T],[o,S.substring(x+T.length)]],g.length>_.length&&(k[0][0]=k[2][0]=i),k;if(T.length==1)return[[i,g],[o,_]];var I=d(g,_);if(I){var b=I[0],N=I[1],C=I[2],P=I[3],F=I[4],z=a(b,C),B=a(N,P);return z.concat([[s,F]],B)}return u(g,_)}function u(g,_){for(var k=g.length,S=_.length,T=Math.ceil((k+S)/2),x=T,I=2*T,b=new Array(I),N=new Array(I),C=0;Ck)B+=2;else if(V>S)z+=2;else if(F){var q=x+P-O;if(q>=0&&q=R)return f(g,_,$,V)}}}for(var U=-M+H;U<=M-j;U+=2){var q=x+U,R;U==-M||U!=M&&N[q-1]k)j+=2;else if(K>S)H+=2;else if(!F){var D=x+P-U;if(D>=0&&D=R)return f(g,_,$,V)}}}}return[[i,g],[o,_]]}function f(g,_,k,S){var T=g.substring(0,k),x=_.substring(0,S),I=g.substring(k),b=_.substring(S),N=a(T,x),C=a(I,b);return N.concat(C)}function h(g,_){if(!g||!_||g.charAt(0)!=_.charAt(0))return 0;for(var k=0,S=Math.min(g.length,_.length),T=S,x=0;k_.length?g:_,S=g.length>_.length?_:g;if(k.length<4||S.length*2=B.length?[$,V,q,R,D]:null}var x=T(k,S,Math.ceil(k.length/4)),I=T(k,S,Math.ceil(k.length/2)),b;if(!x&&!I)return null;I?x?b=x[4].length>I[4].length?x:I:b=I:b=x;var N,C,P,F;g.length>_.length?(N=b[0],C=b[1],P=b[2],F=b[3]):(P=b[0],F=b[1],N=b[2],C=b[3]);var z=b[4];return[N,C,P,F,z]}function w(g){g.push([s,""]);for(var _=0,k=0,S=0,T="",x="",I;_1?(k!==0&&S!==0&&(I=h(x,T),I!==0&&(_-k-S>0&&g[_-k-S-1][0]==s?g[_-k-S-1][1]+=x.substring(0,I):(g.splice(0,0,[s,x.substring(0,I)]),_++),x=x.substring(I),T=T.substring(I)),I=c(x,T),I!==0&&(g[_][1]=x.substring(x.length-I)+g[_][1],x=x.substring(0,x.length-I),T=T.substring(0,T.length-I))),k===0?g.splice(_-S,k+S,[o,x]):S===0?g.splice(_-k,k+S,[i,T]):g.splice(_-k-S,k+S,[i,T],[o,x]),_=_-k-S+(k?1:0)+(S?1:0)+1):_!==0&&g[_-1][0]==s?(g[_-1][1]+=g[_][1],g.splice(_,1)):_++,S=0,k=0,T="",x="";break}g[g.length-1][1]===""&&g.pop();var b=!1;for(_=1;_0&&S.splice(T+2,0,[I[0],b]),y(S,T,3)}else return g}function p(g){for(var _=!1,k=function(I){return I.charCodeAt(0)>=56320&&I.charCodeAt(0)<=57343},S=function(I){return I.charCodeAt(I.length-1)>=55296&&I.charCodeAt(I.length-1)<=56319},T=2;T0&&x.push(g[T]);return x}function y(g,_,k){for(var S=_+k-1;S>=0&&S>=_-1;S--)if(S+1\r?\n +\<"),this.convert();var Z=this.quill.getFormat(this.quill.selection.savedRange.index);if(Z[S.default.blotName]){var Ee=this.container.innerText;return this.container.innerHTML="",new h.default().insert(Ee,C({},S.default.blotName,Z[S.default.blotName]))}var ve=this.prepareMatching(),_e=s(ve,2),Ut=_e[0],wn=_e[1],Le=U(this.container,Ut,wn);return q(Le,` +`);Te=0,Q.forEach(function(re,oe){R?(le.insertAt(Xe+Te,W.TAB),Te+=W.TAB.length,oe===0?X+=W.TAB.length:ne+=W.TAB.length):re.startsWith(W.TAB)&&(le.deleteAt(Xe+Te,W.TAB.length),Te-=W.TAB.length,oe===0?X-=W.TAB.length:ne-=W.TAB.length),Te+=re.length+1}),this.quill.update(_.default.sources.USER),this.quill.setSelection(X,ne,_.default.sources.SILENT)}}}}function V(R){return{key:R[0].toUpperCase(),shortKey:!0,handler:function(K,W){this.quill.format(R,!W.format[R],_.default.sources.USER)}}}function q(R){if(typeof R=="string"||typeof R=="number")return q({key:R});if((typeof R>"u"?"undefined":o(R))==="object"&&(R=(0,u.default)(R,!1)),typeof R.key=="string")if(B.keys[R.key.toUpperCase()]!=null)R.key=B.keys[R.key.toUpperCase()];else if(R.key.length===1)R.key=R.key.toUpperCase().charCodeAt(0);else return null;return R.shortKey&&(R[z]=R.shortKey,delete R.shortKey),R}r.default=B,r.SHORTKEY=z},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function m(p,y){var g=[],_=!0,k=!1,S=void 0;try{for(var T=p[Symbol.iterator](),x;!(_=(x=T.next()).done)&&(g.push(x.value),!(y&&g.length===y));_=!0);}catch(I){k=!0,S=I}finally{try{!_&&T.return&&T.return()}finally{if(k)throw S}}return g}return function(p,y){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return m(p,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function m(p,y,g){p===null&&(p=Function.prototype);var _=Object.getOwnPropertyDescriptor(p,y);if(_===void 0){var k=Object.getPrototypeOf(p);return k===null?void 0:m(k,y,g)}else{if("value"in _)return _.value;var S=_.get;return S===void 0?void 0:S.call(g)}},a=function(){function m(p,y){for(var g=0;g-1}r.default=d,r.sanitize=w},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},s=function(){function E(m,p){for(var y=0;y1&&arguments[1]!==void 0?arguments[1]:!1,g=this.container.querySelector(".ql-selected");if(p!==g&&(g!=null&&g.classList.remove("ql-selected"),p!=null&&(p.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(p.parentNode.children,p),p.hasAttribute("data-value")?this.label.setAttribute("data-value",p.getAttribute("data-value")):this.label.removeAttribute("data-value"),p.hasAttribute("data-label")?this.label.setAttribute("data-label",p.getAttribute("data-label")):this.label.removeAttribute("data-label"),y))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var _=document.createEvent("Event");_.initEvent("change",!0,!0),this.select.dispatchEvent(_)}this.close()}}},{key:"update",value:function(){var p=void 0;if(this.select.selectedIndex>-1){var y=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];p=this.select.options[this.select.selectedIndex],this.selectItem(y)}else this.selectItem(null);var g=p!=null&&p!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",g)}}]),E}();r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(0),s=F(o),a=i(5),l=F(a),u=i(4),c=F(u),h=i(16),f=F(h),d=i(25),w=F(d),v=i(24),E=F(v),m=i(35),p=F(m),y=i(6),g=F(y),_=i(22),k=F(_),S=i(7),T=F(S),x=i(55),I=F(x),b=i(42),N=F(b),C=i(23),P=F(C);function F(z){return z&&z.__esModule?z:{default:z}}l.default.register({"blots/block":c.default,"blots/block/embed":u.BlockEmbed,"blots/break":f.default,"blots/container":w.default,"blots/cursor":E.default,"blots/embed":p.default,"blots/inline":g.default,"blots/scroll":k.default,"blots/text":T.default,"modules/clipboard":I.default,"modules/history":N.default,"modules/keyboard":P.default}),s.default.register(c.default,f.default,E.default,g.default,k.default,T.default),r.default=l.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(1),s=function(){function a(l){this.domNode=l,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(a.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),a.create=function(l){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof l=="string"&&(l=l.toUpperCase(),parseInt(l).toString()===l&&(l=parseInt(l))),typeof l=="number"?u=document.createElement(this.tagName[l-1]):this.tagName.indexOf(l)>-1?u=document.createElement(l):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},a.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},a.prototype.clone=function(){var l=this.domNode.cloneNode(!1);return o.create(l)},a.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},a.prototype.deleteAt=function(l,u){var c=this.isolate(l,u);c.remove()},a.prototype.formatAt=function(l,u,c,h){var f=this.isolate(l,u);if(o.query(c,o.Scope.BLOT)!=null&&h)f.wrap(c,h);else if(o.query(c,o.Scope.ATTRIBUTE)!=null){var d=o.create(this.statics.scope);f.wrap(d),d.format(c,h)}},a.prototype.insertAt=function(l,u,c){var h=c==null?o.create("text",u):o.create(u,c),f=this.split(l);this.parent.insertBefore(h,f)},a.prototype.insertInto=function(l,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var c=null;l.children.insertBefore(this,u),u!=null&&(c=u.domNode),(this.domNode.parentNode!=l.domNode||this.domNode.nextSibling!=c)&&l.domNode.insertBefore(this.domNode,c),this.parent=l,this.attach()},a.prototype.isolate=function(l,u){var c=this.split(l);return c.split(u),c},a.prototype.length=function(){return 1},a.prototype.offset=function(l){return l===void 0&&(l=this.parent),this.parent==null||this==l?0:this.parent.children.offset(this)+this.parent.offset(l)},a.prototype.optimize=function(l){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},a.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},a.prototype.replace=function(l){l.parent!=null&&(l.parent.insertBefore(this,l.next),l.remove())},a.prototype.replaceWith=function(l,u){var c=typeof l=="string"?o.create(l,u):l;return c.replace(this),c},a.prototype.split=function(l,u){return l===0?this:this.next},a.prototype.update=function(l,u){},a.prototype.wrap=function(l,u){var c=typeof l=="string"?o.create(l,u):l;return this.parent!=null&&this.parent.insertBefore(c,this.next),c.appendChild(this),c},a.blotName="abstract",a}();r.default=s},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),s=i(32),a=i(33),l=i(1),u=function(){function c(h){this.attributes={},this.domNode=h,this.build()}return c.prototype.attribute=function(h,f){f?h.add(this.domNode,f)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},c.prototype.build=function(){var h=this;this.attributes={};var f=o.default.keys(this.domNode),d=s.default.keys(this.domNode),w=a.default.keys(this.domNode);f.concat(d).concat(w).forEach(function(v){var E=l.query(v,l.Scope.ATTRIBUTE);E instanceof o.default&&(h.attributes[E.attrName]=E)})},c.prototype.copy=function(h){var f=this;Object.keys(this.attributes).forEach(function(d){var w=f.attributes[d].value(f.domNode);h.format(d,w)})},c.prototype.move=function(h){var f=this;this.copy(h),Object.keys(this.attributes).forEach(function(d){f.attributes[d].remove(f.domNode)}),this.attributes={}},c.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(f,d){return f[d]=h.attributes[d].value(h.domNode),f},{})},c}();r.default=u},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var f in h)h.hasOwnProperty(f)&&(c[f]=h[f])};return function(c,h){u(c,h);function f(){this.constructor=c}c.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(12);function a(u,c){var h=u.getAttribute("class")||"";return h.split(/\s+/).filter(function(f){return f.indexOf(c+"-")===0})}var l=function(u){o(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(f){return f.split("-").slice(0,-1).join("-")})},c.prototype.add=function(h,f){return this.canAdd(h,f)?(this.remove(h),h.classList.add(this.keyName+"-"+f),!0):!1},c.prototype.remove=function(h){var f=a(h,this.keyName);f.forEach(function(d){h.classList.remove(d)}),h.classList.length===0&&h.removeAttribute("class")},c.prototype.value=function(h){var f=a(h,this.keyName)[0]||"",d=f.slice(this.keyName.length+1);return this.canAdd(h,d)?d:""},c}(s.default);r.default=l},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var f in h)h.hasOwnProperty(f)&&(c[f]=h[f])};return function(c,h){u(c,h);function f(){this.constructor=c}c.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(12);function a(u){var c=u.split("-"),h=c.slice(1).map(function(f){return f[0].toUpperCase()+f.slice(1)}).join("");return c[0]+h}var l=function(u){o(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(f){var d=f.split(":");return d[0].trim()})},c.prototype.add=function(h,f){return this.canAdd(h,f)?(h.style[a(this.keyName)]=f,!0):!1},c.prototype.remove=function(h){h.style[a(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},c.prototype.value=function(h){var f=h.style[a(this.keyName)];return this.canAdd(h,f)?f:""},c}(s.default);r.default=l},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function l(u,c){for(var h=0;hx&&this.stack.undo.length>0){var I=this.stack.undo.pop();T=T.compose(I.undo),k=I.redo.compose(k)}else this.lastRecorded=x;this.stack.undo.push({redo:k,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(S){S.undo=k.transform(S.undo,!0),S.redo=k.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=k.transform(S.undo,!0),S.redo=k.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),g}(h.default);E.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(y){var g=y.ops[y.ops.length-1];return g==null?!1:g.insert!=null?typeof g.insert=="string"&&g.insert.endsWith(` +`):g.attributes!=null?Object.keys(g.attributes).some(function(_){return a.default.query(_,a.default.Scope.BLOCK)!=null}):!1}function p(y){var g=y.reduce(function(k,S){return k+=S.delete||0,k},0),_=y.length()-g;return m(y)&&(_-=1),_}r.default=E,r.getLastChangeIndex=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var o=function(){function D($,V){for(var q=0;q0&&arguments[0]!==void 0?arguments[0]:"link",R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),R!=null?this.textbox.value=R:q!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+q)||""),this.root.setAttribute("data-mode",q)}},{key:"restoreFocus",value:function(){var q=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=q}},{key:"save",value:function(){var q=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var R=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",q,f.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",q,f.default.sources.USER)),this.quill.root.scrollTop=R;break}case"video":q=M(q);case"formula":{if(!q)break;var U=this.quill.getSelection(!0);if(U!=null){var K=U.index+U.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),q,f.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",f.default.sources.USER),this.quill.setSelection(K+2,f.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),$}(T.default);function M(D){var $=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return $?($[1]||"https")+"://www.youtube.com/embed/"+$[2]+"?showinfo=0":($=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?($[1]||"https")+"://player.vimeo.com/video/"+$[2]+"/":D}function O(D,$){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$.forEach(function(q){var R=document.createElement("option");q===V?R.setAttribute("selected","selected"):R.setAttribute("value",q),D.appendChild(R)})}r.BaseTooltip=j,r.default=H},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function s(){this.head=this.tail=null,this.length=0}return s.prototype.append=function(){for(var a=[],l=0;l1&&this.append.apply(this,a.slice(1))},s.prototype.contains=function(a){for(var l,u=this.iterator();l=u();)if(l===a)return!0;return!1},s.prototype.insertBefore=function(a,l){a&&(a.next=l,l!=null?(a.prev=l.prev,l.prev!=null&&(l.prev.next=a),l.prev=a,l===this.head&&(this.head=a)):this.tail!=null?(this.tail.next=a,a.prev=this.tail,this.tail=a):(a.prev=null,this.head=this.tail=a),this.length+=1)},s.prototype.offset=function(a){for(var l=0,u=this.head;u!=null;){if(u===a)return l;l+=u.length(),u=u.next}return-1},s.prototype.remove=function(a){this.contains(a)&&(a.prev!=null&&(a.prev.next=a.next),a.next!=null&&(a.next.prev=a.prev),a===this.head&&(this.head=a.next),a===this.tail&&(this.tail=a.prev),this.length-=1)},s.prototype.iterator=function(a){return a===void 0&&(a=this.head),function(){var l=a;return a!=null&&(a=a.next),l}},s.prototype.find=function(a,l){l===void 0&&(l=!1);for(var u,c=this.iterator();u=c();){var h=u.length();if(aw?u(d,a-w,Math.min(l,w+E-a)):u(d,0,Math.min(E,a+l-w)),w+=E}},s.prototype.map=function(a){return this.reduce(function(l,u){return l.push(a(u)),l},[])},s.prototype.reduce=function(a,l){for(var u,c=this.iterator();u=c();)l=a(l,u);return l},s}();r.default=o},function(n,r,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var w in d)d.hasOwnProperty(w)&&(f[w]=d[w])};return function(f,d){h(f,d);function w(){this.constructor=f}f.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(17),a=i(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,c=function(h){o(f,h);function f(d){var w=h.call(this,d)||this;return w.scroll=w,w.observer=new MutationObserver(function(v){w.update(v)}),w.observer.observe(w.domNode,l),w.attach(),w}return f.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},f.prototype.deleteAt=function(d,w){this.update(),d===0&&w===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,d,w)},f.prototype.formatAt=function(d,w,v,E){this.update(),h.prototype.formatAt.call(this,d,w,v,E)},f.prototype.insertAt=function(d,w,v){this.update(),h.prototype.insertAt.call(this,d,w,v)},f.prototype.optimize=function(d,w){var v=this;d===void 0&&(d=[]),w===void 0&&(w={}),h.prototype.optimize.call(this,w);for(var E=[].slice.call(this.observer.takeRecords());E.length>0;)d.push(E.pop());for(var m=function(_,k){k===void 0&&(k=!0),!(_==null||_===v)&&_.domNode.parentNode!=null&&(_.domNode[a.DATA_KEY].mutations==null&&(_.domNode[a.DATA_KEY].mutations=[]),k&&m(_.parent))},p=function(_){_.domNode[a.DATA_KEY]==null||_.domNode[a.DATA_KEY].mutations==null||(_ instanceof s.default&&_.children.forEach(p),_.optimize(w))},y=d,g=0;y.length>0;g+=1){if(g>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(y.forEach(function(_){var k=a.find(_.target,!0);k!=null&&(k.domNode===_.target&&(_.type==="childList"?(m(a.find(_.previousSibling,!1)),[].forEach.call(_.addedNodes,function(S){var T=a.find(S,!1);m(T,!1),T instanceof s.default&&T.children.forEach(function(x){m(x,!1)})})):_.type==="attributes"&&m(k.prev)),m(k))}),this.children.forEach(p),y=[].slice.call(this.observer.takeRecords()),E=y.slice();E.length>0;)d.push(E.pop())}},f.prototype.update=function(d,w){var v=this;w===void 0&&(w={}),d=d||this.observer.takeRecords(),d.map(function(E){var m=a.find(E.target,!0);return m==null?null:m.domNode[a.DATA_KEY].mutations==null?(m.domNode[a.DATA_KEY].mutations=[E],m):(m.domNode[a.DATA_KEY].mutations.push(E),null)}).forEach(function(E){E==null||E===v||E.domNode[a.DATA_KEY]==null||E.update(E.domNode[a.DATA_KEY].mutations||[],w)}),this.domNode[a.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,w),this.optimize(d,w)},f.blotName="scroll",f.defaultChild="block",f.scope=a.Scope.BLOCK_BLOT,f.tagName="DIV",f}(s.default);r.default=c},function(n,r,i){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var d in f)f.hasOwnProperty(d)&&(h[d]=f[d])};return function(h,f){c(h,f);function d(){this.constructor=h}h.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(18),a=i(1);function l(c,h){if(Object.keys(c).length!==Object.keys(h).length)return!1;for(var f in c)if(c[f]!==h[f])return!1;return!0}var u=function(c){o(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.formats=function(f){if(f.tagName!==h.tagName)return c.formats.call(this,f)},h.prototype.format=function(f,d){var w=this;f===this.statics.blotName&&!d?(this.children.forEach(function(v){v instanceof s.default||(v=v.wrap(h.blotName,!0)),w.attributes.copy(v)}),this.unwrap()):c.prototype.format.call(this,f,d)},h.prototype.formatAt=function(f,d,w,v){if(this.formats()[w]!=null||a.query(w,a.Scope.ATTRIBUTE)){var E=this.isolate(f,d);E.format(w,v)}else c.prototype.formatAt.call(this,f,d,w,v)},h.prototype.optimize=function(f){c.prototype.optimize.call(this,f);var d=this.formats();if(Object.keys(d).length===0)return this.unwrap();var w=this.next;w instanceof h&&w.prev===this&&l(d,w.formats())&&(w.moveChildren(this),w.remove())},h.blotName="inline",h.scope=a.Scope.INLINE_BLOT,h.tagName="SPAN",h}(s.default);r.default=u},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var f in h)h.hasOwnProperty(f)&&(c[f]=h[f])};return function(c,h){u(c,h);function f(){this.constructor=c}c.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(18),a=i(1),l=function(u){o(c,u);function c(){return u!==null&&u.apply(this,arguments)||this}return c.formats=function(h){var f=a.query(c.blotName).tagName;if(h.tagName!==f)return u.formats.call(this,h)},c.prototype.format=function(h,f){a.query(h,a.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!f?this.replaceWith(c.blotName):u.prototype.format.call(this,h,f))},c.prototype.formatAt=function(h,f,d,w){a.query(d,a.Scope.BLOCK)!=null?this.format(d,w):u.prototype.formatAt.call(this,h,f,d,w)},c.prototype.insertAt=function(h,f,d){if(d==null||a.query(f,a.Scope.INLINE)!=null)u.prototype.insertAt.call(this,h,f,d);else{var w=this.split(h),v=a.create(f,d);w.parent.insertBefore(v,w)}},c.prototype.update=function(h,f){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,h,f)},c.blotName="block",c.scope=a.Scope.BLOCK_BLOT,c.tagName="P",c}(s.default);r.default=l},function(n,r,i){var o=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var h in c)c.hasOwnProperty(h)&&(u[h]=c[h])};return function(u,c){l(u,c);function h(){this.constructor=u}u.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(19),a=function(l){o(u,l);function u(){return l!==null&&l.apply(this,arguments)||this}return u.formats=function(c){},u.prototype.format=function(c,h){l.prototype.formatAt.call(this,0,this.length(),c,h)},u.prototype.formatAt=function(c,h,f,d){c===0&&h===this.length()?this.format(f,d):l.prototype.formatAt.call(this,c,h,f,d)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u}(s.default);r.default=a},function(n,r,i){var o=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var f in h)h.hasOwnProperty(f)&&(c[f]=h[f])};return function(c,h){u(c,h);function f(){this.constructor=c}c.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=i(19),a=i(1),l=function(u){o(c,u);function c(h){var f=u.call(this,h)||this;return f.text=f.statics.value(f.domNode),f}return c.create=function(h){return document.createTextNode(h)},c.value=function(h){var f=h.data;return f.normalize&&(f=f.normalize()),f},c.prototype.deleteAt=function(h,f){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+f)},c.prototype.index=function(h,f){return this.domNode===h?f:-1},c.prototype.insertAt=function(h,f,d){d==null?(this.text=this.text.slice(0,h)+f+this.text.slice(h),this.domNode.data=this.text):u.prototype.insertAt.call(this,h,f,d)},c.prototype.length=function(){return this.text.length},c.prototype.optimize=function(h){u.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof c&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},c.prototype.position=function(h,f){return[this.domNode,h]},c.prototype.split=function(h,f){if(f===void 0&&(f=!1),!f){if(h===0)return this;if(h===this.length())return this.next}var d=a.create(this.domNode.splitText(h));return this.parent.insertBefore(d,this.next),this.text=this.statics.value(this.domNode),d},c.prototype.update=function(h,f){var d=this;h.some(function(w){return w.type==="characterData"&&w.target===d.domNode})&&(this.text=this.statics.value(this.domNode))},c.prototype.value=function(){return this.text},c.blotName="text",c.scope=a.Scope.INLINE_BLOT,c}(s.default);r.default=l},function(n,r,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var s=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(a,l){return arguments.length>1&&!this.contains(a)==!l?l:s.call(this,a)}}String.prototype.startsWith||(String.prototype.startsWith=function(a,l){return l=l||0,this.substr(l,a.length)===a}),String.prototype.endsWith||(String.prototype.endsWith=function(a,l){var u=this.toString();(typeof l!="number"||!isFinite(l)||Math.floor(l)!==l||l>u.length)&&(l=u.length),l-=a.length;var c=u.indexOf(a,l);return c!==-1&&c===l}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(l){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof l!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),c=u.length>>>0,h=arguments[1],f,d=0;d_.length?g:_,T=g.length>_.length?_:g,x=S.indexOf(T);if(x!=-1)return k=[[o,S.substring(0,x)],[s,T],[o,S.substring(x+T.length)]],g.length>_.length&&(k[0][0]=k[2][0]=i),k;if(T.length==1)return[[i,g],[o,_]];var I=d(g,_);if(I){var b=I[0],N=I[1],C=I[2],P=I[3],F=I[4],z=a(b,C),B=a(N,P);return z.concat([[s,F]],B)}return u(g,_)}function u(g,_){for(var k=g.length,S=_.length,T=Math.ceil((k+S)/2),x=T,I=2*T,b=new Array(I),N=new Array(I),C=0;Ck)B+=2;else if(V>S)z+=2;else if(F){var q=x+P-O;if(q>=0&&q=R)return c(g,_,$,V)}}}for(var U=-M+H;U<=M-j;U+=2){var q=x+U,R;U==-M||U!=M&&N[q-1]k)j+=2;else if(K>S)H+=2;else if(!F){var D=x+P-U;if(D>=0&&D=R)return c(g,_,$,V)}}}}return[[i,g],[o,_]]}function c(g,_,k,S){var T=g.substring(0,k),x=_.substring(0,S),I=g.substring(k),b=_.substring(S),N=a(T,x),C=a(I,b);return N.concat(C)}function h(g,_){if(!g||!_||g.charAt(0)!=_.charAt(0))return 0;for(var k=0,S=Math.min(g.length,_.length),T=S,x=0;k_.length?g:_,S=g.length>_.length?_:g;if(k.length<4||S.length*2=B.length?[$,V,q,R,D]:null}var x=T(k,S,Math.ceil(k.length/4)),I=T(k,S,Math.ceil(k.length/2)),b;if(!x&&!I)return null;I?x?b=x[4].length>I[4].length?x:I:b=I:b=x;var N,C,P,F;g.length>_.length?(N=b[0],C=b[1],P=b[2],F=b[3]):(P=b[0],F=b[1],N=b[2],C=b[3]);var z=b[4];return[N,C,P,F,z]}function w(g){g.push([s,""]);for(var _=0,k=0,S=0,T="",x="",I;_1?(k!==0&&S!==0&&(I=h(x,T),I!==0&&(_-k-S>0&&g[_-k-S-1][0]==s?g[_-k-S-1][1]+=x.substring(0,I):(g.splice(0,0,[s,x.substring(0,I)]),_++),x=x.substring(I),T=T.substring(I)),I=f(x,T),I!==0&&(g[_][1]=x.substring(x.length-I)+g[_][1],x=x.substring(0,x.length-I),T=T.substring(0,T.length-I))),k===0?g.splice(_-S,k+S,[o,x]):S===0?g.splice(_-k,k+S,[i,T]):g.splice(_-k-S,k+S,[i,T],[o,x]),_=_-k-S+(k?1:0)+(S?1:0)+1):_!==0&&g[_-1][0]==s?(g[_-1][1]+=g[_][1],g.splice(_,1)):_++,S=0,k=0,T="",x="";break}g[g.length-1][1]===""&&g.pop();var b=!1;for(_=1;_0&&S.splice(T+2,0,[I[0],b]),y(S,T,3)}else return g}function p(g){for(var _=!1,k=function(I){return I.charCodeAt(0)>=56320&&I.charCodeAt(0)<=57343},S=function(I){return I.charCodeAt(I.length-1)>=55296&&I.charCodeAt(I.length-1)<=56319},T=2;T0&&x.push(g[T]);return x}function y(g,_,k){for(var S=_+k-1;S>=0&&S>=_-1;S--)if(S+1\r?\n +\<"),this.convert();var Z=this.quill.getFormat(this.quill.selection.savedRange.index);if(Z[S.default.blotName]){var Ee=this.container.innerText;return this.container.innerHTML="",new h.default().insert(Ee,C({},S.default.blotName,Z[S.default.blotName]))}var ve=this.prepareMatching(),_e=s(ve,2),Ut=_e[0],wn=_e[1],Le=U(this.container,Ut,wn);return q(Le,` `)&&Le.ops[Le.ops.length-1].attributes==null&&(Le=Le.compose(new h.default().retain(Le.length()-1).delete(1))),B.log("convert",this.container.innerHTML,Le),this.container.innerHTML="",Le}},{key:"dangerouslyPasteHTML",value:function(oe,Z){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof oe=="string")this.quill.setContents(this.convert(oe),Z),this.quill.setSelection(0,v.default.sources.SILENT);else{var ve=this.convert(Z);this.quill.updateContents(new h.default().retain(oe).concat(ve),Ee),this.quill.setSelection(oe+ve.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(oe){var Z=this;if(!(oe.defaultPrevented||!this.quill.isEnabled())){var Ee=this.quill.getSelection(),ve=new h.default().retain(Ee.index),_e=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){ve=ve.concat(Z.convert()).delete(Ee.length),Z.quill.updateContents(ve,v.default.sources.USER),Z.quill.setSelection(ve.length()-Ee.length,v.default.sources.SILENT),Z.quill.scrollingContainer.scrollTop=_e,Z.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var oe=this,Z=[],Ee=[];return this.matchers.forEach(function(ve){var _e=s(ve,2),Ut=_e[0],wn=_e[1];switch(Ut){case Node.TEXT_NODE:Ee.push(wn);break;case Node.ELEMENT_NODE:Z.push(wn);break;default:[].forEach.call(oe.container.querySelectorAll(Ut),function(Le){Le[H]=Le[H]||[],Le[H].push(wn)});break}}),[Z,Ee]}}]),Q}(y.default);D.DEFAULTS={matchers:[],matchVisual:!0};function $(G,Q,re){return(typeof Q>"u"?"undefined":o(Q))==="object"?Object.keys(Q).reduce(function(oe,Z){return $(oe,Z,Q[Z])},G):G.reduce(function(oe,Z){return Z.attributes&&Z.attributes[Q]?oe.push(Z):oe.insert(Z.insert,(0,u.default)({},C({},Q,re),Z.attributes))},new h.default)}function V(G){if(G.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return G[Q]||(G[Q]=window.getComputedStyle(G))}function q(G,Q){for(var re="",oe=G.ops.length-1;oe>=0&&re.length-1}function U(G,Q,re){return G.nodeType===G.TEXT_NODE?re.reduce(function(oe,Z){return Z(G,oe)},new h.default):G.nodeType===G.ELEMENT_NODE?[].reduce.call(G.childNodes||[],function(oe,Z){var Ee=U(Z,Q,re);return Z.nodeType===G.ELEMENT_NODE&&(Ee=Q.reduce(function(ve,_e){return _e(Z,ve)},Ee),Ee=(Z[H]||[]).reduce(function(ve,_e){return _e(Z,ve)},Ee)),oe.concat(Ee)},new h.default):new h.default}function K(G,Q,re){return $(re,G,!0)}function W(G,Q){var re=d.default.Attributor.Attribute.keys(G),oe=d.default.Attributor.Class.keys(G),Z=d.default.Attributor.Style.keys(G),Ee={};return re.concat(oe).concat(Z).forEach(function(ve){var _e=d.default.query(ve,d.default.Scope.ATTRIBUTE);_e!=null&&(Ee[_e.attrName]=_e.value(G),Ee[_e.attrName])||(_e=M[ve],_e!=null&&(_e.attrName===ve||_e.keyName===ve)&&(Ee[_e.attrName]=_e.value(G)||void 0),_e=O[ve],_e!=null&&(_e.attrName===ve||_e.keyName===ve)&&(_e=O[ve],Ee[_e.attrName]=_e.value(G)||void 0))}),Object.keys(Ee).length>0&&(Q=$(Q,Ee)),Q}function X(G,Q){var re=d.default.query(G);if(re==null)return Q;if(re.prototype instanceof d.default.Embed){var oe={},Z=re.value(G);Z!=null&&(oe[re.blotName]=Z,Q=new h.default().insert(oe,re.formats(G)))}else typeof re.formats=="function"&&(Q=$(Q,re.blotName,re.formats(G)));return Q}function ne(G,Q){return q(Q,` `)||Q.insert(` `),Q}function ue(){return new h.default}function he(G,Q){var re=d.default.query(G);if(re==null||re.blotName!=="list-item"||!q(Q,` @@ -3483,4 +3483,4 @@ This typically indicates that your device does not have a healthy Internet conne `),Q}function Te(G,Q){if(R(G)&&G.nextElementSibling!=null&&!q(Q,` `)){var re=G.offsetHeight+parseFloat(V(G).marginTop)+parseFloat(V(G).marginBottom);G.nextElementSibling.offsetTop>G.offsetTop+re*1.5&&Q.insert(` -`)}return Q}function Et(G,Q){var re={},oe=G.style||{};return oe.fontStyle&&V(G).fontStyle==="italic"&&(re.italic=!0),oe.fontWeight&&(V(G).fontWeight.startsWith("bold")||parseInt(V(G).fontWeight)>=700)&&(re.bold=!0),Object.keys(re).length>0&&(Q=$(Q,re)),parseFloat(oe.textIndent||0)>0&&(Q=new h.default().insert(" ").concat(Q)),Q}function Xe(G,Q){var re=G.data;if(G.parentNode.tagName==="O:P")return Q.insert(re.trim());if(re.trim().length===0&&G.parentNode.classList.contains("ql-clipboard"))return Q;if(!V(G.parentNode).whiteSpace.startsWith("pre")){var oe=function(Ee,ve){return ve=ve.replace(/[^\u00a0]/g,""),ve.length<1&&Ee?" ":ve};re=re.replace(/\r\n/g," ").replace(/\n/g," "),re=re.replace(/\s\s+/g,oe.bind(oe,!0)),(G.previousSibling==null&&R(G.parentNode)||G.previousSibling!=null&&R(G.previousSibling))&&(re=re.replace(/^\s+/,oe.bind(oe,!1))),(G.nextSibling==null&&R(G.parentNode)||G.nextSibling!=null&&R(G.nextSibling))&&(re=re.replace(/\s+$/,oe.bind(oe,!1)))}return Q.insert(re)}r.default=D,r.matchAttributor=W,r.matchBlot=X,r.matchNewline=le,r.matchSpacing=Te,r.matchText=Xe},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function w(v,E){for(var m=0;m '},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function w(v,E){for(var m=0;md.right&&(v=d.right-w.right,this.root.style.left=h+v+"px"),w.leftd.bottom){var E=w.bottom-w.top,m=f.bottom-f.top+E;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),l}();r.default=a},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function I(b,N){var C=[],P=!0,F=!1,z=void 0;try{for(var B=b[Symbol.iterator](),H;!(P=(H=B.next()).done)&&(C.push(H.value),!(N&&C.length===N));P=!0);}catch(j){F=!0,z=j}finally{try{!P&&B.return&&B.return()}finally{if(F)throw z}}return C}return function(b,N){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return I(b,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function I(b,N,C){b===null&&(b=Function.prototype);var P=Object.getOwnPropertyDescriptor(b,N);if(P===void 0){var F=Object.getPrototypeOf(b);return F===null?void 0:I(F,N,C)}else{if("value"in P)return P.value;var z=P.get;return z===void 0?void 0:z.call(C)}},a=function(){function I(b,N){for(var C=0;C','','',''].join(""),r.default=T},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(29),s=Z(o),a=i(36),l=i(38),u=i(64),f=i(65),h=Z(f),c=i(66),d=Z(c),w=i(67),v=Z(w),E=i(37),m=i(26),p=i(39),y=i(40),g=i(56),_=Z(g),k=i(68),S=Z(k),T=i(27),x=Z(T),I=i(69),b=Z(I),N=i(70),C=Z(N),P=i(71),F=Z(P),z=i(72),B=Z(z),H=i(73),j=Z(H),M=i(13),O=Z(M),D=i(74),$=Z(D),V=i(75),q=Z(V),R=i(57),U=Z(R),K=i(41),W=Z(K),X=i(28),ne=Z(X),ue=i(59),he=Z(ue),le=i(60),Te=Z(le),Et=i(61),Xe=Z(Et),G=i(108),Q=Z(G),re=i(62),oe=Z(re);function Z(Ee){return Ee&&Ee.__esModule?Ee:{default:Ee}}s.default.register({"attributors/attribute/direction":l.DirectionAttribute,"attributors/class/align":a.AlignClass,"attributors/class/background":E.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":l.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":y.SizeClass,"attributors/style/align":a.AlignStyle,"attributors/style/background":E.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":l.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":y.SizeStyle},!0),s.default.register({"formats/align":a.AlignClass,"formats/direction":l.DirectionClass,"formats/indent":u.IndentClass,"formats/background":E.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":p.FontClass,"formats/size":y.SizeClass,"formats/blockquote":h.default,"formats/code-block":O.default,"formats/header":d.default,"formats/list":v.default,"formats/bold":_.default,"formats/code":M.Code,"formats/italic":S.default,"formats/link":x.default,"formats/script":b.default,"formats/strike":C.default,"formats/underline":F.default,"formats/image":B.default,"formats/video":j.default,"formats/list/item":w.ListItem,"modules/formula":$.default,"modules/syntax":q.default,"modules/toolbar":U.default,"themes/bubble":Q.default,"themes/snow":oe.default,"ui/icons":W.default,"ui/picker":ne.default,"ui/icon-picker":Te.default,"ui/color-picker":he.default,"ui/tooltip":Xe.default},!0),r.default=s.default},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var o=function(){function v(E,m){for(var p=0;p0&&this.children.tail.format(S,T)}},{key:"formats",value:function(){return w({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(S,T){if(S instanceof p)s(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,S,T);else{var x=T==null?this.length():T.offset(this),I=this.split(x);I.parent.insertBefore(S,I)}}},{key:"optimize",value:function(S){s(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,S);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(S){if(S.statics.blotName!==this.statics.blotName){var T=l.default.create(this.statics.defaultChild);S.moveChildren(T),this.appendChild(T)}s(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replace",this).call(this,S)}}]),_}(c.default);y.blotName="list",y.scope=l.default.Scope.BLOCK_BLOT,y.tagName=["OL","UL"],y.defaultChild="list-item",y.allowedChildren=[p],r.ListItem=p,r.default=y},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i(56),s=a(o);function a(c){return c&&c.__esModule?c:{default:c}}function l(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}function u(c,d){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:c}function f(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}var h=function(c){f(d,c);function d(){return l(this,d),u(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return d}(s.default);h.blotName="italic",h.tagName=["EM","I"],r.default=h},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function w(v,E){for(var m=0;m-1?g?this.domNode.setAttribute(y,g):this.domNode.removeAttribute(y):s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,y,g)}}],[{key:"create",value:function(y){var g=s(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,y);return typeof y=="string"&&g.setAttribute("src",this.sanitize(y)),g}},{key:"formats",value:function(y){return w.reduce(function(g,_){return y.hasAttribute(_)&&(g[_]=y.getAttribute(_)),g},{})}},{key:"match",value:function(y){return/\.(jpe?g|gif|png)$/.test(y)||/^data:image\/.+;base64/.test(y)}},{key:"sanitize",value:function(y){return(0,u.sanitize)(y,["http","https","data"])?y:"//:0"}},{key:"value",value:function(y){return y.getAttribute("src")}}]),m}(l.default.Embed);v.blotName="image",v.tagName="IMG",r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function E(m,p){for(var y=0;y-1?g?this.domNode.setAttribute(y,g):this.domNode.removeAttribute(y):s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,y,g)}}],[{key:"create",value:function(y){var g=s(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,y);return g.setAttribute("frameborder","0"),g.setAttribute("allowfullscreen",!0),g.setAttribute("src",this.sanitize(y)),g}},{key:"formats",value:function(y){return w.reduce(function(g,_){return y.hasAttribute(_)&&(g[_]=y.getAttribute(_)),g},{})}},{key:"sanitize",value:function(y){return u.default.sanitize(y)}},{key:"value",value:function(y){return y.getAttribute("src")}}]),m}(a.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",r.default=v},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var o=function(){function y(g,_){for(var k=0;k<_.length;k++){var S=_[k];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,S.key,S)}}return function(g,_,k){return _&&y(g.prototype,_),k&&y(g,k),g}}(),s=function y(g,_,k){g===null&&(g=Function.prototype);var S=Object.getOwnPropertyDescriptor(g,_);if(S===void 0){var T=Object.getPrototypeOf(g);return T===null?void 0:y(T,_,k)}else{if("value"in S)return S.value;var x=S.get;return x===void 0?void 0:x.call(k)}},a=i(35),l=d(a),u=i(5),f=d(u),h=i(9),c=d(h);function d(y){return y&&y.__esModule?y:{default:y}}function w(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function v(y,g){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:y}function E(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);y.prototype=Object.create(g&&g.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(y,g):y.__proto__=g)}var m=function(y){E(g,y);function g(){return w(this,g),v(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,null,[{key:"create",value:function(k){var S=s(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,k);return typeof k=="string"&&(window.katex.render(k,S,{throwOnError:!1,errorColor:"#f00"}),S.setAttribute("data-value",k)),S}},{key:"value",value:function(k){return k.getAttribute("data-value")}}]),g}(l.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var p=function(y){E(g,y),o(g,null,[{key:"register",value:function(){f.default.register(m,!0)}}]);function g(){w(this,g);var _=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return _}return g}(c.default);r.FormulaBlot=m,r.default=p},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var o=function(){function k(S,T){for(var x=0;x0||this.cachedText==null)&&(this.domNode.innerHTML=x(I),this.domNode.normalize(),this.attach()),this.cachedText=I)}}]),S}(w.default);y.className="ql-syntax";var g=new l.default.Attributor.Class("token","hljs",{scope:l.default.Scope.INLINE}),_=function(k){p(S,k),o(S,null,[{key:"register",value:function(){f.default.register(g,!0),f.default.register(y,!0)}}]);function S(T,x){E(this,S);var I=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,T,x));if(typeof I.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var b=null;return I.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(b),b=setTimeout(function(){I.highlight(),b=null},I.options.interval)}),I.highlight(),I}return o(S,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var I=this.quill.getSelection();this.quill.scroll.descendants(y).forEach(function(b){b.highlight(x.options.highlight)}),this.quill.update(f.default.sources.SILENT),I!=null&&this.quill.setSelection(I,f.default.sources.SILENT)}}}]),S}(c.default);_.DEFAULTS={highlight:function(){return window.hljs==null?null:function(k){var S=window.hljs.highlightAuto(k);return S.value}}(),interval:1e3},r.CodeBlock=y,r.CodeToken=g,r.default=_},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r){n.exports=' '},function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var o=function S(T,x,I){T===null&&(T=Function.prototype);var b=Object.getOwnPropertyDescriptor(T,x);if(b===void 0){var N=Object.getPrototypeOf(T);return N===null?void 0:S(N,x,I)}else{if("value"in b)return b.value;var C=b.get;return C===void 0?void 0:C.call(I)}},s=function(){function S(T,x){for(var I=0;I0&&F===f.default.sources.USER){b.show(),b.root.style.left="0px",b.root.style.width="",b.root.style.width=b.root.offsetWidth+"px";var z=b.quill.getLines(C.index,C.length);if(z.length===1)b.position(b.quill.getBounds(C));else{var B=z[z.length-1],H=b.quill.getIndex(B),j=Math.min(B.length()-1,C.index+C.length-H),M=b.quill.getBounds(new d.Range(H,j));b.position(M)}}else document.activeElement!==b.textbox&&b.quill.hasFocus()&&b.hide()}),b}return s(T,[{key:"listen",value:function(){var I=this;o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){I.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!I.root.classList.contains("ql-hidden")){var b=I.quill.getSelection();b!=null&&I.position(I.quill.getBounds(b))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(I){var b=o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,I),N=this.root.querySelector(".ql-tooltip-arrow");if(N.style.marginLeft="",b===0)return b;N.style.marginLeft=-1*b-N.offsetWidth/2+"px"}}]),T}(h.BaseTooltip);k.TEMPLATE=['','
','','',"
"].join(""),r.BubbleTooltip=k,r.default=_},function(n,r,i){n.exports=i(63)}]).default})})(zI);var Kq=zI.exports,Wq=Jt&&Jt.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yc=Jt&&Jt.__assign||function(){return yc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1)throw new Error("The Quill editing area can only be composed of a single React element.");if(Dn.default.Children.count(n.children)){var i=Dn.default.Children.only(n.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a