PageSourceSearch

https://behkhaan.ir/chunk-QGBPVOO7.js

js behkhaan.ir collected 2026-09-25 06:58:34 UTC 63,736 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5b8532f9-f04c-5904-a08d-ade36fbcd6b6")}catch(e){}}();
3import{a as Bt,b as Nt,c as be}from"./chunk-CH4VWUWX.js";import{b as yt,c as vt,f as wt}from"./chunk-H4YBA2EF.js";import{a as Dt}from"./chunk-SB6NJ62X.js";import{c as Tt,d as Et}from"./chunk-EXB5BJZS.js";import{a as It}from"./chunk-LO5GOWCU.js";import{a as Ft}from"./chunk-RZE25DM4.js";import"./chunk-BCLKESOF.js";import{a as Vt}from"./chunk-3TBQSFLB.js";import{a as At}from"./chunk-RWCF52NX.js";import{a as St}from"./chunk-XIVKRWFU.js";import{a as kt}from"./chunk-OJEPEFC3.js";import"./chunk-ZNUNMZFW.js";import{a as mt,b as pt}from"./chunk-INKO7AT4.js";import{a as ft}from"./chunk-37ZDAKCD.js";import{a as _t}from"./chunk-HWOFOS54.js";import{a as xt}from"./chunk-UH4VNSXW.js";import{a as re}from"./chunk-QO7IJ72C.js";import{d as ne,e as ae,l as ge}from"./chunk-22KBOWQR.js";import"./chunk-OZS24Q2A.js";import{a as Ct}from"./chunk-42O5VL4O.js";import{a as bt}from"./chunk-RH2XXNXD.js";import{a as gt}from"./chunk-NK7D67PN.js";import"./chunk-QZO6JQFN.js";import"./chunk-THBDF75G.js";import"./chunk-XUII6CUQ.js";import"./chunk-AZUSUAVC.js";import"./chunk-ZWCNYL4J.js";import{a as ct,b as ht}from"./chunk-L5GMI33Q.js";import{B as ut,D as dt,b as Je,c as Xe,h as tt,p as it,q as ot,r as rt,w as nt}from"./chunk-D7INPA5Y.js";import"./chunk-OMSROY3C.js";import{a as et,h as oe}from"./chunk-DPKSD3U3.js";import{H as Ye,c as $e,e as Ge,g as ze,i as I,l as We,m as He,p as Z,r as qe,t as Qe,u as Ze,x as Ke}from"./chunk-ALQRFA6S.js";import{a as K}from"./chunk-B3Z3NAS4.js";import{c as he,s as Ue}from"./chunk-SZLOI7II.js";import{d as Me,x as D}from"./chunk-7A7LDGKG.js";import"./chunk-3EP7OHNH.js";import{ta as at,ua as lt,va as st}from"./chunk-GBS5NEN2.js";import"./chunk-LWW7BOTF.js";import{a as Re,b as ce}from"./chunk-COTPHALG.js";import{p as Oe,s as je}from"./chunk-KF3FKZRO.js";import{r as Pe}from"./chunk-OD5Z4FIV.js";import{i as ie,q as Le}from"./chunk-FMNOXGZD.js";import{$c as A,Cc as Ee,Ec as Ae,Fc as Ie,H as Y,J as G,Ja as B,Jc as ee,L as z,Lb as X,Mc as De,Nc as m,Oc as U,Pb as Fe,Pc as Q,Qb as se,Qc as Ne,S as W,Ta as Se,_c as te,ad as Ve,ba as ye,ca as N,cc as f,cd as ue,ea as j,ec as _,f as q,fc as L,ga as v,gc as $,hc as F,ic as T,jc as g,jd as de,kc as a,l as ke,lc as r,mc as b,na as ve,nb as J,oa as we,od as me,p as V,pd as pe,rb as Be,sb as d,sc as Te,ta as S,tc as E,xb as le,xc as y,ya as x,za as k,zc as c}from"./chunk-GHGZ4ZGT.js";import"./chunk-ALSDDZFP.js";import{a as R,b as O,j as n}from"./chunk-EKFLB6J2.js";var Ht=["item"],qt=t=>({$implicit:t});function Qt(t,u){if(t&1&&Te(0,5),t&2){let l=c().$implicit,o=c(2);g("ngTemplateOutlet",o.itemTemplate)("ngTemplateOutletContext",Ve(2,qt,l))}}function Zt(t,u){if(t&1&&m(0),t&2){let l=c().$implicit,o=c(2);Q(" ",o.display(l)," ")}}function Kt(t,u){if(t&1){let l=E();a(0,"li",4),y("mousedown",function(e){let i=x(l).$implicit,s=c(2);return k(s.pick(e,i))})("mouseenter",function(){let e=x(l).$index,i=c(2);return k(i.activeIndex=e)}),f(1,Qt,1,4,"ng-container",5)(2,Zt,1,1),r()}if(t&2){let l=u.$index,o=c(2);g("ngClass",l===o.activeIndex?"bg-gray-100 dark:bg-gray-700/60":""),d(),_(o.itemTemplate?1:2)}}function Yt(t,u){if(t&1&&(a(0,"ul",2),F(1,Kt,3,2,"li",3,L),r()),t&2){let l=c();d(),T(l.items)}}var Jt=150,Pt=(()=>{let u=class u{constructor(){n(this,"host",S(Se));n(this,"items",[]);n(this,"displayWith",o=>o==null?"":String(o));n(this,"placeholder","");n(this,"inputClass","");n(this,"search",new le);n(this,"selected",new le);n(this,"itemTemplate");n(this,"value","");n(this,"disabled",!1);n(this,"open",!1);n(this,"activeIndex",-1);n(this,"onChange",()=>{});n(this,"onTouched",()=>{})}writeValue(o){this.value=o!=null?o:""}registerOnChange(o){this.onChange=o}registerOnTouched(o){this.onTouched=o}setDisabledState(o){this.disabled=o}display(o){return this.displayWith(o)}onInput(o){this.value=o.target.value,this.onChange(this.value),this.open=!0,this.activeIndex=-1,this.search.emit(this.value)}onBlur(){this.onTouched(),setTimeout(()=>this.open=!1,Jt)}onKeydown(o){let e=this.items.length;switch(o.key){case"ArrowDown":this.open=!0,e&&(this.activeIndex=(this.activeIndex+1)%e),o.preventDefault();break;case"ArrowUp":e&&(this.activeIndex=(this.activeIndex-1+e)%e),o.preventDefault();break;case"Enter":this.open&&this.activeIndex>=0&&this.activeIndex<e&&(this.choose(this.items[this.activeIndex]),o.preventDefault());break;case"Escape":this.open=!1;break}}pick(o,e){o.preventDefault(),this.choose(e)}choose(o){this.value=this.display(o),this.onChange(this.value),this.selected.emit(o),this.open=!1,this.activeIndex=-1}onDocumentPointerDown(o){this.host.nativeElement.contains(o.target)||(this.open=!1)}};n(u,"\u0275fac",function(e){return new(e||u)}),n(u,"\u0275cmp",X({type:u,selectors:[["beh-dropdown"]],contentQueries:function(e,i,s){if(e&1&&Ee(s,Ht,5),e&2){let p;Ae(p=Ie())&&(i.itemTemplate=p.first)}},hostAttrs:[1,"block","w-full"],hostBindings:function(e,i){e&1&&y("pointerdown",function(p){return i.onDocumentPointerDown(p)},Be)},inputs:{items:"items",displayWith:"displayWith",placeholder:"placeholder",inputClass:"inputClass"},outputs:{search:"search",selected:"selected"},features:[te([{provide:Ge,useExisting:ve(()=>u),multi:!0}])],decls:3,vars:6,consts:[[1,"relative","w-full"],["type","text","autocomplete","off",3,"input","focus","click","blur","keydown","placeholder","value","disabled"],[1,"absolute","top-full","inset-x-0","z-50","mt-1.5","p-1.5","max-h-60","overflow-y-auto","list-none","rounded-xl","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","shadow-xl"],[1,"px-3","py-2","rounded-lg","cursor-pointer","text-xs","text-gray-700","dark:text-gray-200","transition-colors","hover:bg-gray-100","dark:hover:bg-gray-700/60",3,"ngClass"],[1,"px-3","py-2","rounded-lg","cursor-pointer","text-xs","text-gray-700","dark:text-gray-200","transition-colors","hover:bg-gray-100","dark:hover:bg-gray-700/60",3,"mousedown","mouseenter","ngClass"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"input",1),y("input",function(p){return i.onInput(p)})("focus",function(){return i.open=!0})("click",function(){return i.open=!0})("blur",function(){return i.onBlur()})("keydown",function(p){return i.onKeydown(p)}),r(),f(2,Yt,3,0,"ul",2),r()),e&2&&(d(),De(i.inputClass),g("placeholder",i.placeholder)("value",i.value)("disabled",i.disabled),d(),_(i.open&&i.items.length>0?2:-1))},dependencies:[oe,ie,Le],encapsulation:2}));let t=u;return t})();var Mt=100,Xt=15,ei=20,Rt=9,Ce=3,fe=(()=>{let u=class u{constructor(){n(this,"util",S(ut));n(this,"bookService",S(re));n(this,"searchService",S(mt));n(this,"publisherService",S(ft));n(this,"genresService",S(Dt));n(this,"authorName",new Z);n(this,"authorRole",new Z);n(this,"publisher",new Z);n(this,"tag",new Z);n(this,"authorTypes",B([]));n(this,"filteredRoles",B([]));n(this,"filteredCovers",B([]));n(this,"filteredTracks",B([]));n(this,"filteredLanguages",B([]));n(this,"titleSuggestions",B([]));n(this,"authorSuggestions",B([]));n(this,"publisherSuggestions",B([]));n(this,"tagSuggestions",B([]));n(this,"titleLoading",B(!1));n(this,"tagLoading",B(!1));n(this,"repeatIsbn",B(!1));n(this,"lastTitleTerm","");n(this,"authorBooks",B([]));n(this,"authorBooksDetail",B(new Nt));n(this,"authorBooksLoading",B(!1));n(this,"publisherBooks",B([]));n(this,"publisherBooksDetail",B(new _t));n(this,"publisherBooksLoading",B(!1));n(this,"selectedAuthor",null);n(this,"isbnDuplicate",new q);n(this,"roleTitles",[]);n(this,"covers",[]);n(this,"tracks",[]);n(this,"languages",[]);n(this,"titleTerms",new q);n(this,"isbnTerms",new q);n(this,"tagTerms",new q);n(this,"titleFilter",new K);n(this,"tagFilter",new be);n(this,"publisherFilter",new be);n(this,"authorSearch",new Vt);n(this,"isbnValue","");n(this,"currentIsbn","");n(this,"currentBookId")}init(o){this.loadOptionLists(),this.wireTitleSearch(o),this.wireIsbnCheck(o),this.wireAuthorSearch(o),this.wirePublisherSearch(o),this.wireTagSearch(o)}setLoadedBook(o,e){this.currentIsbn=o,this.currentBookId=e}searchTitle(o){if(o&&o.length>Ce){let e=this.util.replaceFaNumbers(o);if(!this.searchService.isNullOrWhiteSpace(e)){this.titleLoading.set(!0),this.lastTitleTerm=e,this.titleFilter.searchTerm=e,this.titleTerms.next(e);return}}this.titleLoading.set(!1),this.titleSuggestions.set([])}wireTitleSearch(o){this.titleTerms.pipe(z(500),N(()=>this.searchService.isNullOrWhiteSpace(this.titleFilter.searchTerm)?this.emptyBookSearch():(this.titleFilter.pgSize=Xt,this.searchService.searchSuggesstion(this.titleFilter,pt.Book).pipe(G(()=>this.emptyBookSearch())))),v(e=>{var i,s,p,h,C;if(this.titleLoading.set(!1),e.hasError){this.clearSuggestions();return}((s=(i=this.titleFilter.searchTerm)==null?void 0:i.length)!=null?s:0)>1&&this.titleSuggestions.set((C=(h=(p=e.result)==null?void 0:p.books)==null?void 0:h.items)!=null?C:[])}),j(o)).subscribe()}emptyBookSearch(){return V(new he(new kt,"",null,!0,""))}checkIsbn(o){let e=this.util.replaceFaNumbers(o!=null?o:"").replace(/\D/g,"");e&&e.length>10&&(this.isbnValue=e,this.isbnTerms.next(e))}wireIsbnCheck(o){this.isbnTerms.pipe(z(500),Y(e=>e.length>10),N(()=>this.searchService.isNullOrWhiteSpace(this.isbnValue)?V(new he(new ne,"",null,!0,"")):this.searchService.transformIsbnToId(this.isbnValue)),v(e=>{let i=!e.hasError&&e.result&&this.isbnValue!==this.currentIsbn&&e.result.id!==this.currentBookId;this.repeatIsbn.set(!!i),i&&this.isbnDuplicate.next(e.result)}),j(o)).subscribe()}wireAuthorSearch(o){this.authorName.valueChanges.pipe(Y(e=>(e==null?void 0:e.length)>=Ce),z(300),N(e=>(this.authorSearch.author=new K(0,ei,e),this.searchService.searchAggregated(this.authorSearch).pipe(G(()=>V({hasError:!0,result:null}))))),v(e=>{var i,s;this.authorSuggestions.set(e.hasError||!e.result?[]:(s=(i=e.result.authors)==null?void 0:i.items)!=null?s:[])}),W(()=>
3this.selectedAuthor=null),j(o)).subscribe(),this.authorRole.valueChanges.pipe(ye(""),v(e=>this.filteredRoles.set(e?this.filterList(this.roleTitles,e):this.roleTitles)),j(o)).subscribe()}loadAuthorBooks(o){this.selectedAuthor=o,this.authorBooksDetail.set(o),this.authorBooksLoading.set(!0),this.searchService.getByAuthorId(o.id,new K(0,Rt),1).pipe(v(e=>{!e.hasError&&e.result&&this.authorBooks.set(e.result.items)}),W(()=>this.authorBooksLoading.set(!1))).subscribe()}roleTitle(o){var e,i;return(i=(e=this.authorTypes().find(s=>s.title==o))==null?void 0:e.persianTitle)!=null?i:o}resetAuthorInput(){this.selectedAuthor=null,this.authorName.setValue(""),this.authorRole.setValue(""),this.authorSuggestions.set([]),this.authorBooks.set([])}wirePublisherSearch(o){this.publisherFilter.pgNumber=0,this.publisherFilter.pgSize=Mt,this.publisher.valueChanges.pipe(Y(e=>(e==null?void 0:e.length)>=Ce),z(300),N(e=>(this.publisherFilter.searchTerm=e,this.publisherService.SuggestionPublisher(this.publisherFilter))),v(e=>{var i;this.publisherSuggestions.set(e.hasError||!e.result?[]:(i=e.result.items)!=null?i:[])}),j(o)).subscribe()}loadPublisherBooks(o){this.publisherBooksDetail.set(o),this.publisherBooksLoading.set(!0),this.searchService.getByPublisherId(o.id,new K(0,Rt)).pipe(v(e=>{!e.hasError&&e.result&&this.publisherBooks.set(e.result.items)}),W(()=>this.publisherBooksLoading.set(!1))).subscribe()}resetPublisherInput(){this.publisher.setValue(""),this.publisherSuggestions.set([])}searchTags(o){o&&o.length>2?(this.tagLoading.set(!0),this.tagFilter.searchTerm=o.split(" ").join("_"),this.tagTerms.next(this.tagFilter.searchTerm)):this.clearSuggestions()}wireTagSearch(o){this.tagFilter.pgNumber=0,this.tagFilter.pgSize=Mt,this.tagTerms.pipe(z(300),N(()=>this.genresService.suggest(this.tagFilter).pipe(G(()=>V({hasError:!0,result:null})))),v(e=>{var s,p;if(this.tagLoading.set(!1),e.hasError){this.clearSuggestions();return}let i=((p=(s=e.result)==null?void 0:s.items)!=null?p:[]).map(h=>O(R({},h),{title:h.title.replace(/_/g," ")}));this.tagSuggestions.set(i)}),j(o)).subscribe()}resetTagInput(){this.tag.setValue(""),this.tagSuggestions.set([])}loadOptionLists(){this.bookService.getAuthorTypes().pipe(v(o=>{o.hasError||!o.result||(this.authorTypes.set(o.result),this.roleTitles=o.result.map(e=>e.persianTitle),this.filteredRoles.set(this.roleTitles))})).subscribe(),this.bookService.getCoverTypes().pipe(v(o=>{o.hasError||!o.result||(this.covers=o.result.map(e=>e.title),this.filteredCovers.set(this.covers))})).subscribe(),this.bookService.getTracksForBooks().pipe(v(o=>{o.hasError||!o.result||(this.tracks=o.result.map(e=>e.title),this.filteredTracks.set(this.tracks))})).subscribe(),this.bookService.getLanguages().pipe(v(o=>{o.hasError||!o.result||(this.languages=o.result.map(e=>e.value),this.filteredLanguages.set(this.languages))})).subscribe()}filterCovers(o){this.filteredCovers.set(this.filterList(this.covers,o))}filterTracks(o){this.filteredTracks.set(this.filterList(this.tracks,o))}filterLanguages(o){this.filteredLanguages.set(this.filterList(this.languages,o))}filterList(o,e){return e?o.filter(i=>i.toLowerCase().includes(e.toLowerCase())):o}clearSuggestions(){this.authorBooks.set([]),this.authorSuggestions.set([]),this.publisherSuggestions.set([]),this.tagSuggestions.set([])}};n(u,"\u0275fac",function(e){return new(e||u)}),n(u,"\u0275prov",we({token:u,factory:u.\u0275fac}));let t=u;return t})();var ti=()=>[],ii=()=>[1],oi=()=>({height:"200px",width:"100%"}),ri=()=>({height:"40px",width:"100%"}),Ot=()=>({height:"40px",width:"310px"}),_e=()=>[0,1,2,3,4,5],xe=()=>({height:"168px",width:"100px"}),zt=(t,u,l)=>[t,u,l,".jpg",void 0,void 0,"sm"];function ni(t,u){t&1&&(a(0,"div",66)(1,"div",67),b(2,"ngx-skeleton-loader",68),r(),a(3,"div",69),b(4,"ngx-skeleton-loader",68),r(),a(5,"div",70)(6,"div",71),b(7,"ngx-skeleton-loader",72),r(),a(8,"div",73),b(9,"ngx-skeleton-loader",72),r()()()),t&2&&(d(2),g("theme",A(4,oi)),d(2),g("theme",A(5,ri)),d(3),g("theme",A(6,Ot)),d(2),g("theme",A(7,Ot)))}function ai(t,u){t&1&&(a(0,"div",7),F(1,ni,10,8,"div",66,$),r()),t&2&&(d(),T(A(0,ii)))}function li(t,u){t&1&&(a(0,"small",77),m(1,"\u0639\u0646\u0648\u0627\u0646 \u06A9\u062A\u0627\u0628 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F."),r())}function si(t,u){if(t&1){let l=E();a(0,"button",98),y("click",function(){x(l);let e=c(4);return k(e.showMoreBook())}),a(1,"span",99),m(2," \u0646\u0645\u0627\u06CC\u0634 \u0647\u0645\u0647 "),r(),b(3,"span",100),r()}}
3function ui(t,u){if(t&1&&(a(0,"div",92)(1,"span",96),m(2,"\u0627\u06AF\u0631 \u06A9\u062A\u0627\u0628\u062A\u0627\u0646 \u0631\u0627 \u0627\u06CC\u0646\u062C\u0627 \u0645\u06CC \u0628\u06CC\u0646\u06CC\u062F \u0627\u0646\u062A\u062E\u0627\u0628\u0634 \u06A9\u0646\u06CC\u062F."),r(),f(3,si,4,0,"button",97),r()),t&2){let l=c(3);d(3),_(l.titleSuggestions().length>8?3:-1)}}function di(t,u){t&1&&(a(0,"div",101),b(1,"ngx-skeleton-loader",102),r()),t&2&&(d(),g("theme",A(1,xe)))}function mi(t,u){t&1&&(a(0,"section",94),F(1,di,2,2,"div",101,$),r()),t&2&&(d(),T(A(0,_e)))}function pi(t,u){if(t&1&&(a(0,"swiper-slide",103),b(1,"beh-vertical-book-card",104),r()),t&2){let l=u.$implicit;d(),g("_book",l)("loading",!1)}}function ci(t,u){if(t&1&&(a(0,"swiper-container",95),F(1,pi,2,2,"swiper-slide",103,L),r()),t&2){let l=c(3);d(),T(l.titleSuggestions())}}function hi(t,u){if(t&1&&(a(0,"div",66),f(1,ui,4,1,"div",92),a(2,"div",93),f(3,mi,3,1,"section",94)(4,ci,3,0,"swiper-container",95),r()()),t&2){let l=c(2);d(),_(l.titleSuggestions().length>0?1:-1),d(2),_(l.titleLoading()?3:4)}}function gi(t,u){t&1&&(a(0,"small",82),m(1,"\u0634\u0627\u0628\u06A9 \u06A9\u062A\u0627\u0628 \u0631\u0627 \u062F\u0631\u0633\u062A \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F."),r())}function bi(t,u){t&1&&(a(0,"small",82),m(1," \u0634\u0627\u0628\u06A9 \u06A9\u062A\u0627\u0628 \u062A\u06A9\u0631\u0627\u0631\u06CC \u0645\u06CC \u0628\u0627\u0634\u062F."),r())}function Ci(t,u){t&1&&(a(0,"small",82),m(1,"\u0634\u0627\u0628\u06A9 \u06A9\u062A\u0627\u0628 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F."),r())}function fi(t,u){t&1&&(a(0,"small",82),m(1," \u0641\u0642\u0637 \u0645\u06CC\u062A\u0648\u0627\u0646\u062F \u0639\u062F\u062F \u0628\u0627\u0634\u062F. "),r())}function _i(t,u){t&1&&(a(0,"small",82),m(1,"\u062A\u0639\u062F\u0627\u062F \u0635\u0641\u062D\u0627\u062A \u06A9\u062A\u0627\u0628 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F."),r())}function xi(t,u){if(t&1){let l=E();a(0,"div",105)(1,"img",107),y("click",function(){x(l);let e=c(3);return k(e.onZoomImage())})("error",function(){x(l);let e=c(3);return k(e.onCoverLoadFailed())}),r(),a(2,"div",108)(3,"button",109),y("click",function(){x(l);let e=c(3);return k(e.onImageChange())}),m(4," \u062A\u063A\u06CC\u06CC\u0631 \u062A\u0635\u0648\u06CC\u0631 "),r(),a(5,"button",110),y("click",function(){x(l);let e=c(3);return k(e.onDeleteImage())}),b(6,"span",111),r()()()}if(t&2){let l=c(3);d(),g("src",l.croppedPicture,J)("alt",l.editBookDetailForm.controls.bookTitle.value)}}function ki(t,u){if(t&1){let l=E();a(0,"button",112),y("click",function(){x(l);let e=c(3);return k(e.onImageChange())}),b(1,"span",113),a(2,"span",114),m(3,"\u0627\u0641\u0632\u0648\u062F\u0646 \u062A\u0635\u0648\u06CC\u0631"),r()()}}function yi(t,u){if(t&1&&(a(0,"div",85),f(1,xi,7,2,"div",105)(2,ki,4,0,"button",106),r()),t&2){let l=c(2);d(),_(l.croppedPicture?1:2)}}function vi(t,u){t&1&&(a(0,"small",82),m(1,"\u062F\u0633\u062A\u0647\u200C\u0628\u0646\u062F\u06CC \u06A9\u062A\u0627\u0628 \u0631\u0627 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F."),r())}function wi(t,u){if(t&1){let l=E();a(0,"div",8)(1,"div",74)(2,"span",12),m(3," \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u06A9\u062A\u0627\u0628 "),r()(),a(4,"div",66)(5,"label",15),m(6,"\u0639\u0646\u0648\u0627\u0646 \u06A9\u062A\u0627\u0628 "),a(7,"span",75),m(8,"*"),r()(),a(9,"input",76),y("input",function(e){x(l);let i=c();return k(i.onTitleSearch(e.target.value))}),r(),f(10,li,2,0,"small",77),r(),f(11,hi,5,2,"div",66),a(12,"div",78)(13,"div",79)(14,"label",80),m(15,"\u0634\u0627\u0628\u06A9 "),a(16,"span",75),m(17,"*"),r()(),a(18,"input",81),y("input",function(e){x(l);let i=c();return k(i.onIsbnInput(e.target.value))}),r(),f(19,gi,2,0,"small",82),f(20,bi,2,0,"small",82),f(21,Ci,2,0,"small",82),r(),a(22,"div",83)(23,"label",80),m(24,"\u062A\u0639\u062F\u0627\u062F \u0635\u0641\u062D\u0627\u062A "),a(25,"span",75),m(26,"*"),r()(),b(27,"input",84),f(28,fi,2,0,"small",82),f(29,_i,2,0,"small",82),r()(),f(30,yi,3,1,"div",85),a(31,"div",86)(32,"label",80),m(33," \u062F\u0633\u062A\u0647\u200C\u0628\u0646\u062F\u06CC "),a(34,"span",75),m(35,"*"),r()(),a(36,"div",87),y("click",function(){x(l);let e=c();return k(e.onSelectCategory())}),b(37,"input",88)(38,"span",89),r(),a(39,"button",90),y("click",function(){x(l);let e=c();return k(e.onDeleteCategory())}),b(40,"span",91),r(),f(41,vi,2,0,"small",82),r()()}if(t&2){let l=c();d(10),_(l.editBookDetailForm.controls.bookTitle.hasError("required")&&l.editBookDetailForm.controls.bookTitle.touched?10:-1),d(),_(l.titleLoading()||l.titleSuggestions().length>0?11:-1),d(8),_(l.editBookDetailForm.controls.ISBN.hasError("pattern")&&!l.repeatIsbn()?19:-1),d(),_(l.repeatIsbn()?20:-1),d(),_(l.editBookDetailForm.controls.ISBN.hasError("required")&&l.editBookDetailForm.controls.ISBN.touched&&!l.repeatIsbn()?21:-1),d(7),_(l.editBookDetailForm.controls.pageCount.hasError("pattern")?28:-1),d(),_(l.editBookDetailForm.controls.pageCount.hasError("required")&&l.editBookDetailForm.controls.pageCount.touched?29:-1),d(),_(l.isBrowser?30:-1),d(9),g("disabled",!l.hasCategory),d(2),_(l.editBookDetailForm.controls.categoryBreadCrumb.hasError("required")&&l.editBookDetailForm.controls.categoryBreadCrumb.touched?41:-1)}}function Si(t,u){var l;if(t&1&&(a(0,"div",115),b(1,"img",116),de(2,"image"),a(3,"span",117),m(4),r()()),t&2){let o=u.$implicit,e=c();d(),g("src",me(2,3,ue(11,zt,(l=o.id)!=null?l:"",e.imageType.authorAvatar,o.hasPhoto)),J)("alt",o.firstName),d(3),U(o.firstName)}}function Bi(t,u){t&1&&(a(0,"small",20),m(1,"\u0645\u0624\u0644\u0641 \u0631\u0627 \u0645\u0634\u062E\u0635 \u06A9\u0646\u06CC\u062F."),r())}function Fi(t,u){t&1&&(a(0,"span",121),m(1," (\u062C\u062F\u06CC\u062F \u24D8)"),r())}function Ti(t,u){if(t&1){let l=E();a(0,"mat-chip",118),y("click",function(){let e=x(l).$index,i=c();return k(i.removeAuthor(e))}),a(1,"span",119),m(2),r(),b(3,"span",120),f(4,Fi,2,0,"span",121),r()}if(t&2){let l=u.$implicit,o=c();d(2),Ne("",l.name," (",o.roleLabel(l.type),")"),d(2),_(l.isNew?4:-1)}}function Ei(t,u){t&1&&(a(0,"div",22)(1,"div",122),b(2,"span",123),a(3,"p",124),m(4,"\u0628\u0627 \u0632\u062F\u0646 \u062F\u06A9\u0645\u0647\u0654 \xAB\u0630\u062E\u06CC\u0631\u0647\xBB \u0635\u0641\u062D\u0647\u0654 \u062C\u062F\u06CC\u062F\u06CC \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0645\u0624\u0644\u0641 \u0633\u0627\u062E\u062A\u0647 \u062E\u0648\u0627\u0647\u062F \u0634\u062F. "),r()()())}function Ai(t,u){t&1&&(a(0,"div",125),b(1,"ngx-skeleton-loader",102),r()),t&2&&(d(),g("theme",A(1,xe)))}function Ii(t,u){t&1&&(a(0,"section",24),F(1,Ai,2,2,"div",125,$),r()),t&2&&(d(),T(A(0,_e)))}function Di(t,u){if(t&1&&b(0,"app-slider-load-more",129),t&2){let l=c(2);g("Link",l.routes.profile)("ObjectId",l.authorRelatedDetail().id)}}function Ni(t,u){if(t&1&&(a(0,"swiper-slide",103),b(1,"beh-vertical-book-card",104),r()),t&2){let l=u.$implicit;d(),g("_book",l)("loading",!1)}}function Vi(t,u){if(t&1&&(a(0,"div",25)(1,"div",126)(2,"label",127),m(3,"\u0628\u0631\u062E\u06CC \u06A9\u062A\u0627\u0628\u200C\u0647\u0627\u06CC "),a(4,"span",128),m(5),r()(),f(6,Di,1,2,"app-slider-load-more",129),r(),a(7,"swiper-container",95),F(8,
3Ni,2,2,"swiper-slide",103,L),r()()),t&2){let l=c();d(5),U(l.authorRelatedDetail().firstName),d(),_(l.authorRelatedBooks().length>8?6:-1),d(2),T(l.authorRelatedBooks())}}function Li(t,u){var l;if(t&1&&(a(0,"div",115),b(1,"img",116),de(2,"image"),a(3,"span",117),m(4),r()()),t&2){let o=u.$implicit,e=c();d(),g("src",me(2,3,ue(11,zt,(l=o.id)!=null?l:"",e.imageType.publisherAvatar,o.hasPhoto)),J)("alt",o.title),d(3),U(o.title)}}function Pi(t,u){t&1&&(a(0,"span",121),m(1," (\u062C\u062F\u06CC\u062F \u24D8)"),r())}function Mi(t,u){if(t&1){let l=E();a(0,"mat-chip",130),y("click",function(){let e=x(l).$index,i=c();return k(i.removePublisher(e))}),a(1,"span",131),m(2),r(),f(3,Pi,2,0,"span",121),b(4,"span",132),r()}if(t&2){let l=u.$implicit;d(2),Q(" ",l.title),d(),_(l.isNew?3:-1)}}function Ri(t,u){t&1&&(a(0,"div",22)(1,"div",133),b(2,"span",123),a(3,"p",124),m(4,"\u0628\u0627 \u0632\u062F\u0646 \u062F\u06A9\u0645\u0647\u0654 \xAB\u0630\u062E\u06CC\u0631\u0647\xBB \u0635\u0641\u062D\u0647\u0654 \u062C\u062F\u06CC\u062F\u06CC \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0646\u0627\u0634\u0631 \u0633\u0627\u062E\u062A\u0647 \u062E\u0648\u0627\u0647\u062F \u0634\u062F. "),r()()())}function Oi(t,u){t&1&&(a(0,"div",125),b(1,"ngx-skeleton-loader",102),r()),t&2&&(d(),g("theme",A(1,xe)))}function ji(t,u){t&1&&(a(0,"section",24),F(1,Oi,2,2,"div",125,$),r()),t&2&&(d(),T(A(0,_e)))}function $i(t,u){if(t&1&&b(0,"app-slider-load-more",129),t&2){let l=c(2);g("Link",l.routes.profile)("ObjectId",l.publisherRelatedDetail().id)}}function Ui(t,u){if(t&1&&(a(0,"swiper-slide",103),b(1,"beh-vertical-book-card",104),r()),t&2){let l=u.$implicit;d(),g("_book",l)("loading",!1)}}function Gi(t,u){if(t&1&&(a(0,"div",25)(1,"div",126)(2,"label",127),m(3,"\u0628\u0631\u062E\u06CC \u06A9\u062A\u0627\u0628\u200C\u0647\u0627\u06CC "),a(4,"span",128),m(5),r()(),f(6,$i,1,2,"app-slider-load-more",129),r(),a(7,"swiper-container",95),F(8,Ui,2,2,"swiper-slide",103,L),r()()),t&2){let l=c();d(5),U(l.publisherRelatedDetail().title),d(),_(l.publisherRelatedBooks().length>8?6:-1),d(2),T(l.publisherRelatedBooks())}}function zi(t,u){t&1&&(a(0,"small",51),m(1," \u0641\u0642\u0637 \u0645\u06CC\u062A\u0648\u0627\u0646\u062F \u0639\u062F\u062F \u0628\u0627\u0634\u062F. "),r())}function Wi(t,u){t&1&&(a(0,"small",51),m(1,"\u0646\u0648\u0628\u062A \u0686\u0627\u067E \u0628\u0627\u06CC\u062F \u0628\u0632\u0631\u06AF\u200C\u062A\u0631 \u0627\u0632 \u0635\u0641\u0631 \u0628\u0627\u0634\u062F."),r())}function Hi(t,u){if(t&1){let l=E();a(0,"mat-chip",130),y("click",function(){let e=x(l).$implicit,i=c(2);return k(i.removeLanguage(e))}),a(1,"span",131),m(2),r(),b(3,"span",132),r()}if(t&2){let l=u.$implicit;d(2),U(l)}}function qi(t,u){if(t&1&&(a(0,"div",53)(1,"span",134),m(2,"\u0632\u0628\u0627\u0646\u200C\u0647\u0627\u06CC \u0627\u0646\u062A\u062E\u0627\u0628\u200C\u0634\u062F\u0647:"),r(),a(3,"mat-chip-listbox",25),F(4,Hi,4,1,"mat-chip",37,$),r()()),t&2){let l=c();d(4),T(l.selectedLanguageTypes)}}function Qi(t,u){t&1&&b(0,"span",61)}function Zi(t,u){if(t&1){let l=E();a(0,"li",136),y("click",function(){let e=x(l).$implicit,i=c(2);return k(i.addTag(e))}),m(1),r()}if(t&2){let l=u.$implicit;g("ngClass",l.isGenre?"text-green-600 font-semibold":"text-gray-700 dark:text-gray-200"),d(),Q(" ",l.title," ")}}function Ki(t,u){if(t&1&&(a(0,"ul",62),F(1,Zi,2,2,"li",135,L),r()),t&2){let l=c();d(),T(l.tagSuggestions())}}function Yi(t,u){t&1&&(a(0,"div",63),m(1," \u062A\u06AF\u06CC \u0628\u0627 \u0627\u06CC\u0646 \u0639\u0646\u0648\u0627\u0646 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"),r())}function Ji(t,u){if(t&1){let l=E();a(0,"mat-chip",130),y("click",function(){let e=x(l).$implicit,i=c();return k(i.removeTag(e))}),a(1,"span",131),m(2),r(),b(3,"span",132),r()}if(t&2){let l=u.$implicit;d(2),U(l)}}function Xi(t,u){if(t&1){let l=E();a(0,"div",65)(1,"button",137),y("click",function(){x(l);let e=c();return k(e.saveBook())}),m(2," \u0627\u0646\u062A\u0634\u0627\u0631 "),r()()}if(t&2){let l=c();d(),g("appButtonLoader",l.publishLoading)("disabled",l.publishButtonDisabled||l.publishLoading)}}var eo="^([0-9\u06F0\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669]{13})$",jt=/^-?(0|[1-9]\d*)?$/,to=/^-?([0Û°Ù ]|[1-9Û±-Û¹Ù¡-Ù©][0-9Û°-Û¹Ù -Ù©]*)?$/,io=1e3,$t="\u0627\u0636\u0627\u0641\u0647 \u06A9\u0631\u062F\u0646 \u06A9\u062A\u0627\u0628",oo="\u0648\u06CC\u0631\u0627\u06CC\u0634 \u06A9\u062A\u0627\u0628",ro=[{label:"16:9",value:16/9},{label:"3:2",value:3/2},{label:"\u0627\u0635\u0644\u06CC",value:null},{label:"3:4",value:3/4},{label:"1:1",value:1}],Ut="\u062A\u063A\u06CC\u06CC\u0631\u0627\u062A \u0634\u0645\u0627 \u062A\u0627 \u062F\u0642\u0627\u06CC\u0642\u06CC \u062F\u06CC\u06AF\u0631 \u0627\u0639\u0645\u0627\u0644 \u0645\u06CC\u200C\u0634\u0648\u062F.",Gt="\u062A\u0635\u0648\u06CC\u0631 \u06A9\u062A\u0627\u0628 \u0630\u062E\u06CC\u0631\u0647 \u0646\u0634\u062F\u060C \u062F\u0648\u0628\u0627\u0631\u0647 \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F.",Br=(()=>{let u=class u extends dt{constructor(){super();n(this,"router",S(je));n(this,"dialog",S(Ue));n(this,"bottomSheet",S($e));n(this,"formBuilder",S(Ye));n(this,"activatedRoute",S(Oe));n(this,"repository",S(Pe));n(this,"bookService",S(re));n(this,"fileService",S(Me));n(this,"bookAggregator",S(xt));n(this,"search",S(fe));n(this,"authorNameControl",this.search.authorName);n(this,"authorRoleControl",this.search.authorRole);n(this,"publisherControl",this.search.publisher);n(this,"tagControl",this.search.tag);n(this,"authorDisplay",e=>{var i;return(i=e==null?void 0:e.firstName)!=null?i:""});n(this,"publisherDisplay",e=>{var i;return(i=e==null?void 0:e.title)!=null?i:""});n(this,"routes",ce);n(this,"imageType",lt);n(this,"headerConfig",{title:$t,actionButton:!1});n(this,"loading",!1);n(this,"publishLoading",!1);n(this,"publishButtonDisabled",!0);n(this,"isEditMode",!1);n(this,"bookId");n(this,"maxDate");n(this,"editBookDetailForm");n(this,"book",new ne);n(this,"selectedLanguageTypes",[]);n(this,"categoryBreadCrumb",[]);n(this,"categoryId","");n(this,"deletedAuthorIds",[]);n(this,"deletedPublisherIds",[]);n(this,"croppedPicture");n(this,"uploadableImage");n(this,"deleteImage",!1);n(this,"offFormChanged",!1);n(this,"titleSuggestions",this.search.titleSuggestions);n(this,"titleLoading",this.search.titleLoading);n(this,"repeatIsbn",this.search.repeatIsbn);n(this,"authorSuggestions",this.search.authorSuggestions);n(this,"roleOptions",this.search.filteredRoles);n(this,"authorRelatedBooks",this.search.authorBooks);n(this,"authorRelatedDetail",this.search.authorBooksDetail);n(this,"authorRelatedLoading",this.search.authorBooksLoading);n(this,"publisherSuggestions",this.search.publisherSuggestions);n(this,"publisherRelatedBooks",this.search.publisherBooks);n(this,"publisherRelatedDetail",this.search.publisherBooksDetail);n(this,"publisherRelatedLoading",this.search.publisherBooksLoading);n(this,"coverOptions",this.search.filteredCovers);n(this,"trackOptions",this.search.filteredTracks);n(this,"languageOptions",this.search.filteredLanguages);n(this,"tagSuggestions",this.search.tagSuggestions);n(this,"tagLoading",this.search.tagLoading);this.editBookDetailForm=this.formBuilder.group({bookTitle:[null,I.required],ISBN:[null,[I.required,I.pattern(eo)]],pageCount:[null,[I.required,I.pattern(jt)]],printedCount:[null,[I.pattern(jt),I.min(1)]],circulation:[null],publishTime:[null],serieNumber:[null,[I.minLength(1),I.pattern(to)]],description:[null],coverType:[null],track:[null],langulageValue:[null],genres:[null],author:[null,I.required],publishers:[null],categoryBreadCrumb:[null,I.required]})}get isBrowser(){return this.repository.IsInBrowser}get hasPendingChanges(){return this.editBookDetailForm.dirty||this.offFormChanged}roleLabel(e){return e?this.search.roleTitle(e):""}onTitleSearch(e){this.search.searchTitle(e)}onIsbnInput(e){this.search.checkIsbn(e)}onAuthorSelected(e){this.search.loadAuthorBooks(e)}onPublisherPreview(e){this.search.loadPublisherBooks(e)}onCoverSearch(e){this.search.filterCovers(e)}onTrackSearch(e){this.search.filterTracks(e)}onLanguageSearch(e){this.search.filterLanguages(e)}onTagSearch(e){this.search.searchTags(e)}get isTemporaryBook(){return this.book.submitType===ae.Temporary}get imageFolder(){return this.isTemporaryBook?"tempbooks":"books"}get hasCategory(){return this.categoryBreadCrumb.length>0}get authors(){var e;return(e=this.editBookDetailForm.controls.author.value)!=null?e:[]}get publishers(){var e;return(e=this.editBookDetailForm.controls.publishers.value)!=null?e:[]}get hasNewAuthors(){return this.authors.some(e=>e.isNew)}get hasNewPublishers(){return this.publishers.some(e=>e.isNew)}ngOnInit(){Je().catch(()=>{}),this.maxDate=new Date,this.search.init(this.unsubscribe$),this.subscriptions.push(this.search.isbnDuplicate.pipe(v(e=>this.onIsbnDuplicate(e))).subscribe()),this.watchFormValidity(),this.initMode()}initMode(){this.subscriptions.push(this.activatedRoute.queryParams.pipe(N(e=>e.bookId?(this.isEditMode=!0,this.headerConfig=O(R({},this.headerConfig),{title:oo}),this.bookId=e.bookId,this.loadBook(this.bookId)):(this.isEditMode=!1,this.headerConfig=O(R({},this.headerConfig),{title:$t}),e.isbn&&(this.editBookDetailForm.controls.ISBN.setValue(e.isbn),this.search.checkIsbn(e.isbn)),V(null)))).subscribe())}
3loadBook(e){return this.loading=!0,this.bookAggregator.getWithRequestIncluded(e).pipe(v(i=>{var s,p,h,C;i.hasError||!i.result||(this.book=i.result,this.deletedAuthorIds=[],this.deletedPublisherIds=[],this.categoryBreadCrumb=(s=this.book.categoryBreadCrumb)!=null?s:[],this.categoryId=(h=(p=this.categoryBreadCrumb[this.categoryBreadCrumb.length-1])==null?void 0:p.categoryId)!=null?h:"",this.selectedLanguageTypes=this.book.langulageValue?this.book.langulageValue.split("/"):[],this.croppedPicture=this.book.id?this.bustCache(this.utilFunctions.getImages(this.isTemporaryBook?10:2,this.book.id,".jpg","sm")):"",this.search.setLoadedBook((C=this.book.isbn)!=null?C:"",this.book.id),this.patchFormFromBook())}),N(()=>this.bookService.canEditBook(this.bookId)),v(i=>{!i.hasError&&!i.result&&this.blockEditAccess(),this.loading=!1}))}patchFormFromBook(){var i,s,p,h;let e=this.book;this.editBookDetailForm.patchValue({bookTitle:e.name,ISBN:e.isbn,pageCount:e.pageCount,printedCount:((i=e.printedCount)!=null?i:0)>0?e.printedCount:1,circulation:e.circulation,publishTime:e.publishedDate,serie
3Number:e.serieNumber,description:e.description,coverType:e.coverType,track:e.track,author:(s=e.authors)!=null?s:[],publishers:(p=e.publishers)!=null?p:[],genres:((h=e.genres)!=null?h:[]).map(C=>C.replace(/_/g," ")),categoryBreadCrumb:this.categoryBreadCrumb.map(C=>C.title).join(" > ")||null}),this.editBookDetailForm.invalid&&this.editBookDetailForm.markAllAsTouched(),this.refreshPublishState()}blockEditAccess(){this.publishButtonDisabled=!0,this.dialog.open(It,{panelClass:"basic-dialog",disableClose:!0,closeOnNavigation:!0}).afterClosed().pipe(v(()=>this.router.navigate([ce.book,this.bookId]))).subscribe()}watchFormValidity(){this.subscriptions.push(this.editBookDetailForm.valueChanges.pipe(v(()=>this.refreshPublishState())).subscribe())}refreshPublishState(){this.publishButtonDisabled=this.editBookDetailForm.invalid||this.repeatIsbn()||!this.hasPendingChanges}markChanged(e){e?this.editBookDetailForm.controls[e].markAsDirty():this.offFormChanged=!0,this.refreshPublishState()}onIsbnDuplicate(e){this.publishButtonDisabled=!0;let i={booksuggId:e.id,createDefault:!0};this.repository.IsInMobile?this.bottomSheet.open(Et,{panelClass:"book-bottom-sheet",closeOnNavigation:!0,data:i}):this.dialog.open(Tt,{width:"600px",height:"350px",panelClass:"basic-dialog",data:i})}showMoreBook(){this.router.navigate([this.routes.search],{queryParams:{q:this.search.lastTitleTerm,category:"books"}})}addAuthor(){var h,C,w,H;let e=(h=this.authorNameControl.value)==null?void 0:h.trim(),i=(C=this.search.authorTypes().find(P=>P.persianTitle===this.authorRoleControl.value))==null?void 0:C.title;if(!e||!i)return;let s=(H=(w=this.search.selectedAuthor)==null?void 0:w.id)!=null?H:null;if(s&&this.authors.some(P=>P.name===e&&P.id===s)){this.snackbarService.openSnackbar(D.error,"\u0627\u06CC\u0646 \u0645\u0624\u0644\u0641 \u0642\u0628\u0644\u0627\u064B \u0627\u0636\u0627\u0641\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A.");return}let p={id:s,name:e,type:i,bookId:"",isNew:!s};this.setAuthors([...this.authors,p]),this.search.resetAuthorInput()}removeAuthor(e){let i=this.authors[e];i&&(i.id&&this.deletedAuthorIds.push(i.id),this.setAuthors(this.authors.filter((s,p)=>p!==e)))}setAuthors(e){this.markChanged("author"),this.editBookDetailForm.controls.author.setValue(e.length?e:null)}selectPublisher(e){if(this.onPublisherPreview(e),this.publishers.some(s=>s.id===e.id)){this.publisherControl.setValue(""),this.snackbarService.openSnackbar(D.error,"\u0627\u06CC\u0646 \u0646\u0627\u0634\u0631 \u0642\u0628\u0644\u0627\u064B \u0627\u0636\u0627\u0641\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A.");return}let i=new ge;i.id=e.id,i.title=e.title,i.bookId="",i.isNew=!1,this.setPublishers([...this.publishers,i]),this.search.resetPublisherInput()}addPublisher(e){let i=e==null?void 0:e.trim();if(!i)return;if(this.publishers.some(p=>p.isNew&&p.title===i)){this.snackbarService.openSnackbar(D.error,"\u0627\u06CC\u0646 \u0646\u0627\u0634\u0631 \u0642\u0628\u0644\u0627\u064B \u0627\u0636\u0627\u0641\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A.");return}let s=new ge;s.title=i,s.bookId="",s.isNew=!0,this.setPublishers([...this.publishers,s]),this.search.resetPublisherInput()}removePublisher(e){let i=this.publishers[e];i&&(i.id&&this.deletedPublisherIds.push(i.id),this.setPublishers(this.publishers.filter((s,p)=>p!==e)))}setPublishers(e){this.markChanged("publishers"),this.editBookDetailForm.controls.publishers.setValue(e)}selectLanguage(e){this.selectedLanguageTypes.includes(e)?this.snackbarService.openSnackbar(D.error,"\u0627\u06CC\u0646 \u0632\u0628\u0627\u0646 \u0642\u0628\u0644\u0627\u064B \u0627\u0636\u0627\u0641\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A."):(this.selectedLanguageTypes.push(e),this.markChanged()),this.editBookDetailForm.controls.langulageValue.reset()}removeLanguage(e){this.selectedLanguageTypes=this.selectedLanguageTypes.filter(i=>i!==e),this.markChanged()}addTag(e){let i=this.editBookDetailForm.get("genres"),s=e.title.replace(/_/g," "),p=Array.isArray(i==null?void 0:i.value)?i.value:[];if(p.includes(s)){this.snackbarService.openSnackbar(D.error,"\u0627\u06CC\u0646 \u062A\u06AF \u062A\u06A9\u0631\u0627\u0631\u06CC \u0627\u0633\u062A \u0642\u0628\u0644\u0627 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0631\u062F\u0647 \u0627\u06CC\u062F");return}this.markChanged("genres"),i==null||i.setValue([...p,s]),this.search.resetTagInput()}removeTag(e){var p,h,C;let i=[...(h=(p=this.editBookDetailForm.get("genres"))==null?void 0:p.value)!=null?h:[]],s=i.indexOf(e);s>=0&&i.splice(s,1),this.markChanged("genres"),(C=this.editBookDetailForm.get("genres"))==null||C.setValue(i)}onSelectCategory(){this.dialog.open(At,{panelClass:"basic-dialog"}).afterClosed().pipe(v(e=>this.onCategorySelected(e))).subscribe()}onCategorySelected(e){this.editBookDetailForm.controls.categoryBreadCrumb.markAsTouched(),e!=null&&e.length&&(this.categoryId=e[e.length-1].id,this.markChanged("categoryBreadCrumb"),this.editBookDetailForm.controls.categoryBreadCrumb.setValue(e.map(i=>i.title).join(" > ")),this.categoryBreadCrumb=e.map(i=>{var s;return{categoryId:i.id,title:i.title,translations:((s=i.translations)!=null?s:[]).map(p=>({key:p.key,value:p.value}))}}))}onDeleteCategory(){let e={title:"\u0645\u06CC\u200C\u062E\u0648\u0627\u0647\u06CC\u062F \u062F\u0633\u062A\u0647\u200C\u0628\u0646\u062F\u06CC \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F\u061F",cancelButtonText:"\u062E\u06CC\u0631",confirmButtonText:"\u0628\u0644\u0647"};this.utilFunctions.ConfirmAlert(bt,this.bottomSheet,this.dialog,e,this.repository).pipe(v(i=>{i&&(this.markChanged("categoryBreadCrumb"),this.editBookDetailForm.controls.categoryBreadCrumb.setValue(null),this.editBookDetailForm.controls.categoryBreadCrumb.markAsTouched(),this.categoryBreadCrumb=[],this.categoryId="")})).subscribe()}onImageChange(){if(!this.repository.IsInBrowser)return;let e=this.dialog.open(ht,{panelClass:"cropper-container",data:{aspect_ratio:ct.tall_rectangle_1_2,fromQuote:!1,fileType:"products",ratioOptions:ro}});this.subscriptions.push(e.afterClosed().pipe(v(i=>{i&&(this.croppedPicture=i.base64?"data:image/webp;base64,".concat(i.base64):i.croppedImageData,this.uploadableImage=i.base64,this.deleteImage=!1,this.markChanged())})).subscribe())}bustCache(e){return"".concat(e).concat(e.includes("?")?"&":"?","t=").concat(Date.now())}onCoverLoadFailed(){this.croppedPicture=""}onDeleteImage(){this.deleteImage=!0,this.croppedPicture="",this.uploadableImage="",this.markChanged(),this.snackbarService.openSnackbar(D.success,"\u0639\u06A9\u0633 \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u062D\u0630\u0641 \u0634\u062F")}onZoomImage(){var e,i;this.dialog.open(Ft,{panelClass:"full-dialog",data:{id:(e=this.book)==null?void 0:e.id,migrateImg:this.croppedPicture,title:(i=this.book)==null?void 0:i.name,hasPhoto:!!this.croppedPicture}})}saveBook(){this.isEditMode?this.updateExistingBook():this.createNewBook()}createNewBook(){this.publishLoading=!0,this.bookAggregator.CreateBook(this.buildCreatePayload()).pipe(v(e=>{var i;this.publishLoading=!1,this.book.id=(i=e.result)==null?void 0:i.bookId}),N(e=>e.hasError||!e.result||!this.uploadableImage?V(null):this.fileService.uploadFile(this.uploadableImage,e.result.bookType===ae.Temporary?"tempbooks":"books",e.result.bookId)),v(()=>{var e,i;this.snackbarService.openSnackbar(D.success,Ut),this.navigateAfterSave(!!((e=this.currentUser)!=null&&e.isLibrarian||(i=this.currentUser)!=null&&i.isAdmin))})).subscribe()}updateExistingBook(){this.publishLoading=!0,this.bookAggregator.updateBook(this.buildUp
3datePayload()).pipe(N(e=>e.hasError?(this.snackbarService.openSnackbar(D.error,"\u0645\u062A\u0627\u0633\u0641\u0627\u0646\u0647 \u062E\u0637\u0627\u06CC\u06CC \u0631\u062E \u062F\u0627\u062F\u0647 \u0627\u0633\u062A."),ke):(this.snackbarService.openSnackbar(D.success,Ut),this.uploadImageStream(this.imageFolder))),W(()=>{this.publishLoading=!1,setTimeout(()=>this.navigateAfterSave(this.book.submitType===ae.Added),io)})).subscribe()}uploadImageStream(e){let i=this.uploadableImage?this.fileService.UploadBookImage(this.uploadableImage,e,this.book.id):this.deleteImage?this.fileService.deleteBookImage(this.book.id,e):null;return i?i.pipe(v(s=>{s!=null&&s.hasError&&this.snackbarService.openSnackbar(D.error,Gt)}),G(()=>(this.snackbarService.openSnackbar(D.error,Gt),V(null)))):V(null)}navigateAfterSave(e){this.router.navigate(e?[this.routes.book,this.book.id]:[Re.addedBooks])}toEnglishDigits(e){return e?this.utilFunctions.replaceFaNumbers(e):""}toNumber(e){if(e==null||e==="")return;let i=Number(this.toEnglishDigits(String(e)));return Number.isFinite(i)?i:void 0}buildCommonFields(){var p;let e=this.editBookDetailForm.getRawValue(),i=this.selectedLanguageTypes.join("/"),s=((p=e.genres)!=null?p:[]).map(h=>h.replace(/ /g,"_"));return{name:e.bookTitle,isbn:this.toEnglishDigits(e.ISBN),description:e.description,coverType:e.coverType,track:e.track,serieNumber:this.toNumber(e.serieNumber),publishedDate:e.publishTime,langulageValue:i,langulageSymbole:i,genres:s,categoryId:this.categoryId}}buildCreatePayload(){let e=this.editBookDetailForm.getRawValue(),i=this.toNumber(e.printedCount)||1,s=e.publishTime;return O(R({},this.buildCommonFields()),{pageCount:this.toNumber(e.pageCount),circulation:this.toNumber(e.circulation),printedCount:i,currentPrintedNumber:i,firstPrintedDate:s,lastPrintedDate:s,categoryBreadCrumb:this.categoryBreadCrumb,authors:this.authors.map(p=>({id:p.id,name:p.name,type:p.type,bookId:""})),publishers:this.publishers.map(p=>{var h,C;return{id:(h=p.id)!=null?h:"",title:(C=p.title)!=null?C:"",bookId:"",isNew:p.isNew}})})}buildUpdatePayload(){var p,h,C,w,H,P;let e=this.editBookDetailForm.getRawValue(),i=this.authors.map(M=>M.id),s=this.publishers.map(M=>M.id);return O(R({},this.buildCommonFields()),{id:this.book.id,isbnConverted:(p=this.book.isbnConverted)!=null?p:"",pageCount:(h=this.toNumber(e.pageCount))!=null?h:0,circulation:(C=this.toNumber(e.circulation))!=null?C:0,printedCount:(w=this.toNumber(e.printedCount))!=null?w:1,currentPrintedNumber:this.book.printedCount,firstPrintedDate:(H=this.book.firstPrintedDate)!=null?H:"",lastPrintedDate:(P=this.book.lastPrintedDate)!=null?P:"",authors:this.authors,publishers:this.publishers,deletedAuthors:this.deletedAuthorIds.filter(M=>!i.includes(M)),deletedPublishers:this.deletedPublisherIds.filter(M=>!s.includes(M))})}};n(u,"\u0275fac",function(i){return new(i||u)}),n(u,"\u0275cmp",X({type:u,selectors:[["book-form"]],hostAttrs:["ngSkipHydration","true"],features:[te([fe]),Fe],decls:119,vars:31,consts:[["item",""],["picker",""],["tagInput",""],[1,"w-full","flex","flex-wrap"],[1,"w-full","flex","flex-wrap","relative"],[1,"sticky","top-0","z-30","bg-white","dark:bg-gray-900","shadow-sm",3,"_Config"],[1,"w-full","flex","flex-wrap","pb-12",3,"formGroup"],[1,"w-full","flex","py-2","justify-center","relative","behkhaan-container","mt-4"],[1,"w-full","my-2","flex","flex-wrap","px-4"],[1,"w-full","my-4","px-4","flex","flex-wrap","dark:!bg-gray-900"],[1,"w-full","mt-2","pt-5","mb-4","border-t","border-gray-100","dark:border-gray-800"],[1,"w-full","flex","flex-wrap","items-center","justify-between","mb-2"],[1,"text-lg","md:text-xl","font-medium","text-gray-800"],[1,"w-full","flex","flex-wrap","items-end","justify-between"],[1,"max-md:w-full","md:flex-1","ml-1","p-0"],[1,"block","mb-1.5","text-sm","text-gray-800"],["placeholder","\u0645\u062B\u0627\u0644: \u0635\u0627\u062F\u0642 \u0647\u062F\u0627\u06CC\u062A","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"selected","formControl","items","displayWith"],["placeholder","\u0645\u062B\u0627\u0644: \u0646\u0648\u06CC\u0633\u0646\u062F\u0647","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"formControl","items"],["type","button",1,"btn-green-flat","disabled:bg-gray-200","dark:disabled:bg-gray-700","max-md:mt-4","w-20","md:w-24","h-9","md:h-10","px-2","mr-1",3,"click","disabled"],[1,"w-full","mt-4","flex","flex-wrap","text-gray-900","text-xs","md:text-base"],[1,"w-full","text-xs","font-medium","mat-error","mb-2","text-red-700","dark:text-red-600"],[1,"curs
3or-pointer","rounded-xl","flex","items-center","!bg-gray-200","dark:!bg-gray-700"],[1,"w-full","mt-4"],[1,"w-full","flex","p-0","my-2","min-w-0","overflow-hidden"],[1,"flex","activity-container","py-2","justify-between"],[1,"w-full"],[1,"w-full","flex","flex-wrap","items-end"],[1,"w-full","flex","flex-wrap","justify-between","items-end"],[1,"w-full","md:grow","md:w-auto","flex","flex-wrap","mt-4","items-end"],["placeholder","\u0645\u062B\u0627\u0644: \u0646\u0634\u0631 \u0627\u0637\u0631\u0627\u0641","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"selected","formControl","items","displayWith"],[1,"flex","items-center","justify-center","btn-green","text-sm","w-24","h-10","md:mx-2"],[1,"w-full","md:grow","md:w-auto","mt-4"],[1,"flex","justify-between","items-center","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","pr-2","date-hover",3,"click"],["readonly","","formControlName","publishTime","type","text","placeholder","\u0645\u062B\u0627\u0644: 1380/1/18",1,"flex-1","p-2","bg-transparent","text-gray-500","md:!text-sm",3,"max","matDatepicker"],["tabindex","-1","matSuffix","",1,"text-center",3,"for"],["tabindex","-1","panelClass","book-form-calendar"],[1,"flex","flex-wrap","w-full","justify-start","items-end","p-0","mt-2","sm:mb-4","text-gray-900"],[1,"cursor-pointer","!bg-gray-200","dark:!bg-gray-700","rounded-xl"],[1,"w-full","flex","p-0","mb-4","min-w-0","overflow-hidden"],[1,"w-full","mt-2","pt-5","mb-12","border-t","border-gray-100","dark:border-gray-800"],[1,"w-full","my-2","flex","flex-wrap"],[1,"description-container","w-full","flex","flex-wrap","mb-2"],["name","description","formControlName","description","placeholder","\u0645\u062A\u0646 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F.",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","h-40","w-full","text-sm","md:text-base","!leading-[1.7rem]","md:!leading-8"],[1,"w-full","sm:w-3/12","p-0","titles-container","max-md:mb-4"],["formControlName","serieNumber","StandardNumber","","type","text","inputmode","numeric","placeholder","\u0645\u062B\u0627\u0644: 100","oninput","this.value = this.value.replace(/[^0-9\u06F0-\u06F9\u0660-\u0669]/g, '');",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","w-full","md:!text-sm"],[1,"w-full","sm:w-3/12","p-0","sm:mx-4","mb-4"],["formControlName","track","placeholder","\u0645\u062B\u0627\u0644: \u062C\u0639\u0628\u0647\u200C\u0627\u06CC","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"search","items"],[1,"w-full","sm:w-3/12","p-0","mb-4"],["formControlName","coverType","placeholder","\u0645\u062B\u0627\u0644: \u06A9\u0627\u063A\u0630\u06CC","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"search","items"],["formControlName","langulageValue","placeholder","\u0645\u062B\u0627\u0644: \u0641\u0627\u0631\u0633\u06CC","inputClass","bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-3 py-2 text-gray-500 w-full md:!text-sm",3,"search","selected","items"],["formControlName","printedCount","StandardNumber","","type","text","inputmode","numeric","placeholder","\u0645\u062B\u0627\u0644: 2","oninput","this.value = this.value.replace(/[^0-9\u06F0-\u06F9\u0660-\u0669]/g, '');",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","w-full","md:!text-sm"],[1,"text-xs","font-medium","mat-error","mr-3","text-red-700","dark:text-red-600"],["formControlName","circulation","StandardNumber","","type","text","inputmode","numeric","placeholder","\u0645\u062B\u0627\u0644: 100","oninput","this.value = this.value.replace(/[^0-9\u06F0-\u06F9\u0660-\u0669]/g, '');",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","w-full","md:!text-sm"],[1,"mt-3","w-full"],[1,"w-full","text-sm","md:text-base","text-gray-600","dark:text-gray-300","mt-3"],[1,"w-full","flex","flex-wrap","my-2"],[1,"w-full","text-lg","md:text-xl","font-medium","text-gray-800","my-2","ml-2"],[1,"text-xs","font-medium","text-gray-400","my-1"],[1,"w-full","mt-2"],[1,"flex","items-center","gap-2","min-h-[46px]","px-3","rounded-lg","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","transition-colors","focus-within:border-green-500"],["type","text","placeholder","\u062A\u06AF \u062C\u062F\u06CC\u062F ...","autocomplete","off",1,"flex-1","border-none","bg-transparent","outline-none","py-3","px-0.5","text-sm","text-gray-700","dark:text-gray-200","placeholder:text-gray-400",3,"input","formControl"],[1,"shrink-0","w-4","h-4","rounded-full","border-2","border-gray-300","border-t-green-500","animate-spin"],[1,"w-full","mt-1.5","p-1.5","max-h-60","overflow-y-auto","list-none","rounded-xl","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","shadow-xl"],[1,"w-full","mt-1.5","p-3","rounded-xl","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","shadow-xl","text-gray-400","text-[13px]"],[1,"w-full","mt-3"],[1,"sticky","bottom-0","z-40","w-full","px-4","py-3","bg-white","dark:bg-gray-900","border-t","border-gray-100","dark:border-gray-700"],[1,"w-full","mb-4"],[1,"w-full","mt-12"],["count","1",3,"theme"],[1,"w-full","mt-4","mb-12"],[1,"w-full","flex","justify-between","flex-wrap","mt-12"],[1,"w-1/2"],["count","1",1,"flex",3,"theme"],[1,"w-1/2","pr-4"],[1,"w-full","mb-2","flex","flex-wrap","items-center","justify-between"],[1,"text-red-700","dark:text-red-600"],["formControlName","bookTitle","type","text","placeholder","\u0645\u062B\u0627\u0644: \u0622\u0644\u06CC\u0633 \u062F\u0631 \u0633\u0631\u0632\u0645\u06CC\u0646 \u0639\u062C\u0627\u06CC\u0628",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","text-gray-500","w-full","rounded-lg","px-3","py-2","md:!text-sm","placeholder-gray-300",3,"input"],[1,"block","mt-1.5","text-xs","font-medium","mat-error","mr-3","text-red-700","dark:text-red-600"],[1,"w-full","mb-4","flex","items-start","flex-wrap"],[1,"w-6/12","pl-2","flex","flex-wrap"],[1,"w-full","mb-1.5","text-sm","text-gray-900"],["formControlName","ISBN","StandardNumber","","type","text","inputmode","numeric","oninput","this.value = this.value.replace(/[^0-9\u06F0-\u06F9\u0660-\u0669]/g, '');","placeholder","\u0645\u062B\u0627\u0644: 9789643256012",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","placeholder-gray-300","w-full","md:!text-sm",3,"input"],[1,"w-full","mt-1.5","text-xs","font-medium","mat-error","mr-3","text-red-700","dark:text-red-600"],[1,"w-6/12","pr-2","flex","flex-wrap"],["formControlName","pageCount","StandardNumber","","type","text","inputmode","numeric","placeholder","\u0645\u062B\u0627\u0644:2
300","oninput","this.value = this.value.replace(/[^0-9\u06F0-\u06F9\u0660-\u0669]/g, '');",1,"bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","px-3","py-2","text-gray-500","placeholder-gray-300","w-full","md:!text-sm"],[1,"w-full","mb-4","flex","justify-center"],[1,"w-full","mb-4","flex","items-center","flex-wrap"],[1,"flex-1","flex","justify-between","items-center","h-fit","bg-white","dark:bg-gray-800","border","border-gray-200","dark:border-gray-700","rounded-lg","text-gray-500","cursor-pointer",3,"click"],["type","text","readonly","","placeholder","\u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F...","formControlName","categoryBreadCrumb",1,"w-full","cursor-pointer","bg-transparent","border-none","md:!text-sm","px-4","py-2"],[1,"pl-2","icon","icon-lg","chevron-left-regular"],["type","button","matTooltip","\u062D\u0630\u0641","matTooltipClass","text-xs",1,"btn-red","hover:bg-red-50","rounded-md","px-2","flex","items-center","justify-center","border-none","mr-2","disabled:!bg-transparent","disabled:text-gray-400","dark:disabled:text-gray-500","disabled:cursor-not-allowed",3,"click","disabled"],[1,"icon","icon-md","delete-regular"],[1,"flex","justify-between","w-full","mb-2"],[1,"w-full","flex","min-w-0","overflow-hidden"],[1,"flex","activity-container","justify-between","overflow-hidden"],["slides-per-view","auto","navigation","true","observer","true","observe-parents","true","lazy","true",1,"!w-full","min-w-0","max-w-full"],[1,"text-sm","md:text-base","text-gray-500"],[1,"text-base","cursor-pointer","p-0","flex","items-center","text-green-500","dark:text-green-400","hover:text-green-600","dark:hover:text-green-300"],[1,"text-base","cursor-pointer","p-0","flex","items-center","text-green-500","dark:text-green-400","hover:text-green-600","dark:hover:text-green-300",3,"click"],[1,"text-xs","md:text-sm","font-medium"],[1,"icon","chevron-left-regular","icon-sm"],[1,"skeleton","activity-loader-container","ml-3"],[1,"flex",3,"theme"],[1,"!w-[115px]","border-e","border-gray-200","dark:border-gray-700","px-1"],[3,"_book","loading"],[1,"flex","flex-col","items-center","gap-3"],["tabindex","-1","type","button",1,"w-[150px]","h-[185px]","flex","flex-col","items-center","justify-center","gap-2","rounded-xl","border-2","border-dashed","border-gray-300","dark:border-gray-600","text-gray-400","hover:border-green-500","hover:text-green-600","transition-colors"],["loading","lazy",1,"w-[120px]","h-[170px]","object-cover","rounded-xl","shadow-sm","ring-1","ring-gray-200","dark:ring-gray-700","cursor-pointer","transition-transform","hover:scale-[1.02]",3,"click","error","src","alt"],[1,"flex","items-center","gap-2","w-[120px]"],["type","button",1,"btn-green-flat","h-9","!px-2","!py-0","!text-xs",3,"click"],["type","button","matTooltip","\u062D\u0630\u0641 \u0639\u06A9\u0633","matTooltipClass","text-xs",1,"inline-flex","items-center","justify-center","h-9","w-9","rounded-lg","text-red-600","border","border-red-500/30","hover:bg-red-50","dark:hover:bg-red-500/10","transition-colors",3,"click"],[1,"icon","delete-regular","text-sm"],["tabindex","-1","type","button",1,"w-[150px]","h-[185px]","flex","flex-col","items-center","justify-center","gap-2","rounded-xl","border-2","border-dashed","border-gray-300","dark:border-gray-600","text-gray-400","hover:border-green-500","hover:text-green-600","transition-colors",3,"click"],[1,"icon","image-regular","text-2xl"],[1,"text-xs","font-medium"],[1,"flex","items-center","gap-2"],["loading","lazy","onerror","this.src='https://storage.behkhaan.ir/assets/images/default/default_avatar.svg'",1,"w-9","h-9","rounded-full",3,"src","alt"],[1,"text-xs","text-gray-500"],[1,"cursor-pointer","rounded-xl","flex","items-center","!bg-gray-200","dark:!bg-gray-700",3,"click"],[1,"text-gray-900","text-xs","ml-2"],[1,"icon","dismiss-regular","text-sm","text-gray-900"],[1,"text-xs","text-yellow-800","mr-1"],[1,"w-fit","bg-yellow-700/5","flex","items-center","justify-start","rounded-lg","px-4","py-3"],[1,"icon","info-regular","text-lg","text-yellow-800","ml-2"],[1,"text-yellow-800","text-sm"],[1,"skeleton","mb-4","activity-loader-container","ml-3"],[1,"flex","justify-between"],[1,"text-sm","text-gray-800"],[1,"text-base","font-medium"],[1,"card--book",3,"Link","ObjectId"],[1,"curs
3or-pointer","!bg-gray-200","dark:!bg-gray-700","rounded-xl",3,"click"],[1,"text-xs","text-gray-900"],[1,"icon","dismiss-regular","text-sm","text-gray-900","mr-2"],[1,"bg-yellow-700/5","flex","items-center","justify-start","w-fit","rounded-lg","px-4","py-3"],[1,"block","text-xs","text-gray-500","mb-2"],[1,"px-3","py-2.5","rounded-lg","cursor-pointer","text-sm","transition-colors","hover:bg-gray-100","dark:hover:bg-gray-700/60",3,"ngClass"],[1,"px-3","py-2.5","rounded-lg","cursor-pointer","text-sm","transition-colors","hover:bg-gray-100","dark:hover:bg-gray-700/60",3,"click","ngClass"],[1,"btn-green-flat","w-full","h-10","!font-medium",3,"click","appButtonLoader","disabled"]],template:function(i,s){var p;if(i&1){let h=E();a(0,"section",3)(1,"article",4),b(2,"app-header",5),a(3,"div",3)(4,"form",6),f(5,ai,3,1,"div",7)(6,wi,42,10,"div",8),a(7,"div",9)(8,"section",10)(9,"div",11)(10,"span",12),m(11," \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0645\u0624\u0644\u0641 "),r()(),a(12,"div",13)(13,"div",14)(14,"label",15),m(15," \u0645\u0624\u0644\u0641 "),r(),a(16,"beh-dropdown",16),y("selected",function(w){return x(h),k(s.onAuthorSelected(w))}),se(17,Si,5,15,"ng-template",null,0,pe),r()(),a(19,"div",14)(20,"label",15),m(21,"\u0646\u0642\u0634"),r(),b(22,"beh-dropdown",17),r(),a(23,"button",18),y("click",function(){return x(h),k(s.addAuthor())}),m(24," \u0627\u0641\u0632\u0648\u062F\u0646 "),r(),a(25,"div",19),f(26,Bi,2,0,"small",20),a(27,"mat-chip-listbox"),F(28,Ti,5,3,"mat-chip",21,L),r(),f(30,Ei,5,0,"div",22),r()(),a(31,"div",23),f(32,Ii,3,1,"section",24)(33,Vi,10,2,"div",25),r()(),a(34,"section",10)(35,"div",11)(36,"span",12),m(37," \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0646\u0627\u0634\u0631 "),r()(),a(38,"div",26)(39,"div",27)(40,"div",28)(41,"label",15),m(42," \u0646\u0627\u0634\u0631"),r(),a(43,"beh-dropdown",29),y("selected",function(w){return x(h),k(s.selectPublisher(w))}),se(44,Li,5,15,"ng-template",null,0,pe),r()(),a(46,"div",30)(47,"button",18),y("click",function(){return x(h),k(s.addPublisher(s.publisherControl.value))}),m(48," \u0627\u0641\u0632\u0648\u062F\u0646 "),r()(),a(49,"div",31)(50,"label",15),m(51,"\u062A\u0627\u0631\u06CC\u062E \u0646\u0634\u0631"),r(),a(52,"div",32),y("click",function(){x(h);let w=ee(56);return k(w.open())}),b(53,"input",33)(54,"mat-datepicker-toggle",34)(55,"mat-datepicker",35,1),r()()(),a(57,"div",36)(58,"mat-chip-listbox"),F(59,Mi,5,2,"mat-chip",37,L),r(),f(61,Ri,5,0,"div",22),r()(),a(62,"div",38),f(63,ji,3,1,"section",24)(64,Gi,10,2,"div",25),r()(),a(65,"section",39)(66,"div",11)(67,"span",12),m(68,"\u0633\u0627\u06CC\u0631 \u0627\u0637\u0644\u0627\u0639\u0627\u062A"),r()(),a(69,"div",40)(70,"div",41)(71,"label",15),m(72,"\u062E\u0644\u0627\u0635\u06C0 \u06A9\u062A\u0627\u0628"),r(),b(73,"textarea",42),r(),a(74,"div",43)(75,"label",15),m(76,"\u0634\u0645\u0627\u0631\u0647 \u062C\u0644\u062F"),r(),b(77,"input",44),r(),a(78,"div",45)(79,"label",15),m(80,"\u0642\u0637\u0639"),r(),a(81,"beh-dropdown",46),y("search",function(w){return x(h),k(s.onTrackSearch(w))}),r()(),a(82,"div",47)(83,"label",15),m(84,"\u0642\u0627\u0628"),r(),a(85,"beh-dropdown",48),y("search",function(w){return x(h),k(s.onCoverSearch(w))}),r()(),a(86,"div",47)(87,"label",15),m(88,"\u0632\u0628\u0627\u0646"),r(),a(89,"beh-dropdown",49),y("search",function(w){return x(h),k(s.onLanguageSearch(w))})("selected",function(w){return x(h),k(s.selectLanguage(w))}),r()(),a(90,"div",45)(91,"label",15),m(92,"\u0646\u0648\u0628\u062A \u0686\u0627\u067E"),r(),b(93,"input",50),f(94,zi,2,0,"small",51)(95,Wi,2,0,"small",51),r(),a(96,"div",47)(97,"label",15),m(98,"\u062A\u06CC\u0631\u0627\u0698"),r(),b(99,"input",52),r()(),f(100,qi,6,0,"div",53),a(101,"p",54),m(102,"*\u0628\u0631\u0627\u06CC \u06A9\u062A\u0627\u0628 \u062A\u06A9\u200C\u062C\u0644\u062F\u06CC\u060C \u0642\u0633\u0645\u062A \u0634\u0645\u0627\u0631\u0647\u0654 \u062C\u0644\u062F \u0631\u0627 \u062E\u0627\u0644\u06CC \u0628\u06AF\u0630\u0627\u0631\u06CC\u062F."),r(),a(103,"div",55)(104,"span",56),m(105," \u062A\u06AF\u200C\u0647\u0627 "),r(),a(106,"span",57),m(107,"(\u062A\u06AF \u0647\u0627\u06CC \u0633\u0628\u0632 \u0631\u0646\u06AF\u060C \u062A\u06AF \u0647\u0627\u06CC \u0627\u0635\u0644\u06CC \u0647\u0633\u062A\u0646\u062F.)"),r(),a(108,"div",58)(109,"div",59)(110,"input",60,2),y("input",function(){x(h);let w=ee(111);return k(s.onTagSearch(w.value))}),r(),f(112,Qi,1,0,"span",61),r(),f(113,Ki,3,0,"ul",62)(114,Yi,2,0,"div",63),r(),a(115,"mat-chip-listbox",64),F(116,Ji,4,1,"mat-chip",37,$),r()()()()()()(),f(118,Xi,3,2,"div",65),r()}if(i&2){let h,C=ee(56);d(2),g("_Config",s.headerConfig),d(2),g("formGroup",s.editBookDetailForm),d(),_(s.loading?5:6),d(11),g("formControl",s.authorNameControl)("items",s.authorSuggestions())("displayWith",s.authorDisplay),d(6),g("formControl",s.authorRoleControl)("items",s.roleOptions()),d(),g("disabled",!s.authorNameControl.value&&!s.authorRoleControl.value),d(3),_(s.editBookDetailForm.controls.author.hasError("required")&&s.authorNameControl.touched?26:-1),d(2),T(s.authors),d(2),_(s.hasNewAuthors?30:-1),d(2),_(s.authorRelatedLoading()?32:s.authorRelatedBooks().length>0?33:-1),d(11),g("formControl",s.publisherControl)("items",s.publisherSuggestions())("displayWith",s.publisherDisplay),d(4),g("disabled",!s.publisherControl.value),d(6),g("max",s.maxDate)("matDatepicker",C),d(),g("for",C),d(5),T(s.publishers),d(2),_(s.hasNewPublishers?61:-1),d(2),_(s.publisherRelatedLoading()?63:s.publisherRelatedBooks().length>0?64:-1),d(18),g("items",s.trackOptions()),d(4),g("items",s.coverOptions()),d(4),g("items",s.languageOptions()),d(5),_(s.editBookDetailForm.controls.printedCount.hasError("pattern")?94:s.editBookDetailForm.controls.printedCount.hasError("min")?95:-1),d(6),_(s.selectedLanguageTypes.length>0?100:-1),d(10),g("formControl",s.tagControl),d(2),_(s.tagLoading()?112:-1),d(),_(s.tagSuggestions().length>0&&(s.tagControl.value==null?null:s.tagControl.value.length)>
32?113:(s.tagControl.value==null?null:s.tagControl.value.length)>2&&!s.tagLoading()?114:-1),d(3),T((p=(h=s.editBookDetailForm.get("genres"))==null?null:h.value)!=null?p:A(30,ti)),d(2),_(s.loading?-1:118)}},dependencies:[oe,qe,ze,We,He,ie,Qe,Ze,Ke,st,et,St,Ct,tt,wt,yt,vt,nt,it,ot,rt,gt,Bt,Xe,Pt,at],styles:["[_nghost-%COMP%]{width:100%}[placeholder][_ngcontent-%COMP%]::-webkit-input-placeholder{padding-right:0;opacity:100%}[placeholder][_ngcontent-%COMP%]:focus::-webkit-input-placeholder{padding-right:20px;opacity:0%}.mat-error[_ngcontent-%COMP%]{margin-bottom:16px}mat-chip[_ngcontent-%COMP%]{margin:4px}.mat-pseudo-checkbox[_ngcontent-%COMP%]{display:none!important}input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}input[type=number][_ngcontent-%COMP%]::-webkit-outer-spin-button, input[type=number][_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}  .mat-datepicker-content:has(.book-form-calendar){border-radius:.75rem!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))!important;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;
3--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}  .mat-datepicker-content:has(.book-form-calendar):is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))!important;--tw-bg-opacity: 1 !important;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))!important}"]}));let t=u;return t})();export{Br as BookFormComponent};
4
5//# debugId=5b8532f9-f04c-5904-a08d-ade36fbcd6b6

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.