"use strict";(self.webpackChunkapp_angular=self.webpackChunkapp_angular||[]).push([[2356],{42356:(yn,b,p)=>{p.r(b),p.d(b,{LessonModule:()=>qn});var g=p(96814),_=p(60095),t=p(73582),m=p(56958),s=p(15861),a=p(37649),n=p(46689),q=p(34414),D=p(71002);function E(i,r){1&i&&(n.TgZ(0,"ion-list")(1,"ion-item",28),n._UZ(2,"ion-icon",29),n.TgZ(3,"ion-text"),n._uU(4,"\u626b\u4e00\u626b"),n.qZA()(),n.TgZ(5,"ion-item",28),n._UZ(6,"ion-icon",30),n.TgZ(7,"ion-text"),n._uU(8,"\u5206\u4eab"),n.qZA()(),n.TgZ(9,"ion-item",28),n._UZ(10,"ion-icon",31),n.TgZ(11,"ion-text"),n._uU(12,"\u5ba2\u670d"),n.qZA()(),n.TgZ(13,"ion-item",28),n._UZ(14,"ion-icon",32),n.TgZ(15,"ion-text"),n._uU(16,"\u8bbe\u7f6e"),n.qZA()()()),2&i&&(n.xp6(1),n.Q6J("button",!0),n.xp6(4),n.Q6J("button",!0),n.xp6(4),n.Q6J("button",!0),n.xp6(4),n.Q6J("button",!0))}function B(i,r){1&i&&(n.TgZ(0,"ion-button",33),n._uU(1,"\u767b\u5f55"),n.qZA())}function y(i,r){if(1&i){const u=n.EpF();n.TgZ(0,"ion-button",34),n.NdJ("click",function(){n.CHM(u);const o=n.oxw();return n.KtG(o.logout())}),n._uU(1,"\u767b\u51fa"),n.qZA()}}function v(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-item")(2,"ion-thumbnail",0),n._UZ(3,"img",37),n.qZA(),n.TgZ(4,"ion-label")(5,"h2"),n._uU(6),n.qZA(),n.TgZ(7,"p"),n._uU(8),n.qZA(),n.TgZ(9,"ion-note",9),n._uU(10),n.ALo(11,"date"),n.qZA()()(),n.BQk()),2&i){const u=r.$implicit;n.xp6(3),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.Oqu(null==u?null:u.get("title")),n.xp6(2),n.Oqu(null==u?null:u.get("content")),n.xp6(2),n.Oqu(n.xi3(11,4,null==u?null:u.get("createdAt"),"YYYY/MM/dd"))}}function k(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-list",35),n.YNc(2,v,12,7,"ng-container",36),n.qZA(),n.BQk()),2&i){const u=n.oxw();n.xp6(1),n.Q6J("inset",!0),n.xp6(1),n.Q6J("ngForOf",u.myRecommendList)}}function P(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-col",38)(2,"ion-card",39),n._UZ(3,"img",40),n.TgZ(4,"ion-card-header")(5,"ion-card-title"),n._uU(6),n.qZA(),n.TgZ(7,"ion-card-subtitle"),n._uU(8),n.ALo(9,"date"),n.qZA()()()(),n.BQk()),2&i){const u=r.$implicit;n.xp6(3),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.hij(" ",null==u?null:u.get("name")," "),n.xp6(2),n.Oqu(n.xi3(9,3,null==u?null:u.get("createdAt"),"YYYY/MM/dd"))}}function M(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row"),n.YNc(3,P,10,6,"ng-container",36),n.qZA()(),n.BQk()),2&i){const u=n.oxw();n.xp6(3),n.Q6J("ngForOf",u.myAttentionList)}}function O(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-card"),n._UZ(2,"img",41),n.TgZ(3,"ion-card-header")(4,"ion-card-title"),n._uU(5),n.qZA(),n.TgZ(6,"ion-card-subtitle"),n._uU(7),n.ALo(8,"date"),n.qZA(),n.TgZ(9,"div",42)(10,"ion-buttons",0)(11,"ion-button"),n._UZ(12,"ion-icon",43),n.TgZ(13,"ion-note"),n._uU(14),n.qZA()(),n.TgZ(15,"ion-button"),n._UZ(16,"ion-icon",44),n.TgZ(17,"ion-note"),n._uU(18),n.qZA()()()()(),n.TgZ(19,"ion-card-content")(20,"p",45),n._uU(21),n.qZA()()(),n.BQk()),2&i){const u=r.$implicit;n.xp6(2),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.Oqu(null==u?null:u.get("name")),n.xp6(2),n.Oqu(n.xi3(8,6,null==u?null:u.get("createdAt"),"YYYY/MM/dd/HH:mm")),n.xp6(7),n.Oqu(null==u?null:u.get("see")),n.xp6(4),n.Oqu(null==u?null:u.get("like")),n.xp6(3),n.Oqu(null==u?null:u.get("content"))}}function w(i,r){if(1&i&&(n.ynx(0),n.YNc(1,O,22,9,"ng-container",36),n.BQk()),2&i){const u=n.oxw();n.xp6(1),n.Q6J("ngForOf",u.myScienceList)}}let J=(()=>{var i;class r{constructor(e,o){this.toastCtrl=e,this.userServ=o,this.cate="\u5173\u6ce8",this.myRecommendList=[],this.myAttentionList=[],this.myScienceList=[],this.currentUser=a.User.current()}ngOnInit(){var e=this;return(0,s.Z)(function*(){e.refresh()})()}refresh(){var e=this;return(0,s.Z)(function*(){e.myAttentionList=yield e.gteAttentionData(),e.myScienceList=yield e.getScienceData(),e.myRecommendList=yield e.getRecommendDate()})()}getRecommendDate(){return(0,s.Z)(function*(){let e=new a.Query("PetRecommend");return e.equalTo("user",a.User.current()?.toPointer()),e.include("user"),yield e.find()})()}gteAttentionData(){return(0,s.Z)(function*(){let e=new a.Query("PetAttention");return e.equalTo("user",a.User.current()?.toPointer()),e.include("user"),yield e.find()})()}getScienceData(){return(0,s.Z)(function*(){let e=new a.Query("PetScience");return e.equalTo("user",a.User.current()?.toPointer()),e.include("user"),yield e.find()})()}logout(){var e=this;return(0,s.Z)(function*(){yield a.User.logOut(),e.currentUser=void 0,(yield e.toastCtrl.create({message:"\u767b\u51fa\u6210\u529f",position:"top",duration:500})).present()})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(q.yF),n.Y36(D.K))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-me"]],decls:68,vars:12,consts:[["slot","end"],["routerLink","/user/info"],["slot","start","name","create-outline"],["id","myMenu"],["name","menu-outline"],["trigger","myMenu","triggerAction","click"],["color","light"],[3,"inset"],["lines","full"],["slot","start"],["alt","\u5934\u50cf","src","https://ionicframework.com/docs/img/demos/avatar.svg"],["name","heart-outline"],["lines","none"],["color","medium"],[1,"myList"],["button","","detail","true","routerLink","/lesson/me/userFollow"],["button","","detail","true","routerLink","/lesson/me/userTag"],["button","","detail","true","routerLink","/lesson/me/userCollection"],["expand","block","routerLink","/user/login",4,"ngIf"],["fill","clear","expand","block",3,"click",4,"ngIf"],["value","\u5173\u6ce8"],["value","\u63a8\u8350",3,"click"],["name","bookmarks-outline"],["value","\u5173\u6ce8",3,"click"],["name","heart-circle-outline"],["value","\u79d1\u666e",3,"click"],["name","pricetag-outline"],[4,"ngIf"],[3,"button"],["name","scan-outline","size","small"],["name","share-social-outline","size","small"],["name","pulse-outline","size","small"],["name","settings-outline","size","small"],["expand","block","routerLink","/user/login"],["fill","clear","expand","block",3,"click"],["lines","inset",3,"inset"],[4,"ngFor","ngForOf"],["alt","\u63a8\u8350\u56fe",3,"src"],["size","6"],[1,"roleCard"],["alt","\u5173\u6ce8\u56fe",3,"src"],["alt","\u79d1\u666e\u56fe",3,"src"],[1,"metadata-end-wrapper-science"],["name","eye-outline","size","small"],["name","heart-outline","size","small"],[1,"foodContent"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-title"),n._uU(3,"\u6211\u7684"),n.qZA(),n.TgZ(4,"ion-buttons",0)(5,"ion-button",1),n._UZ(6,"ion-icon",2),n.qZA(),n.TgZ(7,"ion-button",3),n._UZ(8,"ion-icon",4),n.qZA(),n.TgZ(9,"ion-popover",5),n.YNc(10,E,17,4,"ng-template"),n.qZA()()()(),n.TgZ(11,"ion-content",6)(12,"ion-card")(13,"ion-list",7)(14,"ion-item",8)(15,"ion-avatar",9),n._UZ(16,"img",10),n.qZA(),n.TgZ(17,"ion-label"),n._uU(18),n.qZA(),n.TgZ(19,"ion-buttons",0)(20,"ion-button"),n._UZ(21,"ion-icon",11),n.TgZ(22,"ion-note"),n._uU(23),n.qZA()()()(),n.TgZ(24,"ion-item",12)(25,"ion-badge",9),n._uU(26),n.qZA()(),n.TgZ(27,"ion-item",12)(28,"ion-label",13),n._uU(29),n.qZA()()()(),n.TgZ(30,"ion-card",14)(31,"ion-list",7)(32,"ion-item",15)(33,"ion-label")(34,"ion-note"),n._uU(35,"\u5173\u6ce8"),n.qZA()()(),n.TgZ(36,"ion-item",16)(37,"ion-label")(38,"ion-note"),n._uU(39,"\u7b49\u7ea7"),n.qZA()()(),n.TgZ(40,"ion-item",17)(41,"ion-label")(42,"ion-note"),n._uU(43,"\u5ba0\u7269\u6863\u6848"),n.qZA()()()()(),n.TgZ(44,"ion-list",7),n.YNc(45,B,2,0,"ion-button",18),n.YNc(46,y,2,0,"ion-button",19),n.qZA(),n.TgZ(47,"ion-card")(48,"ion-toolbar")(49,"ion-segment",20)(50,"ion-segment-button",21),n.NdJ("click",function(){return o.cate="\u63a8\u8350"}),n._UZ(51,"ion-icon",22),n.TgZ(52,"ion-label"),n._uU(53,"\u6d4f\u89c8\u8bb0\u5f55"),n.qZA()(),n.TgZ(54,"ion-segment-button",23),n.NdJ("click",function(){return o.cate="\u5173\u6ce8"}),n._UZ(55,"ion-icon",24),n.TgZ(56,"ion-label"),n._uU(57,"\u8d5e\u8fc7"),n.qZA()(),n.TgZ(58,"ion-segment-button",25),n.NdJ("click",function(){return o.cate="\u79d1\u666e"}),n._UZ(59,"ion-icon",26),n.TgZ(60,"ion-label"),n._uU(61,"\u7b14\u8bb0"),n.qZA()()(),n.TgZ(62,"ion-buttons",0)(63,"ion-button"),n._uU(64,"\u7f16\u8f91"),n.qZA()()()(),n.YNc(65,k,3,2,"ng-container",27),n.YNc(66,M,4,1,"ng-container",27),n.YNc(67,w,2,1,"ng-container",27),n.qZA()),2&e&&(n.xp6(13),n.Q6J("inset",!0),n.xp6(5),n.hij(" ",(null==o.currentUser?null:o.currentUser.get("name"))||"\u6635\u79f0"," "),n.xp6(5),n.Oqu((null==o.currentUser?null:o.currentUser.get("like"))||"99"),n.xp6(3),n.Oqu((null==o.currentUser?null:o.currentUser.get("tag"))||"\u6807\u7b7e"),n.xp6(3),n.hij(" ",(null==o.currentUser?null:o.currentUser.get("desc"))||"\u4ecb\u7ecd\u4e00\u4e0b\u81ea\u5df1\u5427"," "),n.xp6(2),n.Q6J("inset",!0),n.xp6(13),n.Q6J("inset",!0),n.xp6(1),n.Q6J("ngIf",!(null!=o.currentUser&&o.currentUser.id)),n.xp6(1),n.Q6J("ngIf",null==o.currentUser?null:o.currentUser.id),n.xp6(19),n.Q6J("ngIf","\u63a8\u8350"==o.cate),n.xp6(1),n.Q6J("ngIf","\u5173\u6ce8"==o.cate),n.xp6(1),n.Q6J("ngIf","\u79d1\u666e"==o.cate))},dependencies:[g.sg,g.O5,m.rH,t.BJ,t.yp,t.YG,t.Sm,t.PM,t.FN,t.Zi,t.tO,t.Dq,t.wI,t.W2,t.jY,t.Gu,t.gu,t.Ie,t.Q$,t.q_,t.uN,t.Nd,t.cJ,t.GO,t.yW,t.Bs,t.wd,t.sr,t.d8,t.QI,t.YI,g.uU],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}ion-item[_ngcontent-%COMP%]{font-size:.9rem}ion-item[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:9px}.foodContent[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.myList[_ngcontent-%COMP%]{padding:0%}.myList[_ngcontent-%COMP%] ion-list[_ngcontent-%COMP%]{margin:0%}.roleCard[_ngcontent-%COMP%]{margin:0}.metadata-end-wrapper[_ngcontent-%COMP%]{position:absolute;bottom:0;inset-inline-end:6px;font-size:.6rem;display:flex;align-items:center}.metadata-end-wrapper-science[_ngcontent-%COMP%]{position:absolute;top:0;inset-inline-end:0px;font-size:.6rem;display:flex;align-items:center}"]}),r})();function L(i,r){if(1&i){const u=n.EpF();n.ynx(0),n.TgZ(1,"ion-col",11)(2,"ion-card",12),n.NdJ("click",function(){const l=n.CHM(u).$implicit,c=n.oxw(2);return n.KtG(c.goRecommendDetail(l))}),n._UZ(3,"img",13),n.TgZ(4,"ion-card-header")(5,"ion-card-title"),n._uU(6),n.qZA(),n.TgZ(7,"ion-card-subtitle",14),n._uU(8),n.qZA()(),n.TgZ(9,"div",15)(10,"ion-button",16),n._UZ(11,"ion-icon",17),n._uU(12),n.qZA()()()(),n.BQk()}if(2&i){const u=r.$implicit;let e;n.xp6(3),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.hij(" ",null==u?null:u.get("name")," "),n.xp6(2),n.hij(" \u4f5c\u8005\uff1a",(null==u||null==(e=u.get("user"))?null:e.get("name"))||"\u65e0\u540d"," "),n.xp6(4),n.hij(" ",null==u?null:u.get("like")," ")}}function Q(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row"),n.YNc(3,L,13,4,"ng-container",10),n.qZA()(),n.BQk()),2&i){const u=n.oxw();n.xp6(3),n.Q6J("ngForOf",u.recommendList)}}function I(i,r){if(1&i){const u=n.EpF();n.ynx(0),n.TgZ(1,"ion-col",11)(2,"ion-card",12),n.NdJ("click",function(){const l=n.CHM(u).$implicit,c=n.oxw(2);return n.KtG(c.goAttentionDetail(l))}),n._UZ(3,"img",18),n.TgZ(4,"ion-card-header")(5,"ion-card-title"),n._uU(6),n.qZA(),n.TgZ(7,"ion-card-subtitle",14),n._uU(8),n.qZA()(),n.TgZ(9,"div",15)(10,"ion-button",16),n._UZ(11,"ion-icon",17),n._uU(12),n.qZA()()()(),n.BQk()}if(2&i){const u=r.$implicit;let e;n.xp6(3),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.hij(" ",null==u?null:u.get("name")," "),n.xp6(2),n.hij(" \u4f5c\u8005\uff1a",(null==u||null==(e=u.get("user"))?null:e.get("name"))||"\u65e0\u540d"," "),n.xp6(4),n.hij(" ",null==u?null:u.get("like")," ")}}function N(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-grid")(2,"ion-row"),n.YNc(3,I,13,4,"ng-container",10),n.qZA()(),n.BQk()),2&i){const u=n.oxw();n.xp6(3),n.Q6J("ngForOf",u.attentionList)}}function Y(i,r){if(1&i){const u=n.EpF();n.ynx(0),n.TgZ(1,"ion-card",19),n.NdJ("click",function(){const l=n.CHM(u).$implicit,c=n.oxw(2);return n.KtG(c.goScienceDetail(l))}),n._UZ(2,"img",20),n.TgZ(3,"ion-card-header")(4,"ion-card-title"),n._uU(5),n.qZA(),n.TgZ(6,"ion-card-subtitle"),n._uU(7),n.ALo(8,"date"),n.qZA(),n.TgZ(9,"div",15)(10,"ion-button",21),n._UZ(11,"ion-icon",22),n.TgZ(12,"ion-note"),n._uU(13),n.qZA()(),n.TgZ(14,"ion-button",23),n._UZ(15,"ion-icon",17),n.TgZ(16,"ion-note"),n._uU(17),n.qZA()()()(),n.TgZ(18,"ion-card-content")(19,"p",24),n._uU(20),n.qZA()()(),n.BQk()}if(2&i){const u=r.$implicit;n.xp6(2),n.Q6J("src",null==u?null:u.get("img"),n.LSH),n.xp6(3),n.Oqu(null==u?null:u.get("name")),n.xp6(2),n.Oqu(n.xi3(8,6,null==u?null:u.get("createdAt"),"YYYY/MM/dd")),n.xp6(6),n.Oqu(null==u?null:u.get("see")),n.xp6(4),n.Oqu(null==u?null:u.get("like")),n.xp6(3),n.Oqu(null==u?null:u.get("content"))}}function S(i,r){if(1&i&&(n.ynx(0),n.YNc(1,Y,21,9,"ng-container",10),n.BQk()),2&i){const u=n.oxw();n.xp6(1),n.Q6J("ngForOf",u.scienceList)}}a.serverURL="http://metapunk.cn:9999/parse",a.initialize("dev");let z=(()=>{var i;class r{constructor(e){this.router=e,this.scienceList=[],this.recommendList=[],this.attentionList=[],this.cate="\u63a8\u8350",this.initPage()}initPage(){var e=this;return(0,s.Z)(function*(){e.scienceList=yield e.getScienceData(),e.recommendList=yield e.gteRecommendData(),e.attentionList=yield e.gteAttentionData()})()}getScienceData(){return(0,s.Z)(function*(){return yield new a.Query("PetScience").find()})()}gteRecommendData(){return(0,s.Z)(function*(){return yield new a.Query("PetRecommend").find()})()}gteAttentionData(){return(0,s.Z)(function*(){return yield new a.Query("PetAttention").find()})()}goScienceDetail(e){this.router.navigate(["/lesson/community/scienceDetail"],{queryParams:e})}goRecommendDetail(e){this.router.navigate(["/lesson/community/recommendDetail"],{queryParams:e})}goAttentionDetail(e){this.router.navigate(["/lesson/community/attentionDetail"],{queryParams:e})}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.F0))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-community"]],decls:23,vars:3,consts:[["name","compass-outline","size","large","color","dark"],["slot","end","fill","clear","size","small","routerLink","share"],["name","add-circle-outline","size","large","color","dark"],["color","light"],[1,"navbar"],["value","\u63a8\u8350"],["value","\u63a8\u8350",3,"click"],["value","\u5173\u6ce8",3,"click"],["value","\u79d1\u666e",3,"click"],[4,"ngIf"],[4,"ngFor","ngForOf"],["size","6"],[1,"roleCard",3,"click"],["alt","\u63a8\u8350\u56fe",3,"src"],[2,"font-size","0.7rem"],[1,"metadata-end-wrapper"],["shape","round","size","small","color","danger"],["name","heart-outline","size","small"],["alt","\u5173\u6ce8\u56fe",3,"src"],[3,"click"],["alt","\u79d1\u666e\u56fe",3,"src"],["fill","clear","color","dark","size","small",1,"see"],["name","eye-outline","size","small"],["fill","clear","color","dark","size","small",1,"like"],[1,"foodContent"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar"),n._UZ(2,"ion-icon",0),n.TgZ(3,"ion-button",1),n._UZ(4,"ion-icon",2),n.TgZ(5,"ion-note"),n._uU(6,"\u53d1\u5e03"),n.qZA()()()(),n.TgZ(7,"ion-content",3)(8,"ion-card",4)(9,"ion-toolbar")(10,"ion-segment",5)(11,"ion-segment-button",6),n.NdJ("click",function(){return o.cate="\u63a8\u8350"}),n.TgZ(12,"ion-label"),n._uU(13,"\u63a8\u8350"),n.qZA()(),n.TgZ(14,"ion-segment-button",7),n.NdJ("click",function(){return o.cate="\u5173\u6ce8"}),n.TgZ(15,"ion-label"),n._uU(16,"\u5173\u6ce8"),n.qZA()(),n.TgZ(17,"ion-segment-button",8),n.NdJ("click",function(){return o.cate="\u79d1\u666e"}),n.TgZ(18,"ion-label"),n._uU(19,"\u79d1\u666e"),n.qZA()()()()(),n.YNc(20,Q,4,1,"ng-container",9),n.YNc(21,N,4,1,"ng-container",9),n.YNc(22,S,2,1,"ng-container",9),n.qZA()),2&e&&(n.xp6(20),n.Q6J("ngIf","\u63a8\u8350"==o.cate),n.xp6(1),n.Q6J("ngIf","\u5173\u6ce8"==o.cate),n.xp6(1),n.Q6J("ngIf","\u79d1\u666e"==o.cate))},dependencies:[g.sg,g.O5,m.rH,t.YG,t.PM,t.FN,t.Zi,t.tO,t.Dq,t.wI,t.W2,t.jY,t.Gu,t.gu,t.Q$,t.uN,t.Nd,t.cJ,t.GO,t.sr,t.QI,t.YI,g.uU],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}.foodContent[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.roleCard[_ngcontent-%COMP%]{margin:0}.metadata-end-wrapper[_ngcontent-%COMP%]{position:absolute;top:3px;inset-inline-end:3px;font-size:.6rem;display:flex;align-items:center}"]}),r})();function H(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-item",11)(2,"ion-label")(3,"p",12),n._uU(4,"\u7528\u6237\u6635\u79f0"),n.qZA(),n.TgZ(5,"ion-note",13),n._uU(6),n.qZA()(),n.TgZ(7,"div",14)(8,"ion-note",15),n._uU(9),n.ALo(10,"date"),n.qZA()()(),n.BQk()),2&i){const u=r.$implicit,e=n.oxw();n.xp6(6),n.Oqu(u),n.xp6(3),n.Oqu(n.xi3(10,2,e.currentDate,"HH:mm"))}}a.serverURL="http://metapunk.cn:9999/parse",a.initialize("dev");let G=(()=>{var i;class r{addComment(){console.log(this.comment),""!==this.comment.trim()&&(this.comments.push(this.comment),this.comment="")}constructor(e){this.route=e,this.comments=[],this.comment="",this.currentDate=new Date,this.route.queryParams.subscribe(o=>{this.getFoodInfoById(o.id)})}getFoodInfoById(e){var o=this;return(0,s.Z)(function*(){let l=new a.Query("PetScience");o.science=yield l.get(e)})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.gz))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-science-detail"]],decls:69,vars:13,consts:[["slot","start"],["routerLink","/lesson/community","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["slot","end"],["fill","clear","color","dark"],["color","light"],["alt","\u79d1\u666e\u56fe",3,"src"],[3,"inset"],["label","\u7559\u4e0b\u4f60\u7684\u60f3\u6cd5\u5427","labelPlacement","floating","rows","5",3,"ngModel","ngModelChange"],["color","medium","fill","outline","shape","round",3,"click"],[4,"ngFor","ngForOf"],[1,"comment-list"],[1,"commentator"],[1,"comment-content"],[1,"comment-time"],["color","medium"]],template:function(e,o){if(1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n._uU(5,"\u8fd4\u56de"),n.qZA()(),n.TgZ(6,"ion-buttons",3)(7,"ion-button",4),n._uU(8," \u6536\u85cf"),n.qZA()()()(),n.TgZ(9,"ion-content",5)(10,"ion-card"),n._UZ(11,"img",6),n.TgZ(12,"ion-card-header")(13,"ion-card-title"),n._uU(14),n.qZA(),n.TgZ(15,"ion-card-subtitle"),n._uU(16),n.qZA(),n.TgZ(17,"ion-card-subtitle"),n._uU(18),n.qZA(),n.TgZ(19,"ion-card-subtitle"),n._uU(20),n.ALo(21,"date"),n.qZA()(),n.TgZ(22,"ion-card-content"),n._uU(23),n.qZA()(),n.TgZ(24,"ion-list",7)(25,"ion-item")(26,"ion-textarea",8),n.NdJ("ngModelChange",function(c){return o.comment=c}),n.qZA()(),n.TgZ(27,"ion-item")(28,"ion-buttons",3)(29,"ion-button",9),n.NdJ("click",function(){return o.addComment()}),n._uU(30,"\u786e\u5b9a"),n.qZA()()()(),n.TgZ(31,"ion-list",7),n.YNc(32,H,11,5,"ng-container",10),n.TgZ(33,"ion-item",11)(34,"ion-label")(35,"p",12),n._uU(36,"\u5c0f\u61d2\u732b"),n.qZA(),n.TgZ(37,"ion-note",13),n._uU(38,"\u8fd9\u4e2a\u79d1\u666e\u592a\u53ca\u65f6\u5566\uff0c\u5bf9\u6211\u5f88\u6709\u5e2e\u52a9O.O"),n.qZA()(),n.TgZ(39,"div",14)(40,"ion-note",15),n._uU(41,"06:11"),n.qZA()()(),n.TgZ(42,"ion-item",11)(43,"ion-label")(44,"p",12),n._uU(45,"\u7ef5\u7ef5\u51b0"),n.qZA(),n.TgZ(46,"ion-note",13),n._uU(47," \u2665\u2665\u2665\u2665\u2665\u2665"),n.qZA()(),n.TgZ(48,"div",14)(49,"ion-note",15),n._uU(50,"03:44"),n.qZA()()(),n.TgZ(51,"ion-item",11)(52,"ion-label")(53,"p",12),n._uU(54,"Sunrise"),n.qZA(),n.TgZ(55,"ion-note",13),n._uU(56,"\u8fd9\u4efd\u653b\u7565\u9002\u5408\u65b0\u624b\u517b\u5ba0\uff01\uff01"),n.qZA()(),n.TgZ(57,"div",14)(58,"ion-note",15),n._uU(59,"Yesterday"),n.qZA()()(),n.TgZ(60,"ion-item",11)(61,"ion-label")(62,"p",12),n._uU(63,"\u4e0d\u5403\u9999\u83dc"),n.qZA(),n.TgZ(64,"ion-note",13),n._uU(65,"\u5f88\u4e0d\u9519\uff0c\u6c42\u63a8\u8350\u9a71\u866b\u836f\uff01\uff01"),n.qZA()(),n.TgZ(66,"div",14)(67,"ion-note",15),n._uU(68,"Yesterday"),n.qZA()()()()()),2&e){let l;n.xp6(11),n.Q6J("src",null==o.science?null:o.science.get("img"),n.LSH),n.xp6(3),n.Oqu(null==o.science?null:o.science.get("name")),n.xp6(2),n.hij("\u4f5c\u8005\uff1a",(null==o.science||null==(l=o.science.get("user"))?null:l.get("name"))||"\u7231\u5ba0\u4e4b\u5bb6FavorPet",""),n.xp6(2),n.Oqu((null==o.science?null:o.science.get("type"))||"\u79d1\u666e\u7c7b\u522b"),n.xp6(2),n.Oqu(n.xi3(21,10,null==o.science?null:o.science.get("createdAt"),"YYYY/MM/dd/HH:mm")),n.xp6(3),n.hij(" ",null==o.science?null:o.science.get("content")," "),n.xp6(1),n.Q6J("inset",!0),n.xp6(2),n.Q6J("ngModel",o.comment),n.xp6(5),n.Q6J("inset",!0),n.xp6(1),n.Q6J("ngForOf",o.comments)}},dependencies:[g.sg,m.rH,_.JJ,_.On,t.YG,t.Sm,t.PM,t.FN,t.Zi,t.tO,t.Dq,t.W2,t.Gu,t.gu,t.Ie,t.Q$,t.q_,t.uN,t.g2,t.sr,t.j9,t.YI,g.uU],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}.commentator[_ngcontent-%COMP%]{font-size:.7rem}.comment-time[_ngcontent-%COMP%]{position:absolute;bottom:0;inset-inline-end:10px;font-size:.4rem;z-index:100;display:flex;align-items:center}"]}),r})();function j(i,r){1&i&&(n.ynx(0),n.TgZ(1,"ion-list",9)(2,"ion-item",10),n._UZ(3,"ion-icon",11),n._uU(4,"\u6dfb\u52a0\u5c01\u9762 "),n.qZA(),n.TgZ(5,"ion-item",12),n._UZ(6,"ion-input",13),n.qZA(),n.TgZ(7,"ion-item",12),n._UZ(8,"ion-textarea",14),n.qZA(),n.TgZ(9,"ion-item",10)(10,"ion-button",15),n._UZ(11,"ion-icon",16),n._uU(12,"\u6dfb\u52a0\u56fe\u7247"),n.qZA(),n.TgZ(13,"ion-button",15),n._UZ(14,"ion-icon",17),n._uU(15,"\u6dfb\u52a0\u89c6\u9891"),n.qZA(),n.TgZ(16,"ion-button",15),n._UZ(17,"ion-icon",18),n._uU(18,"\u9009\u62e9\u62cd\u6444"),n.qZA()(),n.TgZ(19,"ion-item",12)(20,"ion-label",19),n._uU(21," \u53c2\u4e0e\u8bdd\u9898\uff1a "),n.TgZ(22,"ion-note",20),n._uU(23,"#\u517b\u732b\u65e5\u5e38"),n.qZA(),n.TgZ(24,"ion-note",21),n._uU(25,"#\u5c0f\u72d7\u65e5\u5e38"),n.qZA(),n._uU(26,"... "),n.TgZ(27,"ion-note",22),n._uU(28,"\u66f4\u591a"),n.qZA()()(),n.TgZ(29,"ion-item")(30,"ion-buttons",23)(31,"ion-button",24),n._uU(32," \u786e\u8ba4\u53d1\u5e03 "),n.qZA()()()(),n.BQk()),2&i&&(n.xp6(1),n.Q6J("inset",!0),n.xp6(5),n.Q6J("counter",!0),n.xp6(2),n.Q6J("counter",!0))}function R(i,r){1&i&&(n.ynx(0),n.TgZ(1,"ion-list",9)(2,"ion-item",10),n._UZ(3,"ion-icon",11),n._uU(4,"\u6dfb\u52a0\u5c01\u9762 "),n.qZA(),n.TgZ(5,"ion-item",12),n._UZ(6,"ion-input",25),n.qZA(),n.TgZ(7,"ion-item",12)(8,"ion-select",26)(9,"ion-select-option",27),n._uU(10,"\u5c0f\u72d7\u{1f415}-\u65e5\u8bb0"),n.qZA(),n.TgZ(11,"ion-select-option",28),n._uU(12,"\u5c0f\u732b\u{1f431}-\u65e5\u5e38"),n.qZA()()(),n.TgZ(13,"ion-item",12),n._UZ(14,"ion-textarea",29),n.qZA(),n.TgZ(15,"ion-item",10)(16,"ion-button",15),n._UZ(17,"ion-icon",16),n._uU(18,"\u66f4\u591a\u56fe\u7247"),n.qZA()(),n.TgZ(19,"ion-item",12)(20,"ion-label",19),n._uU(21," \u53c2\u4e0e\u8bdd\u9898\uff1a "),n.TgZ(22,"ion-note",20),n._uU(23,"#\u54c8\u57fa\u7c73\u{1f436}"),n.qZA(),n.TgZ(24,"ion-note",20),n._uU(25,"#\u5438\u732b\u65e5\u8bb0"),n.qZA(),n._uU(26,"... "),n.TgZ(27,"ion-note",22),n._uU(28,"\u66f4\u591a"),n.qZA()()(),n.TgZ(29,"ion-item")(30,"ion-buttons",23)(31,"ion-button",24),n._uU(32," \u786e\u8ba4\u53d1\u5e03 "),n.qZA()()()(),n.BQk()),2&i&&(n.xp6(1),n.Q6J("inset",!0))}function $(i,r){1&i&&(n.ynx(0),n.TgZ(1,"ion-list",9)(2,"ion-item",10),n._UZ(3,"ion-icon",11),n._uU(4,"\u6dfb\u52a0\u5c01\u9762 "),n.qZA(),n.TgZ(5,"ion-item",12),n._UZ(6,"ion-input",30),n.qZA(),n.TgZ(7,"ion-item",12)(8,"ion-select",31)(9,"ion-select-option",32),n._uU(10,"\u56fe\u6587"),n.qZA(),n.TgZ(11,"ion-select-option",33),n._uU(12,"\u7279\u6548"),n.qZA()()(),n.TgZ(13,"ion-item",12),n._UZ(14,"ion-textarea",34),n.qZA(),n.TgZ(15,"ion-item",10)(16,"ion-button",15),n._UZ(17,"ion-icon",16),n._uU(18,"\u6dfb\u52a0\u56fe\u7247"),n.qZA(),n.TgZ(19,"ion-button",15),n._UZ(20,"ion-icon",17),n._uU(21,"\u6dfb\u52a0\u89c6\u9891"),n.qZA(),n.TgZ(22,"ion-button",15),n._UZ(23,"ion-icon",18),n._uU(24,"\u9009\u62e9\u62cd\u6444"),n.qZA()(),n.TgZ(25,"ion-item",12)(26,"ion-label",19),n._uU(27," \u53c2\u4e0e/\u6dfb\u52a0\u8bdd\u9898\uff1a "),n.TgZ(28,"ion-note",20),n._uU(29,"#\u5c0f\u732b\u65e5\u8bb0"),n.qZA(),n.TgZ(30,"ion-note",21),n._uU(31,"#\u72d7\u72d7\u65e5\u5e38"),n.qZA(),n._uU(32,"... "),n.TgZ(33,"ion-note",22),n._uU(34,"\u66f4\u591a"),n.qZA()()(),n.TgZ(35,"ion-item")(36,"ion-buttons",23)(37,"ion-button",24),n._uU(38," \u786e\u8ba4\u53d1\u5e03 "),n.qZA()()()(),n.BQk()),2&i&&(n.xp6(1),n.Q6J("inset",!0),n.xp6(13),n.Q6J("counter",!0))}let K=(()=>{var i;class r{constructor(){this.cate="\u63a8\u8350"}}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-share"]],decls:20,vars:3,consts:[["slot","start"],["routerLink","/lesson/community","fill","clear","color","dark"],["name","close-outline","size","large"],["color","light"],["value","\u63a8\u8350"],["value","\u63a8\u8350",3,"click"],["value","\u5173\u6ce8",3,"click"],["value","\u79d1\u666e",3,"click"],[4,"ngIf"],[3,"inset"],["lines","full"],["name","image-outline",2,"margin-right","3px"],["lines","none"],["placeholder","\u65e5\u5e38\u788e\u7247PLOG\u{1f4f8}","maxlength","30",3,"counter"],["placeholder","\u4e00\u952e\u5b9a\u683c\u7f8e\u597d\u77ac\u95f4","rows","9","maxlength","30000",3,"counter"],["fill","clear","color","dark",1,"viewUpload"],["name","image-outline"],["name","videocam-outline"],["name","camera-outline"],[2,"font-size","0.9rem"],["button","",1,"viewTopic"],[1,"viewTopic"],["button",""],["slot","end"],["routerLink","/lesson/community","fill","clear"],["placeholder","\u{1f4db}\u76f8\u518c\u53d6\u540d/\u6807\u9898","maxlength","5"],["label","\u5173\u6ce8\u7c7b\u578b","interface","popover"],["value","\u5c0f\u72d7"],["value","\u5c0f\u732b"],["placeholder","\u8bb0\u5f55\u7231\u5ba0\u65e5\u5e38","rows","9"],["placeholder","\u8bb0\u5f55\u7f8e\u597d\u{1f3f7}\ufe0f","maxlength","30"],["label","\u5c5e\u4e8e","interface","popover"],["value","\u56fe\u6587"],["value","\u7279\u6548"],["placeholder","2023\u5e74\u5173\u952e\u5e27\u{1f3ac}","rows","9","maxlength","3000",3,"counter"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n.qZA()()()(),n.TgZ(5,"ion-content",3)(6,"ion-toolbar")(7,"ion-segment",4)(8,"ion-segment-button",5),n.NdJ("click",function(){return o.cate="\u63a8\u8350"}),n.TgZ(9,"ion-label"),n._uU(10,"\u6b64\u523b\u{1f933}"),n.qZA()(),n.TgZ(11,"ion-segment-button",6),n.NdJ("click",function(){return o.cate="\u5173\u6ce8"}),n.TgZ(12,"ion-label"),n._uU(13,"\u76f8\u673a\u{1f4f8}"),n.qZA()(),n.TgZ(14,"ion-segment-button",7),n.NdJ("click",function(){return o.cate="\u79d1\u666e"}),n.TgZ(15,"ion-label"),n._uU(16,"\u6a21\u677f\u{1f50d}"),n.qZA()()()(),n.YNc(17,j,33,3,"ng-container",8),n.YNc(18,R,33,1,"ng-container",8),n.YNc(19,$,39,2,"ng-container",8),n.qZA()),2&e&&(n.xp6(17),n.Q6J("ngIf","\u63a8\u8350"==o.cate),n.xp6(1),n.Q6J("ngIf","\u5173\u6ce8"==o.cate),n.xp6(1),n.Q6J("ngIf","\u79d1\u666e"==o.cate))},dependencies:[g.O5,m.rH,t.YG,t.Sm,t.W2,t.Gu,t.gu,t.pK,t.Ie,t.Q$,t.q_,t.uN,t.cJ,t.GO,t.t9,t.n0,t.g2,t.sr,t.QI,t.j9,t.YI],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}ion-icon[_ngcontent-%COMP%]{margin-right:3px}.viewTopic[_ngcontent-%COMP%]{margin:5px;padding:3px;background-color:#a7a79c;border-radius:30%}"]}),r})();function W(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-item",11)(2,"ion-label")(3,"p",12),n._uU(4,"\u7528\u6237\u6635\u79f0"),n.qZA(),n.TgZ(5,"ion-note",13),n._uU(6),n.qZA()(),n.TgZ(7,"div",14)(8,"ion-note",15),n._uU(9),n.ALo(10,"date"),n.qZA()()(),n.BQk()),2&i){const u=r.$implicit,e=n.oxw();n.xp6(6),n.Oqu(u),n.xp6(3),n.Oqu(n.xi3(10,2,e.currentDate,"HH:mm"))}}a.serverURL="http://metapunk.cn:9999/parse",a.initialize("dev");let X=(()=>{var i;class r{addComment(){console.log(this.comment),""!==this.comment.trim()&&(this.comments.push(this.comment),this.comment="")}constructor(e){this.router=e,this.comments=[],this.comment="",this.currentDate=new Date,this.router.queryParams.subscribe(o=>{this.getRoleInfoById(o.id)})}getRoleInfoById(e){var o=this;return(0,s.Z)(function*(){let l=new a.Query("PetAttention");o.attention=yield l.get(e)})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.gz))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-attention-detail"]],decls:60,vars:13,consts:[["slot","start"],["routerLink","/lesson/community","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["slot","end"],["fill","clear","color","dark"],["color","light"],["alt","\u89d2\u8272\u56fe",3,"src"],[3,"inset"],["label","\u7559\u4e0b\u4f60\u7684\u60f3\u6cd5\u5427","labelPlacement","floating","rows","5",3,"ngModel","ngModelChange"],["color","medium","fill","outline","shape","round",3,"click"],[4,"ngFor","ngForOf"],[1,"comment-list"],[1,"commentator"],[1,"comment-content"],[1,"comment-time"],["color","medium"]],template:function(e,o){if(1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n._uU(5,"\u8fd4\u56de"),n.qZA()(),n.TgZ(6,"ion-buttons",3)(7,"ion-button",4),n._uU(8," \u6536\u85cf"),n.qZA()()()(),n.TgZ(9,"ion-content",5)(10,"ion-card"),n._UZ(11,"img",6),n.TgZ(12,"ion-card-header")(13,"ion-card-title"),n._uU(14),n.qZA(),n.TgZ(15,"ion-card-subtitle"),n._uU(16),n.qZA(),n.TgZ(17,"ion-card-subtitle"),n._uU(18),n.qZA(),n.TgZ(19,"ion-card-subtitle"),n._uU(20),n.ALo(21,"date"),n.qZA()(),n.TgZ(22,"ion-card-content"),n._uU(23),n.qZA()(),n.TgZ(24,"ion-list",7)(25,"ion-item")(26,"ion-textarea",8),n.NdJ("ngModelChange",function(c){return o.comment=c}),n.qZA()(),n.TgZ(27,"ion-item")(28,"ion-buttons",3)(29,"ion-button",9),n.NdJ("click",function(){return o.addComment()}),n._uU(30,"\u786e\u5b9a"),n.qZA()()()(),n.TgZ(31,"ion-list",7),n.YNc(32,W,11,5,"ng-container",10),n.TgZ(33,"ion-item",11)(34,"ion-label")(35,"p",12),n._uU(36,"momo"),n.qZA(),n.TgZ(37,"ion-note",13),n._uU(38,"\u6551\u547d\u8fd9\u4e5f\u592a\u53ef\u7231\u4e86\u5427\u554a\u554a \u2665"),n.qZA()(),n.TgZ(39,"div",14)(40,"ion-note",15),n._uU(41,"03:44"),n.qZA()()(),n.TgZ(42,"ion-item",11)(43,"ion-label")(44,"p",12),n._uU(45,"\u82cf\u683c\u62c9\u6ca1\u6709\u5e95"),n.qZA(),n.TgZ(46,"ion-note",13),n._uU(47,"\u6211\u4e5f\u60f3\u517b\u53ea\u54c8\u57fa\u7c73\uff0c\u611f\u89c9\u4f1a\u5f88\u6cbb\u6108\u5462\uff01"),n.qZA()(),n.TgZ(48,"div",14)(49,"ion-note",15),n._uU(50,"Yesterday"),n.qZA()()(),n.TgZ(51,"ion-item",11)(52,"ion-label")(53,"p",12),n._uU(54,"\u662fCC\u5440"),n.qZA(),n.TgZ(55,"ion-note",13),n._uU(56,"\u5b83\u559c\u6b22\u4ec0\u4e48\u989c\u8272\u7684\u9ebb\u888b\uff0c\u6211\u4eca\u665a\u5c31\u625b\u9ebb\u888b\u53bb\u5077=\u3002="),n.qZA()(),n.TgZ(57,"div",14)(58,"ion-note",15),n._uU(59,"Yesterday"),n.qZA()()()()()),2&e){let l;n.xp6(11),n.Q6J("src",null==o.attention?null:o.attention.get("img"),n.LSH),n.xp6(3),n.Oqu(null==o.attention?null:o.attention.get("name")),n.xp6(2),n.hij("\u4f5c\u8005\uff1a",(null==o.attention||null==(l=o.attention.get("user"))?null:l.get("name"))||"\u67d0\u67d0\u67d0",""),n.xp6(2),n.Oqu((null==o.attention?null:o.attention.get("type"))||""),n.xp6(2),n.Oqu(n.xi3(21,10,null==o.attention?null:o.attention.get("createdAt"),"YYYY/MM/dd/HH:mm")),n.xp6(3),n.hij(" ",(null==o.attention?null:o.attention.get("cueword"))||"#\u7231\u5ba0\u4e4b\u5bb6"," "),n.xp6(1),n.Q6J("inset",!0),n.xp6(2),n.Q6J("ngModel",o.comment),n.xp6(5),n.Q6J("inset",!0),n.xp6(1),n.Q6J("ngForOf",o.comments)}},dependencies:[g.sg,m.rH,_.JJ,_.On,t.YG,t.Sm,t.PM,t.FN,t.Zi,t.tO,t.Dq,t.W2,t.Gu,t.gu,t.Ie,t.Q$,t.q_,t.uN,t.g2,t.sr,t.j9,t.YI,g.uU],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}.commentator[_ngcontent-%COMP%]{font-size:.7rem}.comment-time[_ngcontent-%COMP%]{position:absolute;bottom:0;inset-inline-end:10px;font-size:.4rem;z-index:100;display:flex;align-items:center}"]}),r})();function V(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-item",14)(2,"ion-label")(3,"p",15),n._uU(4,"\u7528\u6237\u6635\u79f0"),n.qZA(),n.TgZ(5,"ion-note",16),n._uU(6),n.qZA()(),n.TgZ(7,"div",17)(8,"ion-note",18),n._uU(9),n.ALo(10,"date"),n.qZA()()(),n.BQk()),2&i){const u=r.$implicit,e=n.oxw();n.xp6(6),n.Oqu(u),n.xp6(3),n.Oqu(n.xi3(10,2,e.currentDate,"HH:mm"))}}a.serverURL="http://metapunk.cn:9999/parse",a.initialize("dev");let nn=(()=>{var i;class r{addComment(){console.log(this.comment),""!==this.comment.trim()&&(this.comments.push(this.comment),this.comment="")}constructor(e){this.route=e,this.comments=[],this.comment="",this.currentDate=new Date,this.route.queryParams.subscribe(o=>{this.getViewInfoById(o.id)})}getViewInfoById(e){var o=this;return(0,s.Z)(function*(){let l=new a.Query("PetRecommend");o.recommend=yield l.get(e)})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.gz))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-recommend-detail"]],decls:73,vars:13,consts:[["slot","start"],["routerLink","/lesson/community","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["slot","end"],["fill","clear","color","dark"],["color","light"],["alt","\u7f8e\u666f\u56fe",3,"src"],[1,"metadata-end-wrapper"],["fill","clear","color","dark","size","small",1,"see"],["name","eye-outline","size","small"],[3,"inset"],["label","\u7559\u4e0b\u4f60\u7684\u60f3\u6cd5\u5427","labelPlacement","floating","rows","5",3,"ngModel","ngModelChange"],["color","medium","fill","outline","shape","round",3,"click"],[4,"ngFor","ngForOf"],[1,"comment-list"],[1,"commentator"],[1,"comment-content"],[1,"comment-time"],["color","medium"]],template:function(e,o){if(1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n._uU(5,"\u8fd4\u56de"),n.qZA()(),n.TgZ(6,"ion-buttons",3)(7,"ion-button",4)(8,"ion-note"),n._uU(9,"\u6536\u85cf"),n.qZA()()()()(),n.TgZ(10,"ion-content",5)(11,"ion-card"),n._UZ(12,"img",6),n.TgZ(13,"ion-card-header")(14,"ion-card-title"),n._uU(15),n.qZA(),n.TgZ(16,"ion-card-subtitle"),n._uU(17),n.qZA(),n.TgZ(18,"ion-card-subtitle"),n._uU(19),n.ALo(20,"date"),n.qZA(),n.TgZ(21,"div",7)(22,"ion-button",8),n._UZ(23,"ion-icon",9),n.TgZ(24,"ion-note"),n._uU(25),n.qZA()()()(),n.TgZ(26,"ion-card-content"),n._uU(27),n.qZA()(),n.TgZ(28,"ion-list",10)(29,"ion-item")(30,"ion-textarea",11),n.NdJ("ngModelChange",function(c){return o.comment=c}),n.qZA()(),n.TgZ(31,"ion-item")(32,"ion-buttons",3)(33,"ion-button",12),n.NdJ("click",function(){return o.addComment()}),n._uU(34,"\u786e\u5b9a"),n.qZA()()()(),n.TgZ(35,"ion-list",10),n.YNc(36,V,11,5,"ng-container",13),n.TgZ(37,"ion-item",14)(38,"ion-label")(39,"p",15),n._uU(40,"\u557e\u557e\u557e\u557e~"),n.qZA(),n.TgZ(41,"ion-note",16),n._uU(42,"\u554a\u554a\u597d\u6f02\u4eae\u597d\u559c\u6b22\u597d\u5fc3\u52a8\uff01\u8fd9\u4e5f\u592a\u53ef\u7231\u4e86\u5427"),n.qZA()(),n.TgZ(43,"div",17)(44,"ion-note",18),n._uU(45,"06:11"),n.qZA()()(),n.TgZ(46,"ion-item",14)(47,"ion-label")(48,"p",15),n._uU(49,"\u6211\u4e00\u76f4\u5f88\u5e78\u798f"),n.qZA(),n.TgZ(50,"ion-note",16),n._uU(51,"\u597d\u53ef\u7231\uff0c\u770b\u7740\u5c31\u60f3\u64b8\u4e00\u64b8\uff0c\u7ed9\u59e8\u59e8\u5438\u4e24\u53e3 \u2665"),n.qZA()(),n.TgZ(52,"div",17)(53,"ion-note",18),n._uU(54,"03:44"),n.qZA()()(),n.TgZ(55,"ion-item",14)(56,"ion-label")(57,"p",15),n._uU(58,"\u5982\u5357\u6000\u747e"),n.qZA(),n.TgZ(59,"ion-note",16),n._uU(60,"@\u5b50\u71b9 \u5feb\u770b\u8fd9\u4e2a\uff01"),n.qZA()(),n.TgZ(61,"div",17)(62,"ion-note",18),n._uU(63,"Yesterday"),n.qZA()()(),n.TgZ(64,"ion-item",14)(65,"ion-label")(66,"p",15),n._uU(67,"\u88f9\u7740\u5fc3\u7684\u5149"),n.qZA(),n.TgZ(68,"ion-note",16),n._uU(69,"\u54c7\u597d\u53ef\u7231\u554a\uff0c\u5e2e\u6211\u95ee\u95ee\u5b83\u559c\u6b22\u4ec0\u4e48\u989c\u8272\u7684\u9ebb\u888b\uff01\uff01"),n.qZA()(),n.TgZ(70,"div",17)(71,"ion-note",18),n._uU(72,"Yesterday"),n.qZA()()()()()),2&e){let l;n.xp6(12),n.Q6J("src",null==o.recommend?null:o.recommend.get("img"),n.LSH),n.xp6(3),n.Oqu(null==o.recommend?null:o.recommend.get("name")),n.xp6(2),n.hij("\u4f5c\u8005\uff1a",(null==o.recommend||null==(l=o.recommend.get("user"))?null:l.get("name"))||"\u67d0\u67d0\u67d0",""),n.xp6(2),n.Oqu(n.xi3(20,10,null==o.recommend?null:o.recommend.get("createdAt"),"YYYY/MM/dd/HH:mm")),n.xp6(6),n.Oqu(null==o.recommend?null:o.recommend.get("see")),n.xp6(2),n.hij(" ",null==o.recommend?null:o.recommend.get("content")," "),n.xp6(1),n.Q6J("inset",!0),n.xp6(2),n.Q6J("ngModel",o.comment),n.xp6(5),n.Q6J("inset",!0),n.xp6(1),n.Q6J("ngForOf",o.comments)}},dependencies:[g.sg,m.rH,_.JJ,_.On,t.YG,t.Sm,t.PM,t.FN,t.Zi,t.tO,t.Dq,t.W2,t.Gu,t.gu,t.Ie,t.Q$,t.q_,t.uN,t.g2,t.sr,t.j9,t.YI,g.uU],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}.metadata-end-wrapper[_ngcontent-%COMP%]{position:absolute;top:3px;inset-inline-end:10px;font-size:.4rem;z-index:100;display:flex;align-items:center}.commentator[_ngcontent-%COMP%]{font-size:.7rem}.comment-time[_ngcontent-%COMP%]{position:absolute;bottom:0;inset-inline-end:10px;font-size:.4rem;z-index:100;display:flex;align-items:center}"]}),r})(),en=(()=>{var i;class r{}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-user-follow"]],decls:41,vars:1,consts:[["slot","start"],["routerLink","/lesson/me","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["slot","end"],["fill","clear","color","dark"],["name","person-add-outline"],["color","light"],[3,"inset"],["name","people"],["button","","detail","false","lines","full"],["alt","\u5934\u50cf","src","https://ionicframework.com/docs/img/demos/avatar.svg"],["name","chatbox-ellipses-outline"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n._uU(5,"\u8fd4\u56de"),n.qZA()(),n.TgZ(6,"ion-buttons",3)(7,"ion-button",4),n._UZ(8,"ion-icon",5),n.qZA()()()(),n.TgZ(9,"ion-content",6)(10,"ion-list",7)(11,"ion-item-group")(12,"ion-item-divider"),n._UZ(13,"ion-icon",8),n.TgZ(14,"ion-label"),n._uU(15,"\u5173\u6ce8\u5217\u8868\uff1a"),n.qZA()(),n.ynx(16),n.TgZ(17,"ion-item",9)(18,"ion-avatar",0),n._UZ(19,"img",10),n.qZA(),n.TgZ(20,"ion-label")(21,"p"),n._uU(22,"\u6635\u79f0"),n.qZA(),n.TgZ(23,"ion-badge",0),n._uU(24,"\u6807\u7b7e"),n.qZA()(),n.TgZ(25,"ion-buttons",3)(26,"ion-button",4),n._UZ(27,"ion-icon",11),n._uU(28," \u53d1\u6d88\u606f "),n.qZA()()(),n.BQk(),n.TgZ(29,"ion-item",9)(30,"ion-avatar",0),n._UZ(31,"img",10),n.qZA(),n.TgZ(32,"ion-label")(33,"p"),n._uU(34,"\u6635\u79f0"),n.qZA(),n.TgZ(35,"ion-badge",0),n._uU(36,"\u6807\u7b7e"),n.qZA()(),n.TgZ(37,"ion-buttons",3)(38,"ion-button",4),n._UZ(39,"ion-icon",11),n._uU(40," \u53d1\u6d88\u606f "),n.qZA()()()()()()),2&e&&(n.xp6(10),n.Q6J("inset",!0))},dependencies:[m.rH,t.BJ,t.yp,t.YG,t.Sm,t.W2,t.Gu,t.gu,t.Ie,t.rH,t.Ub,t.Q$,t.q_,t.sr,t.YI],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}ion-item-divider[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:9px}ion-label[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:block;max-width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis}ion-label[_ngcontent-%COMP%] ion-text[_ngcontent-%COMP%]{font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ion-button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:3px}"]}),r})();function tn(i,r){1&i&&(n.ynx(0),n.TgZ(1,"ion-item",8)(2,"ion-label")(3,"p"),n._uU(4," \u672a\u83b7\u6807\u7b7e\u6210\u5c31 "),n.qZA(),n.TgZ(5,"ion-note"),n._uU(6," \u83b7\u53d6\u6761\u4ef6 "),n.qZA()(),n.TgZ(7,"ion-buttons",9)(8,"ion-button",10),n._UZ(9,"ion-icon",11),n.qZA()()(),n.BQk())}function on(i,r){1&i&&(n.ynx(0),n.TgZ(1,"ion-item",8)(2,"ion-label")(3,"p"),n._uU(4," \u5df2\u4eab\u53d710+\u7279\u6743 "),n.qZA(),n.TgZ(5,"ion-note"),n._uU(6," \u8fd8\u67097\u5929\u5230\u671f "),n.qZA()(),n.TgZ(7,"ion-buttons",9),n._UZ(8,"ion-button",12),n.qZA()(),n.BQk())}let un=(()=>{var i;class r{constructor(){this.cate="\u5df2\u5f97"}}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-user-tag"]],decls:21,vars:3,consts:[["slot","start"],["routerLink","/lesson/me","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["color","light"],[3,"inset"],["value","\u5df2\u5f97",3,"click"],["value","\u672a\u83b7",3,"click"],[4,"ngIf"],["button","","detail","false","lines","full"],["slot","end"],["color","medium"],["name","heart-circle","size","large"],["color","danger"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n._uU(5,"\u8fd4\u56de"),n.qZA()()()(),n.TgZ(6,"ion-content",3)(7,"ion-list",4)(8,"ion-item-group")(9,"ion-item-divider")(10,"ion-label"),n._uU(11,"\u5f53\u524d\u4f1a\u5458\u7b49\u7ea7\uff1aL1\u{1f31f}"),n.qZA()(),n.TgZ(12,"ion-segment")(13,"ion-segment-button",5),n.NdJ("click",function(){return o.cate="\u5df2\u5f97"}),n.TgZ(14,"ion-label"),n._uU(15,"\u7545\u4eab\u6240\u6709\u7279\u6743\u27a1\ufe0f"),n.qZA()(),n.TgZ(16,"ion-segment-button",6),n.NdJ("click",function(){return o.cate="\u672a\u83b7"}),n.TgZ(17,"ion-label"),n._uU(18,"\u8fd8\u970099\u79ef\u5206"),n.qZA()()(),n.YNc(19,tn,10,0,"ng-container",7),n.YNc(20,on,9,0,"ng-container",7),n.qZA()()()),2&e&&(n.xp6(7),n.Q6J("inset",!0),n.xp6(12),n.Q6J("ngIf","\u672a\u83b7"==o.cate),n.xp6(1),n.Q6J("ngIf","\u5df2\u5f97"==o.cate))},dependencies:[g.O5,m.rH,t.YG,t.Sm,t.W2,t.Gu,t.gu,t.Ie,t.rH,t.Ub,t.Q$,t.q_,t.uN,t.cJ,t.GO,t.sr,t.QI,t.YI],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}ion-item-divider[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{margin-right:9px}ion-label[_ngcontent-%COMP%] ion-note[_ngcontent-%COMP%]{font-size:.7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]}),r})(),ln=(()=>{var i;class r{}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-user-collection"]],decls:21,vars:0,consts:[["slot","start"],["routerLink","/lesson/me","fill","clear","color","dark"],["name","chevron-back-outline","size","small"],["value","\u63a8\u8350"],["color","light"],["slot","end"],["color","dark"],["name","search-outline"],["name","create-outline"],["button","","detail","false","lines","none",1,"tip"],["color","medium"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-header")(1,"ion-toolbar")(2,"ion-buttons",0)(3,"ion-button",1),n._UZ(4,"ion-icon",2),n.qZA()(),n.TgZ(5,"ion-segment",3)(6,"ion-segment-button",3)(7,"ion-label"),n._uU(8,"\u6211\u7684\u5ba0\u7269\u6863\u6848"),n.qZA()()()()(),n.TgZ(9,"ion-content",4)(10,"ion-item")(11,"ion-buttons",5)(12,"ion-button",6),n._UZ(13,"ion-icon",7),n._uU(14," \u641c\u7d22 "),n.qZA(),n.TgZ(15,"ion-button",6),n._UZ(16,"ion-icon",8),n._uU(17," \u7f16\u8f91 "),n.qZA()()(),n.TgZ(18,"ion-item",9)(19,"ion-label",10),n._uU(20," \u8fd8\u672a\u6709\u6863\u6848\u8bb0\u5f55\u5462 "),n.qZA()()())},dependencies:[m.rH,t.YG,t.Sm,t.W2,t.Gu,t.gu,t.Ie,t.Q$,t.cJ,t.GO,t.sr,t.QI,t.YI],styles:["ion-content[_ngcontent-%COMP%]{height:calc(100vh - 121px)!important}.tip[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{text-align:center}"]}),r})();class x{constructor(r){this.messageList=r}createCompletionByStream(r){var u=this;return(0,s.Z)(function*(){let o={token:`Bearer ${localStorage.getItem("token")}`,messages:u.messageList,model:"gpt-3.5-turbo",temperature:.5,presence_penalty:0,frequency_penalty:0,top_p:1,stream:!0},l=yield fetch("https://test.fmode.cn/api/apig/aigc/gpt/v1/chat/completions",{headers:{accept:"text/event-stream","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-site"},referrer:"https://ai.fmode.cn/",referrerPolicy:"strict-origin-when-cross-origin",body:JSON.stringify(o),method:"POST",mode:"cors",credentials:"omit"}),c="",d=u.messageList.length,Z=l.body?.getReader();if(!Z)throw new Error("Failed to get the response reader.");let Dn=new TextDecoder,C="";for(;;){let{done:En,value:Bn}=yield Z.read();if(En)break;C+=Dn.decode(Bn);let U=C.split("\n");for(let f=0;f{var i;class r{changeTab(e){this.currentTab=e}constructor(){this.currentUser=a.User.current(),this.currentTab="all",this.messageList=[],this.userInput="",this.planOptions={gender:"\u672a\u77e5",option1:"",option2:""},this.ref()}ref(){var e=this;return(0,s.Z)(function*(){let o=new a.Query("AIPet");o.equalTo("user",a.User.current()?.id),o.descending("createdAt"),o.limit(20),(yield o.find()).forEach(c=>{e.messageList.push({role:"user",content:c.get("userMessage")}),e.messageList.push({role:"assistant",content:c.get("aiMessage")})})})()}send(){var e=this;this.messageList.push({role:"user",content:this.userInput});let l=new(a.Object.extend("AIPet"));l.set("user",{__type:"Pointer",className:"_User",objectId:a.User.current()?.id}),l.set("userMessage",this.userInput),this.completion=new x(this.messageList),this.completion?.createCompletionByStream(function(){var c=(0,s.Z)(function*(d){if(d){let Z=e.messageList[e.messageList.length-1];console.log(Z),l.set("aiMessage",Z?.content),yield l.save(),console.log("\u5df2\u4fdd\u5b58")}});return function(d){return c.apply(this,arguments)}}()),this.userInput="",console.log(this.messageList)}setOption(e,o){this.planOptions[e]=o.detail.value}sendPlan(){let e=`\u5ba0\u7269\u7684\u6027\u522b:${this.planOptions.gender}\uff0c\u54c1\u79cd\uff0c\u5e74\u9f84\uff1a\uff0c\u4f53\u91cd\uff0c\n \u4fe1\u606f\uff1a${this.planOptions.targets?.join(";")}\n \u8865\u5145\uff1a\n \u8bf7\u626e\u6f14\u7b26\u5408\u4e0a\u8ff0\u4fe1\u606f\u65e2\u53ef\u7231\u53c8\u4f53\u8d34\u7684\u5ba0\u7269\u966a\u4f34\u6211\u804a\u5929\n `;console.log(e)}}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-page-chat"]],decls:16,vars:2,consts:[[1,"ion-page"],["value","all"],["value","all",3,"click"],["value","favorites",3,"click"],[4,"ngIf"],[1,"navfooter"],[1,"page"],[1,"chat-container"],[1,"message-container"],["src","https://ts1.cn.mm.bing.net/th/id/R-C.96b2f4c011c90a93e0804dc0368947bb?rik=iuURCAQtZJGBTg&riu=http%3a%2f%2fimg.sytuku.com%2fuptu%2fyulantu%2f160528%2f5-16052R00554.jpg&ehk=cHY%2bSRHYCp30WP97Brg%2fdhkRkesXy91PqmVmm6Q%2fU8A%3d&risl=&pid=ImgRaw&r=0","alt","Avatar",1,"avatar-left"],[1,"message-box-left"],[1,"message-content"],[4,"ngFor","ngForOf"],[1,"footer"],[1,"send-container"],["type","text","placeholder","\u8f93\u5165\u6d88\u606f...",1,"message-input",3,"ngModel","ngModelChange"],[1,"send-button",3,"click"],[1,"message-container-mine"],["alt","Avatar",1,"avatar-right",3,"src"],[1,"message-box-right"],[2,"text-align","center","padding","15px"],["label","\u6027\u522b","placeholder","",3,"value","ionChange"],["value","\u5973"],["value","\u7537"],["value","\u672a\u77e5"],["label","\u5e74\u9f84","type","number","placeholder",""],["label","\u8eab\u957f\uff08cm\uff09","type","number","placeholder",""],["label","\u4f53\u91cd\uff08kg\uff09","type","number","placeholder",""],["label","\u6027\u522b","type","string","placeholder",""],["aria-label","object","placeholder","\u9009\u62e9\u4f60\u7684\u504f\u597d",3,"value","multiple","ionChange"],["value","\u6175\u61d2\u4f11\u95f2"],["value","\u6d3b\u6cfc\u597d\u52a8"],["value","\u72ec\u7acb\u81ea\u4e3b"],["label","\u4f60\u662f\u5426\u6709\u5176\u4ed6\u4fe1\u606f\u6216\u8865\u5145","labelPlacement","floating","placeholder"," "],["expand","block",3,"click"]],template:function(e,o){1&e&&(n.TgZ(0,"div",0)(1,"ion-header")(2,"ion-toolbar")(3,"ion-title"),n._uU(4,"AI\u517b\u5ba0"),n.qZA()(),n.TgZ(5,"ion-segment",1)(6,"ion-segment-button",2),n.NdJ("click",function(){return o.changeTab("all")}),n.TgZ(7,"ion-label"),n._uU(8,"\u5ba0\u7269\u95ee\u8bca"),n.qZA()(),n.TgZ(9,"ion-segment-button",3),n.NdJ("click",function(){return o.changeTab("favorites")}),n.TgZ(10,"ion-label"),n._uU(11,"\u865a\u62df\u5ba0\u7269\u5236\u5b9a"),n.qZA()()()(),n.TgZ(12,"ion-content"),n.YNc(13,sn,14,2,"ng-container",4),n.YNc(14,gn,33,3,"ng-container",4),n._UZ(15,"div",5),n.qZA()()),2&e&&(n.xp6(13),n.Q6J("ngIf","all"===o.currentTab),n.xp6(1),n.Q6J("ngIf","favorites"===o.currentTab))},dependencies:[g.sg,g.O5,_.Fj,_.JJ,_.On,t.YG,t.W2,t.Gu,t.pK,t.Ie,t.Q$,t.q_,t.cJ,t.GO,t.t9,t.n0,t.g2,t.wd,t.sr,t.as,t.QI,t.j9],styles:[".page[_ngcontent-%COMP%]{background-color:#f2f2f2;height:calc(100% - 114px);width:100vw;overflow-y:scroll}.footer[_ngcontent-%COMP%]{position:fixed;bottom:60px;width:100vw}.chat-container[_ngcontent-%COMP%]{padding:10px}.message-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px}.message-container-mine[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px;flex-direction:row-reverse}.avatar-left[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;margin-right:10px}.avatar-right[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;margin-left:10px}.message-box-left[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:10px;max-width:70%}.message-box-right[_ngcontent-%COMP%]{background-color:#95ec69;border-radius:10px;padding:10px;max-width:70%}.message-content[_ngcontent-%COMP%]{word-wrap:break-word}.send-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px;background-color:#f2f2f2}.message-input[_ngcontent-%COMP%]{flex:1;padding:8px;border:none;border-radius:20px;background-color:#fff}.send-button[_ngcontent-%COMP%]{padding:8px 15px;border:none;border-radius:20px;background-color:#38c1f5;color:#fff;font-weight:700;cursor:pointer;margin-left:10px}.navfooter[_ngcontent-%COMP%]{width:100%;height:120px}"]}),r})();var h=p(44354);function _n(i,r){if(1&i){const u=n.EpF();n.TgZ(0,"ion-col",9)(1,"ion-card",2),n.NdJ("click",function(){n.CHM(u);const o=n.oxw(2).index,l=n.oxw();return n.KtG(l.goLessonDetail(l.courseList[o+1]))}),n._UZ(2,"img",10),n.TgZ(3,"ion-card-header")(4,"ion-card-title"),n._uU(5),n.qZA()()()()}if(2&i){const u=n.oxw(2).index,e=n.oxw();n.xp6(2),n.Q6J("src",e.courseList[u+1].get("foodImg"),n.LSH),n.xp6(3),n.Oqu(e.courseList[u+1].get("foodName"))}}function pn(i,r){if(1&i){const u=n.EpF();n.ynx(0),n.TgZ(1,"ion-col",9)(2,"ion-card",2),n.NdJ("click",function(){n.CHM(u);const o=n.oxw().$implicit,l=n.oxw();return n.KtG(l.goLessonDetail(o))}),n._UZ(3,"img",10),n.TgZ(4,"ion-card-header")(5,"ion-card-title"),n._uU(6),n.qZA()()()(),n.YNc(7,_n,6,2,"ion-col",11),n.BQk()}if(2&i){const u=n.oxw(),e=u.$implicit,o=u.index,l=n.oxw();n.xp6(3),n.Q6J("src",null==e?null:e.get("foodImg"),n.LSH),n.xp6(3),n.Oqu(null==e?null:e.get("foodName")),n.xp6(1),n.Q6J("ngIf",o+1{var i;class r{constructor(e){this.router=e,this.courseList=[],this.searchInput="",this.searchType="foodName",this.pageSize=10,this.skip=0,this.groupedCourseList=[],this.initPage()}initPage(){var e=this;return(0,s.Z)(function*(){e.courseList=yield e.getMenuData()})()}getMenuData(){var e=this;return(0,s.Z)(function*(){let o=new a.Query("PetFood");o.limit(e.pageSize),o.include("courseAuthor"),e.searchInput&&o.contains(e.searchType,e.searchInput),e.skip&&o.skip(e.skip),o.addAscending("no");let l=yield o.find();return console.log(l),l})()}search(){var e=this;return(0,s.Z)(function*(){e.skip=0,e.courseList=yield e.getMenuData()})()}onBottomLoad(e,o){var l=this;return(0,s.Z)(function*(){console.log("onBottomLoad",l.courseList.length),l.skip=l.courseList.length;let c=yield l.getMenuData();l.courseList=l.courseList.concat(c),o?.complete()})()}scrollToCardSection(e){const o=document.getElementById(`card-section-${e}`);o&&o.scrollIntoView({behavior:"smooth",block:"start"})}goLessonDetail(e){this.router.navigate(["/lesson/lesson/detail"],{queryParams:e})}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.F0))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-page-lesson"]],decls:35,vars:2,consts:[["contentId","main-content"],[1,"ion-padding"],[3,"click"],["id","main-content",1,"ion-page"],["slot","start"],["placeholder","\u5c0f\u732b\u54aa\u4e0d\u80fd\u5403\u80e1\u841d\u535c\uff1f",3,"ngModel","ngModelChange","ionChange","ionClear"],["id","card-section-\u70ed\u95e8"],[4,"ngFor","ngForOf"],[4,"ngIf"],["size","5.5"],["alt","Silhouette of mountains",3,"src"],["size","5.5",4,"ngIf"]],template:function(e,o){1&e&&(n.TgZ(0,"ion-menu",0)(1,"ion-header")(2,"ion-toolbar")(3,"ion-title"),n._uU(4,"\u98df\u7269\u5206\u7c7b"),n.qZA()()(),n.TgZ(5,"ion-content",1)(6,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u70ed\u95e8")}),n._uU(7," \u70ed\u95e8 "),n.qZA(),n.TgZ(8,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u6c34\u679c")}),n._uU(9," \u6c34\u679c "),n.qZA(),n.TgZ(10,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(11," \u96f6\u98df "),n.qZA(),n.TgZ(12,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(13," \u4e3b\u98df "),n.qZA(),n.TgZ(14,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(15," \u679c\u852c\u7c7b "),n.qZA(),n.TgZ(16,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(17," \u8089\u86cb\u7c7b "),n.qZA(),n.TgZ(18,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(19," \u83cc\u83c7\u7c7b "),n.qZA(),n.TgZ(20,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(21," \u8c03\u5473\u54c1 "),n.qZA(),n.TgZ(22,"ion-item",2),n.NdJ("click",function(){return o.scrollToCardSection("\u96f6\u98df")}),n._uU(23," \u836f\u54c1\u8865\u54c1 "),n.qZA()()(),n.TgZ(24,"div",3)(25,"ion-header")(26,"ion-toolbar")(27,"ion-buttons",4),n._UZ(28,"ion-menu-button"),n.qZA(),n.TgZ(29,"ion-searchbar",5),n.NdJ("ngModelChange",function(c){return o.searchInput=c})("ionChange",function(){return o.search()})("ionClear",function(){return o.search()}),n.qZA()()(),n.TgZ(30,"ion-content")(31,"div",6)(32,"ion-grid")(33,"ion-row"),n.YNc(34,dn,2,1,"ng-container",7),n.qZA()()()()()),2&e&&(n.xp6(29),n.Q6J("ngModel",o.searchInput),n.xp6(5),n.Q6J("ngForOf",o.courseList))},dependencies:[g.sg,g.O5,_.JJ,_.On,t.Sm,t.PM,t.Zi,t.Dq,t.wI,t.W2,t.jY,t.Gu,t.Ie,t.z0,t.fG,t.Nd,t.VI,t.wd,t.sr,t.j9],styles:['@charset "UTF-8";ion-searchbar[_ngcontent-%COMP%]{margin-top:10px}ion-buttons[_ngcontent-%COMP%]{margin-top:10px}ion-card[_ngcontent-%COMP%]{width:100%;margin-bottom:1px}ion-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:200px;object-fit:cover}ion-card[_ngcontent-%COMP%] ion-card-title[_ngcontent-%COMP%]{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navfooter[_ngcontent-%COMP%]{width:100%;height:60px}']}),r})(),Cn=(()=>{var i;class r{constructor(e){this.route=e,this.course={},this.currentUser=a.User.current(),this.commentContent="",this.commentCount=0,this.commentList=[],this.route.queryParams.subscribe(o=>{this.initPage(o.id)})}getCourseById(e){var o=this;return(0,s.Z)(function*(){let l=new a.Query("PetFood");l.include("courseAuthor"),o.course=yield l.get(e),o.lessonPointer={__type:"Pointer",className:"PetFood",objectId:o.course.id}})()}saveComment(){var e=this;return(0,s.Z)(function*(){let l=new(a.Object.extend("CourseComment"));return l.set("user",{__type:"Pointer",className:"_User",objectId:e.currentUser?.id}),l.set("commentContent",e.commentContent),l.set("lesson",e.lessonPointer),e.commentContent="",l.save().then(c=>{console.log(c),e.getCommentData().then(d=>{e.commentList=d,e.commentCount=e.commentList.length})},c=>{console.log("\u5931\u8d25\uff1a"+c)})})()}initPage(e){var o=this;return(0,s.Z)(function*(){yield o.getCourseById(e),o.commentList=yield o.getCommentData(),o.commentCount=o.commentList.length})()}getCommentData(){var e=this;return(0,s.Z)(function*(){let o=new a.Query("CourseComment");return o.equalTo("lesson",e.lessonPointer),o.descending("createdAt"),yield o.find()})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.gz))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-page-lesson-detail"]],decls:17,vars:3,consts:[[1,"ion-page"],["slot","start"],["routerLink","/lesson/lesson"],["alt","\u56fe\u7247\u52a0\u8f7d\u4e0d\u51fa\u6765",3,"src"],["fill","clear"]],template:function(e,o){1&e&&(n.TgZ(0,"div",0)(1,"ion-header")(2,"ion-toolbar")(3,"ion-buttons",1)(4,"ion-button",2),n._uU(5,"<\u8fd4\u56de"),n.qZA()()()(),n.TgZ(6,"ion-content"),n._UZ(7,"ion-img",3),n.TgZ(8,"ion-list")(9,"ion-list-header")(10,"ion-card-title"),n._uU(11),n.qZA()(),n.TgZ(12,"ion-card")(13,"ion-card-title"),n._uU(14),n.qZA(),n.TgZ(15,"ion-button",4),n._uU(16,"\u6536\u85cf"),n.qZA()()()()()),2&e&&(n.xp6(7),n.Q6J("src",null==o.course?null:o.course.get("foodImg")),n.xp6(4),n.Oqu(null==o.course?null:o.course.get("point")),n.xp6(3),n.Oqu(null==o.course?null:o.course.get("foodDescript")))},dependencies:[m.rH,t.YG,t.Sm,t.PM,t.Dq,t.W2,t.Gu,t.Xz,t.q_,t.yh,t.sr,t.YI],styles:['@charset "UTF-8";ion-img[_ngcontent-%COMP%]{width:100%;height:350px;object-fit:cover}.custom-subtitle[_ngcontent-%COMP%]{color:red;font-size:22px;font-style:italic;text-align:right;display:inline-block}.navfooter[_ngcontent-%COMP%]{width:100%;height:120px}.material-label[_ngcontent-%COMP%]{display:block}.input-box[_ngcontent-%COMP%]{width:300px;height:40px;border-radius:20px;background-color:#f2f2f2;padding:10px;border:none;outline:none;font-size:16px;color:#333;box-shadow:0 2px 5px #0000001a}.commentbox[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:70px;padding-right:30px}.commentbox[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{color:gray}.footer[_ngcontent-%COMP%]{position:fixed;bottom:60px;width:100vw}.send-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px;background-color:#f2f2f2}.message-input[_ngcontent-%COMP%]{flex:1;padding:8px;border:none;border-radius:20px;background-color:#fff}.send-button[_ngcontent-%COMP%]{padding:8px 15px;border:none;border-radius:20px;background-color:#38c1f5;color:#fff;font-weight:700;cursor:pointer;margin-left:10px}']}),r})();function hn(i,r){if(1&i&&(n.TgZ(0,"ion-col",7),n._UZ(1,"img",8),n.TgZ(2,"ion-card-header")(3,"ion-card-title"),n._uU(4),n.qZA()()()),2&i){const u=n.oxw(2).index,e=n.oxw(2);n.xp6(1),n.Q6J("src",e.courseList[u+1].get("petImg"),n.LSH),n.xp6(3),n.Oqu(e.courseList[u+1].get("petName"))}}function fn(i,r){if(1&i&&(n.ynx(0),n.TgZ(1,"ion-col",7),n._UZ(2,"img",8),n.TgZ(3,"ion-card-header")(4,"ion-card-title"),n._uU(5),n.qZA()()(),n.YNc(6,hn,5,2,"ion-col",9),n.BQk()),2&i){const u=n.oxw(),e=u.$implicit,o=u.index,l=n.oxw(2);n.xp6(2),n.Q6J("src",null==e?null:e.get("petImg"),n.LSH),n.xp6(3),n.Oqu(null==e?null:e.get("petName")),n.xp6(1),n.Q6J("ngIf",o+1{var i;class r{changeTab(e){this.currentTab=e}constructor(e){this.router=e,this.currentUser=a.User.current(),this.currentTab="all",this.courseList=[],this.planOptions={gender:"\u672a\u77e5",option1:"",option2:""},this.pageSize=30,this.skip=0,this.initPage()}initPage(){var e=this;return(0,s.Z)(function*(){e.courseList=yield e.getMenuData()})()}getMenuData(){var e=this;return(0,s.Z)(function*(){let o=new a.Query("PetTest");o.limit(e.pageSize),o.include("courseAuthor"),e.skip&&o.skip(e.skip),o.addAscending("no");let l=yield o.find();return console.log(l),l})()}setOption(e,o){this.planOptions[e]=o.detail.value}onBottomLoad(e,o){var l=this;return(0,s.Z)(function*(){console.log("onBottomLoad",l.courseList.length),l.skip=l.courseList.length;let c=yield l.getMenuData();l.courseList=l.courseList.concat(c),o?.complete()})()}}return(i=r).\u0275fac=function(e){return new(e||i)(n.Y36(m.F0))},i.\u0275cmp=n.Xpm({type:i,selectors:[["app-page-test"]],decls:13,vars:2,consts:[[1,"ion-page"],["value","all"],["value","all",3,"click"],["value","favorites",3,"click"],[4,"ngIf"],[1,"navfooter"],[4,"ngFor","ngForOf"],["size","5.5"],["alt","Silhouette of mountains",3,"src"],["size","5.5",4,"ngIf"],[2,"text-align","center","padding","15px"],[1,"question"],[1,"question-label"],[3,"ngModel","ngModelChange"],[1,"option"],[1,"option-label"],["value","\u6175\u61d2\u4f11\u95f2"],["value","\u6d3b\u6cfc\u597d\u52a8"],["value","\u65e0\u6240\u8c13"],["label","\u4f60\u662f\u5426\u6709\u5176\u4ed6\u4fe1\u606f\u6216\u8865\u5145","labelPlacement","floating","placeholder"," "],["expand","block"]],template:function(e,o){1&e&&(n.TgZ(0,"div",0)(1,"ion-header")(2,"ion-segment",1)(3,"ion-segment-button",2),n.NdJ("click",function(){return o.changeTab("all")}),n.TgZ(4,"ion-label"),n._uU(5,"\u4e0d\u540cMBTI\u5ba0\u7269"),n.qZA()(),n.TgZ(6,"ion-segment-button",3),n.NdJ("click",function(){return o.changeTab("favorites")}),n.TgZ(7,"ion-label"),n._uU(8,"\u5ba0\u7269\u6027\u683c\u6d4b\u8bd5"),n.qZA()()()(),n.TgZ(9,"ion-content"),n.YNc(10,Tn,16,1,"ng-container",4),n.YNc(11,Fn,72,4,"ng-container",4),n._UZ(12,"div",5),n.qZA()()),2&e&&(n.xp6(10),n.Q6J("ngIf","all"===o.currentTab),n.xp6(1),n.Q6J("ngIf","favorites"===o.currentTab))},dependencies:[g.sg,g.O5,_.JJ,_.On,t.YG,t.PM,t.FN,t.Zi,t.Dq,t.wI,t.W2,t.jY,t.Gu,t.Ie,t.Q$,t.q_,t.B7,t.se,t.Nd,t.cJ,t.GO,t.g2,t.U5,t.QI,t.j9],styles:[".page[_ngcontent-%COMP%]{background-color:#f2f2f2;height:calc(100% - 114px);width:100vw;overflow-y:scroll}.footer[_ngcontent-%COMP%]{position:fixed;bottom:60px;width:100vw}.chat-container[_ngcontent-%COMP%]{padding:10px}.message-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px}.message-container-mine[_ngcontent-%COMP%]{display:flex;align-items:flex-start;margin-bottom:10px;flex-direction:row-reverse}.avatar-left[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;margin-right:10px}.avatar-right[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;margin-left:10px}.message-box-left[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:10px;max-width:70%}.message-box-right[_ngcontent-%COMP%]{background-color:#95ec69;border-radius:10px;padding:10px;max-width:70%}.message-content[_ngcontent-%COMP%]{word-wrap:break-word}.send-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px;background-color:#f2f2f2}.message-input[_ngcontent-%COMP%]{flex:1;padding:8px;border:none;border-radius:20px;background-color:#fff}.send-button[_ngcontent-%COMP%]{padding:8px 15px;border:none;border-radius:20px;background-color:#38c1f5;color:#fff;font-weight:700;cursor:pointer;margin-left:10px}.navfooter[_ngcontent-%COMP%]{width:100%;height:120px}.question[_ngcontent-%COMP%]{font-weight:700;margin-bottom:10px}.question-label[_ngcontent-%COMP%]{font-size:18px}.option[_ngcontent-%COMP%]{margin-bottom:8px}.option-label[_ngcontent-%COMP%]{font-size:16px}"]}),r})(),canActivate:[h.p]},{path:"community/scienceDetail",component:G},{path:"community/attentionDetail",component:X},{path:"community/recommendDetail",component:nn},{path:"community/share",component:K},{path:"me/userFollow",component:en},{path:"me/userTag",component:un},{path:"me/userCollection",component:ln}];let Un=(()=>{var i;class r{}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275mod=n.oAB({type:i}),i.\u0275inj=n.cJS({imports:[m.Bz.forChild(xn),m.Bz]}),r})(),qn=(()=>{var i;class r{}return(i=r).\u0275fac=function(e){return new(e||i)},i.\u0275mod=n.oAB({type:i}),i.\u0275inj=n.cJS({imports:[g.ez,Un,_.u5,t.Pc]}),r})()}}]);