@bookmypuja-tech/bmp-pdf 0.4.19 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import i from'react';import {maxBy}from'lodash';import fo from'qrcode';var zt=Object.defineProperty;var It=(r,o,d)=>o in r?zt(r,o,{enumerable:true,configurable:true,writable:true,value:d}):r[o]=d;var Ce=(r,o,d)=>It(r,typeof o!="symbol"?o+"":o,d);var X=r=>{typeof r=="string"&&(r=new Date(r));let o={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("en-GB",o).replace(",","")};var te="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",Se="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Ve="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Be="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",ke="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",ce="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var ve="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",Ee="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Pe={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:Se});Font.register({family:"Roboto",fontWeight:"bold",src:Ve});var je=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Et=({data:r,dates:o})=>{let d=X(o[0])===X(o[1]);return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:je.page},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),i.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",d?X(o[0]):`${X(o[0])} - ${X(o[1])}`),i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},r?r.map((t,n)=>i.createElement(View,{wrap:false,key:n,style:je.pujaTile},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(n+1).toString().padStart(2,"0"))),i.createElement(View,{style:{flexGrow:1}},i.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.participantName),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.participantNakshatra)),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Puja name : "),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.pujaName)),d?null:i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Date: "),i.createElement(Text,{style:{fontWeight:"bold"}},X(t.date)))),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),t.priestNote!==""&&t.priestNote!==null&&t.priestNote!==void 0?i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},i.createElement(Text,null,"Priest Note: ",t.priestNote)):null),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},i.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",t.amount),t.paymentStatus=="pending"?i.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},i.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},jt=Et;Font.register({family:"Roboto",fontWeight:"normal",src:Se});Font.register({family:"Roboto",fontWeight:"bold",src:Ve});var k=1,ge=25*k,Le=StyleSheet.create({page:{padding:10*k,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*k,paddingHorizontal:10*k,fontSize:ge,border:`${5*k}px solid black`,borderRadius:5*k,width:"100%",display:"flex",flexDirection:"column"}}),$t=({data:r,dates:o})=>{let d=X(o[0])===X(o[1]);return i.createElement(Document,null,i.createElement(Page,{dpi:200,size:[457*k],style:Le.page},i.createElement(Image,{fixed:true,style:{height:55*k,width:274*k,marginBottom:10*k,marginHorizontal:"auto"},src:te}),i.createElement(Text,{style:{fontSize:25*k,marginBottom:5*k,marginHorizontal:"auto"}},"Puja List"),i.createElement(Text,{style:{fontSize:20*k,marginBottom:5*k,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",d?X(o[0]):`${X(o[0])} - ${X(o[1])}`),i.createElement(Text,{style:{fontSize:17*k,marginBottom:20*k,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*k}},r?r.map((t,n)=>i.createElement(View,{wrap:false,key:n,style:Le.pujaTile},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*k}},i.createElement(Text,{style:{opacity:.6,marginRight:10*k}},"#",(n+1).toString().padStart(2,"0")),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*k}},t.paymentStatus=="pending"?i.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*k,paddingHorizontal:5*k,borderRadius:5*k,marginTop:3*k}},i.createElement(Text,{style:{color:"#ffffff",fontSize:ge}},"Pending")):null,i.createElement(Text,{style:{fontWeight:"bold",fontSize:ge}},"Rs ",t.amount))),i.createElement(View,{style:{flexGrow:1}},i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*k,gap:3*k}},i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.participantName),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},"-"),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.participantNakshatra)),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*k}},i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},i.createElement(Text,null,"Puja name : "),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.pujaName)),d?null:i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Date: "),i.createElement(Text,{style:{fontWeight:"bold"}},X(t.date)))),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*k}}),t.priestNote!==""&&t.priestNote!==null&&t.priestNote!==void 0?i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*k}},i.createElement(Text,null,"Priest Note: ",t.priestNote)):null))):null)))},Mt=$t;var Ht={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},Gt=({style:r={},children:o})=>{let d=g=>{let s=maxBy(Object.entries(Ht),([u,w])=>{let q=g.match(w);return q?q.length:0});return s?s[0]:"Latin"},t=g=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(u=>u.test(g));function n(g){return g.replace(/[\uFF01-\uFF5E]/g,s=>`${String.fromCharCode(s.charCodeAt(0)-65248)} `)}let f=g=>{let s=[],u=null,w="";for(let q of g){q=n(q);let se=d(q);se!==u?(w&&s.push({text:w,script:u}),u=se,w=q):w+=q;}return w&&s.push({text:w,script:u}),s},x=[];o&&typeof o=="string"&&!Array.isArray(o)&&!t(o)&&f(o).forEach((s,u)=>{let w=s.script==="Latin"||!s.script?"Noto Sans":`Noto Sans ${s.script}`;x.push(i.createElement(Text,{key:u,style:{fontFamily:w}},s.text));});let h=[],m={fontFamily:"Noto Sans"};return Array.isArray(r)?h=[...r,m]:r&&Object.keys(r).length>0?h=[r,m]:h=[m],i.createElement(Text,{style:h},x?.length?x:o)},e=Gt;var Kt=({startDate:r,endDate:o,reportTiming:d,templeName:t,reportName:n})=>i.createElement(i.Fragment,null,i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),o?i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",r.toDateString()," - ",o.toDateString()):i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",r.toDateString()),d&&Object.keys(Pe).includes(d)?i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Pe[d]," Report"):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},n),i.createElement(e,{style:{fontSize:12}},`${t}`)),C=Kt;var Yt=({startDate:r,endDate:o,templeName:d,data:t,reportTiming:n})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,templeName:d,reportTiming:n,reportName:"Temple Prasad (Kitchen) Report"}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},i.createElement(e,null,"Quantity"))),t.map((f,x)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,x+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},i.createElement(e,null,f.name)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},i.createElement(e,null,f.quantity))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Me=Yt;var Rt=({startDate:r,endDate:o,templeName:d,data:t})=>{let n=t.reduce((h,m)=>m.status==="cancelled"?h:h+m.pujaAmount,0),f=t.reduce((h,m)=>m.status==="cancelled"?h:h+m.creditedAmount,0),x=Object.entries(t.reduce((h,m)=>{let g=m.date;return h[g]||(h[g]={date:g,totalPujaAmount:0,totalPostalCharges:0,totalCreditedAmount:0}),m.status==="cancelled"||(h[g].totalPujaAmount+=m.pujaAmount,h[g].totalPostalCharges+=m.postalCharges,h[g].totalCreditedAmount+=m.creditedAmount),h},{})).map(([h,m])=>m).sort((h,m)=>h.date.localeCompare(m.date));return console.log("Day Wise Totals: ",x),i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Transactions Report",templeName:d}),t.length>0?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Bookings Amount: ",n.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),i.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",f.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))):null,r&&o&&x.length>1?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15,marginBottom:5}},"Day Wise Totals"),i.createElement(View,{style:{display:"flex",flexDirection:"column"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,"Puja Amount")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,"Postal Charges")),i.createElement(View,{style:{padding:6,width:"26.66%"}},i.createElement(e,null,"Credited Amount"))),x.map((h,m)=>i.createElement(View,{key:m,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,h.date)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,h.totalPujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,h.totalPostalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"26.66%"}},i.createElement(e,null,h.totalCreditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))))))):null,t.length>0?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15,marginBottom:5}},"All Bookings"),i.createElement(View,{style:{display:"flex",flexDirection:"column"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,"Puja Amt")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"12%"}},i.createElement(e,null,"Delivery")),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},i.createElement(e,null,"Credited Amt")),i.createElement(View,{style:{padding:6,width:"17%"}},i.createElement(e,null,"Transaction ID"))),t.map((h,m)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},i.createElement(e,null,m+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},i.createElement(e,{style:{fontSize:8}},h.date," ",h.time)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},i.createElement(e,{style:{fontSize:8}},h.invoiceNumber)),h.status=="cancelled"?i.createElement(i.Fragment,null,i.createElement(View,{style:{padding:6,width:"50%"}},i.createElement(e,{style:{textAlign:"center"}},"CANCELLED"))):i.createElement(i.Fragment,null,i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,h.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"12%"}},i.createElement(e,null,h.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},i.createElement(e,null,h.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,h.transactionId))))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Oe=Rt;var oo=({startDate:r,endDate:o,templeName:d,data:t})=>(t=t.map(n=>{let f="";try{let x=JSON.parse(n.address);f=`${x.address}, ${x.locality}, ${x.state} - ${x.pincode}`;}catch(x){console.error("Error parsing address:",x),f=n.address;}return {...n,address:f}}),i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Delivery Address",templeName:d}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},i.createElement(e,null,"Address")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,"Amount"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,new Date(n.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},i.createElement(e,null,n.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},i.createElement(e,null,n.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},i.createElement(e,null,n.address)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,n.pujaName)),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,n.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),He=oo;var no=({startDate:r,endDate:o,templeName:d,data:t,reportTiming:n})=>{t.sort((x,h)=>x.invoiceNumber.localeCompare(h.invoiceNumber));return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Report",templeName:d,reportTiming:n}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,width:"7%"}},i.createElement(e,null,"Mode"))),t.map((x,h)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,h+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,x.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},i.createElement(e,null,x.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},i.createElement(e,null,x.pujaName," - ",x.prasadName)),i.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},i.createElement(e,null,x.quantity)),i.createElement(View,{style:{padding:6,width:"7%"}},i.createElement(e,null,x.collectionMode))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ge=no;var so=({startDate:r,endDate:o,templeName:d,pujas:t,reportTiming:n})=>{let f=0,x=0,h=t.some(m=>m.bookings.some(g=>g.requires_coupon));return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Puja List",templeName:d,reportTiming:n}),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:n,reportName:"",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),t.some(m=>m.bookings.some(g=>g.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(m=>m.bookings.some(g=>g.is_early_reminder&&!g.requires_coupon))?t.flatMap((m,g)=>m.bookings.filter(s=>s.is_early_reminder&&!s.requires_coupon).map((s,u)=>(x++,i.createElement(View,{key:`${g}-${u}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,x)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},i.createElement(e,null,m.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,s.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},i.createElement(e,null,s.collectionMode||"")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,s.date?new Date(s.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),i.createElement(e,{style:{fontSize:12}},`${d}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((m,g)=>m.bookings.every(s=>s.is_early_reminder||s.requires_coupon)?null:(f=0,i.createElement(View,{key:g,style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${m.name} - ${m.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode"))),m.bookings.map((s,u)=>s.is_early_reminder||s.requires_coupon?null:(f++,i.createElement(View,{key:u,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,f)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,s.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},i.createElement(e,null,s.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},i.createElement(e,null,s.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},i.createElement(e,null,s.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},i.createElement(e,null,s.collectionMode||""))),s.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,s.priestNote))))))))))),h?i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let m=t.flatMap(s=>s.bookings.filter(u=>u.requires_coupon).map(u=>({...u,pujaName:s.name}))),g={};for(let s of m)g[s.invoiceNumber]||(g[s.invoiceNumber]=[]),g[s.invoiceNumber].push(s);return Object.entries(g).map(([s,u],w)=>{let q=u,se=q[0];return i.createElement(View,{key:s,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},s),i.createElement(e,null,se.date?new Date(se.date).toDateString():r.toDateString())),i.createElement(e,null,se.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),q.map((de,pe)=>i.createElement(View,{key:pe,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))),i.createElement(View,null,i.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ke=so;var uo=({templeName:r,startDate:o,endDate:d,pujas:t,reportTiming:n})=>{let f=t.sort((x,h)=>{let m=x.nakshatras.length;return h.nakshatras.length-m});return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:o,endDate:d,reportTiming:n,reportName:"Puja Summary",templeName:r}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},f.map((x,h)=>i.createElement(i.Fragment,null,i.createElement(View,{style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${x.name} - ${x.totalCount}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},i.createElement(e,null,"Quantity"))),x.nakshatras.map((m,g)=>i.createElement(i.Fragment,null,i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,g+1)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},i.createElement(e,null,m.name)),i.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},i.createElement(e,null,m.count))))))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Qe=uo;var go=({children:r,splitat:o})=>{if(!r||typeof r!="string")return null;let d="";return o=="words"&&(d=" "),i.createElement(i.Fragment,null,i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.split(d).map((t,n)=>i.createElement(i.Fragment,null,i.createElement(e,{key:n},t,o=="words"?" ":"")))))},H=go;var yo=({startDate:r,endDate:o,templeName:d,pujaData:t,prasadData:n,deliveryData:f,reportTiming:x})=>{f=f.map(s=>{let u="";try{let w=JSON.parse(s.address);u=`${w.address}, ${w.locality}, ${w.state} - ${w.pincode}`;}catch(w){console.error("Error parsing address:",w),u=s.address;}return {...s,address:u}});let h=0,m=0,g=t.some(s=>s.bookings.some(u=>u.requires_coupon));return t.length==0&&n.length==0&&f.length==0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Combined Report",templeName:d}),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):i.createElement(i.Fragment,null,i.createElement(Document,null,t.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"",templeName:""}),t.some(s=>s.bookings.some(u=>u.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(s=>s.bookings.some(u=>u.is_early_reminder&&!u.requires_coupon))?t.flatMap((s,u)=>s.bookings.filter(w=>w.is_early_reminder&&!w.requires_coupon).map((w,q)=>(m++,i.createElement(View,{wrap:false,key:`${u}-${q}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,m)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},i.createElement(e,null,s.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,w.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,w.date?new Date(w.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),i.createElement(e,{style:{fontSize:12}},`${d}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((s,u)=>s.bookings.every(w=>w.is_early_reminder||w.requires_coupon)?null:(h=0,i.createElement(i.Fragment,null,i.createElement(View,{style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${s.name} - ${s.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty"))),s.bookings.map((w,q)=>w.is_early_reminder||w.requires_coupon?null:(h++,i.createElement(i.Fragment,null,i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,h)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,w.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},i.createElement(e,null,w.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},i.createElement(e,null,w.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},i.createElement(e,null,w.quantity))),w.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,w.priestNote))))))))))))),t.length>0&&g&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let s=t.flatMap(w=>w.bookings.filter(q=>q.requires_coupon).map(q=>({...q,pujaName:w.name}))),u={};for(let w of s)u[w.invoiceNumber]||(u[w.invoiceNumber]=[]),u[w.invoiceNumber].push(w);return Object.entries(u).map(([w,q],se)=>{let de=q,pe=de[0];return i.createElement(View,{key:w,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},w),i.createElement(e,null,pe.date?new Date(pe.date).toDateString():r.toDateString())),i.createElement(e,null,pe.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),de.map((De,Nt)=>i.createElement(View,{key:Nt,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${De.devoteeName} ----- ${De.nakshatra} ----- ${De.pujaName}`))))})})())),n.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Prasad Report",templeName:d}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,width:"10%"}},i.createElement(e,null,"Qty"))),n.map((s,u)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,u+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,s.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,s.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,s.prasadName)),i.createElement(View,{style:{padding:6,width:"10%"}},i.createElement(e,null,s.quantity)))))),f.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Prasad Delivery Postal Report",templeName:d}),i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},f&&f.map(s=>{let u=fo.toDataURL(s.qrContent);return i.createElement(View,{wrap:false,key:s.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},i.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},s.name),i.createElement(View,{style:{fontSize:10}},i.createElement(H,{splitat:"words"},s.address)),i.createElement(e,{style:{fontSize:10}},s.phone)),s.qrContent&&u?i.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},i.createElement(Image,{src:u,style:{width:50,height:50,minWidth:50,maxWidth:50}}),i.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),i.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),i.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",s.pujaDetails))})))))},Ze=yo;var wo=({startDate:r,endDate:o,data:d})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Temple Payment Report",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"S.No.")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},i.createElement(e,null,"Temple Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,"Bookings")),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"Revenue"))),d?.map((t,n)=>i.createElement(View,{key:n,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,n+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},i.createElement(e,null,t.name)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,t.bookings)),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"\u20B9",t.revenue))))))),Xe=wo;var To=({startDate:r,endDate:o,templeName:d,data:t})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Settlements Report",templeName:d}),i.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",t.totalCreditedAmount),t.settlements.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Settlement")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"UTR")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"Settlement ID"))),t.settlements?.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},i.createElement(e,null,n.date)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,n.settlement_amount)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},i.createElement(e,null,n.utr.split("").map((x,h)=>i.createElement(e,{key:h},x)))),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},i.createElement(View,{style:{display:"flex",flexDirection:"column"}},n.invoices.map((x,h)=>i.createElement(e,{key:h},x.number," (",x.amount,")")))),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,n.settlement_id))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),Re=To;var Ao=({data:r})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},i.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),i.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},r.templeName),i.createElement(e,{style:{fontSize:10}},r.templeAddress),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},i.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),i.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:ve}))),r.qrContent?i.createElement(View,{style:{width:85}},i.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:r.qrContent})):null),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},r.status==="confirmed"?i.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:Ee}):null,i.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",r.invoiceNumber),i.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",r.status=="confirmed"?"PAID":"PENDING")),i.createElement(View,{style:{marginTop:10}},i.createElement(e,{style:{fontSize:11}},"Bill to:"),i.createElement(e,{style:{fontSize:11}},r.devoteeDetails.name),r.devoteeDetails.phone?i.createElement(e,{style:{fontSize:11}},r.devoteeDetails.phone):null,i.createElement(e,{style:{fontSize:11}},r.bookingDate)),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},i.createElement(e,null,"Item Description")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},i.createElement(e,null,"Price")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},i.createElement(e,null,"Quantity")),i.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},i.createElement(e,null,"Total"))),r.items.map((o,d)=>i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},o.pujaName?i.createElement(e,{style:{fontSize:11}},o.pujaName):null,o.devoteesName?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.devoteesName):null,o.pujaDate?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.pujaDate," ",o.timing?`- ${o.timing}`:null):null,o.repeatEndDate&&o.repeatStartDate?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.repeatStartDate," to ",o.repeatEndDate," ",o.timing?`- ${o.timing}`:null):null),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},o.basePujPrice)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},`${o.quantity?o.quantity:""}${o.repeatCount?` x ${o.repeatCount}`:""}`)),i.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},o.totalPrice))))),i.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},i.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},i.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),i.createElement(e,null,r.paymentMethod)),i.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"50%",textAlign:"right"}},i.createElement(e,null,"Subtotal: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.subTotal))),r.postalCharges?i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Postal Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.postalCharges))):null,i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Payment Gateway Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.paymentGatewayCharges))),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Platform Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.platformCharges))),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"GST (18%): ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.gst))),i.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Total: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.totalAmount))))),r.prasadCollectionMode?i.createElement(View,{style:{marginBottom:5}},i.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",r.prasadCollectionMode)):null,r.devoteeDetails.address?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",r.devoteeDetails.address)):null,r.prasads&&(r.prasads.morning.length>0||r.prasads.afternoon.length>0||r.prasads.evening.length>0)?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},i.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},i.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),r.prasads.morning.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),r.prasads.morning.map((o,d)=>i.createElement(e,{key:d,style:{fontSize:10}},d+1,". ",o.name," (",o.timings,")"))):null,r.prasads.afternoon.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),r.prasads.afternoon.map((o,d)=>i.createElement(e,{key:d,style:{fontSize:10}},d+1,". ",o.name," (",o.timings,")"))):null,r.prasads.evening.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),r.prasads.evening.map((o,d)=>i.createElement(e,{key:d,style:{fontSize:10}},d+1,". ",o.name," (",o.timings,")"))):null):null,r.instructions.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},i.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},i.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),i.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},r.instructions.map((o,d)=>i.createElement(e,{key:d,style:{fontSize:8}},d+1,") ",o.instruction)))):null,i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},i.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),i.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),et=Ao;var zo=({startDate:r,endDate:o,templeName:d,data:t})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Delivery Postal Report",templeName:d}),t&&t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},t.map(n=>{let f=n.qrContent,x=fo.toDataURL(f);return i.createElement(View,{wrap:false,key:n.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},i.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},i.createElement(View,{style:{width:240}},i.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},n.name),i.createElement(View,{style:{fontSize:10}},i.createElement(e,{style:{fontSize:10}},n.address)),i.createElement(e,{style:{fontSize:10}},n.phone)),n.qrContent&&x?i.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},i.createElement(Image,{src:x,style:{width:50,height:50,minWidth:50,maxWidth:50}}),i.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),i.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),i.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",n.pujaDetails))})):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),tt=zo;var ko=({startDate:r,endDate:o,templeName:d,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Payment Settlement Report",templeName:d}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Amount")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Payment Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Settlement Date")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},i.createElement(e,null,"Bank UTR No"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(H,null,n.invoiceNo)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(H,null,n.amount)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(H,null,n.paymentDate)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(H,null,n.settlementDate)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},i.createElement(H,null,n.bankUtrNo))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),ot=ko;var Eo=({startDate:r,endDate:o,templeName:d,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Invoice Level Breakup",templeName:d}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Base Amount")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Platform Fees")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Platform Fees GST")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Gateway Charges")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Gateway GST")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Payment Mode")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Booking Date")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Settlement Date")),i.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},i.createElement(e,null,"UTR Number"))),t.map((n,f)=>i.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.invoiceNumber)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.baseAmount)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.platformFees)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.platformFeesGST)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.gatewayCharges)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.gatewayChargesGST)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.paymentMode)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},i.createElement(H,null,n.bookingDate)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},i.createElement(H,null,n.settlementDate)),i.createElement(View,{style:{padding:3,width:"12%"}},i.createElement(H,null,n.utrNumber))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),it=Eo;var Lo=({startDate:r,endDate:o,templeName:d,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Total Puja Count Report",templeName:d}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Total Count")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},i.createElement(e,null,"Remarks"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},i.createElement(e,null,n.name)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,n.quantity)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}})))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),rt=Lo;var _o=({startDate:r,templeName:o,pujas:d,reportTiming:t})=>{return !d||d.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," Report")),d.map((f,x)=>{let h=f.bookings.filter(m=>!m.is_early_reminder&&!m.requires_coupon);return h.length===0?null:i.createElement(View,{key:x,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},f.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},h.length," booking",h.length>1?"s":"")),h.map((m,g)=>(i.createElement(View,{key:g,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},m.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},m.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},m.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",m.quantity)),m.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},m.priestNote))))))})))},st=_o;var qo=({startDate:r,templeName:o,data:d,reportTiming:t})=>{if(!d||d.length===0)return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let n=d.sort((f,x)=>f.invoiceNumber.localeCompare(x.invoiceNumber));return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," item",n.length>1?"s":"")),n.map((f,x)=>i.createElement(View,{key:x,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},f.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},f.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},i.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},i.createElement(e,{style:{fontSize:12}},f.prasadName),i.createElement(e,{style:{fontSize:12}}," (qty: ",f.quantity,")")),i.createElement(e,{style:{fontSize:12,color:"#666"}},f.collectionMode))))))},pt=qo;var $o=({startDate:r,templeName:o,data:d})=>{let t=d.map(n=>{let f="";try{let x=JSON.parse(n.address);f=`${x.address}, ${x.locality}, ${x.state} - ${x.pincode}`;}catch{f=n.address;}return {...n,address:f}});return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," delivery",t.length>1?" items":" item")),t.map((n,f)=>i.createElement(View,{key:f,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},n.devoteeName),i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11}},n.address)),n.phoneNumber&&i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:12}},"Ph: ",n.phoneNumber)),i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",n.note||n.pujaName))))))},gt=$o;var Mo=({startDate:r,templeName:o,pujaData:d,prasadData:t,deliveryData:n,reportTiming:f})=>{if(d.length===0&&t.length===0&&n.length===0)return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let h=t.sort((m,g)=>m.invoiceNumber.localeCompare(g.invoiceNumber));return i.createElement(Document,null,d.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),f&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.charAt(0).toUpperCase()+f.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),d.map((m,g)=>{let s=m.bookings.filter(u=>!u.is_early_reminder&&!u.requires_coupon);return s.length===0?null:i.createElement(View,{key:g,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},m.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," booking",s.length>1?"s":"")),s.map((u,w)=>(i.createElement(View,{key:w,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},u.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},u.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},u.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",u.quantity)),u.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},u.priestNote))))))})),t.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),f&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.charAt(0).toUpperCase()+f.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},h.length," item",h.length>1?"s":"")),h.map((m,g)=>i.createElement(View,{key:g,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},m.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},m.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},i.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},i.createElement(e,{style:{fontSize:12}},m.prasadName),i.createElement(e,{style:{fontSize:12}}," (qty: ",m.quantity,")")),i.createElement(e,{style:{fontSize:12,color:"#666"}},m.collectionMode))))),n.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," delivery",n.length>1?" items":" item")),n.map((m,g)=>i.createElement(View,{key:g,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},m.name),i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11}},m.address)),m.phone&&i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:12}},"Ph: ",m.phone)),i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",m.pujaDetails))))))},yt=Mo;var Oo=({startDate:r,templeName:o,data:d})=>!d||d.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},d.length," label",d.length>1?"s":"")),d.map(t=>i.createElement(View,{key:t.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:13,fontWeight:"bold",marginBottom:5}},t.name),i.createElement(View,{style:{marginBottom:5}},i.createElement(e,{style:{fontSize:11}},t.address)),i.createElement(e,{style:{fontSize:11,marginBottom:5}},t.phone),i.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),i.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",t.pujaDetails))))),wt=Oo;var Go=({startDate:r,endDate:o,templeName:d,pujas:t,reportTiming:n,selectedPujaNames:f=[]})=>{let x=0,h=0,m=t.some(g=>g.bookings.some(s=>s.requires_coupon));return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Custom Puja Report",templeName:d,reportTiming:n}),f.length>0&&i.createElement(View,{style:{marginTop:10,marginBottom:10}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",f.join(", "))),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:n,reportName:"",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),f.length>0&&i.createElement(View,{style:{marginTop:10,marginBottom:5}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",f.join(", "))),t.some(g=>g.bookings.some(s=>s.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(g=>g.bookings.some(s=>s.is_early_reminder&&!s.requires_coupon))?t.flatMap((g,s)=>g.bookings.filter(u=>u.is_early_reminder&&!u.requires_coupon).map((u,w)=>(h++,i.createElement(View,{key:`${s}-${w}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,h)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},i.createElement(e,null,g.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,u.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},i.createElement(e,null,u.collectionMode||"")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,u.date?new Date(u.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),i.createElement(e,{style:{fontSize:12}},`${d}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((g,s)=>g.bookings.every(u=>u.is_early_reminder||u.requires_coupon)?null:(x=0,i.createElement(View,{key:s,style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${g.name} - ${g.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode"))),g.bookings.map((u,w)=>u.is_early_reminder||u.requires_coupon?null:(x++,i.createElement(View,{key:w,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,x)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,u.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},i.createElement(e,null,u.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},i.createElement(e,null,u.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},i.createElement(e,null,u.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},i.createElement(e,null,u.collectionMode||""))),u.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,u.priestNote))))))))))),m?i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let g=t.flatMap(u=>u.bookings.filter(w=>w.requires_coupon).map(w=>({...w,pujaName:u.name}))),s={};for(let u of g)s[u.invoiceNumber]||(s[u.invoiceNumber]=[]),s[u.invoiceNumber].push(u);return Object.entries(s).map(([u,w],q)=>{let se=w,de=se[0];return i.createElement(View,{key:u,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},u),i.createElement(e,null,de.date?new Date(de.date).toDateString():r.toDateString())),i.createElement(e,null,de.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),se.map((pe,De)=>i.createElement(View,{key:De,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${pe.devoteeName} ----- ${pe.nakshatra} ----- ${pe.pujaName}`))),i.createElement(View,null,i.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},bt=Go;var Uo=({startDate:r,templeName:o,pujas:d,reportTiming:t,selectedPujaNames:n=[]})=>{return !d||d.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," ","Report")),n.length>0&&i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),i.createElement(e,{style:{fontSize:9,marginTop:2}},n.join(", "))),d.map((x,h)=>{let m=x.bookings.filter(g=>!g.is_early_reminder&&!g.requires_coupon);return m.length===0?null:i.createElement(View,{key:h,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},x.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.length," booking",m.length>1?"s":"")),m.map((g,s)=>(i.createElement(View,{key:s,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},g.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},g.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},g.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",g.quantity)),g.collectionMode&&i.createElement(View,{style:{marginTop:4}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",g.collectionMode)),g.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},g.priestNote))))))}),i.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},i.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},Vt=Uo;var Ct={kitchen:{A4:Me},transaction:{A4:Oe},"prasad-delivery":{A4:He,"110mm":gt},prasad:{A4:Ge,"110mm":pt},"puja-detailed":{A4:Ke,"110mm":st},"puja-summary":{A4:Qe},"combined-report":{A4:Ze,"110mm":yt},"multi-temple-payment":{A4:Xe},"settlements-report":{A4:Re},invoice:{A4:et},"postal-report":{A4:tt,"110mm":wt},"payment-settlement-report":{A4:ot},"invoice-breakup":{A4:it},"puja-count":{A4:rt},"custom-report":{A4:bt,"110mm":Vt}},Pt=class{constructor(o,d){Ce(this,"option");Ce(this,"size");this.option=o,this.size=d,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:n,src:f})=>Font.register({family:n,src:f})),Font.register({family:"Noto Sans",fontWeight:"normal",src:Be}),Font.register({family:"Noto Sans",fontWeight:"bold",src:ke}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:ce});}async print(o){let t=Ct[this.option][this.size],n=i.createElement(t,{...o}),f=pdf(n).toBlob();return f.then(x=>{var h=URL.createObjectURL(x);if(window!=null){let m=window.open(h,"_blank");setTimeout(()=>{m?.print();},1e3);}}),f}async getBlob(o){let t=Ct[this.option][this.size],n=i.createElement(t,{...o});return pdf(n).toBlob()}};
|
|
1
|
+
import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import i from'react';import {maxBy}from'lodash';import fo from'qrcode';var zt=Object.defineProperty;var It=(r,o,a)=>o in r?zt(r,o,{enumerable:true,configurable:true,writable:true,value:a}):r[o]=a;var Ce=(r,o,a)=>It(r,typeof o!="symbol"?o+"":o,a);var X=r=>{typeof r=="string"&&(r=new Date(r));let o={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("en-GB",o).replace(",","")};var te="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",Se="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Ve="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Be="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",ke="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",ce="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var ve="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",Ee="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Pe={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:Se});Font.register({family:"Roboto",fontWeight:"bold",src:Ve});var je=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Et=({data:r,dates:o})=>{let a=X(o[0])===X(o[1]);return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:je.page},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),i.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",a?X(o[0]):`${X(o[0])} - ${X(o[1])}`),i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},r?r.map((t,n)=>i.createElement(View,{wrap:false,key:n,style:je.pujaTile},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(n+1).toString().padStart(2,"0"))),i.createElement(View,{style:{flexGrow:1}},i.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.participantName),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.participantNakshatra)),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Puja name : "),i.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},t.pujaName)),a?null:i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Date: "),i.createElement(Text,{style:{fontWeight:"bold"}},X(t.date)))),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),t.priestNote!==""&&t.priestNote!==null&&t.priestNote!==void 0?i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},i.createElement(Text,null,"Priest Note: ",t.priestNote)):null),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},i.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",t.amount),t.paymentStatus=="pending"?i.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},i.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},jt=Et;Font.register({family:"Roboto",fontWeight:"normal",src:Se});Font.register({family:"Roboto",fontWeight:"bold",src:Ve});var k=1,ge=25*k,Le=StyleSheet.create({page:{padding:10*k,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*k,paddingHorizontal:10*k,fontSize:ge,border:`${5*k}px solid black`,borderRadius:5*k,width:"100%",display:"flex",flexDirection:"column"}}),$t=({data:r,dates:o})=>{let a=X(o[0])===X(o[1]);return i.createElement(Document,null,i.createElement(Page,{dpi:200,size:[457*k],style:Le.page},i.createElement(Image,{fixed:true,style:{height:55*k,width:274*k,marginBottom:10*k,marginHorizontal:"auto"},src:te}),i.createElement(Text,{style:{fontSize:25*k,marginBottom:5*k,marginHorizontal:"auto"}},"Puja List"),i.createElement(Text,{style:{fontSize:20*k,marginBottom:5*k,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",a?X(o[0]):`${X(o[0])} - ${X(o[1])}`),i.createElement(Text,{style:{fontSize:17*k,marginBottom:20*k,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*k}},r?r.map((t,n)=>i.createElement(View,{wrap:false,key:n,style:Le.pujaTile},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*k}},i.createElement(Text,{style:{opacity:.6,marginRight:10*k}},"#",(n+1).toString().padStart(2,"0")),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*k}},t.paymentStatus=="pending"?i.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*k,paddingHorizontal:5*k,borderRadius:5*k,marginTop:3*k}},i.createElement(Text,{style:{color:"#ffffff",fontSize:ge}},"Pending")):null,i.createElement(Text,{style:{fontWeight:"bold",fontSize:ge}},"Rs ",t.amount))),i.createElement(View,{style:{flexGrow:1}},i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*k,gap:3*k}},i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.participantName),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},"-"),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.participantNakshatra)),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*k}},i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},i.createElement(Text,null,"Puja name : "),i.createElement(Text,{style:{fontSize:ge,fontWeight:"bold"}},t.pujaName)),a?null:i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},i.createElement(Text,null,"Date: "),i.createElement(Text,{style:{fontWeight:"bold"}},X(t.date)))),i.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*k}}),t.priestNote!==""&&t.priestNote!==null&&t.priestNote!==void 0?i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*k}},i.createElement(Text,null,"Priest Note: ",t.priestNote)):null))):null)))},Mt=$t;var Ht={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},Gt=({style:r={},children:o})=>{let a=u=>{let l=maxBy(Object.entries(Ht),([g,h])=>{let q=u.match(h);return q?q.length:0});return l?l[0]:"Latin"},t=u=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(g=>g.test(u));function n(u){return u.replace(/[\uFF01-\uFF5E]/g,l=>`${String.fromCharCode(l.charCodeAt(0)-65248)} `)}let f=u=>{let l=[],g=null,h="";for(let q of u){q=n(q);let se=a(q);se!==g?(h&&l.push({text:h,script:g}),g=se,h=q):h+=q;}return h&&l.push({text:h,script:g}),l},x=[];o&&typeof o=="string"&&!Array.isArray(o)&&!t(o)&&f(o).forEach((l,g)=>{let h=l.script==="Latin"||!l.script?"Noto Sans":`Noto Sans ${l.script}`;x.push(i.createElement(Text,{key:g,style:{fontFamily:h}},l.text));});let V=[],d={fontFamily:"Noto Sans"};return Array.isArray(r)?V=[...r,d]:r&&Object.keys(r).length>0?V=[r,d]:V=[d],i.createElement(Text,{style:V},x?.length?x:o)},e=Gt;var Kt=({startDate:r,endDate:o,reportTiming:a,templeName:t,reportName:n})=>i.createElement(i.Fragment,null,i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),o?i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",r.toDateString()," - ",o.toDateString()):i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",r.toDateString()),a&&Object.keys(Pe).includes(a)?i.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Pe[a]," Report"):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},n),i.createElement(e,{style:{fontSize:12}},`${t}`)),C=Kt;var Yt=({startDate:r,endDate:o,templeName:a,data:t,reportTiming:n})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,templeName:a,reportTiming:n,reportName:"Temple Prasad (Kitchen) Report"}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},i.createElement(e,null,"Quantity"))),t.map((f,x)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,x+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},i.createElement(e,null,f.name)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},i.createElement(e,null,f.quantity))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Me=Yt;var Rt=({startDate:r,endDate:o,templeName:a,data:t})=>{let n=t.reduce((d,u)=>u.status==="cancelled"?d:d+u.pujaAmount,0),f=t.reduce((d,u)=>u.status==="cancelled"?d:d+u.creditedAmount,0),x=t.reduce((d,u)=>u.status==="cancelled"?d:d+u.postalCharges,0),V=Object.entries(t.reduce((d,u)=>{let l=u.date;return d[l]||(d[l]={date:l,totalPujaAmount:0,totalPostalCharges:0,totalCreditedAmount:0}),u.status==="cancelled"||(d[l].totalPujaAmount+=u.pujaAmount,d[l].totalPostalCharges+=u.postalCharges,d[l].totalCreditedAmount+=u.creditedAmount),d},{})).map(([d,u])=>u).sort((d,u)=>d.date.localeCompare(u.date));return console.log("Day Wise Totals: ",V),i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Transactions Report",templeName:a}),t.length>0?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Bookings Amount: ",n.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),i.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",x.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),i.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",f.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))):null,r&&o&&V.length>1?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15,marginBottom:5}},"Day Wise Totals"),i.createElement(View,{style:{display:"flex",flexDirection:"column"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,"Puja Amount")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,"Postal Charges")),i.createElement(View,{style:{padding:6,width:"26.66%"}},i.createElement(e,null,"Credited Amount"))),V.map((d,u)=>i.createElement(View,{key:u,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,d.date)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,d.totalPujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"26.66%"}},i.createElement(e,null,d.totalPostalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"26.66%"}},i.createElement(e,null,d.totalCreditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))))))):null,t.length>0?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15,marginBottom:5}},"All Bookings"),i.createElement(View,{style:{display:"flex",flexDirection:"column"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,"Puja Amt")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"12%"}},i.createElement(e,null,"Delivery")),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},i.createElement(e,null,"Credited Amt")),i.createElement(View,{style:{padding:6,width:"17%"}},i.createElement(e,null,"Transaction ID"))),t.map((d,u)=>i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"8%"}},i.createElement(e,null,u+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},i.createElement(e,{style:{fontSize:8}},d.date," ",d.time)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},i.createElement(e,{style:{fontSize:8}},d.invoiceNumber)),d.status=="cancelled"?i.createElement(i.Fragment,null,i.createElement(View,{style:{padding:6,width:"50%"}},i.createElement(e,{style:{textAlign:"center"}},"CANCELLED"))):i.createElement(i.Fragment,null,i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,d.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"12%"}},i.createElement(e,null,d.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid black"}},i.createElement(e,null,d.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,d.transactionId))))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Oe=Rt;var oo=({startDate:r,endDate:o,templeName:a,data:t})=>(t=t.map(n=>{let f="";try{let x=JSON.parse(n.address);f=`${x.address}, ${x.locality}, ${x.state} - ${x.pincode}`;}catch(x){console.error("Error parsing address:",x),f=n.address;}return {...n,address:f}}),i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Delivery Address",templeName:a}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},i.createElement(e,null,"Address")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,"Amount"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,new Date(n.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},i.createElement(e,null,n.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},i.createElement(e,null,n.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},i.createElement(e,null,n.address)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,n.pujaName)),i.createElement(View,{style:{padding:6,width:"15%"}},i.createElement(e,null,n.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),He=oo;var no=({startDate:r,endDate:o,templeName:a,data:t,reportTiming:n})=>{t.sort((x,V)=>x.invoiceNumber.localeCompare(V.invoiceNumber));return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Report",templeName:a,reportTiming:n}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,width:"7%"}},i.createElement(e,null,"Mode"))),t.map((x,V)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,V+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,x.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},i.createElement(e,null,x.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},i.createElement(e,null,x.pujaName," - ",x.prasadName)),i.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},i.createElement(e,null,x.quantity)),i.createElement(View,{style:{padding:6,width:"7%"}},i.createElement(e,null,x.collectionMode))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ge=no;var so=({startDate:r,endDate:o,templeName:a,pujas:t,reportTiming:n})=>{let f=0,x=0,V=t.some(d=>d.bookings.some(u=>u.requires_coupon));return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Puja List",templeName:a,reportTiming:n}),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:n,reportName:"",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),t.some(d=>d.bookings.some(u=>u.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(d=>d.bookings.some(u=>u.is_early_reminder&&!u.requires_coupon))?t.flatMap((d,u)=>d.bookings.filter(l=>l.is_early_reminder&&!l.requires_coupon).map((l,g)=>(x++,i.createElement(View,{key:`${u}-${g}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,x)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},i.createElement(e,null,d.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,l.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},i.createElement(e,null,l.collectionMode||"")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,l.date?new Date(l.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),i.createElement(e,{style:{fontSize:12}},`${a}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((d,u)=>d.bookings.every(l=>l.is_early_reminder||l.requires_coupon)?null:(f=0,i.createElement(View,{key:u,style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode"))),d.bookings.map((l,g)=>l.is_early_reminder||l.requires_coupon?null:(f++,i.createElement(View,{key:g,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,f)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,l.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},i.createElement(e,null,l.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},i.createElement(e,null,l.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},i.createElement(e,null,l.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},i.createElement(e,null,l.collectionMode||""))),l.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,l.priestNote))))))))))),V?i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let d=t.flatMap(l=>l.bookings.filter(g=>g.requires_coupon).map(g=>({...g,pujaName:l.name}))),u={};for(let l of d)u[l.invoiceNumber]||(u[l.invoiceNumber]=[]),u[l.invoiceNumber].push(l);return Object.entries(u).map(([l,g],h)=>{let q=g,se=q[0];return i.createElement(View,{key:l,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},l),i.createElement(e,null,se.date?new Date(se.date).toDateString():r.toDateString())),i.createElement(e,null,se.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),q.map((de,pe)=>i.createElement(View,{key:pe,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))),i.createElement(View,null,i.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ke=so;var uo=({templeName:r,startDate:o,endDate:a,pujas:t,reportTiming:n})=>{let f=t.sort((x,V)=>{let d=x.nakshatras.length;return V.nakshatras.length-d});return i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:o,endDate:a,reportTiming:n,reportName:"Puja Summary",templeName:r}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},f.map((x,V)=>i.createElement(i.Fragment,null,i.createElement(View,{style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${x.name} - ${x.totalCount}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},i.createElement(e,null,"Quantity"))),x.nakshatras.map((d,u)=>i.createElement(i.Fragment,null,i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,u+1)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},i.createElement(e,null,d.name)),i.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},i.createElement(e,null,d.count))))))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Qe=uo;var go=({children:r,splitat:o})=>{if(!r||typeof r!="string")return null;let a="";return o=="words"&&(a=" "),i.createElement(i.Fragment,null,i.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.split(a).map((t,n)=>i.createElement(i.Fragment,null,i.createElement(e,{key:n},t,o=="words"?" ":"")))))},H=go;var yo=({startDate:r,endDate:o,templeName:a,pujaData:t,prasadData:n,deliveryData:f,reportTiming:x})=>{f=f.map(l=>{let g="";try{let h=JSON.parse(l.address);g=`${h.address}, ${h.locality}, ${h.state} - ${h.pincode}`;}catch(h){console.error("Error parsing address:",h),g=l.address;}return {...l,address:g}});let V=0,d=0,u=t.some(l=>l.bookings.some(g=>g.requires_coupon));return t.length==0&&n.length==0&&f.length==0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Combined Report",templeName:a}),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):i.createElement(i.Fragment,null,i.createElement(Document,null,t.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"",templeName:""}),t.some(l=>l.bookings.some(g=>g.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(l=>l.bookings.some(g=>g.is_early_reminder&&!g.requires_coupon))?t.flatMap((l,g)=>l.bookings.filter(h=>h.is_early_reminder&&!h.requires_coupon).map((h,q)=>(d++,i.createElement(View,{wrap:false,key:`${g}-${q}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,d)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},i.createElement(e,null,l.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,h.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,h.date?new Date(h.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),i.createElement(e,{style:{fontSize:12}},`${a}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((l,g)=>l.bookings.every(h=>h.is_early_reminder||h.requires_coupon)?null:(V=0,i.createElement(i.Fragment,null,i.createElement(View,{style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${l.name} - ${l.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty"))),l.bookings.map((h,q)=>h.is_early_reminder||h.requires_coupon?null:(V++,i.createElement(i.Fragment,null,i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,V)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,h.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},i.createElement(e,null,h.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},i.createElement(e,null,h.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},i.createElement(e,null,h.quantity))),h.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,h.priestNote))))))))))))),t.length>0&&u&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=t.flatMap(h=>h.bookings.filter(q=>q.requires_coupon).map(q=>({...q,pujaName:h.name}))),g={};for(let h of l)g[h.invoiceNumber]||(g[h.invoiceNumber]=[]),g[h.invoiceNumber].push(h);return Object.entries(g).map(([h,q],se)=>{let de=q,pe=de[0];return i.createElement(View,{key:h,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},h),i.createElement(e,null,pe.date?new Date(pe.date).toDateString():r.toDateString())),i.createElement(e,null,pe.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),de.map((De,Nt)=>i.createElement(View,{key:Nt,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${De.devoteeName} ----- ${De.nakshatra} ----- ${De.pujaName}`))))})})())),n.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Prasad Report",templeName:a}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,"Prasad Name")),i.createElement(View,{style:{padding:6,width:"10%"}},i.createElement(e,null,"Qty"))),n.map((l,g)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,g+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},i.createElement(e,null,l.invoiceNumber)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,l.devoteeName)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},i.createElement(e,null,l.prasadName)),i.createElement(View,{style:{padding:6,width:"10%"}},i.createElement(e,null,l.quantity)))))),f.length>0&&i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:x,reportName:"Prasad Delivery Postal Report",templeName:a}),i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},f&&f.map(l=>{let g=fo.toDataURL(l.qrContent);return i.createElement(View,{wrap:false,key:l.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},i.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.name),i.createElement(View,{style:{fontSize:10}},i.createElement(H,{splitat:"words"},l.address)),i.createElement(e,{style:{fontSize:10}},l.phone)),l.qrContent&&g?i.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},i.createElement(Image,{src:g,style:{width:50,height:50,minWidth:50,maxWidth:50}}),i.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),i.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),i.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",l.pujaDetails))})))))},Ze=yo;var wo=({startDate:r,endDate:o,data:a})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Temple Payment Report",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,"S.No.")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},i.createElement(e,null,"Temple Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,"Bookings")),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"Revenue"))),a?.map((t,n)=>i.createElement(View,{key:n,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,n+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},i.createElement(e,null,t.name)),i.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},i.createElement(e,null,t.bookings)),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"\u20B9",t.revenue))))))),Xe=wo;var To=({startDate:r,endDate:o,templeName:a,data:t})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Settlements Report",templeName:a}),i.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",t.totalCreditedAmount),t.settlements.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Settlement")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"UTR")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},i.createElement(e,null,"Invoice")),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,"Settlement ID"))),t.settlements?.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},i.createElement(e,null,n.date)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,n.settlement_amount)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},i.createElement(e,null,n.utr.split("").map((x,V)=>i.createElement(e,{key:V},x)))),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},i.createElement(View,{style:{display:"flex",flexDirection:"column"}},n.invoices.map((x,V)=>i.createElement(e,{key:V},x.number," (",x.amount,")")))),i.createElement(View,{style:{padding:6,width:"20%"}},i.createElement(e,null,n.settlement_id))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),Re=To;var Ao=({data:r})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},i.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),i.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},r.templeName),i.createElement(e,{style:{fontSize:10}},r.templeAddress),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},i.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),i.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:ve}))),r.qrContent?i.createElement(View,{style:{width:85}},i.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:r.qrContent})):null),i.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},r.status==="confirmed"?i.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:Ee}):null,i.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",r.invoiceNumber),i.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",r.status=="confirmed"?"PAID":"PENDING")),i.createElement(View,{style:{marginTop:10}},i.createElement(e,{style:{fontSize:11}},"Bill to:"),i.createElement(e,{style:{fontSize:11}},r.devoteeDetails.name),r.devoteeDetails.phone?i.createElement(e,{style:{fontSize:11}},r.devoteeDetails.phone):null,i.createElement(e,{style:{fontSize:11}},r.bookingDate)),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},i.createElement(e,null,"Item Description")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},i.createElement(e,null,"Price")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},i.createElement(e,null,"Quantity")),i.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},i.createElement(e,null,"Total"))),r.items.map((o,a)=>i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},o.pujaName?i.createElement(e,{style:{fontSize:11}},o.pujaName):null,o.devoteesName?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.devoteesName):null,o.pujaDate?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.pujaDate," ",o.timing?`- ${o.timing}`:null):null,o.repeatEndDate&&o.repeatStartDate?i.createElement(e,{style:{fontSize:9,color:"#333333"}},o.repeatStartDate," to ",o.repeatEndDate," ",o.timing?`- ${o.timing}`:null):null),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},o.basePujPrice)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},`${o.quantity?o.quantity:""}${o.repeatCount?` x ${o.repeatCount}`:""}`)),i.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},i.createElement(e,{style:{}},o.totalPrice))))),i.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},i.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},i.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),i.createElement(e,null,r.paymentMethod)),i.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"50%",textAlign:"right"}},i.createElement(e,null,"Subtotal: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.subTotal))),r.postalCharges?i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Postal Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.postalCharges))):null,i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Payment Gateway Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.paymentGatewayCharges))),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Platform Charges: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.platformCharges))),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"GST (18%): ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.gst))),i.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},i.createElement(View,{style:{width:"70%",textAlign:"right"}},i.createElement(e,null,"Total: ")),i.createElement(View,{style:{width:"30%",textAlign:"right"}},i.createElement(e,null,r.totalAmount))))),r.prasadCollectionMode?i.createElement(View,{style:{marginBottom:5}},i.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",r.prasadCollectionMode)):null,r.devoteeDetails.address?i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",r.devoteeDetails.address)):null,r.prasads&&(r.prasads.morning.length>0||r.prasads.afternoon.length>0||r.prasads.evening.length>0)?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},i.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},i.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),r.prasads.morning.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),r.prasads.morning.map((o,a)=>i.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",o.name," (",o.timings,")"))):null,r.prasads.afternoon.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),r.prasads.afternoon.map((o,a)=>i.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",o.name," (",o.timings,")"))):null,r.prasads.evening.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},i.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),r.prasads.evening.map((o,a)=>i.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",o.name," (",o.timings,")"))):null):null,r.instructions.length>0?i.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},i.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},i.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),i.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},r.instructions.map((o,a)=>i.createElement(e,{key:a,style:{fontSize:8}},a+1,") ",o.instruction)))):null,i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},i.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),i.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),et=Ao;var zo=({startDate:r,endDate:o,templeName:a,data:t})=>i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Prasad Delivery Postal Report",templeName:a}),t&&t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},t.map(n=>{let f=n.qrContent,x=fo.toDataURL(f);return i.createElement(View,{wrap:false,key:n.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},i.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},i.createElement(View,{style:{width:240}},i.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},n.name),i.createElement(View,{style:{fontSize:10}},i.createElement(e,{style:{fontSize:10}},n.address)),i.createElement(e,{style:{fontSize:10}},n.phone)),n.qrContent&&x?i.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},i.createElement(Image,{src:x,style:{width:50,height:50,minWidth:50,maxWidth:50}}),i.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),i.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),i.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",n.pujaDetails))})):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),tt=zo;var ko=({startDate:r,endDate:o,templeName:a,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Payment Settlement Report",templeName:a}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Amount")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Payment Date")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(e,null,"Settlement Date")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},i.createElement(e,null,"Bank UTR No"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(H,null,n.invoiceNo)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(H,null,n.amount)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(H,null,n.paymentDate)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},i.createElement(H,null,n.settlementDate)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},i.createElement(H,null,n.bankUtrNo))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),ot=ko;var Eo=({startDate:r,endDate:o,templeName:a,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Invoice Level Breakup",templeName:a}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Invoice Number")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Base Amount")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Platform Fees")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Platform Fees GST")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Gateway Charges")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Gateway GST")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Payment Mode")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Booking Date")),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(e,null,"Settlement Date")),i.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},i.createElement(e,null,"UTR Number"))),t.map((n,f)=>i.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.invoiceNumber)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.baseAmount)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.platformFees)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.platformFeesGST)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.gatewayCharges)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.gatewayChargesGST)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},i.createElement(H,null,n.paymentMode)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},i.createElement(H,null,n.bookingDate)),i.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},i.createElement(H,null,n.settlementDate)),i.createElement(View,{style:{padding:3,width:"12%"}},i.createElement(H,null,n.utrNumber))))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),it=Eo;var Lo=({startDate:r,endDate:o,templeName:a,data:t})=>i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Total Puja Count Report",templeName:a}),t.length>0?i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,"Sr no")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,"Total Count")),i.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},i.createElement(e,null,"Remarks"))),t.map((n,f)=>i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},i.createElement(e,null,f+1)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},i.createElement(e,null,n.name)),i.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},i.createElement(e,null,n.quantity)),i.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}})))):i.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),rt=Lo;var _o=({startDate:r,templeName:o,pujas:a,reportTiming:t})=>{return !a||a.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," Report")),a.map((f,x)=>{let V=f.bookings.filter(d=>!d.is_early_reminder&&!d.requires_coupon);return V.length===0?null:i.createElement(View,{key:x,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},f.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.length," booking",V.length>1?"s":"")),V.map((d,u)=>(i.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},d.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},d.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},d.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",d.quantity)),d.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},d.priestNote))))))})))},st=_o;var qo=({startDate:r,templeName:o,data:a,reportTiming:t})=>{if(!a||a.length===0)return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let n=a.sort((f,x)=>f.invoiceNumber.localeCompare(x.invoiceNumber));return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," item",n.length>1?"s":"")),n.map((f,x)=>i.createElement(View,{key:x,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},f.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},f.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},i.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},i.createElement(e,{style:{fontSize:12}},f.prasadName),i.createElement(e,{style:{fontSize:12}}," (qty: ",f.quantity,")")),i.createElement(e,{style:{fontSize:12,color:"#666"}},f.collectionMode))))))},pt=qo;var $o=({startDate:r,templeName:o,data:a})=>{let t=a.map(n=>{let f="";try{let x=JSON.parse(n.address);f=`${x.address}, ${x.locality}, ${x.state} - ${x.pincode}`;}catch{f=n.address;}return {...n,address:f}});return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," delivery",t.length>1?" items":" item")),t.map((n,f)=>i.createElement(View,{key:f,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},n.devoteeName),i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11}},n.address)),n.phoneNumber&&i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:12}},"Ph: ",n.phoneNumber)),i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",n.note||n.pujaName))))))},gt=$o;var Mo=({startDate:r,templeName:o,pujaData:a,prasadData:t,deliveryData:n,reportTiming:f})=>{if(a.length===0&&t.length===0&&n.length===0)return i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let V=t.sort((d,u)=>d.invoiceNumber.localeCompare(u.invoiceNumber));return i.createElement(Document,null,a.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),f&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.charAt(0).toUpperCase()+f.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),a.map((d,u)=>{let l=d.bookings.filter(g=>!g.is_early_reminder&&!g.requires_coupon);return l.length===0?null:i.createElement(View,{key:u,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},d.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((g,h)=>(i.createElement(View,{key:h,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},g.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},g.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},g.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",g.quantity)),g.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},g.priestNote))))))})),t.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),f&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.charAt(0).toUpperCase()+f.slice(1)," Report")),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.length," item",V.length>1?"s":"")),V.map((d,u)=>i.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},d.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},d.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},i.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},i.createElement(e,{style:{fontSize:12}},d.prasadName),i.createElement(e,{style:{fontSize:12}}," (qty: ",d.quantity,")")),i.createElement(e,{style:{fontSize:12,color:"#666"}},d.collectionMode))))),n.length>0&&i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," delivery",n.length>1?" items":" item")),n.map((d,u)=>i.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},d.name),i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11}},d.address)),d.phone&&i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:12}},"Ph: ",d.phone)),i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",d.pujaDetails))))))},yt=Mo;var Oo=({startDate:r,templeName:o,data:a})=>!a||a.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString())),i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," label",a.length>1?"s":"")),a.map(t=>i.createElement(View,{key:t.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},i.createElement(e,{style:{fontSize:13,fontWeight:"bold",marginBottom:5}},t.name),i.createElement(View,{style:{marginBottom:5}},i.createElement(e,{style:{fontSize:11}},t.address)),i.createElement(e,{style:{fontSize:11,marginBottom:5}},t.phone),i.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),i.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",t.pujaDetails))))),wt=Oo;var Go=({startDate:r,endDate:o,templeName:a,pujas:t,reportTiming:n,selectedPujaNames:f=[]})=>{let x=0,V=0,d=t.some(u=>u.bookings.some(l=>l.requires_coupon));return !t||t.length===0?i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportName:"Custom Puja Report",templeName:a,reportTiming:n}),f.length>0&&i.createElement(View,{style:{marginTop:10,marginBottom:10}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",f.join(", "))),i.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):i.createElement(i.Fragment,null,i.createElement(Document,null,i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(C,{startDate:r,endDate:o,reportTiming:n,reportName:"",templeName:""}),i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},i.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),f.length>0&&i.createElement(View,{style:{marginTop:10,marginBottom:5}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",f.join(", "))),t.some(u=>u.bookings.some(l=>l.is_early_reminder))&&i.createElement(i.Fragment,null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),i.createElement(View,{style:{marginTop:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},i.createElement(e,null,"Puja Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Date"))))),t.some(u=>u.bookings.some(l=>l.is_early_reminder&&!l.requires_coupon))?t.flatMap((u,l)=>u.bookings.filter(g=>g.is_early_reminder&&!g.requires_coupon).map((g,h)=>(V++,i.createElement(View,{key:`${l}-${h}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,V)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},i.createElement(e,null,u.name)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,g.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},i.createElement(e,null,g.collectionMode||"")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},i.createElement(e,null,g.date?new Date(g.date).toDateString():"")))))):null,i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),i.createElement(e,{style:{fontSize:12}},`${a}`),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},t.map((u,l)=>u.bookings.every(g=>g.is_early_reminder||g.requires_coupon)?null:(x=0,i.createElement(View,{key:l,style:{marginBottom:25}},i.createElement(View,null,i.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${u.name} - ${u.bookings.length}`)),i.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Sr No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},i.createElement(e,null,"Invoice No")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},i.createElement(e,null,"Devotee Name")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},i.createElement(e,null,"Nakshatra")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},i.createElement(e,null,"Qty")),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},i.createElement(e,null,"Mode"))),u.bookings.map((g,h)=>g.is_early_reminder||g.requires_coupon?null:(x++,i.createElement(View,{key:h,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},i.createElement(e,null,x)),i.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},i.createElement(View,{style:{display:"flex",flexDirection:"row"}},i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},i.createElement(e,null,g.invoiceNumber)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},i.createElement(e,null,g.devoteeName)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},i.createElement(e,null,g.nakshatra)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},i.createElement(e,null,g.quantity)),i.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},i.createElement(e,null,g.collectionMode||""))),g.priestNote&&i.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},i.createElement(e,null,g.priestNote))))))))))),d?i.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:te}),i.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let u=t.flatMap(g=>g.bookings.filter(h=>h.requires_coupon).map(h=>({...h,pujaName:g.name}))),l={};for(let g of u)l[g.invoiceNumber]||(l[g.invoiceNumber]=[]),l[g.invoiceNumber].push(g);return Object.entries(l).map(([g,h],q)=>{let se=h,de=se[0];return i.createElement(View,{key:g,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},i.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},i.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},i.createElement(e,{style:{fontWeight:"semibold"}},g),i.createElement(e,null,de.date?new Date(de.date).toDateString():r.toDateString())),i.createElement(e,null,de.phone_number)),i.createElement(View,{style:{height:15,width:"100%"}}),se.map((pe,De)=>i.createElement(View,{key:De,style:{display:"flex",flexDirection:"row",marginTop:25}},i.createElement(e,null,`${pe.devoteeName} ----- ${pe.nakshatra} ----- ${pe.pujaName}`))),i.createElement(View,null,i.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},bt=Go;var Uo=({startDate:r,templeName:o,pujas:a,reportTiming:t,selectedPujaNames:n=[]})=>{return !a||a.length===0?i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):i.createElement(Document,null,i.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},i.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},i.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},o),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),i.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),t&&i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.charAt(0).toUpperCase()+t.slice(1)," ","Report")),n.length>0&&i.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},i.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),i.createElement(e,{style:{fontSize:9,marginTop:2}},n.join(", "))),a.map((x,V)=>{let d=x.bookings.filter(u=>!u.is_early_reminder&&!u.requires_coupon);return d.length===0?null:i.createElement(View,{key:V,style:{marginBottom:20},wrap:false},i.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},i.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},x.name),i.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},d.length," booking",d.length>1?"s":"")),d.map((u,l)=>(i.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},i.createElement(View,{style:{marginBottom:6}},i.createElement(e,{style:{fontSize:11,color:"#666"}},u.invoiceNumber)),i.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},u.devoteeName),i.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},i.createElement(e,{style:{fontSize:12}},u.nakshatra),i.createElement(e,{style:{fontSize:12}},"Qty: ",u.quantity)),u.collectionMode&&i.createElement(View,{style:{marginTop:4}},i.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",u.collectionMode)),u.priestNote&&i.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},i.createElement(e,{style:{fontSize:11,color:"#666"}},u.priestNote))))))}),i.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},i.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},Vt=Uo;var Ct={kitchen:{A4:Me},transaction:{A4:Oe},"prasad-delivery":{A4:He,"110mm":gt},prasad:{A4:Ge,"110mm":pt},"puja-detailed":{A4:Ke,"110mm":st},"puja-summary":{A4:Qe},"combined-report":{A4:Ze,"110mm":yt},"multi-temple-payment":{A4:Xe},"settlements-report":{A4:Re},invoice:{A4:et},"postal-report":{A4:tt,"110mm":wt},"payment-settlement-report":{A4:ot},"invoice-breakup":{A4:it},"puja-count":{A4:rt},"custom-report":{A4:bt,"110mm":Vt}},Pt=class{constructor(o,a){Ce(this,"option");Ce(this,"size");this.option=o,this.size=a,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:n,src:f})=>Font.register({family:n,src:f})),Font.register({family:"Noto Sans",fontWeight:"normal",src:Be}),Font.register({family:"Noto Sans",fontWeight:"bold",src:ke}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:ce});}async print(o){let t=Ct[this.option][this.size],n=i.createElement(t,{...o}),f=pdf(n).toBlob();return f.then(x=>{var V=URL.createObjectURL(x);if(window!=null){let d=window.open(V,"_blank");setTimeout(()=>{d?.print();},1e3);}}),f}async getBlob(o){let t=Ct[this.option][this.size],n=i.createElement(t,{...o});return pdf(n).toBlob()}};
|
|
2
2
|
export{jt as A4Print,Mt as T2Inch,Pt as reportPrinter};
|
package/package.json
CHANGED