@tiddh/brave-vue 1.93.67 → 1.93.68
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/brave-vue.esm.js +1 -1
- package/dist/brave-vue.min.js +1 -1
- package/dist/brave-vue.ssr.js +1 -1
- package/dist/src/Avatar/Avatar.stories.js +3 -3
- package/dist/src/Avatar.stories.js +3 -3
- package/dist/src/components/Avatar/Avatar.stories.js +3 -3
- package/dist/src/components/locale/language.json +5 -5
- package/dist/src/language.json +5 -5
- package/dist/src/locale/language.json +5 -5
- package/package.json +1 -1
package/dist/brave-vue.esm.js
CHANGED
|
@@ -98,7 +98,7 @@ color:{type:String,default:"#68596E"},
|
|
|
98
98
|
* Example: `Regular | Bold`
|
|
99
99
|
**/
|
|
100
100
|
type:{type:String,default:"regular"}},data:function(){return{}}},"data-v-9c585934",!1,void 0,!1,x,void 0,void 0),C=b({render:function(){var t=this.$createElement;return(this._self._c||t)("i",{class:["icon","icon-"+this.name,"size-"+this.size],style:this.fill?{color:this.fill}:null})},staticRenderFns:[]},(function(t){t&&t("data-v-64366bb0_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);[data-v-64366bb0]:root{--column-width:6.6666666667vw}@media (min-width:0px){[data-v-64366bb0]:root{--column-width:6.6666666667vw}}@media (min-width:480px){[data-v-64366bb0]:root{--column-width:2.7777777778vw}}@media (min-width:0px){html[data-v-64366bb0]{font-size:2.9166666667vw}}@media (min-width:480px){html[data-v-64366bb0]{font-size:14px}}@media (min-width:1024px){[data-v-64366bb0]:root{--column-width:2.7777777778vw}}@media (min-width:1920px){[data-v-64366bb0]:root{--column-width:2.7777777778vw}}@media (min-width:2620px){[data-v-64366bb0]:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html[data-v-64366bb0]{font-size:1.5648854962vw}}@media (min-width:2620px){html[data-v-64366bb0]{font-size:1.56vw}}html[data-v-64366bb0]{box-sizing:border-box}*[data-v-64366bb0],[data-v-64366bb0]::after,[data-v-64366bb0]::before{box-sizing:border-box}.icon[data-v-64366bb0]{display:block}.icon.size-sm[data-v-64366bb0]{font-size:.7619047619rem}@media (max-width:479px){.icon.size-sm[data-v-64366bb0]{font-size:1.4953271028rem}}.icon.size-md[data-v-64366bb0]{font-size:1.1428571429rem}@media (max-width:479px){.icon.size-md[data-v-64366bb0]{font-size:2.2429906542rem}}.icon.size-lg[data-v-64366bb0]{font-size:1.5238095238rem}@media (max-width:479px){.icon.size-lg[data-v-64366bb0]{font-size:2.9906542056rem}}',map:void 0,media:void 0})}),{name:"Icon",props:{name:{type:String},size:{type:String,default:"lg"},stroke:{type:String,default:"transparent"},fill:{type:String}}},"data-v-64366bb0",!1,void 0,!1,x,void 0,void 0);
|
|
101
|
-
/* template */var M={pt:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando seu livro exclusivo",pages:"PÁGINAS",pagesLowercase:"Páginas",editArea:"Área de edição",name:"Nome",dedication:"Dedicatória",writeDedication:"Escreva uma dedicatória",shirtNumber:"Número da Camisa",bookScript:"Roteiro do Livro",dateBirth:"Data do aniversário",editDateBirth:"Editar data do aniversário",editName:"Editar nome do pequeno",kidName:"Edite o nome do protagonista",reccomendName:"É recomendado usar só o primeiro nome",dedicationFree:"Dedicatória (grátis)",cusutomDedication:"Personalize a dedicatória que será impressa no livro.",messageDedication:"Mensagem da dedicatória",dedcationPlaceholder:"Que a sua vida seja cheia de ótimas aventuras!",editShirt:"Editar camisa do pequeno",chooseScript:"Você escolhe o roteiro",choosePetLabel1:"Escolha a dupla que vai ajudar o",choosePetLabel2:"a encontrar o Sansão nessa aventura junto com a Turma da Mônica.",day:"Dia",month:"Mês",pet:"Bichinho de estimação",changePet:"Altere o bichinho da história",petDescription1:"Esse bichinho acompanhará ",petDescription2:"em toda a história.",typePetname:"Digite o nome do bichinho aqui",selectPet:"Selecione o bichinho",update:"ATUALIZAR",cancel:"CANCELAR",moonerLabelSidebar:"Mooner",moonerTitle:"Altere o mooner na história",moonerTitleFirstOpen:"Adicione um mooner na história",moonerTitleMobile:"Altere o mooner",moonerTitleFirstOpenMobile:"Adicione um mooner",moonerDescriptionOne:"Ele irá acompanhar <span>",moonerDescriptionTwo:"</span> em toda a história.",moonerDescriptionTwoMobile:" na história.",moonerLabel:"Nome do mooner",moonerLabelSelector:"Selecione um mooner",moonerCtaFirstOpen:"Pronto, ver história",moonerCta:"Atualizar",moonerCtaCancel:"Cancel",birthday_label:"Data do aniversário",genderFemale:"Menina",genderMale:"Menino",or:"ou",do:"do",da:"da",editCharacter:"Editar o personagem do",Pele:"Pele 1",Olhos:"Olhos",Cabelo:"Cabelo",Roupa:"Roupa","Tênis":"Tênis","Óculos":"Óculos",continue:"CONTINUAR"},en:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Just a second",loadingPhrase:"We are loading your exclusive book",pages:"PAGES",pagesLowercase:"pages",editArea:"Edit area",name:"Name",dedication:"Dedication",writeDedication:"Write a dedication",shirtNumber:"Shirt Number",bookScript:"Book Script",dateBirth:"Date of Birth",editDateBirth:"Edit Date of Birth",editName:"Edit the little one's name",kidName:"Edit the protagonist's name",reccomendName:"It is recommended to use only the first name",dedicationFree:"Dedication (free)",cusutomDedication:"Customize the dedication that will be printed in the book.",messageDedication:"Dedication message",dedcationPlaceholder:"May your life be filled with great adventures!",editShirt:"Edit the little one's shirt",chooseScript:"You choose the script",choosePetLabel1:"Choose the duo that will help",choosePetLabel2:"find Sansão in this adventure with the Turma da Mônica.",day:"Day",month:"Month",pet:"Pet",changePet:"Change the pet in the story",petDescription1:"This pet will accompany ",petDescription2:" throughout the story.",typePetname:"Type the pet's name here",selectPet:"Select the pet",update:"UPDATE",cancel:"CANCEL",moonerLabelSidebar:"Mooner",moonerTitle:"Change the mooner in the story",moonerTitleFirstOpen:"Add a mooner to the story",moonerTitleMobile:"Change the mooner",moonerTitleFirstOpenMobile:"Add a mooner",moonerDescriptionOne:"He will accompany <span>",moonerDescriptionTwo:"</span> throughout the story.",moonerDescriptionTwoMobile:" in the story.",moonerLabel:"Mooner's Name",moonerLabelSelector:"Select a mooner",moonerCtaFirstOpen:"Ready, see the story",moonerCta:"Update",moonerCtaCancel:"Cancel",birthday_label:"Date of Birth",genderFemale:"Girl",genderMale:"Boy",or:"or",do:"of",da:"of",editCharacter:"Edit the character of",Pele:"Skin",Olhos:"Eyes",Cabelo:"Hair",Roupa:"Clothing","Tênis":"Sneakers","Óculos":"Glasses",continue:"CONTINUE"},es:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Un momento",loadingPhrase:"Estamos cargando tu libro exclusivo",pages:"PÁGINAS",pagesLowercase:"páginas",editArea:"Área de edición",name:"Nombre",dedication:"Dedicación",writeDedication:"Escribe una dedicatoria",shirtNumber:"Número de camiseta",bookScript:"Guión del libro",dateBirth:"Fecha de nacimiento",editDateBirth:"Editar fecha de nacimiento",editName:"Editar nombre del pequeño",kidName:"Edita el nombre del protagonista",reccomendName:"Se recomienda usar solo el primer nombre",dedicationFree:"Dedicación (gratis)",cusutomDedication:"Personaliza la dedicatoria que se imprimirá en el libro.",messageDedication:"Mensaje de la dedicatoria",dedcationPlaceholder:"¡Que tu vida esté llena de grandes aventuras!",editShirt:"Editar la camiseta del pequeño",chooseScript:"Tú eliges el guión",choosePetLabel1:"Elige el dúo que ayudará a",choosePetLabel2:"encontrar a Sansão en esta aventura con la Turma da Mônica.",day:"Día",month:"Mes",pet:"Mascota",changePet:"Cambia la mascota en la historia",petDescription1:"Esta mascota acompañará a ",petDescription2:" a lo largo de toda la historia.",typePetname:"Escribe el nombre de la mascota aquí",selectPet:"Selecciona la mascota",update:"ACTUALIZAR",cancel:"CANCELAR",moonerLabelSidebar:"Mooner",moonerTitle:"Cambia el mooner en la historia",moonerTitleFirstOpen:"Agrega un mooner a la historia",moonerTitleMobile:"Cambia el mooner",moonerTitleFirstOpenMobile:"Agrega un mooner",moonerDescriptionOne:"Él acompañará a <span>",moonerDescriptionTwo:"</span> a lo largo de toda la historia.",moonerDescriptionTwoMobile:" en la historia.",moonerLabel:"Nombre del mooner",moonerLabelSelector:"Selecciona un mooner",moonerCtaFirstOpen:"Listo, ver la historia",moonerCta:"Actualizar",moonerCtaCancel:"Cancelar",birthday_label:"Fecha de nacimiento",genderFemale:"Niña",genderMale:"Niño",or:"o",do:"hacer",da:"da",editCharacter:"Editar el personaje de",Pele:"Piel",Olhos:"Ojos",Cabelo:"Cabello",Roupa:"Ropa","Tênis":"Zapatillas","Óculos":"Gafas",continue:"CONTINUAR"},ar:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"لحظة من فضلك",loadingPhrase:"نحن نقوم بتحميل كتابك الحصري",pages:"صفحات",pagesLowercase:"صفحات",editArea:"منطقة التحرير",name:"الاسم",dedication:"تكريس",writeDedication:"اكتب تكريس",shirtNumber:"رقم القميص",bookScript:"نص الكتاب",dateBirth:"تاريخ الميلاد",editDateBirth:"تحرير تاريخ الميلاد",editName:"تحرير اسم الصغير",kidName:"تحرير اسم البطل",reccomendName:"يُفضل استخدام الاسم الأول فقط",dedicationFree:"تكريس (مجانًا)",cusutomDedication:"قم بتخصيص التكريس الذي سيتم طباعته في الكتاب.",messageDedication:"رسالة التكريس",dedcationPlaceholder:"نتمنى لحياتك مغامرات رائعة!",editShirt:"تحرير قميص الصغير",chooseScript:"أنت تختار السيناريو",choosePetLabel1:"اختر الثنائي الذي سيساعد",choosePetLabel2:"في العثور على سانساو في هذه المغامرة مع تورما دا مونيكا.",day:"يوم",month:"شهر",pet:"حيوان اليف",changePet:"قم بتغيير حيوان اليف في القصة",petDescription1:"سيرافق هذا الحيوان ",petDescription2:" طوال القصة.",typePetname:"اكتب اسم الحيوان الاليف هنا",selectPet:"اختر الحيوان الأليف",update:"تحديث",cancel:"إلغاء",moonerLabelSidebar:"مونر",moonerTitle:"قم بتغيير مونر في القصة",moonerTitleFirstOpen:"أضف مونر إلى القصة",moonerTitleMobile:"قم بتغيير مونر",moonerTitleFirstOpenMobile:"أضف مونر",moonerDescriptionOne:"سيصاحب <span>",moonerDescriptionTwo:"</span> طوال القصة.",moonerDescriptionTwoMobile:" في القصة.",moonerLabel:"اسم مونر",moonerLabelSelector:"اختر مونر",moonerCtaFirstOpen:"جاهز، انظر القصة",moonerCta:"تحديث",moonerCtaCancel:"إلغاء",birthday_label:"تاريخ الميلاد",genderFemale:"فتاة",genderMale:"صبي",or:"أو",do:"فعل",da:"دا",editCharacter:"تحرير شخصية",Pele:"شرة",Olhos:"عيون",Cabelo:"شعر",Roupa:"ملابس","Tênis":"حذاء رياضي","Óculos":"نظارات",continue:"متابعة"},tr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Sadece bir saniye",loadingPhrase:"Özel kitabınızı yükleniyoruz",pages:"SAYFALAR",pagesLowercase:"sayfalar",editArea:"Düzenleme Alanı",name:"Ad",dedication:"Adanmışlık",writeDedication:"Bir adanmışlık yazın",shirtNumber:"Gömlek Numarası",bookScript:"Kitap Senaryosu",dateBirth:"Doğum Tarihi",editDateBirth:"Doğum Tarihini Düzenle",editName:"Küçüğün adını düzenle",kidName:"Kahramanın adını düzenle",reccomendName:"Sadece ilk ismi kullanmanız tavsiye edilir",dedicationFree:"Adanmışlık (ücretsiz)",cusutomDedication:"Kitapta basılacak adanmışlığı özelleştirin.",messageDedication:"Adanmışlık mesajı",dedcationPlaceholder:"Hayatınızın harika maceralarla dolu olması dileğiyle!",editShirt:"Küçüğün gömleğini düzenle",chooseScript:"Senaryoyu sen seçersin",choosePetLabel1:"Sana yardımcı olacak ikiliyi seç",choosePetLabel2:"Turma da Mônica ile bu macerada Sansão'yu bulmaya yardımcı olacaklar.",day:"Gün",month:"Ay",pet:"Evcil hayvan",changePet:"Hikayede evcil hayvanı değiştir",petDescription1:"Bu evcil hayvan, ",petDescription2:" hikayenin tamamında sizi takip edecek.",typePetname:"Evcil hayvanın adını buraya yazın",selectPet:"Evcil hayvanı seç",update:"GÜNCELLE",cancel:"İPTAL",moonerLabelSidebar:"Mooner",moonerTitle:"Hikayede mooner'ı değiştir",moonerTitleFirstOpen:"Hikayeye bir mooner ekle",moonerTitleMobile:"Mooner'ı değiştir",moonerTitleFirstOpenMobile:"Bir mooner ekle",moonerDescriptionOne:"O, <span>",moonerDescriptionTwo:"</span> hikayenin tamamında sizi takip edecek.",moonerDescriptionTwoMobile:" hikayede.",moonerLabel:"Mooner'ın Adı",moonerLabelSelector:"Bir mooner seç",moonerCtaFirstOpen:"Hazır, hikayeyi görüntüle",moonerCta:"Güncelle",moonerCtaCancel:"İptal",birthday_label:"Doğum Tarihi",genderFemale:"Kız",genderMale:"Erkek",or:"veya",do:"yap",da:"da",editCharacter:"Karakteri Düzenle",Pele:"Ten Rengi",Olhos:"Gözler",Cabelo:"Saç",Roupa:"Giysi","Tênis":"Spor Ayakkabı","Óculos":"Gözlük",continue:"DEVAM ET"}},P=require("axios"),S=b({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"customization-panel",class:"rtl"===t.dir?"rtl":""},[a("div",{staticClass:"overlay-opacity"}),t._v(" "),a("div",{staticClass:"customization-panel-head"},[a("div",{staticClass:"customization-panel-heading"},[t._v("\n\t\t\t\t"+t._s(t.lang.editCharacter)+" "+t._s(t.characterIsMale?t.lang.do:t.lang.da)+"\n\t\t\t\t"),a("b",[t._v(t._s(t.characterName))])]),t._v(" "),a("div",{staticClass:"customization-categories"},[t._l(t.categoriesAssets.categories,(function(e){return a("a",{directives:[{name:"show",rawName:"v-show",value:"mooner"!==e.code&&"pet"!==e.code,expression:"category.code !== 'mooner' && category.code !== 'pet'"}],key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedCategory,"is-disabled":t.isCategoryDisabled(e)},"category-"+e.code],attrs:{id:e.code},on:{click:function(a){return t.handleSelectCategory(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.lang[e.name])+"\n\t\t\t\t\t")])],1)})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("a",{key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedGroup},"category-"+e.code],on:{click:function(a){return t.handleSelectGroup(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.lang[e.name])+"\n\t\t\t\t\t")])],1)}))],2)]),t._v(" "),a("div",{staticClass:"customization-panel-body",attrs:{id:"customization-panel-body"}},[t._l(t.visibleCategoriesCustomizations,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedCategory,expression:"selectedCategory"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.id),relatedCustomization:t.getCustomizationByCategoryId(e.depends_category),disabledCategories:t.disabledCategories,removableCategory:!e.required},on:{"update:customization":t.handleUpdateCustomization}})})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedGroup,expression:"selectedGroup"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.assets.subcategories[0].parent_id),removableCategory:!e.required,customizations:t.customizations},on:{"update:customization":t.handleUpdateCustomization}})}))],2),t._v(" "),a("div",{staticClass:"helper"},[a("div",{ref:"error",staticClass:"error",domProps:{innerHTML:t._s(t.error)}}),t._v(" "),a("div",{staticClass:"btn-avatar",on:{click:t.generateAvatar}},[a("div",{staticClass:"btn-avatar-preload"},[a("span",[t._v(t._s(t.lang.continue))]),t._v(" "),a("Icon",{attrs:{name:"chevron-right",fill:"#fff",size:"md",stroke:"transparent"}})],1),t._v(" "),a("div",{staticClass:"btn-avatar-loading"},[a("span",{staticClass:"btn-avatar-loading-content",domProps:{innerHTML:t._s(t.loadingContent)}}),t._v(" "),a("span",{staticClass:"btn-avatar-loading-icon"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36"}},[a("path",{attrs:{fill:"#000","fill-rule":"evenodd",d:"M26.383 12.728c-.433-.47-.986-.727-1.48-.728-.293 0-.569.092-.776.29l-2.306 2.179v-.002l-3.136 2.963c-.055.052-.093.109-.13.16l-3.008 2.841-3.545-3.855c-.217-.235-.526-.347-.858-.347-.47 0-.992.217-1.424.625-.465.44-.719 1-.72 1.5 0 .298.092.576.287.788l3.25 3.533 1.823 1.981c.214.235.52.344.85.344.147 0 .295-.021.448-.061l.085.002c.292.001.566-.087.776-.284l5.44-5.14c.054-.052.094-.11.13-.162l4.567-4.315c.234-.22.344-.532.344-.87 0-.474-.215-1.002-.617-1.442z"}})])])])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-ce138e12_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.postingCharacter{height:100vh}.customization-panel-heading b{font-weight:400;color:#923fda;text-transform:capitalize}.customization-panel{z-index:100;position:fixed;width:520px;height:100%;top:0;right:0;background:#f8f7fc;border-left:1px solid #dfdae4;transition:all .3s;overflow:hidden}.customization-panel.rtl{left:0;right:auto}@media (max-width:992px){.customization-panel{width:100%;bottom:0;top:unset;min-height:180px;height:auto}}.customization-panel-head{background:#fff;border-bottom:1px solid #f0ebf5;box-shadow:0 10px 26px 0 #d7d1ef;position:relative;z-index:150}@media (max-width:992px){.customization-panel-head{box-shadow:0 0 26px 0 #d7d1ef}}.customization-panel-heading{height:80px;max-width:100%;line-height:80px;text-align:center;font-family:Roboto,sans-serif;color:#afa2ba;background:#fff;border-bottom:1px solid #dfdae4;font-size:16px}@media (max-width:992px){.customization-panel-heading{display:none}}.customization-panel-body{height:70%;scroll-behavior:smooth;padding-bottom:70px;z-index:20;overflow-y:auto;position:relative}.customization-panel-body::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.customization-panel-body::-webkit-scrollbar{width:7px;background-color:transparent}.customization-panel-body::-webkit-scrollbar-thumb{border-radius:20px;background-color:#e4e4e4}@media (max-width:992px){.customization-panel-body{padding-bottom:0;z-index:0}}.customization-panel .helper{position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #dfdae4;box-shadow:0 0 26px 0 #d7d1ef;padding:.7619047619rem 1.1428571429rem;display:flex;align-items:center;justify-content:center;z-index:999}@media (max-width:992px){.customization-panel .helper{display:none;z-index:0}}.customization-panel .helper .error{background:red;width:100%;color:#fff;font-family:Roboto,sans-serif;font-size:14px;padding:15px 0;text-align:center;text-transform:uppercase;position:absolute;transition:all .3s;top:-45px;opacity:0}.btn-avatar{width:100%;height:65px;font-family:Nunito;font-weight:900;padding:0!important;background:#12d3db;background-size:200%;background-position-x:99%;box-shadow:0 .2381rem .95238rem 0 #89e6e8;border-radius:1.90476rem;color:#fff;transition:all .2s cubic-bezier(.4,0,.2,1);border:0;font-size:14px;letter-spacing:.0381rem;line-height:1.2rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-avatar:hover{box-shadow:0 .2381rem .95238rem 0 #89e6e8;-webkit-transform:translateY(-.09524rem);transform:translateY(-.09524rem);cursor:pointer;background-position-x:0;-webkit-transform:translateY(-.14286rem);transform:translateY(-.14286rem);color:#fff}.btn-avatar:active,.btn-avatar:focus{outline:0;box-shadow:0 0 0 #89e6e8;background-position-x:0;-webkit-transform:translateY(.14286rem) scale(.97);transform:translateY(.14286rem) scale(.97)}.btn-avatar .icon{position:absolute;display:flex;justify-content:center;align-items:center;right:0;top:3px;margin:15px!important}.btn-avatar .icon path,.btn-avatar .icon svg{fill:#fff;stroke:#fff}@media (max-width:992px){.btn-avatar{display:none!important}}.btn-avatar-mobile{display:none!important}@media (max-width:992px){.btn-avatar-mobile{display:flex!important;width:150px;height:40px;box-shadow:none;font-size:12px;float:right;line-height:1;position:fixed;right:0;top:12px;z-index:200;border-radius:100px;margin-right:1.4953271028rem;box-shadow:none}.btn-avatar-mobile .icon{display:none}}.customization-categories{display:flex;align-items:center;align-content:center;padding:.7619047619rem .7619047619rem}@media (max-width:992px){.customization-categories{padding:0}}.customization-categories .category-vestuario{display:none!important}.customization-categories-item{position:relative;font-size:inherit;flex-basis:0;flex-grow:1;max-width:100%;height:100%;text-align:center}.customization-categories-item:hover{cursor:pointer}.customization-categories-item:hover .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item{height:50px;display:flex;justify-content:center;align-items:center;border:0}}.customization-categories-item-icon{height:52px;width:52px;display:block;border-radius:30px;margin:auto}.customization-categories-item-icon-placeholder{background-color:#dfdae4;border-radius:2px}@media (max-width:992px){.customization-categories-item-icon{display:none}}.customization-categories-item-label{font-weight:400;display:block;font-size:12px;color:#000;text-transform:capitalize!important;font-family:Roboto;padding-top:.380952381rem}@media (max-width:992px){.customization-categories-item-label{margin:0}}.customization-categories-item:first-child{border-left:none}.customization-categories-item.is-selected .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item.is-selected:after{content:"";position:absolute;left:0;bottom:-2px;width:100%;height:3px;background:#12d3db}}@media (max-width:992px) and (max-width:992px){.customization-categories-item.is-selected:after{bottom:0}}.customization-categories-item.is-disabled{opacity:.6}.btn-avatar-reduced{background:#2dd4d9!important;width:65px!important;cursor:wait}@media (max-width:479px){.btn-avatar-reduced{width:40px!important;height:40px!important}}.btn-avatar-loading-completed{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-position:0 0;background-repeat:no-repeat;-webkit-animation:1s loadingCompleted;-moz-animation:1s loadingCompleted;animation:1s loadingCompleted;cursor:wait}@-webkit-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@-moz-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}.btn-avatar-loading-started{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-repeat:no-repeat;background-position:41% 0;-webkit-animation:4s loadingPosition;-moz-animation:4s loadingPosition;animation:4s loadingPosition;transition:.3s;cursor:wait}@-webkit-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@-moz-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}.btn-avatar-loading{font-size:1.4285714286rem;display:none;opacity:0;transition:all .3s;font-size:14px;cursor:wait}.btn-avatar-loading .btn-avatar-loading-icon{display:none;opacity:0;align-items:center;justify-content:center}.btn-avatar-loading .btn-avatar-loading-icon svg{width:2.1904761905rem;height:2.1904761905rem}@media (max-width:479px){.btn-avatar-loading .btn-avatar-loading-icon svg{width:3.5514018692rem;height:3.5514018692rem}}.btn-avatar-loading .btn-avatar-loading-icon path,.btn-avatar-loading .btn-avatar-loading-icon svg{fill:#fff;stroke:#fff}@media (max-width:479px){.btn-avatar-loading{font-size:12px}.btn-avatar-loading .btn-avatar-loading-content{font-size:12px}}',map:void 0,media:void 0})}),{name:"CustomizationPanel",components:{CategoryCustomizations:z,Caption:_,Icon:C},props:{builderApi:{type:String,default:"https://builder.dentrodahistoria.com.br/api"},selectedCharacter:{type:Object,default:{}},characterSlug:{type:String,required:!0},characterId:{type:[Number,String],required:!0},characterTypeId:{type:[Number,String],required:!0},characterName:{type:String,required:!0},characterIsMale:{type:Boolean,required:!0},categoriesAssets:{type:Object,required:!0},disabledCategories:{type:Array,required:!1,default:function(){return[]}},customizations:{type:Array,required:!0},builderProductId:{type:[String,Number],required:!1,default:null},subscriptionId:{type:[Number,String],required:!0},stackId:{type:[Number,String],required:!0},userDataProperties:{type:Object,required:!0},builderLayoutId:{type:[Number,String],required:!1},language:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt"},dir:{type:String,default:"ltr",required:!1}},data:function(){return{selectedCategory:null,selectedGroup:null,selectedCollection:null,error:null,isMobile:null,lang:M[this.typeLanguage],loadingContent:screen.width<1023?"ENVIANDO":"ENVIANDO PERSONAGEM"}},mounted:function(){if(!document.body.getElementsByClassName("btn-avatar-mobile")[0]){var t=document.getElementsByClassName("btn-avatar")[0].cloneNode(!0);t.classList.add("btn-avatar-mobile"),document.body.appendChild(t),document.body.getElementsByClassName("btn-avatar-mobile")[0].addEventListener("click",this.generateAvatar)}var e=document.getElementsByClassName("top-bar")[0];if(screen.width<=1023&&e&&!e.getElementsByClassName("overlay-opacity")[0]){var a=document.getElementsByClassName("overlay-opacity")[0].cloneNode(!0);e.appendChild(a)}if(!document.body.getElementsByClassName("error-mobile")[0]){var i=document.getElementsByClassName("error")[0].cloneNode(!0);i.classList.add("error-mobile"),document.body.appendChild(i)}window.addEventListener("resize",this.screenResize),screen.width>1023?this.isMobile=!1:this.isMobile=!0},beforeDestroy:function(){document.body.getElementsByClassName("btn-avatar-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("btn-avatar-mobile")[0]),document.body.getElementsByClassName("error-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("error-mobile")[0])},computed:{showColorsCustomizations:function(){return!1},showSubcategoriesCustomizations:function(){return!1},visibleCategoriesCustomizations:function(){var t=this,e=[];return this.selectedCategory?e.push(this.selectedCategory):this.selectedCollection&&this.selectedCollection.categories.forEach((function(a){var i=t.categoriesAssets.categories.find((function(t){return t.id===a}));i&&e.push(i)})),e}},methods:{monthsHelper:function(t){switch(t){case 1:return"Janeiro";case 2:return"Fevereiro";case 3:return"Março";case 4:return"Abril";case 5:return"Maio";case 6:return"Junho";case 7:return"Julho";case 8:return"Agosto";case 9:return"Setembro";case 10:return"Outubro";case 11:return"Novembro";case 12:return"Dezembro"}},generateAvatar:function(){var t=this;return v(h().mark((function e(){var a,i,o,r,n,d,s,l,c,p,m,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t,o=!1,t.categoriesAssets.categories.forEach((function(e){e.required?((i=t.customizations.find((function(t){return e.id===t.categoryId})))||(i=t.disabledCategories.find((function(t){return e.id===t.categoryId}))),i||(o=!0,r=e)):(e.code.includes("mooner")||e.code.includes("pet"))&&(i=t.disabledCategories.find((function(t){return e.id===t.categoryId})))})),o){e.next=18;break}return t.$emit("startedMethod"),n=null,d=[],t.customizations.forEach((function(t){var e={parent_id:t.categoryId,id:t.optionId?t.optionId:t.relatedCategoryId};e.parent_id&&e.id&&d.push(e)})),s={properties:a.userDataProperties,type:t.characterTypeId},l={custom_character:{character_id:t.characterId,product_id:t.builderProductId,type_id:t.characterTypeId,categories:d,user_data:s}},t.builderLayoutId&&(l.custom_character.layout_id=t.builderLayoutId),t.language&&(l.custom_character.language=t.language),e.next=14,P({method:"POST",url:"".concat(t.builderApi,"/customs_characters/"),headers:{"Content-Type":"application/json"},data:l}).then((function(t){return t})).catch((function(t){return t}));case 14:(c=e.sent)&&(200===c.status?t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:d,success:!0}):(console.log("tentou pegar o segundo request"),c&&c.response&&c.response.reques&&(p=JSON.parse(c.response.request.responseText),n=p?p.error:"Não foi possível gerar o avatar. Tente novamente."),n&&(t.error=n,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)),t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:d,success:!1}))),e.next=22;break;case 18:m=r.code,u="pele"===m?"Necessário selecionar um tom de pele":"Necessário selecionar um tipo de ".concat(m),screen.width>1023&&("roupa"===m||"tenis"===m)?(t.error=u,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)):(document.getElementsByClassName("error")[0].style.opacity="1",document.getElementsByClassName("error")[0].textContent=u,setTimeout((function(){document.getElementsByClassName("error")[0].style.opacity="0",document.getElementsByClassName("error")[0].textContent=""}),5e3)),t.$refs[m][0].click();case 22:case"end":return e.stop()}}),e)})))()},getCustomizationTitle:function(t){var e=t?t.toLowerCase():"";switch(e){case"pele":return"Tons de pele";default:return"Tipos de ".concat(e)}},getCustomizationByCategoryId:function(t){return this.customizations.find((function(e){return e.categoryId===t}))},handleSelectCategory:function(t){if(!this.isCategoryDisabled(t)&&this.selectedCategory!==t){this.selectedCharacter.slug;var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];"cabelo"===t.code||"olhos"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):"roupa"===t.code||"tenis"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-out"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0})),this.selectedGroup=null,this.selectedCollection=null,this.selectedCategory=t}},handleSelectGroup:function(t){if(this.selectedGroup!==t){if(screen.width<=1023){var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];this.selectedCharacter.slug;"acessorio"===t.code||"acessorios"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0}))}this.selectedCategory=null,this.selectedCollection=null,this.selectedGroup=t}},handleSelectCollection:function(t){this.selectedCollection!==t&&(this.selectedCategory=null,this.selectedGroup=null,this.selectedCollection=t)},handleUpdateCustomization:function(t){this.$emit("update:customization",t)},isCategoryDisabled:function(t){return void 0!==this.disabledCategories.find((function(e){return e.categoryId===t.id}))},screenResize:function(){if(screen.width>1023){document.getElementsByClassName("customization-preview-asset");
|
|
101
|
+
/* template */var M={pt:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando seu livro exclusivo",pages:"PÁGINAS",pagesLowercase:"Páginas",editArea:"Área de edição",name:"Nome",dedication:"Dedicatória",writeDedication:"Escreva uma dedicatória",shirtNumber:"Número da Camisa",bookScript:"Roteiro do Livro",dateBirth:"Data do aniversário",editDateBirth:"Editar data do aniversário",editName:"Editar nome do pequeno",kidName:"Edite o nome do protagonista",reccomendName:"É recomendado usar só o primeiro nome",dedicationFree:"Dedicatória (grátis)",cusutomDedication:"Personalize a dedicatória que será impressa no livro.",messageDedication:"Mensagem da dedicatória",dedcationPlaceholder:"Que a sua vida seja cheia de ótimas aventuras!",editShirt:"Editar camisa do pequeno",chooseScript:"Você escolhe o roteiro",choosePetLabel1:"Escolha a dupla que vai ajudar o",choosePetLabel2:"a encontrar o Sansão nessa aventura junto com a Turma da Mônica.",day:"Dia",month:"Mês",pet:"Bichinho de estimação",changePet:"Altere o bichinho da história",petDescription1:"Esse bichinho acompanhará ",petDescription2:"em toda a história.",typePetname:"Digite o nome do bichinho aqui",selectPet:"Selecione o bichinho",update:"ATUALIZAR",cancel:"CANCELAR",moonerLabelSidebar:"Mooner",moonerTitle:"Altere o mooner na história",moonerTitleFirstOpen:"Adicione um mooner na história",moonerTitleMobile:"Altere o mooner",moonerTitleFirstOpenMobile:"Adicione um mooner",moonerDescriptionOne:"Ele irá acompanhar <span>",moonerDescriptionTwo:"</span> em toda a história.",moonerDescriptionTwoMobile:" na história.",moonerLabel:"Nome do mooner",moonerLabelSelector:"Selecione um mooner",moonerCtaFirstOpen:"Pronto, ver história",moonerCta:"Atualizar",moonerCtaCancel:"Cancel",birthday_label:"Data do aniversário",genderFemale:"Menina",genderMale:"Menino",or:"ou",do:"do",da:"da",editCharacter:"Editar o personagem",Pele:"Pele",Olhos:"Olhos",Cabelo:"Cabelo",Roupa:"Roupa","Tênis":"Tênis","Óculos":"Óculos",continue:"CONTINUAR"},en:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Just a second",loadingPhrase:"We are loading your exclusive book",pages:"PAGES",pagesLowercase:"pages",editArea:"Edit area",name:"Name",dedication:"Dedication",writeDedication:"Write a dedication",shirtNumber:"Shirt Number",bookScript:"Book Script",dateBirth:"Date of Birth",editDateBirth:"Edit Date of Birth",editName:"Edit the little one's name",kidName:"Edit the protagonist's name",reccomendName:"It is recommended to use only the first name",dedicationFree:"Dedication (free)",cusutomDedication:"Customize the dedication that will be printed in the book.",messageDedication:"Dedication message",dedcationPlaceholder:"May your life be filled with great adventures!",editShirt:"Edit the little one's shirt",chooseScript:"You choose the script",choosePetLabel1:"Choose the duo that will help",choosePetLabel2:"find Sansão in this adventure with the Turma da Mônica.",day:"Day",month:"Month",pet:"Pet",changePet:"Change the pet in the story",petDescription1:"This pet will accompany ",petDescription2:" throughout the story.",typePetname:"Type the pet's name here",selectPet:"Select the pet",update:"UPDATE",cancel:"CANCEL",moonerLabelSidebar:"Mooner",moonerTitle:"Change the mooner in the story",moonerTitleFirstOpen:"Add a mooner to the story",moonerTitleMobile:"Change the mooner",moonerTitleFirstOpenMobile:"Add a mooner",moonerDescriptionOne:"He will accompany <span>",moonerDescriptionTwo:"</span> throughout the story.",moonerDescriptionTwoMobile:" in the story.",moonerLabel:"Mooner's Name",moonerLabelSelector:"Select a mooner",moonerCtaFirstOpen:"Ready, see the story",moonerCta:"Update",moonerCtaCancel:"Cancel",birthday_label:"Date of Birth",genderFemale:"Girl",genderMale:"Boy",or:"or",do:"of",da:"of",editCharacter:"Edit the character",Pele:"Skin",Olhos:"Eyes",Cabelo:"Hair",Roupa:"Clothing","Tênis":"Sneakers","Óculos":"Glasses",continue:"CONTINUE"},es:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Un momento",loadingPhrase:"Estamos cargando tu libro exclusivo",pages:"PÁGINAS",pagesLowercase:"páginas",editArea:"Área de edición",name:"Nombre",dedication:"Dedicación",writeDedication:"Escribe una dedicatoria",shirtNumber:"Número de camiseta",bookScript:"Guión del libro",dateBirth:"Fecha de nacimiento",editDateBirth:"Editar fecha de nacimiento",editName:"Editar nombre del pequeño",kidName:"Edita el nombre del protagonista",reccomendName:"Se recomienda usar solo el primer nombre",dedicationFree:"Dedicación (gratis)",cusutomDedication:"Personaliza la dedicatoria que se imprimirá en el libro.",messageDedication:"Mensaje de la dedicatoria",dedcationPlaceholder:"¡Que tu vida esté llena de grandes aventuras!",editShirt:"Editar la camiseta del pequeño",chooseScript:"Tú eliges el guión",choosePetLabel1:"Elige el dúo que ayudará a",choosePetLabel2:"encontrar a Sansão en esta aventura con la Turma da Mônica.",day:"Día",month:"Mes",pet:"Mascota",changePet:"Cambia la mascota en la historia",petDescription1:"Esta mascota acompañará a ",petDescription2:" a lo largo de toda la historia.",typePetname:"Escribe el nombre de la mascota aquí",selectPet:"Selecciona la mascota",update:"ACTUALIZAR",cancel:"CANCELAR",moonerLabelSidebar:"Mooner",moonerTitle:"Cambia el mooner en la historia",moonerTitleFirstOpen:"Agrega un mooner a la historia",moonerTitleMobile:"Cambia el mooner",moonerTitleFirstOpenMobile:"Agrega un mooner",moonerDescriptionOne:"Él acompañará a <span>",moonerDescriptionTwo:"</span> a lo largo de toda la historia.",moonerDescriptionTwoMobile:" en la historia.",moonerLabel:"Nombre del mooner",moonerLabelSelector:"Selecciona un mooner",moonerCtaFirstOpen:"Listo, ver la historia",moonerCta:"Actualizar",moonerCtaCancel:"Cancelar",birthday_label:"Fecha de nacimiento",genderFemale:"Niña",genderMale:"Niño",or:"o",do:"hacer",da:"da",editCharacter:"Editar el personaje",Pele:"Piel",Olhos:"Ojos",Cabelo:"Cabello",Roupa:"Ropa","Tênis":"Zapatillas","Óculos":"Gafas",continue:"CONTINUAR"},ar:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"لحظة من فضلك",loadingPhrase:"نحن نقوم بتحميل كتابك الحصري",pages:"صفحات",pagesLowercase:"صفحات",editArea:"منطقة التحرير",name:"الاسم",dedication:"تكريس",writeDedication:"اكتب تكريس",shirtNumber:"رقم القميص",bookScript:"نص الكتاب",dateBirth:"تاريخ الميلاد",editDateBirth:"تحرير تاريخ الميلاد",editName:"تحرير اسم الصغير",kidName:"تحرير اسم البطل",reccomendName:"يُفضل استخدام الاسم الأول فقط",dedicationFree:"تكريس (مجانًا)",cusutomDedication:"قم بتخصيص التكريس الذي سيتم طباعته في الكتاب.",messageDedication:"رسالة التكريس",dedcationPlaceholder:"نتمنى لحياتك مغامرات رائعة!",editShirt:"تحرير قميص الصغير",chooseScript:"أنت تختار السيناريو",choosePetLabel1:"اختر الثنائي الذي سيساعد",choosePetLabel2:"في العثور على سانساو في هذه المغامرة مع تورما دا مونيكا.",day:"يوم",month:"شهر",pet:"حيوان اليف",changePet:"قم بتغيير حيوان اليف في القصة",petDescription1:"سيرافق هذا الحيوان ",petDescription2:" طوال القصة.",typePetname:"اكتب اسم الحيوان الاليف هنا",selectPet:"اختر الحيوان الأليف",update:"تحديث",cancel:"إلغاء",moonerLabelSidebar:"مونر",moonerTitle:"قم بتغيير مونر في القصة",moonerTitleFirstOpen:"أضف مونر إلى القصة",moonerTitleMobile:"قم بتغيير مونر",moonerTitleFirstOpenMobile:"أضف مونر",moonerDescriptionOne:"سيصاحب <span>",moonerDescriptionTwo:"</span> طوال القصة.",moonerDescriptionTwoMobile:" في القصة.",moonerLabel:"اسم مونر",moonerLabelSelector:"اختر مونر",moonerCtaFirstOpen:"جاهز، انظر القصة",moonerCta:"تحديث",moonerCtaCancel:"إلغاء",birthday_label:"تاريخ الميلاد",genderFemale:"فتاة",genderMale:"صبي",or:"أو",do:"فعل",da:"دا",editCharacter:"تحرير الشخصية",Pele:"شرة",Olhos:"عيون",Cabelo:"شعر",Roupa:"ملابس","Tênis":"حذاء رياضي","Óculos":"نظارات",continue:"متابعة"},tr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Sadece bir saniye",loadingPhrase:"Özel kitabınızı yükleniyoruz",pages:"SAYFALAR",pagesLowercase:"sayfalar",editArea:"Düzenleme Alanı",name:"Ad",dedication:"Adanmışlık",writeDedication:"Bir adanmışlık yazın",shirtNumber:"Gömlek Numarası",bookScript:"Kitap Senaryosu",dateBirth:"Doğum Tarihi",editDateBirth:"Doğum Tarihini Düzenle",editName:"Küçüğün adını düzenle",kidName:"Kahramanın adını düzenle",reccomendName:"Sadece ilk ismi kullanmanız tavsiye edilir",dedicationFree:"Adanmışlık (ücretsiz)",cusutomDedication:"Kitapta basılacak adanmışlığı özelleştirin.",messageDedication:"Adanmışlık mesajı",dedcationPlaceholder:"Hayatınızın harika maceralarla dolu olması dileğiyle!",editShirt:"Küçüğün gömleğini düzenle",chooseScript:"Senaryoyu sen seçersin",choosePetLabel1:"Sana yardımcı olacak ikiliyi seç",choosePetLabel2:"Turma da Mônica ile bu macerada Sansão'yu bulmaya yardımcı olacaklar.",day:"Gün",month:"Ay",pet:"Evcil hayvan",changePet:"Hikayede evcil hayvanı değiştir",petDescription1:"Bu evcil hayvan, ",petDescription2:" hikayenin tamamında sizi takip edecek.",typePetname:"Evcil hayvanın adını buraya yazın",selectPet:"Evcil hayvanı seç",update:"GÜNCELLE",cancel:"İPTAL",moonerLabelSidebar:"Mooner",moonerTitle:"Hikayede mooner'ı değiştir",moonerTitleFirstOpen:"Hikayeye bir mooner ekle",moonerTitleMobile:"Mooner'ı değiştir",moonerTitleFirstOpenMobile:"Bir mooner ekle",moonerDescriptionOne:"O, <span>",moonerDescriptionTwo:"</span> hikayenin tamamında sizi takip edecek.",moonerDescriptionTwoMobile:" hikayede.",moonerLabel:"Mooner'ın Adı",moonerLabelSelector:"Bir mooner seç",moonerCtaFirstOpen:"Hazır, hikayeyi görüntüle",moonerCta:"Güncelle",moonerCtaCancel:"İptal",birthday_label:"Doğum Tarihi",genderFemale:"Kız",genderMale:"Erkek",or:"veya",do:"yap",da:"da",editCharacter:"Karakteri Düzenle",Pele:"Ten Rengi",Olhos:"Gözler",Cabelo:"Saç",Roupa:"Giysi","Tênis":"Spor Ayakkabı","Óculos":"Gözlük",continue:"DEVAM ET"}},P=require("axios"),S=b({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"customization-panel",class:"rtl"===t.dir?"rtl":""},[a("div",{staticClass:"overlay-opacity"}),t._v(" "),a("div",{staticClass:"customization-panel-head"},[a("div",{staticClass:"customization-panel-heading"},[t._v("\n\t\t\t\t"+t._s(t.lang.editCharacter)+" "+t._s(t.characterIsMale?t.lang.do:t.lang.da)+"\n\t\t\t\t"),a("b",[t._v(t._s(t.characterName))])]),t._v(" "),a("div",{staticClass:"customization-categories"},[t._l(t.categoriesAssets.categories,(function(e){return a("a",{directives:[{name:"show",rawName:"v-show",value:"mooner"!==e.code&&"pet"!==e.code,expression:"category.code !== 'mooner' && category.code !== 'pet'"}],key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedCategory,"is-disabled":t.isCategoryDisabled(e)},"category-"+e.code],attrs:{id:e.code},on:{click:function(a){return t.handleSelectCategory(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.lang[e.name])+"\n\t\t\t\t\t")])],1)})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("a",{key:e.key,ref:e.code,refInFor:!0,staticClass:"customization-categories-item",class:[{"is-selected":e===t.selectedGroup},"category-"+e.code],on:{click:function(a){return t.handleSelectGroup(e)}}},[e.assets.icon?a("img",{staticClass:"customization-categories-item-icon",attrs:{src:e.assets.icon}}):a("span",{staticClass:"customization-categories-item-icon customization-categories-item-icon-placeholder"}),t._v(" "),a("Caption",{staticClass:"customization-categories-item-label",attrs:{color:"#AFA2BA"}},[t._v("\n\t\t\t\t\t\t"+t._s(t.lang[e.name])+"\n\t\t\t\t\t")])],1)}))],2)]),t._v(" "),a("div",{staticClass:"customization-panel-body",attrs:{id:"customization-panel-body"}},[t._l(t.visibleCategoriesCustomizations,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedCategory,expression:"selectedCategory"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.id),relatedCustomization:t.getCustomizationByCategoryId(e.depends_category),disabledCategories:t.disabledCategories,removableCategory:!e.required},on:{"update:customization":t.handleUpdateCustomization}})})),t._v(" "),t._l(t.categoriesAssets.groups,(function(e){return a("CategoryCustomizations",{directives:[{name:"show",rawName:"v-show",value:t.selectedGroup,expression:"selectedGroup"}],key:e.id,attrs:{title:e.subtitle,category:e,categoryId:e.id,customization:t.getCustomizationByCategoryId(e.assets.subcategories[0].parent_id),removableCategory:!e.required,customizations:t.customizations},on:{"update:customization":t.handleUpdateCustomization}})}))],2),t._v(" "),a("div",{staticClass:"helper"},[a("div",{ref:"error",staticClass:"error",domProps:{innerHTML:t._s(t.error)}}),t._v(" "),a("div",{staticClass:"btn-avatar",on:{click:t.generateAvatar}},[a("div",{staticClass:"btn-avatar-preload"},[a("span",[t._v(t._s(t.lang.continue))]),t._v(" "),a("Icon",{attrs:{name:"chevron-right",fill:"#fff",size:"md",stroke:"transparent"}})],1),t._v(" "),a("div",{staticClass:"btn-avatar-loading"},[a("span",{staticClass:"btn-avatar-loading-content",domProps:{innerHTML:t._s(t.loadingContent)}}),t._v(" "),a("span",{staticClass:"btn-avatar-loading-icon"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36"}},[a("path",{attrs:{fill:"#000","fill-rule":"evenodd",d:"M26.383 12.728c-.433-.47-.986-.727-1.48-.728-.293 0-.569.092-.776.29l-2.306 2.179v-.002l-3.136 2.963c-.055.052-.093.109-.13.16l-3.008 2.841-3.545-3.855c-.217-.235-.526-.347-.858-.347-.47 0-.992.217-1.424.625-.465.44-.719 1-.72 1.5 0 .298.092.576.287.788l3.25 3.533 1.823 1.981c.214.235.52.344.85.344.147 0 .295-.021.448-.061l.085.002c.292.001.566-.087.776-.284l5.44-5.14c.054-.052.094-.11.13-.162l4.567-4.315c.234-.22.344-.532.344-.87 0-.474-.215-1.002-.617-1.442z"}})])])])])])])},staticRenderFns:[]},(function(t){t&&t("data-v-ce138e12_0",{source:'@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Nunito:400,600,700,900&display=swap);@import url(https://fonts.googleapis.com/css?family=Roboto:400,600,700,900&display=swap);:root{--column-width:6.6666666667vw}@media (min-width:0px){:root{--column-width:6.6666666667vw}}@media (min-width:480px){:root{--column-width:2.7777777778vw}}@media (min-width:0px){html{font-size:2.9166666667vw}}@media (min-width:480px){html{font-size:14px}}@media (min-width:1024px){:root{--column-width:2.7777777778vw}}@media (min-width:1920px){:root{--column-width:2.7777777778vw}}@media (min-width:2620px){:root{--column-width:2.7777777778vw}}@media (min-width:1024px){html{font-size:1.5648854962vw}}@media (min-width:2620px){html{font-size:1.56vw}}html{box-sizing:border-box}*,::after,::before{box-sizing:border-box}.postingCharacter{height:100vh}.customization-panel-heading b{font-weight:400;color:#923fda;text-transform:capitalize}.customization-panel{z-index:100;position:fixed;width:520px;height:100%;top:0;right:0;background:#f8f7fc;border-left:1px solid #dfdae4;transition:all .3s;overflow:hidden}.customization-panel.rtl{left:0;right:auto}@media (max-width:992px){.customization-panel{width:100%;bottom:0;top:unset;min-height:180px;height:auto}}.customization-panel-head{background:#fff;border-bottom:1px solid #f0ebf5;box-shadow:0 10px 26px 0 #d7d1ef;position:relative;z-index:150}@media (max-width:992px){.customization-panel-head{box-shadow:0 0 26px 0 #d7d1ef}}.customization-panel-heading{height:80px;max-width:100%;line-height:80px;text-align:center;font-family:Roboto,sans-serif;color:#afa2ba;background:#fff;border-bottom:1px solid #dfdae4;font-size:16px}@media (max-width:992px){.customization-panel-heading{display:none}}.customization-panel-body{height:70%;scroll-behavior:smooth;padding-bottom:70px;z-index:20;overflow-y:auto;position:relative}.customization-panel-body::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.customization-panel-body::-webkit-scrollbar{width:7px;background-color:transparent}.customization-panel-body::-webkit-scrollbar-thumb{border-radius:20px;background-color:#e4e4e4}@media (max-width:992px){.customization-panel-body{padding-bottom:0;z-index:0}}.customization-panel .helper{position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #dfdae4;box-shadow:0 0 26px 0 #d7d1ef;padding:.7619047619rem 1.1428571429rem;display:flex;align-items:center;justify-content:center;z-index:999}@media (max-width:992px){.customization-panel .helper{display:none;z-index:0}}.customization-panel .helper .error{background:red;width:100%;color:#fff;font-family:Roboto,sans-serif;font-size:14px;padding:15px 0;text-align:center;text-transform:uppercase;position:absolute;transition:all .3s;top:-45px;opacity:0}.btn-avatar{width:100%;height:65px;font-family:Nunito;font-weight:900;padding:0!important;background:#12d3db;background-size:200%;background-position-x:99%;box-shadow:0 .2381rem .95238rem 0 #89e6e8;border-radius:1.90476rem;color:#fff;transition:all .2s cubic-bezier(.4,0,.2,1);border:0;font-size:14px;letter-spacing:.0381rem;line-height:1.2rem;position:relative;display:flex;align-items:center;justify-content:center}.btn-avatar:hover{box-shadow:0 .2381rem .95238rem 0 #89e6e8;-webkit-transform:translateY(-.09524rem);transform:translateY(-.09524rem);cursor:pointer;background-position-x:0;-webkit-transform:translateY(-.14286rem);transform:translateY(-.14286rem);color:#fff}.btn-avatar:active,.btn-avatar:focus{outline:0;box-shadow:0 0 0 #89e6e8;background-position-x:0;-webkit-transform:translateY(.14286rem) scale(.97);transform:translateY(.14286rem) scale(.97)}.btn-avatar .icon{position:absolute;display:flex;justify-content:center;align-items:center;right:0;top:3px;margin:15px!important}.btn-avatar .icon path,.btn-avatar .icon svg{fill:#fff;stroke:#fff}@media (max-width:992px){.btn-avatar{display:none!important}}.btn-avatar-mobile{display:none!important}@media (max-width:992px){.btn-avatar-mobile{display:flex!important;width:150px;height:40px;box-shadow:none;font-size:12px;float:right;line-height:1;position:fixed;right:0;top:12px;z-index:200;border-radius:100px;margin-right:1.4953271028rem;box-shadow:none}.btn-avatar-mobile .icon{display:none}}.customization-categories{display:flex;align-items:center;align-content:center;padding:.7619047619rem .7619047619rem}@media (max-width:992px){.customization-categories{padding:0}}.customization-categories .category-vestuario{display:none!important}.customization-categories-item{position:relative;font-size:inherit;flex-basis:0;flex-grow:1;max-width:100%;height:100%;text-align:center}.customization-categories-item:hover{cursor:pointer}.customization-categories-item:hover .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item{height:50px;display:flex;justify-content:center;align-items:center;border:0}}.customization-categories-item-icon{height:52px;width:52px;display:block;border-radius:30px;margin:auto}.customization-categories-item-icon-placeholder{background-color:#dfdae4;border-radius:2px}@media (max-width:992px){.customization-categories-item-icon{display:none}}.customization-categories-item-label{font-weight:400;display:block;font-size:12px;color:#000;text-transform:capitalize!important;font-family:Roboto;padding-top:.380952381rem}@media (max-width:992px){.customization-categories-item-label{margin:0}}.customization-categories-item:first-child{border-left:none}.customization-categories-item.is-selected .customization-categories-item-label{color:#12d3db!important}@media (max-width:992px){.customization-categories-item.is-selected:after{content:"";position:absolute;left:0;bottom:-2px;width:100%;height:3px;background:#12d3db}}@media (max-width:992px) and (max-width:992px){.customization-categories-item.is-selected:after{bottom:0}}.customization-categories-item.is-disabled{opacity:.6}.btn-avatar-reduced{background:#2dd4d9!important;width:65px!important;cursor:wait}@media (max-width:479px){.btn-avatar-reduced{width:40px!important;height:40px!important}}.btn-avatar-loading-completed{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-position:0 0;background-repeat:no-repeat;-webkit-animation:1s loadingCompleted;-moz-animation:1s loadingCompleted;animation:1s loadingCompleted;cursor:wait}@-webkit-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@-moz-keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}@keyframes loadingCompleted{0%{background-position:41% 0}100%{background-position:0 0}}.btn-avatar-loading-started{background-color:#2dd4d9;background-image:linear-gradient(90deg,#04bb69 50%,#00cf72 50%);background-repeat:no-repeat;background-position:41% 0;-webkit-animation:4s loadingPosition;-moz-animation:4s loadingPosition;animation:4s loadingPosition;transition:.3s;cursor:wait}@-webkit-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@-moz-keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}@keyframes loadingPosition{0%{background-position:100% 0}35%{background-position:92% 0}50%{background-position:83% 0}75%{background-position:72% 0}100%{background-position:41% 0}}.btn-avatar-loading{font-size:1.4285714286rem;display:none;opacity:0;transition:all .3s;font-size:14px;cursor:wait}.btn-avatar-loading .btn-avatar-loading-icon{display:none;opacity:0;align-items:center;justify-content:center}.btn-avatar-loading .btn-avatar-loading-icon svg{width:2.1904761905rem;height:2.1904761905rem}@media (max-width:479px){.btn-avatar-loading .btn-avatar-loading-icon svg{width:3.5514018692rem;height:3.5514018692rem}}.btn-avatar-loading .btn-avatar-loading-icon path,.btn-avatar-loading .btn-avatar-loading-icon svg{fill:#fff;stroke:#fff}@media (max-width:479px){.btn-avatar-loading{font-size:12px}.btn-avatar-loading .btn-avatar-loading-content{font-size:12px}}',map:void 0,media:void 0})}),{name:"CustomizationPanel",components:{CategoryCustomizations:z,Caption:_,Icon:C},props:{builderApi:{type:String,default:"https://builder.dentrodahistoria.com.br/api"},selectedCharacter:{type:Object,default:{}},characterSlug:{type:String,required:!0},characterId:{type:[Number,String],required:!0},characterTypeId:{type:[Number,String],required:!0},characterName:{type:String,required:!0},characterIsMale:{type:Boolean,required:!0},categoriesAssets:{type:Object,required:!0},disabledCategories:{type:Array,required:!1,default:function(){return[]}},customizations:{type:Array,required:!0},builderProductId:{type:[String,Number],required:!1,default:null},subscriptionId:{type:[Number,String],required:!0},stackId:{type:[Number,String],required:!0},userDataProperties:{type:Object,required:!0},builderLayoutId:{type:[Number,String],required:!1},language:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt"},dir:{type:String,default:"ltr",required:!1}},data:function(){return{selectedCategory:null,selectedGroup:null,selectedCollection:null,error:null,isMobile:null,lang:M[this.typeLanguage],loadingContent:screen.width<1023?"ENVIANDO":"ENVIANDO PERSONAGEM"}},mounted:function(){if(!document.body.getElementsByClassName("btn-avatar-mobile")[0]){var t=document.getElementsByClassName("btn-avatar")[0].cloneNode(!0);t.classList.add("btn-avatar-mobile"),document.body.appendChild(t),document.body.getElementsByClassName("btn-avatar-mobile")[0].addEventListener("click",this.generateAvatar)}var e=document.getElementsByClassName("top-bar")[0];if(screen.width<=1023&&e&&!e.getElementsByClassName("overlay-opacity")[0]){var a=document.getElementsByClassName("overlay-opacity")[0].cloneNode(!0);e.appendChild(a)}if(!document.body.getElementsByClassName("error-mobile")[0]){var i=document.getElementsByClassName("error")[0].cloneNode(!0);i.classList.add("error-mobile"),document.body.appendChild(i)}window.addEventListener("resize",this.screenResize),screen.width>1023?this.isMobile=!1:this.isMobile=!0},beforeDestroy:function(){document.body.getElementsByClassName("btn-avatar-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("btn-avatar-mobile")[0]),document.body.getElementsByClassName("error-mobile")[0]&&document.body.removeChild(document.getElementsByClassName("error-mobile")[0])},computed:{showColorsCustomizations:function(){return!1},showSubcategoriesCustomizations:function(){return!1},visibleCategoriesCustomizations:function(){var t=this,e=[];return this.selectedCategory?e.push(this.selectedCategory):this.selectedCollection&&this.selectedCollection.categories.forEach((function(a){var i=t.categoriesAssets.categories.find((function(t){return t.id===a}));i&&e.push(i)})),e}},methods:{monthsHelper:function(t){switch(t){case 1:return"Janeiro";case 2:return"Fevereiro";case 3:return"Março";case 4:return"Abril";case 5:return"Maio";case 6:return"Junho";case 7:return"Julho";case 8:return"Agosto";case 9:return"Setembro";case 10:return"Outubro";case 11:return"Novembro";case 12:return"Dezembro"}},generateAvatar:function(){var t=this;return v(h().mark((function e(){var a,i,o,r,n,d,s,l,c,p,m,u;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t,o=!1,t.categoriesAssets.categories.forEach((function(e){e.required?((i=t.customizations.find((function(t){return e.id===t.categoryId})))||(i=t.disabledCategories.find((function(t){return e.id===t.categoryId}))),i||(o=!0,r=e)):(e.code.includes("mooner")||e.code.includes("pet"))&&(i=t.disabledCategories.find((function(t){return e.id===t.categoryId})))})),o){e.next=18;break}return t.$emit("startedMethod"),n=null,d=[],t.customizations.forEach((function(t){var e={parent_id:t.categoryId,id:t.optionId?t.optionId:t.relatedCategoryId};e.parent_id&&e.id&&d.push(e)})),s={properties:a.userDataProperties,type:t.characterTypeId},l={custom_character:{character_id:t.characterId,product_id:t.builderProductId,type_id:t.characterTypeId,categories:d,user_data:s}},t.builderLayoutId&&(l.custom_character.layout_id=t.builderLayoutId),t.language&&(l.custom_character.language=t.language),e.next=14,P({method:"POST",url:"".concat(t.builderApi,"/customs_characters/"),headers:{"Content-Type":"application/json"},data:l}).then((function(t){return t})).catch((function(t){return t}));case 14:(c=e.sent)&&(200===c.status?t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:d,success:!0}):(console.log("tentou pegar o segundo request"),c&&c.response&&c.response.reques&&(p=JSON.parse(c.response.request.responseText),n=p?p.error:"Não foi possível gerar o avatar. Tente novamente."),n&&(t.error=n,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)),t.$emit("completedMethod",{updatedCustomizations:t.customizations,updatedUuid:c.data.custom.uuid,categories:d,success:!1}))),e.next=22;break;case 18:m=r.code,u="pele"===m?"Necessário selecionar um tom de pele":"Necessário selecionar um tipo de ".concat(m),screen.width>1023&&("roupa"===m||"tenis"===m)?(t.error=u,t.$refs.error.style.opacity="1",setTimeout((function(){t.$refs.error.style.opacity="0"}),5e3)):(document.getElementsByClassName("error")[0].style.opacity="1",document.getElementsByClassName("error")[0].textContent=u,setTimeout((function(){document.getElementsByClassName("error")[0].style.opacity="0",document.getElementsByClassName("error")[0].textContent=""}),5e3)),t.$refs[m][0].click();case 22:case"end":return e.stop()}}),e)})))()},getCustomizationTitle:function(t){var e=t?t.toLowerCase():"";switch(e){case"pele":return"Tons de pele";default:return"Tipos de ".concat(e)}},getCustomizationByCategoryId:function(t){return this.customizations.find((function(e){return e.categoryId===t}))},handleSelectCategory:function(t){if(!this.isCategoryDisabled(t)&&this.selectedCategory!==t){this.selectedCharacter.slug;var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];"cabelo"===t.code||"olhos"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):"roupa"===t.code||"tenis"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-out"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0})),this.selectedGroup=null,this.selectedCollection=null,this.selectedCategory=t}},handleSelectGroup:function(t){if(this.selectedGroup!==t){if(screen.width<=1023){var e=document.getElementsByClassName("customization-preview-asset"),a=document.getElementsByClassName("customization-preview")[0];this.selectedCharacter.slug;"acessorio"===t.code||"acessorios"===t.code||"oculos"===t.code?(a.classList.remove("zoom-in"),a.classList.remove("zoom-out"),a.className+=" zoom-in"):(a.classList.remove("zoom-in"),a.classList.remove("zoom-out")),Array.from(e).forEach((function(t){t.style.transform=void 0}))}this.selectedCategory=null,this.selectedCollection=null,this.selectedGroup=t}},handleSelectCollection:function(t){this.selectedCollection!==t&&(this.selectedCategory=null,this.selectedGroup=null,this.selectedCollection=t)},handleUpdateCustomization:function(t){this.$emit("update:customization",t)},isCategoryDisabled:function(t){return void 0!==this.disabledCategories.find((function(e){return e.categoryId===t.id}))},screenResize:function(){if(screen.width>1023){document.getElementsByClassName("customization-preview-asset");
|
|
102
102
|
// const transform = "scale(1) translateY(0)"
|
|
103
103
|
// Array.from(avatar).forEach(piece => {
|
|
104
104
|
// piece.style.transform = transform
|