PageSourceSearch

https://ebooks.psik.io/static/js/61.cf454da8.chunk.js

js psik.io collected 2026-10-02 12:02:06 UTC 16,503 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkpsik_react_example||=[]).push([[61],{61174(e,t,o){o(9950);var a=o(67535),i=o(54928),l=o(80937),s=o(48738),n=o.n(s),r=o(42074),d=o(47368),c=o(44414);const u=(0,i.A)(e=>({container:{display:"flex",flexDirection:"column",justifyContent:"center",[e.breakpoints.up("md")]:{height:"100%",minHeight:"60vh"},[e.breakpoints.down("sm")]:{height:"100vh",marginTop:"-3em"}},icon:{width:"9em",height:"9em"},message:{textAlign:"center",fontFamily:"var(--font-family-primary), Roboto, sans-serif",opacity:.6,margin:"0 1em",direction:"rtl"},toolbar:{textAlign:"center",marginTop:"2em"}}),{name:"RaNotFound"}),p=e=>{let{staticContext:t,history:o,location:a,match:i,navigationType:l,params:s,...n}=e;return n},h=e=>{const{className:t,classes:o,title:i,...s}=e,h=u(e),m=(0,d.ln)();return(0,c.jsxs)("main",{className:n()(h.container,t),...p(s),children:[(0,c.jsx)(d.G$,{title:m.title,description:m.description,noindex:!0,nofollow:!0}),(0,c.jsxs)("div",{className:h.message,children:[(0,c.jsx)(l.A,{className:h.icon}),(0,c.jsx)("h1",{children:"\u05d4\u05e1\u05e4\u05e8 \u05dc\u05d0 \u05e0\u05de\u05e6\u05d0"}),(0,c.jsx)("p",{children:"\u05d9\u05d9\u05ea\u05db\u05df \u05e9\u05d4\u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05d2\u05d5\u05d9, \u05d0\u05d5 \u05e9\u05d4\u05e1\u05e4\u05e8 \u05d4\u05d5\u05e1\u05e8 \u05de\u05d4\u05e1\u05e4\u05e8\u
105d9\u05d9\u05d4."})]}),(0,c.jsx)("div",{className:h.toolbar,children:(0,c.jsx)(a.A,{variant:"contained",component:r.N_,to:"/","aria-label":"\u05d7\u05d6\u05e8\u05d4 \u05dc\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea",children:"\u05d7\u05d6\u05e8\u05d4 \u05dc\u05d3\u05e3 \u05d4\u05d1\u05d9\u05ea"})})]})};o.d(t,["A",0,h])},9061(e,t,o){o.r(t);var a=o(37740),i=o(67284),l=o(87233),s=o(9950),n=o(92041),r=o(28429),d=o(28552),c=o(61174),u=o(84264),p=o(89628),h=o(4032),m=o(72141),g=o(61409),_=o(79290),v=o(99036),b=o(36061),k=o(38178),f=o(158),x=o(74556),w=o(22043),y=o(77132),j=o(47926),I=o(44414);const S=s.memo(e=>{const{book_id:t,book_level:o,page_num:i,allowedToReadFree:n,query_param:r,query_param_index:d,current_url:u,IPuniversityName:h,IPuniversityID:m}=e,g=(0,p.uH)(),[b,{loading:k,error:f,data:x}]=(0,a.n)(j.u3),S=u.includes("pdfViewerGlance");if((0,s.useEffect)(()=>{t&&b({variables:{load_without_login:n,book_id:t}})},[t,n,b]),k)return null;if(f)return S&&g.push("/book?book_id="+t),(0,I.jsx)(c.A,{});if(x){const a=x.download_file_to_local;return localStorage.setItem("book_id",t),(0,_.s)("read_book",{email:v.default.getUsername(),instituteName:v.default.getUniversity()||h,instituteId:v.default.getUniversityID()||m,bookId:t,bookType:3===o?"article":"book"}),(0,I.jsx)(y.A,{history:g,backend:w.A,src:a,page_num:i,query_param:r,query_param_index:d,...e})}return(0,I.jsx)(l.A,{variant:"body1",children:"burla"})});S.displayName="LoadPDFViewer";const A=e=>{const{book_id:t}=(0,r.g)(),o=e.validIPHS,a=e.IPuniversityID,l=e.IPuniversityName,c=e.isOTRMode,w=new URLSearchParams(e.location.search),y=w.get("page_num"),j=w.get("query_param"),A=w.get("query_param_index"),N=w.get("mini_reader"),C=(0,p.uH)(),T=window.location.href,D=localStorage.getItem("bookAllowed"),q=localStorage.getItem("bookAllowedRead"),[P,R]=(0,s.use
1State)(!1),[E,M]=(0,s.useState)(!1),[B,L]=(0,s.useState)(!1),[V,U]=(0,s.useState)(""),[$,H]=(0,s.useState)(null),[F,G]=(0,s.useState)(1),[Q,z]=(0,s.useState)(!1),[O,J]=(0,s.useState)(!1),[Y,Z]=(0,s.useState)(!1),[K,W]=(0,s.useState)([]),[X,ee]=(0,s.useState)([]),te=v.default.userLoggedIn(),oe=v.default.getUsername(),ae=v.default.getUniversity(),ie=v.default.getUniversityID(),{loading:le,data:se,error:ne}=(0,i.IT)(u.Cf,{variables:{book_id:t,ipUniversityId:a},fetchPolicy:"no-cache"}),{data:re,refetch:de}=(0,i.IT)(h.f8),{loading:ce,data:ue,refetch:pe}=(0,i.IT)(h.QG,{variables:{book_id:parseInt(t)}}),he=(0,m.pG)(null===re||void 0===re?void 0:re.get_collection_data_for_student);(0,s.useEffect)(()=>{he&&W(he)},[he]),(0,s.useEffect)(()=>{var e;ce||ee((null===ue||void 0===ue||null===(e=ue.get_collections_for_book_id)||void 0===e?void 0:e.map(e=>({id:e.students_collection_id,name:e.students_collection_name})))||[])},[ce,ue]);const me=localStorage.getItem("authToken"),ge=3===(null===$||void 0===$?void 0:$.book_level)&&0===(null===$||void 0===$?void 0:$.public_level),_e=T.includes("pdfViewerGlance"),ve=(0,s.useCallback)(()=>{C.push("/book?book_id="+t)},[t,C]);(0,s.useEffect)(()=>{t&&U(_e?`https://ebooks.psik.io/pdfViewerGlance/${t}`:`https://ebooks.psik.io/pdfViewer/${t}`)},[t,_e]),(0,s.useEffect)(()=>{ge&&(R(!0),M(!0))},[ge]),(0,s.useEffect)(()=>{ge||a&&c&&(R(!0),localStorage.setItem("IPuniversityID",a))},[ge,a,c]),(0,s.useEffect)(()=>{le||H(null===se||void 0===se?void 0:se.get_book_fulldata_by_book_id)},[le,se]);return(0,s.useEffect)(()=>{if($&&$.book_year&&$.book_publishers){(0,g.xz)({book_year:null===$||void 0===$?void 0:$.book_year,publishers:null===$||void 0===$?void 0:$.book_publishers})||ve()}},[$]),(0,s.useEffect)(()=>{if($&&!ge)if(_e&&me&&ve(),D!==t||!_e||(!q||null!==q&&void 0!==q&&q.includes(t))&&q)o&&_e&&ve(),T.includes("/pdfViewer/")&&!me&&ve(),M(!0);else if(o&&_e&&a)localStorage.setItem("IPuniversityID",a),ve();else{if(R(!0),localStorage.removeItem("bookAllowed"),q){const e=q+";"+t;localStorage.setItem("bookAllowedRead",e)}else localStorage.setItem("bookAllowedRead",t);M(!0)}},[a,me,D,q,t,T,_e,ge,ve,o,$]),(0,s.useEffect)(()=>{var e,t;ne&&(null!==(e=JSON.stringify(ne))&&void 0!==e&&e.includes('"statusCode":401')&&(v.default.removeTokenData(),window.location.reload()),null!==(t=JSON.stringify(ne))&&void 0!==t&&t.includes("Book not found")&&(window.location="/"))},[ne]),(0,s.useEffect)(()=>{const e=null===$||void 0===$?void 0:$.is_book_allowed_to_read;!e||null!==e&&void 0!==e&&e.isAllowed||(0,_.s)("not_allowed_to_read_book",{email:oe,instituteName:ae,instituteId:ie,owner:x.eC,bookId:t,reason:(null===e||void 0===e?void 0:e.reason)||"unknown"})},[$,t,oe,ae,ie]),$&&E?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(n.m,{children:[(null===$||void 0===$?void 0:$.book_name)&&(0,I.jsx)("title",{children:`${b.A.site.title} : ${$.book_name}`}),(0,I.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"})]}),(0,I.jsx)(S,{book_id:t,book_level:null===$||void 0===$?void 0:$.book_level,page_num:y,query_param:j,query_param_index:A,allowedToReadFree:P,current_url:T,validIPHS:o,mini_reader:N,IPuniversityName:l,IPuniversityID:a}),(null===$||void 0===$?void 0:$.book_id)&&(0,I.jsx)(f.A,{bookPageInputValue:F,setBookPageInputValue:G,title:null===$||void 0===$?void 0:$.book_name,authors:null===$||void 0===$?void 0:$.book_authors,showShareModal:B,setShowShareModal:L,showShareModalLink:V,setShowShareModalLink:U}),(null===$||void 0===$?void 0:$.book_id)&&(0,I.jsx)(k.A,{bookPageInputValue:F,setBookPageInputValue:G,book_id:null===$||void 0===$?void 0:$.book_id,showQuoteModal:Q,setShowQuoteModal:z,is_from_reader:!0,limitEventReportRIS:O,setLimitEventReportRIS:J}),(null===$||void 0===$?void 0:$.book_id)&&te&&(0,I.jsx)(d.L,{bookId:null===$||void 0===$?void 0:$.book_id,openDialog:Y,setOpenDialog:Z,collectionsSelected:X,collections:K,refetchCollection:de,refetchSelectedCollection:pe,t:e.t}),(0,I.jsx)("input",{id:"shareBoxToggle",onClick:e=>(e=>{G(parseInt(e)),L(!0)})(e.target.value),type:"hidden"}),(0,I.jsx)("input",{id:"quoteBoxToggle",onClick:e=>(e=>{G(parseInt(e)),z(!0)})(e.target.value),type:"hidden"}),(0,I.jsx)("input",{id:"addToCollection",onClick:()=>{Z(!0)},type:"hidden"}),(0,I.jsx)("a",{id:"lookContentOnGoogle",href:"https://www.google.com/",target:"_blank",rel:"noopener noreferrer",style:{visibility:"hidden",position:"fixed"},children:"link"})]}):null};o.d(t,["default",0,A])},22043(e,t,o){o.d(t,{A:()=>a});class a{constructor(){this.init=(e,t,o,a,i,l)=>{const s=document.createElement("iframe");let n=`/psik_pdf_reader/pdfjs-2.13.216-dist/web/viewer.html?file=${e}`;o&&(n+=`&page_num=${o}`),a&&i&&(n+=`&query_param=${a}&query_param_index=${i}`),l&&(n+="&mini_reader=true"),s.src=n,s.width="100%",s.height="100%",s.style="border: none",t.appendChild(s)}}}},77132(e,t,o){o.d(t,{A:()=>n});var a=o(9950),i=o(3302),l=o.n(i),s=o(44414);class n extends a.Component{constructor(e){super(e),this.viewerRef=a.createRef(),this.backend=new e.backend,this.history=e.history}componentDidMount(){const{src:e,book_id:t,page_num:o,query_param:a,query_param_index:i,mini_reader:s}=this.props,n=this.viewerRef.current;this.backend.init(e,n,o,a,i,s);const r=this.history,d=window.location.pathname;l()("#viewer").bind("DOMNodeRemoved",function(e){"true"===e.target.getAttribute("data-login")?r.push({pathname:"/login",state:{data:{url:d}}}):"viewer"===e.target.id&&(window.location.href="/book?book_id="+t)})}render(){return(0,s.jsx)("div",{ref:this.viewerRef,id:"viewer","data-login":"false",style:{width:"100%",height:"100vh",overflowY:"hidden"}})}}},38178(e,t,o){o.d(t,{A:()=>_});var a=o(9950),i=o(6248),l=o(96583),s=o(87233),n=o(57073),r=o(51496),d=o(14341),c=o(98623),u=o(99036),p=o(85547),h=o(37740),m=o(84264);var g=o(44414);const _=(0,i.ZE)()(e=>{let{t:t,book_id:o,bookPageInputValue:i,setBookPageInputValue:_,showQuoteModal:v,setShowQuoteModal:b,fromBookDescription:k,limitEventReport:f,setLimitEventReport:x,limitEventReportRIS:w,setLimitEventReportRIS:y,is_from_reader:j}=e;const[I,S]=(0,a.useState)(!1),[A,N]=(0,a.useState)(1),[C]=(0,h.n)(m.IY),[T]=(0,h.n)(m.rH),[D,q]=(0,a.useState)(""),[P,R]=(0,a.useState)(!1),[E,M]=(0,a.useState)(""),[B,L]=(0,a.useState)(""),[V,U]=(0,a.useState)(!1),[$,H]=(0,a.useState)("https://api-ebooks.psik.io/graphql".replace("graphql","")+"export_book_RIS_quotation/"+o),F=e=>{let{button:t}=e;N(t),S(!0);let o="";1===t?o=D.replace(/<\/?[^>]+(>|$)/g,""):2===t?o=E.replace(/<\/?[^>]+(>|$)/g,""):3===t&&(o=B.replace(/<\/?[^>]+(>|$)/g,"")),o&&navigator.clipboard.writeText(o)},G=(0,a.useCallback)(async()=>
1{if(!f&&o){const e=localStorage.getItem("student_id")?localStorage.getItem("student_id"):-1,t=u.default.getUniversityIDReports(),a=x?"user_clicked_cite_book_description":"user_clicked_cite_reader";await T({variables:{book_id:o,university_id:t,student_id:e,event_name:a}}),x&&x(!0)}},[o,f,T,x]);(0,a.useEffect)(()=>{if(v){const e=async()=>{const e=await C({variables:{book_id:o,page_number:parseInt(i)}});if(e&&e.data.get_book_quotes){const t=e.data.get_book_quotes;q(t.mla_quote),M(t.apa_quote),L(t.chicago_quote)}else q("Data could not be retrieved"),M("Data could not be retrieved"),L("Data could not be retrieved");R(!1)};R(!0),e(),G()}},[i,o,C,G,v]),(0,a.useEffect)(()=>{if(I){const e=setTimeout(()=>{S(!1)},3e3);return()=>clearTimeout(e)}},[I]);const Q=(0,a.useCallback)(e=>{let{fromBeggining:t}=e,o=$.split("?")[0];t&&(o+="?page_num="+i),U(t),H(o)},[i,$]);return(0,a.useEffect)(()=>{Q({fromBeggining:!0})},[]),(0,g.jsx)(l.A,{className:"bookQuoteDialog",onClose:()=>b(!1),"aria-labelledby":"simple-dialog-title",open:v,children:P?(0,g.jsx)("div",{className:"bookQuoteDialogLoading",children:(0,g.jsx)(c.A,{})}):(0,g.jsxs)("div",{children:[(0,g.jsx)(s.A,{className:"quoteDialogTitle",component:"h2",children:t("Quote")}),(0,g.jsxs)("div",{className:"quoteType",children:[(0,g.jsxs)("div",{className:"quoteTypeTitle",children:[(0,g.jsx)("span",{children:"MLA"}),(0,g.jsxs)(n.A,{className:"tooltip "+(I&&1===A?"copied":""),size:"small",onClick:()=>F({button:1}),"aria-label":"fingerprint",children:[(0,g.jsx)("span",{className:"tooltiptext",children:"!\u05d4\u05d5\u05e2\u05ea\u05e7"}),(0,g.jsx)(p.A,{fontSize:"inherit",htmlColor:"var(--content-text-tertiary-color)"})]})]}),(0,g.jsx)("div",{className:"quoteDialogCopyInput",dangerouslySetInnerHTML:{__html:D}})]}),(0,g.jsxs)("div",{className:"quoteType",children:[(0,g.jsxs)("div",{className:"quoteTypeTitle",children:[(0,g.jsx)("span",{children:"APA"}),(0,g.jsxs)(n.A,{className:"tooltip "+(I&&2===A?"copied":""),size:"small",onClick:()=>F({button:2}),"aria-label":"fingerprint",children:[(0,g.jsx)("span",{className:"tooltiptext",children:"!\u05d4\u05d5\u05e2\u05ea\u05e7"}),(0,g.jsx)(p.A,{fontSize:"inherit",htmlColor:"var(--content-text-tertiary-color)"})]})]}),(0,g.jsx)("div",{className:"quoteDialogCopyInput",dangerouslySetInnerHTML:{__html:E}})]}),(0,g.jsxs)("div",{className:"quoteType",children:[(0,g.jsxs)("div",{className:"quoteTypeTitle",children:[(0,g.jsx)("span",{children:"CHICAGO"}),(0,g.jsxs)(n.A,{className:"tooltip "+(I&&3===A?"copied":""),size:"small",onClick:()=>F({button:3}),"aria-label":"fingerprint",children:[(0,g.jsx)("span",{className:"tooltiptext",children:"!\u05d4\u05d5\u05e2\u05ea\u05e7"}),(0,g.jsx)(p.A,{fontSize:"inherit",htmlColor:"var(--content-text-tertiary-color)"})]})]}),(0,g.jsx)("div",{className:"quoteDialogCopyInput",dangerouslySetInnerHTML:{__html:B}})]}),(0,g.jsxs)("div",{className:"quoteDialogPageNumber",children:[(0,g.jsx)("div",{style:{width:"fit-content"},children:(0,g.jsx)(s.A,{onClick:async()=>{if(!w&&o){const e=localStorage.getItem("student_id")?localStorage.getItem("student_id"):-1,t=u.default.getUniversityIDReports(),a=j?"user_clicked_ris_reader":"user_clicked_ris_book_description";await T({variables:{book_id:o,university_id:t,student_id:e,event_name:a}}),y&&y(!0)}window.open($,"_blank")},className:"quoteRISDialogTitle",component:"h2",children:"RIS-\u05d9\u05e6\u05d5\u05d0 \u05dc"})}),!k&&(0,g.jsxs)("div",{className:"pageInputs",children:[(0,g.jsx)(r.A,{onChange:e=>Q({fromBeggining:e.target.checked}),checked:V}),(0,g.jsx)("span",{className:"pageNumberText",children:"\u05d4\u05ea\u05d7\u05dc\u05d4 \u05d1\u05e2\u05de\u05d5\u05d3"}),(0,g.jsx)(d.A,{onChange:e=>{let t=e.target.value;t<1&&(t=1),_(t);let o=$.split("?")[0];o+="?page_num="+t,H(o)},value:i,id:"input-page-number",variant:"standard",type:"number",disabled:!V,inputProps:{"aria-label":"Page number input"}})]})]})]})})})},158(e,t,o){o.d(t,{A:()=>m});var a=o(96583),i=o(87233),l=o(57073),s=o(51496),n=o(14341),r=o(71503),d=o(2748),c=o(92613),u=o(9950),p=o(6248);var h=o(44414);const m=(0,p.ZE)()(e=>{let{t:t,title:o,authors:p,bookPageInputValue:m,setBookPageInputValue:g,showShareModal:_,setShowShareModal:v,showShareModalLink:b,setShowShareModalLink:k}=e;const[f,x]=(0,u.useState)(!1),[w,y]=(0,u.useState)("not_show"),[j,I]=(0,u.useState)(!1),S=(0,u.useCallback)(e=>{let{fromBeggining:t}=e,o=b.split("?")[0];f&&!t||(o+="?page_num="+m),x(!f||t),k(o)},[f,m,k,b]);(0,u.useEffect)(()=>{"show"!==w||j||(y("not_show"),I(!0)),_||I(!1)},[w,j,_]),(0,u.useEffect)(()=>{_?S({fromBeggining:!0}):I(!1)},[S,_]);const A=e=>{let t='\u05d4\u05e1\u05e4\u05e8 "%book_name%" \u05dc\u05e7\u05e8\u05d9\u05d0\u05d4 \u05d1\u05e4\u05e1\u05d9\u05e7';return t=t.replace("%author%",p[0]||"Unknown Artist"),t=t.replace("%book_name%",o||"Unknown Book"),"facebook"!==e&&(t+=" %0A%0A"),t};return(0,h.jsx)(a.A,{className:"bookSharePagesDialog",onClose:()=>v(!1),"aria-labelledby":"simple-dialog-title",open:_,children:(0,h.jsxs)("div",{children:[(0,h.jsx)(i.A,{className:"shareDialogTitle",component:"h2",children:t("share")}),(0,h.jsxs)("div",{className:"shareDialogSocialButtons",children:[(0,h.jsx)(l.A,{onClick:()=>{const e=A("facebook");window.open("https://www.facebook.com/sharer.php?u="+b+"&quote="+e)},"aria-label":"fingerprint",className:"shareDialogsocialButton",style:{color:"#1778F2"},children:(0,h.jsx)(r.A,{})}),(0,h.jsx)(l.A,{onClick:()=>{const e=A("whatsapp")+b;
1window.open("https://api.whatsapp.com/send?text="+e)},"aria-label":"fingerprint",className:"shareDialogsocialButton",style:{color:"#4FCE5D"},children:(0,h.jsx)(c.A,{})}),(0,h.jsx)(l.A,{onClick:()=>{const e=A("email")||"Take a look at this book!";window.open("mailto:?subject="+e+"&body="+b)},"aria-label":"fingerprint",className:"shareDialogsocialButton",style:{color:"var(--content-text-tertiary-color)"},children:(0,h.jsx)(d.A,{})})]}),(0,h.jsxs)("div",{className:"shareDialogCopyInput",children:[(0,h.jsxs)("div",{className:"copyText tooltip "+(j?"copied":""),onClick:()=>{y("show"),I(!1),navigator.clipboard.writeText(b)},children:["\u05d4\u05e2\u05ea\u05e7\u05d4",(0,h.jsx)("span",{className:"tooltiptext",children:"\u05d4\u05d5\u05e2\u05ea\u05e7 \u05dc\u05dc\u05d5\u05d7"})]}),(0,h.jsx)("input",{disabled:!0,value:b})]}),(0,h.jsxs)("div",{className:"shareDialogPageNumber",children:[(0,h.jsx)(s.A,{onChange:S,checked:f}),(0,h.jsx)("span",{children:"\u05d4\u05ea\u05d7\u05dc\u05d4 \u05d1\u05e2\u05de\u05d5\u05d3"}),(0,h.jsx)(n.A,{onChange:e=>{let t=e.target.value;t<1&&(t=1),g(t);let o=b.split("?")[0];o+="?page_num="+t,k(o)},value:m,id:"standard-basic",variant:"standard",type:"number",disabled:!f,inputProps:{"aria-label":"Page number input"}})]})]})})})}}]);

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.