@sparkle-learning/core 0.0.52 → 0.0.53

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.
Files changed (42) hide show
  1. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +15 -2994
  2. package/dist/cjs/{ion-select_2.cjs.entry.js → ion-select_3.cjs.entry.js} +118 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/signalR.service-5672eebc.js +2987 -0
  5. package/dist/cjs/sparkle-animation-player.cjs.entry.js +1 -0
  6. package/dist/cjs/sparkle-core.cjs.js +1 -1
  7. package/dist/cjs/sparkle-discussion-questions_2.cjs.entry.js +272 -0
  8. package/dist/cjs/sparkle-discussion.cjs.entry.js +40 -0
  9. package/dist/collection/collection-manifest.json +3 -0
  10. package/dist/collection/components/sparkle-animation-player/sparkle-animation-player.js +1 -0
  11. package/dist/collection/components/sparkle-course-root/sparkle-course-root.js +1 -1
  12. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.css +157 -0
  13. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.js +230 -0
  14. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.css +158 -0
  15. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.js +268 -0
  16. package/dist/collection/components/sparkle-discussion/sparkle-discussion.css +0 -0
  17. package/dist/collection/components/sparkle-discussion/sparkle-discussion.js +110 -0
  18. package/dist/esm/header-mobile-collapse_61.entry.js +3 -2982
  19. package/dist/esm/{ion-select_2.entry.js → ion-select_3.entry.js} +118 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/signalR.service-9d5b9f36.js +2984 -0
  22. package/dist/esm/sparkle-animation-player.entry.js +1 -0
  23. package/dist/esm/sparkle-core.js +1 -1
  24. package/dist/esm/sparkle-discussion-questions_2.entry.js +267 -0
  25. package/dist/esm/sparkle-discussion.entry.js +36 -0
  26. package/dist/sparkle-core/{p-0335c863.entry.js → p-0a5d7c4f.entry.js} +26 -26
  27. package/dist/sparkle-core/p-18cdd458.entry.js +1 -0
  28. package/dist/sparkle-core/p-30767c1c.entry.js +1 -0
  29. package/dist/sparkle-core/p-3265ed87.entry.js +1 -0
  30. package/dist/sparkle-core/{p-564e64fc.entry.js → p-44334ef3.entry.js} +2 -2
  31. package/dist/sparkle-core/p-4c9f994f.js +1 -0
  32. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  33. package/dist/types/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.d.ts +28 -0
  34. package/dist/types/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.d.ts +45 -0
  35. package/dist/types/components/sparkle-discussion/sparkle-discussion.d.ts +11 -0
  36. package/dist/types/components.d.ts +66 -1
  37. package/package.json +1 -1
  38. package/dist/cjs/sparkle-feed-post.cjs.entry.js +0 -124
  39. package/dist/esm/sparkle-feed-post.entry.js +0 -120
  40. package/dist/sparkle-core/p-15403881.entry.js +0 -1
  41. package/dist/sparkle-core/p-41a9ece7.entry.js +0 -1
  42. package/dist/types/components/sparkle-quiz/sparkle-quiz.d.ts +0 -41
@@ -0,0 +1 @@
1
+ import{r as t,h as i,c as s,e}from"./p-ee1e0eb4.js";import{g as o}from"./p-5d409601.js";import{S as a}from"./p-935e7cfc.js";class n{constructor(){this.pItems={}}fromSrt(t,i){var s=!!i;(t=(t=t.replace(/\r/g,"")).split(/(\d+)\n(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/g)).shift();for(var e={},o=0;o<t.length;o+=4)e[s?this.timeS(t[o+1].trim()):t[o+1].trim()]=t[o+3].trim();return e}toSrt(t){if(!(t instanceof Array))return"";for(var i="",s=0;s<t.length;s++){var e=t[s];isNaN(e.startTime)||isNaN(e.endTime)||(e.startTime=this.msTime(parseInt(e.startTime,10)),e.endTime=this.msTime(parseInt(e.endTime,10))),i+=e.id+"\r\n",i+=e.startTime+" --\x3e "+e.endTime+"\r\n",i+=e.text.replace("\n","\r\n")+"\r\n\r\n"}return i}timeS(t){var i=/(\d+):(\d{2}):(\d{2}),(\d{3})/.exec(t);if(null===i)return 0;for(var s=1;s<5;s++)i[s]=parseInt(i[s],10).toString(),isNaN(parseInt(i[s],10))&&(i[s]="0");return 3600*parseInt(i[1],10)+60*parseInt(i[2],10)+parseInt(i[3],10)+Math.floor(parseInt(i[4],10)/1e3)}msTime(t){var i=[36e5,6e4,1e3],s=[];for(var e in i){var o=(t/i[e]>>0).toString();o.length<2&&(o="0"+o),t%=i[e],s.push(o)}var a=t.toString();if(a.length<3)for(let t=0;t<=3-a.length;t++)a="0"+a;return s.join(":")+","+a}}const r=class{constructor(i){t(this,i),this.showCaption=!1,this.paused=!0,this.dataLoaded=!1,this.currentProgressWidth=0,this.captionText="",this.showFirstFrame=!1,this.firstFramePath="",this.isBusy=!1,this.animationVideoProgress="0",this.captionData={}}closedCaptionChange(t){this.showCaption=!this.showCaption}onClassRoomModeChanged(t){this.classMode=t.detail}componentWillLoad(){this.classMode=o(a.LOCALSTORAGE_CLASSROOM_MODE);const t=document.createElement("script");this.firstFramePath=this.src.replace(".js",".png"),t.src=this.src,document.body.appendChild(t),this.readTextFile(this.src.replace(".js",".srt")),this.rergisterSoundControls()}readTextFile(t){let i=this;var s=new XMLHttpRequest;s.open("GET",t,!1),s.onreadystatechange=function(){if(4===s.readyState&&(200===s.status||0==s.status)){var t=s.responseText,e=new n;i.captionData=e.fromSrt(t,!0)}},s.send(null)}isScriptLoaded(t){for(var i=document.getElementsByTagName("script"),s=i.length;s--;)if(i[s].getAttribute("src")==t)return!0;return!1}rergisterSoundControls(){window.playSound=t=>(this.sound&&this.sound.stop(),this.sound=createjs.Sound.play(t,{interrupt:createjs.Sound.INTERRUPT_EARLY,loop:0,volume:1}),this.sound),window.resetToStart=()=>{console.log("reset"),this.rewindAnimationToStart()}}startLoading(){this.isBusy=!0,this.paused=!1}doneLoading(){this.isBusy=!1,this.dataLoaded=!0,this.paused=!1}handleFileLoad(t){var i=this.comp.getImages();t&&"image"==t.item.type&&(i[t.item.id]=t.result)}handleQueueProgress(t){return t=>{this.animationVideoProgress=t.loaded?(100*t.loaded).toFixed(0):"0",1==t.loaded&&this.doneLoading()}}handleComplete(t){for(var i=this.comp.getSpriteSheet(),s=t.target,e=this.library.ssMetadata,o=0;o<e.length;o++)i[e[o].name]=new createjs.SpriteSheet({images:[s.getResult(e[o].name)],frames:e[o].frames});var a=this.src.substring(this.src.lastIndexOf("/")+1,this.src.lastIndexOf("."));this.exportRoot=new this.library[a],this.stage=new this.library.Stage(this.canvas),this.makeResponsive(!0,"both",!1,1),AdobeAn.compositionLoaded(this.library.properties.id),this.stage.addChild(this.exportRoot),createjs.Ticker.framerate=this.library.properties.fps,createjs.Ticker.paused=!1,createjs.Ticker.addEventListener("tick",this.stage),createjs.Ticker.addEventListener("tick",(t=>{this.tickHandler(t)}))}loadAnimation(){this.startLoading(),createjs.Sound.initializeDefaultPlugins()&&(this.canvas=this.el.querySelector(".video-canvas"),this.anim_container=this.el.querySelector(".canvas-container"),this.comp=AdobeAn.getComposition(this.composition),this.canvas.style.width="100%",this.canvas.style.height=this.canvas.offsetWidth+"px",this.anim_container.style.height=this.canvas.offsetWidth+"px",this.library=this.comp.getLibrary(),this.loader=new createjs.LoadQueue(!1),this.loader.setMaxConnections(3),this.loader.maintainScriptOrder=!0,this.loader.installPlugin(createjs.Sound),this.loader.addEventListener("complete",(t=>{this.handleComplete(t)})),this.loader.addEventListener("fileload",(t=>{this.handleFileLoad(t)})),this.loader.addEventListener("progress",this.handleQueueProgress(this)),this.loader.loadManifest(this.library.properties.manifest,!0,this.src.substring(0,this.src.lastIndexOf("/")+1)))}playButtonAction(){this.dataLoaded?this.playPauseAnimation():this.loadAnimation()}playPauseAnimation(){createjs.Ticker.paused?this.playAnimation():this.pauseAnimation()}async playAnimation(){if(this.showFirstFrame=!1,null!=this.loader&&this.loader.close(),createjs&&createjs.Ticker){let t=!1,i=this.sound;i&&(i.paused=t),createjs.Ticker.paused=t,createjs.Ticker.addEventListener("tick",this.stage),this.paused=t}}async pauseAnimation(){if(null!=this.loader&&this.loader.close(),createjs&&createjs.Ticker){let t=!0,i=this.sound;i&&(i.paused=t),createjs.Ticker.paused=t,createjs.Ticker.removeEventListener("tick",this.stage),this.paused=t}}disconnectedCallback(){this.pauseAnimation(),createjs.Sound.removeAllSounds()}async classRoomModeChanged(t){this.classMode=t}async destroyAnimation(){this.pauseAnimation()}makeResponsive(t,i,s,e){window.addEventListener("resize",(()=>this.resizeCanvas(t,i,s,e))),this.resizeCanvas(t,i,s,e)}resizeCanvas(t,i,s,e){var o,a,n=1,r=this.library.properties.width,h=this.library.properties.height,l=window.innerWidth,c=window.innerHeight,d=window.devicePixelRatio||1,p=l/r,u=c/h,m=1;t&&("width"==i&&o==l||"height"==i&&a==c?m=n:s?1==e?m=Math.min(p,u):2==e&&(m=Math.max(p,u)):(l<r||c<h)&&(m=Math.min(p,u)));var g=this.el.querySelector(".canvas-container");this.canvas.width=r*d*m,this.canvas.height=h*d*m,this.canvas.style.width="100%",this.canvas.style.height=this.canvas.offsetWidth+"px",g.style.height=this.canvas.offsetWidth+"px",this.stage.scaleX=d*m,this.stage.scaleY=d*m,o=l,a=c,n=m,this.sizeOfCanvas=this.canvas.offsetWidth;var v=this.el.querySelector(".progressBar");this.sizeofProgressBar=v.offsetWidth,this.stage.tickOnUpdate=!1,this.stage.update(),this.stage.tickOnUpdate=!0}tickHandler(t){t.paused||(this.timeline=this.stage.children[0].timeline,this.captionData[Math.floor(this.timeline.position/this.library.properties.fps)]&&(this.captionText=this.captionData[Math.floor(this.timeline.position/this.library.properties.fps)]),this.timeline.position%10==0&&(console.log(this.timeline.duration-10,this.timeline.position),this.timeline.position>this.timeline.duration-10&&this.animationCompleted(),this.currentProgressWidth=parseFloat((this.timeline.position/this.timeline.duration*this.sizeofProgressBar).toFixed(0))))}animationCompleted(){console.log("completed"),this.showFirstFrame=!0,this.rewindAnimationTo(0),this.pauseAnimation()}rewindAnimationTo(t){let i=this.sound;i&&(i.paused=!0);let s=this.stage.children[0],e=s.timeline;t<0&&(t=0),t>e.duration&&(t=e.duration-10),this.paused?(s.gotoAndStop(t),this.stage.update(),i&&!i.getPaused()&&(createjs.Ticker.paused=!0)):(s.gotoAndPlay(t),createjs.Ticker.paused=!1)}rewindAnimationToStart(){this.paused=!0,this.rewindAnimationTo(0)}rewindAnimation(t){t.stopPropagation();let i=Math.round(t.offsetX/this.sizeofProgressBar*this.stage.children[0].timeline.duration);this.rewindAnimationTo(i)}rewind5Sec(){this.rewindAnimationTo(this.stage.children[0].timeline.position-5*this.library.properties.fps)}fastForward5Sec(){this.rewindAnimationTo(this.stage.children[0].timeline.position+5*this.library.properties.fps)}muteVolume(){let t=this.sound;t&&(t.volume=0)}downVolume(){let t=this.sound;t&&t._getVolume()>.9&&(t.volume=t._getVolume()-.1)}upVolume(){let t=this.sound;t&&t._getVolume()<1&&(t.volume=t._getVolume()+.1)}render(){return i("div",{class:"cavase-main-container"},i("div",{class:"canvas-container",id:"canvas-container"},this.classMode?"":i("div",null,i("canvas",{class:"video-canvas",onClick:()=>this.playButtonAction()}),this.showCaption?i("div",{class:"caption"},this.captionText):""),!this.dataLoaded||this.showFirstFrame?i("img",{class:"frame-img",src:this.firstFramePath}):"",this.classMode?i("img",{class:"overlay-img",src:s("./assets/play-button-disabled-overlay.png")}):"",!this.classMode&&this.paused?i("img",{class:"overlay-img",onClick:()=>this.playButtonAction(),src:s("./assets/play-button-overlay.png")}):"",this.isBusy?i("div",{class:"loading-container"},i("div",{class:"uil-ring-css"},i("div",null),i("a",null,"Loading ",this.animationVideoProgress,"%"))):""),this.dataLoaded?i("div",{class:"navControls"},i("div",{class:"progressBar",onClick:t=>this.rewindAnimation(t)},i("div",{class:"currentProgress",style:{width:this.currentProgressWidth+"px"}})),i("div",{class:"button-panel"},i("ion-button",{size:"small",color:"transperant",onClick:()=>this.rewind5Sec()}," ",i("ion-icon",{name:"play-back-outline"})," "),i("ion-button",{size:"small",color:"transperant",onClick:()=>this.playButtonAction()}," ",i("ion-icon",this.paused?{name:"pause-outline"}:{name:"play-outline"})),i("ion-button",{size:"small",color:"transperant",onClick:()=>this.fastForward5Sec()}," ",i("ion-icon",{name:"play-forward-outline"})))):"",this.dataLoaded&&this.captionText?i("div",{class:"closed-caption"},i("ion-item",{lines:"none"},i("ion-label",null,"Closed Caption"),i("ion-toggle",{slot:"end",color:"primary",checked:this.showCaption}))):"")}static get assetsDirs(){return["assets"]}get el(){return e(this)}};r.style='.video-canvas{position:absolute;display:block;background-color:#f5f5f5;width:auto}.closed-caption{justify-content:flex-end;width:100%;display:flex}sparkle-animation-player{width:100%;margin:0 auto}.caption{position:absolute;bottom:0px;color:white;text-align:center;width:100%;text-shadow:1px 1px 2px #e50539}.canvas-container{width:680px;height:680px;background-color:#f5f5f5;border-radius:10px;position:relative}.frame-img{position:absolute;display:block;max-width:100%;width:100%;height:auto}.overlay-img{position:absolute;z-index:9999;top:0px;display:block;max-width:100%;width:100%;height:auto}.button-panel{display:flex;justify-content:center}ion-icon{color:var(--ion-color-primary)}.navControls{width:680px;background:transparent;border-radius:10px;position:relative;padding-top:15px;display:flex;flex-direction:column;align-items:center}.navControls .progressBar{flex:100%;border-radius:20px;position:relative;left:0;right:0;height:4px;background-color:rgba(205, 205, 205, 0.7);width:100%}.navControls .progressBar .currentProgress{border-radius:20px;position:absolute;height:25px;background-color:var(--ion-color-primary);transition:width 0.5s;width:100%}.navControls .progressBar .currentProgress:before{position:absolute;top:50%;right:4px;content:" ";display:block;width:12px;height:12px;margin-top:-10px;background:#e5053a;border-radius:10px;border:4px solid #d9d4d4;z-index:10}#dom_overlay_container{pointer-events:none;overflow:hidden;position:absolute;left:0px;top:0px;display:block}.cavase-main-container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;padding:15px;background-position:center;background-size:cover;background-repeat:no-repeat}.loading-container{height:100%;display:flex;justify-content:center;align-items:center}.uil-ring-css{position:absolute}ion-button{--ion-color-base:transparent;--ion-color-contrast:var(--ion-color-primary);--box-shadow:none !important}@media screen and (min-width: 760px){.navControls{flex-direction:row}.navControls .progressBar{height:24px;flex:75%;width:75%}.button-panel{flex:25%;width:25%}}';export{r as sparkle_animation_player}
@@ -0,0 +1 @@
1
+ import{r as s,h as t,e as i}from"./p-ee1e0eb4.js";import{E as e}from"./p-b226f54d.js";import{A as o}from"./p-9a443f51.js";import"./p-2f569553.js";const r=class{constructor(t){s(this,t),this.allowPostToFeed=!1,this.feedStartingText="My suggestions are:",this.isTeacherMode=!0,this.quizData=[]}async componentDidLoad(){const s=e.getInstance().get("sparkle");let t=await o.getInstance().loadJsonFile(s.quizPath);if(t&&this.questionIds){let s=this.questionIds.split(",");this.quizData=[],s.forEach((s=>{this.quizData=[...this.quizData,t[+s]]}))}}render(){return t(this.isTeacherMode?"sparkle-discussion-results":"sparkle-discussion-questions",{allowPostToFeed:this.allowPostToFeed,feedStartingText:this.feedStartingText,isTeacherMode:this.isTeacherMode,questions:this.quizData})}get el(){return i(this)}};r.style="";export{r as sparkle_discussion}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,e as i}from"./p-ee1e0eb4.js";import{S as s}from"./p-4c9f994f.js";import"./p-b226f54d.js";import"./p-2f569553.js";const o=class{constructor(t){e(this,t),this.allowPostToFeed=!1,this.feedStartingText="My suggestions are:",this.isTeacherMode=!1,this.questions=[],this.error="",this.modelChange="",this.responses=[],this.tempResponses=[],this.suggestionList=[],this.postToFeedTextValue=""}componentDidLoad(){}resetPollData(){s.getInstance().callSignalR("ResetPollData",{})}selectOption(e,t,i){e.target.parentElement.childNodes.forEach((e=>e.classList.remove("selected"))),e.target.classList.add("selected"),s.getInstance().callSignalR("PollSubmission",{questionId:t.questionId,question:t.question,answer:i.option,responseType:t.responseType})}addSuggestion(e,t){var i=e.target.parentElement.parentElement.querySelector("input[type=text]");if(""!=i.value&&i.value){if(s.getInstance().callSignalR("PollSubmission",{questionId:t.questionId,question:t.questionText,answer:i.value,responseType:t.questionType}),this.allowPostToFeed){this.suggestionList.push({questionId:t.questionId,question:t.questionText,answer:i.value,responseType:t.questionType});let e=this.suggestionList.map((e=>e.answer)).join(", ").toString();this.postToFeedTextValue=this.feedStartingText+" "+e}}else this.error="Please enter the value"}toggleMode(){this.isTeacherMode=!this.isTeacherMode}renderOptions(e){return"MULTIPLE-CHOICE"==e.questionType?t("ul",null,e.options.map((i=>t("li",{onClick:t=>this.selectOption(t,e,i)},i.option)))):"FEEDBACK"==e.questionType?t("ion-item",null,t("ion-label",null,"Choose Option ",t("ion-icon",{name:"arrow-back",mode:"ios"})),t("ion-select",{id:"customAlertSelect",interface:"alert"},t("ion-select-option",{value:"bacon"},"Bacon"),t("ion-select-option",{value:"olives"},"Black Olives"),t("ion-select-option",{value:"xcheese"},"Extra Cheese"),t("ion-select-option",{value:"peppers"},"Green Peppers"),t("ion-select-option",{value:"mushrooms"},"Mushrooms"),t("ion-select-option",{value:"onions"},"Onions"),t("ion-select-option",{value:"pepperoni"},"Pepperoni"),t("ion-select-option",{value:"pineapple"},"Pineapple"),t("ion-select-option",{value:"sausage"},"Sausage"),t("ion-select-option",{value:"Spinach"},"Spinach"))):t("div",null,t("input",{slot:"start",type:"text",placeholder:"Type suggestion"}),t("div",null,this.error),t("ion-item",null,t("ion-button",{class:"suggetion-btn",size:"default",slot:"end",color:"primary",onClick:t=>this.addSuggestion(t,e)},"ADD SUGGESTION")))}renderQuestions(){return[this.questions.map((e=>t("div",{class:"question"},t("h3",null,e.questionText," ",t("span",{class:"toggle-mode",onClick:()=>this.toggleMode()},".")),this.renderOptions(e)))),this.allowPostToFeed?t("sparkle-feed-post",{assignmentName:this.postToFeedAssignmentName,textValue:this.postToFeedTextValue}):""]}render(){return this.renderQuestions()}get el(){return i(this)}};o.style="div.question{margin-bottom:5px}div.question ul{padding-left:5px}div.question li{list-style-type:none;cursor:pointer;background:#e5053a;border-radius:4px;vertical-align:middle;line-height:40px;padding-left:20px;color:#fff;margin-bottom:5px}.question h3{color:#333;padding-top:14px;margin-bottom:4px;font-size:16px}div.question li.selected{font-weight:bold;background:#9e0428}input[type='text']{width:100%;padding:12px 20px;margin:8px 0;box-sizing:border-box;border:2px solid #ccc;-webkit-transition:0.5s;transition:0.5s;outline:none}input[type='text']:focus{border:2px solid var(--ion-color-primary)}ion-item .item-native{padding-left:0px !important}ion-button.suggetion-btn{margin-left:0px !important}.graph-container{display:flex;flex-direction:row;flex-wrap:wrap;flex-direction:column}.graph-container .question-title{width:100%}.graph-container div.question{display:flex;flex-direction:column;justify-content:flex-end;flex-basis:100px}.graph-container div.question p{text-align:center}.answer-column{background-color:antiquewhite;flex:0 0 auto;text-align:center;color:#c0873c;flex-basis:100px}.toggle-mode{color:#888}.cloud{display:inline;list-style-type:none;width:400px}.cloud>div{list-style:none;display:inline;padding:20px}.cloud>div:nth-of-type(3n+1){font-size:1.25em}.cloud>div:nth-of-type(4n+3){font-size:1.5em}.cloud>div:nth-of-type(5n - 3){font-size:1em}.bar-graph-column{display:flex;align-items:flex-end}.bar-graph-questions{display:flex;align-items:flex-start}";const n=class{constructor(t){e(this,t),this.allowPostToFeed=!1,this.feedStartingText="My suggestions are:",this.isTeacherMode=!1,this.questions=[],this.error="",this.modelChange="",this.responses=[],this.tempResponses=[],this.suggestionList=[]}questionsChaged(e,t){this.setupData(e)}gotServerUpdate(e){if(this.isTeacherMode){var t=e.detail;"list"==t.type?t.data.forEach((e=>{3==e.responseType?this.addToWordCloud(e):1==e.responseType&&this.addToBarChart(e)})):"removed"==t.type?this.responses=[...this.tempResponses]:3==(t=t.data).responseType?this.addToWordCloud(t):1==t.responseType&&this.addToBarChart(t)}}addToWordCloud(e){var t=this.responses.find((t=>t.question==e.question));this.responses=t?this.responses.map((t=>t.question==e.question?e:t)):[...this.responses,e],console.log(this.responses)}addToBarChart(e){var t=this.responses.find((t=>t.question==e.question));t?(t.responses=t.responses.map((t=>e.responses.find((e=>e.response==t.response))||t)),t.total=e.total,this.responses=this.responses.map((e=>e.question==t.question?t:e))):this.responses=[...this.responses,e]}componentDidLoad(){this.questions&&this.setupData(this.questions)}setupData(e){this.setupResponseGraph(e),this.isTeacherMode&&s.getInstance().callSignalR("GetPollSubmission",{})}resetPollData(){s.getInstance().callSignalR("ResetPollData",{})}setupResponseGraph(e){this.responses=[],e.forEach((e=>{if("TEXT"==e.questionType)this.responses=[...this.responses,{question:e.questionText,responseType:e.questionType,responses:[],total:0}],this.tempResponses=this.responses.slice();else if("MULTIPLE-CHOICE"==e.questionType){var t=[];Object.keys(e.options).map((i=>{t.push({count:0,response:e.options[i].option})})),this.responses=[...this.responses,{question:e.questionText,responseType:e.questionType,responses:t,total:0}],this.tempResponses=this.responses.slice()}})),console.log(this.responses)}columnHeight(e,t){let i=0;return 0!=t&&(i=100/t),{height:i*e+"px"}}getRandomColorAndFontSize(e){let t=1;return e>0&&(t+=.25*(e-1)),{color:`hsl(${Math.floor(360*Math.random())},${Math.floor(100*Math.random())+"%"},${Math.floor(60*Math.random())+"%"})`,"font-size":`${t}em`}}renderResults(){console.log("Responsed",this.responses);var e=this.responses.filter((e=>"MULTIPLE-CHOICE"==e.responseType)),i=this.responses.filter((e=>"TEXT"==e.responseType));return[e.map((e=>t("div",null," ",t("h3",{class:"line"},e.question),t("div",{class:"graph-container"},t("div",{class:"bar-graph-column"},e.responses.map((i=>t("div",{class:"answer-column",style:this.columnHeight(i.count,e.total)},i.count)))),t("div",{class:"bar-graph-questions"},e.responses.map((e=>t("div",{class:"question"},t("p",null,e.response))))))))),i.map((e=>[t("p",null,t("h3",{class:"line"},e.question)),t("div",{class:"cloud"},e.responses.map((e=>t("div",{style:this.getRandomColorAndFontSize(e.count)},e.response))))]))]}render(){return this.renderResults()}get el(){return i(this)}static get watchers(){return{questions:["questionsChaged"]}}};n.style="div.question{margin-bottom:5px}div.question ul{padding-left:5px}div.question li{list-style-type:none;cursor:pointer;background:#e5053a;border-radius:4px;vertical-align:middle;line-height:40px;padding-left:20px;color:#fff;margin-bottom:5px}.question h3{color:#333;padding-top:14px;margin-bottom:4px;font-size:16px}div.question li.selected{font-weight:bold;background:#9e0428}input[type='text']{width:100%;padding:12px 20px;margin:8px 0;box-sizing:border-box;border:2px solid #ccc;-webkit-transition:0.5s;transition:0.5s;outline:none}input[type='text']:focus{border:2px solid var(--ion-color-primary)}ion-item .item-native{padding-left:0px !important}ion-button.suggetion-btn{margin-left:0px !important}.graph-container{display:flex;flex-direction:row;flex-wrap:wrap;flex-direction:column}.graph-container .question-title{width:100%}.graph-container div.question{display:flex;flex-direction:column;justify-content:flex-end;flex-basis:100px}.graph-container div.question p{text-align:center}.answer-column{background-color:rgba(var(--ion-color-sparkle-rgb), var(--bg-alpha, 0.06));flex:0 0 auto;text-align:center;color:#c0873c;flex-basis:100px;margin-bottom:14px}.toggle-mode{color:#888}.cloud{display:inline;list-style-type:none;width:400px}.cloud>div{list-style:none;display:inline;padding:20px}.cloud>div:nth-of-type(3n+1){font-size:1.25em}.cloud>div:nth-of-type(4n+3){font-size:1.5em}.cloud>div:nth-of-type(5n - 3){font-size:1em}.bar-graph-column{display:flex;align-items:flex-end}.bar-graph-questions{display:flex;align-items:flex-start}";export{o as sparkle_discussion_questions,n as sparkle_discussion_results}
@@ -1,4 +1,4 @@
1
- import{r as t,i as e,h as i,H as s,e as o}from"./p-ee1e0eb4.js";import{g as n}from"./p-871106e0.js";import{f as a,k as r,b as l,d}from"./p-d68092b7.js";import{f as h,h as c,a as p}from"./p-2ff67662.js";import{h as u}from"./p-0e4de1d0.js";import"./p-add30d46.js";
1
+ import{r as t,i as e,h as i,H as s,e as n}from"./p-ee1e0eb4.js";import{g as o}from"./p-871106e0.js";import{f as a,k as r,b as l,d}from"./p-d68092b7.js";import{f as c,h,a as p}from"./p-2ff67662.js";import{h as u}from"./p-0e4de1d0.js";import{E as g}from"./p-b226f54d.js";import"./p-2f569553.js";import"./p-add30d46.js";
2
2
  /*!
3
3
  * (C) Ionic http://ionicframework.com - MIT License
4
- */const g=(t,e)=>{if(1===t.nodeType)return(t.tagName===e.toUpperCase()?[t]:Array.from(t.querySelectorAll(e))).find((e=>e.value===t.value))},b=class{constructor(i){t(this,i),this.ionChange=e(this,"ionChange",7),this.ionCancel=e(this,"ionCancel",7),this.ionDismiss=e(this,"ionDismiss",7),this.ionFocus=e(this,"ionFocus",7),this.ionBlur=e(this,"ionBlur",7),this.ionStyle=e(this,"ionStyle",7),this.inputId="ion-sel-"+k++,this.didInit=!1,this.isExpanded=!1,this.disabled=!1,this.cancelText="Cancel",this.okText="OK",this.name=this.inputId,this.multiple=!1,this.interface="alert",this.interfaceOptions={},this.onClick=t=>{this.setFocus(),this.open(t)},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()}}styleChanged(){this.emitStyle()}valueChanged(){this.emitStyle(),this.didInit&&this.ionChange.emit({value:this.value})}async connectedCallback(){this.updateOverlayOptions(),this.emitStyle(),this.mutationO=((t,e,i)=>{if("undefined"==typeof MutationObserver)return;const s=new MutationObserver((t=>{i(((t,e)=>{let i;t.forEach((t=>{for(let s=0;s<t.addedNodes.length;s++)i=g(t.addedNodes[s],e)||i}))})(t,"ion-select-option"))}));return s.observe(t,{childList:!0,subtree:!0}),s})(this.el,0,(async()=>{this.updateOverlayOptions()}))}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}componentDidLoad(){this.didInit=!0}async open(t){if(this.disabled||this.isExpanded)return;this.isExpanded=!0;const e=this.overlay=await this.createOverlay(t);if(e.onDidDismiss().then((()=>{this.overlay=void 0,this.isExpanded=!1,this.ionDismiss.emit(),this.setFocus()})),await e.present(),"popover"===this.interface){let t=this.childOpts.map((t=>t.value)).indexOf(this.value);t=t>-1?t:0;const i=e.querySelector(`.select-interface-option:nth-child(${t+1})`);i&&a(i)}return e}createOverlay(t){let e=this.interface;return"action-sheet"===e&&this.multiple&&(console.warn(`Select interface cannot be "${e}" with a multi-value select. Using the "alert" interface instead.`),e="alert"),"popover"!==e||t||(console.warn(`Select interface cannot be a "${e}" without passing an event. Using the "alert" interface instead.`),e="alert"),"action-sheet"===e?this.openActionSheet():"popover"===e?this.openPopover(t):this.openAlert()}updateOverlayOptions(){const t=this.overlay;if(!t)return;const e=this.childOpts,i=this.value;switch(this.interface){case"action-sheet":t.buttons=this.createActionSheetButtons(e,i);break;case"popover":const s=t.querySelector("ion-select-popover");s&&(s.options=this.createPopoverOptions(e,i));break;case"alert":t.inputs=this.createAlertInputs(e,this.multiple?"checkbox":"radio",i)}}createActionSheetButtons(t,e){const i=t.map((t=>{const i=f(t),s=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" "),o=`${C} ${s}`;return{role:m(e,i,this.compareWith)?"selected":"",text:t.textContent,cssClass:o,handler:()=>{this.value=i}}}));return i.push({text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}}),i}createAlertInputs(t,e,i){return t.map((t=>{const s=f(t),o=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" ");return{type:e,cssClass:`${C} ${o}`,label:t.textContent||"",value:s,checked:m(i,s,this.compareWith),disabled:t.disabled}}))}createPopoverOptions(t,e){return t.map((t=>{const i=f(t),s=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" ");return{text:t.textContent||"",cssClass:`${C} ${s}`,value:i,checked:m(e,i,this.compareWith),disabled:t.disabled,handler:t=>{this.value=t,this.multiple||this.close()}}}))}async openPopover(t){const e=this.interfaceOptions,i=n(this),s="md"!==i,o=this.multiple,a=this.value;let r=t,l="auto";const d=this.el.closest("ion-item");d&&(d.classList.contains("item-label-floating")||d.classList.contains("item-label-stacked"))&&(r=Object.assign(Object.assign({},t),{detail:{ionShadowTarget:d}}),l="cover");const c=Object.assign(Object.assign({mode:i,event:r,alignment:"center",size:l,showBackdrop:s},e),{component:"ion-select-popover",cssClass:["select-popover",e.cssClass],componentProps:{header:e.header,subHeader:e.subHeader,message:e.message,multiple:o,value:a,options:this.createPopoverOptions(this.childOpts,a)}});return h.create(c)}async openActionSheet(){const t=n(this),e=this.interfaceOptions,i=Object.assign(Object.assign({mode:t},e),{buttons:this.createActionSheetButtons(this.childOpts,this.value),cssClass:["select-action-sheet",e.cssClass]});return c.create(i)}async openAlert(){const t=this.getLabel(),e=t?t.textContent:null,i=this.interfaceOptions,s=this.multiple?"checkbox":"radio",o=n(this),a=Object.assign(Object.assign({mode:o},i),{header:i.header?i.header:e,inputs:this.createAlertInputs(this.childOpts,s,this.value),buttons:[{text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}},{text:this.okText,handler:t=>{this.value=t}}],cssClass:["select-alert",i.cssClass,this.multiple?"multiple-select-alert":"single-select-alert"]});return p.create(a)}close(){return this.overlay?this.overlay.dismiss():Promise.resolve(!1)}getLabel(){return r(this.el)}hasValue(){return""!==this.getText()}get childOpts(){return Array.from(this.el.querySelectorAll("ion-select-option"))}getText(){const t=this.selectedText;return null!=t&&""!==t?t:y(this.childOpts,this.value,this.compareWith)}setFocus(){this.focusEl&&this.focusEl.focus()}emitStyle(){this.ionStyle.emit({interactive:!0,"interactive-disabled":this.disabled,select:!0,"select-disabled":this.disabled,"has-placeholder":void 0!==this.placeholder,"has-value":this.hasValue(),"has-focus":this.isExpanded})}render(){const{disabled:t,el:e,inputId:o,isExpanded:a,name:r,placeholder:h,value:c}=this,p=n(this),{labelText:g,labelId:b}=l(e,o);d(!0,e,r,v(c),t);let m=!1,f=this.getText();""===f&&void 0!==h&&(f=h,m=!0);const x={"select-text":!0,"select-placeholder":m},y=m?"placeholder":"text",w=void 0!==g?""!==f?`${f}, ${g}`:g:f;return i(s,{onClick:this.onClick,role:"button","aria-haspopup":"listbox","aria-disabled":t?"true":null,"aria-label":w,class:{[p]:!0,"in-item":u("ion-item",e),"select-disabled":t,"select-expanded":a}},i("div",{"aria-hidden":"true",class:x,part:y},f),i("div",{class:"select-icon",role:"presentation",part:"icon"},i("div",{class:"select-icon-inner"})),i("label",{id:b},w),i("button",{type:"button",disabled:t,id:o,"aria-labelledby":b,"aria-haspopup":"listbox","aria-expanded":`${a}`,onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.focusEl=t}))}get el(){return o(this)}static get watchers(){return{disabled:["styleChanged"],placeholder:["styleChanged"],isExpanded:["styleChanged"],value:["valueChanged"]}}},m=(t,e,i)=>void 0!==t&&(Array.isArray(t)?t.some((t=>x(t,e,i))):x(t,e,i)),f=t=>{const e=t.value;return void 0===e?t.textContent||"":e},v=t=>{if(null!=t)return Array.isArray(t)?t.join(","):t.toString()},x=(t,e,i)=>"function"==typeof i?i(t,e):"string"==typeof i?t[i]===e[i]:Array.isArray(e)?e.includes(t):t===e,y=(t,e,i)=>void 0===e?"":Array.isArray(e)?e.map((e=>w(t,e,i))).filter((t=>null!==t)).join(", "):w(t,e,i)||"",w=(t,e,i)=>{const s=t.find((t=>x(f(t),e,i)));return s?s.textContent:null};let k=0;const C="select-interface-option";b.style={ios:":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}",md:":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}"};const O=class{constructor(e){t(this,e),this.inputId="ion-selopt-"+j++,this.disabled=!1}render(){return i(s,{role:"option",id:this.inputId,class:n(this)})}get el(){return o(this)}};let j=0;O.style=":host{display:none}";export{b as ion_select,O as ion_select_option}
4
+ */const m=(t,e)=>{if(1===t.nodeType)return(t.tagName===e.toUpperCase()?[t]:Array.from(t.querySelectorAll(e))).find((e=>e.value===t.value))},b=class{constructor(i){t(this,i),this.ionChange=e(this,"ionChange",7),this.ionCancel=e(this,"ionCancel",7),this.ionDismiss=e(this,"ionDismiss",7),this.ionFocus=e(this,"ionFocus",7),this.ionBlur=e(this,"ionBlur",7),this.ionStyle=e(this,"ionStyle",7),this.inputId="ion-sel-"+C++,this.didInit=!1,this.isExpanded=!1,this.disabled=!1,this.cancelText="Cancel",this.okText="OK",this.name=this.inputId,this.multiple=!1,this.interface="alert",this.interfaceOptions={},this.onClick=t=>{this.setFocus(),this.open(t)},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()}}styleChanged(){this.emitStyle()}valueChanged(){this.emitStyle(),this.didInit&&this.ionChange.emit({value:this.value})}async connectedCallback(){this.updateOverlayOptions(),this.emitStyle(),this.mutationO=((t,e,i)=>{if("undefined"==typeof MutationObserver)return;const s=new MutationObserver((t=>{i(((t,e)=>{let i;t.forEach((t=>{for(let s=0;s<t.addedNodes.length;s++)i=m(t.addedNodes[s],e)||i}))})(t,"ion-select-option"))}));return s.observe(t,{childList:!0,subtree:!0}),s})(this.el,0,(async()=>{this.updateOverlayOptions()}))}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}componentDidLoad(){this.didInit=!0}async open(t){if(this.disabled||this.isExpanded)return;this.isExpanded=!0;const e=this.overlay=await this.createOverlay(t);if(e.onDidDismiss().then((()=>{this.overlay=void 0,this.isExpanded=!1,this.ionDismiss.emit(),this.setFocus()})),await e.present(),"popover"===this.interface){let t=this.childOpts.map((t=>t.value)).indexOf(this.value);t=t>-1?t:0;const i=e.querySelector(`.select-interface-option:nth-child(${t+1})`);i&&a(i)}return e}createOverlay(t){let e=this.interface;return"action-sheet"===e&&this.multiple&&(console.warn(`Select interface cannot be "${e}" with a multi-value select. Using the "alert" interface instead.`),e="alert"),"popover"!==e||t||(console.warn(`Select interface cannot be a "${e}" without passing an event. Using the "alert" interface instead.`),e="alert"),"action-sheet"===e?this.openActionSheet():"popover"===e?this.openPopover(t):this.openAlert()}updateOverlayOptions(){const t=this.overlay;if(!t)return;const e=this.childOpts,i=this.value;switch(this.interface){case"action-sheet":t.buttons=this.createActionSheetButtons(e,i);break;case"popover":const s=t.querySelector("ion-select-popover");s&&(s.options=this.createPopoverOptions(e,i));break;case"alert":t.inputs=this.createAlertInputs(e,this.multiple?"checkbox":"radio",i)}}createActionSheetButtons(t,e){const i=t.map((t=>{const i=v(t),s=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" "),n=`${j} ${s}`;return{role:f(e,i,this.compareWith)?"selected":"",text:t.textContent,cssClass:n,handler:()=>{this.value=i}}}));return i.push({text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}}),i}createAlertInputs(t,e,i){return t.map((t=>{const s=v(t),n=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" ");return{type:e,cssClass:`${j} ${n}`,label:t.textContent||"",value:s,checked:f(i,s,this.compareWith),disabled:t.disabled}}))}createPopoverOptions(t,e){return t.map((t=>{const i=v(t),s=Array.from(t.classList).filter((t=>"hydrated"!==t)).join(" ");return{text:t.textContent||"",cssClass:`${j} ${s}`,value:i,checked:f(e,i,this.compareWith),disabled:t.disabled,handler:t=>{this.value=t,this.multiple||this.close()}}}))}async openPopover(t){const e=this.interfaceOptions,i=o(this),s="md"!==i,n=this.multiple,a=this.value;let r=t,l="auto";const d=this.el.closest("ion-item");d&&(d.classList.contains("item-label-floating")||d.classList.contains("item-label-stacked"))&&(r=Object.assign(Object.assign({},t),{detail:{ionShadowTarget:d}}),l="cover");const h=Object.assign(Object.assign({mode:i,event:r,alignment:"center",size:l,showBackdrop:s},e),{component:"ion-select-popover",cssClass:["select-popover",e.cssClass],componentProps:{header:e.header,subHeader:e.subHeader,message:e.message,multiple:n,value:a,options:this.createPopoverOptions(this.childOpts,a)}});return c.create(h)}async openActionSheet(){const t=o(this),e=this.interfaceOptions,i=Object.assign(Object.assign({mode:t},e),{buttons:this.createActionSheetButtons(this.childOpts,this.value),cssClass:["select-action-sheet",e.cssClass]});return h.create(i)}async openAlert(){const t=this.getLabel(),e=t?t.textContent:null,i=this.interfaceOptions,s=this.multiple?"checkbox":"radio",n=o(this),a=Object.assign(Object.assign({mode:n},i),{header:i.header?i.header:e,inputs:this.createAlertInputs(this.childOpts,s,this.value),buttons:[{text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}},{text:this.okText,handler:t=>{this.value=t}}],cssClass:["select-alert",i.cssClass,this.multiple?"multiple-select-alert":"single-select-alert"]});return p.create(a)}close(){return this.overlay?this.overlay.dismiss():Promise.resolve(!1)}getLabel(){return r(this.el)}hasValue(){return""!==this.getText()}get childOpts(){return Array.from(this.el.querySelectorAll("ion-select-option"))}getText(){const t=this.selectedText;return null!=t&&""!==t?t:w(this.childOpts,this.value,this.compareWith)}setFocus(){this.focusEl&&this.focusEl.focus()}emitStyle(){this.ionStyle.emit({interactive:!0,"interactive-disabled":this.disabled,select:!0,"select-disabled":this.disabled,"has-placeholder":void 0!==this.placeholder,"has-value":this.hasValue(),"has-focus":this.isExpanded})}render(){const{disabled:t,el:e,inputId:n,isExpanded:a,name:r,placeholder:c,value:h}=this,p=o(this),{labelText:g,labelId:m}=l(e,n);d(!0,e,r,x(h),t);let b=!1,f=this.getText();""===f&&void 0!==c&&(f=c,b=!0);const v={"select-text":!0,"select-placeholder":b},y=b?"placeholder":"text",w=void 0!==g?""!==f?`${f}, ${g}`:g:f;return i(s,{onClick:this.onClick,role:"button","aria-haspopup":"listbox","aria-disabled":t?"true":null,"aria-label":w,class:{[p]:!0,"in-item":u("ion-item",e),"select-disabled":t,"select-expanded":a}},i("div",{"aria-hidden":"true",class:v,part:y},f),i("div",{class:"select-icon",role:"presentation",part:"icon"},i("div",{class:"select-icon-inner"})),i("label",{id:m},w),i("button",{type:"button",disabled:t,id:n,"aria-labelledby":m,"aria-haspopup":"listbox","aria-expanded":`${a}`,onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.focusEl=t}))}get el(){return n(this)}static get watchers(){return{disabled:["styleChanged"],placeholder:["styleChanged"],isExpanded:["styleChanged"],value:["valueChanged"]}}},f=(t,e,i)=>void 0!==t&&(Array.isArray(t)?t.some((t=>y(t,e,i))):y(t,e,i)),v=t=>{const e=t.value;return void 0===e?t.textContent||"":e},x=t=>{if(null!=t)return Array.isArray(t)?t.join(","):t.toString()},y=(t,e,i)=>"function"==typeof i?i(t,e):"string"==typeof i?t[i]===e[i]:Array.isArray(e)?e.includes(t):t===e,w=(t,e,i)=>void 0===e?"":Array.isArray(e)?e.map((e=>k(t,e,i))).filter((t=>null!==t)).join(", "):k(t,e,i)||"",k=(t,e,i)=>{const s=t.find((t=>y(v(t),e,i)));return s?s.textContent:null};let C=0;const j="select-interface-option";b.style={ios:":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px;opacity:0.33}",md:":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{position:relative}.select-text{flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-2px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:16px}.select-icon{width:19px;height:19px;transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:0.55}:host-context(.item-label-stacked) .select-icon,:host-context(.item-label-floating:not(.item-fill-outline)) .select-icon,:host-context(.item-label-floating.item-fill-outline){transform:translate3d(0, -9px, 0)}:host-context(.item-has-focus) .select-icon{transform:rotate(180deg)}:host-context(.item-has-focus.item-label-stacked) .select-icon,:host-context(.item-has-focus.item-label-floating:not(.item-fill-outline)) .select-icon{transform:translate3d(0, -9px, 0) rotate(180deg)}:host-context(ion-item.ion-focused) .select-icon,:host-context(.item-has-focus) .select-icon{color:var(--highlight-color-focused);opacity:1}"};const P=class{constructor(e){t(this,e),this.inputId="ion-selopt-"+O++,this.disabled=!1}render(){return i(s,{role:"option",id:this.inputId,class:o(this)})}get el(){return n(this)}};let O=0;P.style=":host{display:none}";const A=class{constructor(e){t(this,e)}componentDidLoad(){this.postText=this.textValue,this.ref&&this.ref.innerText&&(this.assignmentName=this.ref.innerText,console.log(this.assignmentName))}setText(t){this.postText=t}isAuthenticated(){try{var t=g.getInstance().get("sparkle");if(t&&t.auth&&t.auth.getToken())return!0}catch(t){return!1}}submitPost(){this.errorMessage="",this.successMessage="",this.el.getElementsByClassName("PostExternalUrl"),this.el.getElementsByClassName("IsPublic")}uploadImage(t){}selectFile(){document.getElementById("fileInput").click()}renderUserInfo(){var t={Token:null,ProfileImageUrl:null};return null!=t&&t.Token?i("ion-avatar",{class:"header-avatar",slot:"end"},i("img",{src:"/assets/img/avatar.png"})):i("ion-button",{slot:"end",href:"/login"},"Login to Post")}render(){const t=this.renderUserInfo();return i(s,null,i("div",{class:"assignment-name",ref:t=>this.ref=t},i("slot",null)),i("ion-card",null,i("ion-item",{class:"header",lines:"full"},t),i("ion-card-content",null,i("form",null,i("ion-list",null,i("ion-item",{class:"padding"},i("ion-textarea",{class:"PostText",required:!0,placeholder:"Post Text",name:"PostText",value:this.postText})),i("ion-item",{class:"padding"},i("ion-input",{class:"PostExternalUrl",required:!0,type:"text",placeholder:"URL",name:"ExternalResourceUrl",value:this.externalResourceUrl})),this.uploadedImage?i("ion-item",{class:"padding"},i("img",{class:"uploaded-image",src:this.uploadedImage})):"",i("ion-item",{lines:"none"},i("input",{type:"file",id:"fileInput",onChange:t=>this.uploadImage(t),style:{display:"none"},accept:"image/*"}),this.uploadImageLoading?i("ion-spinner",{color:"primary"}):"",i("ion-button",{slot:"start",onClick:()=>this.selectFile()},i("ion-icon",{name:"add"}),"Upload Image")),i("div",{class:"public-post-toggle"},i("ion-toggle",{class:"IsPublic",color:"primary",name:"IsPublic"}),i("div",null,"Public Post")),i("div",{class:"post-footer-container"},i("div",{class:"post-footer"},i("div",null,i("div",{class:"error"},this.errorMessage),i("div",{class:"success"},this.successMessage)),i("ion-button",{slot:"end",size:"default",onClick:()=>this.submitPost(),disabled:!this.isAuthenticated()},"Post"))))))))}get el(){return n(this)}};A.style=":host{display:block}.post-footer-container{display:flex;justify-content:flex-end}.post-footer{display:flex;justify-content:space-between;align-items:center}.error{color:red;margin-right:10px}.success{color:green;margin-right:10px}.uploaded-image{display:block;max-height:140px;width:auto !important}.public-post-toggle{display:flex;justify-content:flex-end;align-items:center}.assignment-name{display:none}";export{b as ion_select,P as ion_select_option,A as sparkle_feed_post}
@@ -0,0 +1 @@
1
+ import{E as t}from"./p-b226f54d.js";import{d as e}from"./p-2f569553.js";class s extends Error{constructor(t,e){const s=new.target.prototype;super(`${t}: Status code '${e}'`),this.statusCode=e,this.__proto__=s}}class n extends Error{constructor(t="A timeout occurred."){const e=new.target.prototype;super(t),this.__proto__=e}}class i extends Error{constructor(t="An abort occurred."){const e=new.target.prototype;super(t),this.__proto__=e}}class r extends Error{constructor(t,e){const s=new.target.prototype;super(t),this.transport=e,this.errorType="UnsupportedTransportError",this.__proto__=s}}class o extends Error{constructor(t,e){const s=new.target.prototype;super(t),this.transport=e,this.errorType="DisabledTransportError",this.__proto__=s}}class h extends Error{constructor(t,e){const s=new.target.prototype;super(t),this.transport=e,this.errorType="FailedToStartTransportError",this.__proto__=s}}class c extends Error{constructor(t){const e=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=e}}class a extends Error{constructor(t,e){const s=new.target.prototype;super(t),this.innerErrors=e,this.__proto__=s}}class l{constructor(t,e,s){this.statusCode=t,this.statusText=e,this.content=s}}class u{get(t,e){return this.send({...e,method:"GET",url:t})}post(t,e){return this.send({...e,method:"POST",url:t})}delete(t,e){return this.send({...e,method:"DELETE",url:t})}getCookieString(t){return""}}var d,p,f;!function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"}(d||(d={}));class w{constructor(){}log(t,e){}}w.instance=new w;class g{static isRequired(t,e){if(null==t)throw new Error(`The '${e}' argument is required.`)}static isNotEmpty(t,e){if(!t||t.match(/^\s*$/))throw new Error(`The '${e}' argument should not be empty.`)}static isIn(t,e,s){if(!(t in e))throw new Error(`Unknown ${s} value: ${t}.`)}}class m{static get isBrowser(){return"object"==typeof window&&"object"==typeof window.document}static get isWebWorker(){return"object"==typeof self&&"importScripts"in self}static get isReactNative(){return"object"==typeof window&&void 0===window.document}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function y(t,e){let s="";return b(t)?(s=`Binary data of length ${t.byteLength}`,e&&(s+=`. Content: '${function(t){const e=new Uint8Array(t);let s="";return e.forEach((t=>{s+=`0x${t<16?"0":""}${t.toString(16)} `})),s.substr(0,s.length-1)}(t)}'`)):"string"==typeof t&&(s=`String data of length ${t.length}`,e&&(s+=`. Content: '${t}'`)),s}function b(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}async function v(t,e,s,n,i,r,o){let h={};if(i){const t=await i();t&&(h={Authorization:`Bearer ${t}`})}const[c,a]=C();h[c]=a,t.log(d.Trace,`(${e} transport) sending data. ${y(r,o.logMessageContent)}.`);const l=b(r)?"arraybuffer":"text",u=await s.post(n,{content:r,headers:{...h,...o.headers},responseType:l,timeout:o.timeout,withCredentials:o.withCredentials});t.log(d.Trace,`(${e} transport) request complete. Response status: ${u.statusCode}.`)}class ${constructor(t,e){this._subject=t,this._observer=e}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((()=>{}))}}class E{constructor(t){this._minLevel=t,this.out=console}log(t,e){if(t>=this._minLevel){const s=`[${(new Date).toISOString()}] ${d[t]}: ${e}`;switch(t){case d.Critical:case d.Error:this.out.error(s);break;case d.Warning:this.out.warn(s);break;case d.Information:this.out.info(s);break;default:this.out.log(s)}}}}function C(){let t="X-SignalR-User-Agent";return m.isNode&&(t="User-Agent"),[t,S("6.0.3",k(),m.isNode?"NodeJS":"Browser",_())]}function S(t,e,s,n){let i="Microsoft SignalR/";const r=t.split(".");return i+=`${r[0]}.${r[1]}`,i+=` (${t}; `,i+=e&&""!==e?`${e}; `:"Unknown OS; ",i+=`${s}`,i+=n?`; ${n}`:"; Unknown Runtime Version",i+=")",i}function k(){if(!m.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function _(){if(m.isNode)return process.versions.node}function P(t){return t.stack?t.stack:t.message?t.message:`${t}`}class T extends u{constructor(t){if(super(),this._logger=t,"undefined"==typeof fetch){const t="function"==typeof __webpack_require__?__non_webpack_require__:require;this._jar=new(t("tough-cookie").CookieJar),this._fetchType=t("node-fetch"),this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("could not find global")}());if("undefined"==typeof AbortController){const t="function"==typeof __webpack_require__?__non_webpack_require__:require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new i;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const e=new this._abortControllerType;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{e.abort(),r=new i});let o,h=null;t.timeout&&(h=setTimeout((()=>{e.abort(),this._logger.log(d.Warning,"Timeout from HTTP request."),r=new n}),t.timeout));try{o=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:!0===t.withCredentials?"include":"same-origin",headers:{"Content-Type":"text/plain;charset=UTF-8","X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:e.signal})}catch(t){if(r)throw r;throw this._logger.log(d.Warning,`Error from HTTP request. ${t}.`),t}finally{h&&clearTimeout(h),t.abortSignal&&(t.abortSignal.onabort=null)}if(!o.ok){const t=await I(o,"text");throw new s(t||o.statusText,o.status)}const c=I(o,t.responseType),a=await c;return new l(o.status,o.statusText,a)}getCookieString(t){let e="";return m.isNode&&this._jar&&this._jar.getCookies(t,((t,s)=>e=s.join("; "))),e}}function I(t,e){let s;switch(e){case"arraybuffer":s=t.arrayBuffer();break;case"text":s=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:s=t.text()}return s}class H extends u{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new i):t.method?t.url?new Promise(((e,r)=>{const o=new XMLHttpRequest;o.open(t.method,t.url,!0),o.withCredentials=void 0===t.withCredentials||t.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");const h=t.headers;h&&Object.keys(h).forEach((t=>{o.setRequestHeader(t,h[t])})),t.responseType&&(o.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{o.abort(),r(new i)}),t.timeout&&(o.timeout=t.timeout),o.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),o.status>=200&&o.status<300?e(new l(o.status,o.statusText,o.response||o.responseText)):r(new s(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(d.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),r(new s(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(d.Warning,"Timeout from HTTP request."),r(new n)},o.send(t.content||"")})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class R extends u{constructor(t){if(super(),"undefined"!=typeof fetch||m.isNode)this._httpClient=new T(t);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new H(t)}}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new i):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class D{static write(t){return`${t}${D.RecordSeparator}`}static parse(t){if(t[t.length-1]!==D.RecordSeparator)throw new Error("Message is incomplete.");const e=t.split(D.RecordSeparator);return e.pop(),e}}D.RecordSeparatorCode=30,D.RecordSeparator=String.fromCharCode(D.RecordSeparatorCode);class x{writeHandshakeRequest(t){return D.write(JSON.stringify(t))}parseHandshakeResponse(t){let e,s;if(b(t)){const n=new Uint8Array(t),i=n.indexOf(D.RecordSeparatorCode);if(-1===i)throw new Error("Message is incomplete.");const r=i+1;e=String.fromCharCode.apply(null,Array.prototype.slice.call(n.slice(0,r))),s=n.byteLength>r?n.slice(r).buffer:null}else{const n=t,i=n.indexOf(D.RecordSeparator);if(-1===i)throw new Error("Message is incomplete.");const r=i+1;e=n.substring(0,r),s=n.length>r?n.substring(r):null}const n=D.parse(e),i=JSON.parse(n[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[s,i]}}!function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close"}(p||(p={}));class N{constructor(){this.observers=[]}next(t){for(const e of this.observers)e.next(t)}error(t){for(const e of this.observers)e.error&&e.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new $(this,t)}}!function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"}(f||(f={}));class q{constructor(t,e,s,n){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(d.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},g.isRequired(t,"connection"),g.isRequired(e,"logger"),g.isRequired(s,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=e,this._protocol=s,this.connection=t,this._reconnectPolicy=n,this._handshakeProtocol=new x,this.connection.onreceive=t=>this._processIncomingData(t),this.connection.onclose=t=>this._connectionClosed(t),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=f.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:p.Ping})}static create(t,e,s,n){return new q(t,e,s,n)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==f.Disconnected&&this._connectionState!==f.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==f.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=f.Connecting,this._logger.log(d.Debug,"Starting HubConnection.");try{await this._startInternal(),m.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=f.Connected,this._connectionStarted=!0,this._logger.log(d.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=f.Disconnected,this._logger.log(d.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise(((t,e)=>{this._handshakeResolver=t,this._handshakeRejecter=e}));await this.connection.start(this._protocol.transferFormat);try{const e={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(d.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(e)),this._logger.log(d.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError}catch(t){throw this._logger.log(d.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(t),t}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch(t){}}_stopInternal(t){return this._connectionState===f.Disconnected?(this._logger.log(d.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===f.Disconnecting?(this._logger.log(d.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=f.Disconnecting,this._logger.log(d.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(d.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...e){const[s,n]=this._replaceStreamingParams(e),i=this._createStreamInvocation(t,e,n);let r;const o=new N;return o.cancelCallback=()=>{const t=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],r.then((()=>this._sendWithProtocol(t)))},this._callbacks[i.invocationId]=(t,e)=>{e?o.error(e):t&&(t.type===p.Completion?t.error?o.error(new Error(t.error)):o.complete():o.next(t.item))},r=this._sendWithProtocol(i).catch((t=>{o.error(t),delete this._callbacks[i.invocationId]})),this._launchStreams(s,r),o}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...e){const[s,n]=this._replaceStreamingParams(e),i=this._sendWithProtocol(this._createInvocation(t,e,!0,n));return this._launchStreams(s,i),i}invoke(t,...e){const[s,n]=this._replaceStreamingParams(e),i=this._createInvocation(t,e,!1,n);return new Promise(((t,e)=>{this._callbacks[i.invocationId]=(s,n)=>{n?e(n):s&&(s.type===p.Completion?s.error?e(new Error(s.error)):t(s.result):e(new Error(`Unexpected message type: ${s.type}`)))};const n=this._sendWithProtocol(i).catch((t=>{e(t),delete this._callbacks[i.invocationId]}));this._launchStreams(s,n)}))}on(t,e){t&&e&&(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),-1===this._methods[t].indexOf(e)&&this._methods[t].push(e))}off(t,e){if(!t)return;t=t.toLowerCase();const s=this._methods[t];if(s)if(e){const n=s.indexOf(e);-1!==n&&(s.splice(n,1),0===s.length&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const e=this._protocol.parseMessages(t,this._logger);for(const t of e)switch(t.type){case p.Invocation:this._invokeClientMethod(t);break;case p.StreamItem:case p.Completion:{const e=this._callbacks[t.invocationId];if(e){t.type===p.Completion&&delete this._callbacks[t.invocationId];try{e(t)}catch(t){this._logger.log(d.Error,`Stream callback threw error: ${P(t)}`)}}break}case p.Ping:break;case p.Close:{this._logger.log(d.Information,"Close message received from server.");const e=t.error?new Error("Server returned an error on close: "+t.error):void 0;!0===t.allowReconnect?this.connection.stop(e):this._stopPromise=this._stopInternal(e);break}default:this._logger.log(d.Warning,`Invalid message type: ${t.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let e,s;try{[s,e]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(t){const e="Error parsing handshake response: "+t;this._logger.log(d.Error,e);const s=new Error(e);throw this._handshakeRejecter(s),s}if(e.error){const t="Server returned handshake error: "+e.error;this._logger.log(d.Error,t);const s=new Error(t);throw this._handshakeRejecter(s),s}return this._logger.log(d.Debug,"Server handshake complete."),this._handshakeResolver(),s}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let t=this._nextKeepAlive-(new Date).getTime();t<0&&(t=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===f.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(t){const e=this._methods[t.target.toLowerCase()];if(e){try{e.forEach((e=>e.apply(this,t.arguments)))}catch(e){this._logger.log(d.Error,`A callback for the method ${t.target.toLowerCase()} threw error '${e}'.`)}if(t.invocationId){const t="Server requested a response, which is not supported in this version of the client.";this._logger.log(d.Error,t),this._stopPromise=this._stopInternal(new Error(t))}}else this._logger.log(d.Warning,`No client method with the name '${t.target}' found.`)}_connectionClosed(t){this._logger.log(d.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new Error("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===f.Disconnecting?this._completeClose(t):this._connectionState===f.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===f.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=f.Disconnected,this._connectionStarted=!1,m.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((e=>e.apply(this,[t])))}catch(e){this._logger.log(d.Error,`An onclose callback called with error '${t}' threw error '${e}'.`)}}}async _reconnect(t){const e=Date.now();let s=0,n=void 0!==t?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(s++,0,n);if(null===i)return this._logger.log(d.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(t);if(this._connectionState=f.Reconnecting,this._logger.log(d.Information,t?`Connection reconnecting because of error '${t}'.`:"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((e=>e.apply(this,[t])))}catch(e){this._logger.log(d.Error,`An onreconnecting callback called with error '${t}' threw error '${e}'.`)}if(this._connectionState!==f.Reconnecting)return void this._logger.log(d.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==i;){if(this._logger.log(d.Information,`Reconnect attempt number ${s} will start in ${i} ms.`),await new Promise((t=>{this._reconnectDelayHandle=setTimeout(t,i)})),this._reconnectDelayHandle=void 0,this._connectionState!==f.Reconnecting)return void this._logger.log(d.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=f.Connected,this._logger.log(d.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((t=>t.apply(this,[this.connection.connectionId])))}catch(t){this._logger.log(d.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${t}'.`)}return}catch(t){if(this._logger.log(d.Information,`Reconnect attempt failed because of error '${t}'.`),this._connectionState!==f.Reconnecting)return this._logger.log(d.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===f.Disconnecting&&this._completeClose());n=t instanceof Error?t:new Error(t.toString()),i=this._getNextRetryDelay(s++,Date.now()-e,n)}}this._logger.log(d.Information,`Reconnect retries have been exhausted after ${Date.now()-e} ms and ${s} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,e,s){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:e,previousRetryCount:t,retryReason:s})}catch(s){return this._logger.log(d.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${e}) threw error '${s}'.`),null}}_cancelCallbacksWithError(t){const e=this._callbacks;this._callbacks={},Object.keys(e).forEach((s=>{const n=e[s];try{n(null,t)}catch(e){this._logger.log(d.Error,`Stream 'error' callback called with '${t}' threw error: ${P(e)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,e,s,n){if(s)return 0!==n.length?{arguments:e,streamIds:n,target:t,type:p.Invocation}:{arguments:e,target:t,type:p.Invocation};{const s=this._invocationId;return this._invocationId++,0!==n.length?{arguments:e,invocationId:s.toString(),streamIds:n,target:t,type:p.Invocation}:{arguments:e,invocationId:s.toString(),target:t,type:p.Invocation}}}_launchStreams(t,e){if(0!==t.length){e||(e=Promise.resolve());for(const s in t)t[s].subscribe({complete:()=>{e=e.then((()=>this._sendWithProtocol(this._createCompletionMessage(s))))},error:t=>{let n;n=t instanceof Error?t.message:t&&t.toString?t.toString():"Unknown error",e=e.then((()=>this._sendWithProtocol(this._createCompletionMessage(s,n))))},next:t=>{e=e.then((()=>this._sendWithProtocol(this._createStreamItemMessage(s,t))))}})}}_replaceStreamingParams(t){const e=[],s=[];for(let n=0;n<t.length;n++){const i=t[n];if(this._isObservable(i)){const r=this._invocationId;this._invocationId++,e[r]=i,s.push(r.toString()),t.splice(n,1)}}return[e,s]}_isObservable(t){return t&&t.subscribe&&"function"==typeof t.subscribe}_createStreamInvocation(t,e,s){const n=this._invocationId;return this._invocationId++,0!==s.length?{arguments:e,invocationId:n.toString(),streamIds:s,target:t,type:p.StreamInvocation}:{arguments:e,invocationId:n.toString(),target:t,type:p.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:p.CancelInvocation}}_createStreamItemMessage(t,e){return{invocationId:t,item:e,type:p.StreamItem}}_createCompletionMessage(t,e,s){return e?{error:e,invocationId:t,type:p.Completion}:{invocationId:t,result:s,type:p.Completion}}}const U=[0,2e3,1e4,3e4,null];class A{constructor(t){this._retryDelays=void 0!==t?[...t,null]:U}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class L{}var M,W;L.Authorization="Authorization",L.Cookie="Cookie",function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"}(M||(M={})),function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"}(W||(W={}));class F{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class O{constructor(t,e,s,n){this._httpClient=t,this._accessTokenFactory=e,this._logger=s,this._pollAbort=new F,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,e){if(g.isRequired(t,"url"),g.isRequired(e,"transferFormat"),g.isIn(e,W,"transferFormat"),this._url=t,this._logger.log(d.Trace,"(LongPolling transport) Connecting."),e===W.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,i]=C(),r={[n]:i,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};e===W.Binary&&(o.responseType="arraybuffer");const h=await this._getAccessToken();this._updateHeaderToken(o,h);const c=`${t}&_=${Date.now()}`;this._logger.log(d.Trace,`(LongPolling transport) polling: ${c}.`);const a=await this._httpClient.get(c,o);200!==a.statusCode?(this._logger.log(d.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new s(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _getAccessToken(){return this._accessTokenFactory?await this._accessTokenFactory():null}_updateHeaderToken(t,e){t.headers||(t.headers={}),e?t.headers[L.Authorization]=`Bearer ${e}`:t.headers[L.Authorization]&&delete t.headers[L.Authorization]}async _poll(t,e){try{for(;this._running;){const i=await this._getAccessToken();this._updateHeaderToken(e,i);try{const n=`${t}&_=${Date.now()}`;this._logger.log(d.Trace,`(LongPolling transport) polling: ${n}.`);const i=await this._httpClient.get(n,e);204===i.statusCode?(this._logger.log(d.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==i.statusCode?(this._logger.log(d.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new s(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(d.Trace,`(LongPolling transport) data received. ${y(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(d.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(t){this._running?t instanceof n?this._logger.log(d.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=t,this._running=!1):this._logger.log(d.Trace,`(LongPolling transport) Poll errored after shutdown: ${t.message}`)}}}finally{this._logger.log(d.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?v(this._logger,"LongPolling",this._httpClient,this._url,this._accessTokenFactory,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(d.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(d.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[e,s]=C();t[e]=s;const n={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials},i=await this._getAccessToken();this._updateHeaderToken(n,i),await this._httpClient.delete(this._url,n),this._logger.log(d.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(d.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(d.Trace,t),this.onclose(this._closeError)}}}class j{constructor(t,e,s,n){this._httpClient=t,this._accessTokenFactory=e,this._logger=s,this._options=n,this.onreceive=null,this.onclose=null}async connect(t,e){if(g.isRequired(t,"url"),g.isRequired(e,"transferFormat"),g.isIn(e,W,"transferFormat"),this._logger.log(d.Trace,"(SSE transport) Connecting."),this._url=t,this._accessTokenFactory){const e=await this._accessTokenFactory();e&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(e)}`)}return new Promise(((s,n)=>{let i,r=!1;if(e===W.Text){if(m.isBrowser||m.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const e=this._httpClient.getCookieString(t),s={};s.Cookie=e;const[n,r]=C();s[n]=r,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...s,...this._options.headers}})}try{i.onmessage=t=>{if(this.onreceive)try{this._logger.log(d.Trace,`(SSE transport) data received. ${y(t.data,this._options.logMessageContent)}.`),this.onreceive(t.data)}catch(t){return void this._close(t)}},i.onerror=()=>{r?this._close():n(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(d.Information,`SSE connected to ${this._url}`),this._eventSource=i,r=!0,s()}}catch(t){return void n(t)}}else n(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(t){return this._eventSource?v(this._logger,"SSE",this._httpClient,this._url,this._accessTokenFactory,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class B{constructor(t,e,s,n,i,r){this._logger=s,this._accessTokenFactory=e,this._logMessageContent=n,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=r}async connect(t,e){if(g.isRequired(t,"url"),g.isRequired(e,"transferFormat"),g.isIn(e,W,"transferFormat"),this._logger.log(d.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory){const e=await this._accessTokenFactory();e&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(e)}`)}return new Promise(((s,n)=>{let i;t=t.replace(/^http/,"ws");const r=this._httpClient.getCookieString(t);let o=!1;if(m.isNode){const e={},[s,n]=C();e[s]=n,r&&(e[L.Cookie]=`${r}`),i=new this._webSocketConstructor(t,void 0,{headers:{...e,...this._headers}})}i||(i=new this._webSocketConstructor(t)),e===W.Binary&&(i.binaryType="arraybuffer"),i.onopen=()=>{this._logger.log(d.Information,`WebSocket connected to ${t}.`),this._webSocket=i,o=!0,s()},i.onerror=t=>{let e=null;e="undefined"!=typeof ErrorEvent&&t instanceof ErrorEvent?t.error:"There was an error with the transport",this._logger.log(d.Information,`(WebSockets transport) ${e}.`)},i.onmessage=t=>{if(this._logger.log(d.Trace,`(WebSockets transport) data received. ${y(t.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(t.data)}catch(t){return void this._close(t)}},i.onclose=t=>{if(o)this._close(t);else{let e=null;e="undefined"!=typeof ErrorEvent&&t instanceof ErrorEvent?t.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",n(new Error(e))}}}))}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(d.Trace,`(WebSockets transport) sending data. ${y(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(d.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(t)||!1!==t.wasClean&&1e3===t.code?t instanceof Error?this.onclose(t):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)))}_isCloseEvent(t){return t&&"boolean"==typeof t.wasClean&&"number"==typeof t.code}}class X{constructor(t,e={}){var s;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,g.isRequired(t,"url"),this._logger=void 0===(s=e.logger)?new E(d.Information):null===s?w.instance:void 0!==s.log?s:new E(s),this.baseUrl=this._resolveUrl(t),(e=e||{}).logMessageContent=void 0!==e.logMessageContent&&e.logMessageContent,"boolean"!=typeof e.withCredentials&&void 0!==e.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");e.withCredentials=void 0===e.withCredentials||e.withCredentials,e.timeout=void 0===e.timeout?1e5:e.timeout;let n=null,i=null;if(m.isNode&&"undefined"!=typeof require){const t="function"==typeof __webpack_require__?__non_webpack_require__:require;n=t("ws"),i=t("eventsource")}m.isNode||"undefined"==typeof WebSocket||e.WebSocket?m.isNode&&!e.WebSocket&&n&&(e.WebSocket=n):e.WebSocket=WebSocket,m.isNode||"undefined"==typeof EventSource||e.EventSource?m.isNode&&!e.EventSource&&void 0!==i&&(e.EventSource=i):e.EventSource=EventSource,this._httpClient=e.httpClient||new R(this._logger),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=e,this.onreceive=null,this.onclose=null}async start(t){if(g.isIn(t=t||W.Binary,W,"transferFormat"),this._logger.log(d.Debug,`Starting connection with transfer format '${W[t]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,"Disconnecting"===this._connectionState){const t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(d.Error,t),await this._stopPromise,Promise.reject(new Error(t))}if("Connected"!==this._connectionState){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(d.Error,t),Promise.reject(new Error(t))}this._connectionStarted=!0}send(t){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new J(this.transport)),this._sendQueue.send(t))}async stop(t){return"Disconnected"===this._connectionState?(this._logger.log(d.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(d.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((t=>{this._stopPromiseResolver=t})),await this._stopInternal(t),void await this._stopPromise)}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch(t){}if(this.transport){try{await this.transport.stop()}catch(t){this._logger.log(d.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(d.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let e=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==M.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(M.WebSockets),await this._startTransport(e,t)}else{let s=null,n=0;do{if(s=await this._getNegotiationResponse(e),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new Error("The connection was stopped during negotiation.");if(s.error)throw new Error(s.error);if(s.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(s.url&&(e=s.url),s.accessToken){const t=s.accessToken;this._accessTokenFactory=()=>t}n++}while(s.url&&n<100);if(100===n&&s.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(e,this._options.transport,s,t)}this.transport instanceof O&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(d.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(t){return this._logger.log(d.Error,"Failed to start the connection: "+t),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(t)}}async _getNegotiationResponse(t){const e={};if(this._accessTokenFactory){const t=await this._accessTokenFactory();t&&(e[L.Authorization]=`Bearer ${t}`)}const[n,i]=C();e[n]=i;const r=this._resolveNegotiateUrl(t);this._logger.log(d.Debug,`Sending negotiation request: ${r}.`);try{const t=await this._httpClient.post(r,{content:"",headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==t.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${t.statusCode}'`));const s=JSON.parse(t.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s}catch(t){let e="Failed to complete negotiation with the server: "+t;return t instanceof s&&404===t.statusCode&&(e+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(d.Error,e),Promise.reject(new c(e))}}_createConnectUrl(t,e){return e?t+(-1===t.indexOf("?")?"?":"&")+`id=${e}`:t}async _createTransport(t,e,s,n){let i=this._createConnectUrl(t,s.connectionToken);if(this._isITransport(e))return this._logger.log(d.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=e,await this._startTransport(i,n),void(this.connectionId=s.connectionId);const r=[],o=s.availableTransports||[];let c=s;for(const s of o){const o=this._resolveTransportOrError(s,e,n);if(o instanceof Error)r.push(`${s.transport} failed:`),r.push(o);else if(this._isITransport(o)){if(this.transport=o,!c){try{c=await this._getNegotiationResponse(t)}catch(t){return Promise.reject(t)}i=this._createConnectUrl(t,c.connectionToken)}try{return await this._startTransport(i,n),void(this.connectionId=c.connectionId)}catch(t){if(this._logger.log(d.Error,`Failed to start the transport '${s.transport}': ${t}`),c=void 0,r.push(new h(`${s.transport} failed: ${t}`,M[s.transport])),"Connecting"!==this._connectionState){const t="Failed to select transport before stop() was called.";return this._logger.log(d.Debug,t),Promise.reject(new Error(t))}}}}return Promise.reject(r.length>0?new a(`Unable to connect to the server with any of the available transports. ${r.join(" ")}`,r):new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case M.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new B(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case M.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new j(this._httpClient,this._accessTokenFactory,this._logger,this._options);case M.LongPolling:return new O(this._httpClient,this._accessTokenFactory,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,e){return this.transport.onreceive=this.onreceive,this.transport.onclose=t=>this._stopConnection(t),this.transport.connect(t,e)}_resolveTransportOrError(t,e,s){const n=M[t.transport];if(null==n)return this._logger.log(d.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(!function(t,e){return!t||0!=(e&t)}(e,n))return this._logger.log(d.Debug,`Skipping transport '${M[n]}' because it was disabled by the client.`),new o(`'${M[n]}' is disabled by the client.`,n);if(!(t.transferFormats.map((t=>W[t])).indexOf(s)>=0))return this._logger.log(d.Debug,`Skipping transport '${M[n]}' because it does not support the requested transfer format '${W[s]}'.`),new Error(`'${M[n]}' does not support ${W[s]}.`);if(n===M.WebSockets&&!this._options.WebSocket||n===M.ServerSentEvents&&!this._options.EventSource)return this._logger.log(d.Debug,`Skipping transport '${M[n]}' because it is not supported in your environment.'`),new r(`'${M[n]}' is not supported in your environment.`,n);this._logger.log(d.Debug,`Selecting transport '${M[n]}'.`);try{return this._constructTransport(n)}catch(t){return t}}_isITransport(t){return t&&"object"==typeof t&&"connect"in t}_stopConnection(t){if(this._logger.log(d.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(d.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),t?this._logger.log(d.Error,`Connection disconnected with error '${t}'.`):this._logger.log(d.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((t=>{this._logger.log(d.Error,`TransportSendQueue.stop() threw error '${t}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(e){this._logger.log(d.Error,`HttpConnection.onclose(${t}) threw error '${e}'.`)}}}else this._logger.log(d.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(t){if(0===t.lastIndexOf("https://",0)||0===t.lastIndexOf("http://",0))return t;if(!m.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const e=window.document.createElement("a");return e.href=t,this._logger.log(d.Information,`Normalizing '${t}' to '${e.href}'.`),e.href}_resolveNegotiateUrl(t){const e=t.indexOf("?");let s=t.substring(0,-1===e?t.length:e);return"/"!==s[s.length-1]&&(s+="/"),s+="negotiate",s+=-1===e?"":t.substring(e),-1===s.indexOf("negotiateVersion")&&(s+=-1===e?"?":"&",s+="negotiateVersion="+this._negotiateVersion),s}}class J{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new z,this._transportResult=new z,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new z),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new z;const t=this._transportResult;this._transportResult=void 0;const e="string"==typeof this._buffer[0]?this._buffer.join(""):J._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(e),t.resolve()}catch(e){t.reject(e)}}}static _concatBuffers(t){const e=t.map((t=>t.byteLength)).reduce(((t,e)=>t+e)),s=new Uint8Array(e);let n=0;for(const e of t)s.set(new Uint8Array(e),n),n+=e.byteLength;return s.buffer}}class z{constructor(){this.promise=new Promise(((t,e)=>[this._resolver,this._rejecter]=[t,e]))}resolve(){this._resolver()}reject(t){this._rejecter(t)}}class V{constructor(){this.name="json",this.version=1,this.transferFormat=W.Text}parseMessages(t,e){if("string"!=typeof t)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];null===e&&(e=w.instance);const s=D.parse(t),n=[];for(const t of s){const s=JSON.parse(t);if("number"!=typeof s.type)throw new Error("Invalid payload.");switch(s.type){case p.Invocation:this._isInvocationMessage(s);break;case p.StreamItem:this._isStreamItemMessage(s);break;case p.Completion:this._isCompletionMessage(s);break;case p.Ping:case p.Close:break;default:e.log(d.Information,"Unknown message type '"+s.type+"' ignored.");continue}n.push(s)}return n}writeMessage(t){return D.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),void 0!==t.invocationId&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),void 0===t.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,e){if("string"!=typeof t||""===t)throw new Error(e)}}const G={trace:d.Trace,debug:d.Debug,info:d.Information,information:d.Information,warn:d.Warning,warning:d.Warning,error:d.Error,critical:d.Critical,none:d.None};class K{configureLogging(t){if(g.isRequired(t,"logging"),void 0!==t.log)this.logger=t;else if("string"==typeof t){const e=function(t){const e=G[t.toLowerCase()];if(void 0!==e)return e;throw new Error(`Unknown log level: ${t}`)}(t);this.logger=new E(e)}else this.logger=new E(t);return this}withUrl(t,e){return g.isRequired(t,"url"),g.isNotEmpty(t,"url"),this.url=t,this.httpConnectionOptions="object"==typeof e?{...this.httpConnectionOptions,...e}:{...this.httpConnectionOptions,transport:e},this}withHubProtocol(t){return g.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return this.reconnectPolicy=t?Array.isArray(t)?new A(t):t:new A,this}build(){const t=this.httpConnectionOptions||{};if(void 0===t.logger&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const e=new X(this.url,t);return q.create(e,this.logger||w.instance,this.protocol||new V,this.reconnectPolicy)}}const{state:Q,onChange:Y,reset:Z}=e({connecting:!1,connected:!1}),tt={state:Q,onChange:Y,reset:Z};class et{constructor(){console.log("Starting signalR");var e=t.getInstance().get("sparkle");this.connection=(new K).withUrl(`${e.apiUrl}hubs/sparkle?url=${window.location.href}&courseClassId=1`,{accessTokenFactory:()=>this.getToken(),skipNegotiation:!0,transport:M.WebSockets}).configureLogging(d.Debug).withAutomaticReconnect({nextRetryDelayInMilliseconds:t=>t.elapsedMilliseconds<6e4?1e4*Math.random():null}).build(),this.connection.on("SendMessage",((t,e)=>{let s=JSON.parse(e);console.log("Server said ",t,s)})),this.connection.onclose((()=>{})),this.connection.onreconnecting((()=>{console.assert(this.connection.state===f.Reconnecting)})),this.connection.onreconnected((()=>{console.assert(this.connection.state===f.Connected)}))}static getInstance(){return et.instance||(et.instance=new et),et.instance}async start(){console.log("start");try{tt.state.connecting=!0,tt.state.connected=!tt.state.connecting,await this.connection.start(),console.log(this.connection),tt.state.connecting=!1,tt.state.connected=!tt.state.connecting,console.assert(this.connection.state===f.Connected),console.log("SignalR Connected.")}catch(t){console.assert(this.connection.state===f.Disconnected),console.log(t)}}async callSignalR(t,e){console.log("signalR invoke",t,this.connection.connectionState),this.getToken()?(this.connection.invoke(t,JSON.stringify(e)),console.log("After signalR invoke",t,this.connection.connectionState)):console.log("Cannot connect to signalR. Not logged in")}getToken(){var e=t.getInstance().get("sparkle");return e&&e.auth&&e.auth.getToken()?sparkle.auth.getToken():null}}export{et as S,tt as s}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-ee1e0eb4.js";import{g as t}from"./p-0147266a.js";import"./p-871106e0.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>(t(),o(JSON.parse('[["p-58e4bbe5",[[0,"sparkle-goal-form",{"appData":[16],"name":[32],"description":[32],"category":[32],"progress":[32],"public":[32],"goalUpdateText":[32],"submitted":[32]}]]],["p-80d6b0e6",[[0,"sparkle-feedback",{"formControls":[32],"submitted":[32]}]]],["p-15403881",[[4,"sparkle-feed-post",{"assignmentName":[1025,"assignment-name"],"textValue":[1,"text-value"],"postText":[32],"errorMessage":[32],"uploadedImage":[32],"successMessage":[32],"externalResourceUrl":[32],"uploadImageLoading":[32],"setText":[64]}]]],["p-ff0e0d4e",[[0,"sparkle-quiz-container",{"questionIds":[1,"question-ids"],"showInstantResult":[4,"show-instant-result"],"submitted":[32]},[[4,"pageDidLoad","pageDidLoadHandler"],[16,"quizAnswerChanged","updateQuizAnswerModelHandler"]]]]],["p-30b810d1",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"multiple":[4],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}]]],["p-9e7fee8f",[[0,"sparkle-gww-comment-list",{"comments":[16]}]]],["p-162bff1a",[[0,"sparkle-quiz-v1",{"questionId":[2,"question-id"],"submitted":[4],"correct":[4],"showInstantResult":[4,"show-instant-result"],"question":[32],"quizData":[32]},[[0,"quizInputChange","quizInputChangeHandler"],[0,"quizFeedbackChange","quizFeedbackChangeHandler"],[0,"quizSelectChange","quizSelectChangeHandler"],[0,"quizOpinionChange","quizOpinionChangeHandler"]]]]],["p-d601810e",[[0,"sparkle-compass-post",{"errorMessage":[32],"successMessage":[32],"resiliance":[32],"care":[32],"compassData":[32],"renderCompass":[64]}]]],["p-41a9ece7",[[0,"sparkle-animation-player",{"src":[1],"composition":[1],"initialClassMode":[4,"initial-class-mode"],"classMode":[32],"showCaption":[32],"paused":[32],"sizeOfCanvas":[32],"sizeofProgressBar":[32],"dataLoaded":[32],"currentProgressWidth":[32],"captionText":[32],"showFirstFrame":[32],"isBusy":[32],"playAnimation":[64],"pauseAnimation":[64],"classRoomModeChanged":[64],"destroyAnimation":[64]},[[0,"ionChange","closedCaptionChange"],[16,"classRoomModeChanged","onClassRoomModeChanged"]]]]],["p-af3cc111",[[0,"sparkle-facilitator-notes-form",{"initialValues":[16],"formControls":[32],"submitted":[32]}]]],["p-04c7b276",[[4,"sparkle-sidebar",{"position":[1],"size":[1],"headerText":[1,"header-text"],"isShowing":[32],"hide":[64],"show":[64]}]]],["p-c2990b24",[[0,"course-select",{"toggleClickFn":[16]}]]],["p-6ffd2420",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}]]],["p-6faa194c",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-894ff7e6",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-54dd894f",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-cc518c36",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-ce4b22f7",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-9289cdbc",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}]]],["p-9abbd715",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-27fbabc3",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-9ebf0537",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-975b99ee",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}]]],["p-1b1ba156",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-e863bf1d",[[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]]]],["p-377b04c2",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["p-cffd4817",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-0c3f3ea6",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-b5f3e1bf",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}]]],["p-594a6982",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]]]],["p-352677e6",[[0,"sparkle-lower-content-nav",{"next":[16],"prev":[16]}]]],["p-fda95b6e",[[0,"sparkle-notfound-page"]]],["p-06642405",[[0,"sparkle-table-of-contents",{"links":[16],"label":[1],"basepath":[1],"itemOffsets":[32],"selectedId":[32],"pageWidth":[32]},[[9,"scroll","function"],[9,"resize","updateItemOffsets"]]]]],["p-a2ebcf0a",[[0,"compass-svg"]]],["p-a98d7ebe",[[0,"context-consumer",{"context":[16],"renderer":[16],"subscribe":[16],"unsubscribe":[32]}]]],["p-69487d90",[[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["p-74864276",[[0,"ion-app",{"setFocus":[64]}]]],["p-1e4782af",[[33,"ion-badge",{"color":[513]}]]],["p-601397df",[[33,"ion-breadcrumbs",{"color":[1],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["p-38b7cf68",[[33,"ion-card-header",{"color":[513],"translucent":[4]}]]],["p-2ba70507",[[33,"ion-card-subtitle",{"color":[513]}]]],["p-865f36a8",[[33,"ion-card-title",{"color":[513]}]]],["p-5322c920",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}]]],["p-06c7d0f2",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-e686d8b5",[[36,"ion-footer",{"collapse":[1],"translucent":[4]}]]],["p-0afa3a4d",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-0ad5c123",[[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-e249aebf",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}]]],["p-e3e36ce9",[[32,"ion-item-group"]]],["p-24cb9a33",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-cabfbf22",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-8492a765",[[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-c60b29bd",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}]]],["p-fd8d0738",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-c0533c23",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-39712c56",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-fb757951",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-859563db",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}]]],["p-81714d94",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-b96f3c84",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-214d1229",[[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-ebd4354b",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-2c1ca854",[[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["p-d20e4fcf",[[1,"ion-skeleton-text",{"animated":[4]}]]],["p-9e309b3e",[[0,"ion-slide"]]],["p-1e125ca5",[[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["p-2d9659e2",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["p-de4deb61",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-e8988989",[[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["p-d288e6c1",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-d24e53ab",[[1,"ion-thumbnail"]]],["p-ef4edc48",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["p-370609ba",[[4,"sparkle-character-intro",{"character":[1],"position":[1]}]]],["p-11a6c175",[[0,"sparkle-code",{"language":[513],"showCopyConfirmation":[32]}]]],["p-3963e02b",[[0,"sparkle-compass",{"resiliance":[514],"care":[514],"organization":[514],"school":[514],"relationship":[514],"emotions":[514],"spirituality":[514],"rest":[514],"canvas":[32],"canvase_container":[32],"drawOnCompass":[64]}]]],["p-616941c6",[[1,"sparkle-emoji",{"mood":[1],"size":[1]}]]],["p-63f71ada",[[4,"sparkle-gww-graph"]]],["p-5c435d5a",[[0,"sparkle-intro",{"description":[32]}]]],["p-957715c5",[[4,"sparkle-menu-collapsible",{"heading":[1],"isOpen":[32]}]]],["p-e421d638",[[1,"sparkle-modal-image",{"src":[1],"alt":[1],"width":[1],"height":[1],"openDialog":[1028,"open-dialog"],"transparent":[4]},[[0,"keydown","handleKeyDown"],[2,"click","handleScroll"]]]]],["p-8c74cbb6",[[1,"sparkle-poll"]]],["p-6316d124",[[4,"sparkle-tab",{"tab":[513],"selected":[516]}]]],["p-a2638250",[[4,"sparkle-tabs",{"listenFor":[1,"listen-for"],"selected":[32],"tabs":[32]},[[8,"local-storage","listenForFrameworkSelection"]]]]],["p-fe6dc976",[[0,"sparkle-youtube",{"src":[1],"initialClassMode":[4,"initial-class-mode"],"classMode":[32],"video_thumbnail":[32],"classRoomModeChanged":[64]}]]],["p-ea962e1b",[[0,"stencil-async-content",{"documentLocation":[1,"document-location"],"content":[32]}]]],["p-32f4e565",[[0,"stencil-route-title",{"titleSuffix":[1,"title-suffix"],"pageTitle":[1,"page-title"]}]]],["p-d0adf726",[[0,"stencil-router-prompt",{"when":[4],"message":[1],"history":[16],"unblock":[32]}]]],["p-a49ab4e8",[[4,"sparkle-quiz",{"questionId":[2,"question-id"],"type":[1],"scale":[1],"questionText":[1,"question-text"],"showOptionNumber":[4,"show-option-number"],"submitted":[4],"correct":[4],"feedback":[1],"showInstantResult":[4,"show-instant-result"],"options":[32]},[[0,"quizInputChange","quizInputChangeHandler"],[0,"quizFeedbackChange","quizFeedbackChangeHandler"],[0,"quizSelectChange","quizSelectChangeHandler"],[0,"quizOpinionChange","quizOpinionChangeHandler"]]]]],["p-5096739e",[[0,"sparkle-select",{"options":[1040],"initializer":[16],"optionRenderer":[16],"selected":[32]}]]],["p-b3f375fb",[[32,"ion-picker-column",{"col":[16]}]]],["p-4053ecdb",[[4,"sparkle-overlay",{"titleId":[1,"title-id"],"absolute":[4],"theme":[1],"preventClose":[4,"prevent-close"],"focusIndex":[32],"isShowing":[32],"show":[64],"hide":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-11356b03",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"activated":[32]}]]],["p-0f1c5899",[[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]},[[0,"ionChange","onSelect"]]],[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]],[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-564e64fc",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}]]],["p-be64105c",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-0664370b",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}],[33,"ion-picker-internal"]]],["p-641bfc92",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["p-fb0ca75e",[[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"]]]]],["p-5893bbe5",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-8a41b502",[[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["p-0335c863",[[0,"sparkle-course-root",{"isMenuToggled":[32],"tocData":[32]}],[0,"sparkle-login",{"history":[16],"notsignin":[32],"username":[32],"password":[32],"rememberMe":[32],"submitted":[32]}],[0,"sparkle-user-enrollment",{"enrollmentFormControls":[32],"enrollmentFormSubmitted":[32]}],[0,"sparkle-mood",{"history":[16],"loading":[32],"feeling":[32],"intensity":[32],"location":[32],"public":[32],"submitted":[32],"currentStep":[32]}],[0,"sparkle-signup",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-user-profile",{"profileFormControls":[32],"profileFormSubmitted":[32]}],[0,"sparkle-forgot-password",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-goals"],[0,"sparkle-health",{"history":[16],"uploadedImageUrl":[32],"heartRate":[32],"public":[32],"submitted":[32]}],[0,"sparkle-gww"],[0,"sparkle-reset-password",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-facilitator-page",{"path":[1],"notesPath":[1,"notes-path"],"badFetch":[32],"badFetchLessonNotes":[32],"isLesson":[32],"notesPage":[32],"lessonNotesPage":[32],"page":[32],"onlineStudents":[32],"activetab":[32]}],[4,"sparkle-header",{"authUser":[8,"auth-user"],"hideClassRoomToggle":[4,"hide-class-room-toggle"],"courseName":[1,"course-name"],"imageUrl":[1,"image-url"],"toggleClickFn":[16],"signoutClickFn":[16],"classRoomMode":[32],"hidden":[32]},[[9,"scroll","handleScroll"]]],[0,"sparkle-menu",{"toggleClickFn":[16],"toc":[16],"config":[16]}],[4,"sparkle-facilitator-header",{"courseName":[1,"course-name"],"toggleStudentClickFn":[16],"hidden":[32]},[[9,"scroll","handleScroll"]]],[4,"sparkle-page",{"history":[16],"path":[1],"presentation":[4],"badFetch":[32],"page":[32],"isLesson":[32]}],[4,"sparkle-root",{"config":[16]}],[0,"sparkle-unauthorized"],[0,"stencil-route",{"group":[513],"componentUpdated":[16],"match":[1040],"url":[1],"component":[1],"componentProps":[16],"exact":[4],"routeRender":[16],"scrollTopOffset":[2,"scroll-top-offset"],"routeViewsUpdated":[16],"location":[16],"history":[16],"historyType":[1,"history-type"]}],[4,"stencil-router",{"root":[1],"historyType":[1,"history-type"],"titleSuffix":[1,"title-suffix"],"scrollTopOffset":[2,"scroll-top-offset"],"location":[32],"history":[32]}],[0,"sparkle-gww-item",{"post":[16],"onPostComment":[16],"loading":[4],"comment":[32]},[[16,"commentPosted","clearCommentField"]]],[0,"sparkle-goal-item",{"goal":[16],"onEditGoal":[16]}],[0,"sparkle-page-footer",{"page":[16]}],[0,"sparkle-nav",{"toc":[16],"config":[16],"selectedParent":[1040],"moduleURLName":[32],"sessionURLName":[32]},[[4,"pageDidLoad","pageDidLoadHandler"]]],[1,"ion-grid",{"fixed":[4]}],[4,"sparkle-cards"],[0,"sparkle-export-lessons",{"tocData":[32],"moduleContent":[32],"moduleName":[32],"page":[32]}],[0,"sparkle-facilitator-dashboard",{"tocData":[32],"selectedModule":[32],"selectedSession":[32],"selectedPage":[32],"showAllModules":[32]}],[0,"sparkle-facilitator-notes"],[0,"sparkle-online-students",{"path":[1],"onlineStudents":[32]}],[4,"stencil-route-switch",{"group":[513],"scrollTopOffset":[2,"scroll-top-offset"],"location":[16],"routeViewsUpdated":[16]}],[0,"stencil-router-redirect",{"history":[16],"root":[1],"url":[1]}],[4,"sparkle-card",{"href":[1],"header":[1],"icon":[1],"hoverIcon":[1,"hover-icon"],"iconset":[1],"ionicon":[1],"img":[1],"size":[1],"activeIndex":[32]}],[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[4,"sparkle-button",{"href":[1],"round":[516],"primary":[516]}],[0,"sparkle-pagination",{"page":[16]}],[4,"header-mobile-collapse",{"darkMode":[4,"dark-mode"],"mobileDropdownActive":[32],"stuck":[32],"queued":[32]},[[16,"pageChanged","deactivate"]]],[32,"ion-card-content"],[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-row"],[0,"sparkle-menu-toggle"],[4,"sparkle-dropdown",{"align":[1],"label":[1],"icon":[16],"image":[1],"isOpen":[32],"close":[64],"open":[64],"toggle":[64]},[[8,"click","handleClick"],[0,"keyup","handleKeyup"]]],[0,"sparkle-validation-error",{"errors":[16]}],[0,"sparkle-goal-progress",{"percentage":[1]}],[33,"ion-avatar"],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]],[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8]}],[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[1,"ion-text",{"color":[513]}],[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[4,"stencil-route-link",{"url":[1],"urlMatch":[1,"url-match"],"activeClass":[1,"active-class"],"exact":[4],"strict":[4],"custom":[1],"anchorClass":[1,"anchor-class"],"anchorRole":[1,"anchor-role"],"anchorTitle":[1,"anchor-title"],"anchorTabIndex":[1,"anchor-tab-index"],"anchorId":[1,"anchor-id"],"history":[16],"location":[16],"root":[1],"ariaHaspopup":[1,"aria-haspopup"],"ariaPosinset":[1,"aria-posinset"],"ariaSetsize":[2,"aria-setsize"],"ariaLabel":[1,"aria-label"],"match":[32]}],[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionChange","handleIonChange"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[33,"ion-note",{"color":[513]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32],"ariaLabel":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-c3cadfc6",[[0,"sparkle-quiz-opinion",{"question":[16],"selectedIndex":[32]}],[0,"sparkle-quiz-feedback",{"question":[16]}],[0,"sparkle-quiz-input",{"question":[16]}],[0,"sparkle-quiz-poll",{"question":[16]}],[0,"sparkle-quiz-select",{"question":[16],"allowMultiple":[4,"allow-multiple"],"values":[32]}]]]]'),e))));
1
+ import{p as e,b as o}from"./p-ee1e0eb4.js";import{g as t}from"./p-0147266a.js";import"./p-871106e0.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>(t(),o(JSON.parse('[["p-30767c1c",[[0,"sparkle-discussion",{"allowPostToFeed":[4,"allow-post-to-feed"],"feedStartingText":[1,"feed-starting-text"],"isTeacherMode":[4,"is-teacher-mode"],"questionIds":[1,"question-ids"],"quizData":[32]}]]],["p-58e4bbe5",[[0,"sparkle-goal-form",{"appData":[16],"name":[32],"description":[32],"category":[32],"progress":[32],"public":[32],"goalUpdateText":[32],"submitted":[32]}]]],["p-80d6b0e6",[[0,"sparkle-feedback",{"formControls":[32],"submitted":[32]}]]],["p-ff0e0d4e",[[0,"sparkle-quiz-container",{"questionIds":[1,"question-ids"],"showInstantResult":[4,"show-instant-result"],"submitted":[32]},[[4,"pageDidLoad","pageDidLoadHandler"],[16,"quizAnswerChanged","updateQuizAnswerModelHandler"]]]]],["p-30b810d1",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"multiple":[4],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}]]],["p-9e7fee8f",[[0,"sparkle-gww-comment-list",{"comments":[16]}]]],["p-162bff1a",[[0,"sparkle-quiz-v1",{"questionId":[2,"question-id"],"submitted":[4],"correct":[4],"showInstantResult":[4,"show-instant-result"],"question":[32],"quizData":[32]},[[0,"quizInputChange","quizInputChangeHandler"],[0,"quizFeedbackChange","quizFeedbackChangeHandler"],[0,"quizSelectChange","quizSelectChangeHandler"],[0,"quizOpinionChange","quizOpinionChangeHandler"]]]]],["p-d601810e",[[0,"sparkle-compass-post",{"errorMessage":[32],"successMessage":[32],"resiliance":[32],"care":[32],"compassData":[32],"renderCompass":[64]}]]],["p-18cdd458",[[0,"sparkle-animation-player",{"src":[1],"composition":[1],"initialClassMode":[4,"initial-class-mode"],"classMode":[32],"showCaption":[32],"paused":[32],"sizeOfCanvas":[32],"sizeofProgressBar":[32],"dataLoaded":[32],"currentProgressWidth":[32],"captionText":[32],"showFirstFrame":[32],"isBusy":[32],"playAnimation":[64],"pauseAnimation":[64],"classRoomModeChanged":[64],"destroyAnimation":[64]},[[0,"ionChange","closedCaptionChange"],[16,"classRoomModeChanged","onClassRoomModeChanged"]]]]],["p-af3cc111",[[0,"sparkle-facilitator-notes-form",{"initialValues":[16],"formControls":[32],"submitted":[32]}]]],["p-04c7b276",[[4,"sparkle-sidebar",{"position":[1],"size":[1],"headerText":[1,"header-text"],"isShowing":[32],"hide":[64],"show":[64]}]]],["p-c2990b24",[[0,"course-select",{"toggleClickFn":[16]}]]],["p-6ffd2420",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}]]],["p-6faa194c",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-894ff7e6",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-54dd894f",[[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}]]],["p-cc518c36",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}]]],["p-ce4b22f7",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-9289cdbc",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}]]],["p-9abbd715",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-27fbabc3",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["p-9ebf0537",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["p-975b99ee",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}]]],["p-1b1ba156",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}]]],["p-e863bf1d",[[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]]]],["p-377b04c2",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["p-cffd4817",[[33,"ion-reorder",null,[[2,"click","onClick"]]]]],["p-0c3f3ea6",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["p-b5f3e1bf",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}]]],["p-594a6982",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]]]],["p-352677e6",[[0,"sparkle-lower-content-nav",{"next":[16],"prev":[16]}]]],["p-fda95b6e",[[0,"sparkle-notfound-page"]]],["p-06642405",[[0,"sparkle-table-of-contents",{"links":[16],"label":[1],"basepath":[1],"itemOffsets":[32],"selectedId":[32],"pageWidth":[32]},[[9,"scroll","function"],[9,"resize","updateItemOffsets"]]]]],["p-a2ebcf0a",[[0,"compass-svg"]]],["p-a98d7ebe",[[0,"context-consumer",{"context":[16],"renderer":[16],"subscribe":[16],"unsubscribe":[32]}]]],["p-69487d90",[[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["p-74864276",[[0,"ion-app",{"setFocus":[64]}]]],["p-1e4782af",[[33,"ion-badge",{"color":[513]}]]],["p-601397df",[[33,"ion-breadcrumbs",{"color":[1],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["p-38b7cf68",[[33,"ion-card-header",{"color":[513],"translucent":[4]}]]],["p-2ba70507",[[33,"ion-card-subtitle",{"color":[513]}]]],["p-865f36a8",[[33,"ion-card-title",{"color":[513]}]]],["p-5322c920",[[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}]]],["p-06c7d0f2",[[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["p-e686d8b5",[[36,"ion-footer",{"collapse":[1],"translucent":[4]}]]],["p-0afa3a4d",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["p-0ad5c123",[[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["p-e249aebf",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}]]],["p-e3e36ce9",[[32,"ion-item-group"]]],["p-24cb9a33",[[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}]]],["p-cabfbf22",[[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["p-8492a765",[[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["p-c60b29bd",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}]]],["p-fd8d0738",[[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["p-c0533c23",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["p-39712c56",[[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["p-fb757951",[[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["p-859563db",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}]]],["p-81714d94",[[0,"ion-route-redirect",{"from":[1],"to":[1]}]]],["p-b96f3c84",[[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]]]],["p-214d1229",[[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["p-ebd4354b",[[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-2c1ca854",[[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["p-d20e4fcf",[[1,"ion-skeleton-text",{"animated":[4]}]]],["p-9e309b3e",[[0,"ion-slide"]]],["p-1e125ca5",[[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["p-2d9659e2",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["p-de4deb61",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}]]],["p-e8988989",[[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["p-d288e6c1",[[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["p-d24e53ab",[[1,"ion-thumbnail"]]],["p-ef4edc48",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["p-370609ba",[[4,"sparkle-character-intro",{"character":[1],"position":[1]}]]],["p-11a6c175",[[0,"sparkle-code",{"language":[513],"showCopyConfirmation":[32]}]]],["p-3963e02b",[[0,"sparkle-compass",{"resiliance":[514],"care":[514],"organization":[514],"school":[514],"relationship":[514],"emotions":[514],"spirituality":[514],"rest":[514],"canvas":[32],"canvase_container":[32],"drawOnCompass":[64]}]]],["p-616941c6",[[1,"sparkle-emoji",{"mood":[1],"size":[1]}]]],["p-63f71ada",[[4,"sparkle-gww-graph"]]],["p-5c435d5a",[[0,"sparkle-intro",{"description":[32]}]]],["p-957715c5",[[4,"sparkle-menu-collapsible",{"heading":[1],"isOpen":[32]}]]],["p-e421d638",[[1,"sparkle-modal-image",{"src":[1],"alt":[1],"width":[1],"height":[1],"openDialog":[1028,"open-dialog"],"transparent":[4]},[[0,"keydown","handleKeyDown"],[2,"click","handleScroll"]]]]],["p-8c74cbb6",[[1,"sparkle-poll"]]],["p-6316d124",[[4,"sparkle-tab",{"tab":[513],"selected":[516]}]]],["p-a2638250",[[4,"sparkle-tabs",{"listenFor":[1,"listen-for"],"selected":[32],"tabs":[32]},[[8,"local-storage","listenForFrameworkSelection"]]]]],["p-fe6dc976",[[0,"sparkle-youtube",{"src":[1],"initialClassMode":[4,"initial-class-mode"],"classMode":[32],"video_thumbnail":[32],"classRoomModeChanged":[64]}]]],["p-ea962e1b",[[0,"stencil-async-content",{"documentLocation":[1,"document-location"],"content":[32]}]]],["p-32f4e565",[[0,"stencil-route-title",{"titleSuffix":[1,"title-suffix"],"pageTitle":[1,"page-title"]}]]],["p-d0adf726",[[0,"stencil-router-prompt",{"when":[4],"message":[1],"history":[16],"unblock":[32]}]]],["p-a49ab4e8",[[4,"sparkle-quiz",{"questionId":[2,"question-id"],"type":[1],"scale":[1],"questionText":[1,"question-text"],"showOptionNumber":[4,"show-option-number"],"submitted":[4],"correct":[4],"feedback":[1],"showInstantResult":[4,"show-instant-result"],"options":[32]},[[0,"quizInputChange","quizInputChangeHandler"],[0,"quizFeedbackChange","quizFeedbackChangeHandler"],[0,"quizSelectChange","quizSelectChangeHandler"],[0,"quizOpinionChange","quizOpinionChangeHandler"]]]]],["p-5096739e",[[0,"sparkle-select",{"options":[1040],"initializer":[16],"optionRenderer":[16],"selected":[32]}]]],["p-b3f375fb",[[32,"ion-picker-column",{"col":[16]}]]],["p-4053ecdb",[[4,"sparkle-overlay",{"titleId":[1,"title-id"],"absolute":[4],"theme":[1],"preventClose":[4,"prevent-close"],"focusIndex":[32],"isShowing":[32],"show":[64],"hide":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-3265ed87",[[0,"sparkle-discussion-questions",{"allowPostToFeed":[4,"allow-post-to-feed"],"postToFeedAssignmentName":[1,"post-to-feed-assignment-name"],"feedStartingText":[1,"feed-starting-text"],"isTeacherMode":[4,"is-teacher-mode"],"questions":[16],"error":[32],"modelChange":[32],"responses":[32],"suggestionList":[32],"postToFeedTextValue":[32]}],[0,"sparkle-discussion-results",{"allowPostToFeed":[4,"allow-post-to-feed"],"feedStartingText":[1,"feed-starting-text"],"isTeacherMode":[4,"is-teacher-mode"],"questions":[16],"error":[32],"modelChange":[32],"responses":[32],"suggestionList":[32]},[[0,"body:receivedPollSubmissionSignalREvent","gotServerUpdate"]]]]],["p-be64105c",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["p-0664370b",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}],[33,"ion-picker-internal"]]],["p-11356b03",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"activated":[32]}]]],["p-fb0ca75e",[[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"]]]]],["p-641bfc92",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["p-5893bbe5",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["p-8a41b502",[[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["p-0a5d7c4f",[[0,"sparkle-course-root",{"isMenuToggled":[32],"tocData":[32]}],[0,"sparkle-login",{"history":[16],"notsignin":[32],"username":[32],"password":[32],"rememberMe":[32],"submitted":[32]}],[0,"sparkle-user-enrollment",{"enrollmentFormControls":[32],"enrollmentFormSubmitted":[32]}],[0,"sparkle-mood",{"history":[16],"loading":[32],"feeling":[32],"intensity":[32],"location":[32],"public":[32],"submitted":[32],"currentStep":[32]}],[0,"sparkle-signup",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-user-profile",{"profileFormControls":[32],"profileFormSubmitted":[32]}],[0,"sparkle-forgot-password",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-goals"],[0,"sparkle-health",{"history":[16],"uploadedImageUrl":[32],"heartRate":[32],"public":[32],"submitted":[32]}],[0,"sparkle-gww"],[0,"sparkle-reset-password",{"history":[16],"validationErrors":[32],"formControls":[32],"submitted":[32]}],[0,"sparkle-facilitator-page",{"path":[1],"notesPath":[1,"notes-path"],"badFetch":[32],"badFetchLessonNotes":[32],"isLesson":[32],"notesPage":[32],"lessonNotesPage":[32],"page":[32],"onlineStudents":[32],"activetab":[32]}],[4,"sparkle-header",{"authUser":[8,"auth-user"],"hideClassRoomToggle":[4,"hide-class-room-toggle"],"courseName":[1,"course-name"],"imageUrl":[1,"image-url"],"toggleClickFn":[16],"signoutClickFn":[16],"classRoomMode":[32],"hidden":[32]},[[9,"scroll","handleScroll"]]],[0,"sparkle-menu",{"toggleClickFn":[16],"toc":[16],"config":[16]}],[4,"sparkle-facilitator-header",{"courseName":[1,"course-name"],"toggleStudentClickFn":[16],"hidden":[32]},[[9,"scroll","handleScroll"]]],[4,"sparkle-page",{"history":[16],"path":[1],"presentation":[4],"badFetch":[32],"page":[32],"isLesson":[32]}],[4,"sparkle-root",{"config":[16]}],[0,"sparkle-unauthorized"],[0,"stencil-route",{"group":[513],"componentUpdated":[16],"match":[1040],"url":[1],"component":[1],"componentProps":[16],"exact":[4],"routeRender":[16],"scrollTopOffset":[2,"scroll-top-offset"],"routeViewsUpdated":[16],"location":[16],"history":[16],"historyType":[1,"history-type"]}],[4,"stencil-router",{"root":[1],"historyType":[1,"history-type"],"titleSuffix":[1,"title-suffix"],"scrollTopOffset":[2,"scroll-top-offset"],"location":[32],"history":[32]}],[0,"sparkle-gww-item",{"post":[16],"onPostComment":[16],"loading":[4],"comment":[32]},[[16,"commentPosted","clearCommentField"]]],[0,"sparkle-goal-item",{"goal":[16],"onEditGoal":[16]}],[0,"sparkle-page-footer",{"page":[16]}],[0,"sparkle-nav",{"toc":[16],"config":[16],"selectedParent":[1040],"moduleURLName":[32],"sessionURLName":[32]},[[4,"pageDidLoad","pageDidLoadHandler"]]],[1,"ion-grid",{"fixed":[4]}],[4,"sparkle-cards"],[0,"sparkle-export-lessons",{"tocData":[32],"moduleContent":[32],"moduleName":[32],"page":[32]}],[0,"sparkle-facilitator-dashboard",{"tocData":[32],"selectedModule":[32],"selectedSession":[32],"selectedPage":[32],"showAllModules":[32]}],[0,"sparkle-facilitator-notes"],[0,"sparkle-online-students",{"path":[1],"onlineStudents":[32]}],[4,"stencil-route-switch",{"group":[513],"scrollTopOffset":[2,"scroll-top-offset"],"location":[16],"routeViewsUpdated":[16]}],[0,"stencil-router-redirect",{"history":[16],"root":[1],"url":[1]}],[4,"sparkle-card",{"href":[1],"header":[1],"icon":[1],"hoverIcon":[1,"hover-icon"],"iconset":[1],"ionicon":[1],"img":[1],"size":[1],"activeIndex":[32]}],[4,"sparkle-button",{"href":[1],"round":[516],"primary":[516]}],[0,"sparkle-pagination",{"page":[16]}],[4,"header-mobile-collapse",{"darkMode":[4,"dark-mode"],"mobileDropdownActive":[32],"stuck":[32],"queued":[32]},[[16,"pageChanged","deactivate"]]],[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-row"],[0,"sparkle-menu-toggle"],[4,"sparkle-dropdown",{"align":[1],"label":[1],"icon":[16],"image":[1],"isOpen":[32],"close":[64],"open":[64],"toggle":[64]},[[8,"click","handleClick"],[0,"keyup","handleKeyup"]]],[0,"sparkle-validation-error",{"errors":[16]}],[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[32,"ion-card-content"],[0,"sparkle-goal-progress",{"percentage":[1]}],[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}],[33,"ion-avatar"],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]],[1,"ion-text",{"color":[513]}],[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8]}],[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[4,"stencil-route-link",{"url":[1],"urlMatch":[1,"url-match"],"activeClass":[1,"active-class"],"exact":[4],"strict":[4],"custom":[1],"anchorClass":[1,"anchor-class"],"anchorRole":[1,"anchor-role"],"anchorTitle":[1,"anchor-title"],"anchorTabIndex":[1,"anchor-tab-index"],"anchorId":[1,"anchor-id"],"history":[16],"location":[16],"root":[1],"ariaHaspopup":[1,"aria-haspopup"],"ariaPosinset":[1,"aria-posinset"],"ariaSetsize":[2,"aria-setsize"],"ariaLabel":[1,"aria-label"],"match":[32]}],[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionChange","handleIonChange"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[33,"ion-note",{"color":[513]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32],"ariaLabel":[32]}],[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["p-0f1c5899",[[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]},[[0,"ionChange","onSelect"]]],[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}],[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]],[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["p-44334ef3",[[4,"sparkle-feed-post",{"assignmentName":[1025,"assignment-name"],"textValue":[1,"text-value"],"postText":[32],"errorMessage":[32],"uploadedImage":[32],"successMessage":[32],"externalResourceUrl":[32],"uploadImageLoading":[32],"setText":[64]}],[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}]]],["p-c3cadfc6",[[0,"sparkle-quiz-opinion",{"question":[16],"selectedIndex":[32]}],[0,"sparkle-quiz-feedback",{"question":[16]}],[0,"sparkle-quiz-input",{"question":[16]}],[0,"sparkle-quiz-poll",{"question":[16]}],[0,"sparkle-quiz-select",{"question":[16],"allowMultiple":[4,"allow-multiple"],"values":[32]}]]]]'),e))));
@@ -0,0 +1,28 @@
1
+ import { SparkleQuizQuestion } from '../../../models/quiz.model';
2
+ export declare class SparkleDiscussionQuestions {
3
+ el: HTMLElement;
4
+ allowPostToFeed: boolean;
5
+ postToFeedAssignmentName: string;
6
+ feedStartingText: string;
7
+ isTeacherMode: boolean;
8
+ questions: Array<SparkleQuizQuestion>;
9
+ error: string;
10
+ modelChange: string;
11
+ responses: Array<any>;
12
+ tempResponses: Array<any>;
13
+ suggestionList: Array<{
14
+ questionId: number;
15
+ question: string;
16
+ answer: string;
17
+ responseType: string;
18
+ }>;
19
+ postToFeedTextValue: string;
20
+ componentDidLoad(): void;
21
+ resetPollData(): void;
22
+ selectOption(evt: any, question: any, option: any): void;
23
+ addSuggestion(evt: any, question: SparkleQuizQuestion): void;
24
+ toggleMode(): void;
25
+ renderOptions(question: SparkleQuizQuestion): any;
26
+ renderQuestions(): any[];
27
+ render(): any[];
28
+ }
@@ -0,0 +1,45 @@
1
+ import { SparkleQuizQuestion } from '../../../models/quiz.model';
2
+ interface MyResponse {
3
+ question: string;
4
+ responseType: string;
5
+ responses: Array<{
6
+ count: number;
7
+ response: string;
8
+ }>;
9
+ total: number;
10
+ }
11
+ export declare class SparkleDiscussionResults {
12
+ el: HTMLElement;
13
+ allowPostToFeed: boolean;
14
+ feedStartingText: string;
15
+ questionsChaged(newValue: Array<SparkleQuizQuestion>, _oldValue: Array<SparkleQuizQuestion>): void;
16
+ isTeacherMode: boolean;
17
+ questions: Array<SparkleQuizQuestion>;
18
+ error: string;
19
+ modelChange: string;
20
+ responses: Array<MyResponse>;
21
+ tempResponses: Array<MyResponse>;
22
+ suggestionList: Array<{
23
+ questionId: number;
24
+ question: string;
25
+ answer: string;
26
+ responseType: string;
27
+ }>;
28
+ gotServerUpdate(evt: any): void;
29
+ addToWordCloud(q: any): void;
30
+ addToBarChart(q: any): void;
31
+ componentDidLoad(): void;
32
+ setupData(questions: any): void;
33
+ resetPollData(): void;
34
+ setupResponseGraph(questions: Array<SparkleQuizQuestion>): void;
35
+ columnHeight(responseCount: any, totalResponseCount: any): {
36
+ height: string;
37
+ };
38
+ getRandomColorAndFontSize(count: number): {
39
+ color: string;
40
+ 'font-size': string;
41
+ };
42
+ renderResults(): any[][];
43
+ render(): any[][];
44
+ }
45
+ export {};
@@ -0,0 +1,11 @@
1
+ import { SparkleQuizQuestion } from '../../models/quiz.model';
2
+ export declare class SparkleDiscussion {
3
+ el: HTMLElement;
4
+ allowPostToFeed: boolean;
5
+ feedStartingText: string;
6
+ isTeacherMode: boolean;
7
+ questionIds: string;
8
+ quizData: Array<SparkleQuizQuestion>;
9
+ componentDidLoad(): Promise<void>;
10
+ render(): any;
11
+ }