@streamlayer/react 0.14.2 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -28,14 +28,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
28
28
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function op(e,t){if(e){if(typeof e=="string")return ri(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ri(e,t)}}function ri(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function lp(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,s=!1,i,o;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(a.push(i.value),!(t&&a.length===t));r=!0);}catch(d){s=!0,o=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw o}}return a}}function up(e){if(Array.isArray(e))return e}function cp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function si(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function dp(e,t,n){return t&&si(e.prototype,t),n&&si(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var mp="["+Ge+ve+"]+",fp=new RegExp("^"+mp+"$","i"),pp="(?:["+Qn+"]["+Ge+ve+"]*|["+Ge+ve+"]+)",yp=new RegExp("[^"+Ge+ve+"]+.*$"),gp=/[^\d\[\]]/,Tp=function(){function e(t){var n=t.defaultCountry,a=t.defaultCallingCode,r=t.metadata,s=t.onNationalSignificantNumberChange;cp(this,e),this.defaultCountry=n,this.defaultCallingCode=a,this.metadata=r,this.onNationalSignificantNumberChange=s}return dp(e,[{key:"input",value:function(n,a){var r=Np(n),s=_l(r,2),i=s[0],o=s[1],d=wn(i),m;return o&&(a.digits||(a.startInternationalNumber(),d||(m=!0))),d&&this.inputDigits(d,a),{digits:d,justLeadingPlus:m}}},{key:"inputDigits",value:function(n,a){var r=a.digits,s=r.length<3&&r.length+n.length>=3;if(a.appendDigits(n),s&&this.extractIddPrefix(a),this.isWaitingForCountryCallingCode(a)){if(!this.extractCountryCallingCode(a))return}else a.appendNationalSignificantNumberDigits(n);a.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(a.getNationalDigits(),function(i){return a.update(i)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var a=n.international,r=n.callingCode;return a&&!r}},{key:"extractCountryCallingCode",value:function(n){var a=bl("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=a.countryCallingCode,s=a.number;if(r)return n.setCallingCode(r),n.update({nationalSignificantNumber:s}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var a=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=a&&gp.test(a)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,a){if(this.hasSelectedNumberingPlan){var r=Xa(n,this.metadata),s=r.nationalPrefix,i=r.nationalNumber,o=r.carrierCode;if(i!==n)return this.onExtractedNationalNumber(s,o,i,n,a),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,a,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var s=Xa(n,this.metadata),i=s.nationalPrefix,o=s.nationalNumber,d=s.carrierCode;if(o!==a)return this.onExtractedNationalNumber(i,d,o,n,r),!0}}},{key:"onExtractedNationalNumber",value:function(n,a,r,s,i){var o,d,m=s.lastIndexOf(r);if(m>=0&&m===s.length-r.length){d=!0;var p=s.slice(0,m);p!==n&&(o=p)}i({nationalPrefix:n,carrierCode:a,nationalSignificantNumber:r,nationalSignificantNumberMatchesInput:d,complexPrefixBeforeNationalSignificantNumber:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(a){return n.update(a)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var a=n.international,r=n.IDDPrefix,s=n.digits;if(n.nationalSignificantNumber,!(a||r)){var i=Il(s,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(i!==void 0&&i!==s)return n.update({IDDPrefix:s.slice(0,s.length-i.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var a=Sl(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=a.countryCallingCode;if(a.number,r)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:r}),!0}}},{key:"startInternationalNumber",value:function(n,a){var r=a.country,s=a.callingCode;n.startInternationalNumber(r,s),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(a){return n.update(a)})}}]),e}();function hp(e){var t=e.search(pp);if(!(t<0)){e=e.slice(t);var n;return e[0]==="+"&&(n=!0,e=e.slice(1)),e=e.replace(yp,""),n&&(e="+"+e),e}}function kp(e){var t=hp(e)||"";return t[0]==="+"?[t.slice(1),!0]:[t]}function Np(e){var t=kp(e),n=_l(t,2),a=n[0],r=n[1];return fp.test(a)||(a=""),[a,r]}function Mp(e,t){return $p(e)||bp(e,t)||Sp(e,t)||Ip()}function Ip(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
29
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sp(e,t){if(e){if(typeof e=="string")return ii(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ii(e,t)}}function ii(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function bp(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a=[],r=!0,s=!1,i,o;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(a.push(i.value),!(t&&a.length===t));r=!0);}catch(d){s=!0,o=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw o}}return a}}function $p(e){if(Array.isArray(e))return e}function vp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oi(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ap(e,t,n){return t&&oi(e.prototype,t),n&&oi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var zt=function(){function e(t,n){vp(this,e),this.metadata=new ge(n);var a=this.getCountryAndCallingCode(t),r=Mp(a,2),s=r[0],i=r[1];this.defaultCountry=s,this.defaultCallingCode=i,this.reset()}return Ap(e,[{key:"getCountryAndCallingCode",value:function(n){var a,r;return n&&(Kt(n)?(a=n.defaultCountry,r=n.defaultCallingCode):a=n),a&&!this.metadata.hasCountry(a)&&(a=void 0),[a,r]}},{key:"input",value:function(n){var a=this.parser.input(n,this.state),r=a.digits,s=a.justLeadingPlus;if(s)this.formattedOutput="+";else if(r){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var i;if(this.metadata.hasSelectedNumberingPlan()&&(i=this.formatter.format(r,this.state)),i===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var o=this.state.getNationalDigits();o&&(i=this.formatter.format(o,this.state))}this.formattedOutput=i?this.getFullNumber(i):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new _f({onCountryChange:function(r){n.country=r},onCallingCodeChange:function(r,s){n.metadata.selectNumberingPlan(s,r),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new sp({state:this.state,metadata:this.metadata}),this.parser=new Tp({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var a=this;if(this.isInternational()){var r=function(o){return a.formatter.getInternationalPrefixBeforeCountryCallingCode(a.state,{spacing:!!o})+o},s=this.state.callingCode;return r(s?n?"".concat(s," ").concat(n):s:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,a=n.nationalSignificantNumber,r=n.complexPrefixBeforeNationalSignificantNumber,s=n.nationalPrefix,i=a,o=r||s;return o&&(i=o+i),i}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Fe)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,a=this.metadata.getCountryCodesForCallingCode(n);return a&&a.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(vl(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,a=n.digits,r=n.callingCode,s=n.country,i=n.nationalSignificantNumber;if(a){if(this.isInternational())return r?"+"+r+i:"+"+a;if(s||r){var o=s?this.metadata.countryCallingCode():r;return"+"+o+i}}}},{key:"getNumber",value:function(){var n=this.state,a=n.nationalSignificantNumber,r=n.carrierCode,s=n.callingCode,i=this._getCountry();if(a&&!(!i&&!s)){if(i&&i===this.defaultCountry){var o=new ge(this.metadata.metadata);o.selectNumberingPlan(i);var d=o.numberingPlan.callingCode(),m=this.metadata.getCountryCodesForCallingCode(d);if(m.length>1){var p=$l(a,{countries:m,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});p&&(i=p)}}var T=new Ml(i||s,a,this.metadata.metadata);return r&&(T.carrierCode=r),T}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),e}();function li(e){return new ge(e).getCountries()}function Ep(e,t,n){return n||(n=t,t=void 0),new zt(t,n).input(e)}function wl(e){var t=e.country,n=e.international,a=e.withCountryCallingCode,r=e.metadata;return t&&n&&!a?"+".concat(dt(t,r)):""}function sr(e,t){return t&&(e=e.slice(t.length),e[0]===" "&&(e=e.slice(1))),e}var Op=["country","international","withCountryCallingCode","metadata"];function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ir.apply(this,arguments)}function Dp(e,t){if(e==null)return{};var n=_p(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function _p(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function wp(e){function t(n,a){var r=n.country,s=n.international,i=n.withCountryCallingCode,o=n.metadata,d=o===void 0?e:o,m=Dp(n,Op),p=C.useCallback(function(T){var y=new zt(r,d),k=wl({country:r,international:s,withCountryCallingCode:i,metadata:d}),S=y.input(k+T),b=y.getTemplate();return k&&(S=sr(S,k),b&&(b=sr(b,k))),{text:S,template:b}},[r,d]);return C.createElement(jd,ir({},m,{ref:a,parse:yl,format:p}))}return t=C.forwardRef(t),t.propTypes={value:x.string.isRequired,onChange:x.func.isRequired,country:x.string,international:x.bool,withCountryCallingCode:x.bool,metadata:x.object},t}const Cp=wp();var Rp=["value","onChange","country","international","withCountryCallingCode","metadata","inputComponent"];function or(){return or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},or.apply(this,arguments)}function jp(e,t){if(e==null)return{};var n=xp(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function xp(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Lp(e){function t(n,a){var r=n.value,s=n.onChange,i=n.country,o=n.international,d=n.withCountryCallingCode,m=n.metadata,p=m===void 0?e:m,T=n.inputComponent,y=T===void 0?"input":T,k=jp(n,Rp),S=wl({country:i,international:o,withCountryCallingCode:d,metadata:p}),b=C.useCallback(function(R){var $=Ja(R.target.value);if($===r){var _=ui(S,$,i,p);_.indexOf(R.target.value)===0&&($=$.slice(0,-1))}s($)},[S,r,s,i,p]);return C.createElement(y,or({},k,{ref:a,value:ui(S,r,i,p),onChange:b}))}return t=C.forwardRef(t),t.propTypes={value:x.string.isRequired,onChange:x.func.isRequired,country:x.string,international:x.bool,withCountryCallingCode:x.bool,metadata:x.object,inputComponent:x.elementType},t}const Pp=Lp();function ui(e,t,n,a){return sr(Ep(e+t,n,a),e)}function Up(e){return ci(e[0])+ci(e[1])}function ci(e){return String.fromCodePoint(127462-65+e.toUpperCase().charCodeAt(0))}var Fp=["value","onChange","options","disabled","readOnly"],zp=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function Bp(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Gp(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
30
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gp(e,t){if(e){if(typeof e=="string")return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}}function di(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Rn.apply(this,arguments)}function Cl(e,t){if(e==null)return{};var n=Qp(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Qp(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Rl(e){var t=e.value,n=e.onChange,a=e.options,r=e.disabled,s=e.readOnly,i=Cl(e,Fp),o=C.useCallback(function(d){var m=d.target.value;n(m==="ZZ"?void 0:m)},[n]);return C.useMemo(function(){return xl(a,t)},[a,t]),C.createElement("select",Rn({},i,{disabled:r||s,readOnly:s,value:t||"ZZ",onChange:o}),a.map(function(d){var m=d.value,p=d.label,T=d.divider;return C.createElement("option",{key:T?"|":m||"ZZ",value:T?"|":m||"ZZ",disabled:!!T,style:T?Yp:void 0},p)}))}Rl.propTypes={value:x.string,onChange:x.func.isRequired,options:x.arrayOf(x.shape({value:x.string,label:x.string,divider:x.bool})).isRequired,disabled:x.bool,readOnly:x.bool};var Yp={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function jl(e){var t=e.value,n=e.options,a=e.className,r=e.iconComponent;e.getIconAspectRatio;var s=e.arrowComponent,i=s===void 0?Vp:s,o=e.unicodeFlags,d=Cl(e,zp),m=C.useMemo(function(){return xl(n,t)},[n,t]);return C.createElement("div",{className:"PhoneInputCountry"},C.createElement(Rl,Rn({},d,{value:t,options:n,className:_n("PhoneInputCountrySelect",a)})),o&&t&&C.createElement("div",{className:"PhoneInputCountryIconUnicode"},Up(t)),!(o&&t)&&C.createElement(r,{"aria-hidden":!0,country:t,label:m&&m.label,aspectRatio:o?1:void 0}),C.createElement(i,null))}jl.propTypes={iconComponent:x.elementType,arrowComponent:x.elementType,unicodeFlags:x.bool};function Vp(){return C.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function xl(e,t){for(var n=Bp(e),a;!(a=n()).done;){var r=a.value;if(!r.divider&&r.value===t)return r}}var Wp=["country","countryName","flags","flagUrl"];function lr(){return lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},lr.apply(this,arguments)}function qp(e,t){if(e==null)return{};var n=Hp(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Hp(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function xr(e){var t=e.country,n=e.countryName,a=e.flags,r=e.flagUrl,s=qp(e,Wp);return a&&a[t]?a[t]({title:n}):C.createElement("img",lr({},s,{alt:n,role:n?void 0:"presentation",src:r.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}xr.propTypes={country:x.string.isRequired,countryName:x.string.isRequired,flags:x.objectOf(x.elementType),flagUrl:x.string.isRequired};var Zp=["aspectRatio"],Kp=["title"],Jp=["title"];function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},jn.apply(this,arguments)}function Lr(e,t){if(e==null)return{};var n=Xp(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Xp(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function qn(e){var t=e.aspectRatio,n=Lr(e,Zp);return t===1?C.createElement(Pl,n):C.createElement(Ll,n)}qn.propTypes={title:x.string.isRequired,aspectRatio:x.number};function Ll(e){var t=e.title,n=Lr(e,Kp);return C.createElement("svg",jn({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),C.createElement("title",null,t),C.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},C.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),C.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),C.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),C.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),C.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),C.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),C.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}Ll.propTypes={title:x.string.isRequired};function Pl(e){var t=e.title,n=Lr(e,Jp);return C.createElement("svg",jn({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),C.createElement("title",null,t),C.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},C.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),C.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),C.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),C.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),C.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),C.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),C.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}Pl.propTypes={title:x.string.isRequired};function ey(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ty(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ty(e,t){if(e){if(typeof e=="string")return mi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mi(e,t)}}function mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ny(e,t){if(!t)return e;for(var n=[],a=[],r=n,s=ey(t),i;!(i=s()).done;){var o=i.value;o==="|"?r.push({divider:!0}):o==="..."||o==="…"?r=a:function(){var d=void 0;o==="🌐"?d=void 0:d=o;var m=e.indexOf(e.filter(function(T){return T.value===d})[0]),p=e[m];e.splice(m,1),r.push(p)}()}return n.concat(e).concat(a)}function ay(e,t){if(e&&(e=e.filter(function(n){switch(n){case"🌐":case"|":case"...":case"…":return!0;default:return Hn(n,t)}}),e.length>0))return e}function Hn(e,t){return dl(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function Ul(e,t){return e&&(e=e.filter(function(n){return Hn(n,t)}),e.length===0&&(e=void 0)),e}var ry=["country","label","aspectRatio"];function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ur.apply(this,arguments)}function sy(e,t){if(e==null)return{};var n=iy(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function iy(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Fl(e){var t=e.flags,n=e.flagUrl,a=e.flagComponent,r=e.internationalIcon;function s(i){var o=i.country,d=i.label,m=i.aspectRatio,p=sy(i,ry),T=r===qn?m:void 0;return C.createElement("div",ur({},p,{className:_n("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":T===1,"PhoneInputCountryIcon--border":o})}),o?C.createElement(a,{country:o,countryName:d,flags:t,flagUrl:n,className:"PhoneInputCountryIconImg"}):C.createElement(r,{title:d,aspectRatio:T,className:"PhoneInputCountryIconImg"}))}return s.propTypes={country:x.string,label:x.string.isRequired,aspectRatio:x.number},s}Fl({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:xr,internationalIcon:qn});var zl=x.shape({country_calling_codes:x.object.isRequired,countries:x.object.isRequired}),Bl=x.objectOf(x.string);function tt(e,t){var n="+"+dt(e,t);return n}function oy(e){var t=e.value,n=e.phoneNumber,a=e.defaultCountry,r=e.getAnyCountry,s=e.countries,i=e.required,o=e.metadata,d;return n&&n.country?d=n.country:a&&(!t||Vl(t,a,o))&&(d=a),s&&s.indexOf(d)<0&&(d=void 0),!d&&i&&s&&s.length>0&&(d=r()),d}function ly(e){var t=e.countries,n=e.countryNames,a=e.addInternationalOption,r=e.compareStringsLocales,s=e.compareStrings;s||(s=yy);var i=t.map(function(o){return{value:o,label:n[o]||o}});return i.sort(function(o,d){return s(o.label,d.label,r)}),a&&i.unshift({label:n.ZZ}),i}function Gl(e,t){return Dl(e||"",t)}function uy(e){return e.formatNational().replace(/\D/g,"")}function cy(e,t){var n=t.prevCountry,a=t.newCountry,r=t.metadata,s=t.useNationalFormat;if(n===a)return e;if(!e)return s?"":a?tt(a,r):"";if(a){if(e[0]==="+"){if(s)return e.indexOf("+"+dt(a,r))===0?gy(e,a,r):"";if(n){var i=tt(a,r);return e.indexOf(i)===0?e:i}else{var o=tt(a,r);return e.indexOf(o)===0?e:o}}}else if(e[0]!=="+")return _t(e,n,r)||"";return e}function _t(e,t,n){if(e){if(e[0]==="+"){if(e==="+")return;var a=new zt(t,n);return a.input(e),a.getNumberValue()}if(t){var r=Yl(e,t,n);return"+".concat(dt(t,n)).concat(r||"")}}}function dy(e,t,n){var a=Yl(e,t,n);if(a){var r=a.length-my(t,n);if(r>0)return e.slice(0,e.length-r)}return e}function my(e,t){return t=new ge(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Ql(e,t){var n=t.country,a=t.countries,r=t.required,s=t.metadata;if(e==="+")return n;var i=py(e,s);return i&&(!a||a.indexOf(i)>=0)?i:n&&!r&&!Vl(e,n,s)?void 0:n}function fy(e,t){var n=t.prevPhoneDigits,a=t.country,r=t.defaultCountry,s=t.countryRequired,i=t.getAnyCountry,o=t.countries,d=t.international,m=t.limitMaxLength,p=t.countryCallingCodeEditable,T=t.metadata;if(d&&p===!1&&a){var y=tt(a,T);if(e.indexOf(y)!==0){var k,S=e&&e[0]!=="+";return S?(e=y+e,k=_t(e,a,T)):e=y,{phoneDigits:e,value:k,country:a}}}d===!1&&a&&e&&e[0]==="+"&&(e=fi(e,a,T)),e&&a&&m&&(e=dy(e,a,T)),e&&e[0]!=="+"&&(!a||d)&&(e="+"+e),!e&&n&&n[0]==="+"&&(d?a=void 0:a=r),e==="+"&&n&&n[0]==="+"&&n.length>1&&(a=void 0);var b;return e&&(e[0]==="+"&&(e==="+"||a&&tt(a,T).indexOf(e)===0)?b=void 0:b=_t(e,a,T)),b&&(a=Ql(b,{country:a,countries:o,metadata:T}),d===!1&&a&&e&&e[0]==="+"&&(e=fi(e,a,T),b=_t(e,a,T))),!a&&s&&(a=r||i()),{phoneDigits:e,country:a,value:b}}function fi(e,t,n){if(e.indexOf(tt(t,n))===0){var a=new zt(t,n);a.input(e);var r=a.getNumber();return r?r.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function py(e,t){var n=new zt(null,t);return n.input(e),n.getCountry()}function yy(e,t,n){return String.prototype.localeCompare?e.localeCompare(t,n):e<t?-1:e>t?1:0}function gy(e,t,n){if(t){var a="+"+dt(t,n);if(e.length<a.length){if(a.indexOf(e)===0)return""}else if(e.indexOf(a)===0)return e.slice(a.length)}for(var r=0,s=Object.keys(n.country_calling_codes);r<s.length;r++){var i=s[r];if(e.indexOf(i)===1)return e.slice(1+i.length)}return""}function Yl(e,t,n){var a=new zt(t,n);a.input(e);var r=a.getNumber();return r&&r.nationalNumber}function Vl(e,t,n){for(var a=tt(t,n),r=0;r<e.length&&r<a.length;){if(e[r]!==a[r])return!1;r++}return!0}function Wl(e){var t=e.value,n=e.phoneNumber,a=e.defaultCountry,r=e.international,s=e.useNationalFormat,i=e.metadata;return(r===!1||s)&&n&&n.country?uy(n):!t&&r&&a?tt(a,i):t}function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pi(Object(n),!0).forEach(function(a){Ty(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hy(e,t,n){var a=e.metadata,r=e.countries,s=e.defaultCountry,i=e.value,o=e.reset,d=e.international,m=e.displayInitialValueAsLocalNumber,p=e.initialValueFormat,T=t.defaultCountry,y=t.value,k=t.reset;n.country;var S=n.value,b=n.hasUserSelectedACountry,R=function(q){return Wl(yn(yn({},q),{},{international:d,useNationalFormat:m||p==="national",metadata:a}))};if(o!==k)return{phoneDigits:R({value:void 0,defaultCountry:s}),value:void 0,country:s,hasUserSelectedACountry:void 0};if(s!==T){var $=!s||Hn(s,a),_=!S||d&&S===R({value:void 0,defaultCountry:T}),L=!i&&_;if(!b&&$&&L)return{country:s,phoneDigits:R({value:void 0,defaultCountry:s}),value:void 0}}if(!yi(i,y)&&!yi(i,S)){var P,F;if(i){P=Gl(i,a);var B=Ul(r,a);P&&P.country?(!B||B.indexOf(P.country)>=0)&&(F=P.country):(F=Ql(i,{country:void 0,countries:B,metadata:a}),F||s&&i.indexOf(tt(s,a))===0&&(F=s))}var U;return i||(U={hasUserSelectedACountry:void 0}),yn(yn({},U),{},{phoneDigits:R({phoneNumber:P,value:i,defaultCountry:s}),value:i,country:i?F:s})}}function yi(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}function cr(e){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(e)}var ky=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function ql(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gi(Object(n),!0).forEach(function(a){Ue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ln.apply(this,arguments)}function Ny(e,t){if(e==null)return{};var n=My(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function My(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Iy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Sy(e,t,n){return t&&Ti(e.prototype,t),n&&Ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function by(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dr(e,t)}function dr(e,t){return dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,r){return a.__proto__=r,a},dr(e,t)}function $y(e){var t=Ay();return function(){var a=xn(e),r;if(t){var s=xn(this).constructor;r=Reflect.construct(a,arguments,s)}else r=a.apply(this,arguments);return vy(this,r)}}function vy(e,t){if(t&&(cr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pe(e)}function Pe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ay(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xn(e){return xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xn(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ey=function(e){by(n,e);var t=$y(n);function n(a){var r;Iy(this,n),r=t.call(this,a),Ue(Pe(r),"setInputRef",function($){r.inputRef.current=$;var _=r.props.inputRef;_&&(typeof _=="function"?_($):_.current=$)}),Ue(Pe(r),"isCountrySupportedWithError",function($){var _=r.props.metadata;return Hn($,_)}),Ue(Pe(r),"onCountryChange",function($){var _=r.props,L=_.international,P=_.metadata,F=_.onChange,B=_.focusInputOnCountrySelection,U=r.state,V=U.phoneDigits,q=U.country,J=cy(V,{prevCountry:q,newCountry:$,metadata:P,useNationalFormat:!L}),re=_t(J,$,P);B&&r.inputRef.current.focus(),r.setState({country:$,hasUserSelectedACountry:!0,phoneDigits:J,value:re},function(){F(re)})}),Ue(Pe(r),"onChange",function($){var _=r.props,L=_.defaultCountry,P=_.onChange,F=_.addInternationalOption,B=_.international,U=_.limitMaxLength,V=_.countryCallingCodeEditable,q=_.metadata,J=r.state,re=J.countries,ce=J.phoneDigits,oe=J.country,H=fy($,{prevPhoneDigits:ce,country:oe,countryRequired:!F,defaultCountry:L,getAnyCountry:function(){return r.getFirstSupportedCountry({countries:re})},countries:re,international:B,limitMaxLength:U,countryCallingCodeEditable:V,metadata:q}),le=H.phoneDigits,Me=H.country,Ee=H.value,Oe={phoneDigits:le,value:Ee,country:Me};V===!1&&!Ee&&le===r.state.phoneDigits&&(Oe.forceRerender={}),r.setState(Oe,function(){return P(Ee)})}),Ue(Pe(r),"_onFocus",function(){return r.setState({isFocused:!0})}),Ue(Pe(r),"_onBlur",function(){return r.setState({isFocused:!1})}),Ue(Pe(r),"onFocus",function($){r._onFocus();var _=r.props.onFocus;_&&_($)}),Ue(Pe(r),"onBlur",function($){var _=r.props.onBlur;r._onBlur(),_&&_($)}),Ue(Pe(r),"onCountryFocus",function($){r._onFocus();var _=r.props.countrySelectProps;if(_){var L=_.onFocus;L&&L($)}}),Ue(Pe(r),"onCountryBlur",function($){r._onBlur();var _=r.props.countrySelectProps;if(_){var L=_.onBlur;L&&L($)}}),r.inputRef=C.createRef();var s=r.props,i=s.value;s.labels;var o=s.international,d=s.addInternationalOption,m=s.displayInitialValueAsLocalNumber,p=s.initialValueFormat,T=s.metadata,y=r.props,k=y.defaultCountry,S=y.countries;k&&(r.isCountrySupportedWithError(k)||(k=void 0)),S=Ul(S,T);var b=Gl(i,T);r.CountryIcon=Fl(r.props);var R=oy({value:i,phoneNumber:b,defaultCountry:k,required:!d,countries:S||li(T),getAnyCountry:function(){return r.getFirstSupportedCountry({countries:S})},metadata:T});return r.state={props:r.props,country:R,countries:S,phoneDigits:Wl({value:i,phoneNumber:b,defaultCountry:k,international:o,useNationalFormat:m||p==="national",metadata:T}),value:i},r}return Sy(n,[{key:"componentDidMount",value:function(){var r=this.props.onCountryChange,s=this.props.defaultCountry,i=this.state.country;r&&(s&&(this.isCountrySupportedWithError(s)||(s=void 0)),i!==s&&r(i))}},{key:"componentDidUpdate",value:function(r,s){var i=this.props.onCountryChange,o=this.state.country;i&&o!==s.country&&i(o)}},{key:"getCountrySelectOptions",value:function(r){var s=r.countries,i=this.props,o=i.international,d=i.countryCallingCodeEditable,m=i.countryOptionsOrder,p=i.addInternationalOption,T=i.labels,y=i.locales,k=i.metadata;return this.useMemoCountrySelectOptions(function(){return ny(ly({countries:s||li(k),countryNames:T,addInternationalOption:o&&d===!1?!1:p,compareStringsLocales:y}),ay(m,k))},[s,m,p,T,k])}},{key:"useMemoCountrySelectOptions",value:function(r,s){return(!this.countrySelectOptionsMemoDependencies||!_y(s,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=r(),this.countrySelectOptionsMemoDependencies=s),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(r){var s=r.countries,i=this.getCountrySelectOptions({countries:s});return i[0].value}},{key:"render",value:function(){var r=this.props,s=r.name,i=r.disabled,o=r.readOnly,d=r.autoComplete,m=r.style,p=r.className;r.inputRef;var T=r.inputComponent,y=r.numberInputProps,k=r.smartCaret,S=r.countrySelectComponent,b=r.countrySelectProps,R=r.containerComponent;r.defaultCountry,r.countries,r.countryOptionsOrder;var $=r.labels;r.flags,r.flagComponent,r.flagUrl,r.addInternationalOption,r.internationalIcon,r.displayInitialValueAsLocalNumber,r.initialValueFormat,r.onCountryChange,r.limitMaxLength,r.countryCallingCodeEditable,r.focusInputOnCountrySelection,r.reset;var _=r.metadata;r.international,r.locales;var L=Ny(r,ky),P=this.state,F=P.country,B=P.countries,U=P.phoneDigits,V=P.isFocused,q=k?Cp:Pp,J=this.getCountrySelectOptions({countries:B});return C.createElement(R,{style:m,className:_n(p,"PhoneInput",{"PhoneInput--focus":V,"PhoneInput--disabled":i,"PhoneInput--readOnly":o})},C.createElement(S,ln({name:s?"".concat(s,"Country"):void 0,"aria-label":$.country},b,{value:F,options:J,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:i||b&&b.disabled,readOnly:o||b&&b.readOnly,iconComponent:this.CountryIcon})),C.createElement(q,ln({ref:this.setInputRef,type:"tel",autoComplete:d},y,L,{name:s,metadata:_,country:F,value:U||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:i,readOnly:o,inputComponent:T,className:_n("PhoneInputInput",y&&y.className,L.className)})))}}],[{key:"getDerivedStateFromProps",value:function(r,s){return ql({props:r},hy(r,s.props,s))}}]),n}(C.PureComponent),Hl=C.forwardRef(function(e,t){return C.createElement(Ey,ln({},Oy(e),{inputRef:t}))});Hl.propTypes={value:x.string,onChange:x.func.isRequired,onFocus:x.func,onBlur:x.func,disabled:x.bool,readOnly:x.bool,autoComplete:x.string,initialValueFormat:x.oneOf(["national"]),displayInitialValueAsLocalNumber:x.bool,defaultCountry:x.string,countries:x.arrayOf(x.string),labels:Bl,locales:x.oneOfType([x.string,x.arrayOf(x.string)]),flagUrl:x.string,flags:x.objectOf(x.elementType),flagComponent:x.elementType,addInternationalOption:x.bool,internationalIcon:x.elementType,countryOptionsOrder:x.arrayOf(x.string),style:x.object,className:x.string,countrySelectComponent:x.elementType,countrySelectProps:x.object,inputComponent:x.elementType,containerComponent:x.elementType,numberInputProps:x.object,smartCaret:x.bool,international:x.bool,limitMaxLength:x.bool,countryCallingCodeEditable:x.bool,metadata:zl,onCountryChange:x.func,focusInputOnCountrySelection:x.bool};var hi={autoComplete:"tel",countrySelectComponent:jl,flagComponent:xr,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:qn,inputComponent:"input",containerComponent:"div",reset:x.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function Oy(e){e=ql({},e);for(var t in hi)e[t]===void 0&&(e[t]=hi[t]);return e}const Dy=Hl;function _y(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;){if(e[n]!==t[n])return!1;n++}return!0}function mr(e){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(e)}function wy(e,t,n){if(n||mr(t)==="object"&&(n=t,t="NATIONAL"),!e)return"";var a=Dl(e,n);if(!a)return"";switch(t){case"National":t="NATIONAL";break;case"International":t="INTERNATIONAL";break}return a.format(t)}function Cy(e,t){return wy(e,"INTERNATIONAL",t)}const Ry={ext:"ext.",country:"Phone number country",phone:"Phone",AB:"Abkhazia",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",OS:"South Ossetia",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"};var jy=["metadata","labels"];function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fr.apply(this,arguments)}function xy(e,t){if(e==null)return{};var n=Ly(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Ly(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Zl(e){var t=C.forwardRef(function(n,a){var r=n.metadata,s=r===void 0?e:r,i=n.labels,o=i===void 0?Ry:i,d=xy(n,jy);return C.createElement(Dy,fr({},d,{ref:a,metadata:s,labels:o}))});return t.propTypes={metadata:zl,labels:Bl},t}Zl();function Kl(e,t){var n=Array.prototype.slice.call(t);return n.push(al),e.apply(this,n)}const Py=Zl(al);function Uy(){return Kl(Cy,arguments)}function Fy(){return Kl(Ef,arguments)}var ki=typeof window>"u"?C.useEffect:C.useLayoutEffect,zy=({isPlaying:e,duration:t,startAt:n=0,updateInterval:a=0,onComplete:r,onUpdate:s})=>{let[i,o]=C.useState(n),d=C.useRef(0),m=C.useRef(n),p=C.useRef(n*-1e3),T=C.useRef(null),y=C.useRef(null),k=C.useRef(null),S=$=>{let _=$/1e3;if(y.current===null){y.current=_,T.current=requestAnimationFrame(S);return}let L=_-y.current,P=d.current+L;y.current=_,d.current=P;let F=m.current+(a===0?P:(P/a|0)*a),B=m.current+P,U=typeof t=="number"&&B>=t;o(U?t:F),U||(T.current=requestAnimationFrame(S))},b=()=>{T.current&&cancelAnimationFrame(T.current),k.current&&clearTimeout(k.current),y.current=null},R=C.useCallback($=>{b(),d.current=0;let _=typeof $=="number"?$:n;m.current=_,o(_),e&&(T.current=requestAnimationFrame(S))},[e,n]);return ki(()=>{if(s==null||s(i),t&&i>=t){p.current+=t*1e3;let{shouldRepeat:$=!1,delay:_=0,newStartAt:L}=(r==null?void 0:r(p.current/1e3))||{};$&&(k.current=setTimeout(()=>R(L),_*1e3))}},[i,t]),ki(()=>(e&&(T.current=requestAnimationFrame(S)),b),[e,t,a]),{elapsedTime:i,reset:R}},By=(e,t,n)=>{let a=e/2,r=t/2,s=a-r,i=2*s,o=n==="clockwise"?"1,0":"0,1",d=2*Math.PI*s;return{path:`m ${a},${r} a ${s},${s} 0 ${o} 0,${i} a ${s},${s} 0 ${o} 0,-${i}`,pathLength:d}},Ni=(e,t)=>e===0||e===t?0:typeof t=="number"?e-t:0,Gy=e=>({position:"relative",width:e,height:e}),Qy={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},Jl=(e,t,n,a,r)=>{if(a===0)return t;let s=(r?a-e:e)/a;return t+n*s},Mi=e=>{var t,n;return(n=(t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(a,r,s,i)=>`#${r}${r}${s}${s}${i}${i}`).substring(1).match(/.{2}/g))==null?void 0:t.map(a=>parseInt(a,16)))!=null?n:[]},Yy=(e,t)=>{var n;let{colors:a,colorsTime:r,isSmoothColorTransition:s=!0}=e;if(typeof a=="string")return a;let i=(n=r==null?void 0:r.findIndex((y,k)=>y>=t&&t>=r[k+1]))!=null?n:-1;if(!r||i===-1)return a[0];if(!s)return a[i];let o=r[i]-t,d=r[i]-r[i+1],m=Mi(a[i]),p=Mi(a[i+1]),T=!!e.isGrowing;return`rgb(${m.map((y,k)=>Jl(o,y,p[k]-y,d,T)|0).join(",")})`},Vy=e=>{let{duration:t,initialRemainingTime:n,updateInterval:a,size:r=180,strokeWidth:s=12,trailStrokeWidth:i,isPlaying:o=!1,isGrowing:d=!1,rotation:m="clockwise",onComplete:p,onUpdate:T}=e,y=C.useRef(),k=Math.max(s,i??0),{path:S,pathLength:b}=By(r,k,m),{elapsedTime:R}=zy({isPlaying:o,duration:t,startAt:Ni(t,n),updateInterval:a,onUpdate:typeof T=="function"?_=>{let L=Math.ceil(t-_);L!==y.current&&(y.current=L,T(L))}:void 0,onComplete:typeof p=="function"?_=>{var L;let{shouldRepeat:P,delay:F,newInitialRemainingTime:B}=(L=p(_))!=null?L:{};if(P)return{shouldRepeat:P,delay:F,newStartAt:Ni(t,B)}}:void 0}),$=t-R;return{elapsedTime:R,path:S,pathLength:b,remainingTime:Math.ceil($),rotation:m,size:r,stroke:Yy(e,$),strokeDashoffset:Jl(R,0,b,t,d),strokeWidth:s}},Xl=e=>{let{children:t,strokeLinecap:n,trailColor:a,trailStrokeWidth:r}=e,{path:s,pathLength:i,stroke:o,strokeDashoffset:d,remainingTime:m,elapsedTime:p,size:T,strokeWidth:y}=Vy(e);return C.createElement("div",{style:Gy(T)},C.createElement("svg",{viewBox:`0 0 ${T} ${T}`,width:T,height:T,xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:s,fill:"none",stroke:a??"#d9d9d9",strokeWidth:r??y}),C.createElement("path",{d:s,fill:"none",stroke:o,strokeLinecap:n??"round",strokeWidth:y,strokeDasharray:i,strokeDashoffset:d})),typeof t=="function"&&C.createElement("div",{style:Qy},t({remainingTime:m,elapsedTime:p,color:o})))};Xl.displayName="CountdownCircleTimer";const Ta={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const Wy=v("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),qy=[Ta.BLUE_PRIMARY,Ta.GREEN_1,Ta.RED_1],Hy=[10,6,0],Zy=30,Ky=32,Jy=4,Xy=0,eu=({isPlaying:e=!0,duration:t=Zy,setTimeToExpire:n})=>{const a=({remainingTime:r})=>h.jsx(Wy,{style:{color:r?"inherit":void 0},children:r});return C.useEffect(()=>{n(!1)},[n]),h.jsx(Xl,{isPlaying:e,duration:t,colors:qy,colorsTime:Hy,size:Ky,strokeWidth:Jy,trailStrokeWidth:Xy,onComplete:()=>n(!0),children:a})};function Ae(e,t){if(!e)throw new Error(t)}const eg=34028234663852886e22,tg=-34028234663852886e22,ng=4294967295,ag=2147483647,rg=-2147483648;function In(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>ag||e<rg)throw new Error("invalid int 32: "+e)}function pr(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>ng||e<0)throw new Error("invalid uint 32: "+e)}function tu(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>eg||e<tg))throw new Error("invalid float 32: "+e)}const nu=Symbol("@bufbuild/protobuf/enum-type");function sg(e){const t=e[nu];return Ae(t,"missing enum type on enum object"),t}function au(e,t,n,a){e[nu]=ru(t,n.map(r=>({no:r.no,name:r.name,localName:e[r.no]})))}function ru(e,t,n){const a=Object.create(null),r=Object.create(null),s=[];for(const i of t){const o=su(i);s.push(o),a[i.name]=o,r[i.no]=o}return{typeName:e,values:s,findName(i){return a[i]},findNumber(i){return r[i]}}}function ig(e,t,n){const a={};for(const r of t){const s=su(r);a[s.localName]=s.no,a[s.no]=s.localName}return au(a,e,t),a}function su(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class Ze{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){const a=this.getType(),r=a.runtime.bin,s=r.makeReadOptions(n);return r.readMessage(this,s.readerFactory(t),t.byteLength,s),this}fromJson(t,n){const a=this.getType(),r=a.runtime.json,s=r.makeReadOptions(n);return r.readMessage(a,t,s,this),this}fromJsonString(t,n){let a;try{a=JSON.parse(t)}catch(r){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${r instanceof Error?r.message:String(r)}`)}return this.fromJson(a,n)}toBinary(t){const n=this.getType(),a=n.runtime.bin,r=a.makeWriteOptions(t),s=r.writerFactory();return a.writeMessage(this,s,r),s.finish()}toJson(t){const n=this.getType(),a=n.runtime.json,r=a.makeWriteOptions(t);return a.writeMessage(this,r)}toJsonString(t){var n;const a=this.toJson(t);return JSON.stringify(a,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function og(e,t,n,a){var r;const s=(r=a==null?void 0:a.localName)!==null&&r!==void 0?r:t.substring(t.lastIndexOf(".")+1),i={[s]:function(o){e.util.initFields(this),e.util.initPartial(o,this)}}[s];return Object.setPrototypeOf(i.prototype,new Ze),Object.assign(i,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(o,d){return new i().fromBinary(o,d)},fromJson(o,d){return new i().fromJson(o,d)},fromJsonString(o,d){return new i().fromJsonString(o,d)},equals(o,d){return e.util.equals(i,o,d)}}),i}function lg(e,t,n,a){return{syntax:e,json:t,bin:n,util:a,makeMessageType(r,s,i){return og(this,r,s,i)},makeEnum:ig,makeEnumType:ru,getEnumType:sg}}var D;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(D||(D={}));function ug(){let e=0,t=0;for(let a=0;a<28;a+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<a,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let a=3;a<=31;a+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<a,!(r&128))return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function ha(e,t,n){for(let s=0;s<28;s=s+7){const i=e>>>s,o=!(!(i>>>7)&&t==0),d=(o?i|128:i)&255;if(n.push(d),!o)return}const a=e>>>28&15|(t&7)<<4,r=!!(t>>3);if(n.push((r?a|128:a)&255),!!r){for(let s=3;s<31;s=s+7){const i=t>>>s,o=!!(i>>>7),d=(o?i|128:i)&255;if(n.push(d),!o)return}n.push(t>>>31&1)}}const Sn=4294967296;function Ii(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let a=0,r=0;function s(i,o){const d=Number(e.slice(i,o));r*=n,a=a*n+d,a>=Sn&&(r=r+(a/Sn|0),a=a%Sn)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?ou(a,r):Pr(a,r)}function cg(e,t){let n=Pr(e,t);const a=n.hi&2147483648;a&&(n=ou(n.lo,n.hi));const r=iu(n.lo,n.hi);return a?"-"+r:r}function iu(e,t){if({lo:e,hi:t}=dg(e,t),t<=2097151)return String(Sn*t+e);const n=e&16777215,a=(e>>>24|t<<8)&16777215,r=t>>16&65535;let s=n+a*6777216+r*6710656,i=a+r*8147497,o=r*2;const d=1e7;return s>=d&&(i+=Math.floor(s/d),s%=d),i>=d&&(o+=Math.floor(i/d),i%=d),o.toString()+Si(i)+Si(s)}function dg(e,t){return{lo:e>>>0,hi:t>>>0}}function Pr(e,t){return{lo:e|0,hi:t|0}}function ou(e,t){return t=~t,e?e=~e+1:t+=1,Pr(e,t)}const Si=e=>{const t=String(e);return"0000000".slice(t.length)+t};function bi(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function mg(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var Q={},lu={},Zn={};Zn.byteLength=yg;Zn.toByteArray=Tg;Zn.fromByteArray=Ng;var qe=[],je=[],fg=typeof Uint8Array<"u"?Uint8Array:Array,ka="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var bt=0,pg=ka.length;bt<pg;++bt)qe[bt]=ka[bt],je[ka.charCodeAt(bt)]=bt;je["-".charCodeAt(0)]=62;je["_".charCodeAt(0)]=63;function uu(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var a=n===t?0:4-n%4;return[n,a]}function yg(e){var t=uu(e),n=t[0],a=t[1];return(n+a)*3/4-a}function gg(e,t,n){return(t+n)*3/4-n}function Tg(e){var t,n=uu(e),a=n[0],r=n[1],s=new fg(gg(e,a,r)),i=0,o=r>0?a-4:a,d;for(d=0;d<o;d+=4)t=je[e.charCodeAt(d)]<<18|je[e.charCodeAt(d+1)]<<12|je[e.charCodeAt(d+2)]<<6|je[e.charCodeAt(d+3)],s[i++]=t>>16&255,s[i++]=t>>8&255,s[i++]=t&255;return r===2&&(t=je[e.charCodeAt(d)]<<2|je[e.charCodeAt(d+1)]>>4,s[i++]=t&255),r===1&&(t=je[e.charCodeAt(d)]<<10|je[e.charCodeAt(d+1)]<<4|je[e.charCodeAt(d+2)]>>2,s[i++]=t>>8&255,s[i++]=t&255),s}function hg(e){return qe[e>>18&63]+qe[e>>12&63]+qe[e>>6&63]+qe[e&63]}function kg(e,t,n){for(var a,r=[],s=t;s<n;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),r.push(hg(a));return r.join("")}function Ng(e){for(var t,n=e.length,a=n%3,r=[],s=16383,i=0,o=n-a;i<o;i+=s)r.push(kg(e,i,i+s>o?o:i+s));return a===1?(t=e[n-1],r.push(qe[t>>2]+qe[t<<4&63]+"==")):a===2&&(t=(e[n-2]<<8)+e[n-1],r.push(qe[t>>10]+qe[t>>4&63]+qe[t<<2&63]+"=")),r.join("")}var Ur={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ur.read=function(e,t,n,a,r){var s,i,o=r*8-a-1,d=(1<<o)-1,m=d>>1,p=-7,T=n?r-1:0,y=n?-1:1,k=e[t+T];for(T+=y,s=k&(1<<-p)-1,k>>=-p,p+=o;p>0;s=s*256+e[t+T],T+=y,p-=8);for(i=s&(1<<-p)-1,s>>=-p,p+=a;p>0;i=i*256+e[t+T],T+=y,p-=8);if(s===0)s=1-m;else{if(s===d)return i?NaN:(k?-1:1)*(1/0);i=i+Math.pow(2,a),s=s-m}return(k?-1:1)*i*Math.pow(2,s-a)};Ur.write=function(e,t,n,a,r,s){var i,o,d,m=s*8-r-1,p=(1<<m)-1,T=p>>1,y=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=a?0:s-1,S=a?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=p):(i=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-i))<1&&(i--,d*=2),i+T>=1?t+=y/d:t+=y*Math.pow(2,1-T),t*d>=2&&(i++,d/=2),i+T>=p?(o=0,i=p):i+T>=1?(o=(t*d-1)*Math.pow(2,r),i=i+T):(o=t*Math.pow(2,T-1)*Math.pow(2,r),i=0));r>=8;e[n+k]=o&255,k+=S,o/=256,r-=8);for(i=i<<r|o,m+=r;m>0;e[n+k]=i&255,k+=S,i/=256,m-=8);e[n+k-S]|=b*128};/*!
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ty(e,t){if(e){if(typeof e=="string")return mi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mi(e,t)}}function mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ny(e,t){if(!t)return e;for(var n=[],a=[],r=n,s=ey(t),i;!(i=s()).done;){var o=i.value;o==="|"?r.push({divider:!0}):o==="..."||o==="…"?r=a:function(){var d=void 0;o==="🌐"?d=void 0:d=o;var m=e.indexOf(e.filter(function(T){return T.value===d})[0]),p=e[m];e.splice(m,1),r.push(p)}()}return n.concat(e).concat(a)}function ay(e,t){if(e&&(e=e.filter(function(n){switch(n){case"🌐":case"|":case"...":case"…":return!0;default:return Hn(n,t)}}),e.length>0))return e}function Hn(e,t){return dl(e,t)?!0:(console.error("Country not found: ".concat(e)),!1)}function Ul(e,t){return e&&(e=e.filter(function(n){return Hn(n,t)}),e.length===0&&(e=void 0)),e}var ry=["country","label","aspectRatio"];function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ur.apply(this,arguments)}function sy(e,t){if(e==null)return{};var n=iy(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function iy(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Fl(e){var t=e.flags,n=e.flagUrl,a=e.flagComponent,r=e.internationalIcon;function s(i){var o=i.country,d=i.label,m=i.aspectRatio,p=sy(i,ry),T=r===qn?m:void 0;return C.createElement("div",ur({},p,{className:_n("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":T===1,"PhoneInputCountryIcon--border":o})}),o?C.createElement(a,{country:o,countryName:d,flags:t,flagUrl:n,className:"PhoneInputCountryIconImg"}):C.createElement(r,{title:d,aspectRatio:T,className:"PhoneInputCountryIconImg"}))}return s.propTypes={country:x.string,label:x.string.isRequired,aspectRatio:x.number},s}Fl({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:xr,internationalIcon:qn});var zl=x.shape({country_calling_codes:x.object.isRequired,countries:x.object.isRequired}),Bl=x.objectOf(x.string);function tt(e,t){var n="+"+dt(e,t);return n}function oy(e){var t=e.value,n=e.phoneNumber,a=e.defaultCountry,r=e.getAnyCountry,s=e.countries,i=e.required,o=e.metadata,d;return n&&n.country?d=n.country:a&&(!t||Vl(t,a,o))&&(d=a),s&&s.indexOf(d)<0&&(d=void 0),!d&&i&&s&&s.length>0&&(d=r()),d}function ly(e){var t=e.countries,n=e.countryNames,a=e.addInternationalOption,r=e.compareStringsLocales,s=e.compareStrings;s||(s=yy);var i=t.map(function(o){return{value:o,label:n[o]||o}});return i.sort(function(o,d){return s(o.label,d.label,r)}),a&&i.unshift({label:n.ZZ}),i}function Gl(e,t){return Dl(e||"",t)}function uy(e){return e.formatNational().replace(/\D/g,"")}function cy(e,t){var n=t.prevCountry,a=t.newCountry,r=t.metadata,s=t.useNationalFormat;if(n===a)return e;if(!e)return s?"":a?tt(a,r):"";if(a){if(e[0]==="+"){if(s)return e.indexOf("+"+dt(a,r))===0?gy(e,a,r):"";if(n){var i=tt(a,r);return e.indexOf(i)===0?e:i}else{var o=tt(a,r);return e.indexOf(o)===0?e:o}}}else if(e[0]!=="+")return wt(e,n,r)||"";return e}function wt(e,t,n){if(e){if(e[0]==="+"){if(e==="+")return;var a=new zt(t,n);return a.input(e),a.getNumberValue()}if(t){var r=Yl(e,t,n);return"+".concat(dt(t,n)).concat(r||"")}}}function dy(e,t,n){var a=Yl(e,t,n);if(a){var r=a.length-my(t,n);if(r>0)return e.slice(0,e.length-r)}return e}function my(e,t){return t=new ge(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}function Ql(e,t){var n=t.country,a=t.countries,r=t.required,s=t.metadata;if(e==="+")return n;var i=py(e,s);return i&&(!a||a.indexOf(i)>=0)?i:n&&!r&&!Vl(e,n,s)?void 0:n}function fy(e,t){var n=t.prevPhoneDigits,a=t.country,r=t.defaultCountry,s=t.countryRequired,i=t.getAnyCountry,o=t.countries,d=t.international,m=t.limitMaxLength,p=t.countryCallingCodeEditable,T=t.metadata;if(d&&p===!1&&a){var y=tt(a,T);if(e.indexOf(y)!==0){var k,S=e&&e[0]!=="+";return S?(e=y+e,k=wt(e,a,T)):e=y,{phoneDigits:e,value:k,country:a}}}d===!1&&a&&e&&e[0]==="+"&&(e=fi(e,a,T)),e&&a&&m&&(e=dy(e,a,T)),e&&e[0]!=="+"&&(!a||d)&&(e="+"+e),!e&&n&&n[0]==="+"&&(d?a=void 0:a=r),e==="+"&&n&&n[0]==="+"&&n.length>1&&(a=void 0);var b;return e&&(e[0]==="+"&&(e==="+"||a&&tt(a,T).indexOf(e)===0)?b=void 0:b=wt(e,a,T)),b&&(a=Ql(b,{country:a,countries:o,metadata:T}),d===!1&&a&&e&&e[0]==="+"&&(e=fi(e,a,T),b=wt(e,a,T))),!a&&s&&(a=r||i()),{phoneDigits:e,country:a,value:b}}function fi(e,t,n){if(e.indexOf(tt(t,n))===0){var a=new zt(t,n);a.input(e);var r=a.getNumber();return r?r.formatNational().replace(/\D/g,""):""}else return e.replace(/\D/g,"")}function py(e,t){var n=new zt(null,t);return n.input(e),n.getCountry()}function yy(e,t,n){return String.prototype.localeCompare?e.localeCompare(t,n):e<t?-1:e>t?1:0}function gy(e,t,n){if(t){var a="+"+dt(t,n);if(e.length<a.length){if(a.indexOf(e)===0)return""}else if(e.indexOf(a)===0)return e.slice(a.length)}for(var r=0,s=Object.keys(n.country_calling_codes);r<s.length;r++){var i=s[r];if(e.indexOf(i)===1)return e.slice(1+i.length)}return""}function Yl(e,t,n){var a=new zt(t,n);a.input(e);var r=a.getNumber();return r&&r.nationalNumber}function Vl(e,t,n){for(var a=tt(t,n),r=0;r<e.length&&r<a.length;){if(e[r]!==a[r])return!1;r++}return!0}function Wl(e){var t=e.value,n=e.phoneNumber,a=e.defaultCountry,r=e.international,s=e.useNationalFormat,i=e.metadata;return(r===!1||s)&&n&&n.country?uy(n):!t&&r&&a?tt(a,i):t}function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pi(Object(n),!0).forEach(function(a){Ty(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hy(e,t,n){var a=e.metadata,r=e.countries,s=e.defaultCountry,i=e.value,o=e.reset,d=e.international,m=e.displayInitialValueAsLocalNumber,p=e.initialValueFormat,T=t.defaultCountry,y=t.value,k=t.reset;n.country;var S=n.value,b=n.hasUserSelectedACountry,R=function(q){return Wl(yn(yn({},q),{},{international:d,useNationalFormat:m||p==="national",metadata:a}))};if(o!==k)return{phoneDigits:R({value:void 0,defaultCountry:s}),value:void 0,country:s,hasUserSelectedACountry:void 0};if(s!==T){var $=!s||Hn(s,a),_=!S||d&&S===R({value:void 0,defaultCountry:T}),L=!i&&_;if(!b&&$&&L)return{country:s,phoneDigits:R({value:void 0,defaultCountry:s}),value:void 0}}if(!yi(i,y)&&!yi(i,S)){var P,F;if(i){P=Gl(i,a);var B=Ul(r,a);P&&P.country?(!B||B.indexOf(P.country)>=0)&&(F=P.country):(F=Ql(i,{country:void 0,countries:B,metadata:a}),F||s&&i.indexOf(tt(s,a))===0&&(F=s))}var U;return i||(U={hasUserSelectedACountry:void 0}),yn(yn({},U),{},{phoneDigits:R({phoneNumber:P,value:i,defaultCountry:s}),value:i,country:i?F:s})}}function yi(e,t){return e===null&&(e=void 0),t===null&&(t=void 0),e===t}function cr(e){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(e)}var ky=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function ql(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gi(Object(n),!0).forEach(function(a){Ue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ln.apply(this,arguments)}function Ny(e,t){if(e==null)return{};var n=My(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function My(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Iy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Sy(e,t,n){return t&&Ti(e.prototype,t),n&&Ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function by(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dr(e,t)}function dr(e,t){return dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,r){return a.__proto__=r,a},dr(e,t)}function $y(e){var t=Ay();return function(){var a=xn(e),r;if(t){var s=xn(this).constructor;r=Reflect.construct(a,arguments,s)}else r=a.apply(this,arguments);return vy(this,r)}}function vy(e,t){if(t&&(cr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pe(e)}function Pe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ay(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xn(e){return xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xn(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ey=function(e){by(n,e);var t=$y(n);function n(a){var r;Iy(this,n),r=t.call(this,a),Ue(Pe(r),"setInputRef",function($){r.inputRef.current=$;var _=r.props.inputRef;_&&(typeof _=="function"?_($):_.current=$)}),Ue(Pe(r),"isCountrySupportedWithError",function($){var _=r.props.metadata;return Hn($,_)}),Ue(Pe(r),"onCountryChange",function($){var _=r.props,L=_.international,P=_.metadata,F=_.onChange,B=_.focusInputOnCountrySelection,U=r.state,V=U.phoneDigits,q=U.country,J=cy(V,{prevCountry:q,newCountry:$,metadata:P,useNationalFormat:!L}),re=wt(J,$,P);B&&r.inputRef.current.focus(),r.setState({country:$,hasUserSelectedACountry:!0,phoneDigits:J,value:re},function(){F(re)})}),Ue(Pe(r),"onChange",function($){var _=r.props,L=_.defaultCountry,P=_.onChange,F=_.addInternationalOption,B=_.international,U=_.limitMaxLength,V=_.countryCallingCodeEditable,q=_.metadata,J=r.state,re=J.countries,ce=J.phoneDigits,oe=J.country,H=fy($,{prevPhoneDigits:ce,country:oe,countryRequired:!F,defaultCountry:L,getAnyCountry:function(){return r.getFirstSupportedCountry({countries:re})},countries:re,international:B,limitMaxLength:U,countryCallingCodeEditable:V,metadata:q}),le=H.phoneDigits,Me=H.country,Ee=H.value,Oe={phoneDigits:le,value:Ee,country:Me};V===!1&&!Ee&&le===r.state.phoneDigits&&(Oe.forceRerender={}),r.setState(Oe,function(){return P(Ee)})}),Ue(Pe(r),"_onFocus",function(){return r.setState({isFocused:!0})}),Ue(Pe(r),"_onBlur",function(){return r.setState({isFocused:!1})}),Ue(Pe(r),"onFocus",function($){r._onFocus();var _=r.props.onFocus;_&&_($)}),Ue(Pe(r),"onBlur",function($){var _=r.props.onBlur;r._onBlur(),_&&_($)}),Ue(Pe(r),"onCountryFocus",function($){r._onFocus();var _=r.props.countrySelectProps;if(_){var L=_.onFocus;L&&L($)}}),Ue(Pe(r),"onCountryBlur",function($){r._onBlur();var _=r.props.countrySelectProps;if(_){var L=_.onBlur;L&&L($)}}),r.inputRef=C.createRef();var s=r.props,i=s.value;s.labels;var o=s.international,d=s.addInternationalOption,m=s.displayInitialValueAsLocalNumber,p=s.initialValueFormat,T=s.metadata,y=r.props,k=y.defaultCountry,S=y.countries;k&&(r.isCountrySupportedWithError(k)||(k=void 0)),S=Ul(S,T);var b=Gl(i,T);r.CountryIcon=Fl(r.props);var R=oy({value:i,phoneNumber:b,defaultCountry:k,required:!d,countries:S||li(T),getAnyCountry:function(){return r.getFirstSupportedCountry({countries:S})},metadata:T});return r.state={props:r.props,country:R,countries:S,phoneDigits:Wl({value:i,phoneNumber:b,defaultCountry:k,international:o,useNationalFormat:m||p==="national",metadata:T}),value:i},r}return Sy(n,[{key:"componentDidMount",value:function(){var r=this.props.onCountryChange,s=this.props.defaultCountry,i=this.state.country;r&&(s&&(this.isCountrySupportedWithError(s)||(s=void 0)),i!==s&&r(i))}},{key:"componentDidUpdate",value:function(r,s){var i=this.props.onCountryChange,o=this.state.country;i&&o!==s.country&&i(o)}},{key:"getCountrySelectOptions",value:function(r){var s=r.countries,i=this.props,o=i.international,d=i.countryCallingCodeEditable,m=i.countryOptionsOrder,p=i.addInternationalOption,T=i.labels,y=i.locales,k=i.metadata;return this.useMemoCountrySelectOptions(function(){return ny(ly({countries:s||li(k),countryNames:T,addInternationalOption:o&&d===!1?!1:p,compareStringsLocales:y}),ay(m,k))},[s,m,p,T,k])}},{key:"useMemoCountrySelectOptions",value:function(r,s){return(!this.countrySelectOptionsMemoDependencies||!_y(s,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=r(),this.countrySelectOptionsMemoDependencies=s),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(r){var s=r.countries,i=this.getCountrySelectOptions({countries:s});return i[0].value}},{key:"render",value:function(){var r=this.props,s=r.name,i=r.disabled,o=r.readOnly,d=r.autoComplete,m=r.style,p=r.className;r.inputRef;var T=r.inputComponent,y=r.numberInputProps,k=r.smartCaret,S=r.countrySelectComponent,b=r.countrySelectProps,R=r.containerComponent;r.defaultCountry,r.countries,r.countryOptionsOrder;var $=r.labels;r.flags,r.flagComponent,r.flagUrl,r.addInternationalOption,r.internationalIcon,r.displayInitialValueAsLocalNumber,r.initialValueFormat,r.onCountryChange,r.limitMaxLength,r.countryCallingCodeEditable,r.focusInputOnCountrySelection,r.reset;var _=r.metadata;r.international,r.locales;var L=Ny(r,ky),P=this.state,F=P.country,B=P.countries,U=P.phoneDigits,V=P.isFocused,q=k?Cp:Pp,J=this.getCountrySelectOptions({countries:B});return C.createElement(R,{style:m,className:_n(p,"PhoneInput",{"PhoneInput--focus":V,"PhoneInput--disabled":i,"PhoneInput--readOnly":o})},C.createElement(S,ln({name:s?"".concat(s,"Country"):void 0,"aria-label":$.country},b,{value:F,options:J,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:i||b&&b.disabled,readOnly:o||b&&b.readOnly,iconComponent:this.CountryIcon})),C.createElement(q,ln({ref:this.setInputRef,type:"tel",autoComplete:d},y,L,{name:s,metadata:_,country:F,value:U||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:i,readOnly:o,inputComponent:T,className:_n("PhoneInputInput",y&&y.className,L.className)})))}}],[{key:"getDerivedStateFromProps",value:function(r,s){return ql({props:r},hy(r,s.props,s))}}]),n}(C.PureComponent),Hl=C.forwardRef(function(e,t){return C.createElement(Ey,ln({},Oy(e),{inputRef:t}))});Hl.propTypes={value:x.string,onChange:x.func.isRequired,onFocus:x.func,onBlur:x.func,disabled:x.bool,readOnly:x.bool,autoComplete:x.string,initialValueFormat:x.oneOf(["national"]),displayInitialValueAsLocalNumber:x.bool,defaultCountry:x.string,countries:x.arrayOf(x.string),labels:Bl,locales:x.oneOfType([x.string,x.arrayOf(x.string)]),flagUrl:x.string,flags:x.objectOf(x.elementType),flagComponent:x.elementType,addInternationalOption:x.bool,internationalIcon:x.elementType,countryOptionsOrder:x.arrayOf(x.string),style:x.object,className:x.string,countrySelectComponent:x.elementType,countrySelectProps:x.object,inputComponent:x.elementType,containerComponent:x.elementType,numberInputProps:x.object,smartCaret:x.bool,international:x.bool,limitMaxLength:x.bool,countryCallingCodeEditable:x.bool,metadata:zl,onCountryChange:x.func,focusInputOnCountrySelection:x.bool};var hi={autoComplete:"tel",countrySelectComponent:jl,flagComponent:xr,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:qn,inputComponent:"input",containerComponent:"div",reset:x.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function Oy(e){e=ql({},e);for(var t in hi)e[t]===void 0&&(e[t]=hi[t]);return e}const Dy=Hl;function _y(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;){if(e[n]!==t[n])return!1;n++}return!0}function mr(e){"@babel/helpers - typeof";return mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(e)}function wy(e,t,n){if(n||mr(t)==="object"&&(n=t,t="NATIONAL"),!e)return"";var a=Dl(e,n);if(!a)return"";switch(t){case"National":t="NATIONAL";break;case"International":t="INTERNATIONAL";break}return a.format(t)}function Cy(e,t){return wy(e,"INTERNATIONAL",t)}const Ry={ext:"ext.",country:"Phone number country",phone:"Phone",AB:"Abkhazia",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",OS:"South Ossetia",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"};var jy=["metadata","labels"];function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fr.apply(this,arguments)}function xy(e,t){if(e==null)return{};var n=Ly(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function Ly(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Zl(e){var t=C.forwardRef(function(n,a){var r=n.metadata,s=r===void 0?e:r,i=n.labels,o=i===void 0?Ry:i,d=xy(n,jy);return C.createElement(Dy,fr({},d,{ref:a,metadata:s,labels:o}))});return t.propTypes={metadata:zl,labels:Bl},t}Zl();function Kl(e,t){var n=Array.prototype.slice.call(t);return n.push(al),e.apply(this,n)}const Py=Zl(al);function Uy(){return Kl(Cy,arguments)}function Fy(){return Kl(Ef,arguments)}var ki=typeof window>"u"?C.useEffect:C.useLayoutEffect,zy=({isPlaying:e,duration:t,startAt:n=0,updateInterval:a=0,onComplete:r,onUpdate:s})=>{let[i,o]=C.useState(n),d=C.useRef(0),m=C.useRef(n),p=C.useRef(n*-1e3),T=C.useRef(null),y=C.useRef(null),k=C.useRef(null),S=$=>{let _=$/1e3;if(y.current===null){y.current=_,T.current=requestAnimationFrame(S);return}let L=_-y.current,P=d.current+L;y.current=_,d.current=P;let F=m.current+(a===0?P:(P/a|0)*a),B=m.current+P,U=typeof t=="number"&&B>=t;o(U?t:F),U||(T.current=requestAnimationFrame(S))},b=()=>{T.current&&cancelAnimationFrame(T.current),k.current&&clearTimeout(k.current),y.current=null},R=C.useCallback($=>{b(),d.current=0;let _=typeof $=="number"?$:n;m.current=_,o(_),e&&(T.current=requestAnimationFrame(S))},[e,n]);return ki(()=>{if(s==null||s(i),t&&i>=t){p.current+=t*1e3;let{shouldRepeat:$=!1,delay:_=0,newStartAt:L}=(r==null?void 0:r(p.current/1e3))||{};$&&(k.current=setTimeout(()=>R(L),_*1e3))}},[i,t]),ki(()=>(e&&(T.current=requestAnimationFrame(S)),b),[e,t,a]),{elapsedTime:i,reset:R}},By=(e,t,n)=>{let a=e/2,r=t/2,s=a-r,i=2*s,o=n==="clockwise"?"1,0":"0,1",d=2*Math.PI*s;return{path:`m ${a},${r} a ${s},${s} 0 ${o} 0,${i} a ${s},${s} 0 ${o} 0,-${i}`,pathLength:d}},Ni=(e,t)=>e===0||e===t?0:typeof t=="number"?e-t:0,Gy=e=>({position:"relative",width:e,height:e}),Qy={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},Jl=(e,t,n,a,r)=>{if(a===0)return t;let s=(r?a-e:e)/a;return t+n*s},Mi=e=>{var t,n;return(n=(t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(a,r,s,i)=>`#${r}${r}${s}${s}${i}${i}`).substring(1).match(/.{2}/g))==null?void 0:t.map(a=>parseInt(a,16)))!=null?n:[]},Yy=(e,t)=>{var n;let{colors:a,colorsTime:r,isSmoothColorTransition:s=!0}=e;if(typeof a=="string")return a;let i=(n=r==null?void 0:r.findIndex((y,k)=>y>=t&&t>=r[k+1]))!=null?n:-1;if(!r||i===-1)return a[0];if(!s)return a[i];let o=r[i]-t,d=r[i]-r[i+1],m=Mi(a[i]),p=Mi(a[i+1]),T=!!e.isGrowing;return`rgb(${m.map((y,k)=>Jl(o,y,p[k]-y,d,T)|0).join(",")})`},Vy=e=>{let{duration:t,initialRemainingTime:n,updateInterval:a,size:r=180,strokeWidth:s=12,trailStrokeWidth:i,isPlaying:o=!1,isGrowing:d=!1,rotation:m="clockwise",onComplete:p,onUpdate:T}=e,y=C.useRef(),k=Math.max(s,i??0),{path:S,pathLength:b}=By(r,k,m),{elapsedTime:R}=zy({isPlaying:o,duration:t,startAt:Ni(t,n),updateInterval:a,onUpdate:typeof T=="function"?_=>{let L=Math.ceil(t-_);L!==y.current&&(y.current=L,T(L))}:void 0,onComplete:typeof p=="function"?_=>{var L;let{shouldRepeat:P,delay:F,newInitialRemainingTime:B}=(L=p(_))!=null?L:{};if(P)return{shouldRepeat:P,delay:F,newStartAt:Ni(t,B)}}:void 0}),$=t-R;return{elapsedTime:R,path:S,pathLength:b,remainingTime:Math.ceil($),rotation:m,size:r,stroke:Yy(e,$),strokeDashoffset:Jl(R,0,b,t,d),strokeWidth:s}},Xl=e=>{let{children:t,strokeLinecap:n,trailColor:a,trailStrokeWidth:r}=e,{path:s,pathLength:i,stroke:o,strokeDashoffset:d,remainingTime:m,elapsedTime:p,size:T,strokeWidth:y}=Vy(e);return C.createElement("div",{style:Gy(T)},C.createElement("svg",{viewBox:`0 0 ${T} ${T}`,width:T,height:T,xmlns:"http://www.w3.org/2000/svg"},C.createElement("path",{d:s,fill:"none",stroke:a??"#d9d9d9",strokeWidth:r??y}),C.createElement("path",{d:s,fill:"none",stroke:o,strokeLinecap:n??"round",strokeWidth:y,strokeDasharray:i,strokeDashoffset:d})),typeof t=="function"&&C.createElement("div",{style:Qy},t({remainingTime:m,elapsedTime:p,color:o})))};Xl.displayName="CountdownCircleTimer";const Ta={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const Wy=v("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),qy=[Ta.BLUE_PRIMARY,Ta.GREEN_1,Ta.RED_1],Hy=[10,6,0],Zy=30,Ky=32,Jy=4,Xy=0,eu=({isPlaying:e=!0,duration:t=Zy,setTimeToExpire:n})=>{const a=({remainingTime:r})=>h.jsx(Wy,{style:{color:r?"inherit":void 0},children:r});return C.useEffect(()=>{n(!1)},[n]),h.jsx(Xl,{isPlaying:e,duration:t,colors:qy,colorsTime:Hy,size:Ky,strokeWidth:Jy,trailStrokeWidth:Xy,onComplete:()=>n(!0),children:a})};function Ae(e,t){if(!e)throw new Error(t)}const eg=34028234663852886e22,tg=-34028234663852886e22,ng=4294967295,ag=2147483647,rg=-2147483648;function In(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>ag||e<rg)throw new Error("invalid int 32: "+e)}function pr(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>ng||e<0)throw new Error("invalid uint 32: "+e)}function tu(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>eg||e<tg))throw new Error("invalid float 32: "+e)}const nu=Symbol("@bufbuild/protobuf/enum-type");function sg(e){const t=e[nu];return Ae(t,"missing enum type on enum object"),t}function au(e,t,n,a){e[nu]=ru(t,n.map(r=>({no:r.no,name:r.name,localName:e[r.no]})))}function ru(e,t,n){const a=Object.create(null),r=Object.create(null),s=[];for(const i of t){const o=su(i);s.push(o),a[i.name]=o,r[i.no]=o}return{typeName:e,values:s,findName(i){return a[i]},findNumber(i){return r[i]}}}function ig(e,t,n){const a={};for(const r of t){const s=su(r);a[s.localName]=s.no,a[s.no]=s.localName}return au(a,e,t),a}function su(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class Ze{equals(t){return this.getType().runtime.util.equals(this.getType(),this,t)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(t,n){const a=this.getType(),r=a.runtime.bin,s=r.makeReadOptions(n);return r.readMessage(this,s.readerFactory(t),t.byteLength,s),this}fromJson(t,n){const a=this.getType(),r=a.runtime.json,s=r.makeReadOptions(n);return r.readMessage(a,t,s,this),this}fromJsonString(t,n){let a;try{a=JSON.parse(t)}catch(r){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${r instanceof Error?r.message:String(r)}`)}return this.fromJson(a,n)}toBinary(t){const n=this.getType(),a=n.runtime.bin,r=a.makeWriteOptions(t),s=r.writerFactory();return a.writeMessage(this,s,r),s.finish()}toJson(t){const n=this.getType(),a=n.runtime.json,r=a.makeWriteOptions(t);return a.writeMessage(this,r)}toJsonString(t){var n;const a=this.toJson(t);return JSON.stringify(a,null,(n=t==null?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function og(e,t,n,a){var r;const s=(r=a==null?void 0:a.localName)!==null&&r!==void 0?r:t.substring(t.lastIndexOf(".")+1),i={[s]:function(o){e.util.initFields(this),e.util.initPartial(o,this)}}[s];return Object.setPrototypeOf(i.prototype,new Ze),Object.assign(i,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(o,d){return new i().fromBinary(o,d)},fromJson(o,d){return new i().fromJson(o,d)},fromJsonString(o,d){return new i().fromJsonString(o,d)},equals(o,d){return e.util.equals(i,o,d)}}),i}function lg(e,t,n,a){return{syntax:e,json:t,bin:n,util:a,makeMessageType(r,s,i){return og(this,r,s,i)},makeEnum:ig,makeEnumType:ru,getEnumType:sg}}var D;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(D||(D={}));function ug(){let e=0,t=0;for(let a=0;a<28;a+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<a,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let a=3;a<=31;a+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<a,!(r&128))return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function ha(e,t,n){for(let s=0;s<28;s=s+7){const i=e>>>s,o=!(!(i>>>7)&&t==0),d=(o?i|128:i)&255;if(n.push(d),!o)return}const a=e>>>28&15|(t&7)<<4,r=!!(t>>3);if(n.push((r?a|128:a)&255),!!r){for(let s=3;s<31;s=s+7){const i=t>>>s,o=!!(i>>>7),d=(o?i|128:i)&255;if(n.push(d),!o)return}n.push(t>>>31&1)}}const Sn=4294967296;function Ii(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let a=0,r=0;function s(i,o){const d=Number(e.slice(i,o));r*=n,a=a*n+d,a>=Sn&&(r=r+(a/Sn|0),a=a%Sn)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?ou(a,r):Pr(a,r)}function cg(e,t){let n=Pr(e,t);const a=n.hi&2147483648;a&&(n=ou(n.lo,n.hi));const r=iu(n.lo,n.hi);return a?"-"+r:r}function iu(e,t){if({lo:e,hi:t}=dg(e,t),t<=2097151)return String(Sn*t+e);const n=e&16777215,a=(e>>>24|t<<8)&16777215,r=t>>16&65535;let s=n+a*6777216+r*6710656,i=a+r*8147497,o=r*2;const d=1e7;return s>=d&&(i+=Math.floor(s/d),s%=d),i>=d&&(o+=Math.floor(i/d),i%=d),o.toString()+Si(i)+Si(s)}function dg(e,t){return{lo:e>>>0,hi:t>>>0}}function Pr(e,t){return{lo:e|0,hi:t|0}}function ou(e,t){return t=~t,e?e=~e+1:t+=1,Pr(e,t)}const Si=e=>{const t=String(e);return"0000000".slice(t.length)+t};function bi(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function mg(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var Q={},lu={},Zn={};Zn.byteLength=yg;Zn.toByteArray=Tg;Zn.fromByteArray=Ng;var qe=[],je=[],fg=typeof Uint8Array<"u"?Uint8Array:Array,ka="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var bt=0,pg=ka.length;bt<pg;++bt)qe[bt]=ka[bt],je[ka.charCodeAt(bt)]=bt;je["-".charCodeAt(0)]=62;je["_".charCodeAt(0)]=63;function uu(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var a=n===t?0:4-n%4;return[n,a]}function yg(e){var t=uu(e),n=t[0],a=t[1];return(n+a)*3/4-a}function gg(e,t,n){return(t+n)*3/4-n}function Tg(e){var t,n=uu(e),a=n[0],r=n[1],s=new fg(gg(e,a,r)),i=0,o=r>0?a-4:a,d;for(d=0;d<o;d+=4)t=je[e.charCodeAt(d)]<<18|je[e.charCodeAt(d+1)]<<12|je[e.charCodeAt(d+2)]<<6|je[e.charCodeAt(d+3)],s[i++]=t>>16&255,s[i++]=t>>8&255,s[i++]=t&255;return r===2&&(t=je[e.charCodeAt(d)]<<2|je[e.charCodeAt(d+1)]>>4,s[i++]=t&255),r===1&&(t=je[e.charCodeAt(d)]<<10|je[e.charCodeAt(d+1)]<<4|je[e.charCodeAt(d+2)]>>2,s[i++]=t>>8&255,s[i++]=t&255),s}function hg(e){return qe[e>>18&63]+qe[e>>12&63]+qe[e>>6&63]+qe[e&63]}function kg(e,t,n){for(var a,r=[],s=t;s<n;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),r.push(hg(a));return r.join("")}function Ng(e){for(var t,n=e.length,a=n%3,r=[],s=16383,i=0,o=n-a;i<o;i+=s)r.push(kg(e,i,i+s>o?o:i+s));return a===1?(t=e[n-1],r.push(qe[t>>2]+qe[t<<4&63]+"==")):a===2&&(t=(e[n-2]<<8)+e[n-1],r.push(qe[t>>10]+qe[t>>4&63]+qe[t<<2&63]+"=")),r.join("")}var Ur={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ur.read=function(e,t,n,a,r){var s,i,o=r*8-a-1,d=(1<<o)-1,m=d>>1,p=-7,T=n?r-1:0,y=n?-1:1,k=e[t+T];for(T+=y,s=k&(1<<-p)-1,k>>=-p,p+=o;p>0;s=s*256+e[t+T],T+=y,p-=8);for(i=s&(1<<-p)-1,s>>=-p,p+=a;p>0;i=i*256+e[t+T],T+=y,p-=8);if(s===0)s=1-m;else{if(s===d)return i?NaN:(k?-1:1)*(1/0);i=i+Math.pow(2,a),s=s-m}return(k?-1:1)*i*Math.pow(2,s-a)};Ur.write=function(e,t,n,a,r,s){var i,o,d,m=s*8-r-1,p=(1<<m)-1,T=p>>1,y=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=a?0:s-1,S=a?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=p):(i=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-i))<1&&(i--,d*=2),i+T>=1?t+=y/d:t+=y*Math.pow(2,1-T),t*d>=2&&(i++,d/=2),i+T>=p?(o=0,i=p):i+T>=1?(o=(t*d-1)*Math.pow(2,r),i=i+T):(o=t*Math.pow(2,T-1)*Math.pow(2,r),i=0));r>=8;e[n+k]=o&255,k+=S,o/=256,r-=8);for(i=i<<r|o,m+=r;m>0;e[n+k]=i&255,k+=S,i/=256,m-=8);e[n+k-S]|=b*128};/*!
32
32
  * The buffer module from node.js, for the browser.
33
33
  *
34
34
  * @author Feross Aboukhadijeh <https://feross.org>
35
35
  * @license MIT
36
- */(function(e){const t=Zn,n=Ur,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const f=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(f,u),f.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function i(f){if(f>r)throw new RangeError('The value "'+f+'" is invalid for option "size"');const u=new Uint8Array(f);return Object.setPrototypeOf(u,o.prototype),u}function o(f,u,c){if(typeof f=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(f)}return d(f,u,c)}o.poolSize=8192;function d(f,u,c){if(typeof f=="string")return y(f,u);if(ArrayBuffer.isView(f))return S(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(Ye(f,ArrayBuffer)||f&&Ye(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ye(f,SharedArrayBuffer)||f&&Ye(f.buffer,SharedArrayBuffer)))return b(f,u,c);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=f.valueOf&&f.valueOf();if(g!=null&&g!==f)return o.from(g,u,c);const N=R(f);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return o.from(f[Symbol.toPrimitive]("string"),u,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}o.from=function(f,u,c){return d(f,u,c)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function m(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function p(f,u,c){return m(f),f<=0?i(f):u!==void 0?typeof c=="string"?i(f).fill(u,c):i(f).fill(u):i(f)}o.alloc=function(f,u,c){return p(f,u,c)};function T(f){return m(f),i(f<0?0:$(f)|0)}o.allocUnsafe=function(f){return T(f)},o.allocUnsafeSlow=function(f){return T(f)};function y(f,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const c=L(f,u)|0;let g=i(c);const N=g.write(f,u);return N!==c&&(g=g.slice(0,N)),g}function k(f){const u=f.length<0?0:$(f.length)|0,c=i(u);for(let g=0;g<u;g+=1)c[g]=f[g]&255;return c}function S(f){if(Ye(f,Uint8Array)){const u=new Uint8Array(f);return b(u.buffer,u.byteOffset,u.byteLength)}return k(f)}function b(f,u,c){if(u<0||f.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<u+(c||0))throw new RangeError('"length" is outside of buffer bounds');let g;return u===void 0&&c===void 0?g=new Uint8Array(f):c===void 0?g=new Uint8Array(f,u):g=new Uint8Array(f,u,c),Object.setPrototypeOf(g,o.prototype),g}function R(f){if(o.isBuffer(f)){const u=$(f.length)|0,c=i(u);return c.length===0||f.copy(c,0,0,u),c}if(f.length!==void 0)return typeof f.length!="number"||da(f.length)?i(0):k(f);if(f.type==="Buffer"&&Array.isArray(f.data))return k(f.data)}function $(f){if(f>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return f|0}function _(f){return+f!=f&&(f=0),o.alloc(+f)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,c){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Ye(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),!o.isBuffer(u)||!o.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===c)return 0;let g=u.length,N=c.length;for(let I=0,E=Math.min(g,N);I<E;++I)if(u[I]!==c[I]){g=u[I],N=c[I];break}return g<N?-1:N<g?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,c){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);let g;if(c===void 0)for(c=0,g=0;g<u.length;++g)c+=u[g].length;const N=o.allocUnsafe(c);let I=0;for(g=0;g<u.length;++g){let E=u[g];if(Ye(E,Uint8Array))I+E.length>N.length?(o.isBuffer(E)||(E=o.from(E)),E.copy(N,I)):Uint8Array.prototype.set.call(N,E,I);else if(o.isBuffer(E))E.copy(N,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=E.length}return N};function L(f,u){if(o.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||Ye(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);const c=f.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&c===0)return 0;let N=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Yt(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return pn(f).length;default:if(N)return g?-1:Yt(f).length;u=(""+u).toLowerCase(),N=!0}}o.byteLength=L;function P(f,u,c){let g=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,u>>>=0,c<=u))return"";for(f||(f="utf8");;)switch(f){case"hex":return Ie(this,u,c);case"utf8":case"utf-8":return H(this,u,c);case"ascii":return Ee(this,u,c);case"latin1":case"binary":return Oe(this,u,c);case"base64":return oe(this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,u,c);default:if(g)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),g=!0}}o.prototype._isBuffer=!0;function F(f,u,c){const g=f[u];f[u]=f[c],f[c]=g}o.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<u;c+=2)F(this,c,c+1);return this},o.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<u;c+=4)F(this,c,c+3),F(this,c+1,c+2);return this},o.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<u;c+=8)F(this,c,c+7),F(this,c+1,c+6),F(this,c+2,c+5),F(this,c+3,c+4);return this},o.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?H(this,0,u):P.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){let u="";const c=e.INSPECT_MAX_BYTES;return u=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(u+=" ... "),"<Buffer "+u+">"},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(u,c,g,N,I){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(c===void 0&&(c=0),g===void 0&&(g=u?u.length:0),N===void 0&&(N=0),I===void 0&&(I=this.length),c<0||g>u.length||N<0||I>this.length)throw new RangeError("out of range index");if(N>=I&&c>=g)return 0;if(N>=I)return-1;if(c>=g)return 1;if(c>>>=0,g>>>=0,N>>>=0,I>>>=0,this===u)return 0;let E=I-N,W=g-c;const de=Math.min(E,W),ue=this.slice(N,I),me=u.slice(c,g);for(let ie=0;ie<de;++ie)if(ue[ie]!==me[ie]){E=ue[ie],W=me[ie];break}return E<W?-1:W<E?1:0};function B(f,u,c,g,N){if(f.length===0)return-1;if(typeof c=="string"?(g=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,da(c)&&(c=N?0:f.length-1),c<0&&(c=f.length+c),c>=f.length){if(N)return-1;c=f.length-1}else if(c<0)if(N)c=0;else return-1;if(typeof u=="string"&&(u=o.from(u,g)),o.isBuffer(u))return u.length===0?-1:U(f,u,c,g,N);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(f,u,c):Uint8Array.prototype.lastIndexOf.call(f,u,c):U(f,[u],c,g,N);throw new TypeError("val must be string, number or Buffer")}function U(f,u,c,g,N){let I=1,E=f.length,W=u.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(f.length<2||u.length<2)return-1;I=2,E/=2,W/=2,c/=2}function de(me,ie){return I===1?me[ie]:me.readUInt16BE(ie*I)}let ue;if(N){let me=-1;for(ue=c;ue<E;ue++)if(de(f,ue)===de(u,me===-1?0:ue-me)){if(me===-1&&(me=ue),ue-me+1===W)return me*I}else me!==-1&&(ue-=ue-me),me=-1}else for(c+W>E&&(c=E-W),ue=c;ue>=0;ue--){let me=!0;for(let ie=0;ie<W;ie++)if(de(f,ue+ie)!==de(u,ie)){me=!1;break}if(me)return ue}return-1}o.prototype.includes=function(u,c,g){return this.indexOf(u,c,g)!==-1},o.prototype.indexOf=function(u,c,g){return B(this,u,c,g,!0)},o.prototype.lastIndexOf=function(u,c,g){return B(this,u,c,g,!1)};function V(f,u,c,g){c=Number(c)||0;const N=f.length-c;g?(g=Number(g),g>N&&(g=N)):g=N;const I=u.length;g>I/2&&(g=I/2);let E;for(E=0;E<g;++E){const W=parseInt(u.substr(E*2,2),16);if(da(W))return E;f[c+E]=W}return E}function q(f,u,c,g){return Vt(Yt(u,f.length-c),f,c,g)}function J(f,u,c,g){return Vt(ca(u),f,c,g)}function re(f,u,c,g){return Vt(pn(u),f,c,g)}function ce(f,u,c,g){return Vt(w(u,f.length-c),f,c,g)}o.prototype.write=function(u,c,g,N){if(c===void 0)N="utf8",g=this.length,c=0;else if(g===void 0&&typeof c=="string")N=c,g=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(g)?(g=g>>>0,N===void 0&&(N="utf8")):(N=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const I=this.length-c;if((g===void 0||g>I)&&(g=I),u.length>0&&(g<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let E=!1;for(;;)switch(N){case"hex":return V(this,u,c,g);case"utf8":case"utf-8":return q(this,u,c,g);case"ascii":case"latin1":case"binary":return J(this,u,c,g);case"base64":return re(this,u,c,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,u,c,g);default:if(E)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),E=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(f,u,c){return u===0&&c===f.length?t.fromByteArray(f):t.fromByteArray(f.slice(u,c))}function H(f,u,c){c=Math.min(f.length,c);const g=[];let N=u;for(;N<c;){const I=f[N];let E=null,W=I>239?4:I>223?3:I>191?2:1;if(N+W<=c){let de,ue,me,ie;switch(W){case 1:I<128&&(E=I);break;case 2:de=f[N+1],(de&192)===128&&(ie=(I&31)<<6|de&63,ie>127&&(E=ie));break;case 3:de=f[N+1],ue=f[N+2],(de&192)===128&&(ue&192)===128&&(ie=(I&15)<<12|(de&63)<<6|ue&63,ie>2047&&(ie<55296||ie>57343)&&(E=ie));break;case 4:de=f[N+1],ue=f[N+2],me=f[N+3],(de&192)===128&&(ue&192)===128&&(me&192)===128&&(ie=(I&15)<<18|(de&63)<<12|(ue&63)<<6|me&63,ie>65535&&ie<1114112&&(E=ie))}}E===null?(E=65533,W=1):E>65535&&(E-=65536,g.push(E>>>10&1023|55296),E=56320|E&1023),g.push(E),N+=W}return Me(g)}const le=4096;function Me(f){const u=f.length;if(u<=le)return String.fromCharCode.apply(String,f);let c="",g=0;for(;g<u;)c+=String.fromCharCode.apply(String,f.slice(g,g+=le));return c}function Ee(f,u,c){let g="";c=Math.min(f.length,c);for(let N=u;N<c;++N)g+=String.fromCharCode(f[N]&127);return g}function Oe(f,u,c){let g="";c=Math.min(f.length,c);for(let N=u;N<c;++N)g+=String.fromCharCode(f[N]);return g}function Ie(f,u,c){const g=f.length;(!u||u<0)&&(u=0),(!c||c<0||c>g)&&(c=g);let N="";for(let I=u;I<c;++I)N+=Cc[f[I]];return N}function be(f,u,c){const g=f.slice(u,c);let N="";for(let I=0;I<g.length-1;I+=2)N+=String.fromCharCode(g[I]+g[I+1]*256);return N}o.prototype.slice=function(u,c){const g=this.length;u=~~u,c=c===void 0?g:~~c,u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),c<0?(c+=g,c<0&&(c=0)):c>g&&(c=g),c<u&&(c=u);const N=this.subarray(u,c);return Object.setPrototypeOf(N,o.prototype),N};function ee(f,u,c){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+u>c)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u],I=1,E=0;for(;++E<c&&(I*=256);)N+=this[u+E]*I;return N},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u+--c],I=1;for(;c>0&&(I*=256);)N+=this[u+--c]*I;return N},o.prototype.readUint8=o.prototype.readUInt8=function(u,c){return u=u>>>0,c||ee(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,c){return u=u>>>0,c||ee(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,c){return u=u>>>0,c||ee(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readBigUInt64LE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=c+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,I=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(N)+(BigInt(I)<<BigInt(32))}),o.prototype.readBigUInt64BE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=c*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],I=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(N)<<BigInt(32))+BigInt(I)}),o.prototype.readIntLE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u],I=1,E=0;for(;++E<c&&(I*=256);)N+=this[u+E]*I;return I*=128,N>=I&&(N-=Math.pow(2,8*c)),N},o.prototype.readIntBE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=c,I=1,E=this[u+--N];for(;N>0&&(I*=256);)E+=this[u+--N]*I;return I*=128,E>=I&&(E-=Math.pow(2,8*c)),E},o.prototype.readInt8=function(u,c){return u=u>>>0,c||ee(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,c){u=u>>>0,c||ee(u,2,this.length);const g=this[u]|this[u+1]<<8;return g&32768?g|4294901760:g},o.prototype.readInt16BE=function(u,c){u=u>>>0,c||ee(u,2,this.length);const g=this[u+1]|this[u]<<8;return g&32768?g|4294901760:g},o.prototype.readInt32LE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readBigInt64LE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(N)<<BigInt(32))+BigInt(c+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),o.prototype.readBigInt64BE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=(c<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(N)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g)}),o.prototype.readFloatLE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),n.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),n.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,c){return u=u>>>0,c||ee(u,8,this.length),n.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,c){return u=u>>>0,c||ee(u,8,this.length),n.read(this,u,!1,52,8)};function M(f,u,c,g,N,I){if(!o.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>N||u<I)throw new RangeError('"value" argument is out of bounds');if(c+g>f.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,c,g,N){if(u=+u,c=c>>>0,g=g>>>0,!N){const W=Math.pow(2,8*g)-1;M(this,u,c,g,W,0)}let I=1,E=0;for(this[c]=u&255;++E<g&&(I*=256);)this[c+E]=u/I&255;return c+g},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,c,g,N){if(u=+u,c=c>>>0,g=g>>>0,!N){const W=Math.pow(2,8*g)-1;M(this,u,c,g,W,0)}let I=g-1,E=1;for(this[c+I]=u&255;--I>=0&&(E*=256);)this[c+I]=u/E&255;return c+g},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,1,255,0),this[c]=u&255,c+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,65535,0),this[c]=u&255,this[c+1]=u>>>8,c+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,65535,0),this[c]=u>>>8,this[c+1]=u&255,c+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,4294967295,0),this[c+3]=u>>>24,this[c+2]=u>>>16,this[c+1]=u>>>8,this[c]=u&255,c+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,4294967295,0),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4};function O(f,u,c,g,N){Qe(u,g,N,f,c,7);let I=Number(u&BigInt(4294967295));f[c++]=I,I=I>>8,f[c++]=I,I=I>>8,f[c++]=I,I=I>>8,f[c++]=I;let E=Number(u>>BigInt(32)&BigInt(4294967295));return f[c++]=E,E=E>>8,f[c++]=E,E=E>>8,f[c++]=E,E=E>>8,f[c++]=E,c}function j(f,u,c,g,N){Qe(u,g,N,f,c,7);let I=Number(u&BigInt(4294967295));f[c+7]=I,I=I>>8,f[c+6]=I,I=I>>8,f[c+5]=I,I=I>>8,f[c+4]=I;let E=Number(u>>BigInt(32)&BigInt(4294967295));return f[c+3]=E,E=E>>8,f[c+2]=E,E=E>>8,f[c+1]=E,E=E>>8,f[c]=E,c+8}o.prototype.writeBigUInt64LE=st(function(u,c=0){return O(this,u,c,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=st(function(u,c=0){return j(this,u,c,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(u,c,g,N){if(u=+u,c=c>>>0,!N){const de=Math.pow(2,8*g-1);M(this,u,c,g,de-1,-de)}let I=0,E=1,W=0;for(this[c]=u&255;++I<g&&(E*=256);)u<0&&W===0&&this[c+I-1]!==0&&(W=1),this[c+I]=(u/E>>0)-W&255;return c+g},o.prototype.writeIntBE=function(u,c,g,N){if(u=+u,c=c>>>0,!N){const de=Math.pow(2,8*g-1);M(this,u,c,g,de-1,-de)}let I=g-1,E=1,W=0;for(this[c+I]=u&255;--I>=0&&(E*=256);)u<0&&W===0&&this[c+I+1]!==0&&(W=1),this[c+I]=(u/E>>0)-W&255;return c+g},o.prototype.writeInt8=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,1,127,-128),u<0&&(u=255+u+1),this[c]=u&255,c+1},o.prototype.writeInt16LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,32767,-32768),this[c]=u&255,this[c+1]=u>>>8,c+2},o.prototype.writeInt16BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,32767,-32768),this[c]=u>>>8,this[c+1]=u&255,c+2},o.prototype.writeInt32LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,2147483647,-2147483648),this[c]=u&255,this[c+1]=u>>>8,this[c+2]=u>>>16,this[c+3]=u>>>24,c+4},o.prototype.writeInt32BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4},o.prototype.writeBigInt64LE=st(function(u,c=0){return O(this,u,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=st(function(u,c=0){return j(this,u,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(f,u,c,g,N,I){if(c+g>f.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function X(f,u,c,g,N){return u=+u,c=c>>>0,N||G(f,u,c,4),n.write(f,u,c,g,23,4),c+4}o.prototype.writeFloatLE=function(u,c,g){return X(this,u,c,!0,g)},o.prototype.writeFloatBE=function(u,c,g){return X(this,u,c,!1,g)};function te(f,u,c,g,N){return u=+u,c=c>>>0,N||G(f,u,c,8),n.write(f,u,c,g,52,8),c+8}o.prototype.writeDoubleLE=function(u,c,g){return te(this,u,c,!0,g)},o.prototype.writeDoubleBE=function(u,c,g){return te(this,u,c,!1,g)},o.prototype.copy=function(u,c,g,N){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!N&&N!==0&&(N=this.length),c>=u.length&&(c=u.length),c||(c=0),N>0&&N<g&&(N=g),N===g||u.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),u.length-c<N-g&&(N=u.length-c+g);const I=N-g;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,g,N):Uint8Array.prototype.set.call(u,this.subarray(g,N),c),I},o.prototype.fill=function(u,c,g,N){if(typeof u=="string"){if(typeof c=="string"?(N=c,c=0,g=this.length):typeof g=="string"&&(N=g,g=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!o.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(u.length===1){const E=u.charCodeAt(0);(N==="utf8"&&E<128||N==="latin1")&&(u=E)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(c<0||this.length<c||this.length<g)throw new RangeError("Out of range index");if(g<=c)return this;c=c>>>0,g=g===void 0?this.length:g>>>0,u||(u=0);let I;if(typeof u=="number")for(I=c;I<g;++I)this[I]=u;else{const E=o.isBuffer(u)?u:o.from(u,N),W=E.length;if(W===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(I=0;I<g-c;++I)this[I+c]=E[I%W]}return this};const Y={};function Z(f,u,c){Y[f]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(f,u){return`The "${f}" argument must be of type number. Received type ${typeof u}`},TypeError),Z("ERR_OUT_OF_RANGE",function(f,u,c){let g=`The value of "${f}" is out of range.`,N=c;return Number.isInteger(c)&&Math.abs(c)>2**32?N=ne(String(c)):typeof c=="bigint"&&(N=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(N=ne(N)),N+="n"),g+=` It must be ${u}. Received ${N}`,g},RangeError);function ne(f){let u="",c=f.length;const g=f[0]==="-"?1:0;for(;c>=g+4;c-=3)u=`_${f.slice(c-3,c)}${u}`;return`${f.slice(0,c)}${u}`}function Se(f,u,c){Le(u,"offset"),(f[u]===void 0||f[u+c]===void 0)&&Re(u,f.length-(c+1))}function Qe(f,u,c,g,N,I){if(f>c||f<u){const E=typeof u=="bigint"?"n":"";let W;throw I>3?u===0||u===BigInt(0)?W=`>= 0${E} and < 2${E} ** ${(I+1)*8}${E}`:W=`>= -(2${E} ** ${(I+1)*8-1}${E}) and < 2 ** ${(I+1)*8-1}${E}`:W=`>= ${u}${E} and <= ${c}${E}`,new Y.ERR_OUT_OF_RANGE("value",W,f)}Se(g,N,I)}function Le(f,u){if(typeof f!="number")throw new Y.ERR_INVALID_ARG_TYPE(u,"number",f)}function Re(f,u,c){throw Math.floor(f)!==f?(Le(f,c),new Y.ERR_OUT_OF_RANGE(c||"offset","an integer",f)):u<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${u}`,f)}const It=/[^+/0-9A-Za-z-_]/g;function fn(f){if(f=f.split("=")[0],f=f.trim().replace(It,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}function Yt(f,u){u=u||1/0;let c;const g=f.length;let N=null;const I=[];for(let E=0;E<g;++E){if(c=f.charCodeAt(E),c>55295&&c<57344){if(!N){if(c>56319){(u-=3)>-1&&I.push(239,191,189);continue}else if(E+1===g){(u-=3)>-1&&I.push(239,191,189);continue}N=c;continue}if(c<56320){(u-=3)>-1&&I.push(239,191,189),N=c;continue}c=(N-55296<<10|c-56320)+65536}else N&&(u-=3)>-1&&I.push(239,191,189);if(N=null,c<128){if((u-=1)<0)break;I.push(c)}else if(c<2048){if((u-=2)<0)break;I.push(c>>6|192,c&63|128)}else if(c<65536){if((u-=3)<0)break;I.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((u-=4)<0)break;I.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return I}function ca(f){const u=[];for(let c=0;c<f.length;++c)u.push(f.charCodeAt(c)&255);return u}function w(f,u){let c,g,N;const I=[];for(let E=0;E<f.length&&!((u-=2)<0);++E)c=f.charCodeAt(E),g=c>>8,N=c%256,I.push(N),I.push(g);return I}function pn(f){return t.toByteArray(fn(f))}function Vt(f,u,c,g){let N;for(N=0;N<g&&!(N+c>=u.length||N>=f.length);++N)u[N+c]=f[N];return N}function Ye(f,u){return f instanceof u||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===u.name}function da(f){return f!==f}const Cc=function(){const f="0123456789abcdef",u=new Array(256);for(let c=0;c<16;++c){const g=c*16;for(let N=0;N<16;++N)u[g+N]=f[c]+f[N]}return u}();function st(f){return typeof BigInt>"u"?Rc:f}function Rc(){throw new Error("BigInt not supported")}})(lu);var cu={exports:{}},pe=cu.exports={},Ve,We;function yr(){throw new Error("setTimeout has not been defined")}function gr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ve=setTimeout:Ve=yr}catch{Ve=yr}try{typeof clearTimeout=="function"?We=clearTimeout:We=gr}catch{We=gr}})();function du(e){if(Ve===setTimeout)return setTimeout(e,0);if((Ve===yr||!Ve)&&setTimeout)return Ve=setTimeout,setTimeout(e,0);try{return Ve(e,0)}catch{try{return Ve.call(null,e,0)}catch{return Ve.call(this,e,0)}}}function Mg(e){if(We===clearTimeout)return clearTimeout(e);if((We===gr||!We)&&clearTimeout)return We=clearTimeout,clearTimeout(e);try{return We(e)}catch{try{return We.call(null,e)}catch{return We.call(this,e)}}}var Xe=[],Rt=!1,pt,bn=-1;function Ig(){!Rt||!pt||(Rt=!1,pt.length?Xe=pt.concat(Xe):bn=-1,Xe.length&&mu())}function mu(){if(!Rt){var e=du(Ig);Rt=!0;for(var t=Xe.length;t;){for(pt=Xe,Xe=[];++bn<t;)pt&&pt[bn].run();bn=-1,t=Xe.length}pt=null,Rt=!1,Mg(e)}}pe.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Xe.push(new fu(e,t)),Xe.length===1&&!Rt&&du(mu)};function fu(e,t){this.fun=e,this.array=t}fu.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function at(){}pe.on=at;pe.addListener=at;pe.once=at;pe.off=at;pe.removeListener=at;pe.removeAllListeners=at;pe.emit=at;pe.prependListener=at;pe.prependOnceListener=at;pe.listeners=function(e){return[]};pe.binding=function(e){throw new Error("process.binding is not supported")};pe.cwd=function(){return"/"};pe.chdir=function(e){throw new Error("process.chdir is not supported")};pe.umask=function(){return 0};var Sg=cu.exports;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lu,n=Sg,a=i=>i&&i.__esModule?i:{default:i},r=a(n),s=globalThis||void 0||self;Object.defineProperty(e,"Buffer",{enumerable:!0,get:()=>t.Buffer}),Object.defineProperty(e,"process",{enumerable:!0,get:()=>r.default}),e.global=s})(Q);function bg(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof Q.process!="object"||typeof Q.process.env!="object"||!1)){const r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),i=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(d){const m=typeof d=="bigint"?d:BigInt(d);if(m>s||m<r)throw new Error(`int64 invalid: ${d}`);return m},uParse(d){const m=typeof d=="bigint"?d:BigInt(d);if(m>o||m<i)throw new Error(`uint64 invalid: ${d}`);return m},enc(d){return e.setBigInt64(0,this.parse(d),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(d){return e.setBigInt64(0,this.uParse(d),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(d,m){return e.setInt32(0,d,!0),e.setInt32(4,m,!0),e.getBigInt64(0,!0)},uDec(d,m){return e.setInt32(0,d,!0),e.setInt32(4,m,!0),e.getBigUint64(0,!0)}}}const n=r=>Ae(/^-?[0-9]+$/.test(r),`int64 invalid: ${r}`),a=r=>Ae(/^[0-9]+$/.test(r),`uint64 invalid: ${r}`);return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),n(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),a(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),n(r),Ii(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),a(r),Ii(r)},dec(r,s){return cg(r,s)},uDec(r,s){return iu(r,s)}}}const ke=bg();var fe;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(fe||(fe={}));class $g{constructor(t){this.stack=[],this.textEncoder=t??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let r=0;r<this.chunks.length;r++)t+=this.chunks[r].length;let n=new Uint8Array(t),a=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],a),a+=this.chunks[r].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(pr(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return In(t),bi(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){tu(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){pr(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){In(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return In(t),t=(t<<1^t>>31)>>>0,bi(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),a=new DataView(n.buffer),r=ke.enc(t);return a.setInt32(0,r.lo,!0),a.setInt32(4,r.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),a=new DataView(n.buffer),r=ke.uEnc(t);return a.setInt32(0,r.lo,!0),a.setInt32(4,r.hi,!0),this.raw(n)}int64(t){let n=ke.enc(t);return ha(n.lo,n.hi,this.buf),this}sint64(t){let n=ke.enc(t),a=n.hi>>31,r=n.lo<<1^a,s=(n.hi<<1|n.lo>>>31)^a;return ha(r,s,this.buf),this}uint64(t){let n=ke.uEnc(t);return ha(n.lo,n.hi,this.buf),this}}class vg{constructor(t,n){this.varint64=ug,this.uint32=mg,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n??new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,a=t&7;if(n<=0||a<0||a>5)throw new Error("illegal tag: field no "+n+" wire type "+a);return[n,a]}skip(t){let n=this.pos;switch(t){case fe.Varint:for(;this.buf[this.pos++]&128;);break;case fe.Bit64:this.pos+=4;case fe.Bit32:this.pos+=4;break;case fe.LengthDelimited:let a=this.uint32();this.pos+=a;break;case fe.StartGroup:let r;for(;(r=this.tag()[1])!==fe.EndGroup;)this.skip(r);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ke.dec(...this.varint64())}uint64(){return ke.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),a=-(t&1);return t=(t>>>1|(n&1)<<31)^a,n=n>>>1^a,ke.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ke.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ke.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}}function Tr(e,t){return t instanceof Ze||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}D.DOUBLE,D.FLOAT,D.INT64,D.UINT64,D.INT32,D.UINT32,D.BOOL,D.STRING,D.BYTES;function it(e,t,n){if(t===n)return!0;if(e==D.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let a=0;a<t.length;a++)if(t[a]!==n[a])return!1;return!0}switch(e){case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==n}return!1}function hr(e){switch(e){case D.BOOL:return!1;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return ke.zero;case D.DOUBLE:case D.FLOAT:return 0;case D.BYTES:return new Uint8Array(0);case D.STRING:return"";default:return 0}}function pu(e,t){const n=t===void 0;let a=fe.Varint,r=t===0;switch(e){case D.STRING:r=n||!t.length,a=fe.LengthDelimited;break;case D.BOOL:r=t===!1;break;case D.DOUBLE:a=fe.Bit64;break;case D.FLOAT:a=fe.Bit32;break;case D.INT64:r=n||t==0;break;case D.UINT64:r=n||t==0;break;case D.FIXED64:r=n||t==0,a=fe.Bit64;break;case D.BYTES:r=n||!t.byteLength,a=fe.LengthDelimited;break;case D.FIXED32:a=fe.Bit32;break;case D.SFIXED32:a=fe.Bit32;break;case D.SFIXED64:r=n||t==0,a=fe.Bit64;break;case D.SINT64:r=n||t==0;break}const s=D[e].toLowerCase();return[a,s,n||r]}const $t=Symbol("@bufbuild/protobuf/unknown-fields"),$i={readUnknownFields:!0,readerFactory:e=>new vg(e)},vi={writeUnknownFields:!0,writerFactory:()=>new $g};function Ag(e){return e?Object.assign(Object.assign({},$i),e):$i}function Eg(e){return e?Object.assign(Object.assign({},vi),e):vi}function Og(){return{makeReadOptions:Ag,makeWriteOptions:Eg,listUnknownFields(e){var t;return(t=e[$t])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[$t]},writeUnknownFields(e,t){const a=e[$t];if(a)for(const r of a)t.tag(r.no,r.wireType).raw(r.data)},onUnknownField(e,t,n,a){const r=e;Array.isArray(r[$t])||(r[$t]=[]),r[$t].push({no:t,wireType:n,data:a})},readMessage(e,t,n,a){const r=e.getType(),s=n===void 0?t.len:t.pos+n;for(;t.pos<s;){const[i,o]=t.tag(),d=r.fields.find(i);if(!d){const y=t.skip(o);a.readUnknownFields&&this.onUnknownField(e,i,o,y);continue}let m=e,p=d.repeated,T=d.localName;switch(d.oneof&&(m=m[d.oneof.localName],m.case!=T&&delete m.value,m.case=T,T="value"),d.kind){case"scalar":case"enum":const y=d.kind=="enum"?D.INT32:d.T;if(p){let R=m[T];if(o==fe.LengthDelimited&&y!=D.STRING&&y!=D.BYTES){let $=t.uint32()+t.pos;for(;t.pos<$;)R.push(Jt(t,y))}else R.push(Jt(t,y))}else m[T]=Jt(t,y);break;case"message":const k=d.T;p?m[T].push($n(t,new k,a)):m[T]instanceof Ze?$n(t,m[T],a):(m[T]=$n(t,new k,a),k.fieldWrapper&&!d.oneof&&!d.repeated&&(m[T]=k.fieldWrapper.unwrapField(m[T])));break;case"map":let[S,b]=Dg(d,t,a);m[T][S]=b;break}}}}}function $n(e,t,n){return t.getType().runtime.bin.readMessage(t,e,e.uint32(),n),t}function Dg(e,t,n){const a=t.uint32(),r=t.pos+a;let s,i;for(;t.pos<r;){let[o]=t.tag();switch(o){case 1:s=Jt(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=Jt(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=$n(t,new e.V.T,n);break}break}}if(s===void 0){let o=hr(e.K);s=e.K==D.BOOL?o.toString():o}if(typeof s!="string"&&typeof s!="number"&&(s=s.toString()),i===void 0)switch(e.V.kind){case"scalar":i=hr(e.V.T);break;case"enum":i=0;break;case"message":i=new e.V.T;break}return[s,i]}function Jt(e,t){switch(t){case D.STRING:return e.string();case D.BOOL:return e.bool();case D.DOUBLE:return e.double();case D.FLOAT:return e.float();case D.INT32:return e.int32();case D.INT64:return e.int64();case D.UINT64:return e.uint64();case D.FIXED64:return e.fixed64();case D.BYTES:return e.bytes();case D.FIXED32:return e.fixed32();case D.SFIXED32:return e.sfixed32();case D.SFIXED64:return e.sfixed64();case D.SINT64:return e.sint64();case D.UINT32:return e.uint32();case D.SINT32:return e.sint32()}}function _g(e,t,n,a,r){e.tag(n.no,fe.LengthDelimited),e.fork();let s=a;switch(n.K){case D.INT32:case D.FIXED32:case D.UINT32:case D.SFIXED32:case D.SINT32:s=Number.parseInt(a);break;case D.BOOL:Ae(a=="true"||a=="false"),s=a=="true";break}switch(Xt(e,n.K,1,s,!0),n.V.kind){case"scalar":Xt(e,n.V.T,2,r,!0);break;case"enum":Xt(e,D.INT32,2,r,!0);break;case"message":kr(e,t,n.V.T,2,r);break}e.join()}function kr(e,t,n,a,r){if(r!==void 0){const s=Tr(n,r);e.tag(a,fe.LengthDelimited).bytes(s.toBinary(t))}}function Xt(e,t,n,a,r){let[s,i,o]=pu(t,a);(!o||r)&&e.tag(n,s)[i](a)}function wg(e,t,n,a){if(!a.length)return;e.tag(n,fe.LengthDelimited).fork();let[,r]=pu(t);for(let s=0;s<a.length;s++)e[r](a[s]);e.join()}function Cg(){return Object.assign(Object.assign({},Og()),{writeMessage(e,t,n){const a=e.getType();for(const r of a.fields.byNumber()){let s,i=r.repeated,o=r.localName;if(r.oneof){const d=e[r.oneof.localName];if(d.case!==o)continue;s=d.value}else s=e[o];switch(r.kind){case"scalar":case"enum":let d=r.kind=="enum"?D.INT32:r.T;if(i)if(r.packed)wg(t,d,r.no,s);else for(const m of s)Xt(t,d,r.no,m,!0);else s!==void 0&&Xt(t,d,r.no,s,!!r.oneof||r.opt);break;case"message":if(i)for(const m of s)kr(t,n,r.T,r.no,m);else kr(t,n,r.T,r.no,s);break;case"map":for(const[m,p]of Object.entries(s))_g(t,n,r,m,p);break}}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t}})}let Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Kn=[];for(let e=0;e<Je.length;e++)Kn[Je[e].charCodeAt(0)]=e;Kn["-".charCodeAt(0)]=Je.indexOf("+");Kn["_".charCodeAt(0)]=Je.indexOf("/");const Fr={dec(e){let t=e.length*3/4;e[e.length-2]=="="?t-=2:e[e.length-1]=="="&&(t-=1);let n=new Uint8Array(t),a=0,r=0,s,i=0;for(let o=0;o<e.length;o++){if(s=Kn[e.charCodeAt(o)],s===void 0)switch(e[o]){case"=":r=0;case`
36
+ */(function(e){const t=Zn,n=Ur,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const f=new Uint8Array(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,Uint8Array.prototype),Object.setPrototypeOf(f,u),f.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function i(f){if(f>r)throw new RangeError('The value "'+f+'" is invalid for option "size"');const u=new Uint8Array(f);return Object.setPrototypeOf(u,o.prototype),u}function o(f,u,c){if(typeof f=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(f)}return d(f,u,c)}o.poolSize=8192;function d(f,u,c){if(typeof f=="string")return y(f,u);if(ArrayBuffer.isView(f))return S(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(Ye(f,ArrayBuffer)||f&&Ye(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ye(f,SharedArrayBuffer)||f&&Ye(f.buffer,SharedArrayBuffer)))return b(f,u,c);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=f.valueOf&&f.valueOf();if(g!=null&&g!==f)return o.from(g,u,c);const N=R(f);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return o.from(f[Symbol.toPrimitive]("string"),u,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}o.from=function(f,u,c){return d(f,u,c)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function m(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function p(f,u,c){return m(f),f<=0?i(f):u!==void 0?typeof c=="string"?i(f).fill(u,c):i(f).fill(u):i(f)}o.alloc=function(f,u,c){return p(f,u,c)};function T(f){return m(f),i(f<0?0:$(f)|0)}o.allocUnsafe=function(f){return T(f)},o.allocUnsafeSlow=function(f){return T(f)};function y(f,u){if((typeof u!="string"||u==="")&&(u="utf8"),!o.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const c=L(f,u)|0;let g=i(c);const N=g.write(f,u);return N!==c&&(g=g.slice(0,N)),g}function k(f){const u=f.length<0?0:$(f.length)|0,c=i(u);for(let g=0;g<u;g+=1)c[g]=f[g]&255;return c}function S(f){if(Ye(f,Uint8Array)){const u=new Uint8Array(f);return b(u.buffer,u.byteOffset,u.byteLength)}return k(f)}function b(f,u,c){if(u<0||f.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<u+(c||0))throw new RangeError('"length" is outside of buffer bounds');let g;return u===void 0&&c===void 0?g=new Uint8Array(f):c===void 0?g=new Uint8Array(f,u):g=new Uint8Array(f,u,c),Object.setPrototypeOf(g,o.prototype),g}function R(f){if(o.isBuffer(f)){const u=$(f.length)|0,c=i(u);return c.length===0||f.copy(c,0,0,u),c}if(f.length!==void 0)return typeof f.length!="number"||da(f.length)?i(0):k(f);if(f.type==="Buffer"&&Array.isArray(f.data))return k(f.data)}function $(f){if(f>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return f|0}function _(f){return+f!=f&&(f=0),o.alloc(+f)}o.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==o.prototype},o.compare=function(u,c){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),Ye(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),!o.isBuffer(u)||!o.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===c)return 0;let g=u.length,N=c.length;for(let I=0,E=Math.min(g,N);I<E;++I)if(u[I]!==c[I]){g=u[I],N=c[I];break}return g<N?-1:N<g?1:0},o.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(u,c){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return o.alloc(0);let g;if(c===void 0)for(c=0,g=0;g<u.length;++g)c+=u[g].length;const N=o.allocUnsafe(c);let I=0;for(g=0;g<u.length;++g){let E=u[g];if(Ye(E,Uint8Array))I+E.length>N.length?(o.isBuffer(E)||(E=o.from(E)),E.copy(N,I)):Uint8Array.prototype.set.call(N,E,I);else if(o.isBuffer(E))E.copy(N,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=E.length}return N};function L(f,u){if(o.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||Ye(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);const c=f.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&c===0)return 0;let N=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Yt(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return pn(f).length;default:if(N)return g?-1:Yt(f).length;u=(""+u).toLowerCase(),N=!0}}o.byteLength=L;function P(f,u,c){let g=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,u>>>=0,c<=u))return"";for(f||(f="utf8");;)switch(f){case"hex":return Ie(this,u,c);case"utf8":case"utf-8":return H(this,u,c);case"ascii":return Ee(this,u,c);case"latin1":case"binary":return Oe(this,u,c);case"base64":return oe(this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,u,c);default:if(g)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),g=!0}}o.prototype._isBuffer=!0;function F(f,u,c){const g=f[u];f[u]=f[c],f[c]=g}o.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<u;c+=2)F(this,c,c+1);return this},o.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<u;c+=4)F(this,c,c+3),F(this,c+1,c+2);return this},o.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<u;c+=8)F(this,c,c+7),F(this,c+1,c+6),F(this,c+2,c+5),F(this,c+3,c+4);return this},o.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?H(this,0,u):P.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(u){if(!o.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:o.compare(this,u)===0},o.prototype.inspect=function(){let u="";const c=e.INSPECT_MAX_BYTES;return u=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(u+=" ... "),"<Buffer "+u+">"},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(u,c,g,N,I){if(Ye(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(c===void 0&&(c=0),g===void 0&&(g=u?u.length:0),N===void 0&&(N=0),I===void 0&&(I=this.length),c<0||g>u.length||N<0||I>this.length)throw new RangeError("out of range index");if(N>=I&&c>=g)return 0;if(N>=I)return-1;if(c>=g)return 1;if(c>>>=0,g>>>=0,N>>>=0,I>>>=0,this===u)return 0;let E=I-N,W=g-c;const de=Math.min(E,W),ue=this.slice(N,I),me=u.slice(c,g);for(let ie=0;ie<de;++ie)if(ue[ie]!==me[ie]){E=ue[ie],W=me[ie];break}return E<W?-1:W<E?1:0};function B(f,u,c,g,N){if(f.length===0)return-1;if(typeof c=="string"?(g=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,da(c)&&(c=N?0:f.length-1),c<0&&(c=f.length+c),c>=f.length){if(N)return-1;c=f.length-1}else if(c<0)if(N)c=0;else return-1;if(typeof u=="string"&&(u=o.from(u,g)),o.isBuffer(u))return u.length===0?-1:U(f,u,c,g,N);if(typeof u=="number")return u=u&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(f,u,c):Uint8Array.prototype.lastIndexOf.call(f,u,c):U(f,[u],c,g,N);throw new TypeError("val must be string, number or Buffer")}function U(f,u,c,g,N){let I=1,E=f.length,W=u.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(f.length<2||u.length<2)return-1;I=2,E/=2,W/=2,c/=2}function de(me,ie){return I===1?me[ie]:me.readUInt16BE(ie*I)}let ue;if(N){let me=-1;for(ue=c;ue<E;ue++)if(de(f,ue)===de(u,me===-1?0:ue-me)){if(me===-1&&(me=ue),ue-me+1===W)return me*I}else me!==-1&&(ue-=ue-me),me=-1}else for(c+W>E&&(c=E-W),ue=c;ue>=0;ue--){let me=!0;for(let ie=0;ie<W;ie++)if(de(f,ue+ie)!==de(u,ie)){me=!1;break}if(me)return ue}return-1}o.prototype.includes=function(u,c,g){return this.indexOf(u,c,g)!==-1},o.prototype.indexOf=function(u,c,g){return B(this,u,c,g,!0)},o.prototype.lastIndexOf=function(u,c,g){return B(this,u,c,g,!1)};function V(f,u,c,g){c=Number(c)||0;const N=f.length-c;g?(g=Number(g),g>N&&(g=N)):g=N;const I=u.length;g>I/2&&(g=I/2);let E;for(E=0;E<g;++E){const W=parseInt(u.substr(E*2,2),16);if(da(W))return E;f[c+E]=W}return E}function q(f,u,c,g){return Vt(Yt(u,f.length-c),f,c,g)}function J(f,u,c,g){return Vt(ca(u),f,c,g)}function re(f,u,c,g){return Vt(pn(u),f,c,g)}function ce(f,u,c,g){return Vt(w(u,f.length-c),f,c,g)}o.prototype.write=function(u,c,g,N){if(c===void 0)N="utf8",g=this.length,c=0;else if(g===void 0&&typeof c=="string")N=c,g=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(g)?(g=g>>>0,N===void 0&&(N="utf8")):(N=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const I=this.length-c;if((g===void 0||g>I)&&(g=I),u.length>0&&(g<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let E=!1;for(;;)switch(N){case"hex":return V(this,u,c,g);case"utf8":case"utf-8":return q(this,u,c,g);case"ascii":case"latin1":case"binary":return J(this,u,c,g);case"base64":return re(this,u,c,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,u,c,g);default:if(E)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),E=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(f,u,c){return u===0&&c===f.length?t.fromByteArray(f):t.fromByteArray(f.slice(u,c))}function H(f,u,c){c=Math.min(f.length,c);const g=[];let N=u;for(;N<c;){const I=f[N];let E=null,W=I>239?4:I>223?3:I>191?2:1;if(N+W<=c){let de,ue,me,ie;switch(W){case 1:I<128&&(E=I);break;case 2:de=f[N+1],(de&192)===128&&(ie=(I&31)<<6|de&63,ie>127&&(E=ie));break;case 3:de=f[N+1],ue=f[N+2],(de&192)===128&&(ue&192)===128&&(ie=(I&15)<<12|(de&63)<<6|ue&63,ie>2047&&(ie<55296||ie>57343)&&(E=ie));break;case 4:de=f[N+1],ue=f[N+2],me=f[N+3],(de&192)===128&&(ue&192)===128&&(me&192)===128&&(ie=(I&15)<<18|(de&63)<<12|(ue&63)<<6|me&63,ie>65535&&ie<1114112&&(E=ie))}}E===null?(E=65533,W=1):E>65535&&(E-=65536,g.push(E>>>10&1023|55296),E=56320|E&1023),g.push(E),N+=W}return Me(g)}const le=4096;function Me(f){const u=f.length;if(u<=le)return String.fromCharCode.apply(String,f);let c="",g=0;for(;g<u;)c+=String.fromCharCode.apply(String,f.slice(g,g+=le));return c}function Ee(f,u,c){let g="";c=Math.min(f.length,c);for(let N=u;N<c;++N)g+=String.fromCharCode(f[N]&127);return g}function Oe(f,u,c){let g="";c=Math.min(f.length,c);for(let N=u;N<c;++N)g+=String.fromCharCode(f[N]);return g}function Ie(f,u,c){const g=f.length;(!u||u<0)&&(u=0),(!c||c<0||c>g)&&(c=g);let N="";for(let I=u;I<c;++I)N+=Cc[f[I]];return N}function be(f,u,c){const g=f.slice(u,c);let N="";for(let I=0;I<g.length-1;I+=2)N+=String.fromCharCode(g[I]+g[I+1]*256);return N}o.prototype.slice=function(u,c){const g=this.length;u=~~u,c=c===void 0?g:~~c,u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),c<0?(c+=g,c<0&&(c=0)):c>g&&(c=g),c<u&&(c=u);const N=this.subarray(u,c);return Object.setPrototypeOf(N,o.prototype),N};function ee(f,u,c){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+u>c)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u],I=1,E=0;for(;++E<c&&(I*=256);)N+=this[u+E]*I;return N},o.prototype.readUintBE=o.prototype.readUIntBE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u+--c],I=1;for(;c>0&&(I*=256);)N+=this[u+--c]*I;return N},o.prototype.readUint8=o.prototype.readUInt8=function(u,c){return u=u>>>0,c||ee(u,1,this.length),this[u]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(u,c){return u=u>>>0,c||ee(u,2,this.length),this[u]|this[u+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(u,c){return u=u>>>0,c||ee(u,2,this.length),this[u]<<8|this[u+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},o.prototype.readBigUInt64LE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=c+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,I=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(N)+(BigInt(I)<<BigInt(32))}),o.prototype.readBigUInt64BE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=c*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],I=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(N)<<BigInt(32))+BigInt(I)}),o.prototype.readIntLE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=this[u],I=1,E=0;for(;++E<c&&(I*=256);)N+=this[u+E]*I;return I*=128,N>=I&&(N-=Math.pow(2,8*c)),N},o.prototype.readIntBE=function(u,c,g){u=u>>>0,c=c>>>0,g||ee(u,c,this.length);let N=c,I=1,E=this[u+--N];for(;N>0&&(I*=256);)E+=this[u+--N]*I;return I*=128,E>=I&&(E-=Math.pow(2,8*c)),E},o.prototype.readInt8=function(u,c){return u=u>>>0,c||ee(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},o.prototype.readInt16LE=function(u,c){u=u>>>0,c||ee(u,2,this.length);const g=this[u]|this[u+1]<<8;return g&32768?g|4294901760:g},o.prototype.readInt16BE=function(u,c){u=u>>>0,c||ee(u,2,this.length);const g=this[u+1]|this[u]<<8;return g&32768?g|4294901760:g},o.prototype.readInt32LE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},o.prototype.readInt32BE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},o.prototype.readBigInt64LE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(N)<<BigInt(32))+BigInt(c+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),o.prototype.readBigInt64BE=st(function(u){u=u>>>0,Le(u,"offset");const c=this[u],g=this[u+7];(c===void 0||g===void 0)&&Re(u,this.length-8);const N=(c<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(N)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g)}),o.prototype.readFloatLE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),n.read(this,u,!0,23,4)},o.prototype.readFloatBE=function(u,c){return u=u>>>0,c||ee(u,4,this.length),n.read(this,u,!1,23,4)},o.prototype.readDoubleLE=function(u,c){return u=u>>>0,c||ee(u,8,this.length),n.read(this,u,!0,52,8)},o.prototype.readDoubleBE=function(u,c){return u=u>>>0,c||ee(u,8,this.length),n.read(this,u,!1,52,8)};function M(f,u,c,g,N,I){if(!o.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>N||u<I)throw new RangeError('"value" argument is out of bounds');if(c+g>f.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(u,c,g,N){if(u=+u,c=c>>>0,g=g>>>0,!N){const W=Math.pow(2,8*g)-1;M(this,u,c,g,W,0)}let I=1,E=0;for(this[c]=u&255;++E<g&&(I*=256);)this[c+E]=u/I&255;return c+g},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(u,c,g,N){if(u=+u,c=c>>>0,g=g>>>0,!N){const W=Math.pow(2,8*g)-1;M(this,u,c,g,W,0)}let I=g-1,E=1;for(this[c+I]=u&255;--I>=0&&(E*=256);)this[c+I]=u/E&255;return c+g},o.prototype.writeUint8=o.prototype.writeUInt8=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,1,255,0),this[c]=u&255,c+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,65535,0),this[c]=u&255,this[c+1]=u>>>8,c+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,65535,0),this[c]=u>>>8,this[c+1]=u&255,c+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,4294967295,0),this[c+3]=u>>>24,this[c+2]=u>>>16,this[c+1]=u>>>8,this[c]=u&255,c+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,4294967295,0),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4};function O(f,u,c,g,N){Qe(u,g,N,f,c,7);let I=Number(u&BigInt(4294967295));f[c++]=I,I=I>>8,f[c++]=I,I=I>>8,f[c++]=I,I=I>>8,f[c++]=I;let E=Number(u>>BigInt(32)&BigInt(4294967295));return f[c++]=E,E=E>>8,f[c++]=E,E=E>>8,f[c++]=E,E=E>>8,f[c++]=E,c}function j(f,u,c,g,N){Qe(u,g,N,f,c,7);let I=Number(u&BigInt(4294967295));f[c+7]=I,I=I>>8,f[c+6]=I,I=I>>8,f[c+5]=I,I=I>>8,f[c+4]=I;let E=Number(u>>BigInt(32)&BigInt(4294967295));return f[c+3]=E,E=E>>8,f[c+2]=E,E=E>>8,f[c+1]=E,E=E>>8,f[c]=E,c+8}o.prototype.writeBigUInt64LE=st(function(u,c=0){return O(this,u,c,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=st(function(u,c=0){return j(this,u,c,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(u,c,g,N){if(u=+u,c=c>>>0,!N){const de=Math.pow(2,8*g-1);M(this,u,c,g,de-1,-de)}let I=0,E=1,W=0;for(this[c]=u&255;++I<g&&(E*=256);)u<0&&W===0&&this[c+I-1]!==0&&(W=1),this[c+I]=(u/E>>0)-W&255;return c+g},o.prototype.writeIntBE=function(u,c,g,N){if(u=+u,c=c>>>0,!N){const de=Math.pow(2,8*g-1);M(this,u,c,g,de-1,-de)}let I=g-1,E=1,W=0;for(this[c+I]=u&255;--I>=0&&(E*=256);)u<0&&W===0&&this[c+I+1]!==0&&(W=1),this[c+I]=(u/E>>0)-W&255;return c+g},o.prototype.writeInt8=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,1,127,-128),u<0&&(u=255+u+1),this[c]=u&255,c+1},o.prototype.writeInt16LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,32767,-32768),this[c]=u&255,this[c+1]=u>>>8,c+2},o.prototype.writeInt16BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,2,32767,-32768),this[c]=u>>>8,this[c+1]=u&255,c+2},o.prototype.writeInt32LE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,2147483647,-2147483648),this[c]=u&255,this[c+1]=u>>>8,this[c+2]=u>>>16,this[c+3]=u>>>24,c+4},o.prototype.writeInt32BE=function(u,c,g){return u=+u,c=c>>>0,g||M(this,u,c,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[c]=u>>>24,this[c+1]=u>>>16,this[c+2]=u>>>8,this[c+3]=u&255,c+4},o.prototype.writeBigInt64LE=st(function(u,c=0){return O(this,u,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=st(function(u,c=0){return j(this,u,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function G(f,u,c,g,N,I){if(c+g>f.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function X(f,u,c,g,N){return u=+u,c=c>>>0,N||G(f,u,c,4),n.write(f,u,c,g,23,4),c+4}o.prototype.writeFloatLE=function(u,c,g){return X(this,u,c,!0,g)},o.prototype.writeFloatBE=function(u,c,g){return X(this,u,c,!1,g)};function te(f,u,c,g,N){return u=+u,c=c>>>0,N||G(f,u,c,8),n.write(f,u,c,g,52,8),c+8}o.prototype.writeDoubleLE=function(u,c,g){return te(this,u,c,!0,g)},o.prototype.writeDoubleBE=function(u,c,g){return te(this,u,c,!1,g)},o.prototype.copy=function(u,c,g,N){if(!o.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!N&&N!==0&&(N=this.length),c>=u.length&&(c=u.length),c||(c=0),N>0&&N<g&&(N=g),N===g||u.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),u.length-c<N-g&&(N=u.length-c+g);const I=N-g;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,g,N):Uint8Array.prototype.set.call(u,this.subarray(g,N),c),I},o.prototype.fill=function(u,c,g,N){if(typeof u=="string"){if(typeof c=="string"?(N=c,c=0,g=this.length):typeof g=="string"&&(N=g,g=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!o.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(u.length===1){const E=u.charCodeAt(0);(N==="utf8"&&E<128||N==="latin1")&&(u=E)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(c<0||this.length<c||this.length<g)throw new RangeError("Out of range index");if(g<=c)return this;c=c>>>0,g=g===void 0?this.length:g>>>0,u||(u=0);let I;if(typeof u=="number")for(I=c;I<g;++I)this[I]=u;else{const E=o.isBuffer(u)?u:o.from(u,N),W=E.length;if(W===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(I=0;I<g-c;++I)this[I+c]=E[I%W]}return this};const Y={};function Z(f,u,c){Y[f]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}}}Z("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Z("ERR_INVALID_ARG_TYPE",function(f,u){return`The "${f}" argument must be of type number. Received type ${typeof u}`},TypeError),Z("ERR_OUT_OF_RANGE",function(f,u,c){let g=`The value of "${f}" is out of range.`,N=c;return Number.isInteger(c)&&Math.abs(c)>2**32?N=ne(String(c)):typeof c=="bigint"&&(N=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(N=ne(N)),N+="n"),g+=` It must be ${u}. Received ${N}`,g},RangeError);function ne(f){let u="",c=f.length;const g=f[0]==="-"?1:0;for(;c>=g+4;c-=3)u=`_${f.slice(c-3,c)}${u}`;return`${f.slice(0,c)}${u}`}function Se(f,u,c){Le(u,"offset"),(f[u]===void 0||f[u+c]===void 0)&&Re(u,f.length-(c+1))}function Qe(f,u,c,g,N,I){if(f>c||f<u){const E=typeof u=="bigint"?"n":"";let W;throw I>3?u===0||u===BigInt(0)?W=`>= 0${E} and < 2${E} ** ${(I+1)*8}${E}`:W=`>= -(2${E} ** ${(I+1)*8-1}${E}) and < 2 ** ${(I+1)*8-1}${E}`:W=`>= ${u}${E} and <= ${c}${E}`,new Y.ERR_OUT_OF_RANGE("value",W,f)}Se(g,N,I)}function Le(f,u){if(typeof f!="number")throw new Y.ERR_INVALID_ARG_TYPE(u,"number",f)}function Re(f,u,c){throw Math.floor(f)!==f?(Le(f,c),new Y.ERR_OUT_OF_RANGE(c||"offset","an integer",f)):u<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${u}`,f)}const It=/[^+/0-9A-Za-z-_]/g;function fn(f){if(f=f.split("=")[0],f=f.trim().replace(It,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}function Yt(f,u){u=u||1/0;let c;const g=f.length;let N=null;const I=[];for(let E=0;E<g;++E){if(c=f.charCodeAt(E),c>55295&&c<57344){if(!N){if(c>56319){(u-=3)>-1&&I.push(239,191,189);continue}else if(E+1===g){(u-=3)>-1&&I.push(239,191,189);continue}N=c;continue}if(c<56320){(u-=3)>-1&&I.push(239,191,189),N=c;continue}c=(N-55296<<10|c-56320)+65536}else N&&(u-=3)>-1&&I.push(239,191,189);if(N=null,c<128){if((u-=1)<0)break;I.push(c)}else if(c<2048){if((u-=2)<0)break;I.push(c>>6|192,c&63|128)}else if(c<65536){if((u-=3)<0)break;I.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((u-=4)<0)break;I.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return I}function ca(f){const u=[];for(let c=0;c<f.length;++c)u.push(f.charCodeAt(c)&255);return u}function w(f,u){let c,g,N;const I=[];for(let E=0;E<f.length&&!((u-=2)<0);++E)c=f.charCodeAt(E),g=c>>8,N=c%256,I.push(N),I.push(g);return I}function pn(f){return t.toByteArray(fn(f))}function Vt(f,u,c,g){let N;for(N=0;N<g&&!(N+c>=u.length||N>=f.length);++N)u[N+c]=f[N];return N}function Ye(f,u){return f instanceof u||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===u.name}function da(f){return f!==f}const Cc=function(){const f="0123456789abcdef",u=new Array(256);for(let c=0;c<16;++c){const g=c*16;for(let N=0;N<16;++N)u[g+N]=f[c]+f[N]}return u}();function st(f){return typeof BigInt>"u"?Rc:f}function Rc(){throw new Error("BigInt not supported")}})(lu);var cu={exports:{}},pe=cu.exports={},Ve,We;function yr(){throw new Error("setTimeout has not been defined")}function gr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ve=setTimeout:Ve=yr}catch{Ve=yr}try{typeof clearTimeout=="function"?We=clearTimeout:We=gr}catch{We=gr}})();function du(e){if(Ve===setTimeout)return setTimeout(e,0);if((Ve===yr||!Ve)&&setTimeout)return Ve=setTimeout,setTimeout(e,0);try{return Ve(e,0)}catch{try{return Ve.call(null,e,0)}catch{return Ve.call(this,e,0)}}}function Mg(e){if(We===clearTimeout)return clearTimeout(e);if((We===gr||!We)&&clearTimeout)return We=clearTimeout,clearTimeout(e);try{return We(e)}catch{try{return We.call(null,e)}catch{return We.call(this,e)}}}var Xe=[],jt=!1,pt,bn=-1;function Ig(){!jt||!pt||(jt=!1,pt.length?Xe=pt.concat(Xe):bn=-1,Xe.length&&mu())}function mu(){if(!jt){var e=du(Ig);jt=!0;for(var t=Xe.length;t;){for(pt=Xe,Xe=[];++bn<t;)pt&&pt[bn].run();bn=-1,t=Xe.length}pt=null,jt=!1,Mg(e)}}pe.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Xe.push(new fu(e,t)),Xe.length===1&&!jt&&du(mu)};function fu(e,t){this.fun=e,this.array=t}fu.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function at(){}pe.on=at;pe.addListener=at;pe.once=at;pe.off=at;pe.removeListener=at;pe.removeAllListeners=at;pe.emit=at;pe.prependListener=at;pe.prependOnceListener=at;pe.listeners=function(e){return[]};pe.binding=function(e){throw new Error("process.binding is not supported")};pe.cwd=function(){return"/"};pe.chdir=function(e){throw new Error("process.chdir is not supported")};pe.umask=function(){return 0};var Sg=cu.exports;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lu,n=Sg,a=i=>i&&i.__esModule?i:{default:i},r=a(n),s=globalThis||void 0||self;Object.defineProperty(e,"Buffer",{enumerable:!0,get:()=>t.Buffer}),Object.defineProperty(e,"process",{enumerable:!0,get:()=>r.default}),e.global=s})(Q);function bg(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof Q.process!="object"||typeof Q.process.env!="object"||!1)){const r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),i=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(d){const m=typeof d=="bigint"?d:BigInt(d);if(m>s||m<r)throw new Error(`int64 invalid: ${d}`);return m},uParse(d){const m=typeof d=="bigint"?d:BigInt(d);if(m>o||m<i)throw new Error(`uint64 invalid: ${d}`);return m},enc(d){return e.setBigInt64(0,this.parse(d),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(d){return e.setBigInt64(0,this.uParse(d),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(d,m){return e.setInt32(0,d,!0),e.setInt32(4,m,!0),e.getBigInt64(0,!0)},uDec(d,m){return e.setInt32(0,d,!0),e.setInt32(4,m,!0),e.getBigUint64(0,!0)}}}const n=r=>Ae(/^-?[0-9]+$/.test(r),`int64 invalid: ${r}`),a=r=>Ae(/^[0-9]+$/.test(r),`uint64 invalid: ${r}`);return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),n(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),a(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),n(r),Ii(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),a(r),Ii(r)},dec(r,s){return cg(r,s)},uDec(r,s){return iu(r,s)}}}const ke=bg();var fe;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(fe||(fe={}));class $g{constructor(t){this.stack=[],this.textEncoder=t??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let t=0;for(let r=0;r<this.chunks.length;r++)t+=this.chunks[r].length;let n=new Uint8Array(t),a=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],a),a+=this.chunks[r].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(pr(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return In(t),bi(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.textEncoder.encode(t);return this.uint32(n.byteLength),this.raw(n)}float(t){tu(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){pr(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){In(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return In(t),t=(t<<1^t>>31)>>>0,bi(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),a=new DataView(n.buffer),r=ke.enc(t);return a.setInt32(0,r.lo,!0),a.setInt32(4,r.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),a=new DataView(n.buffer),r=ke.uEnc(t);return a.setInt32(0,r.lo,!0),a.setInt32(4,r.hi,!0),this.raw(n)}int64(t){let n=ke.enc(t);return ha(n.lo,n.hi,this.buf),this}sint64(t){let n=ke.enc(t),a=n.hi>>31,r=n.lo<<1^a,s=(n.hi<<1|n.lo>>>31)^a;return ha(r,s,this.buf),this}uint64(t){let n=ke.uEnc(t);return ha(n.lo,n.hi,this.buf),this}}class vg{constructor(t,n){this.varint64=ug,this.uint32=mg,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.textDecoder=n??new TextDecoder}tag(){let t=this.uint32(),n=t>>>3,a=t&7;if(n<=0||a<0||a>5)throw new Error("illegal tag: field no "+n+" wire type "+a);return[n,a]}skip(t){let n=this.pos;switch(t){case fe.Varint:for(;this.buf[this.pos++]&128;);break;case fe.Bit64:this.pos+=4;case fe.Bit32:this.pos+=4;break;case fe.LengthDelimited:let a=this.uint32();this.pos+=a;break;case fe.StartGroup:let r;for(;(r=this.tag()[1])!==fe.EndGroup;)this.skip(r);break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ke.dec(...this.varint64())}uint64(){return ke.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),a=-(t&1);return t=(t>>>1|(n&1)<<31)^a,n=n>>>1^a,ke.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ke.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ke.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.textDecoder.decode(this.bytes())}}function Tr(e,t){return t instanceof Ze||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}D.DOUBLE,D.FLOAT,D.INT64,D.UINT64,D.INT32,D.UINT32,D.BOOL,D.STRING,D.BYTES;function it(e,t,n){if(t===n)return!0;if(e==D.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let a=0;a<t.length;a++)if(t[a]!==n[a])return!1;return!0}switch(e){case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return t==n}return!1}function hr(e){switch(e){case D.BOOL:return!1;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return ke.zero;case D.DOUBLE:case D.FLOAT:return 0;case D.BYTES:return new Uint8Array(0);case D.STRING:return"";default:return 0}}function pu(e,t){const n=t===void 0;let a=fe.Varint,r=t===0;switch(e){case D.STRING:r=n||!t.length,a=fe.LengthDelimited;break;case D.BOOL:r=t===!1;break;case D.DOUBLE:a=fe.Bit64;break;case D.FLOAT:a=fe.Bit32;break;case D.INT64:r=n||t==0;break;case D.UINT64:r=n||t==0;break;case D.FIXED64:r=n||t==0,a=fe.Bit64;break;case D.BYTES:r=n||!t.byteLength,a=fe.LengthDelimited;break;case D.FIXED32:a=fe.Bit32;break;case D.SFIXED32:a=fe.Bit32;break;case D.SFIXED64:r=n||t==0,a=fe.Bit64;break;case D.SINT64:r=n||t==0;break}const s=D[e].toLowerCase();return[a,s,n||r]}const $t=Symbol("@bufbuild/protobuf/unknown-fields"),$i={readUnknownFields:!0,readerFactory:e=>new vg(e)},vi={writeUnknownFields:!0,writerFactory:()=>new $g};function Ag(e){return e?Object.assign(Object.assign({},$i),e):$i}function Eg(e){return e?Object.assign(Object.assign({},vi),e):vi}function Og(){return{makeReadOptions:Ag,makeWriteOptions:Eg,listUnknownFields(e){var t;return(t=e[$t])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[$t]},writeUnknownFields(e,t){const a=e[$t];if(a)for(const r of a)t.tag(r.no,r.wireType).raw(r.data)},onUnknownField(e,t,n,a){const r=e;Array.isArray(r[$t])||(r[$t]=[]),r[$t].push({no:t,wireType:n,data:a})},readMessage(e,t,n,a){const r=e.getType(),s=n===void 0?t.len:t.pos+n;for(;t.pos<s;){const[i,o]=t.tag(),d=r.fields.find(i);if(!d){const y=t.skip(o);a.readUnknownFields&&this.onUnknownField(e,i,o,y);continue}let m=e,p=d.repeated,T=d.localName;switch(d.oneof&&(m=m[d.oneof.localName],m.case!=T&&delete m.value,m.case=T,T="value"),d.kind){case"scalar":case"enum":const y=d.kind=="enum"?D.INT32:d.T;if(p){let R=m[T];if(o==fe.LengthDelimited&&y!=D.STRING&&y!=D.BYTES){let $=t.uint32()+t.pos;for(;t.pos<$;)R.push(Jt(t,y))}else R.push(Jt(t,y))}else m[T]=Jt(t,y);break;case"message":const k=d.T;p?m[T].push($n(t,new k,a)):m[T]instanceof Ze?$n(t,m[T],a):(m[T]=$n(t,new k,a),k.fieldWrapper&&!d.oneof&&!d.repeated&&(m[T]=k.fieldWrapper.unwrapField(m[T])));break;case"map":let[S,b]=Dg(d,t,a);m[T][S]=b;break}}}}}function $n(e,t,n){return t.getType().runtime.bin.readMessage(t,e,e.uint32(),n),t}function Dg(e,t,n){const a=t.uint32(),r=t.pos+a;let s,i;for(;t.pos<r;){let[o]=t.tag();switch(o){case 1:s=Jt(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=Jt(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=$n(t,new e.V.T,n);break}break}}if(s===void 0){let o=hr(e.K);s=e.K==D.BOOL?o.toString():o}if(typeof s!="string"&&typeof s!="number"&&(s=s.toString()),i===void 0)switch(e.V.kind){case"scalar":i=hr(e.V.T);break;case"enum":i=0;break;case"message":i=new e.V.T;break}return[s,i]}function Jt(e,t){switch(t){case D.STRING:return e.string();case D.BOOL:return e.bool();case D.DOUBLE:return e.double();case D.FLOAT:return e.float();case D.INT32:return e.int32();case D.INT64:return e.int64();case D.UINT64:return e.uint64();case D.FIXED64:return e.fixed64();case D.BYTES:return e.bytes();case D.FIXED32:return e.fixed32();case D.SFIXED32:return e.sfixed32();case D.SFIXED64:return e.sfixed64();case D.SINT64:return e.sint64();case D.UINT32:return e.uint32();case D.SINT32:return e.sint32()}}function _g(e,t,n,a,r){e.tag(n.no,fe.LengthDelimited),e.fork();let s=a;switch(n.K){case D.INT32:case D.FIXED32:case D.UINT32:case D.SFIXED32:case D.SINT32:s=Number.parseInt(a);break;case D.BOOL:Ae(a=="true"||a=="false"),s=a=="true";break}switch(Xt(e,n.K,1,s,!0),n.V.kind){case"scalar":Xt(e,n.V.T,2,r,!0);break;case"enum":Xt(e,D.INT32,2,r,!0);break;case"message":kr(e,t,n.V.T,2,r);break}e.join()}function kr(e,t,n,a,r){if(r!==void 0){const s=Tr(n,r);e.tag(a,fe.LengthDelimited).bytes(s.toBinary(t))}}function Xt(e,t,n,a,r){let[s,i,o]=pu(t,a);(!o||r)&&e.tag(n,s)[i](a)}function wg(e,t,n,a){if(!a.length)return;e.tag(n,fe.LengthDelimited).fork();let[,r]=pu(t);for(let s=0;s<a.length;s++)e[r](a[s]);e.join()}function Cg(){return Object.assign(Object.assign({},Og()),{writeMessage(e,t,n){const a=e.getType();for(const r of a.fields.byNumber()){let s,i=r.repeated,o=r.localName;if(r.oneof){const d=e[r.oneof.localName];if(d.case!==o)continue;s=d.value}else s=e[o];switch(r.kind){case"scalar":case"enum":let d=r.kind=="enum"?D.INT32:r.T;if(i)if(r.packed)wg(t,d,r.no,s);else for(const m of s)Xt(t,d,r.no,m,!0);else s!==void 0&&Xt(t,d,r.no,s,!!r.oneof||r.opt);break;case"message":if(i)for(const m of s)kr(t,n,r.T,r.no,m);else kr(t,n,r.T,r.no,s);break;case"map":for(const[m,p]of Object.entries(s))_g(t,n,r,m,p);break}}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t}})}let Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Kn=[];for(let e=0;e<Je.length;e++)Kn[Je[e].charCodeAt(0)]=e;Kn["-".charCodeAt(0)]=Je.indexOf("+");Kn["_".charCodeAt(0)]=Je.indexOf("/");const Fr={dec(e){let t=e.length*3/4;e[e.length-2]=="="?t-=2:e[e.length-1]=="="&&(t-=1);let n=new Uint8Array(t),a=0,r=0,s,i=0;for(let o=0;o<e.length;o++){if(s=Kn[e.charCodeAt(o)],s===void 0)switch(e[o]){case"=":r=0;case`
37
37
  `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:i=s,r=1;break;case 1:n[a++]=i<<2|(s&48)>>4,i=s,r=2;break;case 2:n[a++]=(i&15)<<4|(s&60)>>2,i=s,r=3;break;case 3:n[a++]=(i&3)<<6|s,r=0;break}}if(r==1)throw Error("invalid base64 string.");return n.subarray(0,a)},enc(e){let t="",n=0,a,r=0;for(let s=0;s<e.length;s++)switch(a=e[s],n){case 0:t+=Je[a>>2],r=(a&3)<<4,n=1;break;case 1:t+=Je[r|a>>4],r=(a&15)<<2,n=2;break;case 2:t+=Je[r|a>>6],t+=Je[a&63],n=0;break}return n&&(t+=Je[r],t+="=",n==1&&(t+="=")),t}},Ai={ignoreUnknownFields:!1},Ei={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Rg(e){return e?Object.assign(Object.assign({},Ai),e):Ai}function jg(e){return e?Object.assign(Object.assign({},Ei),e):Ei}function xg(e){const t=e(Lg,Oi);return{makeReadOptions:Rg,makeWriteOptions:jg,readMessage(n,a,r,s){if(a==null||Array.isArray(a)||typeof a!="object")throw new Error(`cannot decode message ${n.typeName} from JSON: ${this.debug(a)}`);s=s??new n;const i={};for(const[o,d]of Object.entries(a)){const m=n.fields.findJsonName(o);if(!m){if(!r.ignoreUnknownFields)throw new Error(`cannot decode message ${n.typeName} from JSON: key "${o}" is unknown`);continue}let p=m.localName,T=s;if(m.oneof){if(d===null&&m.kind=="scalar")continue;const y=i[m.oneof.localName];if(y)throw new Error(`cannot decode message ${n.typeName} from JSON: multiple keys for oneof "${m.oneof.name}" present: "${y}", "${o}"`);i[m.oneof.localName]=o,T=T[m.oneof.localName]={case:p},p="value"}if(m.repeated){if(d===null)continue;if(!Array.isArray(d))throw new Error(`cannot decode field ${n.typeName}.${m.name} from JSON: ${this.debug(d)}`);const y=T[p];for(const k of d){if(k===null)throw new Error(`cannot decode field ${n.typeName}.${m.name} from JSON: ${this.debug(k)}`);let S;switch(m.kind){case"message":S=m.T.fromJson(k,r);break;case"enum":if(S=Na(m.T,k,r.ignoreUnknownFields),S===void 0)continue;break;case"scalar":try{S=Wt(m.T,k)}catch(b){let R=`cannot decode field ${n.typeName}.${m.name} from JSON: ${this.debug(k)}`;throw b instanceof Error&&b.message.length>0&&(R+=`: ${b.message}`),new Error(R)}break}y.push(S)}}else if(m.kind=="map"){if(d===null)continue;if(Array.isArray(d)||typeof d!="object")throw new Error(`cannot decode field ${n.typeName}.${m.name} from JSON: ${this.debug(d)}`);const y=T[p];for(const[k,S]of Object.entries(d)){if(S===null)throw new Error(`cannot decode field ${n.typeName}.${m.name} from JSON: map value null`);let b;switch(m.V.kind){case"message":b=m.V.T.fromJson(S,r);break;case"enum":if(b=Na(m.V.T,S,r.ignoreUnknownFields),b===void 0)continue;break;case"scalar":try{b=Wt(m.V.T,S)}catch(R){let $=`cannot decode map value for field ${n.typeName}.${m.name} from JSON: ${this.debug(d)}`;throw R instanceof Error&&R.message.length>0&&($+=`: ${R.message}`),new Error($)}break}try{y[Wt(m.K,m.K==D.BOOL?k=="true"?!0:k=="false"?!1:k:k).toString()]=b}catch(R){let $=`cannot decode map key for field ${n.typeName}.${m.name} from JSON: ${this.debug(d)}`;throw R instanceof Error&&R.message.length>0&&($+=`: ${R.message}`),new Error($)}}}else switch(m.kind){case"message":const y=m.T;if(d===null&&y.typeName!="google.protobuf.Value"){if(m.oneof)throw new Error(`cannot decode field ${n.typeName}.${m.name} from JSON: null is invalid for oneof field "${o}"`);continue}T[p]instanceof Ze?T[p].fromJson(d,r):(T[p]=y.fromJson(d,r),y.fieldWrapper&&!m.oneof&&(T[p]=y.fieldWrapper.unwrapField(T[p])));break;case"enum":const k=Na(m.T,d,r.ignoreUnknownFields);k!==void 0&&(T[p]=k);break;case"scalar":try{T[p]=Wt(m.T,d)}catch(S){let b=`cannot decode field ${n.typeName}.${m.name} from JSON: ${this.debug(d)}`;throw S instanceof Error&&S.message.length>0&&(b+=`: ${S.message}`),new Error(b)}break}}return s},writeMessage(n,a){const r=n.getType(),s={};let i;try{for(const o of r.fields.byMember()){let d;if(o.kind=="oneof"){const m=n[o.localName];if(m.value===void 0)continue;if(i=o.findField(m.case),!i)throw"oneof case not found: "+m.case;d=t(i,m.value,a)}else i=o,d=t(i,n[i.localName],a);d!==void 0&&(s[a.useProtoFieldName?i.name:i.jsonName]=d)}}catch(o){const d=i?`cannot encode field ${r.typeName}.${i.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,m=o instanceof Error?o.message:String(o);throw new Error(d+(m.length>0?`: ${m}`:""))}return s},readScalar:Wt,writeScalar:Oi,debug:yu}}function yu(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function Wt(e,t){switch(e){case D.DOUBLE:case D.FLOAT:if(t===null)return 0;if(t==="NaN")return Number.NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(t===""||typeof t=="string"&&t.trim().length!==t.length||typeof t!="string"&&typeof t!="number")break;const n=Number(t);if(Number.isNaN(n)||!Number.isFinite(n))break;return e==D.FLOAT&&tu(n),n;case D.INT32:case D.FIXED32:case D.SFIXED32:case D.SINT32:case D.UINT32:if(t===null)return 0;let a;if(typeof t=="number"?a=t:typeof t=="string"&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),a===void 0)break;return e==D.UINT32?pr(a):In(a),a;case D.INT64:case D.SFIXED64:case D.SINT64:if(t===null)return ke.zero;if(typeof t!="number"&&typeof t!="string")break;return ke.parse(t);case D.FIXED64:case D.UINT64:if(t===null)return ke.zero;if(typeof t!="number"&&typeof t!="string")break;return ke.uParse(t);case D.BOOL:if(t===null)return!1;if(typeof t!="boolean")break;return t;case D.STRING:if(t===null)return"";if(typeof t!="string")break;try{encodeURIComponent(t)}catch{throw new Error("invalid UTF8")}return t;case D.BYTES:if(t===null||t==="")return new Uint8Array(0);if(typeof t!="string")break;return Fr.dec(t)}throw new Error}function Na(e,t,n){if(t===null)return 0;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":const a=e.findName(t);if(a||n)return a==null?void 0:a.no;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${yu(t)}`)}function Lg(e,t,n,a){var r;if(t===void 0)return t;if(t===0&&!n)return;if(a)return t;if(e.typeName=="google.protobuf.NullValue")return null;const s=e.findNumber(t);return(r=s==null?void 0:s.name)!==null&&r!==void 0?r:t}function Oi(e,t,n){if(t!==void 0)switch(e){case D.INT32:case D.SFIXED32:case D.SINT32:case D.FIXED32:case D.UINT32:return Ae(typeof t=="number"),t!=0||n?t:void 0;case D.FLOAT:case D.DOUBLE:return Ae(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t!==0||n?t:void 0;case D.STRING:return Ae(typeof t=="string"),t.length>0||n?t:void 0;case D.BOOL:return Ae(typeof t=="boolean"),t||n?t:void 0;case D.UINT64:case D.FIXED64:case D.INT64:case D.SFIXED64:case D.SINT64:return Ae(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),n||t!=0?t.toString(10):void 0;case D.BYTES:return Ae(t instanceof Uint8Array),n||t.byteLength>0?Fr.enc(t):void 0}}function Pg(){return xg((e,t)=>function(a,r,s){if(a.kind=="map"){const i={};switch(a.V.kind){case"scalar":for(const[d,m]of Object.entries(r)){const p=t(a.V.T,m,!0);Ae(p!==void 0),i[d.toString()]=p}break;case"message":for(const[d,m]of Object.entries(r))i[d.toString()]=m.toJson(s);break;case"enum":const o=a.V.T;for(const[d,m]of Object.entries(r)){Ae(m===void 0||typeof m=="number");const p=e(o,m,!0,s.enumAsInteger);Ae(p!==void 0),i[d.toString()]=p}break}return s.emitDefaultValues||Object.keys(i).length>0?i:void 0}else if(a.repeated){const i=[];switch(a.kind){case"scalar":for(let o=0;o<r.length;o++)i.push(t(a.T,r[o],!0));break;case"enum":for(let o=0;o<r.length;o++)i.push(e(a.T,r[o],!0,s.enumAsInteger));break;case"message":for(let o=0;o<r.length;o++)i.push(Tr(a.T,r[o]).toJson(s));break}return s.emitDefaultValues||i.length>0?i:void 0}else switch(a.kind){case"scalar":return t(a.T,r,!!a.oneof||a.opt||s.emitDefaultValues);case"enum":return e(a.T,r,!!a.oneof||a.opt||s.emitDefaultValues,s.enumAsInteger);case"message":return r!==void 0?Tr(a.T,r).toJson(s):void 0}})}function Ug(){return{setEnumType:au,initPartial(e,t){if(e===void 0)return;const n=t.getType();for(const a of n.fields.byMember()){const r=a.localName,s=t,i=e;if(i[r]!==void 0)switch(a.kind){case"oneof":const o=i[r].case;if(o===void 0)continue;const d=a.findField(o);let m=i[r].value;d&&d.kind=="message"&&!(m instanceof d.T)?m=new d.T(m):d&&d.kind==="scalar"&&d.T===D.BYTES&&(m=qt(m)),s[r]={case:o,value:m};break;case"scalar":case"enum":let p=i[r];a.T===D.BYTES&&(p=a.repeated?p.map(qt):qt(p)),s[r]=p;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===D.BYTES)for(const[k,S]of Object.entries(i[r]))s[r][k]=qt(S);else Object.assign(s[r],i[r]);break;case"message":const y=a.V.T;for(const k of Object.keys(i[r])){let S=i[r][k];y.fieldWrapper||(S=new y(S)),s[r][k]=S}break}break;case"message":const T=a.T;if(a.repeated)s[r]=i[r].map(y=>y instanceof T?y:new T(y));else if(i[r]!==void 0){const y=i[r];T.fieldWrapper?T.typeName==="google.protobuf.BytesValue"?s[r]=qt(y):s[r]=y:s[r]=y instanceof T?y:new T(y)}break}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(a=>{const r=t[a.localName],s=n[a.localName];if(a.repeated){if(r.length!==s.length)return!1;switch(a.kind){case"message":return r.every((i,o)=>a.T.equals(i,s[o]));case"scalar":return r.every((i,o)=>it(a.T,i,s[o]));case"enum":return r.every((i,o)=>it(D.INT32,i,s[o]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(r,s);case"enum":return it(D.INT32,r,s);case"scalar":return it(a.T,r,s);case"oneof":if(r.case!==s.case)return!1;const i=a.findField(r.case);if(i===void 0)return!0;switch(i.kind){case"message":return i.T.equals(r.value,s.value);case"enum":return it(D.INT32,r.value,s.value);case"scalar":return it(i.T,r.value,s.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const o=Object.keys(r).concat(Object.keys(s));switch(a.V.kind){case"message":const d=a.V.T;return o.every(p=>d.equals(r[p],s[p]));case"enum":return o.every(p=>it(D.INT32,r[p],s[p]));case"scalar":const m=a.V.T;return o.every(p=>it(m,r[p],s[p]))}break}})},clone(e){const t=e.getType(),n=new t,a=n;for(const r of t.fields.byMember()){const s=e[r.localName];let i;if(r.repeated)i=s.map(gn);else if(r.kind=="map"){i=a[r.localName];for(const[o,d]of Object.entries(s))i[o]=gn(d)}else r.kind=="oneof"?i=r.findField(s.case)?{case:s.case,value:gn(s.value)}:{case:void 0}:i=gn(s);a[r.localName]=i}return n}}}function gn(e){if(e===void 0)return e;if(e instanceof Ze)return e.clone();if(e instanceof Uint8Array){const t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function qt(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class Fg{constructor(t,n){this._fields=t,this._normalizer=n}findJsonName(t){if(!this.jsonNames){const n={};for(const a of this.list())n[a.jsonName]=n[a.name]=a;this.jsonNames=n}return this.jsonNames[t]}find(t){if(!this.numbers){const n={};for(const a of this.list())n[a.no]=a;this.numbers=n}return this.numbers[t]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((t,n)=>t.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const t=this.members;let n;for(const a of this.list())a.oneof?a.oneof!==n&&(n=a.oneof,t.push(n)):t.push(a)}return this.members}}function gu(e,t){const n=Tu(e);return t?n:Vg(Yg(n))}function zg(e){return gu(e,!1)}const Bg=Tu;function Tu(e){let t=!1;const n=[];for(let a=0;a<e.length;a++){let r=e.charAt(a);switch(r){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(r),t=!1;break;default:t&&(t=!1,r=r.toUpperCase()),n.push(r);break}}return n.join("")}const Gg=new Set(["constructor","toString","toJSON","valueOf"]),Qg=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),hu=e=>`${e}$`,Yg=e=>Qg.has(e)?hu(e):e,Vg=e=>Gg.has(e)?hu(e):e;class Wg{constructor(t){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this.name=t,this.localName=zg(t)}addField(t){Ae(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(t){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[t]}}const l=lg("proto3",Pg(),Cg(),Object.assign(Object.assign({},Ug()),{newFieldList(e){return new Fg(e,qg)},initFields(e){for(const t of e.getType().fields.byMember()){if(t.opt)continue;const n=t.localName,a=e;if(t.repeated){a[n]=[];continue}switch(t.kind){case"oneof":a[n]={case:void 0};break;case"enum":a[n]=0;break;case"map":a[n]={};break;case"scalar":a[n]=hr(t.T);break}}}}));function qg(e){var t,n,a;const r=[];let s;for(const i of typeof e=="function"?e():e){const o=i;if(o.localName=gu(i.name,i.oneof!==void 0),o.jsonName=(t=i.jsonName)!==null&&t!==void 0?t:Bg(i.name),o.repeated=(n=i.repeated)!==null&&n!==void 0?n:!1,o.packed=(a=i.packed)!==null&&a!==void 0?a:i.kind=="enum"||i.kind=="scalar"&&i.T!=D.BYTES&&i.T!=D.STRING,i.oneof!==void 0){const d=typeof i.oneof=="string"?i.oneof:i.oneof.name;(!s||s.name!=d)&&(s=new Wg(d)),o.oneof=s,s.addField(o)}r.push(o)}return r}var z;(function(e){e[e.Unary=0]="Unary",e[e.ServerStreaming=1]="ServerStreaming",e[e.ClientStreaming=2]="ClientStreaming",e[e.BiDiStreaming=3]="BiDiStreaming"})(z||(z={}));var Di;(function(e){e[e.NoSideEffects=1]="NoSideEffects",e[e.Idempotent=2]="Idempotent"})(Di||(Di={}));class $e extends Ze{constructor(t){super(),this.seconds=ke.zero,this.nanos=0,l.util.initPartial(t,this)}fromJson(t,n){if(typeof t!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${l.json.debug(t)}`);const a=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!a)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const r=Date.parse(a[1]+"-"+a[2]+"-"+a[3]+"T"+a[4]+":"+a[5]+":"+a[6]+(a[8]?a[8]:"Z"));if(Number.isNaN(r))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(r<Date.parse("0001-01-01T00:00:00Z")||r>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=ke.parse(r/1e3),this.nanos=0,a[7]&&(this.nanos=parseInt("1"+a[7]+"0".repeat(9-a[7].length))-1e9),this}toJson(t){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let a="Z";if(this.nanos>0){const r=(this.nanos+1e9).toString().substring(1);r.substring(3)==="000000"?a="."+r.substring(0,3)+"Z":r.substring(6)==="000"?a="."+r.substring(0,6)+"Z":a="."+r+"Z"}return new Date(n).toISOString().replace(".000Z",a)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return $e.fromDate(new Date)}static fromDate(t){const n=t.getTime();return new $e({seconds:ke.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(t,n){return new $e().fromBinary(t,n)}static fromJson(t,n){return new $e().fromJson(t,n)}static fromJsonString(t,n){return new $e().fromJsonString(t,n)}static equals(t,n){return l.util.equals($e,t,n)}}$e.runtime=l;$e.typeName="google.protobuf.Timestamp";$e.fields=l.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class He extends Ze{constructor(t){super(),this.typeUrl="",this.value=new Uint8Array(0),l.util.initPartial(t,this)}toJson(t){var n;if(this.typeUrl==="")return{};const a=this.typeUrlToName(this.typeUrl),r=(n=t==null?void 0:t.typeRegistry)===null||n===void 0?void 0:n.findMessage(a);if(!r)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=r.fromBinary(this.value).toJson(t);return(a.startsWith("google.protobuf.")||i===null||Array.isArray(i)||typeof i!="object")&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(t,n){var a;if(t===null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${t===null?"null":Array.isArray(t)?"array":typeof t}`);if(Object.keys(t).length==0)return this;const r=t["@type"];if(typeof r!="string"||r=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const s=this.typeUrlToName(r),i=(a=n==null?void 0:n.typeRegistry)===null||a===void 0?void 0:a.findMessage(s);if(!i)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${r} is not in the type registry`);let o;if(s.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(t,"value"))o=i.fromJson(t.value,n);else{const d=Object.assign({},t);delete d["@type"],o=i.fromJson(d,n)}return this.packFrom(o),this}packFrom(t){this.value=t.toBinary(),this.typeUrl=this.typeNameToUrl(t.getType().typeName)}unpackTo(t){return this.is(t.getType())?(t.fromBinary(this.value),!0):!1}unpack(t){if(this.typeUrl==="")return;const n=t.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(t){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let a="";return typeof t=="string"?a=t:a=t.typeName,n===a}typeNameToUrl(t){return`type.googleapis.com/${t}`}typeUrlToName(t){if(!t.length)throw new Error(`invalid type url: ${t}`);const n=t.lastIndexOf("/"),a=n>0?t.substring(n+1):t;if(!a.length)throw new Error(`invalid type url: ${t}`);return a}static pack(t){const n=new He;return n.packFrom(t),n}static fromBinary(t,n){return new He().fromBinary(t,n)}static fromJson(t,n){return new He().fromJson(t,n)}static fromJsonString(t,n){return new He().fromJsonString(t,n)}static equals(t,n){return l.util.equals(He,t,n)}}He.runtime=l;He.typeName="google.protobuf.Any";He.fields=l.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);var ae;(function(e){e[e.Canceled=1]="Canceled",e[e.Unknown=2]="Unknown",e[e.InvalidArgument=3]="InvalidArgument",e[e.DeadlineExceeded=4]="DeadlineExceeded",e[e.NotFound=5]="NotFound",e[e.AlreadyExists=6]="AlreadyExists",e[e.PermissionDenied=7]="PermissionDenied",e[e.ResourceExhausted=8]="ResourceExhausted",e[e.FailedPrecondition=9]="FailedPrecondition",e[e.Aborted=10]="Aborted",e[e.OutOfRange=11]="OutOfRange",e[e.Unimplemented=12]="Unimplemented",e[e.Internal=13]="Internal",e[e.Unavailable=14]="Unavailable",e[e.DataLoss=15]="DataLoss",e[e.Unauthenticated=16]="Unauthenticated"})(ae||(ae={}));function _i(e){const t=ae[e];return typeof t!="string"?e.toString():t[0].toLowerCase()+t.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class ye extends Error{constructor(t,n=ae.Unknown,a,r,s){super(Hg(t,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=t,this.code=n,this.metadata=new Headers(a??{}),this.details=r??[],this.cause=s}static from(t,n=ae.Unknown){return t instanceof ye?t:t instanceof Error?t.name=="AbortError"?new ye(t.message,ae.Canceled):new ye(t.message,n,void 0,void 0,t):new ye(String(t),n,void 0,void 0,t)}findDetails(t){const n="typeName"in t?{findMessage:r=>r===t.typeName?t:void 0}:t,a=[];for(const r of this.details){if(r instanceof Ze){n.findMessage(r.getType().typeName)&&a.push(r);continue}const s=n.findMessage(r.type);if(s)try{a.push(s.fromBinary(r.value))}catch{}}return a}}function Hg(e,t){return e.length?`[${_i(t)}] ${e}`:`[${_i(t)}]`}function Zg(e,t,n){try{const a=Fr.dec(e);return t?t.fromBinary(a,n):a}catch(a){throw ye.from(a,ae.DataLoss)}}function ku(e,t){const n={};for(const[a,r]of Object.entries(e.methods)){const s=t(Object.assign(Object.assign({},r),{localName:a,service:e}));s!=null&&(n[a]=s)}return n}function wi(e){let t,n=new Uint8Array(0);function a(r){const s=new Uint8Array(n.length+r.length);s.set(n),s.set(r,n.length),n=s}return new ReadableStream({start(){t=e.getReader()},async pull(r){let s;for(;;){if(s===void 0&&n.byteLength>=5){let d=0;for(let m=1;m<5;m++)d=(d<<8)+n[m];s={flags:n[0],length:d}}if(s!==void 0&&n.byteLength>=s.length+5)break;const o=await t.read();if(o.done)break;a(o.value)}if(s===void 0){if(n.byteLength==0){r.close();return}r.error(new ye("premature end of stream",ae.DataLoss));return}const i=n.subarray(5,5+s.length);n=n.subarray(5+s.length),r.enqueue({flags:s.flags,data:i})}})}function Ci(e,t){const n=new Uint8Array(t.length+5);n.set(t,5);const a=new DataView(n.buffer,n.byteOffset,n.byteLength);return a.setUint8(0,e),a.setUint32(1,t.length),n}var Kg=globalThis&&globalThis.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(s){n[s]=e[s]&&function(i){return new Promise(function(o,d){i=e[s](i),r(o,d,i.done,i.value)})}}function r(s,i,o,d){Promise.resolve(d).then(function(m){s({value:m,done:o})},i)}},un=globalThis&&globalThis.__await||function(e){return this instanceof un?(this.v=e,this):new un(e)},Jg=globalThis&&globalThis.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(e,t||[]),r,s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(y){a[y]&&(r[y]=function(k){return new Promise(function(S,b){s.push([y,k,S,b])>1||o(y,k)})})}function o(y,k){try{d(a[y](k))}catch(S){T(s[0][3],S)}}function d(y){y.value instanceof un?Promise.resolve(y.value.v).then(m,p):T(s[0][2],y)}function m(y){o("next",y)}function p(y){o("throw",y)}function T(y,k){y(k),s.shift(),s.length&&o(s[0][0],s[0][1])}},Xg=globalThis&&globalThis.__asyncDelegator||function(e){var t,n;return t={},a("next"),a("throw",function(r){throw r}),a("return"),t[Symbol.iterator]=function(){return this},t;function a(r,s){t[r]=e[r]?function(i){return(n=!n)?{value:un(e[r](i)),done:!1}:s?s(i):i}:s}};function Nu(e){return Jg(this,arguments,function*(){yield un(yield*Xg(Kg(e)))})}var e0=globalThis&&globalThis.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(s){n[s]=e[s]&&function(i){return new Promise(function(o,d){i=e[s](i),r(o,d,i.done,i.value)})}}function r(s,i,o,d){Promise.resolve(d).then(function(m){s({value:m,done:o})},i)}};function t0(e,t){return ku(e,n=>{switch(n.kind){case z.Unary:return n0(t,e,n);case z.ServerStreaming:return a0(t,e,n);default:return null}})}function n0(e,t,n){return function(a,r,s){const i=new AbortController;return s=Mu(i,s),e.unary(t,n,i.signal,s.timeoutMs,s.headers,a,s.contextValues).then(o=>{var d,m;(d=s==null?void 0:s.onHeader)===null||d===void 0||d.call(s,o.header),(m=s==null?void 0:s.onTrailer)===null||m===void 0||m.call(s,o.trailer),r(void 0,o.message)},o=>{const d=ye.from(o,ae.Internal);d.code===ae.Canceled&&i.signal.aborted||r(d,new n.O)}),()=>i.abort()}}function a0(e,t,n){return function(a,r,s,i){const o=new AbortController;async function d(){var m,p,T,y,k,S;i=Mu(o,i);const b=await e.stream(t,n,i.signal,i.timeoutMs,i.headers,Nu([a]),i.contextValues);(k=i.onHeader)===null||k===void 0||k.call(i,b.header);try{for(var R=!0,$=e0(b.message),_;_=await $.next(),m=_.done,!m;R=!0)y=_.value,R=!1,r(y)}catch(L){p={error:L}}finally{try{!R&&!m&&(T=$.return)&&await T.call($)}finally{if(p)throw p.error}}(S=i.onTrailer)===null||S===void 0||S.call(i,b.trailer),s(void 0)}return d().catch(m=>{const p=ye.from(m,ae.Internal);p.code===ae.Canceled&&o.signal.aborted?s(void 0):s(p)}),()=>o.abort()}}function Mu(e,t){return t!=null&&t.signal&&(t.signal.addEventListener("abort",()=>e.abort()),t.signal.aborted&&e.abort()),Object.assign(Object.assign({},t),{signal:e.signal})}var Iu=globalThis&&globalThis.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(s){n[s]=e[s]&&function(i){return new Promise(function(o,d){i=e[s](i),r(o,d,i.done,i.value)})}}function r(s,i,o,d){Promise.resolve(d).then(function(m){s({value:m,done:o})},i)}},Pt=globalThis&&globalThis.__await||function(e){return this instanceof Pt?(this.v=e,this):new Pt(e)},r0=globalThis&&globalThis.__asyncDelegator||function(e){var t,n;return t={},a("next"),a("throw",function(r){throw r}),a("return"),t[Symbol.iterator]=function(){return this},t;function a(r,s){t[r]=e[r]?function(i){return(n=!n)?{value:Pt(e[r](i)),done:!1}:s?s(i):i}:s}},s0=globalThis&&globalThis.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(e,t||[]),r,s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(y){a[y]&&(r[y]=function(k){return new Promise(function(S,b){s.push([y,k,S,b])>1||o(y,k)})})}function o(y,k){try{d(a[y](k))}catch(S){T(s[0][3],S)}}function d(y){y.value instanceof Pt?Promise.resolve(y.value.v).then(m,p):T(s[0][2],y)}function m(y){o("next",y)}function p(y){o("throw",y)}function T(y,k){y(k),s.shift(),s.length&&o(s[0][0],s[0][1])}};function Jn(e,t){return ku(e,n=>{switch(n.kind){case z.Unary:return i0(t,e,n);case z.ServerStreaming:return o0(t,e,n);case z.ClientStreaming:return l0(t,e,n);case z.BiDiStreaming:return u0(t,e,n);default:return null}})}function i0(e,t,n){return async function(a,r){var s,i;const o=await e.unary(t,n,r==null?void 0:r.signal,r==null?void 0:r.timeoutMs,r==null?void 0:r.headers,a,r==null?void 0:r.contextValues);return(s=r==null?void 0:r.onHeader)===null||s===void 0||s.call(r,o.header),(i=r==null?void 0:r.onTrailer)===null||i===void 0||i.call(r,o.trailer),o.message}}function o0(e,t,n){return function(a,r){return Su(e.stream(t,n,r==null?void 0:r.signal,r==null?void 0:r.timeoutMs,r==null?void 0:r.headers,Nu([a]),r==null?void 0:r.contextValues),r)}}function l0(e,t,n){return async function(a,r){var s,i,o,d,m,p;const T=await e.stream(t,n,r==null?void 0:r.signal,r==null?void 0:r.timeoutMs,r==null?void 0:r.headers,a,r==null?void 0:r.contextValues);(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,T.header);let y;try{for(var k=!0,S=Iu(T.message),b;b=await S.next(),s=b.done,!s;k=!0)d=b.value,k=!1,y=d}catch(R){i={error:R}}finally{try{!k&&!s&&(o=S.return)&&await o.call(S)}finally{if(i)throw i.error}}if(!y)throw new ye("protocol error: missing response message",ae.Internal);return(p=r==null?void 0:r.onTrailer)===null||p===void 0||p.call(r,T.trailer),y}}function u0(e,t,n){return function(a,r){return Su(e.stream(t,n,r==null?void 0:r.signal,r==null?void 0:r.timeoutMs,r==null?void 0:r.headers,a,r==null?void 0:r.contextValues),r)}}function Su(e,t){const n=function(){var a,r;return s0(this,arguments,function*(){const s=yield Pt(e);(a=t==null?void 0:t.onHeader)===null||a===void 0||a.call(t,s.header),yield Pt(yield*r0(Iu(s.message))),(r=t==null?void 0:t.onTrailer)===null||r===void 0||r.call(t,s.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function c0(...e){const t=new AbortController,n=e.filter(r=>r!==void 0).concat(t.signal);for(const r of n){if(r.aborted){a.apply(r);break}r.addEventListener("abort",a)}function a(){t.signal.aborted||t.abort(bu(this));for(const r of n)r.removeEventListener("abort",a)}return t}function d0(e){const t=new AbortController,n=()=>{t.abort(new ye("the operation timed out",ae.DeadlineExceeded))};let a;return e!==void 0&&(e<=0?n():a=setTimeout(n,e)),{signal:t.signal,cleanup:()=>clearTimeout(a)}}function bu(e){if(!e.aborted)return;if(e.reason!==void 0)return e.reason;const t=new Error("This operation was aborted");return t.name="AbortError",t}function Ri(){return{get(e){return e.id in this?this[e.id]:e.defaultValue},set(e,t){return this[e.id]=t,this},delete(e){return delete this[e.id],this}}}const Ma=128;function ji(e){const t=new Headers,n=new TextDecoder().decode(e).split(`\r
38
- `);for(const a of n){if(a==="")continue;const r=a.indexOf(":");if(r>0){const s=a.substring(0,r).trim(),i=a.substring(r+1).trim();t.append(s,i)}}return t}const m0="Content-Type",f0="Grpc-Timeout",$u="Grpc-Status",vu="Grpc-Message",p0="Grpc-Status-Details-Bin",y0="User-Agent",g0="X-User-Agent",T0="X-Grpc-Web",h0="application/grpc-web+proto",k0="application/grpc-web+json";class et extends Ze{constructor(t){super(),this.code=0,this.message="",this.details=[],l.util.initPartial(t,this)}static fromBinary(t,n){return new et().fromBinary(t,n)}static fromJson(t,n){return new et().fromJson(t,n)}static fromJsonString(t,n){return new et().fromJsonString(t,n)}static equals(t,n){return l.util.equals(et,t,n)}}et.runtime=l;et.typeName="google.rpc.Status";et.fields=l.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:He,repeated:!0}]);const N0="0";function Au(e){var t;const n=e.get(p0);if(n!=null){const r=Zg(n,et);if(r.code==0)return;const s=new ye(r.message,r.code,e);return s.details=r.details.map(i=>({type:i.typeUrl.substring(i.typeUrl.lastIndexOf("/")+1),value:i.value})),s}const a=e.get($u);if(a!=null){if(a===N0)return;const r=parseInt(a,10);return r in ae?new ye(decodeURIComponent((t=e.get(vu))!==null&&t!==void 0?t:""),r,e):new ye(`invalid grpc-status: ${a}`,ae.Internal,e)}}function xi(e,t,n){const a=typeof t=="string"?t:t.typeName,r=typeof n=="string"?n:n.name;return e.toString().replace(/\/?$/,`/${a}/${r}`)}function Eu(e,t){return t instanceof Ze?t:new e(t)}function M0(e,t){function n(a){return a.done===!0?a:{done:a.done,value:Eu(e,a.value)}}return{[Symbol.asyncIterator](){const a=t[Symbol.asyncIterator](),r={next:()=>a.next().then(n)};return a.throw!==void 0&&(r.throw=s=>a.throw(s).then(n)),a.return!==void 0&&(r.return=s=>a.return(s).then(n)),r}}}function I0(e){var t;const n=Object.assign({},e);return(t=n.ignoreUnknownFields)!==null&&t!==void 0||(n.ignoreUnknownFields=!0),n}function Li(e,t,n,a){const r=t?Pi(e.I,a):Ui(e.I,n);return{parse:(t?Pi(e.O,a):Ui(e.O,n)).parse,serialize:r.serialize}}function Pi(e,t){return{parse(n){try{return e.fromBinary(n,t)}catch(a){const r=a instanceof Error?a.message:String(a);throw new ye(`parse binary: ${r}`,ae.InvalidArgument)}},serialize(n){try{return n.toBinary(t)}catch(a){const r=a instanceof Error?a.message:String(a);throw new ye(`serialize binary: ${r}`,ae.Internal)}}}}function Ui(e,t){var n,a;const r=(n=t==null?void 0:t.textEncoder)!==null&&n!==void 0?n:new TextEncoder,s=(a=t==null?void 0:t.textDecoder)!==null&&a!==void 0?a:new TextDecoder,i=I0(t);return{parse(o){try{const d=s.decode(o);return e.fromJsonString(d,i)}catch(d){throw ye.from(d,ae.InvalidArgument)}},serialize(o){try{const d=o.toJsonString(i);return r.encode(d)}catch(d){throw ye.from(d,ae.Internal)}}}}function S0(e){const t=Du(e.next,e.interceptors),[n,a,r]=Ou(e),s=Object.assign(Object.assign({},e.req),{message:Eu(e.req.method.I,e.req.message),signal:n});return t(s).then(i=>(r(),i),a)}function b0(e){const t=Du(e.next,e.interceptors),[n,a,r]=Ou(e),s=Object.assign(Object.assign({},e.req),{message:M0(e.req.method.I,e.req.message),signal:n});let i=!1;return n.addEventListener("abort",function(){var o,d;const m=e.req.message[Symbol.asyncIterator]();i||(o=m.throw)===null||o===void 0||o.call(m,this.reason).catch(()=>{}),(d=m.return)===null||d===void 0||d.call(m).catch(()=>{})}),t(s).then(o=>Object.assign(Object.assign({},o),{message:{[Symbol.asyncIterator](){const d=o.message[Symbol.asyncIterator]();return{next(){return d.next().then(m=>(m.done==!0&&(i=!0,r()),m),a)}}}}}),a)}function Ou(e){const{signal:t,cleanup:n}=d0(e.timeoutMs),a=c0(e.signal,t);return[a.signal,function(s){const i=ye.from(t.aborted?bu(t):s);return a.abort(i),n(),Promise.reject(i)},function(){n(),a.abort()}]}function Du(e,t){var n;return(n=t==null?void 0:t.concat().reverse().reduce((a,r)=>r(a),e))!==null&&n!==void 0?n:e}function $0(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Fi(e){const t=Au(e);if(t)throw t}function zi(e,t,n){const a=new Headers(n??{});return a.set(m0,e?h0:k0),a.set(T0,"1"),a.set(g0,"connect-es/1.1.2"),a.set(y0,"connect-es/1.1.2"),t!==void 0&&a.set(f0,`${t}m`),a}function v0(e){switch(e){case 400:return ae.Internal;case 401:return ae.Unauthenticated;case 403:return ae.PermissionDenied;case 404:return ae.Unimplemented;case 429:return ae.Unavailable;case 502:return ae.Unavailable;case 503:return ae.Unavailable;case 504:return ae.Unavailable;default:return ae.Unknown}}function Bi(e,t){var n;if(e>=200&&e<300){const a=Au(t);if(a)throw a;return{foundStatus:t.has($u)}}throw new ye(decodeURIComponent((n=t.get(vu))!==null&&n!==void 0?n:`HTTP ${e}`),v0(e),t)}var yt=globalThis&&globalThis.__await||function(e){return this instanceof yt?(this.v=e,this):new yt(e)},A0=globalThis&&globalThis.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(e,t||[]),r,s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(y){a[y]&&(r[y]=function(k){return new Promise(function(S,b){s.push([y,k,S,b])>1||o(y,k)})})}function o(y,k){try{d(a[y](k))}catch(S){T(s[0][3],S)}}function d(y){y.value instanceof yt?Promise.resolve(y.value.v).then(m,p):T(s[0][2],y)}function m(y){o("next",y)}function p(y){o("throw",y)}function T(y,k){y(k),s.shift(),s.length&&o(s[0][0],s[0][1])}};function Xn(e){var t;$0();const n=(t=e.useBinaryFormat)!==null&&t!==void 0?t:!0;return{async unary(a,r,s,i,o,d,m){var p;const{serialize:T,parse:y}=Li(r,n,e.jsonOptions,e.binaryOptions);return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,await S0({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!1,service:a,method:r,url:xi(e.baseUrl,a,r),init:{method:"POST",credentials:(p=e.credentials)!==null&&p!==void 0?p:"same-origin",redirect:"error",mode:"cors"},header:zi(n,i,o),contextValues:m??Ri(),message:d},next:async k=>{var S;const R=await((S=e.fetch)!==null&&S!==void 0?S:globalThis.fetch)(k.url,Object.assign(Object.assign({},k.init),{headers:k.header,signal:k.signal,body:Ci(0,T(k.message))}));if(Bi(R.status,R.headers),!R.body)throw"missing response body";const $=wi(R.body).getReader();let _,L;for(;;){const P=await $.read();if(P.done)break;const{flags:F,data:B}=P.value;if(F===Ma){if(_!==void 0)throw"extra trailer";_=ji(B);continue}if(L!==void 0)throw"extra message";L=y(B)}if(_===void 0)throw"missing trailer";if(Fi(_),L===void 0)throw"missing message";return{stream:!1,header:R.headers,message:L,trailer:_}}})},async stream(a,r,s,i,o,d,m){var p;const{serialize:T,parse:y}=Li(r,n,e.jsonOptions,e.binaryOptions);function k(b,R,$){return A0(this,arguments,function*(){const L=wi(b).getReader();if(R){if(!(yield yt(L.read())).done)throw"extra data for trailers-only";return yield yt(void 0)}let P=!1;for(;;){const F=yield yt(L.read());if(F.done)break;const{flags:B,data:U}=F.value;if((B&Ma)===Ma){if(P)throw"extra trailer";P=!0;const V=ji(U);Fi(V),V.forEach((q,J)=>$.set(J,q));continue}if(P)throw"extra message";yield yield yt(y(U))}if(!P)throw"missing trailer"})}async function S(b){if(r.kind!=z.ServerStreaming)throw"The fetch API does not support streaming request bodies";const R=await b[Symbol.asyncIterator]().next();if(R.done==!0)throw"missing request message";return Ci(0,T(R.value))}return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,b0({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!0,service:a,method:r,url:xi(e.baseUrl,a,r),init:{method:"POST",credentials:(p=e.credentials)!==null&&p!==void 0?p:"same-origin",redirect:"error",mode:"cors"},header:zi(n,i,o),contextValues:m??Ri(),message:d},next:async b=>{var R;const _=await((R=e.fetch)!==null&&R!==void 0?R:globalThis.fetch)(b.url,Object.assign(Object.assign({},b.init),{headers:b.header,signal:b.signal,body:await S(b.message)})),{foundStatus:L}=Bi(_.status,_.headers);if(!_.body)throw"missing response body";const P=new Headers;return Object.assign(Object.assign({},b),{header:_.headers,trailer:P,message:k(_.body,L,P)})}})}}}const E0=l.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),O0=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),D0=l.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:O0},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const _0=l.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:l.getEnumType(E0)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),w0=l.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:_0}]),zr=l.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:D0}]);l.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:w0}]);const C0=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),R0=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:j0},{no:2,name:"data",kind:"message",T:zr}]),j0=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),x0=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),L0=l.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),P0=l.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:L0}]),U0=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),F0=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),z0=l.makeMessageType("streamlayer.users.MeRequest",[]),B0=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:zr}]),G0=l.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Q0=l.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),Y0=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),V0=l.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),W0=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),q0=l.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),H0=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Z0=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),K0=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:J0}]),J0=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),X0=l.makeMessageType("streamlayer.users.InviteResponse",[]),e1=l.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),t1=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:n1},{no:2,name:"data",kind:"message",T:zr,opt:!0}]),n1=l.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Br={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:C0,O:R0,kind:z.Unary},register:{name:"Register",I:x0,O:P0,kind:z.Unary},requestPassword:{name:"RequestPassword",I:U0,O:F0,kind:z.Unary},me:{name:"Me",I:z0,O:B0,kind:z.Unary},invite:{name:"Invite",I:K0,O:X0,kind:z.Unary},bypassAuth:{name:"BypassAuth",I:e1,O:t1,kind:z.Unary},updateMetadata:{name:"UpdateMetadata",I:G0,O:Z0,kind:z.Unary},updateAvatar:{name:"UpdateAvatar",I:Q0,O:Y0,kind:z.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:V0,O:W0,kind:z.Unary},updatePublicName:{name:"UpdatePublicName",I:q0,O:H0,kind:z.Unary}}},a1=async(e,t)=>{const n=Xn({baseUrl:e});return await Jn(Br,n).requestPassword({id:t}),!0},r1=async(e,t)=>{const n=Xn({baseUrl:e});return await Jn(Br,n).register({id:t}),!0},s1=async(e,t,n)=>{var i;const a=Xn({baseUrl:e}),s=await Jn(Br,a).login({id:t,password:n});return(i=s==null?void 0:s.meta)==null?void 0:i.jwt};const i1=v("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Gi=v("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),Qi=v("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Ia=v("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Sa=v("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),o1=v("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),l1=v("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),u1=({login:e,anonymousLogin:t,host:n})=>{const[a,r]=C.useState(""),[s,i]=C.useState(""),[o,d]=C.useState(""),m=Lc({acceptedCharacters:/^[0-9]$/,length:4,value:o,onChange:d}),p=async y=>{y.preventDefault();try{const k=a.replaceAll("+","");try{await a1(n,k)}catch{await r1(n,k)}i(k)}catch(k){window.alert(k)}},T=async y=>{if(y.preventDefault(),s&&o)try{const k=await s1(n,s,o);k&&e?await e(k):console.log("token",k)}catch(k){window.alert(k)}};return h.jsxs(i1,{children:[!s&&h.jsxs("div",{children:[h.jsxs(Gi,{onSubmit:p,children:[h.jsx(Qi,{children:"Enter your phone number"}),h.jsx(Ia,{children:"Enter your phone up for number to log in or sign an account."}),h.jsx(o1,{children:h.jsx(Py,{value:a,onChange:y=>r(`${y}`)})}),h.jsx(Sa,{disabled:!Fy(a),type:"submit",children:"request code"})]}),t&&h.jsx(Sa,{style:{display:"block",margin:"auto"},onClick:t,children:"anonymous login"})]}),s&&h.jsxs(Gi,{onSubmit:T,children:[h.jsx(Qi,{children:"Enter Verification Code"}),h.jsxs(Ia,{children:["Please enter the verification code ",h.jsx("br",{}),"sent to ",h.jsx("b",{children:Uy(a)})]}),h.jsxs(l1,{children:[h.jsx("input",{autoFocus:!0,inputMode:"decimal",...m[0]}),h.jsx("input",{inputMode:"decimal",...m[1]}),h.jsx("input",{inputMode:"decimal",...m[2]}),h.jsx("input",{inputMode:"decimal",...m[3]})]}),h.jsx(Sa,{disabled:o.length!==4,type:"submit",children:"login"}),h.jsxs(Ia,{children:["Didn't get 59 the code? ",h.jsx("br",{}),"Resend Code in",h.jsx(eu,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const c1=v("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),d1=v("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),m1=v("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),f1=v("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),p1=v("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),y1=v("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),g1=v("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),T1=v("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),h1=v("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),k1=v("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const N1=v("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),M1=v("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),I1=v("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),S1=v("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),b1=({graphic:e,headline:t})=>h.jsx(N1,{children:h.jsxs(M1,{children:[h.jsx(I1,{alt:"graphic-img-instrucrions",src:e}),h.jsx(S1,{children:t})]})});const $1=v("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),v1=v("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),A1=v("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),E1=v("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),O1=v("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),D1=v("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),_1=({rules:e,rulesTitle:t,primaryColor:n})=>h.jsxs($1,{children:[h.jsx(v1,{children:t}),h.jsx(A1,{children:e==null?void 0:e.map((a,r)=>h.jsxs(E1,{children:[h.jsx(O1,{style:{backgroundColor:n},children:r+1}),h.jsx(D1,{children:a})]},r))})]}),w1="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const C1=v("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),R1=v("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),j1=v("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),x1=v("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),L1=v("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),P1=v("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),U1=v("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),F1=({inviteCardTitle:e,inviteCardSubtext:t,primaryColor:n})=>h.jsx(C1,{children:h.jsxs(R1,{children:[h.jsx(j1,{style:{backgroundColor:n},children:h.jsx(x1,{alt:"invite-game-icon",src:w1})}),h.jsx(L1,{children:e||""}),h.jsx(P1,{children:t||""}),h.jsx(U1,{onClick:()=>{},style:{backgroundColor:n},children:"Invite friends!"})]})}),vt={steps:!1,rules:!1,inviteCard:!1},z1=({gamification:e,closeFeature:t,steps:n,gameIcon:a,sponsorLogo:r,rules:s,rulesBtnLabel:i,rulesTitle:o,primaryColor:d,inviteCardTitle:m,inviteCardSubtext:p,inviteCardBtnLabel:T})=>{const y=async()=>{await e.submitInplay()},k=()=>{t()},[S,b]=C.useState(0),[R,$]=C.useState(vt);C.useEffect(()=>{n!=null&&n.length?$({...vt,steps:!0}):s!=null&&s.length?$({...vt,rules:!0}):$({...vt,inviteCard:!0})},[]);const _=C.useCallback(()=>{n!=null&&n.length&&S<n.length-1?b(L=>++L):s!=null&&s.length&&R.steps?$({...vt,rules:!0}):R.rules&&$({...vt,inviteCard:!0})},[S,n==null?void 0:n.length,s==null?void 0:s.length,R,b,$]);return h.jsxs(c1,{children:[h.jsxs(m1,{children:[h.jsx(f1,{children:a&&h.jsx(y1,{alt:"sponsor-one-onboarding-icon",src:a})}),h.jsxs(p1,{children:[r&&h.jsx(g1,{alt:"sponsor-two-onboarding-icon",src:r}),h.jsx(T1,{onClick:k,children:h.jsx(h1,{alt:"icon-close-onboarding",src:Cr})})]})]}),h.jsxs(d1,{children:[R.steps&&(n==null?void 0:n.length)&&h.jsx(b1,{graphic:n[S].graphic,headline:n[S].headline}),R.rules&&h.jsx(_1,{rules:s,rulesTitle:o,primaryColor:d}),R.inviteCard&&h.jsx(F1,{inviteCardTitle:m,inviteCardSubtext:p,primaryColor:d})]}),h.jsx(k1,{onClick:R.inviteCard?y:_,children:R.rules?i||"Got it!":R.inviteCard?T||"Play now!":"Next"})]})},Ce=l.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),B1=l.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),kt=l.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),G1=l.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),Q1=l.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),cn=l.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),_u=l.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),Y1=l.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),V1=l.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),W1=l.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),q1=l.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),H1=l.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Z1=l.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),K1=l.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),Gr=l.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:l.getEnumType(Q1)},{no:2,name:"images",kind:"enum",T:l.getEnumType(cn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:l.getEnumType(G1)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Bt=l.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ea=l.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:l.getEnumType(_u)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),J1=l.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),X1=l.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),lt=l.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),eT=l.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),tT=l.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),nT=l.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),aT=l.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:nT}]),Qr=l.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:rT,oneof:"options"},{no:2,name:"trivia",kind:"message",T:sT,oneof:"options"},{no:3,name:"prediction",kind:"message",T:iT,oneof:"options"},{no:4,name:"factoid",kind:"message",T:oT,oneof:"options"},{no:5,name:"tweet",kind:"message",T:lT,oneof:"options"},{no:6,name:"promotion",kind:"message",T:cT,oneof:"options"}]),rT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),sT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:lt},{no:2,name:"incorrect_feedback",kind:"message",T:lt},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),iT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:lt},{no:2,name:"incorrect_feedback",kind:"message",T:lt}],{localName:"QuestionOptions_PredictionOptions"}),oT=l.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:eT},{no:4,name:"web_link",kind:"message",T:tT}],{localName:"QuestionOptions_FactoidOptions"}),lT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:uT}],{localName:"QuestionOptions_TweetOptions"}),uT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),cT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Y1)},{no:2,name:"sponsor",kind:"message",T:Bt},{no:3,name:"banner",kind:"message",T:aT},{no:4,name:"enable_wallet",kind:"enum",T:l.getEnumType(V1)}],{localName:"QuestionOptions_PromotionOptions"}),dT=l.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),mT=l.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),wu=l.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Qr},{no:5,name:"appearance",kind:"message",T:Gr},{no:6,name:"sponsorship",kind:"message",T:Bt},{no:7,name:"notification",kind:"message",T:ea},{no:8,name:"answers",kind:"message",T:J1,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:$e},{no:17,name:"tags",kind:"message",T:dT,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Wr},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:l.getEnumType(B1)},{no:22,name:"ai",kind:"message",T:mT}]),Yr=l.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Qr},{no:5,name:"appearance",kind:"message",T:Gr},{no:6,name:"sponsorship",kind:"message",T:Bt},{no:7,name:"notification",kind:"message",T:ea},{no:8,name:"answers",kind:"message",T:X1,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:Wr}]);l.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:6,name:"options",kind:"message",T:Qr},{no:7,name:"notification",kind:"message",T:ea}]);const Cu=l.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:Bt},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:fT},{no:6,name:"sponsors",kind:"message",T:gT},{no:7,name:"notification",kind:"message",T:TT},{no:8,name:"activated_at",kind:"message",T:$e},{no:9,name:"deactivated_at",kind:"message",T:$e},{no:10,name:"question_auto_post",kind:"message",T:hT},{no:11,name:"bypass_notifications",kind:"message",T:Wr},{no:12,name:"importer_collaboration",kind:"message",T:AT}]),fT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:Gr},{no:2,name:"trivia",kind:"message",T:pT},{no:3,name:"prediction",kind:"message",T:yT},{no:4,name:"correct_feedbacks",kind:"message",T:lt,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:lt,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),pT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),yT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),gT=l.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Bt,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),TT=l.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:l.getEnumType(_u)},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}],{localName:"EventModeration_NotificationSettings"}),hT=l.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:l.getEnumType(W1)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:$e},{no:4,name:"start_mode",kind:"enum",T:l.getEnumType(q1)},{no:5,name:"start_options",kind:"message",T:kT}]),kT=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:NT,oneof:"options"}]),NT=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});l.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Vr=l.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]),MT=l.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:IT},{no:3,name:"statistics",kind:"message",T:ST,repeated:!0}]);const IT=l.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:l.getEnumType(kt)}],{localName:"QuestionStats_QuestionData"}),ST=l.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:bT}]),bT=l.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});l.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Wr=l.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:l.getEnumType(Z1)}]),$T=l.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),vT=l.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:l.getEnumType(K1)},{no:3,name:"errors",kind:"message",T:$T,repeated:!0},{no:4,name:"last_updated",kind:"message",T:$e}]),AT=l.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:vT}}]),Zt=l.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),Ru=l.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:wu},{no:2,name:"notification",kind:"message",T:ea},{no:3,name:"moderation",kind:"message",T:Cu}]),ET=l.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),OT=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:DT}]),DT=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ru}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),_T=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),wT=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:CT}]),CT=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),RT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Yr}]),jT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),xT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:LT}]),LT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:RT}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),PT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Yr}]),UT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),FT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:zT}]),zT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:PT}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),BT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:GT}]),GT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),QT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:YT}]),YT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ru}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),VT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),WT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:qT}]),qT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:wu}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),HT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ZT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:KT}]),KT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Yr}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),qr=l.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]),JT=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:XT}]),XT=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"}),e2=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:t2}]),t2=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),n2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:a2}]),a2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),r2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),s2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:i2}]),i2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:l.getEnumType(H1)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),o2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:l2}]),l2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),u2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:l.getEnumType(Ce),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Vr}]),c2=l.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:l.getEnumType(Zt)},{no:4,name:"question_type",kind:"enum",T:l.getEnumType(Ce)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:l.getEnumType(kt)}]),d2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:m2,repeated:!0},{no:2,name:"meta",kind:"message",T:f2}]),m2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:c2}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),f2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"}),p2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),y2=l.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),g2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:T2,repeated:!0}]),T2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:y2}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),h2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),k2=l.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]),N2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:M2,repeated:!0}]),M2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:k2}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),I2=l.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:S2},{no:3,name:"moderation",kind:"message",T:Cu}]),S2=l.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),b2=l.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),$2=l.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:v2}]),v2=l.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:I2}],{localName:"GetResponse_GetResponseData"}),A2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),E2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]),O2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:D2,repeated:!0}]),D2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:E2}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),_2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),w2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),C2=l.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),R2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:w2},{no:6,name:"appearance",kind:"message",T:_2},{no:7,name:"prizes",kind:"message",T:C2,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),j2=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),x2=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),L2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:j2},{no:7,name:"appearance",kind:"message",T:x2},{no:8,name:"completed",kind:"scalar",T:8}]),P2=l.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),U2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:P2,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),F2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),z2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),B2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:R2},{no:2,name:"title_card",kind:"message",T:L2},{no:3,name:"onboarding",kind:"message",T:U2},{no:4,name:"rules",kind:"message",T:F2},{no:5,name:"invite_card",kind:"message",T:z2},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),G2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:lt,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:lt,repeated:!0}]),Q2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),Y2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:Bt,repeated:!0}]),V2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:G2},{no:2,name:"notifications",kind:"message",T:Q2},{no:3,name:"sponsorships",kind:"message",T:Y2}]),ot=l.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),W2=l.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),q2=l.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),Hr=l.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),H2=l.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),ju=l.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Z2=l.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),K2=l.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),J2=l.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);l.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const X2=l.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),eh=l.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:l.getEnumType(W2)}]),th=l.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),xu=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:nh}]),nh=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),Yi=l.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:eh,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:l.getEnumType(q2)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:th}]),ah=l.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ju)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:l.getEnumType(Hr)}]),Ln=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:l.getEnumType(Hr)},{no:5,name:"is_default",kind:"enum",T:l.getEnumType(H2)}]),rh=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ju)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:l.getEnumType(Hr)},{no:5,name:"default_channel",kind:"message",T:Ln},{no:6,name:"channels",kind:"message",T:Ln,repeated:!0}]),Lu=l.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:xu},{no:10,name:"getstream",kind:"message",T:rh}]),sh=l.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:ih,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),ih=l.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Pu=l.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:xu},{no:13,name:"pub",kind:"message",T:sh},{no:14,name:"getstream",kind:"message",T:ah}]),oh=l.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:B2},{no:2,name:"moderation",kind:"message",T:V2},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:l.getEnumType(Z2)}]),Vi=l.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Ln},{no:2,name:"channels",kind:"message",T:Ln,repeated:!0}]),wt=l.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:X2,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:Yi,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:Yi,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:oh,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Vi,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Vi,oneof:"overlay_settings"}]),lh=l.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:wt},{no:2,name:"global_preset",kind:"message",T:wt},{no:3,name:"preset",kind:"message",T:wt},{no:4,name:"stream",kind:"message",T:wt}]),ta=l.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(ot)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:wt},{no:6,name:"meta",kind:"message",T:lh},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);l.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(ot)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:wt},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:uh}]);const uh=l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:ta,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ch}]);const ch=l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:dh}]);const dh=l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:mh}]);const mh=l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);l.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:ph},{no:3,name:"settings",kind:"message",T:fh}]);const fh=l.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"advertising",kind:"message",T:Uu}]),ph=l.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:l.getEnumType(K2)},{no:2,name:"value",kind:"scalar",T:9}]),yh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Wi},{no:2,name:"videos",kind:"message",T:Wi}]),Wi=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),gh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:yh}}]);l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:gh,repeated:!0}]);const Th=l.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:l.getEnumType(J2)}]),hh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),kh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Th,repeated:!0},{no:3,name:"videos",kind:"message",T:hh,repeated:!0}]),Nh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:l.getEnumType(ot)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:kh}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Uu=l.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:Nh}}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Mh}]);const Mh=l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Ih}]);const Ih=l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Sh}]);const Sh=l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:bh}]);const bh=l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"}),$h="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",vh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Ah="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Eh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Oh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",qi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Dh=v("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),_h=v("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),wh=v("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),Ch=v("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),Rh=v("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),jh=v("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),xh=v("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Lh=v("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),Ph=v("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Uh=v("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),Fh=v("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),zh={[Ce.POLL]:{label:"Poll",icon:$h},[Ce.TRIVIA]:{label:"Trivia",icon:Ah},[Ce.PREDICTION]:{label:"Prediction",icon:vh}},Bh={[Zt.LOST]:Oh,[Zt.WON]:Eh,[Zt.UNSET]:qi,[Zt.DNP]:qi},Gh=({questionId:e,questionType:t,questionStatus:n,subject:a,openForVoting:r,openQuestion:s,status:i})=>{const o=zh[t];return o===void 0?null:h.jsxs(Dh,{onClick:()=>s==null?void 0:s(e),children:[h.jsx(_h,{children:h.jsx(wh,{alt:"question-type-icon",src:o.icon})}),h.jsxs(Ch,{children:[h.jsxs(Rh,{children:[h.jsx(Uh,{children:o.label}),t===Ce.TRIVIA&&n===kt.RESOLVED&&h.jsx(Fh,{children:"Expired"})]}),h.jsx(jh,{children:a||""})]}),r?h.jsx(xh,{children:"play"}):h.jsx(Lh,{children:h.jsx(Ph,{alt:"question-status-icon",src:Bh[i]})})]})};const Qh=v("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),Yh=v("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),Vh=v("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Wh=({questions:e,openQuestion:t})=>h.jsxs(Qh,{children:[h.jsx(Yh,{children:"PICK HISTORY"}),h.jsx(Vh,{children:e==null?void 0:e.map(n=>h.jsx(Gh,{openQuestion:t,...n},n.questionId))})]}),qh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Hh=e=>e.split(/\s+/).map(t=>t[0]).join("").toUpperCase();const Zh=v("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),Kh=v("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),Tn=({indicator:e,title:t})=>h.jsxs(Zh,{children:[h.jsx(Kh,{children:e}),h.jsx("p",{children:t})]});const Jh=v("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Xh=v("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),e3=v("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Hi=({indicator:e,title:t})=>h.jsxs(Jh,{children:[h.jsx(Xh,{children:t}),h.jsx(e3,{children:e})]});const t3=v("div")({name:"Container",class:"canai20",propsAsIs:!1}),n3=v("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),a3=v("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),r3=v("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),s3=v("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),i3=v("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),o3=v("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),l3=v("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),u3=v("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),c3=v("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),d3=v("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),m3=v("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),f3=v("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),p3=v("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),y3=v("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),g3=({avatar:e,name:t,points:n,grade:a,friendsRank:r,globalRank:s,winStreak:i,correct:o,incorrect:d,successRate:m})=>h.jsxs(t3,{children:[h.jsxs(n3,{children:[h.jsxs(r3,{children:[h.jsxs(y3,{children:[e&&h.jsx(s3,{alt:"avatar",src:e}),!e&&h.jsx(p3,{children:Hh(t)})]}),h.jsxs(i3,{children:[h.jsx(o3,{children:t}),h.jsxs(l3,{children:[h.jsx(u3,{alt:"rank-icon",src:qh}),h.jsxs(c3,{children:[h.jsx(d3,{children:n||"-"}),"RTS"]}),h.jsxs(m3,{children:["TOP ",a,"%"]})]})]})]}),h.jsxs(f3,{children:[h.jsx(Hi,{title:"Friens rank",indicator:r||"-"}),h.jsx(Hi,{title:"Global rank",indicator:s||"-"})]})]}),h.jsxs(a3,{children:[h.jsx(Tn,{indicator:i||"-",title:"Win streak"}),h.jsx(Tn,{indicator:o||"-",title:"Correct"}),h.jsx(Tn,{indicator:d||"-",title:"Incorrect"}),h.jsx(Tn,{indicator:`${m||"-"}%`,title:"Success rate"})]})]}),Nr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",T3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Zi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Fu=v("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),h3=()=>Fu,k3=v(h3())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Ki=v("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Ji=v("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),Xi=v("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),eo=v("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),to=v("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),no=v("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),ao=v("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),ro=v("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),N3=({icon:e,id:t,title:n,questionId:a,disabled:r,percentage:s,onVote:i,toggleIsLoadingSubmitAnswer:o,correct:d,questionAnswered:m,hasCorrectAnswer:p,answered:T})=>m&&T?h.jsxs(k3,{"data-answeredCorrect":(!p||d).toString(),"data-questionAnswered":"false",children:[h.jsx(Ki,{style:{width:`${s}%`}}),h.jsxs(Ji,{disabled:r,onClick:()=>i(a,t),children:[e&&h.jsx(Xi,{alt:"option-icon",src:e}),h.jsx(eo,{children:n}),h.jsxs(to,{children:[p&&d&&h.jsx(no,{children:h.jsx(ro,{alt:"icon-correct",src:T?Zi:Nr})}),h.jsxs(ao,{children:[s,"%"]})]})]})]}):h.jsxs(Fu,{"data-questionAnswered":m.toString(),children:[m&&h.jsx(Ki,{style:{width:`${s}%`}}),h.jsxs(Ji,{disabled:r,onClick:()=>{o(!0),i(a,t)},children:[e&&h.jsx(Xi,{alt:"option-icon",src:e}),h.jsx(eo,{children:n}),m&&h.jsxs(to,{children:[p&&d&&h.jsx(no,{children:h.jsx(ro,{alt:"icon-correct",src:T?Zi:Nr})}),h.jsxs(ao,{children:[s,"%"]})]})]})]});const M3=v("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),I3=v("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),S3=v("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),b3=v("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),$3=v("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),v3=v("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),A3=v("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),E3=v("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),O3=({title:e,questionId:t,options:n,questionAnswered:a,feedbackMessages:r,questionAnsweredCorrectly:s,questionType:i})=>{const[o,d]=C.useState(!1),m=C.useCallback(p=>{d(p)},[d]);return C.useEffect(()=>{m(!1)},[n,m]),h.jsxs(M3,{children:[h.jsx(I3,{children:e}),h.jsxs(S3,{children:[o&&h.jsx(b3,{children:"Loading..."}),n.map(p=>h.jsx(N3,{toggleIsLoadingSubmitAnswer:m,questionId:t,...p},p.id))]}),a&&i===Ce.TRIVIA&&h.jsxs($3,{children:[h.jsx(v3,{alt:"reaction-to-answer",src:s?Nr:T3}),h.jsxs("div",{children:[h.jsx(A3,{children:s?r.correctFeedback.title:r.incorrectFeedback.title}),h.jsx(E3,{children:s?r.correctFeedback.description:r.incorrectFeedback.description})]})]})]})};class D3{}window.storeLogger=Object.create(null);class na{constructor(t,n){A(this,"store");A(this,"name");this.store=t,this.name=n}getStore(){return this.store}}const _3=e=>{const t=Object.keys(e);return De.computed(t.map(n=>e[n].getStore()),(...n)=>Object.fromEntries(t.map((a,r)=>[a,n[r]])))};class en extends na{constructor(){super(...arguments);A(this,"getValues",()=>this.getStore().get());A(this,"getValue",n=>this.getStore().get()[n]);A(this,"setValue",(n,a)=>this.getStore().setKey(n,a));A(this,"subscribe",(...n)=>this.getStore().subscribe(...n));A(this,"unsubscribe",()=>this.getStore().off())}}const tn=e=>De.map(e);var jt=(e=>(e.ORGANIZATION="ORGANIZATION",e.STREAM="STREAM",e))(jt||{});const w3={[ot.BETTING]:"betting",[ot.GAMES]:"games",[ot.PUBLIC_CHAT]:"publicChat",[ot.TWITTER]:"twitter"};var gt=(e=>(e.Ready="ready",e.Suspended="suspended",e))(gt||{});class zu{constructor({settings:t,...n},a){A(this,"status");A(this,"source");A(this,"config");A(this,"settings");A(this,"listeners",new Set);A(this,"settingsKey");A(this,"enable",()=>{this.status.set("ready")});A(this,"disable",()=>{this.status.set("suspended")});A(this,"setFeatureConfig",({settings:t,...n})=>{let a;for(a in n)this.config.setValue(a,n[a]);if((t==null?void 0:t.overlaySettings.case)===this.settingsKey){const r=t.overlaySettings.value;if(r!==void 0){let s;for(s in r)console.log(s,r[s]),r[s]!==0&&r[s]!==""&&this.settings.setValue(s,r[s])}}});A(this,"update",(t,n)=>{this.source==="STREAM"&&n==="ORGANIZATION"||(this.setFeatureConfig(t),this.source=n)});this.settingsKey=w3[n.type],this.status=De.atom("suspended"),this.config=new en(tn(n),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(t==null?void 0:t.overlaySettings.case)===this.settingsKey?this.settings=new en(tn(t.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new en(tn({}),`feature:settings:${this.settingsKey}`),this.source=a}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(t){this.listeners.add(t)}fireEvent(t){for(const n of this.listeners.values())try{n.onEvent(t)}catch(a){console.error(a)}}}class _e extends na{constructor(){super(...arguments);A(this,"getValue",()=>this.getStore().get());A(this,"setValue",n=>this.getStore().set(n));A(this,"subscribe",n=>this.getStore().subscribe(n));A(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(n){return this.getStore().listen(n)}get(){return this.getStore().get()}}const we=e=>De.atom(e);class ze extends na{constructor(n,a,r){super(n,`api:${a}`);A(this,"atomStore");A(this,"getAtomStore",()=>this.atomStore);A(this,"getValue",async()=>{const n=this.getStore();if(n.value===void 0)throw new Error("no store");return await n.value.promise,n.get().data});A(this,"getValues",()=>{throw new Error("not implemented")});A(this,"setValue",n=>this.getStore().set({loading:!1,data:n==null?void 0:n.data}));A(this,"subscribe",n=>this.getStore().subscribe(n));A(this,"unsubscribe",()=>{throw new Error("not implemented")});A(this,"invalidate",()=>{this.store.invalidate()});A(this,"listen",n=>this.getStore().listen(n));A(this,"key",()=>this.getStore().key);A(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),r&&n.subscribe(s=>{this.atomStore.set(r(s))})}get(){throw new Error("not implemented")}}const C3=({store:e})=>{var n;const{data:t}=Be.useStore(e);return t!=null&&t.summary?h.jsx(g3,{avatar:t.summary.avatar,name:t.summary.name,points:t.summary.points,grade:"0",friendsRank:t.summary.friendsRank,globalRank:t.summary.rank,winStreak:t.summary.streak,correct:t.summary.correct,incorrect:t.summary.incorrect,successRate:(n=t.percentage)==null?void 0:n.average}):h.jsx("div",{children:"wait user..."})},R3=({store:e,openQuestion:t})=>{const{data:n}=Be.useStore(e);return n?h.jsx(Wh,{openQuestion:t,questions:n}):h.jsx("div",{children:"wait questions..."})},j3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",x3="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const L3=v("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),P3=v("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),U3=v("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),F3=v("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),z3=v("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),B3=v("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),G3=()=>e=>e.isSuccess?"#f1be1c":"#da3732",so=v("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[G3()]}}),io=v("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const Q3=v("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),Y3=v("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),V3=v("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),W3=v("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),q3=v("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ba=({points:e})=>h.jsxs(Q3,{children:[h.jsx(Y3,{children:"YOU WON"}),h.jsxs(V3,{children:[h.jsx(W3,{children:e}),h.jsx(q3,{children:"PTS"})]})]}),H3=({logo:e,points:t,questionAnswered:n,questionAnsweredCorrectly:a,questionType:r,closeQuestion:s,setTimeToExpire:i})=>{const o=!n&&r!==Ce.PREDICTION,d=n&&r===Ce.TRIVIA,m=d&&a,p=d&&!a,T=n&&r===Ce.PREDICTION;return h.jsxs(L3,{children:[h.jsxs(U3,{children:[h.jsxs(B3,{children:[o&&h.jsx(eu,{setTimeToExpire:i}),m&&h.jsxs(h.Fragment,{children:[h.jsx(ba,{points:t}),h.jsx(so,{isSuccess:!0,children:h.jsx(io,{alt:"reaction-icon",src:j3})})]}),p&&h.jsxs(h.Fragment,{children:[h.jsx(ba,{points:0}),h.jsx(so,{isSuccess:!1,children:h.jsx(io,{alt:"reaction-icon",src:x3})})]}),T&&h.jsx(ba,{points:t})]}),h.jsx(F3,{onClick:s,children:h.jsx(z3,{alt:"exit-icon",src:Cr})})]}),e&&h.jsx(P3,{src:e})]})},Z3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const K3=v("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),J3=({store:e,closeQuestion:t,vote:n})=>{var m;const{data:a}=Be.useStore(e),[r,s]=C.useState(!1),i=C.useCallback(p=>{s(p)},[s]),o=C.useMemo(()=>a==null?void 0:a.answers.find(p=>p.youVoted===!0),[a]),d=C.useMemo(()=>!!(a!=null&&a.answers.find(p=>p.correct===!0)),[a]);return a?h.jsx(K3,{children:h.jsxs("div",{children:[h.jsx(H3,{points:(o==null?void 0:o.points)||0,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,logo:Z3,closeQuestion:t,setTimeToExpire:i,questionType:a.type}),h.jsx("div",{children:h.jsx(O3,{title:a.subject,feedbackMessages:(m=a.options)==null?void 0:m.options.value,questionType:a.type,questionId:a.id,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,options:a.answers.map(p=>({id:p.id,title:p.text,icon:p.icon,type:a.type,correct:p.correct,percentage:p.percentage,answered:p.youVoted,disabled:!!o||a.marketClosed||r,questionAnswered:!!o,hasCorrectAnswer:d,onVote:n}))})})]})}):null},X3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const e4=v("div")({name:"Container",class:"cnx2su3",propsAsIs:!1}),t4=v("div")({name:"BackgroundBlock",class:"bszkfz6",propsAsIs:!1}),n4=v("img")({name:"Icon",class:"ioxcakf",propsAsIs:!1}),a4=v("div")({name:"ContentWrap",class:"casyw2l",propsAsIs:!1}),r4=v("img")({name:"SponsorLogo",class:"s2nator",propsAsIs:!1}),s4=v("span")({name:"SponsorText",class:"s1m8mpfg",propsAsIs:!1}),i4=v("div")({name:"ContentTitle",class:"cedzfas",propsAsIs:!1}),o4=v("div")({name:"ContentSubtitle",class:"cxgp62k",propsAsIs:!1}),l4=v("button")({name:"ActionBtn",class:"a1jp93u3",propsAsIs:!1}),u4=v("button")({name:"CloseBtn",class:"cg0g0le",propsAsIs:!1}),c4=v("img")({name:"IconClose",class:"i1cn2yjj",propsAsIs:!1}),d4=({onClose:e,onPlay:t,header:n,title:a,subtitle:r,graphicBg:s,icon:i,sponsorLogo:o})=>h.jsxs(e4,{children:[h.jsx(u4,{onClick:e,children:h.jsx(c4,{alt:"icon-close-onboarding-inapp",src:X3})}),h.jsx(t4,{style:{backgroundImage:`url(${s||""})`},children:i&&h.jsx(n4,{alt:"onboarding-inapp-icon",src:i})}),h.jsxs(a4,{children:[h.jsxs("div",{children:[h.jsx("div",{children:o?h.jsxs(h.Fragment,{children:[h.jsx(r4,{alt:"sponsor-logo",src:o}),h.jsx(s4,{children:"Presents"})]}):n||""}),h.jsx(i4,{children:a||""}),h.jsx(o4,{children:r||""})]}),h.jsx(l4,{onClick:t,children:"Play"})]})]}),m4=e=>{const t=e.find(({type:n})=>n==="_onboarding");return t||e[e.length-1]},f4=({sdk:e})=>{var o,d;const t=C.useRef(),[n,a]=C.useState(),r=e.getNotificationsStore(),s=Be.useStore(r),i=()=>{t.current&&clearTimeout(t.current),s&&r.set(s.filter(({id:m})=>m!==(n==null?void 0:n.id))),a(void 0)};return C.useEffect(()=>{if(console.log(s),s){const m=m4(s);m&&(a(m),t.current=setTimeout(()=>{i()},m.delay))}return()=>{t.current&&clearTimeout(t.current)}},[s]),n&&n.type==="_onboarding"?h.jsx(d4,{onClose:()=>{i(),e.closeFeature()},onPlay:()=>{i(),e.openFeature("games")},...n.data}):!((o=n==null?void 0:n.data)!=null&&o.question)||!((d=n==null?void 0:n.data)!=null&&d.notification)?null:h.jsx(od,{openVoiting:()=>{var m;i(),(m=n==null?void 0:n.action)==null||m.call(n)},closeInApp:()=>{var m;i(),(m=n==null?void 0:n.close)==null||m.call(n)},title:n.data.notification.title,icon:n.data.notification.image,color:n.data.notification.indicatorColor})};const hn=v("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),p4=v("div")({name:"DemoContainerNotifications",class:"d15x0q1l",propsAsIs:!1}),y4=v("div")({name:"UserStatisticsContainer",class:"u13pbrok",propsAsIs:!1}),g4=v("div")({name:"QuestionsContainer",class:"qaw537u",propsAsIs:!1}),T4=({gamification:e,sdk:t})=>{var m,p,T,y,k,S,b,R,$,_,L,P,F,B,U,V,q,J,re,ce,oe,H,le;const n=Be.useStore(e.status),a=Be.useStore(e.onbordingComplete),{slStreamId:r}=Be.useStore(t.sdkStore),s=Be.useStore(e.featureSettings);if(n!==gt.Ready)return h.jsx("div",{children:"wait..."});if(r!=null&&r.loading)return h.jsx(hn,{children:h.jsx("div",{children:"Event is loading"})});if(!(r!=null&&r.data))return h.jsx(hn,{children:h.jsx("div",{children:"Event is forbidden"})});if(!a)return h.jsx(hn,{children:h.jsx(z1,{closeFeature:t.closeFeature,gamification:e,steps:(p=(m=s.inplayGame)==null?void 0:m.onboarding)==null?void 0:p.steps,gameIcon:(k=(y=(T=s.inplayGame)==null?void 0:T.overview)==null?void 0:y.media)==null?void 0:k.gameIcon,sponsorLogo:(R=(b=(S=s.inplayGame)==null?void 0:S.overview)==null?void 0:b.media)==null?void 0:R.sponsorLogo,rules:(_=($=s.inplayGame)==null?void 0:$.rules)==null?void 0:_.rules,rulesBtnLabel:(P=(L=s.inplayGame)==null?void 0:L.rules)==null?void 0:P.buttonLabel,rulesTitle:(B=(F=s.inplayGame)==null?void 0:F.rules)==null?void 0:B.heading,primaryColor:(q=(V=(U=s.inplayGame)==null?void 0:U.overview)==null?void 0:V.appearance)==null?void 0:q.primaryColor,inviteCardTitle:(re=(J=s.inplayGame)==null?void 0:J.inviteCard)==null?void 0:re.heading,inviteCardSubtext:(oe=(ce=s.inplayGame)==null?void 0:ce.inviteCard)==null?void 0:oe.subtext,inviteCardBtnLabel:(le=(H=s.inplayGame)==null?void 0:H.inviteCard)==null?void 0:le.buttonLabel})});const i=Me=>{e.openQuestion(Me)},o=()=>{e.closeQuestion()},d=(Me,Ee)=>{e.submitAnswer(Me,Ee)};return h.jsxs(hn,{children:[h.jsx(y4,{children:e.userSummary&&h.jsx(C3,{store:e.userSummary.getStore()})}),h.jsxs(g4,{children:[e.questions&&h.jsx(R3,{openQuestion:i,store:e.questions.getStore()}),e.openedQuestion&&h.jsx(J3,{closeQuestion:o,vote:d,store:e.openedQuestion.getStore()})]})]})},h4=({sdk:e})=>{const t=async n=>{try{await e.authorizationBypass("streamlayer:streamlayer",n)}catch(a){throw console.log("login err",a),a}};return h.jsx(u1,{login:t,anonymousLogin:e.anonymousAuthorization,host:e.host})},k4=({activeFeature:e,sdk:t})=>{if(C.useEffect(()=>{const n=t.getFeatures();if(e)for(const[a,r]of n)a===e?r.status.get()===gt.Suspended&&r.enable():r.status.get()===gt.Ready&&r.disable();else for(const[,a]of n)a.status.get()===gt.Ready&&a.disable();return()=>{for(const[,a]of n)a.status.get()===gt.Ready&&a.disable()}},[e,t]),e==="games"){const n=t.getFeatures().get("games");return n?h.jsxs("div",{children:[h.jsx("button",{onClick:()=>t.closeFeature(),children:"close"}),h.jsx(T4,{gamification:n,sdk:t})]}):h.jsx("div",{children:"wait gamification..."})}return h.jsxs("div",{children:[h.jsx("button",{onClick:()=>t.logout(),children:"logout"}),h.jsx("button",{onClick:()=>t.openFeature("games"),children:"gamification"})]})},N4=({sdk:e})=>{const t=Be.useStore(e.organizationStore()),n=Be.useStore(e.getUserStore()),a=Be.useStore(e.getActiveFeature());return t.loading?h.jsx("div",{children:"authentificating..."}):t.data?n.loading?h.jsx("div",{children:"authentificating..."}):n.data?h.jsxs(h.Fragment,{children:[h.jsx(p4,{children:h.jsx(f4,{sdk:e})}),h.jsx(k4,{sdk:e,activeFeature:a})]}):h.jsx(h4,{sdk:e}):h.jsx("div",{children:"wrong sdk key..."})};const M4="t12mji3x",I4=({children:e})=>h.jsx("div",{className:M4,children:e});let S4=()=>({events:{},emit(e,...t){let n=this.events[e]||[];for(let a=0,r=n.length;a<r;a++)n[a](...t)},on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var a;this.events[e]=(a=this.events[e])==null?void 0:a.filter(r=>t!==r)}}});const b4=({cache:e=new Map,fetcher:t,...n}={})=>{const a=S4();let r=!0;mo("visibilitychange",()=>{r=!document.hidden,r&&a.emit(lo)}),mo("online",()=>a.emit(uo));const s=new Map,i=new Map,o=new Map;let d={};const m=async([$,_],L,P,F)=>{var B;if(!r)return;const U=oe=>{L.key===$&&(L.set(oe),a.emit($a,$,oe,!0))},V=()=>{U({...L.value,...po,promise:o.get($)})},{dedupeTime:q=4e3,fetcher:J}={...P,...d},re=fo();if(o.has($)){L.value.loading||V();return}if(!F){const oe=e.get($);oe&&L.value.data!==oe&&U({data:oe,...mt});const H=i.get($);if(H&&H+q>re)return}const ce=De.startTask();try{const oe=J(..._);i.set($,re),o.set($,oe),V();const H=await oe;e.set($,H),U({data:H,...mt}),i.set($,fo())}catch(oe){(B=P.onError)==null||B.call(P,oe),U({data:L.value.data,error:oe,...mt})}finally{ce(),o.delete($)}},p=($,{fetcher:_=t,...L}={})=>{const P=De.map({...mt}),F={...n,...L,fetcher:_};P.invalidate=()=>{const{key:H}=P;H&&k(H)},P.mutate=H=>{const{key:le}=P;le&&S(le,H)};let B,U,V,q,J,re=[];De.onStart(P,()=>{const H=!B;[J,B]=$4($),q=J.subscribe(be=>{if(be){const[ee,M]=be;P.key=ee,m([ee,M],P,F),U=ee,V=M}else P.key=U=V=void 0});const le=J.get();le&&([U,V]=le,H&&ce());const{refetchInterval:Me=0,refetchOnFocus:Ee,refetchOnReconnect:Oe}=F,Ie=()=>{U&&m([U,V],P,F)};Me>0&&s.set($,setInterval(Ie,Me)),Ee&&re.push(a.on(lo,Ie)),Oe&&re.push(a.on(uo,Ie)),re.push(a.on(co,be=>{U&&va(U,be)&&m([U,V],P,F,!0)}),a.on($a,(be,ee,M)=>{U&&va(U,be)&&P.value!==ee&&P.value.data!==ee&&P.set(M?ee:{data:ee,...mt})}))});const ce=()=>{U&&V&&m([U,V],P,F)},oe=P.listen;return P.listen=H=>{const le=oe(H);return H(P.value),ce(),le},De.onStop(P,()=>{P.value={...mt},B==null||B(),re.forEach(le=>le()),re=[],q==null||q();const H=s.get($);H&&clearInterval(H)}),P},T=$=>{e.delete($),i.delete($)},y=($,_)=>{for(const L of e.keys())va(L,$)&&_(L)},k=$=>{y($,T),a.emit(co,$)},S=($,_)=>{y($,L=>{_===void 0?T(L):e.set(L,_)}),a.emit($a,$,_)};function b($){const _=async P=>{var F,B;const U=(F=d.fetcher)!=null?F:$,V=[];try{L.set({error:void 0,data:void 0,mutate:_,...po});const q=await U({data:P,invalidate:J=>{V.push(J)},getCacheUpdater:(J,re=!0)=>[ce=>{S(J,ce),re&&V.push(J)},e.get(J)]});return L.setKey("data",q),q}catch(q){(B=n==null?void 0:n.onError)==null||B.call(n,q),L.setKey("error",q)}finally{L.setKey("loading",!1),V.forEach(k)}},L=De.map({mutate:_,...mt});return L.mutate=_,L}return[p,b,{__unsafeOverruleSettings:$=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),d=$},invalidateKeys:k,mutateCache:S}]};function oo(e){return typeof e=="string"||typeof e=="number"}const $4=e=>{if(oo(e))return[De.atom([""+e,[e]]),()=>{}];let t=De.atom(null),n=[];const a=()=>{n.some(s=>s==null)?t.set(null):t.set([n.join(""),n])},r=[];for(let s=0;s<e.length;s++){const i=e[s];if(oo(i)){n.push(i);continue}r.push(i.subscribe(o=>{n[s]=o,a()}))}return a(),[t,()=>r.forEach(s=>s())]},lo=1,uo=2,co=3,$a=4,mo=(e,t)=>{typeof window>"u"||addEventListener(e,t)},va=(e,t)=>Array.isArray(t)?t.includes(e):typeof t=="function"?t(e):e===t,fo=()=>new Date().getTime(),po={loading:!0},mt={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class v4{constructor(t,n,a,r){A(this,"params");A(this,"stream");A(this,"method");A(this,"name");A(this,"headers");A(this,"listeners");A(this,"state");A(this,"store");A(this,"updateState",t=>{this.state.setValue("status",t),this.state.setValue("ts",new Date),this.addStateLog(`status => ${t}`)});A(this,"addStateLog",t=>{const n=this.state.getStore().get().log;this.state.setValue("log",[...n,`${new Date().toLocaleString()}: ${t}`])});A(this,"addListener",(t,n)=>this.listeners.has(t)?(this.addStateLog(`listener '${t}' not added`),!1):(this.listeners.set(t,n),this.addStateLog(`listener '${t}' added`),!0));A(this,"removeListener",t=>{this.listeners.delete(t),this.addStateLog(`listener '${t}' removed`)});A(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const t="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(t,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});A(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});A(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});A(this,"getStore",()=>{var t;return(t=this.store)==null?void 0:t.getStore()});A(this,"onData",t=>{this.addStateLog(`received data => ${JSON.stringify(t)}`),this.store&&this.store.setValue(t);for(const[,n]of this.listeners)n(t);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});A(this,"onStreamError",t=>{t.code!==ae.Canceled&&t.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",t)):this.disconnect()});const s={status:"init",ts:new Date,log:[]};this.state=new en(tn(s),`subscription:${r.name}:state`),this.name=r.name,this.headers=t,this.listeners=new Map,this.params=a,this.method=n,r.withStore&&(this.store=new _e(we(null),`subscription:${r.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class A4{constructor(t){A(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});A(this,"transport");A(this,"nanoquery");A(this,"host");A(this,"interceptors",[]);A(this,"$headers");A(this,"clients");A(this,"callbackClients");A(this,"subscriptions");A(this,"addSubscription",(t,n,a)=>{const r=this.subscriptions.get(n);if(r)return r;const s=new v4(this.$headers,t,n,a);return this.subscriptions.set(n,s),s});A(this,"removeSubscription",t=>{t.disconnect(),this.subscriptions.delete(t.params)});A(this,"disconnect",()=>{for(const[t,n]of this.subscriptions)n.disconnect(),this.subscriptions.delete(t)});A(this,"registerInterceptor",t=>{this.interceptors.push(t)});A(this,"removeInterceptor",t=>{this.interceptors=this.interceptors.filter(n=>n!==t)});A(this,"getClient",t=>{const n=t.typeName;if(this.clients.has(n))return this.clients.get(n);const a=Jn(t,this.transport);return this.clients.set(n,a),a});A(this,"getCallbackClient",t=>{const n=t.typeName;if(this.callbackClients.has(n))return this.callbackClients.get(n);const a=t0(t,this.transport);return this.callbackClients.set(n,a),a});A(this,"createPromiseClient",(t,{params:n=[],method:a})=>{const r=this.getClient(t),s=t.methods[a].name,i=[t.typeName,s.charAt(0).toLowerCase()+s.slice(1),...Array.isArray(n)?n:[n]],o=[t.typeName,s.charAt(0).toLowerCase()+s.slice(1)];return{client:r,queryKey:i,queryKeyStr:o.join("")}});A(this,"createCallbackClient",t=>({client:this.getCallbackClient(t)}));A(this,"setSdkKey",t=>{this.$headers.setValue("sdk",t)});A(this,"setAuth",t=>{this.$headers.setValue("authorization",t)});A(this,"setHeader",(t,n)=>this.$headers.setValue(t,n));A(this,"getHeader",t=>this.$headers.getValue(t));A(this,"getHeaders",()=>this.$headers.getValues());A(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const t=n=>a=>{const r=this.$headers.getValues();for(const s in r)a.header.set(s,r[s]);return n(a)};this.interceptors.push(t)});var s,i;this.host=t,this.$headers=new en(tn({"sl-device-id":((i=(s=Q.process)==null?void 0:s.env)==null?void 0:i.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[n,a,r]=b4();this.nanoquery={createFetcherStore:n,createMutatorStore:a,utils:r},this.transport=Xn({baseUrl:t,interceptors:this.interceptors,useBinaryFormat:!0})}}const E4=l.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),Zr=l.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),Kr=l.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),aa=l.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Bu=l.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),ra=l.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),sa=l.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:sa}]);const dn=l.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Gu=l.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:sa},{no:12,name:"event_time",kind:"message",T:dn},{no:13,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:14,name:"periods",kind:"message",T:Gu,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:l.getEnumType(Kr)}]);const Qu=l.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),O4=l.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:D4},{no:7,name:"weight",kind:"message",T:_4},{no:8,name:"birth",kind:"message",T:w4}]),D4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),_4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),w4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:Qu}],{localName:"PlayerAttributes_Birth"});l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const C4=l.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:Qu},{no:13,name:"attributes",kind:"message",T:O4},{no:15,name:"teams",kind:"message",T:C4,repeated:!0}]);const ut=l.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const Ht=l.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(E4)}]),R4=l.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Ht},{no:2,name:"event",kind:"message",T:Ht},{no:3,name:"events",kind:"message",T:Ht},{no:4,name:"players",kind:"message",T:Ht},{no:5,name:"leagues",kind:"message",T:Ht}]),j4=l.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:R4}]);l.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:j4,repeated:!0}]);l.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const x4=l.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),L4=l.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:x4,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:L4,oneof:"statistics"}]);const ct=l.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),P4=l.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),U4=l.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),F4=l.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:ct},{no:6,name:"away",kind:"message",T:ct},{no:7,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:8,name:"custom_fields",kind:"message",T:P4},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:sa},{no:12,name:"schedule",kind:"message",T:U4,repeated:!0},{no:13,name:"endless",kind:"enum",T:l.getEnumType(Kr)}]),Nt=l.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:sa},{no:6,name:"event_time",kind:"message",T:dn},{no:7,name:"home_team",kind:"message",T:ct},{no:8,name:"away_team",kind:"message",T:ct},{no:9,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:10,name:"periods",kind:"message",T:Gu,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9}]),kn=l.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),yo=l.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);l.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:kn,repeated:!0},{no:3,name:"ne",kind:"message",T:kn,repeated:!0},{no:4,name:"eq",kind:"message",T:kn,repeated:!0},{no:5,name:"between",kind:"message",T:yo,repeated:!0},{no:6,name:"includes",kind:"message",T:yo,repeated:!0},{no:7,name:"is",kind:"message",T:kn,repeated:!0}]);const z4=l.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),B4=l.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),go=l.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:Yu},{no:2,name:"status",kind:"enum",T:l.getEnumType(z4)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),G4=l.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),Q4=l.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:l.getEnumType(B4)},{no:2,name:"player",kind:"message",T:G4}]),Y4=l.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),V4=l.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),Yu=l.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),To=l.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:Y4,repeated:!0},{no:2,name:"batting",kind:"message",T:V4,repeated:!0},{no:3,name:"pitching",kind:"message",T:Yu,repeated:!0}]),W4=l.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:go},{no:2,name:"away_pitcher",kind:"message",T:go},{no:3,name:"home_statistics",kind:"message",T:To},{no:4,name:"away_statistics",kind:"message",T:To}]),q4=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:H4,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),H4=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),Z4=l.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:Q4,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),K4=l.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:q4,repeated:!0}]),J4=l.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:W4}]),X4=l.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:ek},{no:11,name:"rank",kind:"message",T:tk},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),ek=l.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),tk=l.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),nk=l.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:X4,repeated:!0}]),ak=l.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),rk=l.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),ho=l.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),ko=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),sk=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(ak)},{no:2,name:"home_player",kind:"message",T:ko},{no:3,name:"away_player",kind:"message",T:ko}]),ik=l.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:ho},{no:2,name:"away_statistics",kind:"message",T:ho}]),ok=l.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:ik},{no:2,name:"top_performers",kind:"message",T:sk,repeated:!0},{no:3,name:"last_games",kind:"message",T:Vu}]),lk=l.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),uk=l.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:lk,repeated:!0}]),No=l.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),ck=l.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:No,repeated:!0},{no:2,name:"away_players",kind:"message",T:No,repeated:!0}]),dk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:mk},{no:11,name:"rank",kind:"message",T:fk},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),mk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),fk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),pk=l.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:dk,repeated:!0}]),Mo=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Io=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Mo,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Mo,repeated:!0}]),yk=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Io},{no:2,name:"away_team",kind:"message",T:Io}]),Aa=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:gk}]),gk=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),Vu=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:Aa,repeated:!0},{no:2,name:"away",kind:"message",T:Aa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:Aa,repeated:!0}]),Tk=l.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),Wu=l.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),hk=l.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),So=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),kk=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Tk)},{no:2,name:"home_player",kind:"message",T:So,repeated:!0},{no:3,name:"away_player",kind:"message",T:So,repeated:!0}]),bo=l.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),Nk=l.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:bo},{no:2,name:"away_statistics",kind:"message",T:bo}]),Mk=l.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Nk},{no:2,name:"top_performers",kind:"message",T:kk,repeated:!0}]),Ik=l.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Sk=l.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Ik,repeated:!0}]),Ea=l.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:l.getEnumType(Wu)}]),$o=l.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:l.getEnumType(Wu)}]),vo=l.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:Ea,repeated:!0},{no:2,name:"goaltender",kind:"message",T:$o},{no:3,name:"forwards",kind:"message",T:Ea,repeated:!0},{no:4,name:"defensemen",kind:"message",T:Ea,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:$o,repeated:!0}]),bk=l.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:vo},{no:2,name:"away_players",kind:"message",T:vo}]),$k=l.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:vk},{no:11,name:"rank",kind:"message",T:Ak},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),vk=l.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Ak=l.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Ek=l.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:$k,repeated:!0}]),Ok=l.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),Dk=l.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),_k=l.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),Jr=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),wk=l.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"attack_stats",kind:"message",T:zk}]),Ck=l.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"midfield_stats",kind:"message",T:Bk}]),Rk=l.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"defense_stats",kind:"message",T:Gk}]),jk=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Ok)},{no:2,name:"attack_performer",kind:"message",T:wk},{no:3,name:"midfield_performer",kind:"message",T:Ck},{no:4,name:"defense_performer",kind:"message",T:Rk}]),xk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),Lk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),Pk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),Ao=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:xk},{no:2,name:"attacking_stats",kind:"message",T:Lk},{no:3,name:"defense_stats",kind:"message",T:Pk}]),Uk=l.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Ao},{no:2,name:"away_statistics",kind:"message",T:Ao},{no:3,name:"perfomers",kind:"message",T:jk}]),Fk=l.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Uk},{no:2,name:"last_games",kind:"message",T:qu}]),zk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),Bk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),Gk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const Qk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),Yk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:Qk,repeated:!0}]),Eo=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Oo=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:Yk,repeated:!0},{no:3,name:"start_players",kind:"message",T:Eo,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Eo,repeated:!0}]),Vk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Oo},{no:2,name:"away_team",kind:"message",T:Oo}]);l.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const Wk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:l.getEnumType(Dk)}]),qk=l.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Wk,repeated:!0}]),Hk=l.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),Zk=l.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:Hk,repeated:!0}]),Oa=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Kk}]),Kk=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),qu=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:Oa,repeated:!0},{no:2,name:"away",kind:"message",T:Oa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:Oa,repeated:!0}]),Mt=l.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),Jk=l.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:Z4,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:rk,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:hk,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:_k,oneof:"sport"}]),Xk=l.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:Jk}]),eN=l.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:F4}]),Hu=l.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:eN}]),tN=l.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:nN},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"sort",kind:"message",T:Bu},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),nN=l.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:l.getEnumType(Kr)}],{localName:"ListRequest_Filter"}),aN=l.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:rN},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"sort",kind:"message",T:Bu}]),rN=l.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),sN=l.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:ra},{no:2,name:"data",kind:"message",T:Hu,repeated:!0}]),iN=l.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:ra},{no:2,name:"data",kind:"message",T:Hu,repeated:!0}]),Do=l.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),_o=l.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:oN}]),oN=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:lN}],{localName:"SummaryResponse_ResponseData"}),lN=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:J4,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:ok,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Mk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Fk,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),uN=l.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),cN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:dN}]),dN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:mN}],{localName:"AdminSummaryResponse_ResponseData"}),mN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),fN=l.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"order",kind:"scalar",T:9}]),pN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:yN},{no:2,name:"meta",kind:"message",T:ra}]),yN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:gN}],{localName:"PlayByPlayResponse_ResponseData"}),gN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:K4,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:uk,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Sk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:qk,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),TN=l.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:hN},{no:2,name:"pagination",kind:"message",T:aa}]),hN=l.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),kN=l.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:Xk,repeated:!0},{no:2,name:"meta",kind:"message",T:ra}]),NN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:MN}]),MN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),IN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),SN=l.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),bN=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:$N}]),$N=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:vN}],{localName:"BoxscoreResponse_ResponseData"}),vN=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"basketball",kind:"message",T:ck,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:bk,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),AN=l.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),EN=l.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:ON}]),ON=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:2,name:"attributes",kind:"message",T:DN}],{localName:"StandingsResponse_ResponseData"}),DN=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:pk,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Ek,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:nk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Zk,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),_N=l.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),wN=l.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:CN}]),CN=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:RN}],{localName:"LineupResponse_ResponseData"}),RN=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"soccer",kind:"message",T:Vk,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:yk,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),jN=l.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),xN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:LN}]),LN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:PN}],{localName:"LastGamesResponse_ResponseData"}),PN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"soccer",kind:"message",T:qu,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Vu,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),UN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),FN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:zN}]),zN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),BN={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:tN,O:iN,kind:z.Unary},demoList:{name:"DemoList",I:aN,O:sN,kind:z.Unary},summary:{name:"Summary",I:Do,O:_o,kind:z.Unary},adminSummary:{name:"AdminSummary",I:uN,O:cN,kind:z.Unary},boxscore:{name:"Boxscore",I:SN,O:bN,kind:z.Unary},standings:{name:"Standings",I:AN,O:EN,kind:z.Unary},playByPlay:{name:"PlayByPlay",I:fN,O:pN,kind:z.Unary},schedule:{name:"Schedule",I:TN,O:kN,kind:z.Unary},scheduleDates:{name:"ScheduleDates",I:NN,O:IN,kind:z.Unary},lineup:{name:"Lineup",I:_N,O:wN,kind:z.Unary},retrieveEventId:{name:"RetrieveEventId",I:UN,O:FN,kind:z.Unary},lastGames:{name:"LastGames",I:jN,O:xN,kind:z.Unary},summarySubscription:{name:"SummarySubscription",I:Do,O:_o,kind:z.ServerStreaming}}},GN=l.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),QN=l.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),YN=l.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),VN=l.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),WN=l.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),qN=l.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),HN=l.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),ZN=l.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),Zu=l.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),KN=l.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),JN=l.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Zu)}]),XN=l.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Zu)}]),Da=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:JN},{no:2,name:"sound",kind:"message",T:XN}]),Xr=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:l.getEnumType(GN)},{no:2,name:"messages_notify",kind:"enum",T:l.getEnumType(QN)},{no:3,name:"friends_notify",kind:"enum",T:l.getEnumType(YN)},{no:4,name:"calls_sound",kind:"enum",T:l.getEnumType(WN)},{no:5,name:"messages_sound",kind:"enum",T:l.getEnumType(qN)},{no:6,name:"friends_sound",kind:"enum",T:l.getEnumType(HN)},{no:7,name:"twitter_notify",kind:"enum",T:l.getEnumType(VN)},{no:8,name:"twitter_sound",kind:"enum",T:l.getEnumType(ZN)},{no:9,name:"gamification",kind:"message",T:Da},{no:10,name:"watch_party_invitation",kind:"message",T:Da},{no:11,name:"twitter_question",kind:"message",T:Da}]),eM=l.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),tM=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:nM}]),nM=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xr}],{localName:"GetResponse_GetResponseData"}),aM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:Xr}]),rM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:sM}]),sM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xr}],{localName:"UpdateResponse_UpdateResponseData"}),iM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),oM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:lM}]),lM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Lu}],{localName:"GetStreamResponse_GetResponseData"}),uM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),cM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:dM}]),dM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Pu}],{localName:"GetOrganizationResponse_GetResponseData"}),mM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),fM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:pM}]),pM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Uu}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),yM=l.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:l.getEnumType(KN)}]),Ku=l.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:yM},{no:5,name:"external_event_id",kind:"scalar",T:9}]),gM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:Ku}]),TM=l.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),hM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:kM}]),kM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:TM}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:NM}]);const NM=l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Ku}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),MM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),IM=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),SM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:bM}]),bM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Lu}],{localName:"StreamSubscriptionResponse_ResponseData"}),$M=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:vM}]),vM=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Pu}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),ia={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:eM,O:tM,kind:z.Unary},update:{name:"Update",I:aM,O:rM,kind:z.Unary},getStream:{name:"GetStream",I:iM,O:oM,kind:z.Unary},getOrganization:{name:"GetOrganization",I:uM,O:cM,kind:z.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:mM,O:fM,kind:z.Unary},generateDeepLink:{name:"GenerateDeepLink",I:gM,O:hM,kind:z.Unary},streamSubscription:{name:"StreamSubscription",I:MM,O:SM,kind:z.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:IM,O:$M,kind:z.ServerStreaming}}},AM=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(BN,{method:"retrieveEventId",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var o;if(!i||typeof i!="string")return"";try{return((o=(await n.retrieveEventId({id:i})).data)==null?void 0:o.id)||""}catch{return""}}})},EM=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getStream",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.getStream({id:i})).data)==null?void 0:d.attributes:void 0}})},OM=l.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),DM=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),_M=l.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:DM},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const wM=l.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:l.getEnumType(OM)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),CM=l.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:wM}]),es=l.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:_M}]);l.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:CM}]);const RM=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),jM=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:xM},{no:2,name:"data",kind:"message",T:es}]),xM=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),LM=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),PM=l.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),UM=l.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:PM}]),FM=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zM=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),BM=l.makeMessageType("streamlayer.users.MeRequest",[]),GM=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:es}]),QM=l.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),YM=l.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),VM=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),WM=l.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),qM=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),HM=l.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),ZM=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),KM=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),JM=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:XM}]),XM=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),eI=l.makeMessageType("streamlayer.users.InviteResponse",[]),tI=l.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),nI=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:aI},{no:2,name:"data",kind:"message",T:es,opt:!0}]),aI=l.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Ju={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:RM,O:jM,kind:z.Unary},register:{name:"Register",I:LM,O:UM,kind:z.Unary},requestPassword:{name:"RequestPassword",I:FM,O:zM,kind:z.Unary},me:{name:"Me",I:BM,O:GM,kind:z.Unary},invite:{name:"Invite",I:JM,O:eI,kind:z.Unary},bypassAuth:{name:"BypassAuth",I:tI,O:nI,kind:z.Unary},updateMetadata:{name:"UpdateMetadata",I:QM,O:KM,kind:z.Unary},updateAvatar:{name:"UpdateAvatar",I:YM,O:VM,kind:z.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:WM,O:qM,kind:z.Unary},updatePublicName:{name:"UpdatePublicName",I:HM,O:ZM,kind:z.Unary}}},rI=(e,t)=>{const{queryKey:n,client:a}=t.createPromiseClient(Ju,{method:"me",params:[e]});return t.nanoquery.createFetcherStore(n,{fetcher:()=>a.me({})})},sI=e=>{const{client:t,queryKeyStr:n}=e.createPromiseClient(Ju,{method:"bypassAuth"});return e.nanoquery.createMutatorStore(async({data:{userKey:a,schema:r,init:s},getCacheUpdater:i})=>{const[o]=i(n),d=await t.bypassAuth({userKey:a,schema:r,init:s});return o(d),d})},iI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{var s;return(s=(await n.get({})).data)==null?void 0:s.attributes}})},oI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getOrganization",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{const r=await n.getOrganization({});return r.data?{...r.data.attributes,id:r.data.id}:void 0}})},lI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getOrganizationAdvertising",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{var s;return(s=(await n.getOrganizationAdvertising({})).data)==null?void 0:s.attributes}})},uI=(e,t,n)=>{e.transport=new A4(t.host),e.sdk.host=e.transport.host,e.transport.setSdkKey(t.sdkKey),n()};var Ot=(e=>(e.DISABLED="disabled",e.INITIALIZATION="initialization",e.READY="ready",e.FAILED="failed",e.SUSPENDED="suspended",e))(Ot||{});const cI=e=>{const t=new _e(we(),"enabled"),n=new _e(we("disabled"),"status"),a=new _e(we(),"userKey"),r=new _e(we(),"userToken");r.listen(y=>{y?localStorage.setItem("sl-user-token",y):localStorage.removeItem("sl-user-token")});const s=new _e(we(),"providerStreamId"),i=new ze(AM(s.getStore(),e),"slStreamId",y=>y==null?void 0:y.data),o=new ze(rI(r.getStore(),e),"user",y=>{var k,S;return(S=(k=y==null?void 0:y.data)==null?void 0:k.data)==null?void 0:S.id}),d=new ze(iI(r.getStore(),e),"userSettings"),m=new ze(EM(i.getAtomStore(),e),"streamSettings");i.getAtomStore().listen(y=>{(y===""||y===void 0)&&m.getStore().mutate(void 0)});const p=new ze(oI(t.getStore(),e),"organizationSettings",y=>{var k;return(k=y==null?void 0:y.data)==null?void 0:k.id}),T=new ze(lI(p.getAtomStore(),e),"organizationAdvertising");return{enabled:t,status:n,providerStreamId:s,slStreamId:i,streamSettings:m,user:o,userKey:a,userToken:r,userSettings:d,organizationSettings:p,organizationAdvertising:T}};class dI extends na{constructor(n){const a=cI(n),r=_3(a);super(r,"core");A(this,"stores");A(this,"subscribe",n=>{let a;for(a in this.stores){const r=n[a];a in n&&r!==void 0&&this.stores[a].subscribe(n[a])}});A(this,"unsubscribe",()=>this.getStore().off());this.stores=a}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const mI=(e,t,n)=>{e.store=new dI(e.transport),e.stores=e.store.getValues(),e.sdk.sdkStore=e.store.getStore(),e.sdk.organizationStore=()=>e.stores.organizationSettings.getStore(),e.storeSubscribe=()=>{const a=(s,i)=>{if(i!=null&&i.overlays){s===jt.STREAM&&e.features.clear();for(const o of i.overlays){const d=o.name;e.features.has(d)?e.updateFeature(o,s):e.initFeature(o,s)}}},r={organizationSettings:s=>{if(s.data)try{a(jt.ORGANIZATION,s.data)}catch(i){console.log(i)}},streamSettings:s=>{if(s.data)try{a(jt.STREAM,s.data)}catch(i){console.log(i)}}};e.store.subscribe(r)},e.storeUnsubscribe=()=>{e.store.unsubscribe()},n()};class fI extends D3{constructor(n,a){super();A(this,"$coreStore");A(this,"transport");A(this,"$bypassLogin");A(this,"me",async()=>{const n=await this.$coreStore.getValues().user.getValue();return n==null?void 0:n.data});A(this,"login",async(n,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:n,userKey:a,init:!1}),this.me()));A(this,"isAuthenticated",()=>this.me());A(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});A(this,"subscribe",()=>{this.$bypassLogin.subscribe((n,a)=>{var r,s,i,o;a==="data"&&(this.transport.setAuth((s=(r=n==null?void 0:n.data)==null?void 0:r.meta)==null?void 0:s.jwt),this.$coreStore.getValues().userToken.setValue((o=(i=n==null?void 0:n.data)==null?void 0:i.meta)==null?void 0:o.jwt))})});this.$coreStore=n,this.transport=a,this.$bypassLogin=sI(this.transport),this.subscribe()}}const pI=async(e,t,n)=>{e.auth=new fI(e.store,e.transport);const a=localStorage.getItem("sl-user-schema"),r=localStorage.getItem("sl-user-token");a&&r&&(console.log("try to login prev user"),await e.auth.login(a,r)),e.sdk.authorizationBypass=async(s,i)=>{await e.auth.login(s,i),localStorage.setItem("sl-user-schema","streamlayer:streamlayer")},e.sdk.logout=()=>{e.auth.logout()},e.sdk.getUserStore=()=>e.stores.user.getStore(),e.sdk.isUserAuthorized=()=>e.auth.isAuthenticated(),n()};class yI{constructor(){A(this,"queue");A(this,"add",t=>{this.isNewNotify(t.id)?this.queue.getStore().set([...this.queue.getValue()||[],t]):console.log("skip notification:",t)});A(this,"getQueueStore",()=>this.queue.getStore());A(this,"isNewNotify",t=>{const n=localStorage.getItem(`opened:${t}`);if(!n){const a=this.queue.getStore().get();return!(a!=null&&a.find(r=>r.id===t))}return!n});A(this,"markAsViewed",t=>{localStorage.setItem(`opened:${t}`,t)});this.queue=new _e(we([]),"notifications")}}const gI=(e,t,n)=>{e.notifications=new yI,e.addNotification=e.notifications.add,e.sdk.getNotificationsStore=()=>e.notifications.getQueueStore(),n()},TI=(e,t,n)=>{e.sdk=Object.create(null),e.sdk.initializeApp=async()=>{e.storeSubscribe(),e.stores.enabled.setValue("on"),e.stores.status.setValue(Ot.INITIALIZATION);try{const a=await e.stores.organizationSettings.getValue();return a?(e.stores.status.setValue(Ot.READY),{enabled:!!a}):(e.stores.status.setValue(Ot.FAILED),{err:"failed"})}catch(a){return e.stores.enabled.setValue(),e.stores.status.setValue(Ot.FAILED),{err:`${a}`}}},e.sdk.disableApp=()=>{e.stores.enabled.setValue(),e.stores.status.setValue(Ot.DISABLED),e.storeUnsubscribe()},e.sdk.createEventSession=a=>{e.stores.providerStreamId.setValue(""),e.stores.providerStreamId.setValue(a)},n()},rt={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:b2,O:$2,kind:z.Unary},subscription:{name:"Subscription",I:ET,O:OT,kind:z.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:_T,O:wT,kind:z.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:jT,O:xT,kind:z.ServerStreaming},questionByUser:{name:"QuestionByUser",I:UT,O:FT,kind:z.Unary},syncQuestion:{name:"SyncQuestion",I:BT,O:QT,kind:z.Unary},getQuestion:{name:"GetQuestion",I:VT,O:WT,kind:z.Unary},questionDetail:{name:"QuestionDetail",I:HT,O:ZT,kind:z.Unary},submitAnswer:{name:"SubmitAnswer",I:JT,O:e2,kind:z.Unary},submitInplay:{name:"SubmitInplay",I:n2,O:r2,kind:z.Unary},skipQuestion:{name:"SkipQuestion",I:s2,O:o2,kind:z.Unary},pickHistory:{name:"PickHistory",I:u2,O:d2,kind:z.Unary},insightHistory:{name:"InsightHistory",I:p2,O:g2,kind:z.Unary},tweetHistory:{name:"TweetHistory",I:h2,O:N2,kind:z.Unary},promotionHistory:{name:"PromotionHistory",I:A2,O:O2,kind:z.Unary}}},hI=l.makeEnum("streamlayer.interactive.leaderboard.LeaderboardType",[{no:0,name:"LEADERBOARD_TYPE_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_TYPE_TOURNAMENT",localName:"TOURNAMENT"},{no:2,name:"LEADERBOARD_TYPE_EVENT",localName:"EVENT"}]),Xu=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(hI)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"event_ids",kind:"scalar",T:3,repeated:!0},{no:5,name:"leaderboards",kind:"message",T:Xu,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),ts=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardItem",()=>[{no:1,name:"streak",kind:"scalar",T:5},{no:2,name:"correct",kind:"scalar",T:5},{no:3,name:"incorrect",kind:"scalar",T:5},{no:4,name:"points",kind:"scalar",T:5},{no:5,name:"rank",kind:"scalar",T:5},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"avatar",kind:"scalar",T:9},{no:8,name:"user_id",kind:"scalar",T:9},{no:9,name:"recent_correct",kind:"scalar",T:5},{no:10,name:"streak_loss",kind:"scalar",T:5},{no:11,name:"friends_rank",kind:"scalar",T:5},{no:12,name:"in_top",kind:"scalar",T:5}]),kI=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:ts},{no:2,name:"percentage",kind:"message",T:NI}]),NI=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem.SummaryPercentage",()=>[{no:1,name:"correct",kind:"scalar",T:5},{no:2,name:"average",kind:"scalar",T:5}],{localName:"LeaderboardSummaryItem_SummaryPercentage"}),MI=l.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Vr},{no:2,name:"users_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"event_id",kind:"scalar",T:4},{no:4,name:"leaderboard_id",kind:"scalar",T:9}]),II=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:SI,repeated:!0},{no:2,name:"meta",kind:"message",T:bI}]),SI=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ts}],{localName:"ListResponse_ListResponseData"}),bI=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"ListResponse_ListResponseMeta"}),$I=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"leaderboard_id",kind:"scalar",T:9},{no:4,name:"users_ids",kind:"scalar",T:9,repeated:!0}]),vI=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:AI}]),AI=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse.SummaryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:kI}],{localName:"SummaryResponse_SummaryResponseData"}),EI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),OI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:DI}]),DI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse.EventLeaderboardsResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xu}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),_I=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"pagination",kind:"message",T:Vr},{no:4,name:"sort",kind:"message",T:MT}]),wI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:CI,repeated:!0},{no:2,name:"meta",kind:"message",T:RI}]),CI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ts}],{localName:"EventLeaderboardResponse_ListResponseData"}),RI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"EventLeaderboardResponse_ListResponseMeta"}),jI={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:MI,O:II,kind:z.Unary},summary:{name:"Summary",I:$I,O:vI,kind:z.Unary},eventLeaderboards:{name:"EventLeaderboards",I:EI,O:OI,kind:z.Unary},eventLeaderboard:{name:"EventLeaderboard",I:_I,O:wI,kind:z.Unary}}},xI=(e,t,n)=>{const{client:a,queryKey:r}=n.createPromiseClient(jI,{method:"summary",params:[e,t]});return n.nanoquery.createFetcherStore(r,{fetcher:async(s,i,o,d)=>{var p;return(p=(await a.summary({eventId:o,userId:d})).data)==null?void 0:p.attributes}})},LI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"syncQuestion",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.syncQuestion({filter:{eventId:i}})).data)==null?void 0:d.attributes:void 0}})},PI=(e,t)=>{const{client:n}=t.createCallbackClient(rt),a=De.atom({eventId:e.get()||"",feedId:""});return e.subscribe((s="")=>{a.set({eventId:s,feedId:""})}),t.addSubscription(n.subscription,a,{name:"feedSubscription"})},UI=(e,t)=>{const{client:n}=t.createCallbackClient(rt);return t.addSubscription(n.questionSubscription,{questionId:e},{name:"questionSubscription"})},FI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d,m;return(m=(d=(await n.questionByUser({questionId:i})).data)==null?void 0:d.attributes)==null?void 0:m.question}})},zI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"pickHistory",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.pickHistory({eventId:i})).data)==null?void 0:d.map(({attributes:m})=>m):void 0}})},BI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"insightHistory",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.insightHistory({eventId:i})).data)==null?void 0:d.map(({attributes:m})=>m):void 0}})},GI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"submitAnswer"});return n.submitAnswer({data:t})},QI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"submitInplay"});return n.submitInplay({data:{eventId:+t}})},YI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"skipQuestion"});return n.skipQuestion({data:{id:t}})};class VI extends zu{constructor(n,a,r){super(n,a);A(this,"userSummary");A(this,"questions");A(this,"insights");A(this,"leaderboardId");A(this,"slStreamId");A(this,"userId");A(this,"organizationId");A(this,"openedQuestionId");A(this,"openedQuestion");A(this,"activeQuestionId");A(this,"moderationId");A(this,"feedId");A(this,"onbordingComplete");A(this,"notifications");A(this,"transport");A(this,"questionSubscription");A(this,"feedSubscription");A(this,"showOnbordingInApp",n=>{var i,o,d,m;if(console.log("onbordingComplete",n),n)return;const{inplayGame:a}=this.featureSettings.get();if(!a)return;const{titleCard:r,overview:s}=a;this.notifications.add({type:"_onboarding",id:"_",delay:1e5,data:{header:r==null?void 0:r.header,title:r==null?void 0:r.title,subtitle:r==null?void 0:r.subtitle,graphicBg:(i=r==null?void 0:r.appearance)==null?void 0:i.graphic,icon:(o=r==null?void 0:r.media)==null?void 0:o.icon,sponsorLogo:(d=r==null?void 0:r.media)==null?void 0:d.sponsorLogo,primaryColor:(m=s==null?void 0:s.appearance)==null?void 0:m.primaryColor}})});A(this,"getCurrentSessionIdPrefix",n=>{const a=n.eventId||this.slStreamId.get(),r=n.userId||this.userId.get();return`${n.organizationId||this.organizationId.get()}:${r}:${a}:${n.prefix||""}`});A(this,"connect",n=>{var a;this.userSummary=new ze(xI(this.slStreamId,this.userId,n),"gamification:userSummary"),this.questions=new ze(zI(this.slStreamId,n),"gamification:questions"),this.insights=new ze(BI(this.slStreamId,n),"gamification:insights"),this.activeQuestionId=new ze(LI(this.slStreamId,n),"gamification:activeQuestionId"),this.openedQuestion=new ze(FI(this.openedQuestionId,n),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(r=>{var s;r?(this.questionSubscription=UI(r,n),this.questionSubscription.addListener("feed-subscription-opened-question",i=>{window.requestAnimationFrame(()=>{var o,d,m,p,T;(m=this.openedQuestion)==null||m.getStore().mutate((d=(o=i.data)==null?void 0:o.attributes)==null?void 0:d.question),(p=this.openedQuestion)==null||p.getStore().invalidate(),(T=this.userSummary)==null||T.getStore().invalidate()})}),this.questionSubscription.connect()):(console.log("cleanup on close question"),(s=this.openedQuestion)==null||s.getStore().mutate(void 0),this.questionSubscription!==void 0&&n.removeSubscription(this.questionSubscription))}),(a=this.activeQuestionId)==null||a.listen(r=>{var s,i;console.log(r),this.onbordingComplete.get()&&(console.log("1"),(i=(s=r==null?void 0:r.data)==null?void 0:s.notification)!=null&&i.title&&r.data.question.status===kt.ACTIVE&&this.notifications.add({type:"_question",action:()=>this.openQuestion(r.data.question.id),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${r.data.question.id}`}),data:r.data}))}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=PI(this.slStreamId,n),this.feedSubscription.addListener("feed-subscription-active-question",r=>{window.requestAnimationFrame(()=>{var i,o;const s=(i=this.activeQuestionId)==null?void 0:i.getStore();s&&s.mutate((o=r.data)==null?void 0:o.attributes)})}),this.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var r;(r=this.questions)==null||r.invalidate()})})});A(this,"disconnect",()=>{var n,a;(n=this.questionSubscription)==null||n.disconnect(),(a=this.feedSubscription)==null||a.disconnect()});A(this,"submitInplay",async()=>{const n=this.slStreamId.get();n&&(await QI(this.transport,n),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${n}`,"true"))});A(this,"submitAnswer",async(n,a)=>{var r;await GI(this.transport,{questionId:n,answerId:a}),(r=this.questions)==null||r.invalidate()});A(this,"skipQuestion",async n=>{var a;await YI(this.transport,n),(a=this.questions)==null||a.invalidate()});A(this,"openQuestion",n=>{this.openedQuestionId.set(n),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${n}`}))});A(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new _e(we(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.slStreamId=r.stores.slStreamId.getAtomStore(),this.userId=r.stores.user.getAtomStore(),this.organizationId=r.stores.organizationSettings.getAtomStore(),this.moderationId=new _e(we(),"moderationId").getStore(),this.feedId=new _e(we(),"feedId").getStore(),this.onbordingComplete=new _e(we(!1),"onbordingComplete").getStore(),this.openedQuestionId=new _e(we(),"openedQuestionId").getStore(),this.notifications=r.notifications,this.transport=r.transport,!this.userId.get())this.userId.subscribe(s=>{s&&window.requestAnimationFrame(()=>{const o=!!localStorage.getItem(`sl-onbording:${s}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)})});else{const s=this.userId.get(),o=!!localStorage.getItem(`sl-onbording:${s}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)}this.status.subscribe(s=>{s===gt.Ready?this.connect(r.transport):this.disconnect()}),this.onbordingComplete.subscribe(s=>{var i;s&&((i=this.activeQuestionId)==null||i.invalidate())})}}class WI extends zu{}const qI=(e,t,n)=>e.type===ot.GAMES?new VI(e,t,n):new WI(e,t),HI=(e,t,n)=>{e.features=new Map,e.activeFeature=new _e(we(),"activeFeature"),e.sdk.getFeatures=()=>e.features,e.sdk.getActiveFeature=()=>e.activeFeature.getStore(),e.sdk.openFeature=a=>{e.activeFeature.setValue(a)},e.sdk.closeFeature=()=>{e.activeFeature.setValue(void 0)},e.initFeature=(a,r=jt.ORGANIZATION)=>{const s=qI(a,r,e);e.features.set(a.name,s)},e.updateFeature=(a,r)=>{var s;(s=e.features.get(a.name))==null||s.update(a,r)},e.destroyFeature=a=>{e.features.delete(a.name)},e.reinitializeFeatures=async()=>{const a=await e.stores.organizationSettings.getValue();e.features.clear();for(const r of(a==null?void 0:a.overlays)||[])e.initFeature(r,jt.ORGANIZATION)},e.stores.providerStreamId.listen(a=>{a||e.reinitializeFeatures()}),n()};var ns={exports:{}},as={exports:{}};function ZI(e){var t=new e,n=t;function a(){var s=t;return s.next?t=s.next:(t=new e,n=t),s.next=null,s}function r(s){n.next=s,n=s}return{get:a,release:r}}var KI=ZI,JI=KI;function ec(e,t,n){if(typeof e=="function"&&(n=t,t=e,e=null),n<1)throw new Error("fastqueue concurrency must be greater than 1");var a=JI(XI),r=null,s=null,i=0,o=null,d={push:b,drain:xe,saturated:xe,pause:p,paused:!1,concurrency:n,running:m,resume:k,idle:S,length:T,getQueue:y,unshift:R,empty:xe,kill:_,killAndDrain:L,error:P};return d;function m(){return i}function p(){d.paused=!0}function T(){for(var F=r,B=0;F;)F=F.next,B++;return B}function y(){for(var F=r,B=[];F;)B.push(F.value),F=F.next;return B}function k(){if(d.paused){d.paused=!1;for(var F=0;F<d.concurrency;F++)i++,$()}}function S(){return i===0&&d.length()===0}function b(F,B){var U=a.get();U.context=e,U.release=$,U.value=F,U.callback=B||xe,U.errorHandler=o,i===d.concurrency||d.paused?s?(s.next=U,s=U):(r=U,s=U,d.saturated()):(i++,t.call(e,U.value,U.worked))}function R(F,B){var U=a.get();U.context=e,U.release=$,U.value=F,U.callback=B||xe,i===d.concurrency||d.paused?r?(U.next=r,r=U):(r=U,s=U,d.saturated()):(i++,t.call(e,U.value,U.worked))}function $(F){F&&a.release(F);var B=r;B?d.paused?i--:(s===r&&(s=null),r=B.next,B.next=null,t.call(e,B.value,B.worked),s===null&&d.empty()):--i===0&&d.drain()}function _(){r=null,s=null,d.drain=xe}function L(){r=null,s=null,d.drain(),d.drain=xe}function P(F){o=F}}function xe(){}function XI(){this.value=null,this.callback=xe,this.next=null,this.release=xe,this.context=null,this.errorHandler=null;var e=this;this.worked=function(n,a){var r=e.callback,s=e.errorHandler,i=e.value;e.value=null,e.callback=xe,e.errorHandler&&s(n,i),r.call(e.context,n,a),e.release(e)}}function eS(e,t,n){typeof e=="function"&&(n=t,t=e,e=null);function a(p,T){t.call(this,p).then(function(y){T(null,y)},T)}var r=ec(e,a,n),s=r.push,i=r.unshift;return r.push=o,r.unshift=d,r.drained=m,r;function o(p){var T=new Promise(function(y,k){s(p,function(S,b){if(S){k(S);return}y(b)})});return T.catch(xe),T}function d(p){var T=new Promise(function(y,k){i(p,function(S,b){if(S){k(S);return}y(b)})});return T.catch(xe),T}function m(){if(r.idle())return new Promise(function(y){y()});var p=r.drain,T=new Promise(function(y){r.drain=function(){p(),y()}});return T}}as.exports=ec;as.exports.promise=eS;var tc=as.exports,rs={exports:{}},xt=typeof Reflect=="object"?Reflect:null,wo=xt&&typeof xt.apply=="function"?xt.apply:function(t,n,a){return Function.prototype.apply.call(t,n,a)},vn;xt&&typeof xt.ownKeys=="function"?vn=xt.ownKeys:Object.getOwnPropertySymbols?vn=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:vn=function(t){return Object.getOwnPropertyNames(t)};function tS(e){console&&console.warn&&console.warn(e)}var nc=Number.isNaN||function(t){return t!==t};function se(){se.init.call(this)}rs.exports=se;rs.exports.once=sS;se.EventEmitter=se;se.prototype._events=void 0;se.prototype._eventsCount=0;se.prototype._maxListeners=void 0;var Co=10;function oa(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(se,"defaultMaxListeners",{enumerable:!0,get:function(){return Co},set:function(e){if(typeof e!="number"||e<0||nc(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Co=e}});se.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};se.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||nc(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function ac(e){return e._maxListeners===void 0?se.defaultMaxListeners:e._maxListeners}se.prototype.getMaxListeners=function(){return ac(this)};se.prototype.emit=function(t){for(var n=[],a=1;a<arguments.length;a++)n.push(arguments[a]);var r=t==="error",s=this._events;if(s!==void 0)r=r&&s.error===void 0;else if(!r)return!1;if(r){var i;if(n.length>0&&(i=n[0]),i instanceof Error)throw i;var o=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw o.context=i,o}var d=s[t];if(d===void 0)return!1;if(typeof d=="function")wo(d,this,n);else for(var m=d.length,p=lc(d,m),a=0;a<m;++a)wo(p[a],this,n);return!0};function rc(e,t,n,a){var r,s,i;if(oa(n),s=e._events,s===void 0?(s=e._events=Object.create(null),e._eventsCount=0):(s.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),i===void 0)i=s[t]=n,++e._eventsCount;else if(typeof i=="function"?i=s[t]=a?[n,i]:[i,n]:a?i.unshift(n):i.push(n),r=ac(e),r>0&&i.length>r&&!i.warned){i.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=t,o.count=i.length,tS(o)}return e}se.prototype.addListener=function(t,n){return rc(this,t,n,!1)};se.prototype.on=se.prototype.addListener;se.prototype.prependListener=function(t,n){return rc(this,t,n,!0)};function nS(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function sc(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=nS.bind(a);return r.listener=n,a.wrapFn=r,r}se.prototype.once=function(t,n){return oa(n),this.on(t,sc(this,t,n)),this};se.prototype.prependOnceListener=function(t,n){return oa(n),this.prependListener(t,sc(this,t,n)),this};se.prototype.removeListener=function(t,n){var a,r,s,i,o;if(oa(n),r=this._events,r===void 0)return this;if(a=r[t],a===void 0)return this;if(a===n||a.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,a.listener||n));else if(typeof a!="function"){for(s=-1,i=a.length-1;i>=0;i--)if(a[i]===n||a[i].listener===n){o=a[i].listener,s=i;break}if(s<0)return this;s===0?a.shift():aS(a,s),a.length===1&&(r[t]=a[0]),r.removeListener!==void 0&&this.emit("removeListener",t,o||n)}return this};se.prototype.off=se.prototype.removeListener;se.prototype.removeAllListeners=function(t){var n,a,r;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[t]),this;if(arguments.length===0){var s=Object.keys(a),i;for(r=0;r<s.length;++r)i=s[r],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=a[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(r=n.length-1;r>=0;r--)this.removeListener(t,n[r]);return this};function ic(e,t,n){var a=e._events;if(a===void 0)return[];var r=a[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?rS(r):lc(r,r.length)}se.prototype.listeners=function(t){return ic(this,t,!0)};se.prototype.rawListeners=function(t){return ic(this,t,!1)};se.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):oc.call(e,t)};se.prototype.listenerCount=oc;function oc(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}se.prototype.eventNames=function(){return this._eventsCount>0?vn(this._events):[]};function lc(e,t){for(var n=new Array(t),a=0;a<t;++a)n[a]=e[a];return n}function aS(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function rS(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function sS(e,t){return new Promise(function(n,a){function r(i){e.removeListener(t,s),a(i)}function s(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}uc(e,t,s,{once:!0}),t!=="error"&&iS(e,r,{once:!0})})}function iS(e,t,n){typeof e.on=="function"&&uc(e,"error",t,n)}function uc(e,t,n,a){if(typeof e.on=="function")a.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(s){a.once&&e.removeEventListener(t,r),n(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var cc=rs.exports,la={},dc={},mc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),a=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var r=42;t[n]=r;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==r||i.enumerable!==!0)return!1}return!0},oS=mc,ss=function(){return oS()&&!!Symbol.toStringTag},Ro=typeof Symbol<"u"&&Symbol,lS=mc,uS=function(){return typeof Ro!="function"||typeof Symbol!="function"||typeof Ro("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lS()},jo={foo:{}},cS=Object,dS=function(){return{__proto__:jo}.foo===jo.foo&&!({__proto__:null}instanceof cS)},mS="Function.prototype.bind called on incompatible ",fS=Object.prototype.toString,pS=Math.max,yS="[object Function]",xo=function(t,n){for(var a=[],r=0;r<t.length;r+=1)a[r]=t[r];for(var s=0;s<n.length;s+=1)a[s+t.length]=n[s];return a},gS=function(t,n){for(var a=[],r=n||0,s=0;r<t.length;r+=1,s+=1)a[s]=t[r];return a},TS=function(e,t){for(var n="",a=0;a<e.length;a+=1)n+=e[a],a+1<e.length&&(n+=t);return n},hS=function(t){var n=this;if(typeof n!="function"||fS.apply(n)!==yS)throw new TypeError(mS+n);for(var a=gS(arguments,1),r,s=function(){if(this instanceof r){var p=n.apply(this,xo(a,arguments));return Object(p)===p?p:this}return n.apply(t,xo(a,arguments))},i=pS(0,n.length-a.length),o=[],d=0;d<i;d++)o[d]="$"+d;if(r=Function("binder","return function ("+TS(o,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var m=function(){};m.prototype=n.prototype,r.prototype=new m,m.prototype=null}return r},kS=hS,fc=Function.prototype.bind||kS,Lo={}.hasOwnProperty,_a=Function.prototype.call,NS=_a.bind?_a.bind(Lo):function(e,t){return _a.call(Lo,e,t)},K,Ut=SyntaxError,pc=Function,Lt=TypeError,wa=function(e){try{return pc('"use strict"; return ('+e+").constructor;")()}catch{}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch{Tt=null}var Ca=function(){throw new Lt},MS=Tt?function(){try{return arguments.callee,Ca}catch{try{return Tt(arguments,"callee").get}catch{return Ca}}}():Ca,At=uS(),IS=dS(),Te=Object.getPrototypeOf||(IS?function(e){return e.__proto__}:null),Dt={},SS=typeof Uint8Array>"u"||!Te?K:Te(Uint8Array),ht={"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":At&&Te?Te([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":Dt,"%AsyncGenerator%":Dt,"%AsyncGeneratorFunction%":Dt,"%AsyncIteratorPrototype%":Dt,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":pc,"%GeneratorFunction%":Dt,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":At&&Te?Te(Te([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!At||!Te?K:Te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!At||!Te?K:Te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":At&&Te?Te(""[Symbol.iterator]()):K,"%Symbol%":At?Symbol:K,"%SyntaxError%":Ut,"%ThrowTypeError%":MS,"%TypedArray%":SS,"%TypeError%":Lt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet};if(Te)try{null.error}catch(e){var bS=Te(Te(e));ht["%Error.prototype%"]=bS}var $S=function e(t){var n;if(t==="%AsyncFunction%")n=wa("async function () {}");else if(t==="%GeneratorFunction%")n=wa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=wa("async function* () {}");else if(t==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(n=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Te&&(n=Te(r.prototype))}return ht[t]=n,n},Po={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mn=fc,Pn=NS,vS=mn.call(Function.call,Array.prototype.concat),AS=mn.call(Function.apply,Array.prototype.splice),Uo=mn.call(Function.call,String.prototype.replace),Un=mn.call(Function.call,String.prototype.slice),ES=mn.call(Function.call,RegExp.prototype.exec),OS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DS=/\\(\\)?/g,_S=function(t){var n=Un(t,0,1),a=Un(t,-1);if(n==="%"&&a!=="%")throw new Ut("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&n!=="%")throw new Ut("invalid intrinsic syntax, expected opening `%`");var r=[];return Uo(t,OS,function(s,i,o,d){r[r.length]=o?Uo(d,DS,"$1"):i||s}),r},wS=function(t,n){var a=t,r;if(Pn(Po,a)&&(r=Po[a],a="%"+r[0]+"%"),Pn(ht,a)){var s=ht[a];if(s===Dt&&(s=$S(a)),typeof s>"u"&&!n)throw new Lt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:a,value:s}}throw new Ut("intrinsic "+t+" does not exist!")},Gt=function(t,n){if(typeof t!="string"||t.length===0)throw new Lt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lt('"allowMissing" argument must be a boolean');if(ES(/^%?[^%]*%?$/,t)===null)throw new Ut("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=_S(t),r=a.length>0?a[0]:"",s=wS("%"+r+"%",n),i=s.name,o=s.value,d=!1,m=s.alias;m&&(r=m[0],AS(a,vS([0,1],m)));for(var p=1,T=!0;p<a.length;p+=1){var y=a[p],k=Un(y,0,1),S=Un(y,-1);if((k==='"'||k==="'"||k==="`"||S==='"'||S==="'"||S==="`")&&k!==S)throw new Ut("property names with quotes must have matching quotes");if((y==="constructor"||!T)&&(d=!0),r+="."+y,i="%"+r+"%",Pn(ht,i))o=ht[i];else if(o!=null){if(!(y in o)){if(!n)throw new Lt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Tt&&p+1>=a.length){var b=Tt(o,y);T=!!b,T&&"get"in b&&!("originalValue"in b.get)?o=b.get:o=o[y]}else T=Pn(o,y),o=o[y];T&&!d&&(ht[i]=o)}}return o},yc={exports:{}},CS=Gt,Mr=CS("%Object.defineProperty%",!0),Ir=function(){if(Mr)try{return Mr({},"a",{value:1}),!0}catch{return!1}return!1};Ir.hasArrayLengthDefineBug=function(){if(!Ir())return null;try{return Mr([],"length",{value:1}).length!==1}catch{return!0}};var gc=Ir,RS=Gt,An=RS("%Object.getOwnPropertyDescriptor%",!0);if(An)try{An([],"length")}catch{An=null}var is=An,jS=gc(),os=Gt,nn=jS&&os("%Object.defineProperty%",!0);if(nn)try{nn({},"a",{value:1})}catch{nn=!1}var xS=os("%SyntaxError%"),Et=os("%TypeError%"),Fo=is,LS=function(t,n,a){if(!t||typeof t!="object"&&typeof t!="function")throw new Et("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Et("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Et("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Et("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Et("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Et("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,d=!!Fo&&Fo(t,n);if(nn)nn(t,n,{configurable:i===null&&d?d.configurable:!i,enumerable:r===null&&d?d.enumerable:!r,value:a,writable:s===null&&d?d.writable:!s});else if(o||!r&&!s&&!i)t[n]=a;else throw new xS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Tc=Gt,zo=LS,PS=gc(),Bo=is,Go=Tc("%TypeError%"),US=Tc("%Math.floor%"),FS=function(t,n){if(typeof t!="function")throw new Go("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||US(n)!==n)throw new Go("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],r=!0,s=!0;if("length"in t&&Bo){var i=Bo(t,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(s=!1)}return(r||s||!a)&&(PS?zo(t,"length",n,!0,!0):zo(t,"length",n)),t};(function(e){var t=fc,n=Gt,a=FS,r=n("%TypeError%"),s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,s),d=n("%Object.defineProperty%",!0),m=n("%Math.max%");if(d)try{d({},"a",{value:1})}catch{d=null}e.exports=function(y){if(typeof y!="function")throw new r("a function is required");var k=o(t,i,arguments);return a(k,1+m(0,y.length-(arguments.length-1)),!0)};var p=function(){return o(t,s,arguments)};d?d(e.exports,"apply",{value:p}):e.exports.apply=p})(yc);var hc=yc.exports,kc=Gt,Nc=hc,zS=Nc(kc("String.prototype.indexOf")),Mc=function(t,n){var a=kc(t,!!n);return typeof a=="function"&&zS(t,".prototype.")>-1?Nc(a):a},BS=ss(),GS=Mc,Sr=GS("Object.prototype.toString"),ua=function(t){return BS&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Sr(t)==="[object Arguments]"},Ic=function(t){return ua(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Sr(t)!=="[object Array]"&&Sr(t.callee)==="[object Function]"},QS=function(){return ua(arguments)}();ua.isLegacyArguments=Ic;var YS=QS?ua:Ic,VS=Object.prototype.toString,WS=Function.prototype.toString,qS=/^\s*(?:function)?\*/,Sc=ss(),Ra=Object.getPrototypeOf,HS=function(){if(!Sc)return!1;try{return Function("return function*() {}")()}catch{}},ja,ZS=function(t){if(typeof t!="function")return!1;if(qS.test(WS.call(t)))return!0;if(!Sc){var n=VS.call(t);return n==="[object GeneratorFunction]"}if(!Ra)return!1;if(typeof ja>"u"){var a=HS();ja=a?Ra(a):!1}return Ra(t)===ja},bc=Function.prototype.toString,Ct=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,br,En;if(typeof Ct=="function"&&typeof Object.defineProperty=="function")try{br=Object.defineProperty({},"length",{get:function(){throw En}}),En={},Ct(function(){throw 42},null,br)}catch(e){e!==En&&(Ct=null)}else Ct=null;var KS=/^\s*class\b/,$r=function(t){try{var n=bc.call(t);return KS.test(n)}catch{return!1}},xa=function(t){try{return $r(t)?!1:(bc.call(t),!0)}catch{return!1}},On=Object.prototype.toString,JS="[object Object]",XS="[object Function]",eb="[object GeneratorFunction]",tb="[object HTMLAllCollection]",nb="[object HTML document.all class]",ab="[object HTMLCollection]",rb=typeof Symbol=="function"&&!!Symbol.toStringTag,sb=!(0 in[,]),vr=function(){return!1};if(typeof document=="object"){var ib=document.all;On.call(ib)===On.call(document.all)&&(vr=function(t){if((sb||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=On.call(t);return(n===tb||n===nb||n===ab||n===JS)&&t("")==null}catch{}return!1})}var ob=Ct?function(t){if(vr(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Ct(t,null,br)}catch(n){if(n!==En)return!1}return!$r(t)&&xa(t)}:function(t){if(vr(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(rb)return xa(t);if($r(t))return!1;var n=On.call(t);return n!==XS&&n!==eb&&!/^\[object HTML/.test(n)?!1:xa(t)},lb=ob,ub=Object.prototype.toString,$c=Object.prototype.hasOwnProperty,cb=function(t,n,a){for(var r=0,s=t.length;r<s;r++)$c.call(t,r)&&(a==null?n(t[r],r,t):n.call(a,t[r],r,t))},db=function(t,n,a){for(var r=0,s=t.length;r<s;r++)a==null?n(t.charAt(r),r,t):n.call(a,t.charAt(r),r,t)},mb=function(t,n,a){for(var r in t)$c.call(t,r)&&(a==null?n(t[r],r,t):n.call(a,t[r],r,t))},fb=function(t,n,a){if(!lb(n))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=a),ub.call(t)==="[object Array]"?cb(t,n,r):typeof t=="string"?db(t,n,r):mb(t,n,r)},pb=fb,La=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],yb=typeof globalThis>"u"?Xo:globalThis,gb=function(){for(var t=[],n=0;n<La.length;n++)typeof yb[La[n]]=="function"&&(t[t.length]=La[n]);return t},Fn=pb,Tb=gb,Qo=hc,ls=Mc,Dn=is,hb=ls("Object.prototype.toString"),vc=ss(),Yo=typeof globalThis>"u"?Xo:globalThis,Ar=Tb(),us=ls("String.prototype.slice"),Pa=Object.getPrototypeOf,kb=ls("Array.prototype.indexOf",!0)||function(t,n){for(var a=0;a<t.length;a+=1)if(t[a]===n)return a;return-1},zn={__proto__:null};vc&&Dn&&Pa?Fn(Ar,function(e){var t=new Yo[e];if(Symbol.toStringTag in t){var n=Pa(t),a=Dn(n,Symbol.toStringTag);if(!a){var r=Pa(n);a=Dn(r,Symbol.toStringTag)}zn["$"+e]=Qo(a.get)}}):Fn(Ar,function(e){var t=new Yo[e],n=t.slice||t.set;n&&(zn["$"+e]=Qo(n))});var Nb=function(t){var n=!1;return Fn(zn,function(a,r){if(!n)try{"$"+a(t)===r&&(n=us(r,1))}catch{}}),n},Mb=function(t){var n=!1;return Fn(zn,function(a,r){if(!n)try{a(t),n=us(r,1)}catch{}}),n},Ac=function(t){if(!t||typeof t!="object")return!1;if(!vc){var n=us(hb(t),8,-1);return kb(Ar,n)>-1?n:n!=="Object"?!1:Mb(t)}return Dn?Nb(t):null},Ib=Ac,Sb=function(t){return!!Ib(t)};(function(e){var t=YS,n=ZS,a=Ac,r=Sb;function s(w){return w.call.bind(w)}var i=typeof BigInt<"u",o=typeof Symbol<"u",d=s(Object.prototype.toString),m=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),T=s(Boolean.prototype.valueOf);if(i)var y=s(BigInt.prototype.valueOf);if(o)var k=s(Symbol.prototype.valueOf);function S(w,pn){if(typeof w!="object")return!1;try{return pn(w),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=r;function b(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}e.isPromise=b;function R(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):r(w)||O(w)}e.isArrayBufferView=R;function $(w){return a(w)==="Uint8Array"}e.isUint8Array=$;function _(w){return a(w)==="Uint8ClampedArray"}e.isUint8ClampedArray=_;function L(w){return a(w)==="Uint16Array"}e.isUint16Array=L;function P(w){return a(w)==="Uint32Array"}e.isUint32Array=P;function F(w){return a(w)==="Int8Array"}e.isInt8Array=F;function B(w){return a(w)==="Int16Array"}e.isInt16Array=B;function U(w){return a(w)==="Int32Array"}e.isInt32Array=U;function V(w){return a(w)==="Float32Array"}e.isFloat32Array=V;function q(w){return a(w)==="Float64Array"}e.isFloat64Array=q;function J(w){return a(w)==="BigInt64Array"}e.isBigInt64Array=J;function re(w){return a(w)==="BigUint64Array"}e.isBigUint64Array=re;function ce(w){return d(w)==="[object Map]"}ce.working=typeof Map<"u"&&ce(new Map);function oe(w){return typeof Map>"u"?!1:ce.working?ce(w):w instanceof Map}e.isMap=oe;function H(w){return d(w)==="[object Set]"}H.working=typeof Set<"u"&&H(new Set);function le(w){return typeof Set>"u"?!1:H.working?H(w):w instanceof Set}e.isSet=le;function Me(w){return d(w)==="[object WeakMap]"}Me.working=typeof WeakMap<"u"&&Me(new WeakMap);function Ee(w){return typeof WeakMap>"u"?!1:Me.working?Me(w):w instanceof WeakMap}e.isWeakMap=Ee;function Oe(w){return d(w)==="[object WeakSet]"}Oe.working=typeof WeakSet<"u"&&Oe(new WeakSet);function Ie(w){return Oe(w)}e.isWeakSet=Ie;function be(w){return d(w)==="[object ArrayBuffer]"}be.working=typeof ArrayBuffer<"u"&&be(new ArrayBuffer);function ee(w){return typeof ArrayBuffer>"u"?!1:be.working?be(w):w instanceof ArrayBuffer}e.isArrayBuffer=ee;function M(w){return d(w)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function O(w){return typeof DataView>"u"?!1:M.working?M(w):w instanceof DataView}e.isDataView=O;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function G(w){return d(w)==="[object SharedArrayBuffer]"}function X(w){return typeof j>"u"?!1:(typeof G.working>"u"&&(G.working=G(new j)),G.working?G(w):w instanceof j)}e.isSharedArrayBuffer=X;function te(w){return d(w)==="[object AsyncFunction]"}e.isAsyncFunction=te;function Y(w){return d(w)==="[object Map Iterator]"}e.isMapIterator=Y;function Z(w){return d(w)==="[object Set Iterator]"}e.isSetIterator=Z;function ne(w){return d(w)==="[object Generator]"}e.isGeneratorObject=ne;function Se(w){return d(w)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=Se;function Qe(w){return S(w,m)}e.isNumberObject=Qe;function Le(w){return S(w,p)}e.isStringObject=Le;function Re(w){return S(w,T)}e.isBooleanObject=Re;function It(w){return i&&S(w,y)}e.isBigIntObject=It;function fn(w){return o&&S(w,k)}e.isSymbolObject=fn;function Yt(w){return Qe(w)||Le(w)||Re(w)||It(w)||fn(w)}e.isBoxedPrimitive=Yt;function ca(w){return typeof Uint8Array<"u"&&(ee(w)||X(w))}e.isAnyArrayBuffer=ca,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(e,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})})(dc);var bb=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Er={exports:{}};typeof Object.create=="function"?Er.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Er.exports=function(t,n){if(n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t}};var $b=Er.exports;(function(e){var t=Object.getOwnPropertyDescriptors||function(O){for(var j=Object.keys(O),G={},X=0;X<j.length;X++)G[j[X]]=Object.getOwnPropertyDescriptor(O,j[X]);return G},n=/%[sdj%]/g;e.format=function(M){if(!F(M)){for(var O=[],j=0;j<arguments.length;j++)O.push(i(arguments[j]));return O.join(" ")}for(var j=1,G=arguments,X=G.length,te=String(M).replace(n,function(Z){if(Z==="%%")return"%";if(j>=X)return Z;switch(Z){case"%s":return String(G[j++]);case"%d":return Number(G[j++]);case"%j":try{return JSON.stringify(G[j++])}catch{return"[Circular]"}default:return Z}}),Y=G[j];j<X;Y=G[++j])_(Y)||!q(Y)?te+=" "+Y:te+=" "+i(Y);return te},e.deprecate=function(M,O){if(typeof Q.process<"u"&&Q.process.noDeprecation===!0)return M;if(typeof Q.process>"u")return function(){return e.deprecate(M,O).apply(this,arguments)};var j=!1;function G(){if(!j){if(Q.process.throwDeprecation)throw new Error(O);Q.process.traceDeprecation?console.trace(O):console.error(O),j=!0}return M.apply(this,arguments)}return G};var a={},r=/^$/;if(Q.process.env.NODE_DEBUG){var s=Q.process.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),r=new RegExp("^"+s+"$","i")}e.debuglog=function(M){if(M=M.toUpperCase(),!a[M])if(r.test(M)){var O=Q.process.pid;a[M]=function(){var j=e.format.apply(e,arguments);console.error("%s %d: %s",M,O,j)}}else a[M]=function(){};return a[M]};function i(M,O){var j={seen:[],stylize:d};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),$(O)?j.showHidden=O:O&&e._extend(j,O),U(j.showHidden)&&(j.showHidden=!1),U(j.depth)&&(j.depth=2),U(j.colors)&&(j.colors=!1),U(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=o),p(j,M,j.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(M,O){var j=i.styles[O];return j?"\x1B["+i.colors[j][0]+"m"+M+"\x1B["+i.colors[j][1]+"m":M}function d(M,O){return M}function m(M){var O={};return M.forEach(function(j,G){O[j]=!0}),O}function p(M,O,j){if(M.customInspect&&O&&ce(O.inspect)&&O.inspect!==e.inspect&&!(O.constructor&&O.constructor.prototype===O)){var G=O.inspect(j,M);return F(G)||(G=p(M,G,j)),G}var X=T(M,O);if(X)return X;var te=Object.keys(O),Y=m(te);if(M.showHidden&&(te=Object.getOwnPropertyNames(O)),re(O)&&(te.indexOf("message")>=0||te.indexOf("description")>=0))return y(O);if(te.length===0){if(ce(O)){var Z=O.name?": "+O.name:"";return M.stylize("[Function"+Z+"]","special")}if(V(O))return M.stylize(RegExp.prototype.toString.call(O),"regexp");if(J(O))return M.stylize(Date.prototype.toString.call(O),"date");if(re(O))return y(O)}var ne="",Se=!1,Qe=["{","}"];if(R(O)&&(Se=!0,Qe=["[","]"]),ce(O)){var Le=O.name?": "+O.name:"";ne=" [Function"+Le+"]"}if(V(O)&&(ne=" "+RegExp.prototype.toString.call(O)),J(O)&&(ne=" "+Date.prototype.toUTCString.call(O)),re(O)&&(ne=" "+y(O)),te.length===0&&(!Se||O.length==0))return Qe[0]+ne+Qe[1];if(j<0)return V(O)?M.stylize(RegExp.prototype.toString.call(O),"regexp"):M.stylize("[Object]","special");M.seen.push(O);var Re;return Se?Re=k(M,O,j,Y,te):Re=te.map(function(It){return S(M,O,j,Y,It,Se)}),M.seen.pop(),b(Re,ne,Qe)}function T(M,O){if(U(O))return M.stylize("undefined","undefined");if(F(O)){var j="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(j,"string")}if(P(O))return M.stylize(""+O,"number");if($(O))return M.stylize(""+O,"boolean");if(_(O))return M.stylize("null","null")}function y(M){return"["+Error.prototype.toString.call(M)+"]"}function k(M,O,j,G,X){for(var te=[],Y=0,Z=O.length;Y<Z;++Y)Oe(O,String(Y))?te.push(S(M,O,j,G,String(Y),!0)):te.push("");return X.forEach(function(ne){ne.match(/^\d+$/)||te.push(S(M,O,j,G,ne,!0))}),te}function S(M,O,j,G,X,te){var Y,Z,ne;if(ne=Object.getOwnPropertyDescriptor(O,X)||{value:O[X]},ne.get?ne.set?Z=M.stylize("[Getter/Setter]","special"):Z=M.stylize("[Getter]","special"):ne.set&&(Z=M.stylize("[Setter]","special")),Oe(G,X)||(Y="["+X+"]"),Z||(M.seen.indexOf(ne.value)<0?(_(j)?Z=p(M,ne.value,null):Z=p(M,ne.value,j-1),Z.indexOf(`
38
+ `);for(const a of n){if(a==="")continue;const r=a.indexOf(":");if(r>0){const s=a.substring(0,r).trim(),i=a.substring(r+1).trim();t.append(s,i)}}return t}const m0="Content-Type",f0="Grpc-Timeout",$u="Grpc-Status",vu="Grpc-Message",p0="Grpc-Status-Details-Bin",y0="User-Agent",g0="X-User-Agent",T0="X-Grpc-Web",h0="application/grpc-web+proto",k0="application/grpc-web+json";class et extends Ze{constructor(t){super(),this.code=0,this.message="",this.details=[],l.util.initPartial(t,this)}static fromBinary(t,n){return new et().fromBinary(t,n)}static fromJson(t,n){return new et().fromJson(t,n)}static fromJsonString(t,n){return new et().fromJsonString(t,n)}static equals(t,n){return l.util.equals(et,t,n)}}et.runtime=l;et.typeName="google.rpc.Status";et.fields=l.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:He,repeated:!0}]);const N0="0";function Au(e){var t;const n=e.get(p0);if(n!=null){const r=Zg(n,et);if(r.code==0)return;const s=new ye(r.message,r.code,e);return s.details=r.details.map(i=>({type:i.typeUrl.substring(i.typeUrl.lastIndexOf("/")+1),value:i.value})),s}const a=e.get($u);if(a!=null){if(a===N0)return;const r=parseInt(a,10);return r in ae?new ye(decodeURIComponent((t=e.get(vu))!==null&&t!==void 0?t:""),r,e):new ye(`invalid grpc-status: ${a}`,ae.Internal,e)}}function xi(e,t,n){const a=typeof t=="string"?t:t.typeName,r=typeof n=="string"?n:n.name;return e.toString().replace(/\/?$/,`/${a}/${r}`)}function Eu(e,t){return t instanceof Ze?t:new e(t)}function M0(e,t){function n(a){return a.done===!0?a:{done:a.done,value:Eu(e,a.value)}}return{[Symbol.asyncIterator](){const a=t[Symbol.asyncIterator](),r={next:()=>a.next().then(n)};return a.throw!==void 0&&(r.throw=s=>a.throw(s).then(n)),a.return!==void 0&&(r.return=s=>a.return(s).then(n)),r}}}function I0(e){var t;const n=Object.assign({},e);return(t=n.ignoreUnknownFields)!==null&&t!==void 0||(n.ignoreUnknownFields=!0),n}function Li(e,t,n,a){const r=t?Pi(e.I,a):Ui(e.I,n);return{parse:(t?Pi(e.O,a):Ui(e.O,n)).parse,serialize:r.serialize}}function Pi(e,t){return{parse(n){try{return e.fromBinary(n,t)}catch(a){const r=a instanceof Error?a.message:String(a);throw new ye(`parse binary: ${r}`,ae.InvalidArgument)}},serialize(n){try{return n.toBinary(t)}catch(a){const r=a instanceof Error?a.message:String(a);throw new ye(`serialize binary: ${r}`,ae.Internal)}}}}function Ui(e,t){var n,a;const r=(n=t==null?void 0:t.textEncoder)!==null&&n!==void 0?n:new TextEncoder,s=(a=t==null?void 0:t.textDecoder)!==null&&a!==void 0?a:new TextDecoder,i=I0(t);return{parse(o){try{const d=s.decode(o);return e.fromJsonString(d,i)}catch(d){throw ye.from(d,ae.InvalidArgument)}},serialize(o){try{const d=o.toJsonString(i);return r.encode(d)}catch(d){throw ye.from(d,ae.Internal)}}}}function S0(e){const t=Du(e.next,e.interceptors),[n,a,r]=Ou(e),s=Object.assign(Object.assign({},e.req),{message:Eu(e.req.method.I,e.req.message),signal:n});return t(s).then(i=>(r(),i),a)}function b0(e){const t=Du(e.next,e.interceptors),[n,a,r]=Ou(e),s=Object.assign(Object.assign({},e.req),{message:M0(e.req.method.I,e.req.message),signal:n});let i=!1;return n.addEventListener("abort",function(){var o,d;const m=e.req.message[Symbol.asyncIterator]();i||(o=m.throw)===null||o===void 0||o.call(m,this.reason).catch(()=>{}),(d=m.return)===null||d===void 0||d.call(m).catch(()=>{})}),t(s).then(o=>Object.assign(Object.assign({},o),{message:{[Symbol.asyncIterator](){const d=o.message[Symbol.asyncIterator]();return{next(){return d.next().then(m=>(m.done==!0&&(i=!0,r()),m),a)}}}}}),a)}function Ou(e){const{signal:t,cleanup:n}=d0(e.timeoutMs),a=c0(e.signal,t);return[a.signal,function(s){const i=ye.from(t.aborted?bu(t):s);return a.abort(i),n(),Promise.reject(i)},function(){n(),a.abort()}]}function Du(e,t){var n;return(n=t==null?void 0:t.concat().reverse().reduce((a,r)=>r(a),e))!==null&&n!==void 0?n:e}function $0(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Fi(e){const t=Au(e);if(t)throw t}function zi(e,t,n){const a=new Headers(n??{});return a.set(m0,e?h0:k0),a.set(T0,"1"),a.set(g0,"connect-es/1.1.2"),a.set(y0,"connect-es/1.1.2"),t!==void 0&&a.set(f0,`${t}m`),a}function v0(e){switch(e){case 400:return ae.Internal;case 401:return ae.Unauthenticated;case 403:return ae.PermissionDenied;case 404:return ae.Unimplemented;case 429:return ae.Unavailable;case 502:return ae.Unavailable;case 503:return ae.Unavailable;case 504:return ae.Unavailable;default:return ae.Unknown}}function Bi(e,t){var n;if(e>=200&&e<300){const a=Au(t);if(a)throw a;return{foundStatus:t.has($u)}}throw new ye(decodeURIComponent((n=t.get(vu))!==null&&n!==void 0?n:`HTTP ${e}`),v0(e),t)}var yt=globalThis&&globalThis.__await||function(e){return this instanceof yt?(this.v=e,this):new yt(e)},A0=globalThis&&globalThis.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(e,t||[]),r,s=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(y){a[y]&&(r[y]=function(k){return new Promise(function(S,b){s.push([y,k,S,b])>1||o(y,k)})})}function o(y,k){try{d(a[y](k))}catch(S){T(s[0][3],S)}}function d(y){y.value instanceof yt?Promise.resolve(y.value.v).then(m,p):T(s[0][2],y)}function m(y){o("next",y)}function p(y){o("throw",y)}function T(y,k){y(k),s.shift(),s.length&&o(s[0][0],s[0][1])}};function Xn(e){var t;$0();const n=(t=e.useBinaryFormat)!==null&&t!==void 0?t:!0;return{async unary(a,r,s,i,o,d,m){var p;const{serialize:T,parse:y}=Li(r,n,e.jsonOptions,e.binaryOptions);return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,await S0({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!1,service:a,method:r,url:xi(e.baseUrl,a,r),init:{method:"POST",credentials:(p=e.credentials)!==null&&p!==void 0?p:"same-origin",redirect:"error",mode:"cors"},header:zi(n,i,o),contextValues:m??Ri(),message:d},next:async k=>{var S;const R=await((S=e.fetch)!==null&&S!==void 0?S:globalThis.fetch)(k.url,Object.assign(Object.assign({},k.init),{headers:k.header,signal:k.signal,body:Ci(0,T(k.message))}));if(Bi(R.status,R.headers),!R.body)throw"missing response body";const $=wi(R.body).getReader();let _,L;for(;;){const P=await $.read();if(P.done)break;const{flags:F,data:B}=P.value;if(F===Ma){if(_!==void 0)throw"extra trailer";_=ji(B);continue}if(L!==void 0)throw"extra message";L=y(B)}if(_===void 0)throw"missing trailer";if(Fi(_),L===void 0)throw"missing message";return{stream:!1,header:R.headers,message:L,trailer:_}}})},async stream(a,r,s,i,o,d,m){var p;const{serialize:T,parse:y}=Li(r,n,e.jsonOptions,e.binaryOptions);function k(b,R,$){return A0(this,arguments,function*(){const L=wi(b).getReader();if(R){if(!(yield yt(L.read())).done)throw"extra data for trailers-only";return yield yt(void 0)}let P=!1;for(;;){const F=yield yt(L.read());if(F.done)break;const{flags:B,data:U}=F.value;if((B&Ma)===Ma){if(P)throw"extra trailer";P=!0;const V=ji(U);Fi(V),V.forEach((q,J)=>$.set(J,q));continue}if(P)throw"extra message";yield yield yt(y(U))}if(!P)throw"missing trailer"})}async function S(b){if(r.kind!=z.ServerStreaming)throw"The fetch API does not support streaming request bodies";const R=await b[Symbol.asyncIterator]().next();if(R.done==!0)throw"missing request message";return Ci(0,T(R.value))}return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,b0({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!0,service:a,method:r,url:xi(e.baseUrl,a,r),init:{method:"POST",credentials:(p=e.credentials)!==null&&p!==void 0?p:"same-origin",redirect:"error",mode:"cors"},header:zi(n,i,o),contextValues:m??Ri(),message:d},next:async b=>{var R;const _=await((R=e.fetch)!==null&&R!==void 0?R:globalThis.fetch)(b.url,Object.assign(Object.assign({},b.init),{headers:b.header,signal:b.signal,body:await S(b.message)})),{foundStatus:L}=Bi(_.status,_.headers);if(!_.body)throw"missing response body";const P=new Headers;return Object.assign(Object.assign({},b),{header:_.headers,trailer:P,message:k(_.body,L,P)})}})}}}const E0=l.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),O0=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),D0=l.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:O0},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const _0=l.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:l.getEnumType(E0)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),w0=l.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:_0}]),zr=l.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:D0}]);l.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:w0}]);const C0=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),R0=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:j0},{no:2,name:"data",kind:"message",T:zr}]),j0=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),x0=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),L0=l.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),P0=l.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:L0}]),U0=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),F0=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),z0=l.makeMessageType("streamlayer.users.MeRequest",[]),B0=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:zr}]),G0=l.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Q0=l.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),Y0=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),V0=l.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),W0=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),q0=l.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),H0=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Z0=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),K0=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:J0}]),J0=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),X0=l.makeMessageType("streamlayer.users.InviteResponse",[]),e1=l.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),t1=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:n1},{no:2,name:"data",kind:"message",T:zr,opt:!0}]),n1=l.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Br={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:C0,O:R0,kind:z.Unary},register:{name:"Register",I:x0,O:P0,kind:z.Unary},requestPassword:{name:"RequestPassword",I:U0,O:F0,kind:z.Unary},me:{name:"Me",I:z0,O:B0,kind:z.Unary},invite:{name:"Invite",I:K0,O:X0,kind:z.Unary},bypassAuth:{name:"BypassAuth",I:e1,O:t1,kind:z.Unary},updateMetadata:{name:"UpdateMetadata",I:G0,O:Z0,kind:z.Unary},updateAvatar:{name:"UpdateAvatar",I:Q0,O:Y0,kind:z.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:V0,O:W0,kind:z.Unary},updatePublicName:{name:"UpdatePublicName",I:q0,O:H0,kind:z.Unary}}},a1=async(e,t)=>{const n=Xn({baseUrl:e});return await Jn(Br,n).requestPassword({id:t}),!0},r1=async(e,t)=>{const n=Xn({baseUrl:e});return await Jn(Br,n).register({id:t}),!0},s1=async(e,t,n)=>{var i;const a=Xn({baseUrl:e}),s=await Jn(Br,a).login({id:t,password:n});return(i=s==null?void 0:s.meta)==null?void 0:i.jwt};const i1=v("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Gi=v("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),Qi=v("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Ia=v("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Sa=v("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),o1=v("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),l1=v("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),u1=({login:e,anonymousLogin:t,host:n})=>{const[a,r]=C.useState(""),[s,i]=C.useState(""),[o,d]=C.useState(""),m=Lc({acceptedCharacters:/^[0-9]$/,length:4,value:o,onChange:d}),p=async y=>{y.preventDefault();try{const k=a.replaceAll("+","");try{await a1(n,k)}catch{await r1(n,k)}i(k)}catch(k){window.alert(k)}},T=async y=>{if(y.preventDefault(),s&&o)try{const k=await s1(n,s,o);k&&e?await e(k):console.log("token",k)}catch(k){window.alert(k)}};return h.jsxs(i1,{children:[!s&&h.jsxs("div",{children:[h.jsxs(Gi,{onSubmit:p,children:[h.jsx(Qi,{children:"Enter your phone number"}),h.jsx(Ia,{children:"Enter your phone up for number to log in or sign an account."}),h.jsx(o1,{children:h.jsx(Py,{value:a,onChange:y=>r(`${y}`)})}),h.jsx(Sa,{disabled:!Fy(a),type:"submit",children:"request code"})]}),t&&h.jsx(Sa,{style:{display:"block",margin:"auto"},onClick:t,children:"anonymous login"})]}),s&&h.jsxs(Gi,{onSubmit:T,children:[h.jsx(Qi,{children:"Enter Verification Code"}),h.jsxs(Ia,{children:["Please enter the verification code ",h.jsx("br",{}),"sent to ",h.jsx("b",{children:Uy(a)})]}),h.jsxs(l1,{children:[h.jsx("input",{autoFocus:!0,inputMode:"decimal",...m[0]}),h.jsx("input",{inputMode:"decimal",...m[1]}),h.jsx("input",{inputMode:"decimal",...m[2]}),h.jsx("input",{inputMode:"decimal",...m[3]})]}),h.jsx(Sa,{disabled:o.length!==4,type:"submit",children:"login"}),h.jsxs(Ia,{children:["Didn't get 59 the code? ",h.jsx("br",{}),"Resend Code in",h.jsx(eu,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const c1=v("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),d1=v("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),m1=v("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),f1=v("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),p1=v("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),y1=v("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),g1=v("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),T1=v("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),h1=v("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),k1=v("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const N1=v("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),M1=v("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),I1=v("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),S1=v("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),b1=({graphic:e,headline:t})=>h.jsx(N1,{children:h.jsxs(M1,{children:[h.jsx(I1,{alt:"graphic-img-instrucrions",src:e}),h.jsx(S1,{children:t})]})});const $1=v("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),v1=v("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),A1=v("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),E1=v("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),O1=v("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),D1=v("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),_1=({rules:e,rulesTitle:t,primaryColor:n})=>h.jsxs($1,{children:[h.jsx(v1,{children:t}),h.jsx(A1,{children:e==null?void 0:e.map((a,r)=>h.jsxs(E1,{children:[h.jsx(O1,{style:{backgroundColor:n},children:r+1}),h.jsx(D1,{children:a})]},r))})]}),w1="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const C1=v("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),R1=v("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),j1=v("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),x1=v("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),L1=v("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),P1=v("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),U1=v("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),F1=({inviteCardTitle:e,inviteCardSubtext:t,primaryColor:n})=>h.jsx(C1,{children:h.jsxs(R1,{children:[h.jsx(j1,{style:{backgroundColor:n},children:h.jsx(x1,{alt:"invite-game-icon",src:w1})}),h.jsx(L1,{children:e||""}),h.jsx(P1,{children:t||""}),h.jsx(U1,{onClick:()=>{},style:{backgroundColor:n},children:"Invite friends!"})]})}),vt={steps:!1,rules:!1,inviteCard:!1},z1=({gamification:e,closeFeature:t,steps:n,gameIcon:a,sponsorLogo:r,rules:s,rulesBtnLabel:i,rulesTitle:o,primaryColor:d,inviteCardTitle:m,inviteCardSubtext:p,inviteCardBtnLabel:T})=>{const y=async()=>{await e.submitInplay()},k=()=>{t()},[S,b]=C.useState(0),[R,$]=C.useState(vt);C.useEffect(()=>{n!=null&&n.length?$({...vt,steps:!0}):s!=null&&s.length?$({...vt,rules:!0}):$({...vt,inviteCard:!0})},[]);const _=C.useCallback(()=>{n!=null&&n.length&&S<n.length-1?b(L=>++L):s!=null&&s.length&&R.steps?$({...vt,rules:!0}):R.rules&&$({...vt,inviteCard:!0})},[S,n==null?void 0:n.length,s==null?void 0:s.length,R,b,$]);return h.jsxs(c1,{children:[h.jsxs(m1,{children:[h.jsx(f1,{children:a&&h.jsx(y1,{alt:"sponsor-one-onboarding-icon",src:a})}),h.jsxs(p1,{children:[r&&h.jsx(g1,{alt:"sponsor-two-onboarding-icon",src:r}),h.jsx(T1,{onClick:k,children:h.jsx(h1,{alt:"icon-close-onboarding",src:Cr})})]})]}),h.jsxs(d1,{children:[R.steps&&(n==null?void 0:n.length)&&h.jsx(b1,{graphic:n[S].graphic,headline:n[S].headline}),R.rules&&h.jsx(_1,{rules:s,rulesTitle:o,primaryColor:d}),R.inviteCard&&h.jsx(F1,{inviteCardTitle:m,inviteCardSubtext:p,primaryColor:d})]}),h.jsx(k1,{onClick:R.inviteCard?y:_,children:R.rules?i||"Got it!":R.inviteCard?T||"Play now!":"Next"})]})},Ce=l.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),B1=l.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),kt=l.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),G1=l.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),Q1=l.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),cn=l.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),_u=l.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),Y1=l.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),V1=l.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),W1=l.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),q1=l.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),H1=l.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Z1=l.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),K1=l.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),Gr=l.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:l.getEnumType(Q1)},{no:2,name:"images",kind:"enum",T:l.getEnumType(cn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:l.getEnumType(G1)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Bt=l.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ea=l.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:l.getEnumType(_u)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),J1=l.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),X1=l.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),lt=l.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),eT=l.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),tT=l.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),nT=l.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),aT=l.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:nT}]),Qr=l.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:rT,oneof:"options"},{no:2,name:"trivia",kind:"message",T:sT,oneof:"options"},{no:3,name:"prediction",kind:"message",T:iT,oneof:"options"},{no:4,name:"factoid",kind:"message",T:oT,oneof:"options"},{no:5,name:"tweet",kind:"message",T:lT,oneof:"options"},{no:6,name:"promotion",kind:"message",T:cT,oneof:"options"}]),rT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),sT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:lt},{no:2,name:"incorrect_feedback",kind:"message",T:lt},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),iT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:lt},{no:2,name:"incorrect_feedback",kind:"message",T:lt}],{localName:"QuestionOptions_PredictionOptions"}),oT=l.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:eT},{no:4,name:"web_link",kind:"message",T:tT}],{localName:"QuestionOptions_FactoidOptions"}),lT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:uT}],{localName:"QuestionOptions_TweetOptions"}),uT=l.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),cT=l.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Y1)},{no:2,name:"sponsor",kind:"message",T:Bt},{no:3,name:"banner",kind:"message",T:aT},{no:4,name:"enable_wallet",kind:"enum",T:l.getEnumType(V1)}],{localName:"QuestionOptions_PromotionOptions"}),dT=l.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),mT=l.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),wu=l.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Qr},{no:5,name:"appearance",kind:"message",T:Gr},{no:6,name:"sponsorship",kind:"message",T:Bt},{no:7,name:"notification",kind:"message",T:ea},{no:8,name:"answers",kind:"message",T:J1,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:$e},{no:17,name:"tags",kind:"message",T:dT,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Wr},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:l.getEnumType(B1)},{no:22,name:"ai",kind:"message",T:mT}]),Yr=l.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Qr},{no:5,name:"appearance",kind:"message",T:Gr},{no:6,name:"sponsorship",kind:"message",T:Bt},{no:7,name:"notification",kind:"message",T:ea},{no:8,name:"answers",kind:"message",T:X1,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:Wr}]);l.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ce)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(kt)},{no:6,name:"options",kind:"message",T:Qr},{no:7,name:"notification",kind:"message",T:ea}]);const Cu=l.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:Bt},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:fT},{no:6,name:"sponsors",kind:"message",T:gT},{no:7,name:"notification",kind:"message",T:TT},{no:8,name:"activated_at",kind:"message",T:$e},{no:9,name:"deactivated_at",kind:"message",T:$e},{no:10,name:"question_auto_post",kind:"message",T:hT},{no:11,name:"bypass_notifications",kind:"message",T:Wr},{no:12,name:"importer_collaboration",kind:"message",T:AT}]),fT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:Gr},{no:2,name:"trivia",kind:"message",T:pT},{no:3,name:"prediction",kind:"message",T:yT},{no:4,name:"correct_feedbacks",kind:"message",T:lt,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:lt,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),pT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),yT=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),gT=l.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Bt,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),TT=l.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:l.getEnumType(_u)},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}],{localName:"EventModeration_NotificationSettings"}),hT=l.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:l.getEnumType(W1)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:$e},{no:4,name:"start_mode",kind:"enum",T:l.getEnumType(q1)},{no:5,name:"start_options",kind:"message",T:kT}]),kT=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:NT,oneof:"options"}]),NT=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});l.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Vr=l.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]),MT=l.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:IT},{no:3,name:"statistics",kind:"message",T:ST,repeated:!0}]);const IT=l.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:l.getEnumType(kt)}],{localName:"QuestionStats_QuestionData"}),ST=l.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:bT}]),bT=l.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});l.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Wr=l.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:l.getEnumType(Z1)}]),$T=l.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),vT=l.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:l.getEnumType(K1)},{no:3,name:"errors",kind:"message",T:$T,repeated:!0},{no:4,name:"last_updated",kind:"message",T:$e}]),AT=l.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:vT}}]),Zt=l.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),Ru=l.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:wu},{no:2,name:"notification",kind:"message",T:ea},{no:3,name:"moderation",kind:"message",T:Cu}]),ET=l.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),OT=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:DT}]),DT=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ru}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),_T=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),wT=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:CT}]),CT=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),RT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Yr}]),jT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),xT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:LT}]),LT=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:RT}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),PT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Yr}]),UT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),FT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:zT}]),zT=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:PT}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),BT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:GT}]),GT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),QT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:YT}]),YT=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ru}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),VT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),WT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:qT}]),qT=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:wu}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),HT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ZT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:KT}]),KT=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Yr}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),qr=l.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]),JT=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:XT}]),XT=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"}),e2=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:t2}]),t2=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),n2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:a2}]),a2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),r2=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),s2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:i2}]),i2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:l.getEnumType(H1)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),o2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:l2}]),l2=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:qr,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),u2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:l.getEnumType(Ce),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Vr}]),c2=l.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:l.getEnumType(Zt)},{no:4,name:"question_type",kind:"enum",T:l.getEnumType(Ce)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:l.getEnumType(kt)}]),d2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:m2,repeated:!0},{no:2,name:"meta",kind:"message",T:f2}]),m2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:c2}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),f2=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"}),p2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),y2=l.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),g2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:T2,repeated:!0}]),T2=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:y2}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),h2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),k2=l.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]),N2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:M2,repeated:!0}]),M2=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:k2}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),I2=l.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:S2},{no:3,name:"moderation",kind:"message",T:Cu}]),S2=l.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),b2=l.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),$2=l.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:v2}]),v2=l.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:I2}],{localName:"GetResponse_GetResponseData"}),A2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),E2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]),O2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:D2,repeated:!0}]),D2=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:E2}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),_2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),w2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),C2=l.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),R2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:w2},{no:6,name:"appearance",kind:"message",T:_2},{no:7,name:"prizes",kind:"message",T:C2,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),j2=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),x2=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),L2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:j2},{no:7,name:"appearance",kind:"message",T:x2},{no:8,name:"completed",kind:"scalar",T:8}]),P2=l.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),U2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:P2,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),F2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),z2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),B2=l.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:R2},{no:2,name:"title_card",kind:"message",T:L2},{no:3,name:"onboarding",kind:"message",T:U2},{no:4,name:"rules",kind:"message",T:F2},{no:5,name:"invite_card",kind:"message",T:z2},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),G2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:lt,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:lt,repeated:!0}]),Q2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:l.getEnumType(cn)}]),Y2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:Bt,repeated:!0}]),V2=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:G2},{no:2,name:"notifications",kind:"message",T:Q2},{no:3,name:"sponsorships",kind:"message",T:Y2}]),ot=l.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),W2=l.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),q2=l.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),Hr=l.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),H2=l.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),ju=l.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Z2=l.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),K2=l.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),J2=l.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);l.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const X2=l.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),eh=l.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:l.getEnumType(W2)}]),th=l.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),xu=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:nh}]),nh=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),Yi=l.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:eh,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:l.getEnumType(q2)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:th}]),ah=l.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ju)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:l.getEnumType(Hr)}]),Ln=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:l.getEnumType(Hr)},{no:5,name:"is_default",kind:"enum",T:l.getEnumType(H2)}]),rh=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ju)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:l.getEnumType(Hr)},{no:5,name:"default_channel",kind:"message",T:Ln},{no:6,name:"channels",kind:"message",T:Ln,repeated:!0}]),Lu=l.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:xu},{no:10,name:"getstream",kind:"message",T:rh}]),sh=l.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:ih,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),ih=l.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Pu=l.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:xu},{no:13,name:"pub",kind:"message",T:sh},{no:14,name:"getstream",kind:"message",T:ah}]),oh=l.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:B2},{no:2,name:"moderation",kind:"message",T:V2},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:l.getEnumType(Z2)}]),Vi=l.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Ln},{no:2,name:"channels",kind:"message",T:Ln,repeated:!0}]),Ct=l.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:X2,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:Yi,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:Yi,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:oh,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Vi,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Vi,oneof:"overlay_settings"}]),lh=l.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:Ct},{no:2,name:"global_preset",kind:"message",T:Ct},{no:3,name:"preset",kind:"message",T:Ct},{no:4,name:"stream",kind:"message",T:Ct}]),ta=l.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(ot)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Ct},{no:6,name:"meta",kind:"message",T:lh},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);l.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(ot)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Ct},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:uh}]);const uh=l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:ta,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ch}]);const ch=l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:dh}]);const dh=l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:mh}]);const mh=l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);l.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:ph},{no:3,name:"settings",kind:"message",T:fh}]);const fh=l.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:ta,repeated:!0},{no:2,name:"advertising",kind:"message",T:Uu}]),ph=l.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:l.getEnumType(K2)},{no:2,name:"value",kind:"scalar",T:9}]),yh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Wi},{no:2,name:"videos",kind:"message",T:Wi}]),Wi=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),gh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:yh}}]);l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:gh,repeated:!0}]);const Th=l.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:l.getEnumType(J2)}]),hh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),kh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Th,repeated:!0},{no:3,name:"videos",kind:"message",T:hh,repeated:!0}]),Nh=l.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:l.getEnumType(ot)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:kh}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Uu=l.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:Nh}}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Mh}]);const Mh=l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Ih}]);const Ih=l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Sh}]);const Sh=l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:bh}]);const bh=l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"}),$h="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",vh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Ah="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Eh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Oh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",qi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Dh=v("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),_h=v("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),wh=v("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),Ch=v("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),Rh=v("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),jh=v("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),xh=v("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Lh=v("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),Ph=v("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Uh=v("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),Fh=v("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),zh={[Ce.POLL]:{label:"Poll",icon:$h},[Ce.TRIVIA]:{label:"Trivia",icon:Ah},[Ce.PREDICTION]:{label:"Prediction",icon:vh}},Bh={[Zt.LOST]:Oh,[Zt.WON]:Eh,[Zt.UNSET]:qi,[Zt.DNP]:qi},Gh=({questionId:e,questionType:t,questionStatus:n,subject:a,openForVoting:r,openQuestion:s,status:i})=>{const o=zh[t];return o===void 0?null:h.jsxs(Dh,{onClick:()=>s==null?void 0:s(e),children:[h.jsx(_h,{children:h.jsx(wh,{alt:"question-type-icon",src:o.icon})}),h.jsxs(Ch,{children:[h.jsxs(Rh,{children:[h.jsx(Uh,{children:o.label}),t===Ce.TRIVIA&&n===kt.RESOLVED&&h.jsx(Fh,{children:"Expired"})]}),h.jsx(jh,{children:a||""})]}),r?h.jsx(xh,{children:"play"}):h.jsx(Lh,{children:h.jsx(Ph,{alt:"question-status-icon",src:Bh[i]})})]})};const Qh=v("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),Yh=v("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),Vh=v("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Wh=({questions:e,openQuestion:t})=>h.jsxs(Qh,{children:[h.jsx(Yh,{children:"PICK HISTORY"}),h.jsx(Vh,{children:e==null?void 0:e.map(n=>h.jsx(Gh,{openQuestion:t,...n},n.questionId))})]}),qh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Hh=e=>e.split(/\s+/).map(t=>t[0]).join("").toUpperCase();const Zh=v("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),Kh=v("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),Tn=({indicator:e,title:t})=>h.jsxs(Zh,{children:[h.jsx(Kh,{children:e}),h.jsx("p",{children:t})]});const Jh=v("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Xh=v("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),e3=v("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Hi=({indicator:e,title:t})=>h.jsxs(Jh,{children:[h.jsx(Xh,{children:t}),h.jsx(e3,{children:e})]});const t3=v("div")({name:"Container",class:"canai20",propsAsIs:!1}),n3=v("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),a3=v("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),r3=v("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),s3=v("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),i3=v("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),o3=v("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),l3=v("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),u3=v("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),c3=v("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),d3=v("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),m3=v("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),f3=v("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),p3=v("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),y3=v("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),g3=({avatar:e,name:t,points:n,grade:a,friendsRank:r,globalRank:s,winStreak:i,correct:o,incorrect:d,successRate:m})=>h.jsxs(t3,{children:[h.jsxs(n3,{children:[h.jsxs(r3,{children:[h.jsxs(y3,{children:[e&&h.jsx(s3,{alt:"avatar",src:e}),!e&&h.jsx(p3,{children:Hh(t)})]}),h.jsxs(i3,{children:[h.jsx(o3,{children:t}),h.jsxs(l3,{children:[h.jsx(u3,{alt:"rank-icon",src:qh}),h.jsxs(c3,{children:[h.jsx(d3,{children:n||"-"}),"RTS"]}),h.jsxs(m3,{children:["TOP ",a,"%"]})]})]})]}),h.jsxs(f3,{children:[h.jsx(Hi,{title:"Friens rank",indicator:r||"-"}),h.jsx(Hi,{title:"Global rank",indicator:s||"-"})]})]}),h.jsxs(a3,{children:[h.jsx(Tn,{indicator:i||"-",title:"Win streak"}),h.jsx(Tn,{indicator:o||"-",title:"Correct"}),h.jsx(Tn,{indicator:d||"-",title:"Incorrect"}),h.jsx(Tn,{indicator:`${m||"-"}%`,title:"Success rate"})]})]}),Nr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",T3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Zi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Fu=v("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),h3=()=>Fu,k3=v(h3())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Ki=v("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Ji=v("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),Xi=v("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),eo=v("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),to=v("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),no=v("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),ao=v("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),ro=v("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),N3=({icon:e,id:t,title:n,questionId:a,disabled:r,percentage:s,onVote:i,toggleIsLoadingSubmitAnswer:o,correct:d,questionAnswered:m,hasCorrectAnswer:p,answered:T})=>m&&T?h.jsxs(k3,{"data-answeredCorrect":(!p||d).toString(),"data-questionAnswered":"false",children:[h.jsx(Ki,{style:{width:`${s}%`}}),h.jsxs(Ji,{disabled:r,onClick:()=>i(a,t),children:[e&&h.jsx(Xi,{alt:"option-icon",src:e}),h.jsx(eo,{children:n}),h.jsxs(to,{children:[p&&d&&h.jsx(no,{children:h.jsx(ro,{alt:"icon-correct",src:T?Zi:Nr})}),h.jsxs(ao,{children:[s,"%"]})]})]})]}):h.jsxs(Fu,{"data-questionAnswered":m.toString(),children:[m&&h.jsx(Ki,{style:{width:`${s}%`}}),h.jsxs(Ji,{disabled:r,onClick:()=>{o(!0),i(a,t)},children:[e&&h.jsx(Xi,{alt:"option-icon",src:e}),h.jsx(eo,{children:n}),m&&h.jsxs(to,{children:[p&&d&&h.jsx(no,{children:h.jsx(ro,{alt:"icon-correct",src:T?Zi:Nr})}),h.jsxs(ao,{children:[s,"%"]})]})]})]});const M3=v("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),I3=v("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),S3=v("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),b3=v("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),$3=v("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),v3=v("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),A3=v("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),E3=v("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),O3=({title:e,questionId:t,options:n,questionAnswered:a,feedbackMessages:r,questionAnsweredCorrectly:s,questionType:i})=>{const[o,d]=C.useState(!1),m=C.useCallback(p=>{d(p)},[d]);return C.useEffect(()=>{m(!1)},[n,m]),h.jsxs(M3,{children:[h.jsx(I3,{children:e}),h.jsxs(S3,{children:[o&&h.jsx(b3,{children:"Loading..."}),n.map(p=>h.jsx(N3,{toggleIsLoadingSubmitAnswer:m,questionId:t,...p},p.id))]}),a&&i===Ce.TRIVIA&&h.jsxs($3,{children:[h.jsx(v3,{alt:"reaction-to-answer",src:s?Nr:T3}),h.jsxs("div",{children:[h.jsx(A3,{children:s?r.correctFeedback.title:r.incorrectFeedback.title}),h.jsx(E3,{children:s?r.correctFeedback.description:r.incorrectFeedback.description})]})]})]})};class D3{}window.storeLogger=Object.create(null);class na{constructor(t,n){A(this,"store");A(this,"name");this.store=t,this.name=n}getStore(){return this.store}}const _3=e=>{const t=Object.keys(e);return De.computed(t.map(n=>e[n].getStore()),(...n)=>Object.fromEntries(t.map((a,r)=>[a,n[r]])))};class en extends na{constructor(){super(...arguments);A(this,"getValues",()=>this.getStore().get());A(this,"getValue",n=>this.getStore().get()[n]);A(this,"setValue",(n,a)=>this.getStore().setKey(n,a));A(this,"subscribe",(...n)=>this.getStore().subscribe(...n));A(this,"unsubscribe",()=>this.getStore().off())}}const tn=e=>De.map(e);var Ot=(e=>(e.ORGANIZATION="ORGANIZATION",e.STREAM="STREAM",e))(Ot||{});const w3={[ot.BETTING]:"betting",[ot.GAMES]:"games",[ot.PUBLIC_CHAT]:"publicChat",[ot.TWITTER]:"twitter"};var gt=(e=>(e.Ready="ready",e.Suspended="suspended",e))(gt||{});class zu{constructor({settings:t,...n},a){A(this,"status");A(this,"source");A(this,"config");A(this,"settings");A(this,"listeners",new Set);A(this,"settingsKey");A(this,"enable",()=>{this.status.set("ready")});A(this,"disable",()=>{this.status.set("suspended")});A(this,"setFeatureConfig",({settings:t,...n})=>{let a;for(a in n)this.config.setValue(a,n[a]);if((t==null?void 0:t.overlaySettings.case)===this.settingsKey){const r=t.overlaySettings.value;if(r!==void 0){let s;for(s in r)console.log(s,r[s]),r[s]!==0&&r[s]!==""&&this.settings.setValue(s,r[s])}}});A(this,"update",(t,n)=>{this.source==="STREAM"&&n==="ORGANIZATION"||(this.setFeatureConfig(t),this.source=n)});this.settingsKey=w3[n.type],this.status=De.atom("suspended"),this.config=new en(tn(n),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(t==null?void 0:t.overlaySettings.case)===this.settingsKey?this.settings=new en(tn(t.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new en(tn({}),`feature:settings:${this.settingsKey}`),this.source=a}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(t){this.listeners.add(t)}fireEvent(t){for(const n of this.listeners.values())try{n.onEvent(t)}catch(a){console.error(a)}}}class _e extends na{constructor(){super(...arguments);A(this,"getValue",()=>this.getStore().get());A(this,"setValue",n=>this.getStore().set(n));A(this,"subscribe",n=>this.getStore().subscribe(n));A(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(n){return this.getStore().listen(n)}get(){return this.getStore().get()}}const we=e=>De.atom(e);class ze extends na{constructor(n,a,r){super(n,`api:${a}`);A(this,"atomStore");A(this,"getAtomStore",()=>this.atomStore);A(this,"getValue",async()=>{const n=this.getStore();if(n.value===void 0)throw new Error("no store");return await n.value.promise,n.get().data});A(this,"getValues",()=>{throw new Error("not implemented")});A(this,"setValue",n=>this.getStore().set({loading:!1,data:n==null?void 0:n.data}));A(this,"subscribe",n=>this.getStore().subscribe(n));A(this,"unsubscribe",()=>{throw new Error("not implemented")});A(this,"invalidate",()=>{this.store.invalidate()});A(this,"listen",n=>this.getStore().listen(n));A(this,"key",()=>this.getStore().key);A(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),r&&n.subscribe(s=>{this.atomStore.set(r(s))})}get(){throw new Error("not implemented")}}const C3=({store:e})=>{var n;const{data:t}=Be.useStore(e);return t!=null&&t.summary?h.jsx(g3,{avatar:t.summary.avatar,name:t.summary.name,points:t.summary.points,grade:"0",friendsRank:t.summary.friendsRank,globalRank:t.summary.rank,winStreak:t.summary.streak,correct:t.summary.correct,incorrect:t.summary.incorrect,successRate:(n=t.percentage)==null?void 0:n.average}):h.jsx("div",{children:"wait user..."})},R3=({store:e,openQuestion:t})=>{const{data:n}=Be.useStore(e);return n?h.jsx(Wh,{openQuestion:t,questions:n}):h.jsx("div",{children:"wait questions..."})},j3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",x3="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const L3=v("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),P3=v("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),U3=v("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),F3=v("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),z3=v("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),B3=v("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),G3=()=>e=>e.isSuccess?"#f1be1c":"#da3732",so=v("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[G3()]}}),io=v("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const Q3=v("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),Y3=v("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),V3=v("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),W3=v("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),q3=v("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ba=({points:e})=>h.jsxs(Q3,{children:[h.jsx(Y3,{children:"YOU WON"}),h.jsxs(V3,{children:[h.jsx(W3,{children:e}),h.jsx(q3,{children:"PTS"})]})]}),H3=({logo:e,points:t,questionAnswered:n,questionAnsweredCorrectly:a,questionType:r,closeQuestion:s,setTimeToExpire:i})=>{const o=!n&&r!==Ce.PREDICTION,d=n&&r===Ce.TRIVIA,m=d&&a,p=d&&!a,T=n&&r===Ce.PREDICTION;return h.jsxs(L3,{children:[h.jsxs(U3,{children:[h.jsxs(B3,{children:[o&&h.jsx(eu,{setTimeToExpire:i}),m&&h.jsxs(h.Fragment,{children:[h.jsx(ba,{points:t}),h.jsx(so,{isSuccess:!0,children:h.jsx(io,{alt:"reaction-icon",src:j3})})]}),p&&h.jsxs(h.Fragment,{children:[h.jsx(ba,{points:0}),h.jsx(so,{isSuccess:!1,children:h.jsx(io,{alt:"reaction-icon",src:x3})})]}),T&&h.jsx(ba,{points:t})]}),h.jsx(F3,{onClick:s,children:h.jsx(z3,{alt:"exit-icon",src:Cr})})]}),e&&h.jsx(P3,{src:e})]})},Z3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const K3=v("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),J3=({store:e,closeQuestion:t,vote:n})=>{var m;const{data:a}=Be.useStore(e),[r,s]=C.useState(!1),i=C.useCallback(p=>{s(p)},[s]),o=C.useMemo(()=>a==null?void 0:a.answers.find(p=>p.youVoted===!0),[a]),d=C.useMemo(()=>!!(a!=null&&a.answers.find(p=>p.correct===!0)),[a]);return a?h.jsx(K3,{children:h.jsxs("div",{children:[h.jsx(H3,{points:(o==null?void 0:o.points)||0,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,logo:Z3,closeQuestion:t,setTimeToExpire:i,questionType:a.type}),h.jsx("div",{children:h.jsx(O3,{title:a.subject,feedbackMessages:(m=a.options)==null?void 0:m.options.value,questionType:a.type,questionId:a.id,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,options:a.answers.map(p=>({id:p.id,title:p.text,icon:p.icon,type:a.type,correct:p.correct,percentage:p.percentage,answered:p.youVoted,disabled:!!o||a.marketClosed||r,questionAnswered:!!o,hasCorrectAnswer:d,onVote:n}))})})]})}):null},X3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const e4=v("div")({name:"Container",class:"cnx2su3",propsAsIs:!1}),t4=v("div")({name:"BackgroundBlock",class:"bszkfz6",propsAsIs:!1}),n4=v("img")({name:"Icon",class:"ioxcakf",propsAsIs:!1}),a4=v("div")({name:"ContentWrap",class:"casyw2l",propsAsIs:!1}),r4=v("img")({name:"SponsorLogo",class:"s2nator",propsAsIs:!1}),s4=v("span")({name:"SponsorText",class:"s1m8mpfg",propsAsIs:!1}),i4=v("div")({name:"ContentTitle",class:"cedzfas",propsAsIs:!1}),o4=v("div")({name:"ContentSubtitle",class:"cxgp62k",propsAsIs:!1}),l4=v("button")({name:"ActionBtn",class:"a1jp93u3",propsAsIs:!1}),u4=v("button")({name:"CloseBtn",class:"cg0g0le",propsAsIs:!1}),c4=v("img")({name:"IconClose",class:"i1cn2yjj",propsAsIs:!1}),d4=({onClose:e,onPlay:t,header:n,title:a,subtitle:r,graphicBg:s,icon:i,sponsorLogo:o})=>h.jsxs(e4,{children:[h.jsx(u4,{onClick:e,children:h.jsx(c4,{alt:"icon-close-onboarding-inapp",src:X3})}),h.jsx(t4,{style:{backgroundImage:`url(${s||""})`},children:i&&h.jsx(n4,{alt:"onboarding-inapp-icon",src:i})}),h.jsxs(a4,{children:[h.jsxs("div",{children:[h.jsx("div",{children:o?h.jsxs(h.Fragment,{children:[h.jsx(r4,{alt:"sponsor-logo",src:o}),h.jsx(s4,{children:"Presents"})]}):n||""}),h.jsx(i4,{children:a||""}),h.jsx(o4,{children:r||""})]}),h.jsx(l4,{onClick:t,children:"Play"})]})]}),m4=e=>{const t=e.find(({type:n})=>n==="_onboarding");return t||e[e.length-1]},f4=({sdk:e})=>{var o,d;const t=C.useRef(),[n,a]=C.useState(),r=e.getNotificationsStore(),s=Be.useStore(r),i=()=>{t.current&&clearTimeout(t.current),s&&r.set(s.filter(({id:m})=>m!==(n==null?void 0:n.id))),a(void 0)};return C.useEffect(()=>{if(console.log(s),s){const m=m4(s);m&&(a(m),t.current=setTimeout(()=>{i()},m.delay))}return()=>{t.current&&clearTimeout(t.current)}},[s]),n&&n.type==="_onboarding"?h.jsx(d4,{onClose:()=>{i(),e.closeFeature()},onPlay:()=>{i(),e.openFeature("games")},...n.data}):!((o=n==null?void 0:n.data)!=null&&o.question)||!((d=n==null?void 0:n.data)!=null&&d.notification)?null:h.jsx(od,{openVoiting:()=>{var m;i(),(m=n==null?void 0:n.action)==null||m.call(n)},closeInApp:()=>{var m;i(),(m=n==null?void 0:n.close)==null||m.call(n)},title:n.data.notification.title,icon:n.data.notification.image,color:n.data.notification.indicatorColor})};const hn=v("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),p4=v("div")({name:"DemoContainerNotifications",class:"d15x0q1l",propsAsIs:!1}),y4=v("div")({name:"UserStatisticsContainer",class:"u13pbrok",propsAsIs:!1}),g4=v("div")({name:"QuestionsContainer",class:"qaw537u",propsAsIs:!1}),T4=({gamification:e,sdk:t})=>{var m,p,T,y,k,S,b,R,$,_,L,P,F,B,U,V,q,J,re,ce,oe,H,le;const n=Be.useStore(e.status),a=Be.useStore(e.onbordingComplete),{slStreamId:r}=Be.useStore(t.sdkStore),s=Be.useStore(e.featureSettings);if(n!==gt.Ready)return h.jsx("div",{children:"wait..."});if(r!=null&&r.loading)return h.jsx(hn,{children:h.jsx("div",{children:"Event is loading"})});if(!(r!=null&&r.data))return h.jsx(hn,{children:h.jsx("div",{children:"Event is forbidden"})});if(!a)return h.jsx(hn,{children:h.jsx(z1,{closeFeature:t.closeFeature,gamification:e,steps:(p=(m=s.inplayGame)==null?void 0:m.onboarding)==null?void 0:p.steps,gameIcon:(k=(y=(T=s.inplayGame)==null?void 0:T.overview)==null?void 0:y.media)==null?void 0:k.gameIcon,sponsorLogo:(R=(b=(S=s.inplayGame)==null?void 0:S.overview)==null?void 0:b.media)==null?void 0:R.sponsorLogo,rules:(_=($=s.inplayGame)==null?void 0:$.rules)==null?void 0:_.rules,rulesBtnLabel:(P=(L=s.inplayGame)==null?void 0:L.rules)==null?void 0:P.buttonLabel,rulesTitle:(B=(F=s.inplayGame)==null?void 0:F.rules)==null?void 0:B.heading,primaryColor:(q=(V=(U=s.inplayGame)==null?void 0:U.overview)==null?void 0:V.appearance)==null?void 0:q.primaryColor,inviteCardTitle:(re=(J=s.inplayGame)==null?void 0:J.inviteCard)==null?void 0:re.heading,inviteCardSubtext:(oe=(ce=s.inplayGame)==null?void 0:ce.inviteCard)==null?void 0:oe.subtext,inviteCardBtnLabel:(le=(H=s.inplayGame)==null?void 0:H.inviteCard)==null?void 0:le.buttonLabel})});const i=Me=>{e.openQuestion(Me)},o=()=>{e.closeQuestion()},d=(Me,Ee)=>{e.submitAnswer(Me,Ee)};return h.jsxs(hn,{children:[h.jsx(y4,{children:e.userSummary&&h.jsx(C3,{store:e.userSummary.getStore()})}),h.jsxs(g4,{children:[e.questions&&h.jsx(R3,{openQuestion:i,store:e.questions.getStore()}),e.openedQuestion&&h.jsx(J3,{closeQuestion:o,vote:d,store:e.openedQuestion.getStore()})]})]})},h4=({sdk:e})=>{const t=async n=>{try{await e.authorizationBypass("streamlayer:streamlayer",n)}catch(a){throw console.log("login err",a),a}};return h.jsx(u1,{login:t,anonymousLogin:e.anonymousAuthorization,host:e.host})},k4=({activeFeature:e,sdk:t})=>{if(C.useEffect(()=>{const n=t.getFeatures();if(e)for(const[a,r]of n)a===e?r.status.get()===gt.Suspended&&r.enable():r.status.get()===gt.Ready&&r.disable();else for(const[,a]of n)a.status.get()===gt.Ready&&a.disable();return()=>{for(const[,a]of n)a.status.get()===gt.Ready&&a.disable()}},[e,t]),e==="games"){const n=t.getFeatures().get("games");return n?h.jsxs("div",{children:[h.jsx("button",{onClick:()=>t.closeFeature(),children:"close"}),h.jsx(T4,{gamification:n,sdk:t})]}):h.jsx("div",{children:"wait gamification..."})}return h.jsxs("div",{children:[h.jsx("button",{onClick:()=>t.logout(),children:"logout"}),h.jsx("button",{onClick:()=>t.openFeature("games"),children:"gamification"})]})},N4=({sdk:e})=>{const t=Be.useStore(e.organizationStore()),n=Be.useStore(e.getUserStore()),a=Be.useStore(e.getActiveFeature());return t.loading?h.jsx("div",{children:"authentificating..."}):t.data?n.loading?h.jsx("div",{children:"authentificating..."}):n.data?h.jsxs(h.Fragment,{children:[h.jsx(p4,{children:h.jsx(f4,{sdk:e})}),h.jsx(k4,{sdk:e,activeFeature:a})]}):h.jsx(h4,{sdk:e}):h.jsx("div",{children:"wrong sdk key..."})};const M4="t12mji3x",I4=({children:e})=>h.jsx("div",{className:M4,children:e});let S4=()=>({events:{},emit(e,...t){let n=this.events[e]||[];for(let a=0,r=n.length;a<r;a++)n[a](...t)},on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var a;this.events[e]=(a=this.events[e])==null?void 0:a.filter(r=>t!==r)}}});const b4=({cache:e=new Map,fetcher:t,...n}={})=>{const a=S4();let r=!0;mo("visibilitychange",()=>{r=!document.hidden,r&&a.emit(lo)}),mo("online",()=>a.emit(uo));const s=new Map,i=new Map,o=new Map;let d={};const m=async([$,_],L,P,F)=>{var B;if(!r)return;const U=oe=>{L.key===$&&(L.set(oe),a.emit($a,$,oe,!0))},V=()=>{U({...L.value,...po,promise:o.get($)})},{dedupeTime:q=4e3,fetcher:J}={...P,...d},re=fo();if(o.has($)){L.value.loading||V();return}if(!F){const oe=e.get($);oe&&L.value.data!==oe&&U({data:oe,...mt});const H=i.get($);if(H&&H+q>re)return}const ce=De.startTask();try{const oe=J(..._);i.set($,re),o.set($,oe),V();const H=await oe;e.set($,H),U({data:H,...mt}),i.set($,fo())}catch(oe){(B=P.onError)==null||B.call(P,oe),U({data:L.value.data,error:oe,...mt})}finally{ce(),o.delete($)}},p=($,{fetcher:_=t,...L}={})=>{const P=De.map({...mt}),F={...n,...L,fetcher:_};P.invalidate=()=>{const{key:H}=P;H&&k(H)},P.mutate=H=>{const{key:le}=P;le&&S(le,H)};let B,U,V,q,J,re=[];De.onStart(P,()=>{const H=!B;[J,B]=$4($),q=J.subscribe(be=>{if(be){const[ee,M]=be;P.key=ee,m([ee,M],P,F),U=ee,V=M}else P.key=U=V=void 0});const le=J.get();le&&([U,V]=le,H&&ce());const{refetchInterval:Me=0,refetchOnFocus:Ee,refetchOnReconnect:Oe}=F,Ie=()=>{U&&m([U,V],P,F)};Me>0&&s.set($,setInterval(Ie,Me)),Ee&&re.push(a.on(lo,Ie)),Oe&&re.push(a.on(uo,Ie)),re.push(a.on(co,be=>{U&&va(U,be)&&m([U,V],P,F,!0)}),a.on($a,(be,ee,M)=>{U&&va(U,be)&&P.value!==ee&&P.value.data!==ee&&P.set(M?ee:{data:ee,...mt})}))});const ce=()=>{U&&V&&m([U,V],P,F)},oe=P.listen;return P.listen=H=>{const le=oe(H);return H(P.value),ce(),le},De.onStop(P,()=>{P.value={...mt},B==null||B(),re.forEach(le=>le()),re=[],q==null||q();const H=s.get($);H&&clearInterval(H)}),P},T=$=>{e.delete($),i.delete($)},y=($,_)=>{for(const L of e.keys())va(L,$)&&_(L)},k=$=>{y($,T),a.emit(co,$)},S=($,_)=>{y($,L=>{_===void 0?T(L):e.set(L,_)}),a.emit($a,$,_)};function b($){const _=async P=>{var F,B;const U=(F=d.fetcher)!=null?F:$,V=[];try{L.set({error:void 0,data:void 0,mutate:_,...po});const q=await U({data:P,invalidate:J=>{V.push(J)},getCacheUpdater:(J,re=!0)=>[ce=>{S(J,ce),re&&V.push(J)},e.get(J)]});return L.setKey("data",q),q}catch(q){(B=n==null?void 0:n.onError)==null||B.call(n,q),L.setKey("error",q)}finally{L.setKey("loading",!1),V.forEach(k)}},L=De.map({mutate:_,...mt});return L.mutate=_,L}return[p,b,{__unsafeOverruleSettings:$=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),d=$},invalidateKeys:k,mutateCache:S}]};function oo(e){return typeof e=="string"||typeof e=="number"}const $4=e=>{if(oo(e))return[De.atom([""+e,[e]]),()=>{}];let t=De.atom(null),n=[];const a=()=>{n.some(s=>s==null)?t.set(null):t.set([n.join(""),n])},r=[];for(let s=0;s<e.length;s++){const i=e[s];if(oo(i)){n.push(i);continue}r.push(i.subscribe(o=>{n[s]=o,a()}))}return a(),[t,()=>r.forEach(s=>s())]},lo=1,uo=2,co=3,$a=4,mo=(e,t)=>{typeof window>"u"||addEventListener(e,t)},va=(e,t)=>Array.isArray(t)?t.includes(e):typeof t=="function"?t(e):e===t,fo=()=>new Date().getTime(),po={loading:!0},mt={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class v4{constructor(t,n,a,r){A(this,"params");A(this,"stream");A(this,"method");A(this,"name");A(this,"headers");A(this,"listeners");A(this,"state");A(this,"store");A(this,"updateState",t=>{this.state.setValue("status",t),this.state.setValue("ts",new Date),this.addStateLog(`status => ${t}`)});A(this,"addStateLog",t=>{const n=this.state.getStore().get().log;this.state.setValue("log",[...n,`${new Date().toLocaleString()}: ${t}`])});A(this,"addListener",(t,n)=>this.listeners.has(t)?(this.addStateLog(`listener '${t}' not added`),!1):(this.listeners.set(t,n),this.addStateLog(`listener '${t}' added`),!0));A(this,"removeListener",t=>{this.listeners.delete(t),this.addStateLog(`listener '${t}' removed`)});A(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const t="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(t,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});A(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});A(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});A(this,"getStore",()=>{var t;return(t=this.store)==null?void 0:t.getStore()});A(this,"onData",t=>{this.addStateLog(`received data => ${JSON.stringify(t)}`),this.store&&this.store.setValue(t);for(const[,n]of this.listeners)n(t);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});A(this,"onStreamError",t=>{t.code!==ae.Canceled&&t.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",t)):this.disconnect()});const s={status:"init",ts:new Date,log:[]};this.state=new en(tn(s),`subscription:${r.name}:state`),this.name=r.name,this.headers=t,this.listeners=new Map,this.params=a,this.method=n,r.withStore&&(this.store=new _e(we(null),`subscription:${r.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class A4{constructor(t){A(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});A(this,"transport");A(this,"nanoquery");A(this,"host");A(this,"interceptors",[]);A(this,"$headers");A(this,"clients");A(this,"callbackClients");A(this,"subscriptions");A(this,"addSubscription",(t,n,a)=>{const r=this.subscriptions.get(n);if(r)return r;const s=new v4(this.$headers,t,n,a);return this.subscriptions.set(n,s),s});A(this,"removeSubscription",t=>{t.disconnect(),this.subscriptions.delete(t.params)});A(this,"disconnect",()=>{for(const[t,n]of this.subscriptions)n.disconnect(),this.subscriptions.delete(t)});A(this,"registerInterceptor",t=>{this.interceptors.push(t)});A(this,"removeInterceptor",t=>{this.interceptors=this.interceptors.filter(n=>n!==t)});A(this,"getClient",t=>{const n=t.typeName;if(this.clients.has(n))return this.clients.get(n);const a=Jn(t,this.transport);return this.clients.set(n,a),a});A(this,"getCallbackClient",t=>{const n=t.typeName;if(this.callbackClients.has(n))return this.callbackClients.get(n);const a=t0(t,this.transport);return this.callbackClients.set(n,a),a});A(this,"createPromiseClient",(t,{params:n=[],method:a})=>{const r=this.getClient(t),s=t.methods[a].name,i=[t.typeName,s.charAt(0).toLowerCase()+s.slice(1),...Array.isArray(n)?n:[n]],o=[t.typeName,s.charAt(0).toLowerCase()+s.slice(1)];return{client:r,queryKey:i,queryKeyStr:o.join("")}});A(this,"createCallbackClient",t=>({client:this.getCallbackClient(t)}));A(this,"setSdkKey",t=>{this.$headers.setValue("sdk",t)});A(this,"setAuth",t=>{this.$headers.setValue("authorization",t)});A(this,"setHeader",(t,n)=>this.$headers.setValue(t,n));A(this,"getHeader",t=>this.$headers.getValue(t));A(this,"getHeaders",()=>this.$headers.getValues());A(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const t=n=>a=>{const r=this.$headers.getValues();for(const s in r)a.header.set(s,r[s]);return n(a)};this.interceptors.push(t)});var s,i;this.host=t,this.$headers=new en(tn({"sl-device-id":((i=(s=Q.process)==null?void 0:s.env)==null?void 0:i.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[n,a,r]=b4();this.nanoquery={createFetcherStore:n,createMutatorStore:a,utils:r},this.transport=Xn({baseUrl:t,interceptors:this.interceptors,useBinaryFormat:!0})}}const E4=l.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),Zr=l.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),Kr=l.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),aa=l.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Bu=l.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),ra=l.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),sa=l.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:sa}]);const dn=l.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Gu=l.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:sa},{no:12,name:"event_time",kind:"message",T:dn},{no:13,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:14,name:"periods",kind:"message",T:Gu,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:l.getEnumType(Kr)}]);const Qu=l.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),O4=l.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:D4},{no:7,name:"weight",kind:"message",T:_4},{no:8,name:"birth",kind:"message",T:w4}]),D4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),_4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),w4=l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:Qu}],{localName:"PlayerAttributes_Birth"});l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const C4=l.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:Qu},{no:13,name:"attributes",kind:"message",T:O4},{no:15,name:"teams",kind:"message",T:C4,repeated:!0}]);const ut=l.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const Ht=l.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(E4)}]),R4=l.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Ht},{no:2,name:"event",kind:"message",T:Ht},{no:3,name:"events",kind:"message",T:Ht},{no:4,name:"players",kind:"message",T:Ht},{no:5,name:"leagues",kind:"message",T:Ht}]),j4=l.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:R4}]);l.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:j4,repeated:!0}]);l.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const x4=l.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),L4=l.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:x4,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:L4,oneof:"statistics"}]);const ct=l.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),P4=l.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),U4=l.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),F4=l.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:ct},{no:6,name:"away",kind:"message",T:ct},{no:7,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:8,name:"custom_fields",kind:"message",T:P4},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:sa},{no:12,name:"schedule",kind:"message",T:U4,repeated:!0},{no:13,name:"endless",kind:"enum",T:l.getEnumType(Kr)}]),Nt=l.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:sa},{no:6,name:"event_time",kind:"message",T:dn},{no:7,name:"home_team",kind:"message",T:ct},{no:8,name:"away_team",kind:"message",T:ct},{no:9,name:"status",kind:"enum",T:l.getEnumType(Zr)},{no:10,name:"periods",kind:"message",T:Gu,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9}]),kn=l.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),yo=l.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);l.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:kn,repeated:!0},{no:3,name:"ne",kind:"message",T:kn,repeated:!0},{no:4,name:"eq",kind:"message",T:kn,repeated:!0},{no:5,name:"between",kind:"message",T:yo,repeated:!0},{no:6,name:"includes",kind:"message",T:yo,repeated:!0},{no:7,name:"is",kind:"message",T:kn,repeated:!0}]);const z4=l.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),B4=l.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),go=l.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:Yu},{no:2,name:"status",kind:"enum",T:l.getEnumType(z4)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),G4=l.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),Q4=l.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:l.getEnumType(B4)},{no:2,name:"player",kind:"message",T:G4}]),Y4=l.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),V4=l.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),Yu=l.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),To=l.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:Y4,repeated:!0},{no:2,name:"batting",kind:"message",T:V4,repeated:!0},{no:3,name:"pitching",kind:"message",T:Yu,repeated:!0}]),W4=l.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:go},{no:2,name:"away_pitcher",kind:"message",T:go},{no:3,name:"home_statistics",kind:"message",T:To},{no:4,name:"away_statistics",kind:"message",T:To}]),q4=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:H4,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),H4=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),Z4=l.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:Q4,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),K4=l.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:q4,repeated:!0}]),J4=l.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:W4}]),X4=l.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:ek},{no:11,name:"rank",kind:"message",T:tk},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),ek=l.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),tk=l.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),nk=l.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:X4,repeated:!0}]),ak=l.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),rk=l.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),ho=l.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),ko=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),sk=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(ak)},{no:2,name:"home_player",kind:"message",T:ko},{no:3,name:"away_player",kind:"message",T:ko}]),ik=l.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:ho},{no:2,name:"away_statistics",kind:"message",T:ho}]),ok=l.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:ik},{no:2,name:"top_performers",kind:"message",T:sk,repeated:!0},{no:3,name:"last_games",kind:"message",T:Vu}]),lk=l.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),uk=l.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:lk,repeated:!0}]),No=l.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),ck=l.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:No,repeated:!0},{no:2,name:"away_players",kind:"message",T:No,repeated:!0}]),dk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:mk},{no:11,name:"rank",kind:"message",T:fk},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),mk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),fk=l.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),pk=l.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:dk,repeated:!0}]),Mo=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Io=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Mo,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Mo,repeated:!0}]),yk=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Io},{no:2,name:"away_team",kind:"message",T:Io}]),Aa=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:gk}]),gk=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),Vu=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:Aa,repeated:!0},{no:2,name:"away",kind:"message",T:Aa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:Aa,repeated:!0}]),Tk=l.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),Wu=l.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),hk=l.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),So=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),kk=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Tk)},{no:2,name:"home_player",kind:"message",T:So,repeated:!0},{no:3,name:"away_player",kind:"message",T:So,repeated:!0}]),bo=l.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),Nk=l.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:bo},{no:2,name:"away_statistics",kind:"message",T:bo}]),Mk=l.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Nk},{no:2,name:"top_performers",kind:"message",T:kk,repeated:!0}]),Ik=l.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Sk=l.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Ik,repeated:!0}]),Ea=l.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:l.getEnumType(Wu)}]),$o=l.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:l.getEnumType(Wu)}]),vo=l.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:Ea,repeated:!0},{no:2,name:"goaltender",kind:"message",T:$o},{no:3,name:"forwards",kind:"message",T:Ea,repeated:!0},{no:4,name:"defensemen",kind:"message",T:Ea,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:$o,repeated:!0}]),bk=l.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:vo},{no:2,name:"away_players",kind:"message",T:vo}]),$k=l.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:vk},{no:11,name:"rank",kind:"message",T:Ak},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),vk=l.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Ak=l.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Ek=l.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:$k,repeated:!0}]),Ok=l.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),Dk=l.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),_k=l.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:ut},{no:9,name:"away_team_record",kind:"message",T:ut}]),Jr=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),wk=l.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"attack_stats",kind:"message",T:zk}]),Ck=l.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"midfield_stats",kind:"message",T:Bk}]),Rk=l.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:Jr},{no:2,name:"defense_stats",kind:"message",T:Gk}]),jk=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Ok)},{no:2,name:"attack_performer",kind:"message",T:wk},{no:3,name:"midfield_performer",kind:"message",T:Ck},{no:4,name:"defense_performer",kind:"message",T:Rk}]),xk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),Lk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),Pk=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),Ao=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:xk},{no:2,name:"attacking_stats",kind:"message",T:Lk},{no:3,name:"defense_stats",kind:"message",T:Pk}]),Uk=l.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Ao},{no:2,name:"away_statistics",kind:"message",T:Ao},{no:3,name:"perfomers",kind:"message",T:jk}]),Fk=l.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Uk},{no:2,name:"last_games",kind:"message",T:qu}]),zk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),Bk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),Gk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);l.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const Qk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),Yk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:Qk,repeated:!0}]),Eo=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Oo=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:Yk,repeated:!0},{no:3,name:"start_players",kind:"message",T:Eo,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Eo,repeated:!0}]),Vk=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Oo},{no:2,name:"away_team",kind:"message",T:Oo}]);l.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const Wk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:ct},{no:2,name:"event_time",kind:"message",T:dn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:l.getEnumType(Dk)}]),qk=l.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Wk,repeated:!0}]),Hk=l.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),Zk=l.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:Hk,repeated:!0}]),Oa=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Kk}]),Kk=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),qu=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:Oa,repeated:!0},{no:2,name:"away",kind:"message",T:Oa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:Oa,repeated:!0}]),Mt=l.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),Jk=l.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:Z4,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:rk,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:hk,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:_k,oneof:"sport"}]),Xk=l.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:Jk}]),eN=l.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:F4}]),Hu=l.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:eN}]),tN=l.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:nN},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"sort",kind:"message",T:Bu},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),nN=l.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:l.getEnumType(Kr)}],{localName:"ListRequest_Filter"}),aN=l.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:rN},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"sort",kind:"message",T:Bu}]),rN=l.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),sN=l.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:ra},{no:2,name:"data",kind:"message",T:Hu,repeated:!0}]),iN=l.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:ra},{no:2,name:"data",kind:"message",T:Hu,repeated:!0}]),Do=l.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),_o=l.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:oN}]),oN=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:lN}],{localName:"SummaryResponse_ResponseData"}),lN=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:J4,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:ok,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Mk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Fk,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),uN=l.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),cN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:dN}]),dN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:mN}],{localName:"AdminSummaryResponse_ResponseData"}),mN=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),fN=l.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:aa},{no:3,name:"order",kind:"scalar",T:9}]),pN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:yN},{no:2,name:"meta",kind:"message",T:ra}]),yN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:gN}],{localName:"PlayByPlayResponse_ResponseData"}),gN=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"baseball",kind:"message",T:K4,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:uk,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Sk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:qk,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),TN=l.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:hN},{no:2,name:"pagination",kind:"message",T:aa}]),hN=l.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),kN=l.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:Xk,repeated:!0},{no:2,name:"meta",kind:"message",T:ra}]),NN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:MN}]),MN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),IN=l.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),SN=l.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),bN=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:$N}]),$N=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:vN}],{localName:"BoxscoreResponse_ResponseData"}),vN=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"basketball",kind:"message",T:ck,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:bk,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),AN=l.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),EN=l.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:ON}]),ON=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:2,name:"attributes",kind:"message",T:DN}],{localName:"StandingsResponse_ResponseData"}),DN=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:pk,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Ek,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:nk,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Zk,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),_N=l.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),wN=l.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:CN}]),CN=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:RN}],{localName:"LineupResponse_ResponseData"}),RN=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"soccer",kind:"message",T:Vk,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:yk,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),jN=l.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),xN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:LN}]),LN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Mt)},{no:3,name:"attributes",kind:"message",T:PN}],{localName:"LastGamesResponse_ResponseData"}),PN=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:Nt},{no:2,name:"soccer",kind:"message",T:qu,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Vu,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),UN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),FN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:zN}]),zN=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),BN={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:tN,O:iN,kind:z.Unary},demoList:{name:"DemoList",I:aN,O:sN,kind:z.Unary},summary:{name:"Summary",I:Do,O:_o,kind:z.Unary},adminSummary:{name:"AdminSummary",I:uN,O:cN,kind:z.Unary},boxscore:{name:"Boxscore",I:SN,O:bN,kind:z.Unary},standings:{name:"Standings",I:AN,O:EN,kind:z.Unary},playByPlay:{name:"PlayByPlay",I:fN,O:pN,kind:z.Unary},schedule:{name:"Schedule",I:TN,O:kN,kind:z.Unary},scheduleDates:{name:"ScheduleDates",I:NN,O:IN,kind:z.Unary},lineup:{name:"Lineup",I:_N,O:wN,kind:z.Unary},retrieveEventId:{name:"RetrieveEventId",I:UN,O:FN,kind:z.Unary},lastGames:{name:"LastGames",I:jN,O:xN,kind:z.Unary},summarySubscription:{name:"SummarySubscription",I:Do,O:_o,kind:z.ServerStreaming}}},GN=l.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),QN=l.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),YN=l.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),VN=l.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),WN=l.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),qN=l.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),HN=l.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),ZN=l.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),Zu=l.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),KN=l.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),JN=l.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Zu)}]),XN=l.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Zu)}]),Da=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:JN},{no:2,name:"sound",kind:"message",T:XN}]),Xr=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:l.getEnumType(GN)},{no:2,name:"messages_notify",kind:"enum",T:l.getEnumType(QN)},{no:3,name:"friends_notify",kind:"enum",T:l.getEnumType(YN)},{no:4,name:"calls_sound",kind:"enum",T:l.getEnumType(WN)},{no:5,name:"messages_sound",kind:"enum",T:l.getEnumType(qN)},{no:6,name:"friends_sound",kind:"enum",T:l.getEnumType(HN)},{no:7,name:"twitter_notify",kind:"enum",T:l.getEnumType(VN)},{no:8,name:"twitter_sound",kind:"enum",T:l.getEnumType(ZN)},{no:9,name:"gamification",kind:"message",T:Da},{no:10,name:"watch_party_invitation",kind:"message",T:Da},{no:11,name:"twitter_question",kind:"message",T:Da}]),eM=l.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),tM=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:nM}]),nM=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xr}],{localName:"GetResponse_GetResponseData"}),aM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:Xr}]),rM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:sM}]),sM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xr}],{localName:"UpdateResponse_UpdateResponseData"}),iM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),oM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:lM}]),lM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Lu}],{localName:"GetStreamResponse_GetResponseData"}),uM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),cM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:dM}]),dM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Pu}],{localName:"GetOrganizationResponse_GetResponseData"}),mM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),fM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:pM}]),pM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Uu}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),yM=l.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:l.getEnumType(KN)}]),Ku=l.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:yM},{no:5,name:"external_event_id",kind:"scalar",T:9}]),gM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:Ku}]),TM=l.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),hM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:kM}]),kM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:TM}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:NM}]);const NM=l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Ku}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),MM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),IM=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),SM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:bM}]),bM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Lu}],{localName:"StreamSubscriptionResponse_ResponseData"}),$M=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:vM}]),vM=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Pu}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),ia={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:eM,O:tM,kind:z.Unary},update:{name:"Update",I:aM,O:rM,kind:z.Unary},getStream:{name:"GetStream",I:iM,O:oM,kind:z.Unary},getOrganization:{name:"GetOrganization",I:uM,O:cM,kind:z.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:mM,O:fM,kind:z.Unary},generateDeepLink:{name:"GenerateDeepLink",I:gM,O:hM,kind:z.Unary},streamSubscription:{name:"StreamSubscription",I:MM,O:SM,kind:z.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:IM,O:$M,kind:z.ServerStreaming}}},AM=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(BN,{method:"retrieveEventId",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var o;if(!i||typeof i!="string")return"";try{return((o=(await n.retrieveEventId({id:i})).data)==null?void 0:o.id)||""}catch{return""}}})},EM=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getStream",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.getStream({id:i})).data)==null?void 0:d.attributes:void 0}})},OM=l.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),DM=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),_M=l.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:DM},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const wM=l.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:l.getEnumType(OM)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),CM=l.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:wM}]),es=l.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:_M}]);l.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:CM}]);const RM=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),jM=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:xM},{no:2,name:"data",kind:"message",T:es}]),xM=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),LM=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),PM=l.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),UM=l.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:PM}]),FM=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zM=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),BM=l.makeMessageType("streamlayer.users.MeRequest",[]),GM=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:es}]),QM=l.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),YM=l.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),VM=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),WM=l.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),qM=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),HM=l.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),ZM=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),KM=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),JM=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:XM}]),XM=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),eI=l.makeMessageType("streamlayer.users.InviteResponse",[]),tI=l.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),nI=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:aI},{no:2,name:"data",kind:"message",T:es,opt:!0}]),aI=l.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Ju={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:RM,O:jM,kind:z.Unary},register:{name:"Register",I:LM,O:UM,kind:z.Unary},requestPassword:{name:"RequestPassword",I:FM,O:zM,kind:z.Unary},me:{name:"Me",I:BM,O:GM,kind:z.Unary},invite:{name:"Invite",I:JM,O:eI,kind:z.Unary},bypassAuth:{name:"BypassAuth",I:tI,O:nI,kind:z.Unary},updateMetadata:{name:"UpdateMetadata",I:QM,O:KM,kind:z.Unary},updateAvatar:{name:"UpdateAvatar",I:YM,O:VM,kind:z.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:WM,O:qM,kind:z.Unary},updatePublicName:{name:"UpdatePublicName",I:HM,O:ZM,kind:z.Unary}}},rI=(e,t)=>{const{queryKey:n,client:a}=t.createPromiseClient(Ju,{method:"me",params:[e]});return t.nanoquery.createFetcherStore(n,{fetcher:()=>a.me({})})},sI=e=>{const{client:t,queryKeyStr:n}=e.createPromiseClient(Ju,{method:"bypassAuth"});return e.nanoquery.createMutatorStore(async({data:{userKey:a,schema:r,init:s},getCacheUpdater:i})=>{const[o]=i(n),d=await t.bypassAuth({userKey:a,schema:r,init:s});return o(d),d})},iI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{var s;return(s=(await n.get({})).data)==null?void 0:s.attributes}})},oI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getOrganization",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{const r=await n.getOrganization({});return r.data?{...r.data.attributes,id:r.data.id}:void 0}})},lI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(ia,{method:"getOrganizationAdvertising",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async()=>{var s;return(s=(await n.getOrganizationAdvertising({})).data)==null?void 0:s.attributes}})},uI=(e,t,n)=>{e.transport=new A4(t.host),e.sdk.host=e.transport.host,e.transport.setSdkKey(t.sdkKey),n()};var Dt=(e=>(e.DISABLED="disabled",e.INITIALIZATION="initialization",e.READY="ready",e.FAILED="failed",e.SUSPENDED="suspended",e))(Dt||{});const cI=e=>{const t=new _e(we(),"enabled"),n=new _e(we("disabled"),"status"),a=new _e(we(),"userKey"),r=new _e(we(),"userToken");r.listen(y=>{y?localStorage.setItem("sl-user-token",y):localStorage.removeItem("sl-user-token")});const s=new _e(we(),"providerStreamId"),i=new ze(AM(s.getStore(),e),"slStreamId",y=>y==null?void 0:y.data),o=new ze(rI(r.getStore(),e),"user",y=>{var k,S;return(S=(k=y==null?void 0:y.data)==null?void 0:k.data)==null?void 0:S.id}),d=new ze(iI(r.getStore(),e),"userSettings"),m=new ze(EM(i.getAtomStore(),e),"streamSettings");i.getAtomStore().listen(y=>{(y===""||y===void 0)&&m.getStore().mutate(void 0)});const p=new ze(oI(t.getStore(),e),"organizationSettings",y=>{var k;return(k=y==null?void 0:y.data)==null?void 0:k.id}),T=new ze(lI(p.getAtomStore(),e),"organizationAdvertising");return{enabled:t,status:n,providerStreamId:s,slStreamId:i,streamSettings:m,user:o,userKey:a,userToken:r,userSettings:d,organizationSettings:p,organizationAdvertising:T}};class dI extends na{constructor(n){const a=cI(n),r=_3(a);super(r,"core");A(this,"stores");A(this,"subscribe",n=>{let a;for(a in this.stores){const r=n[a];a in n&&r!==void 0&&this.stores[a].subscribe(n[a])}});A(this,"unsubscribe",()=>this.getStore().off());this.stores=a}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const mI=(e,t,n)=>{e.store=new dI(e.transport),e.stores=e.store.getValues(),e.sdk.sdkStore=e.store.getStore(),e.sdk.organizationStore=()=>e.stores.organizationSettings.getStore(),e.storeUnsubscribe=()=>{e.store.unsubscribe()},n()};class fI extends D3{constructor(n,a){super();A(this,"$coreStore");A(this,"transport");A(this,"$bypassLogin");A(this,"me",async()=>{const n=await this.$coreStore.getValues().user.getValue();return n==null?void 0:n.data});A(this,"login",async(n,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:n,userKey:a,init:!1}),this.me()));A(this,"isAuthenticated",()=>this.me());A(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});A(this,"subscribe",()=>{this.$bypassLogin.subscribe((n,a)=>{var r,s,i,o;a==="data"&&(this.transport.setAuth((s=(r=n==null?void 0:n.data)==null?void 0:r.meta)==null?void 0:s.jwt),this.$coreStore.getValues().userToken.setValue((o=(i=n==null?void 0:n.data)==null?void 0:i.meta)==null?void 0:o.jwt))})});this.$coreStore=n,this.transport=a,this.$bypassLogin=sI(this.transport),this.subscribe()}}const pI=async(e,t,n)=>{e.auth=new fI(e.store,e.transport);const a=localStorage.getItem("sl-user-schema"),r=localStorage.getItem("sl-user-token");a&&r&&(console.log("try to login prev user"),await e.auth.login(a,r)),e.sdk.authorizationBypass=async(s,i)=>{await e.auth.login(s,i),localStorage.setItem("sl-user-schema","streamlayer:streamlayer")},e.sdk.logout=()=>{e.auth.logout()},e.sdk.getUserStore=()=>e.stores.user.getStore(),e.sdk.isUserAuthorized=()=>e.auth.isAuthenticated(),n()},yI=(e,t,n)=>{e.sdk=Object.create(null),e.sdk.initializeApp=async()=>{e.storeSubscribe(),e.stores.enabled.setValue("on"),e.stores.status.setValue(Dt.INITIALIZATION);try{const a=await e.stores.organizationSettings.getValue();return a?(e.stores.status.setValue(Dt.READY),{enabled:!!a}):(e.stores.status.setValue(Dt.FAILED),{err:"failed"})}catch(a){return e.stores.enabled.setValue(),e.stores.status.setValue(Dt.FAILED),{err:`${a}`}}},e.sdk.disableApp=()=>{e.stores.enabled.setValue(),e.stores.status.setValue(Dt.DISABLED),e.storeUnsubscribe()},e.sdk.createEventSession=a=>{e.stores.providerStreamId.setValue(""),e.stores.providerStreamId.setValue(a)},n()},rt={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:b2,O:$2,kind:z.Unary},subscription:{name:"Subscription",I:ET,O:OT,kind:z.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:_T,O:wT,kind:z.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:jT,O:xT,kind:z.ServerStreaming},questionByUser:{name:"QuestionByUser",I:UT,O:FT,kind:z.Unary},syncQuestion:{name:"SyncQuestion",I:BT,O:QT,kind:z.Unary},getQuestion:{name:"GetQuestion",I:VT,O:WT,kind:z.Unary},questionDetail:{name:"QuestionDetail",I:HT,O:ZT,kind:z.Unary},submitAnswer:{name:"SubmitAnswer",I:JT,O:e2,kind:z.Unary},submitInplay:{name:"SubmitInplay",I:n2,O:r2,kind:z.Unary},skipQuestion:{name:"SkipQuestion",I:s2,O:o2,kind:z.Unary},pickHistory:{name:"PickHistory",I:u2,O:d2,kind:z.Unary},insightHistory:{name:"InsightHistory",I:p2,O:g2,kind:z.Unary},tweetHistory:{name:"TweetHistory",I:h2,O:N2,kind:z.Unary},promotionHistory:{name:"PromotionHistory",I:A2,O:O2,kind:z.Unary}}},gI=l.makeEnum("streamlayer.interactive.leaderboard.LeaderboardType",[{no:0,name:"LEADERBOARD_TYPE_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_TYPE_TOURNAMENT",localName:"TOURNAMENT"},{no:2,name:"LEADERBOARD_TYPE_EVENT",localName:"EVENT"}]),Xu=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(gI)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"event_ids",kind:"scalar",T:3,repeated:!0},{no:5,name:"leaderboards",kind:"message",T:Xu,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),ts=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardItem",()=>[{no:1,name:"streak",kind:"scalar",T:5},{no:2,name:"correct",kind:"scalar",T:5},{no:3,name:"incorrect",kind:"scalar",T:5},{no:4,name:"points",kind:"scalar",T:5},{no:5,name:"rank",kind:"scalar",T:5},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"avatar",kind:"scalar",T:9},{no:8,name:"user_id",kind:"scalar",T:9},{no:9,name:"recent_correct",kind:"scalar",T:5},{no:10,name:"streak_loss",kind:"scalar",T:5},{no:11,name:"friends_rank",kind:"scalar",T:5},{no:12,name:"in_top",kind:"scalar",T:5}]),TI=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:ts},{no:2,name:"percentage",kind:"message",T:hI}]),hI=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem.SummaryPercentage",()=>[{no:1,name:"correct",kind:"scalar",T:5},{no:2,name:"average",kind:"scalar",T:5}],{localName:"LeaderboardSummaryItem_SummaryPercentage"}),kI=l.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Vr},{no:2,name:"users_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"event_id",kind:"scalar",T:4},{no:4,name:"leaderboard_id",kind:"scalar",T:9}]),NI=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:MI,repeated:!0},{no:2,name:"meta",kind:"message",T:II}]),MI=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ts}],{localName:"ListResponse_ListResponseData"}),II=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"ListResponse_ListResponseMeta"}),SI=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"leaderboard_id",kind:"scalar",T:9},{no:4,name:"users_ids",kind:"scalar",T:9,repeated:!0}]),bI=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:$I}]),$I=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse.SummaryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:TI}],{localName:"SummaryResponse_SummaryResponseData"}),vI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),AI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:EI}]),EI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse.EventLeaderboardsResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xu}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),OI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"pagination",kind:"message",T:Vr},{no:4,name:"sort",kind:"message",T:MT}]),DI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:_I,repeated:!0},{no:2,name:"meta",kind:"message",T:wI}]),_I=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ts}],{localName:"EventLeaderboardResponse_ListResponseData"}),wI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"EventLeaderboardResponse_ListResponseMeta"}),CI={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:kI,O:NI,kind:z.Unary},summary:{name:"Summary",I:SI,O:bI,kind:z.Unary},eventLeaderboards:{name:"EventLeaderboards",I:vI,O:AI,kind:z.Unary},eventLeaderboard:{name:"EventLeaderboard",I:OI,O:DI,kind:z.Unary}}},RI=(e,t,n)=>{const{client:a,queryKey:r}=n.createPromiseClient(CI,{method:"summary",params:[e,t]});return n.nanoquery.createFetcherStore(r,{fetcher:async(s,i,o,d)=>{var p;return(p=(await a.summary({eventId:o,userId:d})).data)==null?void 0:p.attributes}})},jI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"syncQuestion",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.syncQuestion({filter:{eventId:i}})).data)==null?void 0:d.attributes:void 0}})},xI=(e,t)=>{const{client:n}=t.createCallbackClient(rt),a=De.atom({eventId:e.get()||"",feedId:""});return e.subscribe((s="")=>{a.set({eventId:s,feedId:""})}),t.addSubscription(n.subscription,a,{name:"feedSubscription"})},LI=(e,t)=>{const{client:n}=t.createCallbackClient(rt);return t.addSubscription(n.questionSubscription,{questionId:e},{name:"questionSubscription"})},PI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d,m;return(m=(d=(await n.questionByUser({questionId:i})).data)==null?void 0:d.attributes)==null?void 0:m.question}})},UI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"pickHistory",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.pickHistory({eventId:i})).data)==null?void 0:d.map(({attributes:m})=>m):void 0}})},FI=(e,t)=>{const{client:n,queryKey:a}=t.createPromiseClient(rt,{method:"insightHistory",params:[e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,s,i)=>{var d;return i?(d=(await n.insightHistory({eventId:i})).data)==null?void 0:d.map(({attributes:m})=>m):void 0}})},zI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"submitAnswer"});return n.submitAnswer({data:t})},BI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"submitInplay"});return n.submitInplay({data:{eventId:+t}})},GI=(e,t)=>{const{client:n}=e.createPromiseClient(rt,{method:"skipQuestion"});return n.skipQuestion({data:{id:t}})};class QI extends zu{constructor(n,a,r){super(n,a);A(this,"userSummary");A(this,"questions");A(this,"insights");A(this,"leaderboardId");A(this,"slStreamId");A(this,"userId");A(this,"organizationId");A(this,"openedQuestionId");A(this,"openedQuestion");A(this,"activeQuestionId");A(this,"moderationId");A(this,"feedId");A(this,"onbordingComplete");A(this,"notifications");A(this,"transport");A(this,"questionSubscription");A(this,"feedSubscription");A(this,"showOnbordingInApp",n=>{var i,o,d,m;if(console.log("onbordingComplete",n),n)return;const{inplayGame:a}=this.featureSettings.get();if(!a)return;const{titleCard:r,overview:s}=a;this.notifications.add({type:"_onboarding",id:"_",delay:1e5,data:{header:r==null?void 0:r.header,title:r==null?void 0:r.title,subtitle:r==null?void 0:r.subtitle,graphicBg:(i=r==null?void 0:r.appearance)==null?void 0:i.graphic,icon:(o=r==null?void 0:r.media)==null?void 0:o.icon,sponsorLogo:(d=r==null?void 0:r.media)==null?void 0:d.sponsorLogo,primaryColor:(m=s==null?void 0:s.appearance)==null?void 0:m.primaryColor}})});A(this,"getCurrentSessionIdPrefix",n=>{const a=n.eventId||this.slStreamId.get(),r=n.userId||this.userId.get();return`${n.organizationId||this.organizationId.get()}:${r}:${a}:${n.prefix||""}`});A(this,"connect",n=>{var a;this.userSummary=new ze(RI(this.slStreamId,this.userId,n),"gamification:userSummary"),this.questions=new ze(UI(this.slStreamId,n),"gamification:questions"),this.insights=new ze(FI(this.slStreamId,n),"gamification:insights"),this.activeQuestionId=new ze(jI(this.slStreamId,n),"gamification:activeQuestionId"),this.openedQuestion=new ze(PI(this.openedQuestionId,n),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(r=>{var s;r?(this.questionSubscription=LI(r,n),this.questionSubscription.addListener("feed-subscription-opened-question",i=>{window.requestAnimationFrame(()=>{var o,d,m,p,T;(m=this.openedQuestion)==null||m.getStore().mutate((d=(o=i.data)==null?void 0:o.attributes)==null?void 0:d.question),(p=this.openedQuestion)==null||p.getStore().invalidate(),(T=this.userSummary)==null||T.getStore().invalidate()})}),this.questionSubscription.connect()):(console.log("cleanup on close question"),(s=this.openedQuestion)==null||s.getStore().mutate(void 0),this.questionSubscription!==void 0&&n.removeSubscription(this.questionSubscription))}),(a=this.activeQuestionId)==null||a.listen(r=>{var s,i;console.log(r),this.onbordingComplete.get()&&(console.log("1"),(i=(s=r==null?void 0:r.data)==null?void 0:s.notification)!=null&&i.title&&r.data.question.status===kt.ACTIVE&&this.notifications.add({type:"_question",action:()=>this.openQuestion(r.data.question.id),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${r.data.question.id}`}),data:r.data}))}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=xI(this.slStreamId,n),this.feedSubscription.addListener("feed-subscription-active-question",r=>{window.requestAnimationFrame(()=>{var i,o;const s=(i=this.activeQuestionId)==null?void 0:i.getStore();s&&s.mutate((o=r.data)==null?void 0:o.attributes)})}),this.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var r;(r=this.questions)==null||r.invalidate()})})});A(this,"disconnect",()=>{var n,a;(n=this.questionSubscription)==null||n.disconnect(),(a=this.feedSubscription)==null||a.disconnect()});A(this,"submitInplay",async()=>{const n=this.slStreamId.get();n&&(await BI(this.transport,n),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${n}`,"true"))});A(this,"submitAnswer",async(n,a)=>{var r;await zI(this.transport,{questionId:n,answerId:a}),(r=this.questions)==null||r.invalidate()});A(this,"skipQuestion",async n=>{var a;await GI(this.transport,n),(a=this.questions)==null||a.invalidate()});A(this,"openQuestion",n=>{this.openedQuestionId.set(n),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${n}`}))});A(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new _e(we(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.slStreamId=r.stores.slStreamId.getAtomStore(),this.userId=r.stores.user.getAtomStore(),this.organizationId=r.stores.organizationSettings.getAtomStore(),this.moderationId=new _e(we(),"moderationId").getStore(),this.feedId=new _e(we(),"feedId").getStore(),this.onbordingComplete=new _e(we(!1),"onbordingComplete").getStore(),this.openedQuestionId=new _e(we(),"openedQuestionId").getStore(),this.notifications=r.notifications,this.transport=r.transport,!this.userId.get())this.userId.subscribe(s=>{s&&window.requestAnimationFrame(()=>{const o=!!localStorage.getItem(`sl-onbording:${s}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)})});else{const s=this.userId.get(),o=!!localStorage.getItem(`sl-onbording:${s}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)}this.status.subscribe(s=>{s===gt.Ready?this.connect(r.transport):this.disconnect()}),this.onbordingComplete.subscribe(s=>{var i;s&&((i=this.activeQuestionId)==null||i.invalidate())})}}class YI extends zu{}const VI=(e,t,n)=>e.type===ot.GAMES?new QI(e,t,n):new YI(e,t),WI=(e,t,n)=>{e.features=new Map,e.activeFeature=new _e(we(),"activeFeature"),e.sdk.getFeatures=()=>e.features,e.sdk.getActiveFeature=()=>e.activeFeature.getStore(),e.sdk.openFeature=a=>{e.activeFeature.setValue(a)},e.sdk.closeFeature=()=>{e.activeFeature.setValue(void 0)},e.initFeature=(a,r=Ot.ORGANIZATION)=>{const s=VI(a,r,e);e.features.set(a.name,s)},e.updateFeature=(a,r)=>{var s;(s=e.features.get(a.name))==null||s.update(a,r)},e.destroyFeature=a=>{e.features.delete(a.name)},e.reinitializeFeatures=async()=>{const a=await e.stores.organizationSettings.getValue();e.features.clear();for(const r of(a==null?void 0:a.overlays)||[])e.initFeature(r,Ot.ORGANIZATION)},e.stores.providerStreamId.listen(a=>{a||e.reinitializeFeatures()}),e.storeSubscribe=()=>{const a=(s,i)=>{if(i!=null&&i.overlays){s===Ot.STREAM&&e.features.clear();for(const o of i.overlays){const d=o.name;e.features.has(d)?e.updateFeature(o,s):e.initFeature(o,s)}}},r={organizationSettings:s=>{if(s.data)try{a(Ot.ORGANIZATION,s.data)}catch(i){console.log(i)}},streamSettings:s=>{if(s.data)try{a(Ot.STREAM,s.data)}catch(i){console.log(i)}}};e.store.subscribe(r)},n()};class qI{constructor(){A(this,"queue");A(this,"add",t=>{this.isNewNotify(t.id)?this.queue.getStore().set([...this.queue.getValue()||[],t]):console.log("skip notification:",t)});A(this,"getQueueStore",()=>this.queue.getStore());A(this,"isNewNotify",t=>{const n=localStorage.getItem(`opened:${t}`);if(!n){const a=this.queue.getStore().get();return!(a!=null&&a.find(r=>r.id===t))}return!n});A(this,"markAsViewed",t=>{localStorage.setItem(`opened:${t}`,t)});this.queue=new _e(we([]),"notifications")}}const HI=(e,t,n)=>{e.notifications=new qI,e.addNotification=e.notifications.add,e.sdk.getNotificationsStore=()=>e.notifications.getQueueStore(),n()};var ns={exports:{}},as={exports:{}};function ZI(e){var t=new e,n=t;function a(){var s=t;return s.next?t=s.next:(t=new e,n=t),s.next=null,s}function r(s){n.next=s,n=s}return{get:a,release:r}}var KI=ZI,JI=KI;function ec(e,t,n){if(typeof e=="function"&&(n=t,t=e,e=null),n<1)throw new Error("fastqueue concurrency must be greater than 1");var a=JI(XI),r=null,s=null,i=0,o=null,d={push:b,drain:xe,saturated:xe,pause:p,paused:!1,concurrency:n,running:m,resume:k,idle:S,length:T,getQueue:y,unshift:R,empty:xe,kill:_,killAndDrain:L,error:P};return d;function m(){return i}function p(){d.paused=!0}function T(){for(var F=r,B=0;F;)F=F.next,B++;return B}function y(){for(var F=r,B=[];F;)B.push(F.value),F=F.next;return B}function k(){if(d.paused){d.paused=!1;for(var F=0;F<d.concurrency;F++)i++,$()}}function S(){return i===0&&d.length()===0}function b(F,B){var U=a.get();U.context=e,U.release=$,U.value=F,U.callback=B||xe,U.errorHandler=o,i===d.concurrency||d.paused?s?(s.next=U,s=U):(r=U,s=U,d.saturated()):(i++,t.call(e,U.value,U.worked))}function R(F,B){var U=a.get();U.context=e,U.release=$,U.value=F,U.callback=B||xe,i===d.concurrency||d.paused?r?(U.next=r,r=U):(r=U,s=U,d.saturated()):(i++,t.call(e,U.value,U.worked))}function $(F){F&&a.release(F);var B=r;B?d.paused?i--:(s===r&&(s=null),r=B.next,B.next=null,t.call(e,B.value,B.worked),s===null&&d.empty()):--i===0&&d.drain()}function _(){r=null,s=null,d.drain=xe}function L(){r=null,s=null,d.drain(),d.drain=xe}function P(F){o=F}}function xe(){}function XI(){this.value=null,this.callback=xe,this.next=null,this.release=xe,this.context=null,this.errorHandler=null;var e=this;this.worked=function(n,a){var r=e.callback,s=e.errorHandler,i=e.value;e.value=null,e.callback=xe,e.errorHandler&&s(n,i),r.call(e.context,n,a),e.release(e)}}function eS(e,t,n){typeof e=="function"&&(n=t,t=e,e=null);function a(p,T){t.call(this,p).then(function(y){T(null,y)},T)}var r=ec(e,a,n),s=r.push,i=r.unshift;return r.push=o,r.unshift=d,r.drained=m,r;function o(p){var T=new Promise(function(y,k){s(p,function(S,b){if(S){k(S);return}y(b)})});return T.catch(xe),T}function d(p){var T=new Promise(function(y,k){i(p,function(S,b){if(S){k(S);return}y(b)})});return T.catch(xe),T}function m(){if(r.idle())return new Promise(function(y){y()});var p=r.drain,T=new Promise(function(y){r.drain=function(){p(),y()}});return T}}as.exports=ec;as.exports.promise=eS;var tc=as.exports,rs={exports:{}},xt=typeof Reflect=="object"?Reflect:null,wo=xt&&typeof xt.apply=="function"?xt.apply:function(t,n,a){return Function.prototype.apply.call(t,n,a)},vn;xt&&typeof xt.ownKeys=="function"?vn=xt.ownKeys:Object.getOwnPropertySymbols?vn=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:vn=function(t){return Object.getOwnPropertyNames(t)};function tS(e){console&&console.warn&&console.warn(e)}var nc=Number.isNaN||function(t){return t!==t};function se(){se.init.call(this)}rs.exports=se;rs.exports.once=sS;se.EventEmitter=se;se.prototype._events=void 0;se.prototype._eventsCount=0;se.prototype._maxListeners=void 0;var Co=10;function oa(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(se,"defaultMaxListeners",{enumerable:!0,get:function(){return Co},set:function(e){if(typeof e!="number"||e<0||nc(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Co=e}});se.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};se.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||nc(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function ac(e){return e._maxListeners===void 0?se.defaultMaxListeners:e._maxListeners}se.prototype.getMaxListeners=function(){return ac(this)};se.prototype.emit=function(t){for(var n=[],a=1;a<arguments.length;a++)n.push(arguments[a]);var r=t==="error",s=this._events;if(s!==void 0)r=r&&s.error===void 0;else if(!r)return!1;if(r){var i;if(n.length>0&&(i=n[0]),i instanceof Error)throw i;var o=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw o.context=i,o}var d=s[t];if(d===void 0)return!1;if(typeof d=="function")wo(d,this,n);else for(var m=d.length,p=lc(d,m),a=0;a<m;++a)wo(p[a],this,n);return!0};function rc(e,t,n,a){var r,s,i;if(oa(n),s=e._events,s===void 0?(s=e._events=Object.create(null),e._eventsCount=0):(s.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),i===void 0)i=s[t]=n,++e._eventsCount;else if(typeof i=="function"?i=s[t]=a?[n,i]:[i,n]:a?i.unshift(n):i.push(n),r=ac(e),r>0&&i.length>r&&!i.warned){i.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=t,o.count=i.length,tS(o)}return e}se.prototype.addListener=function(t,n){return rc(this,t,n,!1)};se.prototype.on=se.prototype.addListener;se.prototype.prependListener=function(t,n){return rc(this,t,n,!0)};function nS(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function sc(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=nS.bind(a);return r.listener=n,a.wrapFn=r,r}se.prototype.once=function(t,n){return oa(n),this.on(t,sc(this,t,n)),this};se.prototype.prependOnceListener=function(t,n){return oa(n),this.prependListener(t,sc(this,t,n)),this};se.prototype.removeListener=function(t,n){var a,r,s,i,o;if(oa(n),r=this._events,r===void 0)return this;if(a=r[t],a===void 0)return this;if(a===n||a.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,a.listener||n));else if(typeof a!="function"){for(s=-1,i=a.length-1;i>=0;i--)if(a[i]===n||a[i].listener===n){o=a[i].listener,s=i;break}if(s<0)return this;s===0?a.shift():aS(a,s),a.length===1&&(r[t]=a[0]),r.removeListener!==void 0&&this.emit("removeListener",t,o||n)}return this};se.prototype.off=se.prototype.removeListener;se.prototype.removeAllListeners=function(t){var n,a,r;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[t]),this;if(arguments.length===0){var s=Object.keys(a),i;for(r=0;r<s.length;++r)i=s[r],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=a[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(r=n.length-1;r>=0;r--)this.removeListener(t,n[r]);return this};function ic(e,t,n){var a=e._events;if(a===void 0)return[];var r=a[t];return r===void 0?[]:typeof r=="function"?n?[r.listener||r]:[r]:n?rS(r):lc(r,r.length)}se.prototype.listeners=function(t){return ic(this,t,!0)};se.prototype.rawListeners=function(t){return ic(this,t,!1)};se.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):oc.call(e,t)};se.prototype.listenerCount=oc;function oc(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}se.prototype.eventNames=function(){return this._eventsCount>0?vn(this._events):[]};function lc(e,t){for(var n=new Array(t),a=0;a<t;++a)n[a]=e[a];return n}function aS(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function rS(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function sS(e,t){return new Promise(function(n,a){function r(i){e.removeListener(t,s),a(i)}function s(){typeof e.removeListener=="function"&&e.removeListener("error",r),n([].slice.call(arguments))}uc(e,t,s,{once:!0}),t!=="error"&&iS(e,r,{once:!0})})}function iS(e,t,n){typeof e.on=="function"&&uc(e,"error",t,n)}function uc(e,t,n,a){if(typeof e.on=="function")a.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function r(s){a.once&&e.removeEventListener(t,r),n(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var cc=rs.exports,la={},dc={},mc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),a=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var r=42;t[n]=r;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==r||i.enumerable!==!0)return!1}return!0},oS=mc,ss=function(){return oS()&&!!Symbol.toStringTag},Ro=typeof Symbol<"u"&&Symbol,lS=mc,uS=function(){return typeof Ro!="function"||typeof Symbol!="function"||typeof Ro("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lS()},jo={foo:{}},cS=Object,dS=function(){return{__proto__:jo}.foo===jo.foo&&!({__proto__:null}instanceof cS)},mS="Function.prototype.bind called on incompatible ",fS=Object.prototype.toString,pS=Math.max,yS="[object Function]",xo=function(t,n){for(var a=[],r=0;r<t.length;r+=1)a[r]=t[r];for(var s=0;s<n.length;s+=1)a[s+t.length]=n[s];return a},gS=function(t,n){for(var a=[],r=n||0,s=0;r<t.length;r+=1,s+=1)a[s]=t[r];return a},TS=function(e,t){for(var n="",a=0;a<e.length;a+=1)n+=e[a],a+1<e.length&&(n+=t);return n},hS=function(t){var n=this;if(typeof n!="function"||fS.apply(n)!==yS)throw new TypeError(mS+n);for(var a=gS(arguments,1),r,s=function(){if(this instanceof r){var p=n.apply(this,xo(a,arguments));return Object(p)===p?p:this}return n.apply(t,xo(a,arguments))},i=pS(0,n.length-a.length),o=[],d=0;d<i;d++)o[d]="$"+d;if(r=Function("binder","return function ("+TS(o,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var m=function(){};m.prototype=n.prototype,r.prototype=new m,m.prototype=null}return r},kS=hS,fc=Function.prototype.bind||kS,Lo={}.hasOwnProperty,_a=Function.prototype.call,NS=_a.bind?_a.bind(Lo):function(e,t){return _a.call(Lo,e,t)},K,Ut=SyntaxError,pc=Function,Lt=TypeError,wa=function(e){try{return pc('"use strict"; return ('+e+").constructor;")()}catch{}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch{Tt=null}var Ca=function(){throw new Lt},MS=Tt?function(){try{return arguments.callee,Ca}catch{try{return Tt(arguments,"callee").get}catch{return Ca}}}():Ca,At=uS(),IS=dS(),Te=Object.getPrototypeOf||(IS?function(e){return e.__proto__}:null),_t={},SS=typeof Uint8Array>"u"||!Te?K:Te(Uint8Array),ht={"%AggregateError%":typeof AggregateError>"u"?K:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?K:ArrayBuffer,"%ArrayIteratorPrototype%":At&&Te?Te([][Symbol.iterator]()):K,"%AsyncFromSyncIteratorPrototype%":K,"%AsyncFunction%":_t,"%AsyncGenerator%":_t,"%AsyncGeneratorFunction%":_t,"%AsyncIteratorPrototype%":_t,"%Atomics%":typeof Atomics>"u"?K:Atomics,"%BigInt%":typeof BigInt>"u"?K:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?K:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?K:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?K:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?K:Float32Array,"%Float64Array%":typeof Float64Array>"u"?K:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?K:FinalizationRegistry,"%Function%":pc,"%GeneratorFunction%":_t,"%Int8Array%":typeof Int8Array>"u"?K:Int8Array,"%Int16Array%":typeof Int16Array>"u"?K:Int16Array,"%Int32Array%":typeof Int32Array>"u"?K:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":At&&Te?Te(Te([][Symbol.iterator]())):K,"%JSON%":typeof JSON=="object"?JSON:K,"%Map%":typeof Map>"u"?K:Map,"%MapIteratorPrototype%":typeof Map>"u"||!At||!Te?K:Te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?K:Promise,"%Proxy%":typeof Proxy>"u"?K:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?K:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?K:Set,"%SetIteratorPrototype%":typeof Set>"u"||!At||!Te?K:Te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?K:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":At&&Te?Te(""[Symbol.iterator]()):K,"%Symbol%":At?Symbol:K,"%SyntaxError%":Ut,"%ThrowTypeError%":MS,"%TypedArray%":SS,"%TypeError%":Lt,"%Uint8Array%":typeof Uint8Array>"u"?K:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?K:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?K:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?K:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?K:WeakMap,"%WeakRef%":typeof WeakRef>"u"?K:WeakRef,"%WeakSet%":typeof WeakSet>"u"?K:WeakSet};if(Te)try{null.error}catch(e){var bS=Te(Te(e));ht["%Error.prototype%"]=bS}var $S=function e(t){var n;if(t==="%AsyncFunction%")n=wa("async function () {}");else if(t==="%GeneratorFunction%")n=wa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=wa("async function* () {}");else if(t==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(n=a.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Te&&(n=Te(r.prototype))}return ht[t]=n,n},Po={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mn=fc,Pn=NS,vS=mn.call(Function.call,Array.prototype.concat),AS=mn.call(Function.apply,Array.prototype.splice),Uo=mn.call(Function.call,String.prototype.replace),Un=mn.call(Function.call,String.prototype.slice),ES=mn.call(Function.call,RegExp.prototype.exec),OS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,DS=/\\(\\)?/g,_S=function(t){var n=Un(t,0,1),a=Un(t,-1);if(n==="%"&&a!=="%")throw new Ut("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&n!=="%")throw new Ut("invalid intrinsic syntax, expected opening `%`");var r=[];return Uo(t,OS,function(s,i,o,d){r[r.length]=o?Uo(d,DS,"$1"):i||s}),r},wS=function(t,n){var a=t,r;if(Pn(Po,a)&&(r=Po[a],a="%"+r[0]+"%"),Pn(ht,a)){var s=ht[a];if(s===_t&&(s=$S(a)),typeof s>"u"&&!n)throw new Lt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:a,value:s}}throw new Ut("intrinsic "+t+" does not exist!")},Gt=function(t,n){if(typeof t!="string"||t.length===0)throw new Lt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lt('"allowMissing" argument must be a boolean');if(ES(/^%?[^%]*%?$/,t)===null)throw new Ut("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=_S(t),r=a.length>0?a[0]:"",s=wS("%"+r+"%",n),i=s.name,o=s.value,d=!1,m=s.alias;m&&(r=m[0],AS(a,vS([0,1],m)));for(var p=1,T=!0;p<a.length;p+=1){var y=a[p],k=Un(y,0,1),S=Un(y,-1);if((k==='"'||k==="'"||k==="`"||S==='"'||S==="'"||S==="`")&&k!==S)throw new Ut("property names with quotes must have matching quotes");if((y==="constructor"||!T)&&(d=!0),r+="."+y,i="%"+r+"%",Pn(ht,i))o=ht[i];else if(o!=null){if(!(y in o)){if(!n)throw new Lt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Tt&&p+1>=a.length){var b=Tt(o,y);T=!!b,T&&"get"in b&&!("originalValue"in b.get)?o=b.get:o=o[y]}else T=Pn(o,y),o=o[y];T&&!d&&(ht[i]=o)}}return o},yc={exports:{}},CS=Gt,Mr=CS("%Object.defineProperty%",!0),Ir=function(){if(Mr)try{return Mr({},"a",{value:1}),!0}catch{return!1}return!1};Ir.hasArrayLengthDefineBug=function(){if(!Ir())return null;try{return Mr([],"length",{value:1}).length!==1}catch{return!0}};var gc=Ir,RS=Gt,An=RS("%Object.getOwnPropertyDescriptor%",!0);if(An)try{An([],"length")}catch{An=null}var is=An,jS=gc(),os=Gt,nn=jS&&os("%Object.defineProperty%",!0);if(nn)try{nn({},"a",{value:1})}catch{nn=!1}var xS=os("%SyntaxError%"),Et=os("%TypeError%"),Fo=is,LS=function(t,n,a){if(!t||typeof t!="object"&&typeof t!="function")throw new Et("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Et("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Et("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Et("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Et("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Et("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,d=!!Fo&&Fo(t,n);if(nn)nn(t,n,{configurable:i===null&&d?d.configurable:!i,enumerable:r===null&&d?d.enumerable:!r,value:a,writable:s===null&&d?d.writable:!s});else if(o||!r&&!s&&!i)t[n]=a;else throw new xS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Tc=Gt,zo=LS,PS=gc(),Bo=is,Go=Tc("%TypeError%"),US=Tc("%Math.floor%"),FS=function(t,n){if(typeof t!="function")throw new Go("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||US(n)!==n)throw new Go("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],r=!0,s=!0;if("length"in t&&Bo){var i=Bo(t,"length");i&&!i.configurable&&(r=!1),i&&!i.writable&&(s=!1)}return(r||s||!a)&&(PS?zo(t,"length",n,!0,!0):zo(t,"length",n)),t};(function(e){var t=fc,n=Gt,a=FS,r=n("%TypeError%"),s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,s),d=n("%Object.defineProperty%",!0),m=n("%Math.max%");if(d)try{d({},"a",{value:1})}catch{d=null}e.exports=function(y){if(typeof y!="function")throw new r("a function is required");var k=o(t,i,arguments);return a(k,1+m(0,y.length-(arguments.length-1)),!0)};var p=function(){return o(t,s,arguments)};d?d(e.exports,"apply",{value:p}):e.exports.apply=p})(yc);var hc=yc.exports,kc=Gt,Nc=hc,zS=Nc(kc("String.prototype.indexOf")),Mc=function(t,n){var a=kc(t,!!n);return typeof a=="function"&&zS(t,".prototype.")>-1?Nc(a):a},BS=ss(),GS=Mc,Sr=GS("Object.prototype.toString"),ua=function(t){return BS&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Sr(t)==="[object Arguments]"},Ic=function(t){return ua(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Sr(t)!=="[object Array]"&&Sr(t.callee)==="[object Function]"},QS=function(){return ua(arguments)}();ua.isLegacyArguments=Ic;var YS=QS?ua:Ic,VS=Object.prototype.toString,WS=Function.prototype.toString,qS=/^\s*(?:function)?\*/,Sc=ss(),Ra=Object.getPrototypeOf,HS=function(){if(!Sc)return!1;try{return Function("return function*() {}")()}catch{}},ja,ZS=function(t){if(typeof t!="function")return!1;if(qS.test(WS.call(t)))return!0;if(!Sc){var n=VS.call(t);return n==="[object GeneratorFunction]"}if(!Ra)return!1;if(typeof ja>"u"){var a=HS();ja=a?Ra(a):!1}return Ra(t)===ja},bc=Function.prototype.toString,Rt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,br,En;if(typeof Rt=="function"&&typeof Object.defineProperty=="function")try{br=Object.defineProperty({},"length",{get:function(){throw En}}),En={},Rt(function(){throw 42},null,br)}catch(e){e!==En&&(Rt=null)}else Rt=null;var KS=/^\s*class\b/,$r=function(t){try{var n=bc.call(t);return KS.test(n)}catch{return!1}},xa=function(t){try{return $r(t)?!1:(bc.call(t),!0)}catch{return!1}},On=Object.prototype.toString,JS="[object Object]",XS="[object Function]",eb="[object GeneratorFunction]",tb="[object HTMLAllCollection]",nb="[object HTML document.all class]",ab="[object HTMLCollection]",rb=typeof Symbol=="function"&&!!Symbol.toStringTag,sb=!(0 in[,]),vr=function(){return!1};if(typeof document=="object"){var ib=document.all;On.call(ib)===On.call(document.all)&&(vr=function(t){if((sb||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=On.call(t);return(n===tb||n===nb||n===ab||n===JS)&&t("")==null}catch{}return!1})}var ob=Rt?function(t){if(vr(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Rt(t,null,br)}catch(n){if(n!==En)return!1}return!$r(t)&&xa(t)}:function(t){if(vr(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(rb)return xa(t);if($r(t))return!1;var n=On.call(t);return n!==XS&&n!==eb&&!/^\[object HTML/.test(n)?!1:xa(t)},lb=ob,ub=Object.prototype.toString,$c=Object.prototype.hasOwnProperty,cb=function(t,n,a){for(var r=0,s=t.length;r<s;r++)$c.call(t,r)&&(a==null?n(t[r],r,t):n.call(a,t[r],r,t))},db=function(t,n,a){for(var r=0,s=t.length;r<s;r++)a==null?n(t.charAt(r),r,t):n.call(a,t.charAt(r),r,t)},mb=function(t,n,a){for(var r in t)$c.call(t,r)&&(a==null?n(t[r],r,t):n.call(a,t[r],r,t))},fb=function(t,n,a){if(!lb(n))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=a),ub.call(t)==="[object Array]"?cb(t,n,r):typeof t=="string"?db(t,n,r):mb(t,n,r)},pb=fb,La=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],yb=typeof globalThis>"u"?Xo:globalThis,gb=function(){for(var t=[],n=0;n<La.length;n++)typeof yb[La[n]]=="function"&&(t[t.length]=La[n]);return t},Fn=pb,Tb=gb,Qo=hc,ls=Mc,Dn=is,hb=ls("Object.prototype.toString"),vc=ss(),Yo=typeof globalThis>"u"?Xo:globalThis,Ar=Tb(),us=ls("String.prototype.slice"),Pa=Object.getPrototypeOf,kb=ls("Array.prototype.indexOf",!0)||function(t,n){for(var a=0;a<t.length;a+=1)if(t[a]===n)return a;return-1},zn={__proto__:null};vc&&Dn&&Pa?Fn(Ar,function(e){var t=new Yo[e];if(Symbol.toStringTag in t){var n=Pa(t),a=Dn(n,Symbol.toStringTag);if(!a){var r=Pa(n);a=Dn(r,Symbol.toStringTag)}zn["$"+e]=Qo(a.get)}}):Fn(Ar,function(e){var t=new Yo[e],n=t.slice||t.set;n&&(zn["$"+e]=Qo(n))});var Nb=function(t){var n=!1;return Fn(zn,function(a,r){if(!n)try{"$"+a(t)===r&&(n=us(r,1))}catch{}}),n},Mb=function(t){var n=!1;return Fn(zn,function(a,r){if(!n)try{a(t),n=us(r,1)}catch{}}),n},Ac=function(t){if(!t||typeof t!="object")return!1;if(!vc){var n=us(hb(t),8,-1);return kb(Ar,n)>-1?n:n!=="Object"?!1:Mb(t)}return Dn?Nb(t):null},Ib=Ac,Sb=function(t){return!!Ib(t)};(function(e){var t=YS,n=ZS,a=Ac,r=Sb;function s(w){return w.call.bind(w)}var i=typeof BigInt<"u",o=typeof Symbol<"u",d=s(Object.prototype.toString),m=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),T=s(Boolean.prototype.valueOf);if(i)var y=s(BigInt.prototype.valueOf);if(o)var k=s(Symbol.prototype.valueOf);function S(w,pn){if(typeof w!="object")return!1;try{return pn(w),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=r;function b(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}e.isPromise=b;function R(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):r(w)||O(w)}e.isArrayBufferView=R;function $(w){return a(w)==="Uint8Array"}e.isUint8Array=$;function _(w){return a(w)==="Uint8ClampedArray"}e.isUint8ClampedArray=_;function L(w){return a(w)==="Uint16Array"}e.isUint16Array=L;function P(w){return a(w)==="Uint32Array"}e.isUint32Array=P;function F(w){return a(w)==="Int8Array"}e.isInt8Array=F;function B(w){return a(w)==="Int16Array"}e.isInt16Array=B;function U(w){return a(w)==="Int32Array"}e.isInt32Array=U;function V(w){return a(w)==="Float32Array"}e.isFloat32Array=V;function q(w){return a(w)==="Float64Array"}e.isFloat64Array=q;function J(w){return a(w)==="BigInt64Array"}e.isBigInt64Array=J;function re(w){return a(w)==="BigUint64Array"}e.isBigUint64Array=re;function ce(w){return d(w)==="[object Map]"}ce.working=typeof Map<"u"&&ce(new Map);function oe(w){return typeof Map>"u"?!1:ce.working?ce(w):w instanceof Map}e.isMap=oe;function H(w){return d(w)==="[object Set]"}H.working=typeof Set<"u"&&H(new Set);function le(w){return typeof Set>"u"?!1:H.working?H(w):w instanceof Set}e.isSet=le;function Me(w){return d(w)==="[object WeakMap]"}Me.working=typeof WeakMap<"u"&&Me(new WeakMap);function Ee(w){return typeof WeakMap>"u"?!1:Me.working?Me(w):w instanceof WeakMap}e.isWeakMap=Ee;function Oe(w){return d(w)==="[object WeakSet]"}Oe.working=typeof WeakSet<"u"&&Oe(new WeakSet);function Ie(w){return Oe(w)}e.isWeakSet=Ie;function be(w){return d(w)==="[object ArrayBuffer]"}be.working=typeof ArrayBuffer<"u"&&be(new ArrayBuffer);function ee(w){return typeof ArrayBuffer>"u"?!1:be.working?be(w):w instanceof ArrayBuffer}e.isArrayBuffer=ee;function M(w){return d(w)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function O(w){return typeof DataView>"u"?!1:M.working?M(w):w instanceof DataView}e.isDataView=O;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function G(w){return d(w)==="[object SharedArrayBuffer]"}function X(w){return typeof j>"u"?!1:(typeof G.working>"u"&&(G.working=G(new j)),G.working?G(w):w instanceof j)}e.isSharedArrayBuffer=X;function te(w){return d(w)==="[object AsyncFunction]"}e.isAsyncFunction=te;function Y(w){return d(w)==="[object Map Iterator]"}e.isMapIterator=Y;function Z(w){return d(w)==="[object Set Iterator]"}e.isSetIterator=Z;function ne(w){return d(w)==="[object Generator]"}e.isGeneratorObject=ne;function Se(w){return d(w)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=Se;function Qe(w){return S(w,m)}e.isNumberObject=Qe;function Le(w){return S(w,p)}e.isStringObject=Le;function Re(w){return S(w,T)}e.isBooleanObject=Re;function It(w){return i&&S(w,y)}e.isBigIntObject=It;function fn(w){return o&&S(w,k)}e.isSymbolObject=fn;function Yt(w){return Qe(w)||Le(w)||Re(w)||It(w)||fn(w)}e.isBoxedPrimitive=Yt;function ca(w){return typeof Uint8Array<"u"&&(ee(w)||X(w))}e.isAnyArrayBuffer=ca,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(e,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})})(dc);var bb=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Er={exports:{}};typeof Object.create=="function"?Er.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Er.exports=function(t,n){if(n){t.super_=n;var a=function(){};a.prototype=n.prototype,t.prototype=new a,t.prototype.constructor=t}};var $b=Er.exports;(function(e){var t=Object.getOwnPropertyDescriptors||function(O){for(var j=Object.keys(O),G={},X=0;X<j.length;X++)G[j[X]]=Object.getOwnPropertyDescriptor(O,j[X]);return G},n=/%[sdj%]/g;e.format=function(M){if(!F(M)){for(var O=[],j=0;j<arguments.length;j++)O.push(i(arguments[j]));return O.join(" ")}for(var j=1,G=arguments,X=G.length,te=String(M).replace(n,function(Z){if(Z==="%%")return"%";if(j>=X)return Z;switch(Z){case"%s":return String(G[j++]);case"%d":return Number(G[j++]);case"%j":try{return JSON.stringify(G[j++])}catch{return"[Circular]"}default:return Z}}),Y=G[j];j<X;Y=G[++j])_(Y)||!q(Y)?te+=" "+Y:te+=" "+i(Y);return te},e.deprecate=function(M,O){if(typeof Q.process<"u"&&Q.process.noDeprecation===!0)return M;if(typeof Q.process>"u")return function(){return e.deprecate(M,O).apply(this,arguments)};var j=!1;function G(){if(!j){if(Q.process.throwDeprecation)throw new Error(O);Q.process.traceDeprecation?console.trace(O):console.error(O),j=!0}return M.apply(this,arguments)}return G};var a={},r=/^$/;if(Q.process.env.NODE_DEBUG){var s=Q.process.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),r=new RegExp("^"+s+"$","i")}e.debuglog=function(M){if(M=M.toUpperCase(),!a[M])if(r.test(M)){var O=Q.process.pid;a[M]=function(){var j=e.format.apply(e,arguments);console.error("%s %d: %s",M,O,j)}}else a[M]=function(){};return a[M]};function i(M,O){var j={seen:[],stylize:d};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),$(O)?j.showHidden=O:O&&e._extend(j,O),U(j.showHidden)&&(j.showHidden=!1),U(j.depth)&&(j.depth=2),U(j.colors)&&(j.colors=!1),U(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=o),p(j,M,j.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(M,O){var j=i.styles[O];return j?"\x1B["+i.colors[j][0]+"m"+M+"\x1B["+i.colors[j][1]+"m":M}function d(M,O){return M}function m(M){var O={};return M.forEach(function(j,G){O[j]=!0}),O}function p(M,O,j){if(M.customInspect&&O&&ce(O.inspect)&&O.inspect!==e.inspect&&!(O.constructor&&O.constructor.prototype===O)){var G=O.inspect(j,M);return F(G)||(G=p(M,G,j)),G}var X=T(M,O);if(X)return X;var te=Object.keys(O),Y=m(te);if(M.showHidden&&(te=Object.getOwnPropertyNames(O)),re(O)&&(te.indexOf("message")>=0||te.indexOf("description")>=0))return y(O);if(te.length===0){if(ce(O)){var Z=O.name?": "+O.name:"";return M.stylize("[Function"+Z+"]","special")}if(V(O))return M.stylize(RegExp.prototype.toString.call(O),"regexp");if(J(O))return M.stylize(Date.prototype.toString.call(O),"date");if(re(O))return y(O)}var ne="",Se=!1,Qe=["{","}"];if(R(O)&&(Se=!0,Qe=["[","]"]),ce(O)){var Le=O.name?": "+O.name:"";ne=" [Function"+Le+"]"}if(V(O)&&(ne=" "+RegExp.prototype.toString.call(O)),J(O)&&(ne=" "+Date.prototype.toUTCString.call(O)),re(O)&&(ne=" "+y(O)),te.length===0&&(!Se||O.length==0))return Qe[0]+ne+Qe[1];if(j<0)return V(O)?M.stylize(RegExp.prototype.toString.call(O),"regexp"):M.stylize("[Object]","special");M.seen.push(O);var Re;return Se?Re=k(M,O,j,Y,te):Re=te.map(function(It){return S(M,O,j,Y,It,Se)}),M.seen.pop(),b(Re,ne,Qe)}function T(M,O){if(U(O))return M.stylize("undefined","undefined");if(F(O)){var j="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(j,"string")}if(P(O))return M.stylize(""+O,"number");if($(O))return M.stylize(""+O,"boolean");if(_(O))return M.stylize("null","null")}function y(M){return"["+Error.prototype.toString.call(M)+"]"}function k(M,O,j,G,X){for(var te=[],Y=0,Z=O.length;Y<Z;++Y)Oe(O,String(Y))?te.push(S(M,O,j,G,String(Y),!0)):te.push("");return X.forEach(function(ne){ne.match(/^\d+$/)||te.push(S(M,O,j,G,ne,!0))}),te}function S(M,O,j,G,X,te){var Y,Z,ne;if(ne=Object.getOwnPropertyDescriptor(O,X)||{value:O[X]},ne.get?ne.set?Z=M.stylize("[Getter/Setter]","special"):Z=M.stylize("[Getter]","special"):ne.set&&(Z=M.stylize("[Setter]","special")),Oe(G,X)||(Y="["+X+"]"),Z||(M.seen.indexOf(ne.value)<0?(_(j)?Z=p(M,ne.value,null):Z=p(M,ne.value,j-1),Z.indexOf(`
39
39
  `)>-1&&(te?Z=Z.split(`
40
40
  `).map(function(Se){return" "+Se}).join(`
41
41
  `).slice(2):Z=`
@@ -48,5 +48,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
48
48
  `),o=`
49
49
  `+n+(s.length?r("│"):" ")+" ";return n+i.join(o)+`
50
50
  `+s.map(function(d,m){var p=m===s.length-1,T=d.nodes&&d.nodes.length,y=n+(p?" ":r("│"))+" ";return n+r(p?"└":"├")+r("─")+r(T?"┬":"─")+" "+e(d,y,a).slice(n.length+2)}).join("")};const Eb=Ab,Vo=Symbol("avvio.TimeTree.untrackNode"),Fa=Symbol("avvio.TimeTree.trackNode"),Wo=Symbol("avvio.TimeTree.getParent"),qo=Symbol("avvio.TimeTree.getNode"),Ho=Symbol("avvio.TimeTree.addNode");let Ob=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Fa](t){this.tableId.set(t.id,t),this.tableLabel.has(t.label)?this.tableLabel.get(t.label).push(t):this.tableLabel.set(t.label,[t])}[Vo](t){this.tableId.delete(t.id);const n=this.tableLabel.get(t.label);if(n.id){this.tableLabel.delete(t.label);return}n.pop(),n.length===0&&this.tableLabel.delete(t.label)}[Wo](t){if(t===null)return this.root;const n=this.tableLabel.get(t);return n.id?n:n[n.length-1]}[qo](t){return this.tableId.get(t)}[Ho](t,n,a){if(t===null)return this.root={id:"root",label:n,start:a,nodes:[]},this[Fa](this.root),this.root.id;const s=this[Wo](t),i=`${n}-${Math.random()}`,o={id:i,parent:t,start:a,label:n,nodes:[]};return s.nodes.push(o),this[Fa](o),i}start(t,n,a=Date.now()){return this[Ho](t,n,a)}stop(t,n=Date.now()){const a=this[qo](t);a&&(a.stop=n,a.diff=a.stop-a.start||0,this[Vo](a))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const t=a=>(a.label=`${a.label} ${a.diff} ms`,a.nodes.length>0&&(a.nodes=a.nodes.map(r=>t(r))),a),n=t(this.toJSON());return Eb(n)}};var Db=Ob,cs={exports:{}},Or={exports:{}},za,Zo;function _b(){if(Zo)return za;Zo=1;var e=1e3,t=e*60,n=t*60,a=n*24,r=a*7,s=a*365.25;za=function(p,T){T=T||{};var y=typeof p;if(y==="string"&&p.length>0)return i(p);if(y==="number"&&isFinite(p))return T.long?d(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function i(p){if(p=String(p),!(p.length>100)){var T=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(T){var y=parseFloat(T[1]),k=(T[2]||"ms").toLowerCase();switch(k){case"years":case"year":case"yrs":case"yr":case"y":return y*s;case"weeks":case"week":case"w":return y*r;case"days":case"day":case"d":return y*a;case"hours":case"hour":case"hrs":case"hr":case"h":return y*n;case"minutes":case"minute":case"mins":case"min":case"m":return y*t;case"seconds":case"second":case"secs":case"sec":case"s":return y*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function o(p){var T=Math.abs(p);return T>=a?Math.round(p/a)+"d":T>=n?Math.round(p/n)+"h":T>=t?Math.round(p/t)+"m":T>=e?Math.round(p/e)+"s":p+"ms"}function d(p){var T=Math.abs(p);return T>=a?m(p,T,a,"day"):T>=n?m(p,T,n,"hour"):T>=t?m(p,T,t,"minute"):T>=e?m(p,T,e,"second"):p+" ms"}function m(p,T,y,k){var S=T>=y*1.5;return Math.round(p/y)+" "+k+(S?"s":"")}return za}function wb(e){n.debug=n,n.default=n,n.coerce=d,n.disable=s,n.enable=r,n.enabled=i,n.humanize=_b(),n.destroy=m,Object.keys(e).forEach(p=>{n[p]=e[p]}),n.names=[],n.skips=[],n.formatters={};function t(p){let T=0;for(let y=0;y<p.length;y++)T=(T<<5)-T+p.charCodeAt(y),T|=0;return n.colors[Math.abs(T)%n.colors.length]}n.selectColor=t;function n(p){let T,y=null,k,S;function b(...R){if(!b.enabled)return;const $=b,_=Number(new Date),L=_-(T||_);$.diff=L,$.prev=T,$.curr=_,T=_,R[0]=n.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");let P=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(B,U)=>{if(B==="%%")return"%";P++;const V=n.formatters[U];if(typeof V=="function"){const q=R[P];B=V.call($,q),R.splice(P,1),P--}return B}),n.formatArgs.call($,R),($.log||n.log).apply($,R)}return b.namespace=p,b.useColors=n.useColors(),b.color=n.selectColor(p),b.extend=a,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(k!==n.namespaces&&(k=n.namespaces,S=n.enabled(p)),S),set:R=>{y=R}}),typeof n.init=="function"&&n.init(b),b}function a(p,T){const y=n(this.namespace+(typeof T>"u"?":":T)+p);return y.log=this.log,y}function r(p){n.save(p),n.namespaces=p,n.names=[],n.skips=[];let T;const y=(typeof p=="string"?p:"").split(/[\s,]+/),k=y.length;for(T=0;T<k;T++)y[T]&&(p=y[T].replace(/\*/g,".*?"),p[0]==="-"?n.skips.push(new RegExp("^"+p.slice(1)+"$")):n.names.push(new RegExp("^"+p+"$")))}function s(){const p=[...n.names.map(o),...n.skips.map(o).map(T=>"-"+T)].join(",");return n.enable(""),p}function i(p){if(p[p.length-1]==="*")return!0;let T,y;for(T=0,y=n.skips.length;T<y;T++)if(n.skips[T].test(p))return!1;for(T=0,y=n.names.length;T<y;T++)if(n.names[T].test(p))return!0;return!1}function o(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}function d(p){return p instanceof Error?p.stack||p.message:p}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Cb=wb;(function(e,t){t.formatArgs=a,t.save=r,t.load=s,t.useColors=n,t.storage=i(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const m="color: "+this.color;d.splice(1,0,m,"color: inherit");let p=0,T=0;d[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(p++,y==="%c"&&(T=p))}),d.splice(T,0,m)}t.log=console.debug||console.log||(()=>{});function r(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function s(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof Q.process<"u"&&"env"in Q.process&&(d=Q.process.env.DEBUG),d}function i(){try{return localStorage}catch{}}e.exports=Cb(t);const{formatters:o}=e.exports;o.j=function(d){try{return JSON.stringify(d)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}})(Or,Or.exports);var Oc=Or.exports;const Rb=tc,jb=cc.EventEmitter,xb=la.inherits,he=Oc("avvio"),{AVV_ERR_READY_TIMEOUT:Lb}=Ec,Ba=Symbol.for("plugin-meta");function Pb(e,t){return e[Ba]&&e[Ba].name?e[Ba].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
51
- `).slice(0,2).map(n=>n.trim()).join(" -- ")}function Ub(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Qt(e,t,n,a,r){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=r===void 0?e._timeout:r,this.name=Pb(t,n),this.isAfter=a,this.q=Rb(e,Fb,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}xb(Qt,jb);Qt.prototype.exec=function(e,t){const n=this.func;let a=!1;const r=this.name;if(this.parent._error&&!this.isAfter){he("skipping loading of plugin as parent errored and it is not an after",r),Q.process.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(d){return he("override errored",r),t(d)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,he("exec",r);let s;const i=d=>{if(a){he("loading complete",r);return}this._error=d,he(d?"exec errored":"exec completed",r),a=!0,s&&clearTimeout(s),t(d)};this.timeout>0&&(he("setting up timeout",r,this.timeout),s=setTimeout(function(){he("timed out",r),s=null;const d=new Lb(r);d.fn=n,i(d)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const o=n(this.server,this.opts,i);o&&typeof o.then=="function"&&(he("exec: resolving promise",r),o.then(()=>Q.process.nextTick(i),d=>Q.process.nextTick(i,d)))};Qt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(he("rejecting promise",this.name,n),this._promise.reject(n)):(he("resolving promise",this.name),this._promise.resolve()),this._promise=null,Q.process.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=Ub(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Qt.prototype.enqueue=function(e,t){he("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Qt.prototype.finish=function(e,t){he("finish",this.name,e);const n=()=>{this.loaded||(he("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(he("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const r=()=>{he("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else he("delayed",this.name),this.q.drain=()=>{he("drain",this.name),this.q.drain=zb,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function Fb(e,t){const n=this;Q.process.nextTick(ds.bind(n),e,t)}function ds(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,ds.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,r=>{this._current.shift(),t(r)})})}function zb(){}cs.exports=Qt;cs.exports.loadPlugin=ds;var Bb=cs.exports;const Ko=tc,Gb=cc.EventEmitter,Qb=la.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ga,AVV_ERR_CALLBACK_NOT_FN:an,AVV_ERR_PLUGIN_NOT_VALID:Yb,AVV_ERR_ROOT_PLG_BOOTED:Vb,AVV_ERR_READY_TIMEOUT:Wb}=Ec,qb=Db,Dr=Bb,Ft=Oc("avvio"),Bn=Symbol("kAvvio"),Qa=Symbol("kThenifyDoNotWrap");function Hb(e,t,n){const a=t.expose||{},r=a.use||"use",s=a.after||"after",i=a.ready||"ready",o=a.onClose||"onClose",d=a.close||"close";if(e[r])throw new Ga(r);if(e[s])throw new Ga(s);if(e[i])throw new Ga(i);e[r]=function(m,p){return n.use(m,p),this},Object.defineProperty(e,"then",{get:Dc.bind(n)}),e[Bn]=!0,e[s]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Ya(m,this)),this)},e[i]=function(m){if(m&&typeof m!="function")throw new an(i,typeof m);return n.ready(m?Ya(m,this):void 0)},e[o]=function(m){if(typeof m!="function")throw new an(o,typeof m);return n.onClose(e9(m,this)),this},e[d]=function(m){if(m&&typeof m!="function")throw new an(d,typeof m);return m?(n.close(Ya(m,this)),this):n.close()}}function Ne(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof Ne)){const a=new Ne(e,t,n);return e&&Hb(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new qb,this._readyQ=Ko(this,_c,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Jo},this._closeQ=Ko(this,Xb,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Jo},this._doStart=null,this._root=new Dr(this,Zb.bind(this),t,!1,0),this._root.once("start",(a,r,s)=>{const i=this.pluginTree.start(null,r,s);this._root.once("loaded",(o,d,m)=>{this.pluginTree.stop(i,m)})}),Dr.loadPlugin.call(this,this._root,a=>{Ft("root plugin ready");try{this.emit("preReady"),this._root=null}catch(r){a=a||this._error||r}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function Zb(e,t,n){this._doStart=n,t.autostart&&this.start()}Qb(Ne,Gb);Ne.prototype.start=function(){return this.started=!0,Q.process.nextTick(this._doStart),this};Ne.prototype.override=function(e,t,n){return e};function Kb(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new Yb(typeof e);return e}Ne.prototype[Bn]=!0;Ne.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};Ne.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&Q.process.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(Ne.prototype,"then",{get:Dc});Ne.prototype._addPlugin=function(e,t,n){if(e=Kb(e),t=t||{},this.booted)throw new Vb;const a=this._current[0],r=new Dr(this,e,t,n);if(r.once("start",(s,i,o)=>{const d=this.pluginTree.start(a.name,i,o);r.once("loaded",(m,p,T)=>{this.pluginTree.stop(d,T)})}),a.loaded)throw new Error(r.name,a.name);return a.enqueue(r,s=>{s&&(this._error=s)}),r};Ne.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,r){_c.call(this,e,r)}return this};Ne.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};Ne.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new an("close",typeof e)}else t=new Promise(function(n,a){e=function(r){if(r)return a(r);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),Q.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};Ne.prototype.ready=function(e){if(e){if(typeof e!="function")throw new an("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(r),this.start();const a=this._current[0].server;function r(s,i,o){s?n(s):t(a),Q.process.nextTick(o)}})};Ne.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ne.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Jo(){}function Dc(){if(this.booted){Ft("thenify returning null because we are already booted");return}if(this[Qa]){this[Qa]=!1;return}return Ft("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Qa]=!0,e(this._server)),t)}function _c(e,t){const n=this._server,a=this._error;let r;if(this._error=null,e.length===0)this._error=a,r=e(),r&&!r[Bn]&&typeof r.then=="function"?r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s)):Q.process.nextTick(t);else if(e.length===1)r=e(a),r&&!r[Bn]&&typeof r.then=="function"?r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s)):Q.process.nextTick(t);else if(this._timeout===0){const s=i=>{this._error=i,t(this._error)};e.length===2?e(a,s):e(a,n,s)}else Jb.call(this,e,a,n,t)}function Jb(e,t,n,a){const r=e.name;Ft("setting up ready timeout",r,this._timeout);let s=setTimeout(()=>{Ft("timed out",r),s=null;const o=new Wb(r);o.fn=e,this._error=o,a(o)},this._timeout);e.length===2?e(t,i.bind(this)):e(t,n,i.bind(this));function i(o){s&&(clearTimeout(s),this._error=o,a(this._error))}}function Xb(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let r;a?r=e(n):r=e(this._error),r&&typeof r.then=="function"?(Ft("resolving close/onClose promise"),r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s))):Q.process.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function e9(e,t){return n.bind(t);function n(a,r){let s;e.length===0?(s=e(),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e.length===1?(s=e(this),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e(this,r)}}function Ya(e,t){return n.bind(t);function n(a,r){let s;e?e.length===0?(s=e(),s&&s.then?s.then(function(){Q.process.nextTick(r,a)},r):Q.process.nextTick(r,a)):e.length===1?(s=e(a),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e.length===2?e(a,r):e(a,this,r):Q.process.nextTick(r)}}ns.exports=Ne;ns.exports.express=function(e){return Ne(e,{expose:{use:"load"}})};var t9=ns.exports;const n9=wr(t9);function a9(e,t=!0){const n=t?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=n9(Object.create(null),{autostart:!1});return a.use(TI),a.use(uI,{sdkKey:e,host:n}),a.use(mI),a.use(pI),a.use(HI),a.use(gI),a.after(async(r,s,i)=>{if(r)throw r;await s.sdk.initializeApp(),i()}),a.onClose(()=>{console.log("close")}),a}window.instance=null;const wc=(e,t,n)=>{const[a,r]=C.useState(null);return C.useEffect(()=>{let s=!1;if(!e)throw new Error("sdk key should be provided");const i=a9(e,n);if(t)for(const o of t)i.use(o);return i.ready().then(o=>{s||(window.instance=o,r(o.sdk))}).catch(o=>console.log(o)),()=>{s=!0,i.close(function(o){if(o)throw o})}},[e]),a};var _r=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(_r||{});const ms=C.createContext({status:0}),r9=({sdkKey:e,plugins:t,children:n,production:a=!0})=>{const r=wc(e,t,a),s=C.useMemo(()=>r?{sdk:r,status:2}:{status:1},[r]);return h.jsx(I4,{children:h.jsx(ms.Provider,{value:s,children:n})})},s9=()=>{const{sdk:e}=C.useContext(ms);return e},i9=()=>{const{sdk:e,status:t}=C.useContext(ms);if(t===_r.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return t===_r.CONNECTED?h.jsx("div",{children:"wait"}):e===void 0?h.jsx("div",{children:"sdk not initialized"}):h.jsx(N4,{sdk:e})};exports.StreamLayerProvider=r9;exports.StreamLayerSDKReact=i9;exports.useStreamLayer=s9;exports.useStreamLayerApp=wc;
51
+ `).slice(0,2).map(n=>n.trim()).join(" -- ")}function Ub(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Qt(e,t,n,a,r){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=r===void 0?e._timeout:r,this.name=Pb(t,n),this.isAfter=a,this.q=Rb(e,Fb,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}xb(Qt,jb);Qt.prototype.exec=function(e,t){const n=this.func;let a=!1;const r=this.name;if(this.parent._error&&!this.isAfter){he("skipping loading of plugin as parent errored and it is not an after",r),Q.process.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(d){return he("override errored",r),t(d)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,he("exec",r);let s;const i=d=>{if(a){he("loading complete",r);return}this._error=d,he(d?"exec errored":"exec completed",r),a=!0,s&&clearTimeout(s),t(d)};this.timeout>0&&(he("setting up timeout",r,this.timeout),s=setTimeout(function(){he("timed out",r),s=null;const d=new Lb(r);d.fn=n,i(d)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const o=n(this.server,this.opts,i);o&&typeof o.then=="function"&&(he("exec: resolving promise",r),o.then(()=>Q.process.nextTick(i),d=>Q.process.nextTick(i,d)))};Qt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(he("rejecting promise",this.name,n),this._promise.reject(n)):(he("resolving promise",this.name),this._promise.resolve()),this._promise=null,Q.process.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=Ub(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Qt.prototype.enqueue=function(e,t){he("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Qt.prototype.finish=function(e,t){he("finish",this.name,e);const n=()=>{this.loaded||(he("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(he("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const r=()=>{he("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else he("delayed",this.name),this.q.drain=()=>{he("drain",this.name),this.q.drain=zb,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function Fb(e,t){const n=this;Q.process.nextTick(ds.bind(n),e,t)}function ds(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,ds.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,r=>{this._current.shift(),t(r)})})}function zb(){}cs.exports=Qt;cs.exports.loadPlugin=ds;var Bb=cs.exports;const Ko=tc,Gb=cc.EventEmitter,Qb=la.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ga,AVV_ERR_CALLBACK_NOT_FN:an,AVV_ERR_PLUGIN_NOT_VALID:Yb,AVV_ERR_ROOT_PLG_BOOTED:Vb,AVV_ERR_READY_TIMEOUT:Wb}=Ec,qb=Db,Dr=Bb,Ft=Oc("avvio"),Bn=Symbol("kAvvio"),Qa=Symbol("kThenifyDoNotWrap");function Hb(e,t,n){const a=t.expose||{},r=a.use||"use",s=a.after||"after",i=a.ready||"ready",o=a.onClose||"onClose",d=a.close||"close";if(e[r])throw new Ga(r);if(e[s])throw new Ga(s);if(e[i])throw new Ga(i);e[r]=function(m,p){return n.use(m,p),this},Object.defineProperty(e,"then",{get:Dc.bind(n)}),e[Bn]=!0,e[s]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Ya(m,this)),this)},e[i]=function(m){if(m&&typeof m!="function")throw new an(i,typeof m);return n.ready(m?Ya(m,this):void 0)},e[o]=function(m){if(typeof m!="function")throw new an(o,typeof m);return n.onClose(e9(m,this)),this},e[d]=function(m){if(m&&typeof m!="function")throw new an(d,typeof m);return m?(n.close(Ya(m,this)),this):n.close()}}function Ne(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof Ne)){const a=new Ne(e,t,n);return e&&Hb(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new qb,this._readyQ=Ko(this,_c,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Jo},this._closeQ=Ko(this,Xb,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Jo},this._doStart=null,this._root=new Dr(this,Zb.bind(this),t,!1,0),this._root.once("start",(a,r,s)=>{const i=this.pluginTree.start(null,r,s);this._root.once("loaded",(o,d,m)=>{this.pluginTree.stop(i,m)})}),Dr.loadPlugin.call(this,this._root,a=>{Ft("root plugin ready");try{this.emit("preReady"),this._root=null}catch(r){a=a||this._error||r}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function Zb(e,t,n){this._doStart=n,t.autostart&&this.start()}Qb(Ne,Gb);Ne.prototype.start=function(){return this.started=!0,Q.process.nextTick(this._doStart),this};Ne.prototype.override=function(e,t,n){return e};function Kb(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new Yb(typeof e);return e}Ne.prototype[Bn]=!0;Ne.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};Ne.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&Q.process.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(Ne.prototype,"then",{get:Dc});Ne.prototype._addPlugin=function(e,t,n){if(e=Kb(e),t=t||{},this.booted)throw new Vb;const a=this._current[0],r=new Dr(this,e,t,n);if(r.once("start",(s,i,o)=>{const d=this.pluginTree.start(a.name,i,o);r.once("loaded",(m,p,T)=>{this.pluginTree.stop(d,T)})}),a.loaded)throw new Error(r.name,a.name);return a.enqueue(r,s=>{s&&(this._error=s)}),r};Ne.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,r){_c.call(this,e,r)}return this};Ne.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};Ne.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new an("close",typeof e)}else t=new Promise(function(n,a){e=function(r){if(r)return a(r);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),Q.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};Ne.prototype.ready=function(e){if(e){if(typeof e!="function")throw new an("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(r),this.start();const a=this._current[0].server;function r(s,i,o){s?n(s):t(a),Q.process.nextTick(o)}})};Ne.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ne.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Jo(){}function Dc(){if(this.booted){Ft("thenify returning null because we are already booted");return}if(this[Qa]){this[Qa]=!1;return}return Ft("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Qa]=!0,e(this._server)),t)}function _c(e,t){const n=this._server,a=this._error;let r;if(this._error=null,e.length===0)this._error=a,r=e(),r&&!r[Bn]&&typeof r.then=="function"?r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s)):Q.process.nextTick(t);else if(e.length===1)r=e(a),r&&!r[Bn]&&typeof r.then=="function"?r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s)):Q.process.nextTick(t);else if(this._timeout===0){const s=i=>{this._error=i,t(this._error)};e.length===2?e(a,s):e(a,n,s)}else Jb.call(this,e,a,n,t)}function Jb(e,t,n,a){const r=e.name;Ft("setting up ready timeout",r,this._timeout);let s=setTimeout(()=>{Ft("timed out",r),s=null;const o=new Wb(r);o.fn=e,this._error=o,a(o)},this._timeout);e.length===2?e(t,i.bind(this)):e(t,n,i.bind(this));function i(o){s&&(clearTimeout(s),this._error=o,a(this._error))}}function Xb(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let r;a?r=e(n):r=e(this._error),r&&typeof r.then=="function"?(Ft("resolving close/onClose promise"),r.then(()=>Q.process.nextTick(t),s=>Q.process.nextTick(t,s))):Q.process.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function e9(e,t){return n.bind(t);function n(a,r){let s;e.length===0?(s=e(),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e.length===1?(s=e(this),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e(this,r)}}function Ya(e,t){return n.bind(t);function n(a,r){let s;e?e.length===0?(s=e(),s&&s.then?s.then(function(){Q.process.nextTick(r,a)},r):Q.process.nextTick(r,a)):e.length===1?(s=e(a),s&&s.then?s.then(function(){Q.process.nextTick(r)},r):Q.process.nextTick(r)):e.length===2?e(a,r):e(a,this,r):Q.process.nextTick(r)}}ns.exports=Ne;ns.exports.express=function(e){return Ne(e,{expose:{use:"load"}})};var t9=ns.exports;const n9=wr(t9);function a9(e,t=!0){const n=t?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=n9(Object.create(null),{autostart:!1});return a.use(yI),a.use(uI,{sdkKey:e,host:n}),a.use(mI),a.use(pI),a.use(WI),a.use(HI),a.after(async(r,s,i)=>{if(r)throw r;await s.sdk.initializeApp(),i()}),a.onClose(()=>{console.log("close")}),a}window.instance=null;const wc=(e,t,n)=>{const[a,r]=C.useState(null);return C.useEffect(()=>{let s=!1;if(!e)throw new Error("sdk key should be provided");const i=a9(e,n);if(t)for(const o of t)i.use(o);return i.ready().then(o=>{s||(window.instance=o,r(o.sdk))}).catch(o=>console.log(o)),()=>{s=!0,i.close(function(o){if(o)throw o})}},[e]),a};var _r=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(_r||{});const ms=C.createContext({status:0}),r9=({sdkKey:e,plugins:t,children:n,production:a=!0})=>{const r=wc(e,t,a),s=C.useMemo(()=>r?{sdk:r,status:2}:{status:1},[r]);return h.jsx(I4,{children:h.jsx(ms.Provider,{value:s,children:n})})},s9=()=>{const{sdk:e}=C.useContext(ms);return e},i9=()=>{const{sdk:e,status:t}=C.useContext(ms);if(t===_r.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return t===_r.CONNECTED?h.jsx("div",{children:"wait"}):e===void 0?h.jsx("div",{children:"sdk not initialized"}):h.jsx(N4,{sdk:e})};exports.StreamLayerProvider=r9;exports.StreamLayerSDKReact=i9;exports.useStreamLayer=s9;exports.useStreamLayerApp=wc;
52
52
  //# sourceMappingURL=https://127.0.0.1:3030/index.js.map