fansunited-management-components 1.40.0 → 1.41.0
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/index.es.js
CHANGED
|
@@ -15569,8 +15569,7 @@ class nE extends KT {
|
|
|
15569
15569
|
});
|
|
15570
15570
|
}));
|
|
15571
15571
|
ee(this, "getEntityFeature", (n, r) => w(this, null, function* () {
|
|
15572
|
-
const i = `/clients/${this.clientId}/features/${n}
|
|
15573
|
-
let o = { key: this.apiKey };
|
|
15572
|
+
const i = `/clients/${this.clientId}/features/${n}?`, o = { key: this.apiKey };
|
|
15574
15573
|
return r && (o.disable_cache = Date.now().toString()), yield fetch(this.clientApiBaseUrl + i + new URLSearchParams(o));
|
|
15575
15574
|
}));
|
|
15576
15575
|
ee(this, "getClassicQuizFeature", () => w(this, null, function* () {
|
|
@@ -15935,6 +15934,14 @@ class nE extends KT {
|
|
|
15935
15934
|
body: JSON.stringify(n)
|
|
15936
15935
|
});
|
|
15937
15936
|
}));
|
|
15937
|
+
ee(this, "updateProfilePreferences", (n) => w(this, null, function* () {
|
|
15938
|
+
const r = `/clients/${this.clientId}/features/profile_preferences?`, i = yield this.getToken();
|
|
15939
|
+
return yield fetch(this.clientApiBaseUrl + r + new URLSearchParams({ key: this.apiKey }), {
|
|
15940
|
+
headers: q($({}, this.headers), { Authorization: "Bearer " + i }),
|
|
15941
|
+
method: "PATCH",
|
|
15942
|
+
body: JSON.stringify(n)
|
|
15943
|
+
});
|
|
15944
|
+
}));
|
|
15938
15945
|
this.loyaltyBaseUrl = YT(n.environment), this.predictionBaseUrl = qT(n.environment), this.miniGamesApiBaseUrl = JT(n.environment), this.reportingApiBaseUrl = QT(n.environment), this.votingApiBaseUrl = XT(n.environment), this.profileApiBaseUrl = eE(n.environment), this.customResolverUrl = ZT(n.environment), this.discussionsApiBaseUrl = tE(n.environment);
|
|
15939
15946
|
}
|
|
15940
15947
|
}
|
package/index.umd.js
CHANGED
|
@@ -3327,7 +3327,7 @@
|
|
|
3327
3327
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3328
3328
|
* See the License for the specific language governing permissions and
|
|
3329
3329
|
* limitations under the License.
|
|
3330
|
-
*/const r_=5*60,i_=Dl("authIdTokenMaxAge")||r_;let Vp=null;const o_=t=>e=>S(this,null,function*(){const n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>i_)return;const i=n==null?void 0:n.token;Vp!==i&&(Vp=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function a_(t=yf()){const e=oa(t,"auth");if(e.isInitialized())return e.getImmediate();const n=jA(t,{popupRedirectResolver:ZT,persistence:[dT,ZA,Ep]}),r=Dl("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=o_(o.toString());JA(n,a,()=>a(n.currentUser)),qA(n,l=>a(l))}}const i=My("auth");return i&&yp(n,`http://${i}`),n}function s_(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}NA({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const o=Cn("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",s_().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),n_("Browser");let Hp=!1;const fo=t=>{if(Hp)return tr.auth();if(t&&t==="dev"){tr.initializeApp({apiKey:"api_key"});const n=a_();yp(n,"http://localhost:39199")}else{const n={apiKey:t&&t==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-DPV1TYL0JW"};tr.initializeApp(n)}return Hp=!0,tr.auth()},l_=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":t==="yolo"?"https://client.yolo.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class c_{constructor(e,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));te(this,"storeInBucket",(e,n,r)=>S(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(e,n,r)=>S(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:e,page:r.toString()};return n&&(n.from&&(o=J(B({},o),{from:n.from})),n.to&&(o=J(B({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:e},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(e,n,r)=>S(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(e),method:o})}));te(this,"deleteScheduledTask",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${e}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>S(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);te(this,"throwErrorFromXmlResponse",e=>{const n=new window.DOMParser().parseFromString(e,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>S(this,null,function*(){const e=fo(this.environment).currentUser;return e?yield e.getIdToken():""}));this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=n,this.clientApiBaseUrl=l_(this.environment)}}const u_=t=>t==="dev"?"http://localhost:8060/v1":t==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":t==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":t==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",d_=t=>t==="dev"?"http://localhost:8040/v1":t==="staging"?"https://prediction.fansunitedstagingapi.com/v1":t==="watg"?"https://prediction.watg.fansunitedapi.com/v1":t==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",f_=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":t==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",h_=t=>t==="dev"?"http://localhost:8020/v1":t==="staging"?"https://reporting.fansunitedstagingapi.com/v1":t==="watg"?"https://reporting.watg.fansunitedapi.com/v1":t==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",p_=t=>t==="dev"?"http://localhost:9030/v1":t==="staging"?"https://voting.fansunitedstagingapi.com/v1":t==="watg"?"https://voting.watg.fansunitedapi.com/v1":t==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",g_=t=>t==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":t==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":t==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",m_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://profile.fansunitedstagingapi.com/v1":t==="watg"?"https://profile.watg.fansunitedapi.com/v1":t==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",v_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://discussions.fansunitedstagingapi.com/v1":t==="watg"?"https://discussions.watg.fansunitedapi.com/v1":t==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class b_ extends c_{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>S(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>S(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>S(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>S(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>S(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r)=>S(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>S(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>S(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>S(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>S(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`;let o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClassicQuizFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>S(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>S(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>S(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>S(this,null,function*(){const a="/classic-quizzes/participations?",l=J(B({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getEntityParticipations",(n,r,i)=>S(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=J(B({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createPoll",n=>S(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>S(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>S(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",n=>S(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createEitherOr",n=>S(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>S(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>S(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>S(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getListById",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>S(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createList",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>S(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>S(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>S(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>S(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>S(this,null,function*(){const r="/leads/export?",i=J(B({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>S(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>S(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>S(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>S(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>S(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>S(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=J(B({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>S(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>S(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),l={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"unbanUser",(n,r)=>S(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>S(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),l=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"deleteUserProfile",n=>S(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>S(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>S(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>S(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",l=yield this.getToken();let s={};if(r.length>0){const c=r.join(",");s=J(B({},this.mainQueryParams),{post_ids:c,reason:i})}else s=J(B({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(s),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>S(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>S(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>S(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>S(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));this.loyaltyBaseUrl=u_(n.environment),this.predictionBaseUrl=d_(n.environment),this.miniGamesApiBaseUrl=f_(n.environment),this.reportingApiBaseUrl=h_(n.environment),this.votingApiBaseUrl=p_(n.environment),this.profileApiBaseUrl=m_(n.environment),this.customResolverUrl=g_(n.environment),this.discussionsApiBaseUrl=v_(n.environment)}}const y_=(t,e)=>!t&&!e?null:!t&&e?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:t,authorization:`Bearer ${e&&e==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ja=x.createContext(null),C_=({config:t,children:e})=>{const n={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=y_(t.sportal365Project,t.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new b_(n,r);return u.jsx(ja.Provider,{value:{sdk:i,https:o},children:e})},Wp=x.createContext(null),x_=({children:t,environment:e})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>fo(e).onAuthStateChanged(l=>{Me.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[e]),u.jsx(Wp.Provider,{value:n,children:!i&&t})};function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(null,arguments)}function _e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}var Gp={exports:{}},w_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I_=w_,S_=I_;function Kp(){}function Yp(){}Yp.resetWarningCache=Kp;var A_=function(){function t(r,i,o,a,l,s){if(s!==S_){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Yp,resetWarningCache:Kp};return n.PropTypes=n,n};Gp.exports=A_();var T_=Gp.exports;function __(t){return typeof t=="string"}function E_(t,e,n){return t===void 0||__(t)?e:O({},e,{ownerState:O({},e.ownerState,n)})}function qp(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}function zn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function k_(t,e,n){return typeof t=="function"?t(e,n):t}function P_(t){const{rootElementName:e="",componentName:n}=t,[r,i]=z.useState(e.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function D_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function dn(...t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{D_(n,e)})},t)}function Jp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Jp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Vn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Jp(t))&&(r&&(r+=" "),r+=e);return r}function Qp(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function O_(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=Vn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=zn(O({},i,r)),l=Qp(r),s=Qp(i),c=e(a),d=Vn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=O({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function ur(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Xp(t){if(z.isValidElement(t)||!ur(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Xp(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?O({},t):t;return ur(t)&&ur(e)&&Object.keys(e).forEach(i=>{z.isValidElement(e[i])?r[i]=e[i]:ur(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ur(t[i])?r[i]=Hn(t[i],e[i],n):n.clone?r[i]=ur(e[i])?Xp(e[i]):e[i]:r[i]=e[i]}),r}function za(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Zp={exports:{}},Ue={};/**
|
|
3330
|
+
*/const r_=5*60,i_=Dl("authIdTokenMaxAge")||r_;let Vp=null;const o_=t=>e=>S(this,null,function*(){const n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>i_)return;const i=n==null?void 0:n.token;Vp!==i&&(Vp=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function a_(t=yf()){const e=oa(t,"auth");if(e.isInitialized())return e.getImmediate();const n=jA(t,{popupRedirectResolver:ZT,persistence:[dT,ZA,Ep]}),r=Dl("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(r,location.origin);if(location.origin===o.origin){const a=o_(o.toString());JA(n,a,()=>a(n.currentUser)),qA(n,l=>a(l))}}const i=My("auth");return i&&yp(n,`http://${i}`),n}function s_(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}NA({loadJS(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const o=Cn("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",s_().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="}),n_("Browser");let Hp=!1;const fo=t=>{if(Hp)return tr.auth();if(t&&t==="dev"){tr.initializeApp({apiKey:"api_key"});const n=a_();yp(n,"http://localhost:39199")}else{const n={apiKey:t&&t==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-DPV1TYL0JW"};tr.initializeApp(n)}return Hp=!0,tr.auth()},l_=t=>t==="dev"?"http://localhost:8070/v1":t==="staging"?"https://client.fansunitedstagingapi.com/v1":t==="watg"?"https://client.watg.fansunitedapi.com/v1":t==="yolo"?"https://client.yolo.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class c_{constructor(e,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(e)})}));te(this,"storeInBucket",(e,n,r)=>S(this,null,function*(){const i=yield fetch(e,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(e,n,r)=>S(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:e,page:r.toString()};return n&&(n.from&&(o=J(B({},o),{from:n.from})),n.to&&(o=J(B({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:e},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(e,n,r)=>S(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),body:JSON.stringify(e),method:o})}));te(this,"deleteScheduledTask",e=>S(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${e}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>S(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",e=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${e}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${e}`:`https://uploads.fansunitedassets.com/${this.clientId}/${e}`);te(this,"throwErrorFromXmlResponse",e=>{const n=new window.DOMParser().parseFromString(e,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>S(this,null,function*(){const e=fo(this.environment).currentUser;return e?yield e.getIdToken():""}));this.apiKey=e.apiKey,this.clientId=e.clientId,this.environment=e.environment,this.mainQueryParams={key:e.apiKey,client_id:e.clientId},this.sportal365Config=n,this.clientApiBaseUrl=l_(this.environment)}}const u_=t=>t==="dev"?"http://localhost:8060/v1":t==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":t==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":t==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",d_=t=>t==="dev"?"http://localhost:8040/v1":t==="staging"?"https://prediction.fansunitedstagingapi.com/v1":t==="watg"?"https://prediction.watg.fansunitedapi.com/v1":t==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",f_=t=>t==="dev"?"http://localhost:9040/v1":t==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":t==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":t==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",h_=t=>t==="dev"?"http://localhost:8020/v1":t==="staging"?"https://reporting.fansunitedstagingapi.com/v1":t==="watg"?"https://reporting.watg.fansunitedapi.com/v1":t==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",p_=t=>t==="dev"?"http://localhost:9030/v1":t==="staging"?"https://voting.fansunitedstagingapi.com/v1":t==="watg"?"https://voting.watg.fansunitedapi.com/v1":t==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",g_=t=>t==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":t==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":t==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",m_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://profile.fansunitedstagingapi.com/v1":t==="watg"?"https://profile.watg.fansunitedapi.com/v1":t==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",v_=t=>t==="dev"?"http://localhost:8010/v1":t==="staging"?"https://discussions.fansunitedstagingapi.com/v1":t==="watg"?"https://discussions.watg.fansunitedapi.com/v1":t==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class b_ extends c_{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>S(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>S(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>S(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>S(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>S(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r)=>S(this,null,function*(){const i=`/leaderboard/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>S(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(J(B({},this.mainQueryParams),{limit:r.toString()})),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>S(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>S(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>S(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClassicQuizFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>S(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>S(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>S(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>S(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>S(this,null,function*(){const a="/classic-quizzes/participations?",l=J(B({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getEntityParticipations",(n,r,i)=>S(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=J(B({},this.mainQueryParams),{from_date:r,to_date:i}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createPoll",n=>S(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>S(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>S(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",n=>S(this,null,function*(){const r=`/either-or/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createEitherOr",n=>S(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>S(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>S(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>S(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getListById",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>S(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,l={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(l.page=o.toString());const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(l),{headers:J(B({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createList",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>S(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>S(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>S(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>S(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>S(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>S(this,null,function*(){const r="/leads/export?",i=J(B({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:J(B({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>S(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>S(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(B(B({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>S(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>S(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>S(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>S(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=J(B({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>S(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>S(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),l={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"unbanUser",(n,r)=>S(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>S(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),l=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(l)})}));te(this,"deleteUserProfile",n=>S(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>S(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>S(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>S(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",l=yield this.getToken();let s={};if(r.length>0){const c=r.join(",");s=J(B({},this.mainQueryParams),{post_ids:c,reason:i})}else s=J(B({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(s),{headers:J(B({},this.headers),{Authorization:"Bearer "+l}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>S(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>S(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=J(B({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:J(B({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>S(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>S(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(B(B({},this.mainQueryParams),n)),{headers:J(B({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>S(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:J(B({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));this.loyaltyBaseUrl=u_(n.environment),this.predictionBaseUrl=d_(n.environment),this.miniGamesApiBaseUrl=f_(n.environment),this.reportingApiBaseUrl=h_(n.environment),this.votingApiBaseUrl=p_(n.environment),this.profileApiBaseUrl=m_(n.environment),this.customResolverUrl=g_(n.environment),this.discussionsApiBaseUrl=v_(n.environment)}}const y_=(t,e)=>!t&&!e?null:!t&&e?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:t,authorization:`Bearer ${e&&e==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},ja=x.createContext(null),C_=({config:t,children:e})=>{const n={apiKey:t.apiKey,clientId:t.clientId,environment:t.environment,lang:t.language,errorHandlingMode:t.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=y_(t.sportal365Project,t.sportal365Infrastructure),i=Fe.FansUnitedSDK(n),o=new b_(n,r);return u.jsx(ja.Provider,{value:{sdk:i,https:o},children:e})},Wp=x.createContext(null),x_=({children:t,environment:e})=>{const[n,r]=x.useState(null),[i,o]=x.useState(!0);return x.useEffect(()=>fo(e).onAuthStateChanged(l=>{Me.unstable_batchedUpdates(()=>{o(!1),r(l)})}),[e]),u.jsx(Wp.Provider,{value:n,children:!i&&t})};function O(){return O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},O.apply(null,arguments)}function _e(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}var Gp={exports:{}},w_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",I_=w_,S_=I_;function Kp(){}function Yp(){}Yp.resetWarningCache=Kp;var A_=function(){function t(r,i,o,a,l,s){if(s!==S_){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Yp,resetWarningCache:Kp};return n.PropTypes=n,n};Gp.exports=A_();var T_=Gp.exports;function __(t){return typeof t=="string"}function E_(t,e,n){return t===void 0||__(t)?e:O({},e,{ownerState:O({},e.ownerState,n)})}function qp(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}function zn(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function k_(t,e,n){return typeof t=="function"?t(e,n):t}function P_(t){const{rootElementName:e="",componentName:n}=t,[r,i]=z.useState(e.toUpperCase()),o=z.useCallback(a=>{var l;i((l=a==null?void 0:a.tagName)!=null?l:"")},[]);return[r,o]}function D_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function dn(...t){return z.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{D_(n,e)})},t)}function Jp(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Jp(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Vn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Jp(t))&&(r&&(r+=" "),r+=e);return r}function Qp(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function O_(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=Vn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=zn(O({},i,r)),l=Qp(r),s=Qp(i),c=e(a),d=Vn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=O({},c,n,s,l);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function ur(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Xp(t){if(z.isValidElement(t)||!ur(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=Xp(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?O({},t):t;return ur(t)&&ur(e)&&Object.keys(e).forEach(i=>{z.isValidElement(e[i])?r[i]=e[i]:ur(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&ur(t[i])?r[i]=Hn(t[i],e[i],n):n.clone?r[i]=ur(e[i])?Xp(e[i]):e[i]:r[i]=e[i]}),r}function za(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Zp={exports:{}},Ue={};/**
|
|
3331
3331
|
* @license React
|
|
3332
3332
|
* react-is.production.js
|
|
3333
3333
|
*
|
package/package.json
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { PollOptionModel } from 'fansunited-sdk-esm';
|
|
2
1
|
import { default as ImagesModel } from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
|
|
3
2
|
import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
|
|
4
3
|
import { IBranding } from '../IBranding';
|
|
5
4
|
|
|
5
|
+
export interface IPollOption {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
images: ImagesModel;
|
|
10
|
+
votes: number;
|
|
11
|
+
embed_code: string | null;
|
|
12
|
+
}
|
|
6
13
|
export default class PollRequestBody {
|
|
7
14
|
id: string;
|
|
8
15
|
title: string;
|
|
@@ -21,5 +28,5 @@ export default class PollRequestBody {
|
|
|
21
28
|
status: string;
|
|
22
29
|
flags: string[];
|
|
23
30
|
context: ContextModel | null;
|
|
24
|
-
options:
|
|
31
|
+
options: IPollOption[];
|
|
25
32
|
}
|
|
@@ -82,4 +82,5 @@ export default class HttpsService extends Https {
|
|
|
82
82
|
getPostsByStaffMember: (queryParams: Record<string, any>) => Promise<Response>;
|
|
83
83
|
getReportedPosts: (queryParams: Record<string, any>) => Promise<Response>;
|
|
84
84
|
updateDiscussionsFeature: (requestBody: any) => Promise<Response>;
|
|
85
|
+
updateProfilePreferences: (requestBody: any) => Promise<Response>;
|
|
85
86
|
}
|
package/src/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type CommonProps = {
|
|
2
2
|
label: string;
|
|
3
3
|
};
|
|
4
|
-
export type FeatureType = 'predictor' | 'top_x' | 'match_quiz' | 'loyalty' | 'discussions' | 'classic_quiz' | 'either_or' | 'poll';
|
|
4
|
+
export type FeatureType = 'predictor' | 'top_x' | 'match_quiz' | 'loyalty' | 'discussions' | 'classic_quiz' | 'either_or' | 'poll' | 'profile_preferences';
|