PageSourceSearch

https://www.redesigndaily.com/resources/combined/js/SB_P.608895900211c0bea1e6.bundle.js

js redesigndaily.com collected 2026-09-29 09:29:06 UTC 46,343 bytes, 1 lines download raw bytes

1"use strict";(self.hometalkChunk=self.hometalkChunk||[]).push([["SB_P"],{21043(e,t,s){s.d(t,{A:()=>n});var a=s(92720),i=s(85356);const n=function(e,t,s){var n=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,i.A)(s)&&(n="leading"in s?!!s.leading:n,r="trailing"in s?!!s.trailing:r),(0,a.A)(e,t,{leading:n,maxWait:t,trailing:r})}},31155(e,t,s){s.d(t,{A:()=>h});var a=s(85356),i=s(62579),n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;const h=function(e){if("number"==typeof e)return e;if((0,i.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):r.test(e)?NaN:+e}},31398(e,t,s){s.d(t,{A:()=>v});var a=s(96540),i=s.n(a),n=s(29967);class r extends i().Component{render(){return i().createElement("span",{className:"tr_zone","data-tr_zone":"posting_reminder"},i().createElement("h2",null,this.props.reminder_title),i().createElement("p",null,this.props.reminder_description),i().createElement("div",{className:"buttons flexbox flex-align-center"},i().createElement("a",{"data-ht-track":"Click No Thanks",onClick:()=>{this.props.toggleReminder(this.props.reminder,!1),this.props.submit(this.props.reminder)},className:"textlink sl-no-thanks"},n.A.LANG.sharebox.no_thanks),i().createElement("a",{"data-ht-track":"Click Add",onClick:()=>{this.props.ignoreReminder(this.props.reminder),this.props.toggleReminder(this.props.reminder,!1)},className:"button primary-button sl-add-description"},n.A.LANG.sharebox.add)))}}const o=r;class l extends i().Component{render(){return i().createElement("span",{class:"sl-hashtag-warning"},i().createElement("h2",null,"Warning:"),i().createElement("p",null,"Hashtags within the content of the post will be removed."),i().createElement("p",null,"Would you like to move your hashtags to the hashtag section?"),i().createElement("div",{className:"buttons flexbox flex-align-center"},i().createElement("a",{className:"textlink sl-continue-posting",onClick:()=>{this.props.toggleReminder("hashtag",!1),this.props.submit("hashtag")}},"Continue Posting"),i().createElement("a",{onClick:()=>{this.props.toggleReminder("hashtag",!1)},className:"button primary-button sl-edit-hashtags"},"Edit Hashtags")))}}const c=l;class h extends i().Component{render(){return i().createElement("span",{class:"tr_zone","data-tr_zone":"lightbox_close_lightbox_reminder"},i().createElement("h2",null,"Sorry!"),i().createElement("p",null,"This image is too large. Try uploading images smaller then 20MB."),i().createElement("div",{className:"buttons flexbox flex-align-center"},i().createElement("a",{className:"button primary-button sl-ok",id:"lbClose",onClick:()=>this.props.hideReminder("maxImagesSize",!1)},"Ok")))}}const d=h;class m extends i().Component{render(){return i().createElement("span",{className:"tr_zone","data-tr_zone":"lightbox_close_lightbox_reminder"},i().createElement("h2",null,"Sorry!"),i().createElement("p",null,"You can only upload ",this.props.maximum," pictures & videos per project."),i().createElement("div",{className:"buttons flexbox flex-align-center"},i().createElement("a",{className:"button primary-button sl-ok",id:"lbClose",onClick:()=>this.props.hideReminder("maxImagesUpload",!1)},"Ok")))}}m.defaultProps={maximum:30};const p=m;var g=s(70772),u=s(54705);class f extends i().Component{constructor(){super(...arguments),(0,u.A)(this,"reminder","unidentified_blog"),(0,u.A)(this,"ignoreReminder",()=>{this.props.toggleReminder(this.reminder,!1),this.props.submit(this.reminder)}),(0,u.A)(this,"reviewPost",()=>{this.props.ignoreReminder(this.reminder),this.props.toggleReminder(this.reminder,!1),this.props.toggleScrapeMode()})}render(){return i().createElement("span",{className:"tr_zone","data-tr_zone":"posting_reminder_scrape_review"},i().createElement("h2",null,"We had some difficulties formatting your blog post."),i().createElement("p",null,"Just to make sure everything went smoothly, please review your post before posting"),i().createElement("div",{className:"buttons flexbox flex-align-center"},i().createElement("a",{"data-ht-track":"Click Post Anyway",onClick:()=>this.ignoreReminder(),className:"textlink sl-post-anyway"},"Post anyway"),i().createElement("a",{"data-ht-track":"Click Review",onClick:()=>this.reviewPost(),className:"button primary-button sl-review-scrape"},"Review my post")))}}const E=f;class b extends i().Component{render(){let{reminders:e,toggleReminder:t,ignoreReminder:s,submit:a,postType:n,shareboxConfig:r,maxMediaUploadSize:l,toggleScrapeMode:h,media:m}=this.props;return i().createElement("div",{className:`sharebox-reminder-wrap ${(0,g.nE)(e)}`},i().createElement("div",{className:"sharebox-reminder"},e.minimum_words&&i().createElement(o,{reminder:"minimum_words",reminder_title:"Make sure your recipe will c
1ount for our Incentive Programs!",reminder_description:"It seems you don't have 100 words or 3 photos/video",toggleReminder:t,ignoreReminder:s,submit:a,post_type:n}),e.refresh&&i().createElement(o,{reminder:"refresh",reminder_title:r.general.description_reminder_title,reminder_description:r.general.description_reminder_txt,toggleReminder:t,ignoreReminder:s,submit:a,post_type:n}),e.hashtag&&i().createElement(c,{toggleReminder:t,ignoreReminder:s,submit:a}),e.maxImagesSize&&i().createElement(d,{hideReminder:t,ignoreReminder:s,submit:a}),e.maxImagesUpload&&i().createElement(p,{hideReminder:t,media:m,maximum:l}),e.unidentified_blog&&i().createElement(E,{toggleReminder:t,toggleScrapeMode:()=>h(),ignoreReminder:s,submit:a,post_type:n})))}}const v=b},41820(e,t,s){s.r(t),s.d(t,{default:()=>W});var a=s(54705),i=s(73323),n=s(21043),r=s(96540),o=s.n(r),l=s(29967),c=s(70772),h=s(13913),d=s(40184),m=s(46894),p=s.n(m),g=s(10029),u=s(58168),f=s(4211),E=s(57761),b=s.n(E),v=s(91357),S=s(12989);class _ extends o().Component{render(){const{materials:e,additionalMaterial:t,handleMaterial:s,changeTooltipAction:a,checkField:i}=this.props;return o().createElement("div",{className:"flexbox w100 materials-block layout-block"},o().createElement("h3",{className:"sl-material-header"},l.A.LANG.sharebox.materials_title),e&&e.map((e,t)=>o().createElement("div",{className:"material-entry",key:t},o().createElement("input",{name:`materials${t}`,value:e.material,className:"bordered sl-material counter-padding "+(i(`materials${t}`)?"errorField":""),maxLength:"70",placeholder:l.A.LANG.sharebox.materials_name_placeholder,type:"text",onChange:e=>s(t,"material",e.target.value),onFocus:()=>a("materials")}),o().createElement("input",{maxLength:"70",placeholder:l.A.LANG.sharebox.materials_source_placeholder,className:"bordered sl-material-where counter-padding",type:"text",value:e.purchased_at,disabled:""===e.material,onChange:e=>s(t,"purchased_at",e.target.value)}))),o().createElement("a",{className:"flexbox w100 flex-align-center sl-material-add",onClick:()=>t(),"data-ht-track":JSON.stringify({action:"Additional Material",element_zone:"Post Lightbox"})},o().createElement("i",{className:"ics-plus grayTxt",style:{marginRight:"3px"}}),l.A.LANG.sharebox.add_materials_button))}}const x=_;var w=s(44171),A=s(38780);class N extends o().Component{constructor(e){super(e),this.steps=[l.A.LANG.sharebox_tooltip.step1,l.A.LANG.sharebox_tooltip.step2,l.A.LANG.sharebox_tooltip.step3,l.A.LANG.sharebox_tooltip.step4,l.A.LANG.sharebox_tooltip.step5,l.A.LANG.sharebox_tooltip.step6,l.A.LANG.sharebox_tooltip.step7,l.A.LANG.sharebox_tooltip.step8,l.A.LANG.sharebox_tooltip.step9],this.state={show:!0}}closeBubble(){this.setState({show:!1})}openBubble(){this.setState({show:!0})}findIndex(e,t){let s=0;switch(e){case"title":s=1;break;case"description":s=2;break;case"upload":switch(t){case 0:s=3;break;case 1:s=5;break;case 2:s=6}break;case"upload-description":s=4;break;case"materials":s=7;break;case"stats":s=8}return s}render(){const e={slider:{rewind:!1,bound:!0,perView:1,gap:0},arrows:{next:o().createElement("div",{className:"swiper-button-next",onClick:()=>(0,w.default)("Arrow - Click Element",{element_zone:"Tip Tool",element_type:"Arrow"}),"data-glide-dir":">"},o().createElement("i",{className:"ics-arrow-right-small"})),prev:o().createElement("div",{className:"swiper-button-prev",onClick:()=>(0,w.default)("Arrow - Click Element",{element_zone:"Tip Tool",element_type:"Arrow"}),"data-glide-dir":"<"},o().createElement("i",{className:"ics-arrow-left-small"}))}};return o().createElement("div",{className:"tooltip-posting-react","data-tr_zone":"Tip Tool"},this.state.show&&o().createElement("span",null,o().createElement("div",{className:"bubble-pop fs13"},o().createElement("a",{className:"xClose nodecoration",onClick:()=>this.closeBubble(),"data-ht-track":JSON.stringify({action:"Close Tip Tool",element_zone:"Tip Tool"})},o().createElement("i",{className:"ics-close fn"})),o().createElement(A.A,{options:e.slider,arrows:e.arrows,total:this.steps.length,bullets:!0,className:"swiper-container swiper-container-horizontal"},this.steps.map((e,t)=>o().createElement("div",{className:"swiper-slide glide__slide",key:t},o().createElement("span",{className:"text"},e)))))),o().createElement("a",{className:"fab button float-button",onClick:()=>this.openBubble(),"data-ht-track":JSON.stringify({action:"Open Tip Tool",element_zone:"Tip Tool"})},o().createElement("i",{className:"ics-lightbulb"})))}}const C=N;var y=s(66383),k=s(84691),D=s(64038),T=s(64861),M=s(6155),I=s(93122),L=s(31398),R=s(8802),F=s(71256),U=s(83413),P=s(53198);class G extends o().Component{constructor(e){var t;super(e),t=this,(0,a.A)(this,"timeUnits",["Minutes","Hours","Days","Weeks","Months"]),(0,a.A)(this,"difficulties",["Easy","Medium","Advanced"]),(0,a.A)(this,"maxMediaUploadSize",30),(0,a.A)(this,"submit",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t.checkForm()?((0,w.default)("Submit Post - Click Element",{element_zone:"Post Lightbox"}),t.props.submit(e)&&(1===parseInt(t.props.features.get("captcha.post"))?t.setState({showCaptcha:!0}):t.props.saveItem())):(0,w.default)("Submit Post - Validation Error",{element_zone:"Post Lightbox"})}),(0,a.A)(this,"checkField",e=>!(!(this.state.isDirty||this.props.uploadQueue.length>0)||-1===this.state.errors.indexOf(e))),(0,a.A)(this,"handleOpen",()=>{this.setState({isOpen:!0})}),(0,a.A)(this,"handleClose",()=>{this.setState({isOpen:!1})}),(0,a.A)(this,"handleClick",()=>{1==this.state.isOpen?this.handleClose():this.handleOpen()}),(0,a.A)(this,"showSavingUnpublishedFooter",()=>{let{data:e}=this.props;return e.isUnpublishedWithoutDate()&&this.state.isDirty}),(0,a.A)(this,"changeTooltipAction",e=>{this.setState({actionTooltip:e})}),(0,a.A)(this,"checkIfLoggedIn",()=>!!this.props.member.loggedIn()||(this.props.showSignup(),!1)),(0,a.A)(this,"onSortEnd",(e,t)=>{this.props.media().orderQueue(e,t),this.setState({reorderingItems:!1})}),(0,a.A)(this,"onSortStart",()=>{this.setState({reorderingItems:!0})}),(0,a.A)(this,"handleMaterial",(e,t,s)=>{e<2&&this.setState({errors:this.state.errors.filter(t=>t!=="materials"+e)}),this.props.handleNestedChange("materials."+e+"."+t,s)}),this.state={showSignup:!1,showAddUrl:!1,showHashtags:this.props.isEdit&&this.props.data.hashtags.length>0&&""!==this.props.data.hashtags[0].hashtag,showMetaData:this.props.isEdit&&this.props.data.meta_data&&this.props.data.meta_data.length>0,validationMsg:"",draftSaved:!1,savingDraft:!1,errors:[],isDirty:!1,actionTooltip:"",reorderingItems:!1,showCaptcha:!1,show_recipe:this.showRecipe(),isOpen:!1,suggestions:[]}
1,this.isTooltipOpen=!1,this.getSectionConfig=T.q.bind(this)}toggleHashtags(){this.setState({showHashtags:!this.state.showHashtags})}toggleMetaData(){this.setState({showMetaData:!this.state.showMetaData})}showPublishedAt(){let{data:e,isEdit:t}=this.props;return!t&&this.props.member.isBloggerContributor()||t&&-1!==l.A.EDIT_PUBLISH_TYPES.indexOf(e.type)}submitReview(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.checkForm()&&(this.props.handleChange("published_at","unpublished",{saveDraft:!1}),this.submit(e))}checkForm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{isEdit:t,data:s,member:a,uploadQueue:i,uploadProgress:n}=this.props;(0,c.tC)(s);let r=this.props.shareboxConfig.validation(s,t,a,i,n);if(this.setState({validationMsg:e?"":r.msg,errors:r.errors}),0===r.errors.length)return!0}handleChangeNumber(e,t){if(this.props.handleChange(e,t),b().isEmpty(t)||b().isInt(t)){const t=this.state.errors.indexOf(e);-1!==t&&this.setState({errors:p()(this.state.errors,{$splice:[[t,1]]}),validationMsg:""})}else this.setState({errors:p()(this.state.errors,{$push:[e]}),validationMsg:""})}handleNumberElementChange(e,t,s,a,i){this.props.handleElementChange(e,t,s,a,i);const n=this.state.errors.indexOf("recipe_info_"+a);(0,M.ZB)(a,i)?-1!==n&&this.setState({errors:p()(this.state.errors,{$splice:[[n,1]]}),validationMsg:""}):-1===n&&this.setState({errors:p()(this.state.errors,{$push:["recipe_info_"+a]}),validationMsg:""})}componentWillReceiveProps(e){e.data!==this.props.data&&(this.state.isDirty||this.setState({isDirty:!0}))}showDraftFooter(){let{data:e,isEdit:t,showScrape:s,hasMissingScrapeElement:a}=this.props;return(!s||a())&&!t&&e.isDraft()&&this.state.isDirty}handleChangeSummary(e){this.setState({errors:this.state.errors.filter(e=>"summary"!==e)}),this.props.handleChange("summary",e)}showDatePicker(){if("desktop"===this.props.screenPlatform)return this.props.member.permissionGranted(["scheduling_admin"])||l.A.THEME.show_schedule_project_without_permission&&this.showPublishedAt()&&this.props.member.isContributor()}onChange(e,t){"show_recipe"===e&&!t&&this.props.resetRecipeSections(),this.setState(s=>(s[e]=t,s))}showRecipe(){let e=!1,t=this.props.data.sections;return t&&t.forEach(t=>{(""!==t.title||t.instructions&&"<p> </p><p> </p>"!==t.instructions[0].text||t.ingredients&&"<p> </p><p> </p>"!==t.ingredients[0].text)&&(e=!0)}),e}render(){let{isEdit:e,data:t,reminders:s,success:a,handleChange:i,handleNestedChange:n,additionalMaterial:r,uploadQueue:m,media:p,savingDraft:g,savingUnpublished:E,canSaveDraft:b,saveDraft:_,saveItem:w,addMetaData:A,getMetaDataTitles:N,setMetaDataTitles:T,additionalHashtag:M}=this.props;return o().createElement(v.A,null,o().createElement("div",{className:"main-page-wrap "+(this.props.isLocked?"disabled":""),"data-item-id":t.id||""},o().createElement("div",{className:"container-wrap innerwrap"},!a&&o().createElement(o().Fragment,null,o().createElement("div",{className:"page-header-full with-multiple-sections"},o().createElement("header",null,o().createElement("h1",{className:"title sharebox-title"},e?d.Ay.isDraft(t.type)?l.A.LANG.sharebox.edit_draft_header:l.A.LANG.sharebox.edit_project_header:this.props.shareboxConfig.general.header,!!this.props.showScrape&&o().createElement("span",{className:"toggle-build lh13"},o().createElement("a",{onClick:()=>this.props.toggleScrapeMode(),"data-ht-track":JSON.stringify({action:"quit scraping",element_zone:"sharebox"}),className:"color-secondary sl-create-post-manually"},o().createElement("i",{className:"ics-create-post fl"})," ",l.A.LANG.sharebox.create_your," ",this.props.shareboxConfig.general.project_name," ",l.A.LANG.sharebox.manually)),!this.props.showScrape&&!e&&o().createElement("span",{className:"toggle-build lh13"},o().createElement("a",{onClick:()=>this.props.toggleScrapeMode(),className:"color-secondary sl-import-blog-post","data-ht-track":JSON.stringify({action:"import blog",element_zone:"sharebox"})},o().createElement("i",{className:"ics-wizard fl"})," ",l.A.LANG.sharebox.import_blog_button))))),o().createElement("div",{className:"page-header-full"},e?"":o().createElement(D.A,{name:"post_shbx.under_post_a_project"}),"1"===this.props.features.get("html_post_process.enabled")&&!l.A.THEME.sharebox_show_scrape&&!this.props.features.get("sharebox_show_scrape.enabled")&&-1!==["emptyPost","draftPost"].indexOf((0,f.Jt)(t,"type"))&&o().createElement(o().Fragment,null,o().createElement(P.A,{copyPaste:this.props.copyPaste,handleChange:i,html_post_process:0}),o().createElement("div",{className:"spacer20"})))),o().createElement("div",{className:"page-header-full"},o().createElement("div",{className:`sharebox-responsive redesigned shadowBox flexbox w100 forms-revamped flex-column sl-post-box ${this.props.shareboxConfig.general.wrapper_class}`},o().createElement(L.A,(0,u.A)({},this.props,{submit:this.submit,maxMediaUploadSize:this.maxMediaUploadSize})),!a&&o().createElement("div",{className:this.state.errors.length?"formError sl-form-error":""}
1,this.getSectionConfig("scrape_post").show&&o().createElement(I.A,{section:"scrape_post",config:this.getSectionConfig("scrape_post"),general_settings:this.props.shareboxConfig.general,setSuccess:()=>this.props.setSuccess(),checkField:e=>this.checkField(e),disabled:!1,activityId:this.props.data.id,setData:this.props.setData,setUrl:this.props.setUrl,checkForm:()=>this.checkForm(!0),toggleScrapeMode:()=>this.props.toggleScrapeMode(),toggleReminder:(e,t)=>this.props.toggleReminder(e,t),showIncompleteFormElements:e=>this.props.showIncompleteFormElements(e),isEdit:e,data:t,checkIfLoggedIn:()=>this.checkIfLoggedIn()}),o().createElement("div",{className:this.props.hasMissingScrapeElement()?"unscraped-addons sl-unscraped-addons":void 0},this.props.member.permissionGranted("set_author")&&o().createElement(F.A,{data:t,handleChange:i,isEdit:e}),this.getSectionConfig("after_scrape_header").show&&o().createElement(I.A,{section:"after_scrape_header",config:this.getSectionConfig("after_scrape_header"),general_settings:this.props.shareboxConfig.general,hasMissingScrapeElement:this.props.hasMissingScrapeElement}),this.getSectionConfig("post_top").show&&o().createElement(I.A,{section:"post_top",config:this.getSectionConfig("post_top"),general_settings:this.props.shareboxConfig.general,checkField:e=>this.checkField(e),handleChangeSummary:e=>this.handleChangeSummary(e.target.value),checkIfLoggedIn:()=>this.checkIfLoggedIn(),changeTooltipAction:e=>this.changeTooltipAction(e),handleChange:(e,t)=>
1{i(e,t)},isEdit:e,data:t,media:p(),shareboxType:this.props.shareboxType}),this.getSectionConfig("media").show&&0!==m.length&&o().createElement("div",{className:"flexbox w100 upload-image-section"},this.getSectionConfig("media").settings&&this.getSectionConfig("media").settings.header?o().createElement("h2",{className:"fs16"},this.getSectionConfig("media").settings.header):null,o().createElement(y.A,{data:t,media:p(),handleChange:i,changeTooltipAction:this.changeTooltipAction,onSortEnd:this.onSortEnd,isEdit:e,reorderingItems:this.state.reorderingItems,onSortStart:this.onSortStart,saveDraft:_,general_settings:this.props.shareboxConfig.general,member:this.props.member})),this.getSectionConfig("upload_buttons").show&&o().createElement(I.A,{section:"upload_buttons",config:this.getSectionConfig("upload_buttons"),media:p(),checkIfLoggedIn:this.checkIfLoggedIn,itemId:t.id,saveDraft:_,changeTooltipAction:this.changeTooltipAction,maxMediaUploadSize:this.maxMediaUploadSize}),1===parseInt(this.props.features.get("scrape_recipe.enabled"))&&this.getSectionConfig("scrape_recipe").show&&!this.props.isEdit&&o().createElement(I.A,{section:"scrape_recipe",config:this.getSectionConfig("scrape_recipe"),sections:t.sections,addSection:(e,t)=>this.props.addSection(e,t),handleElementChange:this.props.handleElementChange,handleSectionChange:this.props.handleSectionChange,disabled:!1,handleChange:()=>{},checkField:e=>this.checkField(e),activityId:this.props.data.id,reloadActivityItem:this.props.reloadActivityItem,setIsLocked:this.props.setIsLocked,setSuccess:this.props.setSuccess,checkIfLoggedIn:()=>this.checkIfLoggedIn()}),this.getSectionConfig("word_count").show&&o().createElement("div",{className:"flexbox w100 anonimous-block"},o().createElement("span",{className:"bold"},l.A.LANG.sharebox.post_word_count," ",o().createElement("span",{className:"sl-post-word-count"},(0,h.t)(t,m)))),this.getSectionConfig("in_depth_guide").show&&0!==m.length&&o().createElement("div",{className:"flexbox w100 anonimous-block"},o().createElement("span",{className:"bold"},"In Depth Guide  "),o().createElement("input",{type:"checkbox",className:"sl_depth_guide",checked:-1!==t.type.indexOf("depth_guide"),onChange:e=>{let t=e.target.checked?"draftIn_depth_guide":"";i("type",t)}})),this.getSectionConfig("show_recipe_toggle").show&&!this.props.showScrape&&o().createElement("div",{className:"recipe-toggle flex w100 anonimous-block flex-align-center fs15"},o().createElement("div",{className:"toggle-md"},o().createElement("input",{className:"bordered",type:"checkbox",checked:this.state.show_recipe,onChange:e=>this.onChange("show_recipe",+e.target.checked)}),o().createElement("label",{className:"tbutton"},o().createElement("span",{className:"switch"}))),o().createElement("span",null,"  Posting a beauty recipe?")),this.getSectionConfig("recipe_info").show&&o().createElement(I.A,{section:"recipe_info",config:this.getSectionConfig("recipe_info"),sections:t.sections,addSection:(e,t)=>this.props.addSection(e,t),handleElementChange:this.props.handleElementChange,handleNumberElementChange:(e,t,s,a,i)=>this.handleNumberElementChange(e,t,s,a,i),handleSectionChange:this.props.handleSectionChange,checkField:e=>this.checkField(e)}),this.getSectionConfig("show_recipe_toggle").show&&!this.state.show_recipe?"":this.getSectionConfig("ingredients").show&&o().createElement(I.A,{section:"ingredients",config:this.getSectionConfig("ingredients"),sections:t.sections,handleElementChange:this.props.handleElementChange,addSection:this.props.addSection,handleSectionChange:this.props.handleSectionChange,addElementToSection:this.props.addElementToSection,removeElementFromSection:this.props.removeElementFromSection,cancelDelete:this.props.cancelDelete,removeSection:this.props.removeSection,checkField:e=>this.checkField(e),recipeScraped:this.props.recipeScraped}),this.getSectionConfig("show_recipe_toggle").show&&!this.state.show_recipe?"":this.getSectionConfig("instructions").show&&o().createElement(I.A,{section:"instructions",config:this.getSectionConfig("instructions"),sections:t.sections,addSection:(e,t)=>this.props.addSection(e,t),handleElementChange:this.props.handleElementChange,handleSectionChange:this.props.handleSectionChange,addElementToSection:this.props.addElementToSection,removeElementFromSection:this.props.removeElementFromSection,cancelDelete:this.props.cancelDelete,removeSection:this.props.removeSection,recipeScraped:this.props.recipeScraped}
1),this.getSectionConfig("tips").show&&o().createElement(I.A,{section:"tips",config:this.getSectionConfig("tips"),sections:t.sections,handleElementChange:this.props.handleElementChange,handleSectionChange:this.props.handleSectionChange,addElementToSection:this.props.addElementToSection,removeElementFromSection:this.props.removeElementFromSection,cancelDelete:this.props.cancelDelete,recipeScraped:this.props.recipeScraped}),this.getSectionConfig("blogger_url").show&&o().createElement(I.A,{section:"blogger_url",config:this.getSectionConfig("blogger_url"),showAddUrl:this.state.showAddUrl,onChange:e=>i(field,e.target.value),data:t,handleChange:i,member:this.props.member,isLinkDisabled:()=>(0,c.l)(e,t,m),checkField:e=>this.checkField(e)}),this.getSectionConfig("materials").show&&0!==m.length&&o().createElement(o().Fragment,null,this.getSectionConfig("materials").show_separator&&o().createElement("hr",{className:"separator"}),o().createElement(x,{materials:t.materials,additionalMaterial:r,handleMaterial:this.handleMaterial,changeTooltipAction:this.changeTooltipAction,checkField:this.checkField})),this.getSectionConfig("stats").show&&o().createElement(o().Fragment,null,o().createElement("div",null,o().createElement("div",{className:"pr-stats w100 css-table fs15"},o().createElement("div",{className:"tr"},o().createElement("div",{className:"label td valignmiddle bold relative"},l.A.LANG.sharebox.estimated_cost,o().createElement("span",null,"$")),o().createElement("div",{className:"inputs td valignmiddle"},o().createElement("input",{type:"text",className:"sl-post-cost bordered dib fl "+(this.checkField("cost")?"errorField":""),value:t.cost||"",placeholder:"ex: 200",name:"cost",onChange:e=>this.handleChangeNumber("cost",e.target.value),onFocus:()=>this.changeTooltipAction("stats")}))),this.checkField("cost")&&""!==t.cost&&null!==t.cost&&o().createElement("div",{className:"tr"},o().createElement("div",{className:"label td"}),o().createElement("div",{className:"inputs td"},o().createElement("div",{className:"reqErrorMsg notHidden sl-cost-error"},l.A.LANG.sharebox.only_digits_error),o().createElement("div",{className:"spacer20"}))),o().createElement("div",{className:"tr"},o().createElement("div",{className:"label td valignmiddle bold"},l.A.LANG.sharebox.time),o().createElement("div",{className:"inputs td valignmiddle"},o().createElement("input",{type:"text",className:"sl-post-time-number bordered dib fl "+(this.checkField("time")?"errorField":""),value:t.time||"",placeholder:"ex: 4",name:"time",onChange:e=>this.handleChangeNumber("time",e.target.value),onFocus:()=>this.changeTooltipAction("stats")}),o().createElement("div",{className:"select-styled bordered relative dib fl "+(this.checkField("time_unit")?"errorField":"")},o().createElement("select",{className:"sl-post-time-unit",value:t.time_unit||"",onChange:e=>{this.setState({validationMsg:""}),i("time_unit",e.target.value)},onFocus:()=>this.changeTooltipAction("stats")},o().createElement("option",{value:""},l.A.LANG.sharebox.select),this.timeUnits.map((e,t)=>o().createElement("option",{key:t,value:e},l.A.LANG.activity[e.toLowerCase()])))))),this.checkField("time")&&""!==t.time&&null!==t.time&&o().createElement("div",{className:"tr"},o().createElement("div",{className:"label td"}),o().createElement("div",{className:"inputs td"},o().createElement("div",{className:"reqErrorMsg notHidden sl-time-error"},l.A.LANG.sharebox.only_digits_error),o().createElement("div",{className:"spacer20"}))),o().createElement("div",{className:"tr"},o().createElement("div",{className:"label td valignmiddle bold"},l.A.LANG.sharebox.difficulty),o().createElement("div",{className:"inputs td valignmiddle"},o().createElement("div",{className:"select-styled bordered relative dib fl "+(this.checkField("difficulty")?"errorField":"")},o().createElement("select",{className:"sl-post-level",name:"difficulty",value:t.difficulty||"",onChange:e=>{this.setState({validationMsg:""}),i("difficulty",e.target.value)},onFocus:()=>this.changeTooltipAction("stats")},o().createElement("option",{value:""},l.A.LANG.sharebox.select_level),this.difficulties.map((e,t)=>o().createElement("option",{key:t,value:e}
1,l.A.LANG.activity[e.toLowerCase()]))))))))),this.getSectionConfig("meta_data").show?o().createElement("div",{className:"layout-block flexbox flex-column w100 ffacts-wrap sl-fast_facts"},o().createElement(o().Fragment,null,o().createElement("h2",null,"Meta Data Card"),o().createElement("div",{className:"flexbox w100 row title-input"},o().createElement("input",{type:"text",className:"bordered sl-fastfact-title",placeholder:"Meta card title",maxLength:"70",value:N("specs_title"),onChange:e=>T("specs_title",e.target.value)})),o().createElement("div",{className:"spacer20"}),o().createElement("div",{className:"row totheleft w100"},o().createElement("h3",null,o().createElement("span",{className:"cms-tooltip-wrap "+(this.state.isOpen?"hover-click":""),onClick:this.handleClick},"Meta data ",o().createElement("i",{className:"ics-share-ask grayTxt fs15"}),o().createElement("span",{className:"cms-tooltip shadowBoxDeep"},o().createElement("div",{className:"vs-spec-card-wrap"},o().createElement("div",{className:"vs-spec-card flex flex-column fs17"},o().createElement("h2",null,"Title"),o().createElement("div",{className:"group-specs layout_short_wide"},o().createElement("div",{className:"item"},o().createElement("div",{className:"hdr"},"Key"),o().createElement("div",null,"Value")),o().createElement("div",{className:"item"},o().createElement("div",{className:"hdr"},"Only key")),o().createElement("div",{className:"item"},o().createElement("div",null,"Only value")),o().createElement("div",{className:"item"},o().createElement("div",{className:"fs14"},"Sub text"))))),o().createElement("div",{className:"gotit fs14 totheright blackTxt"},"Got it"))))),(t.meta_data||[]).map((e,t)=>["specs"].includes(e.type)?o().createElement("div",{className:"row sl-fastfact-item",key:t},o().createElement("div",{className:"flex"},o().createElement("div",{className:"inputs-grid w100"},o().createElement("input",{type:"text",value:e.key,className:"bordered sl-fastfact-key",placeholder:"Key (optional)",onChange:e=>n("meta_data."+t+".key",e.target.value)}),o().createElement("input",{type:"text",value:e.value,className:"bordered sl-fastfact-value",placeholder:"Value (optional)",onChange:e=>n("meta_data."+t+".value",e.target.value)})))):null),o().createElement("div",{className:"row"},o().createElement("a",{className:"flexbox w100 flex-align-center sl-metadata-add",onClick:()=>A()},o().createElement("i",{className:"ics-plus grayTxt",style:{marginRight:"3px"}}),"Add Meta data")),o().createElement("div",{className:"spacer20"}),o().createElement("h3",null,"Meta sub text"),o().createElement("div",{className:"flexbox w100 row"},o().createElement("input",{type:"text",className:"bordered sl-fastfact-subtext",placeholder:"Add sub text",value:N("specs_note"),onChange:e=>T("specs_note",e.target.value)})))):null,this.getSectionConfig("hashtags").show?o().createElement("div",{className:"layout-block flexbox flex-column w100 htags-wrap sl-hashtags"},o().createElement("h2",null,"Hashtags"),t.hashtags.map((e,s)=>o().createElement("div",{className:"htag flexbox flex-align-center sl-hashtag-item",key:s},o().createElement("div",{className:"input-wrap"},o().createElement("input",{type:"text",value:e.hashtag,maxLength:(0,c.Ry)(t),className:"bordered sl-hashtag-field",onChange:e=>n("hashtags."+s+".hashtag",e.target.value)})),o().createElement("div",{className:"counter fs20 grayTxt sl-hashtag-count"},(0,c.Ry)(t)-e.hashtag.length))),o().createElement("a",{className:"flexbox w100 flex-align-center sl-hashtag-add",onClick:()=>M()},o().createElement("i",{className:"ics-plus grayTxt",style:{marginRight:"3px"}}),"Add Hashtag")):null,(0!==m.length&&!this.props.showScrape||l.A.THEME.embed_images_text)&&o().createElement("div",{className:"layout-block flexbox w100 more-actions flex-column"},o().createElement("div",{className:"triggers flexbox flex-align-center"},this.getSectionConfig("add_meta_tags").show&&o().createElement("a",{className:"add-metadata fast_facts nowrap sl-add-fast_facts",onClick:()=>this.toggleMetaData(),"data-ht-track":JSON.stringify({action:"Add Fast Facts",element_zone:"Blogger Section"})},!this.state.showMetaData&&o().createElement("i",{className:"ics-plus grayTxt"}),this.state.showMetaData&&o().createElement("i",{className:"ics-minus grayTxt fs15 bold"}
1),"Meta data"),this.getSectionConfig("add_hashtags").show&&o().createElement("a",{className:"add-htags nowrap sl-add-hashtags",onClick:()=>this.toggleHashtags(),"data-ht-track":JSON.stringify({action:"Add Hashtags",element_zone:"Blogger Section"})},!this.state.showHashtags&&o().createElement("i",{className:"ics-plus grayTxt"}),this.state.showHashtags&&o().createElement("i",{className:"ics-minus grayTxt fs15 bold"}),l.A.LANG.sharebox.hashtag,"s"),this.getSectionConfig("add_link_cta").show&&this.props.member.isMember()&&m.length>0&&o().createElement("a",{onClick:()=>this.setState({showAddUrl:!this.state.showAddUrl}),className:"add-link nowrap"},o().createElement("i",{className:"ics-permalink"})," ",l.A.LANG.sharebox.add_link),this.getSectionConfig("schedule").show&&this.showDatePicker()&&o().createElement(k.A,{publishedAt:t.published_at,handleChange:i,settings:this.getSectionConfig("schedule").settings}))),this.getSectionConfig("send_push_notification").show&&o().createElement(R.A,{published_at:t.published_at,current_status:t.send_push_notification,handleChange:e=>i("send_push_notification",e),sent_status:(0,f.Jt)(l.A.THEME,"onesignal_app.sent_status")}),this.getSectionConfig("send_to_twitter").show&&o().createElement(U.A,{published_at:t.published_at,current_status:t.send_to_twitter,handleChange:e=>i("send_to_twitter",e),sent_status:(0,f.Jt)(l.A.THEME,"twitter_settings.sent_status")})),this.getSectionConfig("footer_and_buttons").show&&o().createElement(I.A,{section:"footer_and_buttons",getSectionConfig:e=>this.getSectionConfig(e),config:this.getSectionConfig("footer_and_buttons"),general_settings:this.props.shareboxConfig.general,showCaptcha:this.state.showCaptcha,showScrape:this.props.showScrape,isDirty:this.state.isDirty,val
1idationMsg:this.state.validationMsg,data:t,uploadQueue:m,saveItem:e=>w(e),uploadProgress:this.props.uploadProgress,canSaveDraft:b,saveDraft:_,savingDraft:g,isEdit:e,shareboxConfig:this.props.shareboxConfig,submit:e=>this.submit(e),submitReview:e=>this.submitReview(e),hasMissingScrapeElement:()=>this.props.hasMissingScrapeElement(),showDraftFooter:()=>this.showDraftFooter(),showSavingUnpublishedFooter:this.showSavingUnpublishedFooter,savingUnpublished:E})),this.getSectionConfig("tooltip").show&&m.length>0&&o().createElement(C,{action:this.state.actionTooltip,nbImages:m.length}),a&&o().createElement(S.A,{post:t,shareboxConfig:this.props.shareboxConfig}))),o().createElement("div",{className:"spacer80"}))))}}const O=(0,g.JT)((0,g.Tg)((0,g.fQ)((0,g.RE)((0,g.g_)(G)))));var H=s(77399),z=s.n(H),$=s(8126),B=s(25529),Q=s(30885);class J extends o().Component{constructor(e){var t;super(e),t=this,(0,a.A)(this,"toggleScrapeMode",()=>{this.setState({showScrape:!this.state.showScrape})}),(0,a.A)(this,"toggleReminder",(e,t)=>{let s=p()(this.state.reminders,{[e]:{$set:t}}),a=this.state.countReminderHashtag;"hashtag"===e&&!0===t&&(a+=1),this.setState({reminders:s,countReminderHashtag:a})}),(0,a.A)(this,"ignoreReminder",e=>{this.setState({ignoredReminder:e})}),(0,a.A)(this,"submit",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.setState({processing:!0}),!t.hasReminders(e)&&(t.setState({processing:!1}),!0)}),(0,a.A)(this,"saveDraft",(0,n.A)(()=>{this.alreadySubmitted||this.state.isLocked||!this.state.canSaveDraft||this.state.uploadProgress||(this.setState({savingDraft:!0,canSaveDraft:!1}),this.saveItem(!0).then(()=>{this.setState({canSaveDraft:!0,savingDraft:!1})}).catch(()=>{this.setState({savingDraft:!1,canSaveDraft:!0})}))},3e3,{trailing:!0})),(0,a.A)(this,"saveUnpublished",(0,n.A)(()=>{this.state.savingUnpublished||(this.setState({savingUnpublished:!0}),this.handleChange("published_at","unpublished",{saveDraft:!1}).then(()=>{this.saveItem(!0).then(()=>{setTimeout(()=>{this.setState({savingUnpublished:!1})},700)})}))},3e3,{trailing:!0})),(0,a.A)(this,"copyPaste",e=>{if(this.state.canSaveDraft){this.setState({savingDraft:!0,canSaveDraft:!1,isLocked:!0});let t=this.copyPasteDraft();return t.then(t=>{e(),this.setState({canSaveDraft:!0,savingDraft:!1,isLocked:!1}),this.initEmptyItem(t.id)},()=>{this.setState({savingDraft:!1,canSaveDraft:!0,isLocked:!1})}).catch(()=>{this.setState({savingDraft:!1,canSaveDraft:!0,isLocked:!1})}),t}return Promise.resolve()}),(0,a.A)(this,"setIsLocked",e=>{this.setState({isLocked:e})}),(0,a.A)(this,"setUrl",e=>{this.handleChange("url",e)}),(0,a.A)(this,"handleChange",function(e,s){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{saveDraft:!0};return new Promise(i=>{t.setState(t=>({data:p()(t.data,{[e]:{$set:s}})}),()=>{"summary"!==e&&"media_id"!==e&&"copyPasteText"!==e&&"url"!==e&&a.saveDraft&&t.save(),i()})})}),(0,a.A)(this,"addSection",(e,t)=>{let s=(0,B.t)(),a={type:e,order:t,title:"",[e]:[this.getEmptyElement(e,0),this.getEmptyElement(e,1)],cid:s},i=this.reorderSections(t);i.data=p()(i.data?i.data:this.state.data,{sections:{$push:[a]}}),this.setState({...i})}),(0,a.A)(this,"addElementToSection",(e,t,s)=>{let a=this.state.data.sections.findIndex(t=>t.cid===e),i=this.getEmptyElement(t,s);this.setState({data:p()(this.state.data,{sections:{[a]:{[t]:{$push:[i]}}}})})}),(0,a.A)(this,"setAsDeleting",(e,t,s)=>{let a=this.state.data.sections.findIndex(t=>t.cid===e);this.setState({data:p()(this.state.data,{sections:{[a]:{[t]:{[s]:{deleting:{$set:!0}}}}}})})}),(0,a.A)(this,"cancelDelete",(e,t,s)=>{let a=this.state.data.sections.findIndex(t=>t.cid===e);this.setState({data:p()(this.state.data,{sections:{[a]:{[t]:{[s]:{$unset:["deleting"]}}}}})})}),(0,a.A)(this,"removeElementFromSection",(e,t,s)=>{let a,n=this.state.data.sections.findIndex(t=>t.cid===e);this.setAsDeleting(e,t,s),setTimeout(()=>{if(!0===(0,i.A)(this.state.data.sections[n][t][s],"deleting")){let e=(0,i.A)(this.state.data.sections[n][t][s],"order");a=this.reorderElements(e,n,t),a.data=p()(a.data?a.data:this.state.data,{sections:{[n]:{[t]:{$splice:[[s,1]]}}}}),this.setState({...a})}},3e3)}),(0,a.A)(this,"removeSection",e=>{this.props.onLightBoxOpen(o().createElement(Q.A,{type:"section",settings:{delete_title:"Delete this section?"},changeState:()=>this.deleteSection(e)}),!0,null,()=>{})}),(0,a.A)(this,"deleteSection",e=>{let t=this.state.data.sections.findIndex(t=>t.cid===e),s=this.state.data.sections[t].order,a=this.reorderSections(s,!1);a.data=p()(a.data?a.data:this.state.data,{sections:{$splice:[[t,1]]}}),this.setState({...a})}),(0,a.A)(this,"addSectionUnordered",(e,t)=>{let s=(0,B.t)(),a={type:e,order:t,title:"",[e]:[this.getEmptyElement(e,0),this.getEmptyElement(e,1)],cid:s},i=this.state;return i.data=p()(this.state.data,{sections:{$push:[a]}}),new Promise(e=>{this.setState({...i},e)})}),(0,a.A)(this,"handleSectionChange",(e,t,s)=>{let a=this.state.data.sections.findIndex(t=>t.cid===e);this.setState({data:p()(this.state.data,{sections:{[a]:{[t]:{$set:s}}}})},()=>{this.save()})}),(0,a.A)(this,"handleElementChange",(e,t,s,a,i)=>{let n=this.state.data.sections.findIndex(t=>t.cid===e);this.setState({data:p()(this.state.data,{sections:{[n]:{[t]:{[s]:{[a]:{$set:i}}}}}})},()=>{this.save()})}),(0,a.A)(this,"handleNestedChange",(e,t)=>{if(2===(e.match(/\./gi)||[]).length){const[s,a,i]=e.split(".");this.setState({data:p()(this.state.data,{[s]:{[a]:{[i]:{$set:t}}}})},()=>{this.save()})}}),(0,a.A)(this,"setSuccess",()=>{this.setState({success:!0,isLocked:!1})}),(0,a.A)(this,"showIncompleteFormElements",e=>{let t=[];
1e.forEach(e=>{let s=!1;switch(e){case"time_unit":case"cost":case"difficulty":s="stats";break;case"summary":s="post_top";break;case"media":case"recipe_info":case"ingredients":case"instructions":s=e}s&&-1==t.indexOf(s)&&t.push(s)}),this.setState({incompleteElements:t})}),(0,a.A)(this,"additionalMaterial",()=>{this.setState({data:p()(this.state.data,{materials:{$push:[{material:"",purchased_at:""}]}})})}),(0,a.A)(this,"additionalHashtag",()=>{this.setState({data:p()(this.state.data,{hashtags:{$push:[{hashtag:""}]}})})}),(0,a.A)(this,"hasMissingScrapeElement",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?!!t.state.showScrape&&(0,i.A)(t.state,"incompleteElements",[]).indexOf(e)>-1:!!t.state.showScrape&&(0,i.A)(t.state,"incompleteElements",[]).length>0}),(0,a.A)(this,"addMetaData",()=>{this.setState({data:p()(this.state.data,{meta_data:{$push:[{key:"",value:"",type:"specs"}]}})})}),(0,a.A)(this,"get_meta_data_titles",e=>{let t="";return this.state.data.meta_data&&this.state.data.meta_data.forEach(s=>{s.type===e&&(t=s.value)}),t}),(0,a.A)(this,"set_meta_data_titles",(e,t)=>{let s=!1;this.state.data.meta_data&&this.state.data.meta_data.forEach((a,i)=>{a.type===e&&(this.handleNestedChange("meta_data."+i+".value",t),s=!0)}),s||this.setState({data:p()(this.state.data,{meta_data:{$push:[{value:t,type:e}]}})})}),this.postType=this.props.specialType||l.A.THEME.default_post_type,this.shareboxType=this.props.type,this.isDraftSharebox=/draft/.test(this.props.type),this.isEdit=Boolean(this.props.id),this.config={...T.d[l.A.THEME.name]},this.state={data:null,uploadQueue:[],uploadProgress:!1,processing:!1,success:!1,reminders:{refresh:!1,media:!1,hashtag:!1,unsavedChanges:!1,maxImagesUpload:!1,maxImagesSize:!1,minimum_words:!1,unidentified_blog:!1},countReminderHashtag:0,ignoredReminder:"",savingDraft:!1,savingUnpublished:!1,canSaveDraft:!0,showScrape:(l.A.THEME.sharebox_show_scrape||!!this.props.features.get("sharebox_show_scrape.enabled"))&&!this.isEdit,recipeScraped:!1},this.media=c.YW.bind(this),this.initEmptyItem=c.Dy.bind(this,this.postType),this.setData=c.XO.bind(this),this.saveItem=c.VH.bind(this),this.copyPasteDraft=c.cU.bind(this),this.resetRecipeSections=this.resetRecipeSections.bind(this)}componentDidMount(){if("draftPost"!==this.props.type||this.props.isLoggedIn||z()("/404"),(0,$.l)(),this.props.isLoggedIn)this.initEmptyItem();else{const e={summary:"",text:""};this.setState({data:new d.Ay(e)})}}componentDidUpdate(){const e=this.state.uploadQueue.some(e=>"photo"===e.type&&!e.source&&!e.path);e&&!this._pollTimer?this._pollTimer=setInterval(()=>{const e=this.state.data&&this.state.data.id;e&&!this._polling&&(this._polling=!0,d.Ay.get(e,{is_edit:!0},!0).then(e=>{if(this._polling=!1,!e||!e.media)return;const t={};e.media.forEach(e=>{t[e.id]=e});let s=!1;const a=this.state.uploadQueue.map(e=>"photo"!==e.type||e.source||e.path||!t[e.id]||!t[e.id].source&&!t[e.id].path?e:(s=!0,{...t[e.id],title:e.title,link:e.link}));s&&this.setState({uploadQueue:a})}).catch(()=>{this._polling=!1}))},5e3):!e&&this._pollTimer&&(clearInterval(this._pollTimer),this._pollTimer=null)}componentWillUnmount(){clearInterval(this._pollTimer)}hasReminders(e){const{ignoredReminder:t,data:s,showScrape:a}=this.state;let i=!1,n=this.config.reminders;return s.fromScrape||-1===n.indexOf("minimum_words")||"minimum_words"===t||"minimum_words"===e||"blogger"!==this.props.member.internal_contributor&&"instagram"!==this.props.member.internal_contributor||!((0,h.t)(s,this.state.uploadQueue)<100||(0,c.UF)(this.state.uploadQueue)<3)?!(null===s.text||(0,h.t)(s,this.state.uploadQueue)<this.config.general.description_reminder_min_words)||"refresh"===t||"refresh"===e||-1===n.indexOf("description")||s.fromScrape&&!this.hasMissingScrapeElement("post_top")?(0,c.zx)(s.text,s.summary,this.state.uploadQueue)&&this.state.countReminderHashtag<2&&"hashtag"!==e&&!s.fromScrape?(this.toggleReminder("hashtag",!0),i=!0):s.fromScrape&&a&&s.unidentifiedBlog&&"unidentified_blog"!=e&&(this.toggleReminder("unidentified_blog",!0),i=!0):(this.toggleReminder("refresh",!0),i=!0,window.scrollTo(0,0)):(this.toggleReminder("minimum_words",!0),i=!0,window.scrollTo(0,0)),i}save(){this.state.data.isUnpublishedWithoutDate()?this.saveUnpublished():this.saveDraft()}reorderSections(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s={};return this.state.data.sections.map((a,i)=>{a.order>=e&&(s.data=t?p()(s.data?s.data:this.state.data,{sections:{[i]:{order:{$set:a.order+1}}}}):p()(s.data?s.data:this.state.data,{sections:{[i]:{order:{$set:a.order-1}}}}))}),s}reorderElements(e,t,s){let a={};return this.state.data.sections[t][s].map((i,n)=>{i.order>e&&(a.data=p()(a.data?a.data:this.state.data,{sections:{[t]:{[s]:{[n]:{order:{$set:i.order-1}}}}}}))}),a}getEmptyElement(e,t){let s={};switch(e){case"ingredients":case"instructions":case"tips":s={text:"",order:t,cid:(0,B.t)()}}return s}async resetRecipeSections(){let e=this.state.data;e.sections=[],this.setState({data:e},()=>{this.addSectionUnordered("ingredients",1).then(this.addSectionUnordered("instructions",2))})}render(){const e={isEdit:this.isEdit,shareboxType:this.shareboxType,postType:this.postType,data:this.state.data,reminders:this.state.reminders,toggleReminder:this.toggleReminder,ignoreReminder:this.ignoreReminder,handleChange:this.handleChange,handleNestedChange:this.handleNestedChange,additionalMaterial:this.additionalMaterial,additionalHashtag:this.additionalHashtag,submit:this.submit,saveItem:this.saveItem,success:this.state.success,setSuccess:this.setSuccess,showIncompleteFormElements:this.showIncompleteFormElements,hasMissingScrapeElement:this.hasMissingScrapeElement,uploadQueue:this.state.uploadQueue,uploadProgress:this.state.uploadProgress,media:this.media,savingDraft:this.state.savingDraft,savingUnpublished:this.state.savingUnpublished,canSaveDraft:this.state.canSaveDraft,saveDraft:this.saveDraft,showScrape:this.state.showScrape,toggleScrapeMode:this.toggleScrapeMode,isLocked:this.state.isLocked,copyPaste:this.copyPaste,shareboxConfig:this.config,addSection:this.addSection,resetRecipeSections:this.resetRecipeSections,addElementToSection:this.addElementToSection,handleElementChange:this.handleElementChange,handleSectionChange:this.handleSectionChange,removeElementFromSection:this.removeElementFromSection,isDraftSharebox:this.isDraftSharebox,cancelDelete:this.cancelDelete,removeSection:this.removeSection,reloadActivityItem:this.initEmptyItem,
1setData:this.setData,setIsLocked:this.setIsLocked,setUrl:this.setUrl,recipeScraped:this.state.recipeScraped,addMetaData:this.addMetaData,getMetaDataTitles:this.get_meta_data_titles,setMetaDataTitles:this.set_meta_data_titles,showSignup:this.props.showSignup};return o().createElement("div",{className:"content-wrap"},this.state.data&&o().createElement(O,e))}}const W=(0,g.RE)((0,g.Tg)((0,g.JT)((0,g.g_)(J))))},90943(e,t,s){s.d(t,{A:()=>i});var a=s(24606);const i=function(){return a.A.Date.now()}},92720(e,t,s){s.d(t,{A:()=>l});var a=s(85356),i=s(90943),n=s(31155),r=Math.max,o=Math.min;const l=function(e,t,s){var l,c,h,d,m,p,g=0,u=!1,f=!1,E=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var s=l,a=c;return l=c=void 0,g=t,d=e.apply(a,s)}function v(e){var s=e-p;return void 0===p||s>=t||s<0||f&&e-g>=h}function S(){var e=(0,i.A)();if(v(e))return _(e);m=setTimeout(S,function(e){var s=t-(e-p);return f?o(s,h-(e-g)):s}(e))}function _(e){return m=void 0,E&&l?b(e):(l=c=void 0,d)}function x(){var e=(0,i.A)(),s=v(e);if(l=arguments,c=this,p=e,s){if(void 0===m)return function(e){return g=e,m=setTimeout(S,t),u?b(e):d}(p);if(f)return m=setTimeout(S,t),b(p)}return void 0===m&&(m=setTimeout(S,t)),d}return t=(0,n.A)(t)||0,(0,a.A)(s)&&(u=!!s.leading,h=(f="maxWait"in s)?r((0,n.A)(s.maxWait)||0,t):h,E="trailing"in s?!!s.trailing:E),x.cancel=function(){void 0!==m&&clearTimeout(m),g=0,l=p=c=m=void 0},x.flush=function(){return void 0===m?d:_((0,i.A)())},x}}}]);

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.