1"use strict";(self["webpackChunkconveyour_ui"]=self["webpackChunkconveyour_ui"]||[]).push([[3983,4296,6317,32317,45569,51469],{45569:function(e,t,i){i.r(t),i.d(t,{default:function(){return u}});var n=i(45961),s=function(){var e=this,t=e._self._c;return t(n.mM,[t("div",[t("div",{staticClass:"form-fields pa-4 pb-0"},e._l(e.schema,function(i,n){return t("form-field",{key:n,attrs:{item:e.item,schema:i,field:n,value:e.item.values[n],lessonId:e.lessonId}})}),1),t("done-editing",{attrs:{item:e.item,lessonId:e.lessonId}})],1)])},o=[],r=i(41331),a=i(43672),l={name:"FormFields",props:["item","lessonId"],components:{FormField:r["default"],DoneEditing:a["default"]},computed:{definition(){return this.$store.getters["items/type"](this.item.type)||{}},schema(){return this.definition.schema}}},d=l,c=i(81656),m=(0,c.A)(d,s,o,!1,null,null,null),u=m.exports},43672:function(e,t,i){i.r(t),i.d(t,{default:function(){return c}});var n=i(69390),s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-fields-edit--wrap"},[e.item.editing&&!e.definition.inline_edits?t(n.A,{staticClass:"form-fields-edit",attrs:{color:"appMain"},on:{click:function(t){return t.preventDefault(),e.doneEditing(e.item)}}},[e._v(" Done Editing ")]):e._e()],1)},o=[],r={name:"doneEditing",props:["item","lessonId"],computed:{definition(){return this.$store.getters["items/type"](this.item.type)||{}}},methods:{doneEditing(){this.item.editing=!1}}},a=r,l=i(81656),d=(0,l.A)(a,s,o,!1,null,"f2dd7c84",null),c=d.exports},98392:function(e,t,i){i.r(t),i.d(t,{default:function(){return c}});var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"editor"},[t("form-fields",{attrs:{item:e.item,lessonId:e.lessonId}})],1)},s=[],o=i(45569),r={name:"editor",props:["item","lessonId"],components:{FormFields:o["default"]}},a=r,l=i(81656),d=(0,l.A)(a,n,s,!1,null,null,null),c=d.exports},71539:function(e,t,i){i.r(t),i.d(t,{default:function(){return u}});var n=i(3698),s=function(){var e=this,t=e._self._c;return e.taking||e.editing?t("div",{staticClass:"widget-card--wrap"},[e.taking?e._e():t("editor",{attrs:{item:e.item,lessonId:e.lesson.id}}),e.formId&&!e.completed?t(n.A,{staticClass:"widget-card jotform-widget",class:{"widget-preview":!e.taking}},[t("iframe",{staticStyle:{"min-width":"100%",height:"539px",border:"none"},attrs:{id:e.iframeId,src:e.iframeSrc,title:"Form",allowtransparency:"true",allowfullscreen:"true",allow:"geolocation; microphone; camera",frameborder:"0",scrolling:"no"}})]):e._e(),e.completed&&e.successText?t("h5",{staticClass:"text-center mt-2"},[e._v(" "+e._s(e.successText)+" ")]):e._e()],1):t("div",{staticClass:"lesson-widget-summary"},[t("p",[e._v(e._s(e.summary))])])},o=[],r=(i(44114),i(18111),i(7588),i(61701),i(51469)),a=i(15188),l={name:"jotformWidget",mixins:[r["default"],a["default"]],watch:{active:{immediate:!0,handler(e,t){e&&this.initJotForm(),t&&!e&&this.toggleEventListeners()}}},computed:{formId(){return this.val.form_id},iframeSrc(){let e=`https://form.jotform.com/${this.formId}`,t=this.prefilledFields;return t&&(t=Object.entries(t).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"),e=`${e}?${t}`),e},iframeId(){return`JotFormIFrame-${this.formId}`},summary(){return this.formId?`Form ID: ${this.formId}`:""},prefilledFields(){const e=this.valCompiled("prefilled_fields");if(!Array.isArray(e))return!1;const t={},i=e=>(e||"").trim();return e.forEach(e=>{const n=i(e.key),s=i(e.value);n&&s&&(t[n]=s)}),t},successText(){return this.valCompiled("success_text")}},methods:{async initJotForm(){if(await this.$nextTick(),this.formId&&!this.completed){var e=document.getElementById(`JotFormIFrame-${this.formId}`);if(e){var t=e.src,i=[];window.location.href&&window.location.href.indexOf("?")>-1&&(i=i.concat(window.location.href.substr(window.location.href.indexOf("?")+1).split("&"))),t&&t.indexOf("?")>-1&&(i=i.concat(t.substr(t.indexOf("?")+1).split("&")),t=t.substr(0,t.indexOf("?"))),i.push("isIframeEmbed=1"),e.src=t+"?"+i.join("&")}this.toggleEventListeners(!0)}},toggleEventListeners(e=!1){let t;window.addEventListener?(t=(e?"add":"remove")+"EventListener",window[t]("message",this.handleIFrameMessage,!1)):window.attachEvent&&(t=(e?"attach":"detach")+"Event",window[t]("onmessage",this.handleIFrameMessage))},handleIFrameMessage(e){if("object"===typeof e.data){if(e.data?.action){const{action:t,formID:i}=e.data;"submission-completed"===t&&i===this.formId&&(this.complete(0),this.$emit("completed"))}return}var t=e.data.split(":");let i;if(i=t.length>2?document.getElementById("JotFormIFrame-"+t[t.length-1]):document.getElementById("JotFormIFrame"),i){switch(t[0]){case"scrollIntoView":i.scrollIntoView();break;case"setHeight":i.style.height=+t[1]+(this.isMobile?50:0)+"px";break;case"collapseErrorPage":i.clientHeight>window.innerHeight&&(i.style.height=window.innerHeight+"px");break;case"reloadPage":window.location.reload();break;case"loadScript":if(!this.isPermitted(e.origin,["jotformWidget.com","jotformWidget.pro"]))break;var n=t[1];t.length>3&&(n=t[1]+":"+t[2]);var s=document.createElement("script");s.src=n,s.type="text/javascript",document.body.appendChild(s);break;case"exitFullscreen":window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen||window.document.mozCancelFullscreen?window.document.mozCancelFullScreen():window.document.webkitExitFullscreen?window.document.webkitExitFullscreen():window.document.msExitFullscreen&&window.document.msExitFullscreen();break}var o=e.origin.indexOf("jotformWidget")>-1;if(o&&"contentWindow"in i&&"postMessage"in i.contentWindow){var r={docurl:encodeURIComponent(document.URL),referrer:encodeURIComponent(document.referrer)};i.contentWindow.postMessage(JSON.stringify({type:"urls",value:r}),"*")}}},isPermitted(e,t){var i=document.createElement("a");i.href=e;var n=i.hostname,s=!1;if("undefined"!==typeof n)return t.forEach(function(e){n.slice(-1*e.length-1)!==".".concat(e)&&n!==e||(s=!0)}),s}},beforeDestroy(){this.toggleEventListeners()}},d=l,c=i(81656),m=(0,c.A)(d,s,o,!1,null,null,null),u=m.exports},51469:function(e,t,i){i.r(t),i.d(t,{default:function(){return p}});var n=i(98392),s=i(39575),o=i.n(s),r=function(){var e=this,t=e._self._c;return e.src?t("div",{staticClass:"mt-5 ml-2"},[t("audio",{ref:"audio",attrs:{src:e.src,controls:""}}
1,[e._v(" Your browser does not support this audio element. ")])]):e._e()},a=[],l=i(36952),d=i.n(l);const c="lessons_audio_volume";var m={name:"audioPlayer",props:["src","active","taking"],data(){return{currentTime:0,audioTimeout:null,listening:!1}},watch:{active(){this.initAudio()}},methods:{initAudio(){if(!this.src)return!1;let e=this.$refs.audio;return!!e&&(this.listening||(this.listening=this.bindListeners(e)),this.audioTimeout&&clearTimeout(this.audioTimeout),this.taking&&this.active?this.audioTimeout=setTimeout(()=>{e.volume=this.getVolume(),e.play()},1e3):e.pause(),e)},bindListeners(e){return e.addEventListener("volumechange",()=>{this.storeVolume(e.volume)}),!0},getVolume(){let e=.75,t=0;try{t=sessionStorage.getItem(c)}catch(i){console.warn(i)}return parseFloat(!t||t>1?e:t)},storeVolume:d()((e=.5)=>{console.log("storingVolume",e);try{return sessionStorage.setItem(c,e),e}catch(t){return console.warn(t),!1}},500)},mounted(){this.initAudio()}},u=m,h=i(81656),f=(0,h.A)(u,r,a,!1,null,null,null),g=f.exports,p={template:"<span>dummy for testing</span>",components:{editor:n["default"],AudioPlayer:g},props:["active","item","first","last","lesson","section","summaryOnly","taking","testing"],data(){return{_calculating:!1,imageRatio:0,forceRecalc:Date.now()}},computed:{val(){return this.item.values},valCompiled(e){return e=>{const t=this.item.valuesCompiled;return t&&t[e]?t[e]:this.val[e]}},imgHeight(){if(this.imageRatio)return this.forceRecalc&&this.$el.clientWidth/this.imageRatio},imgSrc(){return this.val.image},summary(){return this.item.title},definition(){return this.$store.getters["items/type"](this.item.type)||{}},editing(){return this.item.editing||this.definition.inline_edits}},watch:{imgSrc(e){e&&this.calcImageRatio()}},methods:{alpha(e){return String.fromCharCode(97+e).toUpperCase()},calcImageRatio(){let e=this.val.image;if(!this.$el||!e||this._calculating==e)return;this._calculating=e;let t=document,i=document.getElementsByTagName("body")[0],n=t.createElement("img");n.src=e,o()(n.style,{position:"absolute",left:"-9999px",bottom:"0"}),n.onload=()=>{let e=n.width,t=n.height;this.setImageRatio(e/t),i.removeChild(n)},i.appendChild(n)},setImageRatio(e){this.$el.clientWidth?this.imageRatio=e:setTimeout(()=>{this.setImageRatio(e)},16)},recalcImgHeight(){this.forceRecalc=Date.now()},focusFirstInput(){this.$el||setTimeout(()=>{this.focusFirstInput()},50);let e=this.$el.getElementsByClassName("form-fields")[0]||!1;if(!e)return;let t=e.getElementsByClassName("input-group__input"),i=t.length?t[0]:null;if(i){let e=i.children[0];e.focus(),e.select&&e.select()}},updateItem(e){this.$emit("update",e)}},mounted:function(){this.val.image&&(this.calcImageRatio(),window.addEventListener("resize",()=>{this.recalcImgHeight()})),this.taking||this.focusFirstInput()}}}}]); 2//# sourceMappingURL=lesson-widget-jotformWidget-JotformWidget-vue.c85f2b70.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.