!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var n={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(P){s=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),l=new E(r||[]);return i(a,"_invoke",{value:S(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(P){return{type:"throw",arg:P}}}n.wrap=f;var p={};function v(){}function y(){}function h(){}var g={};s(g,l,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(C([])));b&&b!==r&&o.call(b,l)&&(g=b);var w=h.prototype=v.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(t,n){function r(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==e(f)&&o.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,l,u)}),(function(e){r("throw",e,l,u)})):n.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,u)}))}u(c.arg)}var a;i(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,o){r(e,t,n,o)}))}return a=a?a.then(o,o):o()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=O(a,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function C(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},n}function n(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function l(e){n(a,o,i,l,u,"next",e)}function u(e){n(a,o,i,l,u,"throw",e)}l(void 0)}))}}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};if(!e.accordion){"boolean"==typeof t&&(t={expanded:t});var n=t,r=n.expanded,o=n.skipDisabled,i=l.filter((function(e){return e.disabled&&o?e.expanded.value:null!=r?r:!e.expanded.value})).map((function(e){return e.itemName.value}));u(i)}}}),i({toggle:function(t,n){var r=e.accordion,o=e.modelValue;u(r?t===o?"":t:n?o.concat(t):o.filter((function(e){return e!==t})))},isExpanded:function(t){var n=e.accordion,r=e.modelValue;return!!function(e,t){return t&&Array.isArray(e)?(console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode'),!1):!(!t&&!Array.isArray(e)&&(console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode'),1))}(r,n)&&(n?r===t:r.includes(t))}}),function(){var t;return f("div",{class:[ee(),a({},d,e.border)]},[null==(t=r.default)?void 0:t.call(r)])}}}),oe=v(re),ie=l(o("collapse-item"),2),ae=ie[0],le=ie[1],ue=["icon","title","value","label","right-icon"],ce=y({},$,{name:h,isLink:p,disabled:Boolean,readonly:Boolean,lazyRender:p}),se=u({name:ae,props:ce,setup:function(e,t){var n=t.slots,r=g(),o=g(),i=m(te),a=i.parent,l=i.index;if(a){var u=b((function(){var t;return null!=(t=e.name)?t:l.value})),c=b((function(){return a.isExpanded(u.value)})),d=g(c.value),p=w((function(){return d.value||!e.lazyRender})),v=function(){c.value?r.value&&(r.value.style.height=""):d.value=!1};x(c,(function(e,t){null!==t&&(e&&(d.value=!0),(e?S:O)((function(){if(o.value&&r.value){var t=o.value.offsetHeight;if(t){var n="".concat(t,"px");r.value.style.height=e?"0":n,k((function(){r.value&&(r.value.style.height=e?n:"0")}))}else v()}})))}));var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!c.value;a.toggle(u.value,e)},h=function(){e.disabled||e.readonly||y()},I=p((function(){var e;return E(f("div",{ref:r,class:le("wrapper"),onTransitionend:v},[f("div",{ref:o,class:le("content")},[null==(e=n.default)?void 0:e.call(n)])]),[[C,d.value]])}));return s({toggle:y,expanded:c,itemName:u}),function(){return f("div",{class:[le({border:l.value&&e.border})]},[(t=e.border,r=e.disabled,o=e.readonly,i=j(e,Object.keys($)),o&&(i.isLink=!1),(r||o)&&(i.clickable=!1),f(Q,L({role:"button",class:le("title",{disabled:r,expanded:c.value,borderless:!t}),"aria-expanded":String(c.value),onClick:h},i),j(n,ue))),I()]);var t,r,o,i}}console.error("[Vant] must be a child component of .")}}),fe=v(se),de=""+new URL("library-1-96754f77.png",n.meta.url).href,pe=""+new URL("library-2-18c7f885.png",n.meta.url).href,ve=""+new URL("library-3-784f5dd5.png",n.meta.url).href,ye=u({name:"knowledge-guide",emits:["close"],setup:function(e,t){t.emit;var n=I({box:{},show:!1,steps:[{ele:"",eleRect:{},img:Y("knowledge1.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{width:"5.46rem",height:"2.30rem",top:"1.9rem"},btnsStyle:{top:"4.5rem",left:"1rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",eleRect:{},img:Y("knowledge2.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{top:"1.9rem",left:"-1.5rem"},btnsStyle:{top:"4.5rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",img:Y("knowledge3.png"),handStyle:{top:"4.1rem",left:"3.6rem"},imgStyle:{top:"4.8rem",left:"1.2rem",width:"7.2rem",height:"3.45rem"},btnsStyle:{top:"8.8rem",left:"1.3rem"},boxStyle:{transform:"scale(1)"}}],step:0}),r=g(!1),o=function(){var e=document.getElementById("knowledge-".concat(n.step));if(console.log(e,"ele"),e){var t=e.getBoundingClientRect();n.box={left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}}else l()};P((function(){var e=localStorage.getItem("guideInfo");e&&JSON.parse(e).knowledge?r.value=!1:r.value=!0,o(),window.addEventListener("resize",a)}));var a=function(){o()};N((function(){window.removeEventListener("resize",a)}));var l=function(){console.log(n.step,""),n.step>=2?u():(n.step=n.step+1,o())},u=function(){var e=JSON.parse(localStorage.getItem("guideInfo")||"{}");e?e.knowledge=!0:e={knowledge:!0},localStorage.setItem("guideInfo",JSON.stringify(e)),r.value=!1};return function(){return f(A,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",H.guidePopup],show:r.value,"onUpdate:show":function(e){return r.value=e}},{default:function(){return[f("div",{class:H.content,onClick:function(){return l()}},[n.step!=n.steps.length-1&&f("div",{class:[H.backBtn,H.right],onClick:function(e){e.stopPropagation(),u()}},[T("跳过")]),f("div",{class:[H.box,H.noscalc],style:i(i({},n.box),n.steps[n.step].boxStyle),id:"modeType-".concat(n.step)},[n.steps.map((function(e,t){var r,i;return f("div",{onClick:function(e){return e.stopPropagation()},class:H.item,style:{display:t===n.step?"":"none",left:"".concat(null===(r=e.eleRect)||void 0===r?void 0:r.left,"px"),top:"".concat(null===(i=e.eleRect)||void 0===i?void 0:i.top,"px")}},[f("img",{class:H.img,style:e.imgStyle,src:e.img},null),f("img",{class:H.iconHead,style:e.handStyle,src:Y("indexDot.png")},null),f("div",{class:H.btns,style:e.btnsStyle},[n.step+1==n.steps.length?f(_,null,[f(D,{class:H.btn,round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:function(){n.step=0,o()}},{default:function(){return[T("再看一遍")]}}),f(D,{class:[H.btn,H.endBtn],round:!0,type:"primary",onClick:function(){return u()}},{default:function(){return[T("完成")]}})]):f(D,{class:H.btn,round:!0,type:"primary",onClick:function(){return l()}},{default:function(){return[T("下一步 ("),n.step+1,T("/"),n.steps.length,T(")")]}})])])}))])])]}})}}});e("default",u({name:"knowledge-ligrary",setup:function(){var e=R(),n=V(),o=g(),i=I({cid:n.query.cid,list:[],activeNames:sessionStorage.getItem("knowledge-ligrary-key")?Number(sessionStorage.getItem("knowledge-ligrary-key")):0,background:"transparent",color:"#fff"}),a=function(){var e=r(t().mark((function e(){var n,r;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,q.post("/edu-app/lessonCourseware/queryStudentLessonDetail",{requestType:"form",data:{lessonCoursewareId:i.cid}});case 3:n=e.sent,r=n.data,i.list=r,o.value=!0,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),l=function(e){return e%3==1?de:e%3==2?pe:e%3==0?ve:void 0},u=function(){var n=r(t().mark((function n(r){var o;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,q.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:i.cid}});case 3:if(o=t.sent,o.data){t.next=8;break}return setTimeout((function(){z("暂无题目")}),100),t.abrupt("return");case 8:"TEST"===r?e.push({path:"/examination-mode",query:{lessonCoursewareId:i.cid}}):e.push({path:"/practice-mode",query:{lessonCoursewareId:i.cid}}),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),n,null,[[0,11]])})));return function(e){return n.apply(this,arguments)}}();return P((function(){K(document,"scroll",(function(){M().y.value>52?(i.background="#fff",i.color="#323333"):(i.background="transparent",i.color="#fff")})),a()})),function(){var t,n;return f("div",{class:J.knowledgeLibrary},[f(F,{position:"top"},{default:function(){return[f(G,{border:!1,background:i.background,color:i.color},{right:function(){return f("div",{class:[J.wroingBtn],onClick:function(){return e.push("/wroing-book")}},[f("i",{class:J.iconWroing},null),T("错题本")])}})]}}),f("div",{class:J.btnGroup},[f("div",{id:"knowledge-0",class:J.btnPractice,onClick:function(){return u("PRACTICE")}},null),f("div",{id:"knowledge-1",class:J.btnTest,onClick:function(){return u("TEST")}},null)]),f("div",{class:[J.containerSection,J.librarySection]},[f(oe,{modelValue:i.activeNames,"onUpdate:modelValue":function(e){return i.activeNames=e},accordion:!0,border:!1,onChange:function(e){sessionStorage.setItem("knowledge-ligrary-key",e)}},(n=t=i.list.map((function(t,n){return f(fe,{title:t.lessonCoursewareDetailName,name:n,value:i.activeNames===n?"收起":"展开",border:!1},{default:function(){return[t.knowledgeDetails&&t.knowledgeDetails.map((function(t,n){return f("div",{class:J.unitItem,onClick:function(){return e.push({path:"/unit-detail",query:{detailId:t.lessonCoursewareKnowledgeDetailId}})}},[f(W,L({id:0==n?"knowledge-2":""},{class:J.unitImg,lazyLoad:!0,src:l(n)}),null),f("p",{class:J.name},[f("span",null,[t.name])])])})),t.knowledgeDetails&&t.knowledgeDetails.length<=0&&f(B,{description:"暂无章节"},null)]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!U(n)?t:{default:function(){return[t]}}))]),o.value&&f(ye,null,null)])}}}))}}}))}();