1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([["1932"],{915584(e,r,t){e.exports=t.p+"434f387bdc292dbc.png"},646864(e,r,t){t.r(r),t.d(r,{default:()=>P});var n=t(629901),o=t(775641),i=t(271221),l=t(995089),a=t(387858),s=t(969153),c=t(850857),d=t(959458),u=t(707091),m=t(519774),f=t(797879),p=t(695821),h=t(619455),x=t(732616),b=t(296797),y=t(462957),v=t(385001),g=t(749854),j=t(564394),w=t(844148),S=t(755342),k=t(21150),E=t(886957),N=t(915584);let _=t.p+"d18a65547d695d5d.png";var T=t(765103);function G(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function C(e,r,t,n,o,i,l){try{var a=e[i](l),s=a.value}catch(e){t(e);return}a.done?r(s):Promise.resolve(s).then(n,o)}function O(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(t=o.next()).done)&&(i.push(t.value),!r||i.length!==r);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,r)||function(e,r){if(e){if("string"==typeof e)return G(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return G(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}function D(){var e=M(["\n mutation generateGedcomUploadToken {\n generateGedcomUploadToken\n }\n"]);return D=function(){return e},e}function F(){var e=M(["\n mutation uploadGedcomCreateRelationServiceMember($memberKey: ID!) {\n createOrUpdateRelationServiceMember(memberKey: $memberKey) {\n relationServiceMember {\n id\n token\n }\n }\n }\n"]);return F=function(){return e},e}var I=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skip:!1,onSuccess:function(){}},t=O((0,i.useMutation)(U),1)[0],n=O((0,i.useMutation)(A),1)[0],l=O((0,o.useState)(!1),2),a=l[0],s=l[1],c=O((0,o.useState)(!1),2),d=c[0],u=c[1],m=O((0,o.useState)(void 0),2),f=m[0],p=m[1],h=O((0,o.useState)(void 0),2),x=h[0],b=h[1],y=O((0,o.useState)(""),2),v=y[0],g=y[1],j=(0,o.useCallback)(function(e,t){if(!a||!x)throw Error("gedcom upload is not ready");if(!e)throw Error("file must be provided");if(!t)throw Error("relationServiceMemberToken must be provided");if(d)throw Error("Gedcom file is already being uploaded");u(!0);var n=new FormData;return n.append("file",e),n.append("uploadToken",x),n.append("relationServiceMemberToken",t),fetch("/api/upload-gedcom",{method:"POST",body:n,credentials:"include"}).then(function(e){u(!1),p(e.ok?void 0:e.statusText),e.ok&&r.onSuccess&&r.onSuccess()}).catch(function(e){u(!1),p(e)}),Promise.resolve(!0)},[a,d,r,x]);return(0,o.useEffect)(function(){if(!r.skip){var o;s(!1),b(void 0),p(void 0),(o=function(){var r,o,i,l;return function(e,r){var t,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(l,"next",{value:s(0)}),a(l,"throw",{value:s(1)}),a(l,"return",{value:s(2)}),"function"==typeof Symbol&&a(l,Symbol.iterator,{value:function(){return this}}),l;function s(a){return function(s){var c=[a,s];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(t=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(e,i)}catch(e){c=[6,e],n=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(a){switch(a.label){case 0:return[4,n({variables:{memberKey:e}})];case 1:return g(null==(l=a.sent())||null==(i=l.data)||null==(o=i.createOrUpdateRelationServiceMember)||null==(r=o.relationServiceMember)?void 0:r.token),[4,t()];case 2:return b(a.sent().data.generateGedcomUploadToken),s(!0),[2]}})},function(){var e=this,r=arguments;return new Promise(function(t,n){var i=o.apply(e,r);function l(e){C(i,t,n,l,a,"next",e)}function a(e){C(i,t,n,l,a,"throw",e)}l(void 0)})})().catch(function(e){s(!1),p("Error in useGedcomUpload hook: ".concat(e.message||e))})}},[n,t,e,r.skip]),{uploadGedcom:j,relationServiceMemberToken:v,isUploading:d,isReady:a,error:f}},U=(0,i.gql)(D()),A=(0,i.gql)(F());function P(){var e=(0,T.S)(),r=(0,f.eY)("half-price-family-history-gedcom");(0,o.useEffect)(function(){e.enterExperiment()},[e]);var t=(0,m.T)(u.VB.earlybird),i=e.loading;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.s,{children:"Upload Your GEDCOM File to Discover Ancestral History"}),(0,n.jsx)(p.y,{description:"Explore your family tree like never before. Upload your GEDCOM file and unlock a world of ancestral insights. Dive into our extensive archives to connect the dots of your heritage and bring your family's past to life. Safe, easy, and enlightening - start your journey today!"}),i?(0,n.jsx)("div",{className:"m-auto flex w-1/12 justify-center py-6",children:(0,n.jsx)(S.I,{})}):(0,n.jsx)(R,{gedcomCapExperiment:e,isEarlybirdEligible:t,halfPriceFamilyHistoryGedcomToggle:r}),(0,n.jsx)(x.wi,{})]})}function R(e){var r=e.gedcomCapExperiment,t=e.isEarlybirdEligible,i=e.halfPriceFamilyHistoryGedcomToggle,l=(0,f.eY)("gedcom-file-size-toggle")?{byteValue:14e7,text:"140",people:"120,000"}:{byteValue:25e7,text:"250",people:"280,000"},s=(0,o.useContext)(a.w),m=s.rootDomain,p=s.domain,h=i.inExperiment,x=i.variant;return r.canUploadGedcom?(0,n.jsxs)("div",{className:"mb-10 mt-10 flex w-full max-w-[1200px] flex-col place-content-center gap-4 overflow-hidden px-8 md:mx-auto md:mt-20 md:flex-row",children:[(0,n.jsx)("div",{className:"flex w-full justify-end bg-cream p-4 md:w-1/2",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"mb-6 mt-2 text-4xl/10 font-bold",children:"Import your family tree to Findmypast"}),(0,n.jsxs)("div",{className:"mb-6 rounded-lg bg-white-new p-4",children:[(0,n.jsx)(H,{maxFileSize:l,rootDomain:m}),(0,n.jsxs)("p",{className:"mt-4",children:["Please note that any media files referenced in your GEDCOM wonât be imported. Files can be up to ",l.text,"MB with maximum ",l.people," people. To upload a larger file, contact"," ",(0,n.jsx)("a",{href:"mailto:[email protected]",onClick:function(){(0,v.Bc)("gedcom_upload","click_email_support_link")},children:"[email protected]"}),"."]}),(0,n.jsx)("hr",{className:"my-8 h-px border-0 bg-dark-cream"}),(0,n.jsxs)(w.Xl,{children:[(0,n.jsx)(w.Xo,{children:"What is a GEDCOM?"}
1),(0,n.jsx)(w.ub,{children:"GEDCOM is a file format for exchanging genealogical data between genealogy websites and applications."})]}),(0,n.jsxs)(w.Xl,{children:[(0,n.jsx)(w.Xo,{children:"How do I get my GEDCOM?"}),(0,n.jsxs)(w.ub,{children:["You can export and download your tree as a GEDCOM from another genealogy website or app."," ",(0,n.jsx)("a",{href:"https://www.findmypast.co.uk/blog/family-tree/upload-family-tree-gedcom",children:"Read more on our blog"})," ","or"," ",(0,n.jsx)("a",{href:"https://www.findmypast.co.uk/help/articles/115004853909-how-do-i-upload-my-family-tree-to-findmypast-with-a-gedcom-file-",children:"See our help files"}),"."," "]})]})]})]})}),(0,n.jsxs)("div",{className:"w-full bg-dark-blue p-4 text-white-new md:w-1/2",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"mb-6 mt-2 text-4xl/10 font-bold",children:"We'll help your tree grow"}),(0,n.jsxs)("ul",{children:[h&&(0,n.jsxs)("li",{className:"relative mb-4 ml-16 list-none",children:[(0,n.jsx)("div",{className:"absolute top-[-2px] ml-[-60px] flex h-10 w-10 items-center justify-center rounded-full border border-white-new",children:(0,n.jsx)(E.I,{name:"Sell",size:"1.5rem"})}),(0,n.jsx)("h2",{className:"text-lg/6",children:"Half price family history"}),(0,n.jsx)("p",{children:0===x?"Delve deeper into your past than ever before. Hurry, offer\n ends ".concat(".com"===p?"September 15":"15 September",". T&Cs apply."):"Delve deeper into your past than ever before. Hurry, offer\n ends ".concat(".com"===p?"September 30":"30 September",". T&Cs apply.")})]}),(0,n.jsxs)("li",{className:"relative mb-4 ml-16 list-none",children:[(0,n.jsx)("div",{className:"absolute top-[-2px] ml-[-60px] flex h-10 w-10 items-center justify-center rounded-full border border-white-new",children:(0,n.jsx)(E.I,{name:"census1921RecordIcon",size:"1.5rem"})}),(0,n.jsx)("h2",{className:"text-lg/6",children:"Access our family history records"}),(0,n.jsx)("p",{children:"We'll look for people on your tree in the 1921 Census, military records and more."})]}),(0,n.jsxs)("li",{className:"relative mb-4 ml-16 list-none",children:[(0,n.jsx)("div",{className:"absolute top-[-2px] ml-[-60px] flex h-10 w-10 items-center justify-center rounded-full",children:(0,n.jsx)("img",{src:_,alt:""})}),(0,n.jsx)("h2",{className:"text-lg/6",children:"Search other trees"}),(0,n.jsx)("p",{children:"Find ancestors in our network of millions of family trees"})]}),(0,n.jsxs)("li",{className:"relative mb-4 ml-16 list-none",children:[(0,n.jsx)("div",{className:"absolute top-[-2px] ml-[-60px] flex h-10 w-10 items-center justify-center rounded-full",children:(0,n.jsx)(E.I,{name:"newspaperRecordIcon",size:"1.5rem"})}),(0,n.jsx)("h2",{className:"text-lg/6",children:"Find family stories"}),(0,n.jsx)("p",{children:"Understand the world your ancestors lived in with our newspaper collections"})]})]})]})}),(0,n.jsx)("img",{src:N,alt:""})]})]}):(0,n.jsxs)("div",{className:"mb-10 mt-10 flex w-full max-w-[1200px] flex-col place-content-center gap-4 overflow-hidden px-8 md:mx-auto md:mt-20 md:flex-row",children:[(0,n.jsxs)("div",{className:"mb-10",children:[(0,n.jsx)("h1",{className:"pb-4",children:"Subscribe to upload unlimited trees"}),(0,n.jsx)("p",{className:"pb-4",children:"It looks like you've already uploaded a family tree to Findmypast."}),(0,n.jsx)("p",{className:"pb-4",children:"Subscribe today to import unlimited GEDCOM files and really let your research fly."}),(0,n.jsxs)("div",{className:"flex flex-row items-center",children:[(0,n.jsx)(g.$n,{variant:"light-filled-dark-blue",onClick:function(){(0,v.Bc)("gedcom_upload","click_subscribe_to_upload_more_gedcoms");var e=t?(0,d.Wy)("/upgrade",{journey:u.VB.earlybird,checkoutOrigin:c.$3.Gedcom}):(0,d.Wy)("/subscribe",{checkoutOrigin:c.$3.Gedcom});(0,y.VJ)(e)},children:"Subscribe to continue"}),t&&(0,n.jsx)(j.Ex,{pointer:"left",className:"bg-coral font-medium leading-[13px] text-white",children:"15% off"})]})]}),(0,n.jsx)("div",{children:(0,n.jsx)("img",{src:N,alt:"limit monthly mechanics"})})]})}var H=function(e){var r=e.maxFileSize,t=e.rootDomain,a=(0,o.useRef)(null),c=(0,b.H)("/",t,"tree"),d="".concat(c,"api/gedcom/ImportFamilyTreeTransform?familyTreeId=0&transformFormat=Gedcom&transformType=ImportNew"),u=(0,i.useApolloClient)(),m=(0,f.eY)("arborists-using-new-gedcom-upload-proxy_2024-06-24"),p=I((0,o.useContext)(s.A).memberId,{skip:!m,onSuccess:function(){u.cache.evict({fieldName:"familyTreesV2"});var e=(0,b.H)("/tree/all-trees",t);(0,y.VJ)(e,t)}}),h=p.isReady,x=p.isUploading,j=p.relationServiceMemberToken,w=p.uploadGedcom,S=p.error,E=h&&S,N=function(e){if(e.size>r.byteValue)return"This file is too large. Choose a smaller file (less than ".concat(r.text,"MB), or contact us for help uploading this file")};return(0,n.jsx)(l.Formik,{onSubmit:function(e){if(m)w(e.file,j);else{var r=a.current;null==r||r.submit()}},initialValues:{file:null},validate:function(e){if(!e.file)return{file:"Please select a file to upload"};if(r=e.file,![".ged",".GED"].some(function(e){return r.name.endsWith(e)}))return{file:"This file is not supported. Please upload a .ged file"};var r,t=N(e.file);if(t)return{file:t}},children:function(e){var r=e.setFieldValue,t=e.errors,o=e.isValid,i=e.handleReset,l=e.handleSubmit;return(0,n.jsxs)("form",{onReset:i,onSubmit:l,ref:a,action:d,encType:"multipart/form-data",method:"post","data-testid":"upload-form",children:[(0,n.jsx)("input",{className:"file:hover:bg-hover-yellow mb
1-4 w-full file:h-10 file:cursor-pointer file:rounded-full file:border-none file:bg-yellow file:px-3 file:py-1 file:text-dark-blue file:transition-colors",type:"file",accept:".ged, .GED",name:"file","data-testid":"upload-tree-input",onClick:function(){(0,v.Bc)("gedcom_upload","click_choose_file_button")},onChange:function(e){var t;r("file",null==(t=e.currentTarget.files)?void 0:t[0])}}),t.file&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(k.F.Root,{variant:"error",className:"mb-4",children:(0,n.jsx)(k.F.Text,{children:t.file})})}),E&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(k.F.Root,{variant:"error",className:"mb-4",children:(0,n.jsxs)(k.F.Text,{children:[(0,n.jsx)("p",{className:"font-bold",children:" Something went wrong "}),(0,n.jsxs)("p",{children:[" ","Please try again. If this keeps happening,"," ",(0,n.jsx)("a",{href:"/help/contact",className:"text-destructive-foreground underline visited:text-destructive-foreground hover:text-destructive-foreground focus:text-destructive-foreground",children:"contact customer support."})," "]})]})})}),(0,n.jsx)(g.$n,{variant:"light-filled-dark-blue",disabled:m?!o||x||!j:!o,"data-testid":"upload-tree-button",onClick:function(){(0,v.Bc)("gedcom_upload","click_upload_tree_button")},children:x?"Uploading GEDCOM file...":"Upload GEDCOM file"})]})}})}},765103(e,r,t){t.d(r,{S:()=>m});var n=t(775641),o=t(271221),i=t(657375),l=t.n(i),a=t(145651),s=t(797879),c=t(600001);function d(){var e,r,t=(e=["\n query getHasUploadedGedcom {\n relationServiceMember {\n id\n hasUploadedGedcom\n }\n }\n"],r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}})));return d=function(){return t},t}var u=t.n(c)()(d());function m(){var e,r,t=(0,s.eY)("gedcom-upload-cap"),i=(0,s.rk)("the-lab_gedcom-cap_2025-02-07"),c=n.useContext(a.P),d=c.activeSubscription,m=(0,o.useQuery)(u,{fetchPolicy:"no-cache"}),f=!!(null==(r=m.data)||null==(e=r.relationServiceMember)?void 0:e.hasUploadedGedcom),p=m.loading||c.isLoading,h=(0,n.useMemo)(function(){return!p&&!!t&&!!i.inExperiment&&(!d||"FREE_TRIAL"===d.type)&&!!f},[d,i.inExperiment,f,t,p]);return{loading:p,canUploadGedcom:(0,n.useMemo)(function(){return!h||0===i.variant},[i.variant,h]),enterExperiment:h?i.enterExperiment:l()}}}}]); 2//# sourceMappingURL=upload-gedcom.4d36cb29aa1f84be.js.map
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.