drill.init(async(e,a)=>{let{target:t,data:r}=a,i=50,[n,d,o]=await e("util/viewUtil","util/cacheUtil","common/data");const l=(e,a)=>{let t={},r=a["background-image"];r&&(t["background-image"]=`url(${r})`),["background-color","background-repeat","background-size","background-position"].forEach(e=>{a[e]&&(t[e]=a[e])}),e.css(t)};let c,s=$(".mainLoading");s=s.length?s.html():'\n        <div class="loading_layer">\n            <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="rgba(200,200,200,.5)">\n                <g fill="none" fill-rule="evenodd">\n                    <g transform="translate(1 1)" stroke-width="2">\n                        <circle stroke-opacity=".5" cx="18" cy="18" r="18" />\n                        <path d="M36 18c0-9.94-8.06-18-18-18"></path>\n                    </g>\n                </g>\n            </svg>\n        </div>\n        ',Array.from(r.mainPage).forEach((e,a)=>{let r=$(`\n        <div class="page">\n            ${s}\n        </div>\n        `);l(r,e),r.prop("pageData",e),e.startLoad=(async()=>{if(e.loaded)return e.loaded;o.trigger("pageStartLoad",{page:r,pageId:a}),e.loaded=2;let t=[];return Array.from(e).forEach(e=>{"pic"==e.tag&&t.push(e.picUrl),e["background-image"]&&t.push(e["background-image"])}),await d.cacheImg(t),((e,a)=>{Array.from(a).forEach(a=>{let t=i++;a.outerId=t;let r=$(`\n            <div class="p_ele_outer" style="opacity:0;" ver="${a.ver}" hor="${a.hor}" outer-id="${t}">\n                <div class="p_ele"></div>\n            </div>`);setTimeout(()=>{r.css("opacity","")},50),r.prop("eleData",a);let n=r.find(".p_ele");switch(n.css("width",a.w),e.append(r),a.tag){case"text":n.addClass("p_text"),n.html(a.intext.replace(/\n/g,"<br>")),["fontWeight","fontStyle","color","lineHeight"].forEach(e=>{a[e]&&n.css(e,a[e])});break;case"pic":n.addClass("p_pic"),n.append(`<img src="${a.picUrl}" />`)}l(n,a)})})(r,e),r.find(".loading_layer").remove(),e.loaded=1,n.refreshView(r[0]),o.trigger("pageLoaded",{page:r,pageId:a}),e.checkPrevAndNext(),1}),e.checkPrevAndNext=(()=>{let e=r.prev(),a=r.next();e.length&&e[0].pageData.startLoad(),a.length&&a[0].pageData.startLoad()}),e.loaded=0,t.append(r),o.currentPageId==r.index()&&(r.addClass("eleFadeIn"),setTimeout(()=>{r.removeClass("eleFadeIn")},300))}),t.children().each((e,a)=>{n.refreshView(a)}),$(window).on("resize",e=>{clearTimeout(c),c=setTimeout(()=>{t.children().each((e,a)=>{n.refreshView(a)})},300)})});