1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16533],{16533:(e,t,i)=>{i.d(t,{DA:()=>m,Fv:()=>f,Gc:()=>b,Kn:()=>u,LZ:()=>E,Mp:()=>d,Sj:()=>C,VM:()=>O,Ww:()=>v,bh:()=>c,iM:()=>I,lA:()=>y,lz:()=>x,oK:()=>p});var l=i(93075),r=i(30694),n=i(4927),s=i(34015),o=i.n(s),a=i(4922);i(20222);let c={TEXT:"text",PHONE:"phone",ADDRESS:"address",DATE:"date",SINGLE_CHOICE:"single_choice",MULTI_CHOICE:"multi_choice"},u={DURING_SIGNUP:"during_signup",FOLLOW_UP:"follow_up"},d={INTERNAL:"internal",EMAIL:"email",SMS:"sms",BOTH:"both"},h={gifts_skills:{id:"gifts_skills",name:"Gifts & Skills",description:"Identify member talents and abilities",fields:[{type:c.MULTI_CHOICE,label:"What gifts/skills do you have?",placeholder:"",required:!1,options:[{text:"Music/Singing"},{text:"Playing Instruments"},{text:"Teaching"},{text:"Public Speaking"},{text:"Technology/AV"},{text:"Hospitality"},{text:"Administration"},{text:"Counseling"},{text:"Writing"},{text:"Graphic Design"},{text:"Photography/Video"},{text:"Construction/Handyman"}],includeOther:!0}]},family_info:{id:"family_info",name:"Family Information",description:"Learn about member families",fields:[{type:c.SINGLE_CHOICE,label:"Marital Status",placeholder:"",required:!1,options:[{text:"Single"},{text:"Married"},{text:"Widowed"},{text:"Divorced"}],includeOther:!1},{type:c.TEXT,label:"Spouse Name (if applicable)",placeholder:"Enter spouse name",required:!1,options:[],includeOther:!1},{type:c.TEXT,label:"Children (names and ages)",placeholder:"e.g., John (12), Sarah (8)",required:!1,options:[],includeOther:!1}]},study_interests:{id:"study_interests",name:"Study Interests",description:"Bible study and learning preferences",fields:[{type:c.MULTI_CHOICE,label:"What topics interest you?",placeholder:"",required:!1,options:[{text:"Bible Prophecy"},{text:"Christian Living"},{text:"Family & Relationships"},{text:"Health & Wellness"},{text:"Church History"},{text:"Evangelism"},{text:"Prayer & Devotion"},{text:"Youth/Young Adult Topics"}],includeOther:!0},{type:c.SINGLE_CHOICE,label:"Preferred study format",placeholder:"",required:!1,options:[{text:"Small group"},{text:"One-on-one"},{text:"Large class"},{text:"Self-study with materials"}],includeOther:!1}]},volunteer_interests:{id:"volunteer_interests",name:"Volunteer Interests",description:"Ministry involvement preferences",fields:[{type:c.MULTI_CHOICE,label:"Which ministries interest you?",placeholder:"",required:!1,options:[{text:"Worship/Music"},{text:"Children's Ministry"},{text:"Youth Ministry"},{text:"Hospitality/Greeters"},{text:"AV/Tech Team"},{text:"Outreach/Community Service"},{text:"Prayer Ministry"},{text:"Small Groups"}],includeOther:!0},{type:c.SINGLE_CHOICE,label:"Availability",placeholder:"",required:!1,options:[{text:"Weekly"},{text:"Bi-weekly"},{text:"Monthly"},{text:"Special events only"}],includeOther:!1}]}},p=()=>({subject:"Welcome to {churchName}! Complete Your Profile",body:"Hi {memberName},\n\nWelcome to {churchName}! We're excited to have you as part of our church family.\n\nPlease take a moment to complete your profile so we can better serve you and help you get connected:\n\n{profileUrl}\n\nIf you have any questions, feel free to reach out to us.\n\nBlessings,\n{churchName}"}),m=()=>"Welcome to {churchName}! Complete your profile: {profileUrl}",y=()=>({enabled:!1,collectionMode:u.DURING_SIGNUP,followUpSettings:{deliveryMethod:d.INTERNAL,deliveryDelay:{value:0,unit:"immediate"},emailSubject:p().subject,emailTemplate:p().body,smsTemplate:m(),sendReminder:!1,reminderDelay:{value:3,unit:"days"},maxReminders:2,completionRequired:!1,notifyOnCompletion:!1},customFields:[],collectContactPreference:!0,archivedFields:[],createdAt:null,updatedAt:null}),g=()=>"option-".concat(Date.now(),"-").concat(o().randomUUID().substring(0,9)),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.TEXT,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{id:"field-".concat(Date.now(),"-").concat(o().randomUUID().substring(0,9)),type:e,label:t,placeholder:i.placeholder||"",required:i.required||!1,options:(i.options||[]).map(e=>({id:g(),text:"string"==typeof e?e:e.text})),includeOther:i.includeOther||!1,order:i.order||0}},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{id:g(),text:e}},x=(e,t)=>{let i=h[t];if(!i)return{success:!1,error:"Template not found"};let n=i.fields.map((t,i)=>(0,r._)((0,l._)({},f(t.type,t.label,{placeholder:t.placeholder,required:t.required,options:t.options,includeOther:t.includeOther})),{order:e.customFields.length+i}));return{success:!0,fields:[...e.customFields,...n]}},b=async(e,t)=>{try{let i=(0,n.doc)(e,"churches",t,"settings","member_signup"),r=await (0,n.getDoc)(i);if(!r.exists())return y();return(0,l._)({},y(),r.data())}catch(e){throw a.Ay.error("Error getting signup customization:",e),e}},E=async function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let s=(0,n.doc)(e,"churches",t,"settings","member_signup"),o=(0,r._)((0,l._)({},i),{updatedAt:n.Timestamp.now()});return(await (0,n.getDoc)(s)).exists()||(o.createdAt=n.Timestamp.now()),await (0,n.setDoc)(s,o,{merge:!0}),{success:!0}}catch(e){return a.Ay.error("Error saving signup customization:",e),{success:!1,error:e.message}}},I=()=>Object.values(h).map(e=>({id:e.id,name:e.name,description:e.description,fieldCount:e.fields.length})),C=e=>{var t;let i=[];if(e.customFields&&e.customFields.length>20&&i.push("Maximum ".concat(20," custom fields allowed")),null==(t=e.customFields)||t.forEach((e,t)=>{let l;(l=[],!e.id&&l.push("Field is missing an ID"),(!e.label||""===e.label.trim())&&l.push("Field label is required"),!Object.values(c).includes(e.type)&&l.push("Invalid field type: ".concat(e.type)),[c.SINGLE_CHOICE,c.MULTI_CHOICE].includes(e.type)&&(Array.isArray(e.options)&&0!==e.options.length?e.options.forEach((t,i)=>{t.text&&""!==t.text.trim()||l.push("".concat(e.label,": Option ").concat(i+1," is missing text"))}):l.push("".concat(e.label,": Choice fields must have at least one option"))),l).forEach(e
1=>i.push("Field ".concat(t+1,": ").concat(e)))}),e.collectionMode===u.FOLLOW_UP){let{followUpSettings:t}=e;t?(Object.values(d).includes(t.deliveryMethod)||i.push("Invalid delivery method"),t.sendReminder&&t.maxReminders<0&&i.push("Max reminders must be 0 or greater")):i.push("Follow-up settings are required in follow-up mode")}return{valid:0===i.length,errors:i}},O=(e,t)=>{let i=[];return e&&e.customFields?(e.customFields.forEach(e=>{var l,r,n,s,o;let a=null==t||null==(l=t.fields)?void 0:l[e.id];if(e.required){if(!a||null===a.value||void 0===a.value)return void i.push('"'.concat(e.label,'" is required'));if(e.type===c.TEXT||e.type===c.PHONE)"string"==typeof a.value&&""===a.value.trim()&&i.push('"'.concat(e.label,'" is required'));else if(e.type===c.ADDRESS){let t=a.value||{},l=[];(null==(r=t.street)?void 0:r.trim())||l.push("street"),(null==(n=t.city)?void 0:n.trim())||l.push("city"),(null==(s=t.state)?void 0:s.trim())||l.push("state"),(null==(o=t.zip)?void 0:o.trim())||l.push("zip"),l.length>0&&i.push('"'.concat(e.label,'" is incomplete (missing: ').concat(l.join(", "),")"))}else[c.SINGLE_CHOICE,c.MULTI_CHOICE].includes(e.type)&&(!Array.isArray(a.value)||0===a.value.length)&&i.push('"'.concat(e.label,'" is required'))}if(a&&null!==a.value&&void 0!==a.value){if(e.type===c.TEXT&&"string"==typeof a.value&&a.value.length>500&&i.push('"'.concat(e.label,'" exceeds maximum length of 500 characters')),e.type===c.PHONE){let t=String(a.value).replace(/\D/g,"");t.length>0&&t.length<10&&i.push('"'.concat(e.label,'" must be a valid phone number (10+ digits)'))}if(e.type===c.ADDRESS&&a.value){let{street:t,city:l,state:r,zip:n}=a.value;t&&t.length>100&&i.push('"'.concat(e.label,'" street exceeds 100 characters')),l&&l.length>100&&i.push('"'.concat(e.label,'" city exceeds 100 characters')),r&&r.length>100&&i.push('"'.concat(e.label,'" state exceeds 100 characters')),n&&n.length>20&&i.push('"'.concat(e.label,'" zip exceeds 20 characters'))}e.type===c.SINGLE_CHOICE&&Array.isArray(a.value)&&a.value.length>1&&i.push('"'.concat(e.label,'" allows only one selection')),[c.SINGLE_CHOICE,c.MULTI_CHOICE].includes(e.type)&&e.includeOther&&Array.isArray(a.value)&&a.value.includes("other")&&(!a.otherText||""===a.otherText.trim())&&i.push('Please specify your answer for "Other" in "'.concat(e.label,'"'))}}),{valid:0===i.length,errors:i}):{valid:!0,errors:[]}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.