@tiddh/brave-vue 1.93.280 → 1.93.282
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.client.esm.css +1 -1
- package/dist/brave-vue.client.esm.js +103 -90
- package/dist/brave-vue.esm.css +1 -1
- package/dist/brave-vue.esm.js +65 -48
- package/dist/brave-vue.min.js +2 -2
- package/dist/brave-vue.ssr.css +1 -1
- package/dist/brave-vue.ssr.js +85 -68
- package/dist/src/Avatar/elements/CustomizationPanel.vue +11 -0
- package/dist/src/Button.vue +23 -0
- package/dist/src/ButtonWithIcon.stories.js +15 -12
- package/dist/src/Buttons/Button.vue +23 -0
- package/dist/src/Buttons/ButtonWithIcon.stories.js +15 -12
- package/dist/src/CustomizationPanel.vue +11 -0
- package/dist/src/Form/GenderSelect.stories.js +3 -3
- package/dist/src/Form/GenderSelect.vue +19 -2
- package/dist/src/Form/Input.stories.js +6 -12
- package/dist/src/Form/Input.vue +19 -3
- package/dist/src/GenderSelect.stories.js +3 -3
- package/dist/src/GenderSelect.vue +19 -2
- package/dist/src/Input.stories.js +6 -12
- package/dist/src/Input.vue +19 -3
- package/dist/src/components/Avatar/elements/CustomizationPanel.vue +11 -0
- package/dist/src/components/Buttons/Button.vue +23 -0
- package/dist/src/components/Buttons/ButtonWithIcon.stories.js +15 -12
- package/dist/src/components/Form/GenderSelect.stories.js +3 -3
- package/dist/src/components/Form/GenderSelect.vue +19 -2
- package/dist/src/components/Form/Input.stories.js +6 -12
- package/dist/src/components/Form/Input.vue +19 -3
- package/dist/src/components/locale/config.js +11 -0
- package/dist/src/components/locale/language.json +88 -0
- package/dist/src/config.js +11 -0
- package/dist/src/elements/CustomizationPanel.vue +11 -0
- package/dist/src/language.json +88 -0
- package/dist/src/locale/config.js +11 -0
- package/dist/src/locale/language.json +88 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import"./brave-vue.client.esm.css";import e from"vue";import"@tiddh/brave-icons/dist/font.css";import t from"card-validator";import{mask as a}from"vue-the-mask";import o from"axios";import i from"v-lazy-image/v2";import r from"jquery";import n from"vue-slick-carousel";import{ScrollPicker as s,ScrollPickerGroup as d}from"vue-scroll-picker";function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,o=Array(t);a<t;a++)o[a]=e[a];return o}function c(e,t,a,o,i,r,n){try{var s=e[r](n),d=s.value}catch(e){return void a(e)}s.done?t(d):Promise.resolve(d).then(o,i)}function u(e){return function(){var t=this,a=arguments;return new Promise((function(o,i){var r=e.apply(t,a);function n(e){c(r,o,i,n,s,"next",e)}function s(e){c(r,o,i,n,s,"throw",e)}n(void 0)}))}}function p(e,t,a){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var o=a.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function h(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function m(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?h(Object(a),!0).forEach((function(t){p(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function g(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.toStringTag||"@@toStringTag";function r(a,o,i,r){var d=o&&o.prototype instanceof s?o:s,l=Object.create(d.prototype);return f(l,"_invoke",function(a,o,i){var r,s,d,l=0,c=i||[],u=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,a){return r=t,s=0,d=e,p.n=a,n}};function h(a,o){for(s=a,d=o,t=0;!u&&l&&!i&&t<c.length;t++){var i,r=c[t],h=p.p,m=r[2];a>3?(i=m===o)&&(d=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=h&&((i=a<2&&h<r[1])?(s=0,p.v=o,p.n=r[1]):h<m&&(i=a<3||r[0]>o||o>m)&&(r[4]=a,r[5]=o,p.n=m,s=0))}if(i||a>1)return n;throw u=!0,o}return function(i,c,m){if(l>1)throw TypeError("Generator is already running");for(u&&1===c&&h(c,m),s=c,d=m;(t=s<2?e:d)||!u;){r||(s?s<3?(s>1&&(p.n=-1),h(s,d)):p.n=d:p.v=d);try{if(l=2,r){if(s||(i="next"),t=r[i]){if(!(t=t.call(r,d)))throw TypeError("iterator result is not an object");if(!t.done)return t;d=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(d=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=e}else if((t=(u=p.n<0)?d:a.call(o,p))!==n)break}catch(t){r=e,s=1,d=t}finally{l=1}}return{value:t,done:u}}}(a,i,r),!0),l}var n={};function s(){}function d(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(f(t={},o,(function(){return this})),t),u=l.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,f(e,i,"GeneratorFunction")),e.prototype=Object.create(u),e}return d.prototype=l,f(u,"constructor",l),f(l,"constructor",d),d.displayName="GeneratorFunction",f(l,i,"GeneratorFunction"),f(u),f(u,i,"Generator"),f(u,o,(function(){return this})),f(u,"toString",(function(){return"[object Generator]"})),(g=function(){return{w:r,m:p}})()}function f(e,t,a,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(f=function(e,t,a,o){function r(t,a){f(e,t,(function(e){return this._invoke(t,a,e)}))}t?i?i(e,t,{value:a,enumerable:!o,configurable:!o,writable:!o}):e[t]=a:(r("next",0),r("throw",1),r("return",2))})(e,t,a,o)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o,i,r,n,s=[],d=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;d=!1}else for(;!(d=(o=r.call(a)).done)&&(s.push(o.value),s.length!==t);d=!0);}catch(e){l=!0,i=e}finally{try{if(!d&&null!=a.return&&(n=a.return(),Object(n)!==n))return}finally{if(l)throw i}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){if(e){if("string"==typeof e)return l(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?l(e,t):void 0}}var _={"pt-BR":{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando sua personalização",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},"pt-PT":{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos a carregar a sua personalização",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 Camisola",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 apenas 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 camisola do pequeno",chooseScript:"Escolhe o roteiro",choosePetLabel1:"Escolhe 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:"Animal de estimação",changePet:"Altere o animal da história",petDescription1:"Este animal acompanhará ",petDescription2:"em toda a história.",typePetname:"Escreva o nome do animal aqui",selectPet:"Selecione o animal",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},pt:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando sua personalização",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},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",Acessorios:"Accessories",continue:"CONTINUE",birthdayOf:"",stepBack:"Back",stepPreview:"4 - Preview",close:"Close",chooseLater:"Choose later",fantasy:"Costume",bookLanguage:"Language",nameModalParagraph:"For a better personalization, use only the first name.",fantasyDescription:"Costume description",fantasySave:"Ready, save story",Chuteira:"Cleats",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December"},es:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Solo un momento",loadingPhrase:"Estamos cargando tu libro exclusivo",pages:"PÁGINAS",pagesLowercase:"páginas",editArea:"Área de edición",name:"Nombre",dedication:"Dedicatoria",writeDedication:"Escribe una dedicatoria",shirtNumber:"Número de la 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:"Dedicatoria (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:"del",da:"de la",editCharacter:"Editar el personaje",Pele:"Piel",Olhos:"Ojos",Cabelo:"Cabello",Roupa:"Ropa","Tênis":"Zapatillas","Óculos":"Gafas",Acessorios:"Accesorios",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Volver",stepPreview:"4 - Vista previa",close:"Cerrar",chooseLater:"Elegir después",fantasy:"Disfraz",bookLanguage:"Idioma",nameModalParagraph:"Para una mejor personalización, usa solo el primer nombre.",fantasyDescription:"Descripción del disfraz",fantasySave:"Listo, guardar historia",Chuteira:"Botas de fútbol",month1:"Enero",month2:"Febrero",month3:"Marzo",month4:"Abril",month5:"Mayo",month6:"Junio",month7:"Julio",month8:"Agosto",month9:"Septiembre",month10:"Octubre",month11:"Noviembre",month12:"Diciembre"},fr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Un instant",loadingPhrase:"Nous chargeons votre personnalisation",pages:"PAGES",pagesLowercase:"pages",editArea:"Zone d'édition",name:"Prénom",dedication:"Dédicace",writeDedication:"Écrire une dédicace",shirtNumber:"Numéro de maillot",bookScript:"Scénario du livre",dateBirth:"Date de naissance",editDateBirth:"Modifier la date de naissance",editName:"Modifier le prénom de l'enfant",kidName:"Modifier le prénom du protagoniste",reccomendName:"Nous recommandons d'utiliser uniquement le prénom",dedicationFree:"Dédicace (gratuite)",cusutomDedication:"Personnalisez la dédicace imprimée dans le livre.",messageDedication:"Message de dédicace",dedcationPlaceholder:"Que votre vie soit remplie de belles aventures !",editShirt:"Modifier le maillot de l'enfant",chooseScript:"Vous choisissez le scénario",choosePetLabel1:"Choisissez le duo qui aidera",choosePetLabel2:"à retrouver Sansão dans cette aventure avec la Bande de Mônica.",day:"Jour",month:"Mois",pet:"Animal de compagnie",changePet:"Changer l'animal dans l'histoire",petDescription1:"Cet animal accompagnera ",petDescription2:" tout au long de l'histoire.",typePetname:"Saisissez le nom de l'animal ici",selectPet:"Sélectionnez l'animal",update:"METTRE À JOUR",cancel:"ANNULER",moonerLabelSidebar:"Mooner",moonerTitle:"Changer le mooner dans l'histoire",moonerTitleFirstOpen:"Ajouter un mooner à l'histoire",moonerTitleMobile:"Changer le mooner",moonerTitleFirstOpenMobile:"Ajouter un mooner",moonerDescriptionOne:"Il accompagnera <span>",moonerDescriptionTwo:"</span> tout au long de l'histoire.",moonerDescriptionTwoMobile:" dans l'histoire.",moonerLabel:"Nom du mooner",moonerLabelSelector:"Sélectionnez un mooner",moonerCtaFirstOpen:"C'est prêt, voir l'histoire",moonerCta:"Mettre à jour",moonerCtaCancel:"Annuler",birthday_label:"Date de naissance",genderFemale:"Fille",genderMale:"Garçon",or:"ou",do:"de",da:"de la",editCharacter:"Modifier le personnage",Pele:"Peau",Olhos:"Yeux",Cabelo:"Cheveux",Roupa:"Vêtements","Tênis":"Baskets","Óculos":"Lunettes",Acessorios:"Accessoires",Chuteira:"Crampons",continue:"CONTINUER",birthdayOf:"",stepBack:"Retour",stepPreview:"4 - Aperçu",close:"Fermer",chooseLater:"Choisir plus tard",fantasy:"Déguisement",bookLanguage:"Langue",nameModalParagraph:"Pour une meilleure personnalisation, utilisez uniquement le prénom.",fantasyDescription:"Description du déguisement",fantasySave:"C'est prêt, enregistrer l'histoire",month1:"Janvier",month2:"Février",month3:"Mars",month4:"Avril",month5:"Mai",month6:"Juin",month7:"Juillet",month8:"Août",month9:"Septembre",month10:"Octobre",month11:"Novembre",month12:"Décembre"},ar:{urlBuilder:"https://builder.dentrodahistoria.com.br",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:"do",da:"da",editCharacter:"تحرير شخصية",Pele:"البشرة",Olhos:"عيون",Cabelo:"شعر",Roupa:"ملابس","Tênis":"حذاء رياضي","Óculos":"نظارات",Acessorios:"إكسسوارات",continue:"متابعة",birthdayOf:"",stepBack:"رجوع",stepPreview:"4 - معاينة",close:"إغلاق",chooseLater:"اختر لاحقًا",fantasy:"زي",bookLanguage:"اللغة",nameModalParagraph:"لتخصيص أفضل، استخدم الاسم الأول فقط.",fantasyDescription:"وصف الزي",fantasySave:"جاهز، احفظ القصة",justASecond:"لحظة واحدة",Chuteira:"حذاء كرة القدم",month1:"يناير",month2:"فبراير",month3:"مارس",month4:"أبريل",month5:"مايو",month6:"يونيو",month7:"يوليو",month8:"أغسطس",month9:"سبتمبر",month10:"أكتوبر",month11:"نوفمبر",month12:"ديسمبر"},th:{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:"ค้นหา Sansão ในการผจญภัยครั้งนี้กับ Turma da Mônica",day:"วัน",month:"เดือน",pet:"สัตว์เลี้ยง",changePet:"เปลี่ยนสัตว์เลี้ยงในเรื่อง",petDescription1:"สัตว์เลี้ยงตัวนี้จะอยู่กับ ",petDescription2:" ตลอดเรื่อง",typePetname:"พิมพ์ชื่อสัตว์เลี้ยงที่นี่",selectPet:"เลือกสัตว์เลี้ยง",update:"อัปเดต",cancel:"ยกเลิก",moonerLabelSidebar:"Mooner",moonerTitle:"เปลี่ยน mooner ในเรื่อง",moonerTitleFirstOpen:"เพิ่ม mooner ในเรื่อง",moonerTitleMobile:"เปลี่ยน mooner",moonerTitleFirstOpenMobile:"เพิ่ม mooner",moonerDescriptionOne:"เขาจะอยู่กับ <span>",moonerDescriptionTwo:"</span> ตลอดเรื่อง",moonerDescriptionTwoMobile:" ในเรื่อง",moonerLabel:"ชื่อ mooner",moonerLabelSelector:"เลือก mooner",moonerCtaFirstOpen:"พร้อมแล้ว ดูเรื่อง",moonerCta:"อัปเดต",moonerCtaCancel:"ยกเลิก",birthday_label:"วันเกิด",genderFemale:"เด็กหญิง",genderMale:"เด็กชาย",or:"หรือ",do:"ของ",da:"ของ",editCharacter:"แก้ไขตัวละคร",Pele:"สีผิว",Olhos:"ตา",Cabelo:"ผม",Roupa:"เสื้อผ้า","Tênis":"รองเท้าผ้าใบ","Óculos":"แว่นตา",Acessorios:"เครื่องประดับ",Chuteira:"รองเท้าฟุตบอล",continue:"ดำเนินการต่อ",birthdayOf:"",stepBack:"กลับ",stepPreview:"4 - ตัวอย่าง",close:"ปิด",chooseLater:"เลือกภายหลัง",fantasy:"ชุดแฟนตาซี",bookLanguage:"ภาษา",nameModalParagraph:"เพื่อการปรับแต่งที่ดีขึ้น ใช้เฉพาะชื่อจริง",fantasyDescription:"คำอธิบายชุดแฟนตาซี",fantasySave:"พร้อมแล้ว บันทึกเรื่อง",month1:"มกราคม",month2:"กุมภาพันธ์",month3:"มีนาคม",month4:"เมษายน",month5:"พฤษภาคม",month6:"มิถุนายน",month7:"กรกฎาคม",month8:"สิงหาคม",month9:"กันยายน",month10:"ตุลาคม",month11:"พฤศจิกายน",month12:"ธันวาคม"},tr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Bir saniye",loadingPhrase:"Size özel kitabınız yükleniyor.",pages:"SAYFALAR",pagesLowercase:"Sayfalar",editArea:"Düzenleme Alanı",name:"Ad",dedication:"İthaf",writeDedication:"İthaf yazınız",shirtNumber:"Tişört Numarası",bookScript:"Kitabın Senaryosu",dateBirth:"Doğum Tarihi",editDateBirth:"Doğum Tarihini Düzenle",editName:"Küçüğün adını düzenle",kidName:"Ana kahramanın adını düzenle",reccomendName:"Sadece isim kullanmanız önerilir.",dedicationFree:"İthaf (ücretsiz)",cusutomDedication:"Kitapta basılacak olan ithafı özelleştirin.",messageDedication:"İthaf Metni",dedcationPlaceholder:"Maceralarla dolu bir hayat diliyorum.",editShirt:"Küçüğün tişörtünü düzenle",chooseScript:"Senaryo seç",choosePetLabel1:"Sana yardımcı olacak ikiliyi seç",choosePetLabel2:"Bu macerada Turma da Monica'yla beraber Sansao'yu bulacaklar.",day:"Gün",month:"Ay",pet:"Evcil hayvan",changePet:"Öyküde evcil hayvanı değiştir",petDescription1:"Bu evcil hayvan,",petDescription2:"tüm öykü boyunca size eşlik edecektir.",typePetname:"Evcil hayvanın adını buraya yaz",selectPet:"Evcil hayvanı seç",update:"GÜNCELLE",cancel:"İptal et",moonerLabelSidebar:"Mooner",moonerTitle:"Öyküde mooner'ı değiştir",moonerTitleFirstOpen:"Öyküye bir mooner ekle",moonerTitleMobile:"Mooner'ı değiştir",moonerTitleFirstOpenMobile:"Bir mooner ekle",moonerDescriptionOne:"O, <span>",moonerDescriptionTwo:"</span> tüm öykü boyunca eşlik edecektir.",moonerDescriptionTwoMobile:"öyküde.",moonerLabel:"Mooner'ın Adı",moonerLabelSelector:"Bir mooner seç",moonerCtaFirstOpen:"Hazır, öyküyü görüntüle",moonerCta:"Güncelle",moonerCtaCancel:"İptal et",birthday_label:"Doğum Tarihi",genderFemale:"Kız",genderMale:"Erkek",or:"veya",do:"nin",da:"nın",editCharacter:"Karakteri Düzenle",Pele:"Ten Rengi",Olhos:"Göz",Cabelo:"Saç",Roupa:"Giysi","Tênis":"Spor Ayakkabısı","Óculos":"Gözlük",Acessorios:"Aksesuarlar",continue:"DEVAM ET",birthdayOf:"",stepBack:"Geri",stepPreview:"4 - Önizleme",close:"Kapat",chooseLater:"Sonra seç",fantasy:"Kostüm",bookLanguage:"Dil",nameModalParagraph:"Daha iyi bir kişiselleştirme için yalnızca adı kullanın.",fantasyDescription:"Kostüm açıklaması",fantasySave:"Hazır, hikayeyi kaydet",Chuteira:"Krampon",month1:"Ocak",month2:"Şubat",month3:"Mart",month4:"Nisan",month5:"Mayıs",month6:"Haziran",month7:"Temmuz",month8:"Ağustos",month9:"Eylül",month10:"Ekim",month11:"Kasım",month12:"Aralık"}},w=_&&_.default&&"object"===b(_.default)?_.default:_,k=["pt-BR","pt-PT","en","es","fr","ar","th"],C={pt:"pt-BR","pt-br":"pt-BR","pt-pt":"pt-PT"},P={"pt-BR":"pt","pt-PT":"pt-PT",pt:"pt",en:"en",es:"es",fr:"fr",ar:"ar",th:"th",tr:"tr"};function M(e,t){if(t)return t;var a=x(e);return P[a]||a.split("-")[0].toLowerCase()}function x(e){if(!e)return"pt-BR";var t=String(e).trim(),a=t.toLowerCase();if(C[a])return C[a];if(w[t])return t;var o=k.find((function(e){return e.toLowerCase()===a}));return o||(w[a]?a:w.pt?"pt":w["pt-BR"]?"pt-BR":"pt")}function z(e){var t=x(e);return w[t]||w["pt-BR"]||w.pt||w["pt-BR"]||w.en||Object.values(w).find((function(e){return e&&"object"===b(e)}))||{}}function S(e){if(!e&&0!==e)return null;var t,a=String(e).trim(),o=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=y(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){s=!0,r=e},f:function(){try{n||null==a.return||a.return()}finally{if(s)throw r}}}}(Object.values(w).filter((function(e){return e&&"object"===b(e)})));try{for(o.s();!(t=o.n()).done;)for(var i=t.value,r=1;r<=12;r+=1)if(i["month".concat(r)]===a)return r}catch(e){o.e(e)}finally{o.f()}var n=parseInt(a,10);return n>=1&&n<=12?n:null}function L(e,t,a){var o=x(a),i="number"==typeof t?t:S(t),r=i?function(e,t){return z(t)["month".concat(e)]||""}(i,a):t;if("en"===o)return"".concat(r," ").concat(e);var n=z(a).birthdayOf;return n?"".concat(e," ").concat(n," ").concat(r):"".concat(e," ").concat(r)}function B(e){if(!e)return null;var t=String(e).trim().replace(/\s+/g," "),a=t.match(/^(\d{1,2})\s+de\s+(.+)$/i);if(a)return{day:parseInt(a[1],10),monthName:a[2].trim()};var o=t.match(/^(.+?)\s+(\d{1,2})$/);if(o){var i=S(o[1].trim());if(i)return{day:parseInt(o[2],10),monthKey:i}}var r=t.match(/^(\d{1,2})\s+(.+)$/);if(r){var n=S(r[2].trim());return n?{day:parseInt(r[1],10),monthKey:n}:{day:parseInt(r[1],10),monthName:r[2].trim()}}return null}function T(e){var t=e.properties,a=e.typeLanguage,o=e.custom_numero,i=e.custom_mes,r={selectedBirthDay:null,selectedBirthMonth:null};if(!t)return r;if(t.numero&&t.mes){r.selectedBirthDay=t.numero.value;var n=S(t.mes.value);return n&&(r.selectedBirthMonth=n),t.birthday={code:"birthday",value:L(r.selectedBirthDay,n||t.mes.value,a)},delete t.numero,delete t.mes,r}if(t.birthday&&t.birthday.value){var s=B(t.birthday.value);if(s){r.selectedBirthDay=s.day;var d=s.monthKey||S(s.monthName);d&&(r.selectedBirthMonth=d),t.birthday.value=L(s.day,d||s.monthName,a)}return r}if(o&&i){r.selectedBirthDay=o;var l=S(i);l&&(r.selectedBirthMonth=l),t.birthday={code:"birthday",value:L(o,l||i,a)}}return r}
|
|
3
|
+
var e,t,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.toStringTag||"@@toStringTag";function r(a,o,i,r){var d=o&&o.prototype instanceof s?o:s,l=Object.create(d.prototype);return f(l,"_invoke",function(a,o,i){var r,s,d,l=0,c=i||[],u=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,a){return r=t,s=0,d=e,p.n=a,n}};function h(a,o){for(s=a,d=o,t=0;!u&&l&&!i&&t<c.length;t++){var i,r=c[t],h=p.p,m=r[2];a>3?(i=m===o)&&(d=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=h&&((i=a<2&&h<r[1])?(s=0,p.v=o,p.n=r[1]):h<m&&(i=a<3||r[0]>o||o>m)&&(r[4]=a,r[5]=o,p.n=m,s=0))}if(i||a>1)return n;throw u=!0,o}return function(i,c,m){if(l>1)throw TypeError("Generator is already running");for(u&&1===c&&h(c,m),s=c,d=m;(t=s<2?e:d)||!u;){r||(s?s<3?(s>1&&(p.n=-1),h(s,d)):p.n=d:p.v=d);try{if(l=2,r){if(s||(i="next"),t=r[i]){if(!(t=t.call(r,d)))throw TypeError("iterator result is not an object");if(!t.done)return t;d=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(d=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=e}else if((t=(u=p.n<0)?d:a.call(o,p))!==n)break}catch(t){r=e,s=1,d=t}finally{l=1}}return{value:t,done:u}}}(a,i,r),!0),l}var n={};function s(){}function d(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(f(t={},o,(function(){return this})),t),u=l.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,f(e,i,"GeneratorFunction")),e.prototype=Object.create(u),e}return d.prototype=l,f(u,"constructor",l),f(l,"constructor",d),d.displayName="GeneratorFunction",f(l,i,"GeneratorFunction"),f(u),f(u,i,"Generator"),f(u,o,(function(){return this})),f(u,"toString",(function(){return"[object Generator]"})),(g=function(){return{w:r,m:p}})()}function f(e,t,a,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(f=function(e,t,a,o){function r(t,a){f(e,t,(function(e){return this._invoke(t,a,e)}))}t?i?i(e,t,{value:a,enumerable:!o,configurable:!o,writable:!o}):e[t]=a:(r("next",0),r("throw",1),r("return",2))})(e,t,a,o)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var o,i,r,n,s=[],d=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;d=!1}else for(;!(d=(o=r.call(a)).done)&&(s.push(o.value),s.length!==t);d=!0);}catch(e){l=!0,i=e}finally{try{if(!d&&null!=a.return&&(n=a.return(),Object(n)!==n))return}finally{if(l)throw i}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){if(e){if("string"==typeof e)return l(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?l(e,t):void 0}}var _={"pt-BR":{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando sua personalização",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},"pt-PT":{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos a carregar a sua personalização",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 Camisola",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 apenas 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 camisola do pequeno",chooseScript:"Escolhe o roteiro",choosePetLabel1:"Escolhe 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:"Animal de estimação",changePet:"Altere o animal da história",petDescription1:"Este animal acompanhará ",petDescription2:"em toda a história.",typePetname:"Escreva o nome do animal aqui",selectPet:"Selecione o animal",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},pt:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Só um segundo",loadingPhrase:"Estamos carregando sua personalização",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:"Cancelar",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",Acessorios:"Acessórios",Chuteira:"Chuteira",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Voltar",stepPreview:"4 - Preview",close:"Fechar",chooseLater:"Escolher depois",fantasy:"Fantasia",bookLanguage:"Idioma",nameModalParagraph:"Para a personalização ficar mais legal use apenas o primeiro nome.",fantasyDescription:"Descrição fantasia",fantasySave:"Prontinho, salvar história",month1:"Janeiro",month2:"Fevereiro",month3:"Março",month4:"Abril",month5:"Maio",month6:"Junho",month7:"Julho",month8:"Agosto",month9:"Setembro",month10:"Outubro",month11:"Novembro",month12:"Dezembro"},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",Acessorios:"Accessories",continue:"CONTINUE",birthdayOf:"",stepBack:"Back",stepPreview:"4 - Preview",close:"Close",chooseLater:"Choose later",fantasy:"Costume",bookLanguage:"Language",nameModalParagraph:"For a better personalization, use only the first name.",fantasyDescription:"Costume description",fantasySave:"Ready, save story",Chuteira:"Cleats",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December"},es:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Solo un momento",loadingPhrase:"Estamos cargando tu libro exclusivo",pages:"PÁGINAS",pagesLowercase:"páginas",editArea:"Área de edición",name:"Nombre",dedication:"Dedicatoria",writeDedication:"Escribe una dedicatoria",shirtNumber:"Número de la 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:"Dedicatoria (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:"del",da:"de la",editCharacter:"Editar el personaje",Pele:"Piel",Olhos:"Ojos",Cabelo:"Cabello",Roupa:"Ropa","Tênis":"Zapatillas","Óculos":"Gafas",Acessorios:"Accesorios",continue:"CONTINUAR",birthdayOf:"de",stepBack:"Volver",stepPreview:"4 - Vista previa",close:"Cerrar",chooseLater:"Elegir después",fantasy:"Disfraz",bookLanguage:"Idioma",nameModalParagraph:"Para una mejor personalización, usa solo el primer nombre.",fantasyDescription:"Descripción del disfraz",fantasySave:"Listo, guardar historia",Chuteira:"Botas de fútbol",month1:"Enero",month2:"Febrero",month3:"Marzo",month4:"Abril",month5:"Mayo",month6:"Junio",month7:"Julio",month8:"Agosto",month9:"Septiembre",month10:"Octubre",month11:"Noviembre",month12:"Diciembre"},fr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Un instant",loadingPhrase:"Nous chargeons votre personnalisation",pages:"PAGES",pagesLowercase:"pages",editArea:"Zone d'édition",name:"Prénom",dedication:"Dédicace",writeDedication:"Écrire une dédicace",shirtNumber:"Numéro de maillot",bookScript:"Scénario du livre",dateBirth:"Date de naissance",editDateBirth:"Modifier la date de naissance",editName:"Modifier le prénom de l'enfant",kidName:"Modifier le prénom du protagoniste",reccomendName:"Nous recommandons d'utiliser uniquement le prénom",dedicationFree:"Dédicace (gratuite)",cusutomDedication:"Personnalisez la dédicace imprimée dans le livre.",messageDedication:"Message de dédicace",dedcationPlaceholder:"Que votre vie soit remplie de belles aventures !",editShirt:"Modifier le maillot de l'enfant",chooseScript:"Vous choisissez le scénario",choosePetLabel1:"Choisissez le duo qui aidera",choosePetLabel2:"à retrouver Sansão dans cette aventure avec la Bande de Mônica.",day:"Jour",month:"Mois",pet:"Animal de compagnie",changePet:"Changer l'animal dans l'histoire",petDescription1:"Cet animal accompagnera ",petDescription2:" tout au long de l'histoire.",typePetname:"Saisissez le nom de l'animal ici",selectPet:"Sélectionnez l'animal",update:"METTRE À JOUR",cancel:"ANNULER",moonerLabelSidebar:"Mooner",moonerTitle:"Changer le mooner dans l'histoire",moonerTitleFirstOpen:"Ajouter un mooner à l'histoire",moonerTitleMobile:"Changer le mooner",moonerTitleFirstOpenMobile:"Ajouter un mooner",moonerDescriptionOne:"Il accompagnera <span>",moonerDescriptionTwo:"</span> tout au long de l'histoire.",moonerDescriptionTwoMobile:" dans l'histoire.",moonerLabel:"Nom du mooner",moonerLabelSelector:"Sélectionnez un mooner",moonerCtaFirstOpen:"C'est prêt, voir l'histoire",moonerCta:"Mettre à jour",moonerCtaCancel:"Annuler",birthday_label:"Date de naissance",genderFemale:"Fille",genderMale:"Garçon",or:"ou",do:"de",da:"de la",editCharacter:"Modifier le personnage",Pele:"Peau",Olhos:"Yeux",Cabelo:"Cheveux",Roupa:"Vêtements","Tênis":"Baskets","Óculos":"Lunettes",Acessorios:"Accessoires",Chuteira:"Crampons",continue:"CONTINUER",birthdayOf:"",stepBack:"Retour",stepPreview:"4 - Aperçu",close:"Fermer",chooseLater:"Choisir plus tard",fantasy:"Déguisement",bookLanguage:"Langue",nameModalParagraph:"Pour une meilleure personnalisation, utilisez uniquement le prénom.",fantasyDescription:"Description du déguisement",fantasySave:"C'est prêt, enregistrer l'histoire",month1:"Janvier",month2:"Février",month3:"Mars",month4:"Avril",month5:"Mai",month6:"Juin",month7:"Juillet",month8:"Août",month9:"Septembre",month10:"Octobre",month11:"Novembre",month12:"Décembre"},ar:{urlBuilder:"https://builder.dentrodahistoria.com.br",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:"do",da:"da",editCharacter:"تحرير شخصية",Pele:"البشرة",Olhos:"عيون",Cabelo:"شعر",Roupa:"ملابس","Tênis":"حذاء رياضي","Óculos":"نظارات",Acessorios:"إكسسوارات",continue:"متابعة",birthdayOf:"",stepBack:"رجوع",stepPreview:"4 - معاينة",close:"إغلاق",chooseLater:"اختر لاحقًا",fantasy:"زي",bookLanguage:"اللغة",nameModalParagraph:"لتخصيص أفضل، استخدم الاسم الأول فقط.",fantasyDescription:"وصف الزي",fantasySave:"جاهز، احفظ القصة",justASecond:"لحظة واحدة",Chuteira:"حذاء كرة القدم",month1:"يناير",month2:"فبراير",month3:"مارس",month4:"أبريل",month5:"مايو",month6:"يونيو",month7:"يوليو",month8:"أغسطس",month9:"سبتمبر",month10:"أكتوبر",month11:"نوفمبر",month12:"ديسمبر"},th:{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:"ค้นหา Sansão ในการผจญภัยครั้งนี้กับ Turma da Mônica",day:"วัน",month:"เดือน",pet:"สัตว์เลี้ยง",changePet:"เปลี่ยนสัตว์เลี้ยงในเรื่อง",petDescription1:"สัตว์เลี้ยงตัวนี้จะอยู่กับ ",petDescription2:" ตลอดเรื่อง",typePetname:"พิมพ์ชื่อสัตว์เลี้ยงที่นี่",selectPet:"เลือกสัตว์เลี้ยง",update:"อัปเดต",cancel:"ยกเลิก",moonerLabelSidebar:"Mooner",moonerTitle:"เปลี่ยน mooner ในเรื่อง",moonerTitleFirstOpen:"เพิ่ม mooner ในเรื่อง",moonerTitleMobile:"เปลี่ยน mooner",moonerTitleFirstOpenMobile:"เพิ่ม mooner",moonerDescriptionOne:"เขาจะอยู่กับ <span>",moonerDescriptionTwo:"</span> ตลอดเรื่อง",moonerDescriptionTwoMobile:" ในเรื่อง",moonerLabel:"ชื่อ mooner",moonerLabelSelector:"เลือก mooner",moonerCtaFirstOpen:"พร้อมแล้ว ดูเรื่อง",moonerCta:"อัปเดต",moonerCtaCancel:"ยกเลิก",birthday_label:"วันเกิด",genderFemale:"เด็กหญิง",genderMale:"เด็กชาย",or:"หรือ",do:"ของ",da:"ของ",editCharacter:"แก้ไขตัวละคร",Pele:"สีผิว",Olhos:"ตา",Cabelo:"ผม",Roupa:"เสื้อผ้า","Tênis":"รองเท้าผ้าใบ","Óculos":"แว่นตา",Acessorios:"เครื่องประดับ",Chuteira:"รองเท้าฟุตบอล",continue:"ดำเนินการต่อ",birthdayOf:"",stepBack:"กลับ",stepPreview:"4 - ตัวอย่าง",close:"ปิด",chooseLater:"เลือกภายหลัง",fantasy:"ชุดแฟนตาซี",bookLanguage:"ภาษา",nameModalParagraph:"เพื่อการปรับแต่งที่ดีขึ้น ใช้เฉพาะชื่อจริง",fantasyDescription:"คำอธิบายชุดแฟนตาซี",fantasySave:"พร้อมแล้ว บันทึกเรื่อง",month1:"มกราคม",month2:"กุมภาพันธ์",month3:"มีนาคม",month4:"เมษายน",month5:"พฤษภาคม",month6:"มิถุนายน",month7:"กรกฎาคม",month8:"สิงหาคม",month9:"กันยายน",month10:"ตุลาคม",month11:"พฤศจิกายน",month12:"ธันวาคม"},tr:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Bir saniye",loadingPhrase:"Size özel kitabınız yükleniyor.",pages:"SAYFALAR",pagesLowercase:"Sayfalar",editArea:"Düzenleme Alanı",name:"Ad",dedication:"İthaf",writeDedication:"İthaf yazınız",shirtNumber:"Tişört Numarası",bookScript:"Kitabın Senaryosu",dateBirth:"Doğum Tarihi",editDateBirth:"Doğum Tarihini Düzenle",editName:"Küçüğün adını düzenle",kidName:"Ana kahramanın adını düzenle",reccomendName:"Sadece isim kullanmanız önerilir.",dedicationFree:"İthaf (ücretsiz)",cusutomDedication:"Kitapta basılacak olan ithafı özelleştirin.",messageDedication:"İthaf Metni",dedcationPlaceholder:"Maceralarla dolu bir hayat diliyorum.",editShirt:"Küçüğün tişörtünü düzenle",chooseScript:"Senaryo seç",choosePetLabel1:"Sana yardımcı olacak ikiliyi seç",choosePetLabel2:"Bu macerada Turma da Monica'yla beraber Sansao'yu bulacaklar.",day:"Gün",month:"Ay",pet:"Evcil hayvan",changePet:"Öyküde evcil hayvanı değiştir",petDescription1:"Bu evcil hayvan,",petDescription2:"tüm öykü boyunca size eşlik edecektir.",typePetname:"Evcil hayvanın adını buraya yaz",selectPet:"Evcil hayvanı seç",update:"GÜNCELLE",cancel:"İptal et",moonerLabelSidebar:"Mooner",moonerTitle:"Öyküde mooner'ı değiştir",moonerTitleFirstOpen:"Öyküye bir mooner ekle",moonerTitleMobile:"Mooner'ı değiştir",moonerTitleFirstOpenMobile:"Bir mooner ekle",moonerDescriptionOne:"O, <span>",moonerDescriptionTwo:"</span> tüm öykü boyunca eşlik edecektir.",moonerDescriptionTwoMobile:"öyküde.",moonerLabel:"Mooner'ın Adı",moonerLabelSelector:"Bir mooner seç",moonerCtaFirstOpen:"Hazır, öyküyü görüntüle",moonerCta:"Güncelle",moonerCtaCancel:"İptal et",birthday_label:"Doğum Tarihi",genderFemale:"Kız",genderMale:"Erkek",or:"veya",do:"nin",da:"nın",editCharacter:"Karakteri Düzenle",Pele:"Ten Rengi",Olhos:"Göz",Cabelo:"Saç",Roupa:"Giysi","Tênis":"Spor Ayakkabısı","Óculos":"Gözlük",Acessorios:"Aksesuarlar",continue:"DEVAM ET",birthdayOf:"",stepBack:"Geri",stepPreview:"4 - Önizleme",close:"Kapat",chooseLater:"Sonra seç",fantasy:"Kostüm",bookLanguage:"Dil",nameModalParagraph:"Daha iyi bir kişiselleştirme için yalnızca adı kullanın.",fantasyDescription:"Kostüm açıklaması",fantasySave:"Hazır, hikayeyi kaydet",Chuteira:"Krampon",month1:"Ocak",month2:"Şubat",month3:"Mart",month4:"Nisan",month5:"Mayıs",month6:"Haziran",month7:"Temmuz",month8:"Ağustos",month9:"Eylül",month10:"Ekim",month11:"Kasım",month12:"Aralık"},el:{urlBuilder:"https://builder.dentrodahistoria.com.br",justASecond:"Μια στιγμή",loadingPhrase:"Φορτώνουμε το προσωποποιημένο βιβλίο σας",pages:"ΣΕΛΙΔΕΣ",pagesLowercase:"Σελίδες",editArea:"Edit area",name:"Όνομα",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:"ΕΝΗΜΕΡΩΣΗ",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:"Κορίτσι",genderMale:"Αγόρι",or:"ή",do:"of",da:"of",editCharacter:"Edit the character",Pele:"Δέρμα",Olhos:"Μάτια",Cabelo:"Μαλλιά",Roupa:"Ρούχα","Tênis":"Sneakers","Óculos":"Glasses",Acessorios:"Accessories",continue:"ΣΥΝΕΧΕΙΑ",birthdayOf:"",stepBack:"Πίσω",stepPreview:"4 - Preview",close:"Κλείσιμο",chooseLater:"Choose later",fantasy:"Costume",bookLanguage:"Language",nameModalParagraph:"For a better personalization, use only the first name.",fantasyDescription:"Costume description",fantasySave:"Ready, save story",Chuteira:"Cleats",month1:"Ιανουάριος",month2:"Φεβρουάριος",month3:"Μάρτιος",month4:"Απρίλιος",month5:"Μάιος",month6:"Ιούνιος",month7:"Ιούλιος",month8:"Αύγουστος",month9:"Σεπτέμβριος",month10:"Οκτώβριος",month11:"Νοέμβριος",month12:"Δεκέμβριος",chooseGender:"Επιλέξτε φύλο"}},w=_&&_.default&&"object"===b(_.default)?_.default:_,k=["pt-BR","pt-PT","en","es","fr","ar","th","el"],C=["ar"],P={pt:"pt-BR","pt-br":"pt-BR","pt-pt":"pt-PT"},M={"pt-BR":"pt","pt-PT":"pt-PT",pt:"pt",en:"en",es:"es",fr:"fr",ar:"ar",th:"th",el:"el",tr:"tr"};function x(e,t){if(t)return t;var a=z(e);return M[a]||a.split("-")[0].toLowerCase()}function z(e){if(!e)return"pt-BR";var t=String(e).trim(),a=t.toLowerCase();if(P[a])return P[a];if(w[t])return t;var o=k.find((function(e){return e.toLowerCase()===a}));return o||(w[a]?a:w.pt?"pt":w["pt-BR"]?"pt-BR":"pt")}function S(e){var t=z(e);return w[t]||w["pt-BR"]||w.pt||w["pt-BR"]||w.en||Object.values(w).find((function(e){return e&&"object"===b(e)}))||{}}/** typeLanguage + override manual → 'ltr' | 'rtl' (manual vence; senão deriva do locale) */function L(e,t){return"ltr"===t||"rtl"===t?t:function(e){return C.includes(z(e))}(e)?"rtl":"ltr"}function B(e){if(!e&&0!==e)return null;var t,a=String(e).trim(),o=function(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=y(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,s=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){s=!0,r=e},f:function(){try{n||null==a.return||a.return()}finally{if(s)throw r}}}}(Object.values(w).filter((function(e){return e&&"object"===b(e)})));try{for(o.s();!(t=o.n()).done;)for(var i=t.value,r=1;r<=12;r+=1)if(i["month".concat(r)]===a)return r}catch(e){o.e(e)}finally{o.f()}var n=parseInt(a,10);return n>=1&&n<=12?n:null}function T(e,t,a){var o=z(a),i="number"==typeof t?t:B(t),r=i?function(e,t){return S(t)["month".concat(e)]||""}(i,a):t;if("en"===o)return"".concat(r," ").concat(e);var n=S(a).birthdayOf;return n?"".concat(e," ").concat(n," ").concat(r):"".concat(e," ").concat(r)}function A(e){if(!e)return null;var t=String(e).trim().replace(/\s+/g," "),a=t.match(/^(\d{1,2})\s+de\s+(.+)$/i);if(a)return{day:parseInt(a[1],10),monthName:a[2].trim()};var o=t.match(/^(.+?)\s+(\d{1,2})$/);if(o){var i=B(o[1].trim());if(i)return{day:parseInt(o[2],10),monthKey:i}}var r=t.match(/^(\d{1,2})\s+(.+)$/);if(r){var n=B(r[2].trim());return n?{day:parseInt(r[1],10),monthKey:n}:{day:parseInt(r[1],10),monthName:r[2].trim()}}return null}function q(e){var t=e.properties,a=e.typeLanguage,o=e.custom_numero,i=e.custom_mes,r={selectedBirthDay:null,selectedBirthMonth:null};if(!t)return r;if(t.numero&&t.mes){r.selectedBirthDay=t.numero.value;var n=B(t.mes.value);return n&&(r.selectedBirthMonth=n),t.birthday={code:"birthday",value:T(r.selectedBirthDay,n||t.mes.value,a)},delete t.numero,delete t.mes,r}if(t.birthday&&t.birthday.value){var s=A(t.birthday.value);if(s){r.selectedBirthDay=s.day;var d=s.monthKey||B(s.monthName);d&&(r.selectedBirthMonth=d),t.birthday.value=T(s.day,d||s.monthName,a)}return r}if(o&&i){r.selectedBirthDay=o;var l=B(i);l&&(r.selectedBirthMonth=l),t.birthday={code:"birthday",value:T(o,l||i,a)}}return r}
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ var e,t,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.toS
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
function
|
|
21
|
+
function D(e,t,a,o,i,r/* server only */,n,s,d,l){"boolean"!=typeof n&&(d=s,s=n,n=!1);
|
|
22
22
|
// Vue.extend constructor export interop.
|
|
23
23
|
const c="function"==typeof a?a.options:a;
|
|
24
24
|
// render functions
|
|
@@ -45,7 +45,7 @@ c._ssrRegister=u):t&&(u=n?function(e){t.call(this,l(e,this.$root.$options.shadow
|
|
|
45
45
|
// register for functional component in vue file
|
|
46
46
|
const e=c.render;c.render=function(t,a){return u.call(a),e(t,a)}}else{
|
|
47
47
|
// inject component registration as beforeCreate hook
|
|
48
|
-
const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,u):[u]}return a}var
|
|
48
|
+
const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,u):[u]}return a}var N=D({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.kind,e._g(e._b({tag:"component",class:["heading","size-"+e.size],style:[{color:e.color}]},"component",e.$attrs,!1),e.$listeners),[e._t("default")],2)},staticRenderFns:[]},void 0,{name:"Heading",props:{
|
|
49
49
|
/**
|
|
50
50
|
* Tipo de elemento.<br>
|
|
51
51
|
* Values: `h1` `h2` `h3` `h4` `h5`
|
|
@@ -65,7 +65,7 @@ value:{type:String},
|
|
|
65
65
|
* HEX de cor<br>
|
|
66
66
|
* Example: `#68596E`
|
|
67
67
|
**/
|
|
68
|
-
color:{type:String,default:"#68596E"}},data:function(){return{}}},"data-v-54e71616",!1,void 0,!1,void 0,void 0,void 0),
|
|
68
|
+
color:{type:String,default:"#68596E"}},data:function(){return{}}},"data-v-54e71616",!1,void 0,!1,void 0,void 0,void 0),E=D({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("p",e._g(e._b({class:["paragraph","size-"+e.size,"type-"+e.type],style:[{color:e.color}]},"p",e.$attrs,!1),e.$listeners),[e._t("default")],2)},staticRenderFns:[]},void 0,{name:"Paragraph",props:{
|
|
69
69
|
/**
|
|
70
70
|
* Tamanho do texto.<br>
|
|
71
71
|
* Values: `lg` `sm`
|
|
@@ -85,7 +85,7 @@ color:{type:String,default:"#68596E"},
|
|
|
85
85
|
* Type of font<br>
|
|
86
86
|
* Example: `Regular | Bold`
|
|
87
87
|
**/
|
|
88
|
-
type:{type:String,default:"regular"}},data:function(){return{}}},"data-v-565cf105",!1,void 0,!1,void 0,void 0,void 0),D
|
|
88
|
+
type:{type:String,default:"regular"}},data:function(){return{}}},"data-v-565cf105",!1,void 0,!1,void 0,void 0,void 0),F=D({render:function(){var e=this.$createElement;return(this._self._c||e)("i",{class:["icon","icon-"+this.name,"size-"+this.size],style:this.fill?{color:this.fill}:null})},staticRenderFns:[]},void 0,{name:"Icon",props:{name:{type:String},size:{type:String,default:"lg"},stroke:{type:String,default:"transparent"},fill:{type:String}}},"data-v-178d930e",!1,void 0,!1,void 0,void 0,void 0),O=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("button",e._g(e._b({class:["btn-"+e.kind,"size-"+e.size,"width-"+e.width,{"is-inverted":e.inverted},{"is-disabled":e.disabled},{"is-loading":e.isLoading},{"is-loading-progressive":e.isLoading&&"progressive"===e.loadingType},{"is-loading-progressive-complete":e.isLoadingCompleted&&"progressive"===e.loadingType},e.icon?"icons-"+e.icon:""],style:e.shadowVar,attrs:{dir:e.resolvedDirection,disabled:e.disabled}},"button",e.$attrs,!1),e.$listeners),["circle"===e.width&&e.icon?a("span",{staticClass:"icons-wrap"},[a("Icon",{attrs:{name:e.icon,fill:"#fff",stroke:"transparent"}})],1):e.isLoading&&!1===e.isLoadingCompleteCheck&&"progressive"===e.loadingType?a("span",{staticClass:"text"},[e._v(e._s(e.loadingText))]):e.isLoadingCompleteCheck&&"progressive"===e.loadingType?a("span",{staticClass:"icons-complete"},[a("Icon",{attrs:{name:"check",fill:"#fff",stroke:"transparent"}})],1):e.isLoading&&"progressive"===e.loadingType?a("span",{staticClass:"loading-progress"}):e.isLoading&&"spinner"===e.loadingType?a("span",{staticClass:"loading"},[a("Loading")],1):a("div",{staticClass:"slot-content",class:e.isLoading?"text-slot":""},[e._t("default")],2)])},staticRenderFns:[]},void 0,{name:"Button",components:{Loading:D({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"loader"},[t("svg",{staticClass:"spinner"},[t("circle",{staticClass:"path",attrs:{cx:"16",cy:"16",r:"13",fill:"none","stroke-width":"5"}})])])},staticRenderFns:[]},void 0,{name:"Loading",props:{}},"data-v-3cc3a3e2",!1,void 0,!1,void 0,void 0,void 0),Icon:F},props:{
|
|
89
89
|
/**
|
|
90
90
|
* Tipo do botão<br>
|
|
91
91
|
* Values: `primary` `secondary` `ghost`
|
|
@@ -145,7 +145,15 @@ loadingProgress:{type:Number,required:!1},
|
|
|
145
145
|
* Loading
|
|
146
146
|
* Example: percent number '98'
|
|
147
147
|
*/
|
|
148
|
-
isLoadingCompleted:{type:Boolean,required:!1}
|
|
148
|
+
isLoadingCompleted:{type:Boolean,required:!1},
|
|
149
|
+
/**
|
|
150
|
+
* Locale da UI (pt-BR, ar…). A direção é derivada dele.
|
|
151
|
+
*/
|
|
152
|
+
typeLanguage:{type:String,required:!1,default:"pt-BR"},
|
|
153
|
+
/**
|
|
154
|
+
* Override manual da direção ('ltr' | 'rtl'). Vazio = deriva do typeLanguage.
|
|
155
|
+
*/
|
|
156
|
+
direction:{type:String,required:!1,default:""}},watch:{isLoadingCompleted:{// the callback will be called immediately after the start of the observation
|
|
149
157
|
immediate:!0,handler:function(e,t){var a=this;!0===e?setTimeout((function(){a.isLoadingCompleteCheck=!0}),3e3):a.isLoadingCompleteCheck=!1;// if(this.initialValue === ''){
|
|
150
158
|
// this.initialValue = val
|
|
151
159
|
// }
|
|
@@ -156,7 +164,7 @@ immediate:!0,handler:function(e,t){var a=this;!0===e?setTimeout((function(){a.is
|
|
|
156
164
|
* FUNÇÃO LEGADO - Funções do botão são passados através de listeners
|
|
157
165
|
*/
|
|
158
166
|
// this.$emit('click');
|
|
159
|
-
},complete:function(){this.$emit("complete")}},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}}},"data-v-
|
|
167
|
+
},complete:function(){this.$emit("complete")}},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}},resolvedDirection:function(){return L(this.typeLanguage,this.direction)}}},"data-v-7867a0fa",!1,void 0,!1,void 0,void 0,void 0),R=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("transition",e._g(e._b({attrs:{name:"modal"}},"transition",e.$attrs,!1),e.$listeners),[a("div",{staticClass:"modal-container",class:["size-"+e.size,e.dir],attrs:{dir:e.dir}},[a("div",{staticClass:"modal"},[a("div",{staticClass:"modal-dialog",class:e.bottomFixed?"":"modal-with-scroll"},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header-items",class:e.divider?"divider":""},[a("div",{staticClass:"modal-header-close"},[a("div",{staticClass:"header-close"},[e.haveClose?a("span",{staticClass:"icon close-icon",on:{click:e.closeModal}},[a("Icon",{attrs:{name:"close",size:"md",fill:"#DFDAE4",stroke:"transparent"}})],1):e._e()])]),e._v(" "),a("div",{staticClass:"modal-header-content"},[a("Heading",{attrs:{kind:"h4",size:e.headingSize,color:e.headingColor}},[e._v(e._s(e.heading))]),e._v(" "),e.paragraph?a("Paragraph",{attrs:{size:e.paragraphSize,color:"'#ccc'"},domProps:{innerHTML:e._s(e.paragraph)}}):e._e()],1),e._v(" "),e._t("header")],2),e._v(" "),a("div",{staticClass:"modal-body"},[e._t("default")],2),e._v(" "),a("div",{staticClass:"modal-footer-items",class:e.bottomFixed?"":"modal-footer-relative"},[e._t("footer")],2)])])]),e._v(" "),a("div",{staticClass:"modal-backdrop",on:{click:e.closeModal}})])])},staticRenderFns:[]},void 0,{name:"Modal",components:{Button:O,Heading:N,Paragraph:E,Icon:F},props:{kind:{type:String,default:"primary"},size:{type:String,default:"lg"},heading:{type:String,required:!0},headingSize:{type:String,default:"sm"},headingColor:{type:String,default:"#68596E"},divider:{type:Boolean,required:!1},paragraph:{type:String},paragraphSize:{type:String,default:"lg"},haveClose:{type:Boolean,default:!0},bottomFixed:{type:Boolean,default:!0},dir:{type:String,default:"ltr",required:!1}},created:function(){document.getElementsByTagName("html")[0].style.overflow="hidden",document.getElementsByTagName("body")[0].style.overflow="hidden",document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&(document.getElementsByClassName("boxes")[0].style.overflow="hidden")},beforeCreate:function(){document.getElementsByTagName("html")[0].style.overflow="hidden",document.getElementsByTagName("body")[0].style.overflow="hidden",document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&(document.getElementsByClassName("boxes")[0].style.overflow="hidden")},mounted:function(){document.getElementsByTagName("html")[0].style.overflow="hidden",document.getElementsByTagName("body")[0].style.overflow="hidden",document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&(document.getElementsByClassName("boxes")[0].style.overflow="hidden")},destroy:function(){document.getElementsByTagName("html")[0].removeAttribute("style"),document.getElementsByTagName("body")[0].removeAttribute("style"),document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&document.getElementsByClassName("boxes")[0].removeAttribute("style")},beforeDestroy:function(){document.getElementsByTagName("html")[0].removeAttribute("style"),document.getElementsByTagName("body")[0].removeAttribute("style"),document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&document.getElementsByClassName("boxes")[0].removeAttribute("style")},methods:{onClick:function(){this.$emit("click")},closeModal:function(){this.$emit("closeModal"),document.getElementsByTagName("html")[0].removeAttribute("style"),document.getElementsByTagName("body")[0].removeAttribute("style"),document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&document.getElementsByClassName("boxes")[0].removeAttribute("style")}},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}}},"data-v-0ff85568",!1,void 0,!1,void 0,void 0,void 0),I=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"input-group",class:[{"error-active":e.error,"is-disabled":e.disabled},"size-"+e.size,e.resolvedDirection],attrs:{dir:e.resolvedDirection}},[e.label?a("label",{staticClass:"label",style:{color:e.labelColor},domProps:{innerHTML:e._s(e.label)}}):e._e(),e._v(" "),a("div",{staticClass:"input-area"},["cpf"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:"###.###.###-##",expression:"'###.###.###-##'"}],ref:"cpf",staticClass:"input",attrs:{inputmode:"numeric",type:"text",name:e.name,placeholder:"___-___-___-__",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChangeCpf}},"input",e.$attrs,!1),e.$listeners)):"cnpj"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:"##.###.###/####-##",expression:"'##.###.###/####-##'"}],ref:"cnpj",staticClass:"input",attrs:{inputmode:"numeric",type:"text",name:e.name,placeholder:"00-000-00/0000-00",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChangeCnpj}},"input",e.$attrs,!1),e.$listeners)):"cpf-cnpj"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:["###.###.###-##","##.###.###/####-##"],expression:"['###.###.###-##', '##.###.###/####-##']"}],ref:"cpf-cnpj",staticClass:"input",attrs:{inputmode:"numeric",type:"text",name:e.name,placeholder:"000-000-000-0",disabled:e.disabled},domProps:{value:e.value},on:{input:function(t){return e.condCpfCnpj(t)}}},"input",e.$attrs,!1),e.$listeners)):"phone"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:["(##) #####-####","(##) ####-####"],expression:"['(##) #####-####', '(##) ####-####']"}],staticClass:"input",attrs:{inputmode:"numeric",name:e.name,type:"text",placeholder:"(__) ____-____",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChange}},"input",e.$attrs,!1),e.$listeners)):"address"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:"#####-###",expression:"'#####-###'"}],staticClass:"input",attrs:{inputmode:"numeric",name:e.name,type:"text",placeholder:"____-___",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChangeAddress}},"input",e.$attrs,!1),e.$listeners)):"cc-number"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:e.card.mask,expression:"card.mask"}],staticClass:"input",attrs:{inputmode:"numeric",name:e.name,type:"text",placeholder:"•••• •••• •••• ••••",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChangeCardNumber}},"input",e.$attrs,!1),e.$listeners)):"cc-cvv"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:"####",expression:"'####'"}],staticClass:"input",attrs:{inputmode:"numeric",name:e.name,type:"text",placeholder:"CVV",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChange}},"input",e.$attrs,!1),e.$listeners)):"cc-expiration"===e.type?a("input",e._g(e._b({directives:[{name:"mask",rawName:"v-mask",value:"##/##",expression:"'##/##'"}],staticClass:"input",attrs:{inputmode:"numeric",name:e.name,type:"text",placeholder:"MM/AA",disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChangeCardExpiration}},"input",e.$attrs,!1),e.$listeners)):a("input",e._g(e._b({staticClass:"input",attrs:{type:e.type,inputmode:e.numeric?"numeric":"text",name:e.name,placeholder:e.placeholder,disabled:e.disabled},domProps:{value:e.value},on:{input:e.onChange}},"input",e.$attrs,!1),e.$listeners)),e._v(" "),e.link?a("div",{staticClass:"link"},[a("div",{on:{click:e.routeToLink}},[e._v("\n\t\t\t\t"+e._s(e.linkLabel)+"\n\t\t\t")])]):e._e()]),e._v(" "),e.helper||e.error&&e.error.length>0?a("span",{staticClass:"helper",style:{color:e.helperColor},domProps:{innerHTML:e._s(e.error&&!e.disabled?e.error:e.helper)}}):e._e(),e._v(" "),e.validationCheck?a("div",{staticClass:"validation",class:e.validationCheckValue?"active":"inactive"},[e.error&&e.error.length>1?a("svg",{staticClass:"close",attrs:{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M24.48 6.7a1.77 1.77 0 00-2.506-.001L16 12.66l-5.974-5.975a1.77 1.77 0 00-2.506 0 1.77 1.77 0 000 2.507l5.974 5.974L7.52 21.14a1.77 1.77 0 000 2.506 1.77 1.77 0 002.506 0L16 17.673l5.974 5.974a1.77 1.77 0 002.506 0 1.77 1.77 0 000-2.506l-5.974-5.974 5.974-5.974c.68-.68.68-1.814 0-2.494z"}})]):a("svg",{staticClass:"check",attrs:{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M7.845 16.462L12 20.617 24.702 7.93c.78-.78 2.042-.78 2.823 0 .78.78.78 2.042 0 2.822L13.418 24.858c-.78.78-2.042.78-2.823 0l-5.573-5.573a1.994 1.994 0 010-2.823c.78-.78 2.042-.78 2.823 0z"}})])]):e._e()])},staticRenderFns:[]},void 0,{name:"Input",directives:{mask:a},components:{Icon:F,Button:O},props:{
|
|
160
168
|
/**
|
|
161
169
|
* Nome do campo, utilizado no callback do evento<br>
|
|
162
170
|
* Example: `Name`
|
|
@@ -236,7 +244,12 @@ link:{type:String,required:!1},
|
|
|
236
244
|
* Existe campo de validação<br>
|
|
237
245
|
* Values: `lg` `sm`
|
|
238
246
|
*/
|
|
239
|
-
linkLabel:{type:String,required:!1},direction:{type:String,default:"
|
|
247
|
+
linkLabel:{type:String,required:!1},direction:{type:String,default:"",required:!1},
|
|
248
|
+
/**
|
|
249
|
+
* Locale da UI (pt-BR, ar…). A direção é derivada dele (ar → rtl).<br>
|
|
250
|
+
* Use `direction` apenas para forçar manualmente.
|
|
251
|
+
*/
|
|
252
|
+
typeLanguage:{type:String,default:"pt-BR",required:!1}},computed:{resolvedDirection:function(){return L(this.typeLanguage,this.direction)}},data:function(){return{isCallingOne:!1,isCallingAll:!1,condCpfCnpn:this.onChangeCpf,cpf:{numero:"",cpfLengthUnmasked:11,cpfLengthMasked:14},card:{mask:"#### #### #### ####",length:17,flag:"",error:""}}},methods:{onChangeCardNumber:function(e){e.e;var a=e.target;if(a.value.length>=3){t.number(a.value).card?("american-express"===t.number(a.value).card.type||"diners-club"===t.number(a.value).card.type?(this.card.mask="#### ###### #####",this.card.length=17):(this.card.mask="#### #### #### ####",this.card.length=19),this.card.flag=t.number(a.value).card.type):this.card.flag="",a.value.length>=this.card.length&&(t.number(a.value).isValid?this.card.error="":this.card.error="Número incorreto");var o={target:a.name,value:a.value,flag:this.card.flag,error:this.card.error};this.$emit("update",o)}else{this.card.flag="",this.card.error="";var i={target:a.name,value:a.value,flag:""};this.$emit("update",i)}},onChangeCardExpiration:function(e){e.e;var a,o=e.target;if(5===o.value.length){a=t.expirationDate(o.value).isValid?"":"Data de validade inválida";var i={target:o.name,value:o.value,error:a};this.$emit("update",i)}else{a="";var r={target:o.name,value:o.value};this.$emit("update",r)}},condCpfCnpj:function(e){e.target.value.length<=14?this.onChangeCpf(e,e.target):this.onChangeCnpj(e,e.target)},onChangeCnpj:function(e){e.e;var t,a=e.target,o=a.value.replace(/[^\d]+/g,"");if(o.length>=13)if(""==o)t={target:a.name,value:a.value,error:"CNPJ inválido"};else if("00000000000000"==o||// Elimina CNPJs invalidos conhecidos
|
|
240
253
|
"11111111111111"==o||"22222222222222"==o||"33333333333333"==o||"44444444444444"==o||"55555555555555"==o||"66666666666666"==o||"77777777777777"==o||"88888888888888"==o||"99999999999999"==o)t={target:a.name,value:a.value,error:"CNPJ inválido"};else{for(// Valida DVs
|
|
241
254
|
var i=o.length-2,r=o.substring(0,i),n=o.substring(i),s=0,d=i-7,l=i;l>=1;l--)s+=r.charAt(i-l)*d--,d<2&&(d=9);var c=s%11<2?0:11-s%11;if(c!=n.charAt(0))t={target:a.name,value:a.value,error:"CNPJ inválido"};else{i+=1,r=o.substring(0,i),s=0,d=i-7;for(var u=i;u>=1;u--)s+=r.charAt(i-u)*d--,d<2&&(d=9);t=(c=s%11<2?0:11-s%11)!=n.charAt(1)?{target:a.name,value:a.value,error:"CNPJ inválido"}:{target:a.name,value:a.value,error:""}}}else t={target:a.name,value:a.value,error:""};this.$emit("update",t)},onChangeCpf:function(e){e.e;var t,a=e.target,o=a.value.replace(/[^0-9]/g,"");if(o.length===this.cpf.cpfLengthUnmasked){var i,r,n;n="",i=0,"00000000000"!==o&&"11111111111"!==o&&"22222222222"!==o&&"33333333333"!==o&&"44444444444"!==o&&"55555555555"!==o&&"66666666666"!==o&&"77777777777"!==o&&"88888888888"!==o&&"99999999999"!==o||(n="CPF Inválido");for(var s=1;s<=9;s++)i+=parseInt(o.substring(s-1,s))*(11-s);10!==(r=10*i%11)&&11!==r||(r=0),r!==parseInt(o.substring(9,10))&&(n="CPF Inválido"),i=0;for(var d=1;d<=10;d++)i+=parseInt(o.substring(d-1,d))*(12-d);10!==(r=10*i%11)&&11!==r||(r=0),r!==parseInt(o.substring(10,11))&&(n="CPF Inválido"),t={target:a.name,value:a.value,error:n}}else t={target:a.name,value:a.value,error:""};
|
|
242
255
|
/**
|
|
@@ -252,7 +265,7 @@ t.$emit("update",n);case 4:return a.a(2)}}),a)})))()},onChange:function(e){e.e;v
|
|
|
252
265
|
* Evento disparado sempre que o valor do campo for alterado.<br>
|
|
253
266
|
* Retorna um objeto com target (name do campo) e value.
|
|
254
267
|
*/
|
|
255
|
-
this.$emit("update",a)},routeToLink:function(){window.open(this.link,"_blank")}}},"data-v-
|
|
268
|
+
this.$emit("update",a)},routeToLink:function(){window.open(this.link,"_blank")}}},"data-v-15d93e9c",!1,void 0,!1,void 0,void 0,void 0),$=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"textarea-group",class:{"error-active":e.error,"is-disabled":e.disabled}},"div",e.$attrs,!1),e.$listeners),[e.label?a("label",{staticClass:"label",style:{color:e.labelColor},domProps:{innerHTML:e._s(e.label)}}):e._e(),e._v(" "),a("textarea",{staticClass:"textarea",attrs:{placeholder:e.placeholder,name:e.name,disabled:e.disabled,maxlength:e.maxlength},domProps:{value:e.value},on:{input:e.onInput}}),e._v(" "),a("div",{staticClass:"helper-group"},[e.error&&e.error.length>0?a("span",{staticClass:"helper",domProps:{innerHTML:e._s(e.error&&!e.disabled?e.error:null)}}):e._e(),e._v(" "),e.counter?a("span",{staticClass:"counter",style:{color:e.counterColor}},[e._v("Caracteres: "+e._s(e.value.length)+"/"+e._s(e.maxlength))]):e._e()])])},staticRenderFns:[]},void 0,{name:"TextArea",props:{
|
|
256
269
|
/**
|
|
257
270
|
* Nome do campo, utilizado no callback do evento<br>
|
|
258
271
|
* Example: `Name`
|
|
@@ -307,7 +320,7 @@ counterColor:{type:String,default:"#68596E"}},methods:{onInput:function(e){e.e;v
|
|
|
307
320
|
* Evento disparado sempre que o valor do campo for alterado.<br>
|
|
308
321
|
* Retorna um objeto com target (name do campo) e value.
|
|
309
322
|
*/
|
|
310
|
-
this.$emit("update",a)}}},"data-v-2ae8268a",!1,void 0,!1,void 0,void 0,void 0),
|
|
323
|
+
this.$emit("update",a)}}},"data-v-2ae8268a",!1,void 0,!1,void 0,void 0,void 0),j=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"select-group",class:[{"error-active":e.error,"is-disabled":e.disabled},e.selected?"is-selected":"is-not-selected"]},"div",e.$attrs,!1),e.$listeners),[e.label?a("label",{staticClass:"label",style:{color:e.labelColor},domProps:{innerHTML:e._s(e.label)}}):e._e(),e._v(" "),a("select",{staticClass:"select",attrs:{name:e.name,disabled:e.disabled},on:{change:e.onChange}},[e.placeholder?a("option",{key:"0",attrs:{disabled:"disabled"},domProps:{selected:!e.selected}},[e._v("\n\t\t\t"+e._s(e.placeholder)+"\n\t\t")]):e._e(),e._v(" "),e._l(e.options,(function(t,o){return a("option",{key:o+1,attrs:{title:t.key},domProps:{selected:!(!e.selected||t.key.toString()!==e.selected.toString())}},[e._v("\n\t\t\t"+e._s(t.value)+"\n\t\t")])}))],2),e._v(" "),e.helper||e.error?a("span",{staticClass:"helper",style:{color:e.helperColor},domProps:{innerHTML:e._s(e.error&&!e.disabled?e.error:e.helper)}}):e._e(),e._v(" "),e.validationCheck?a("div",{staticClass:"validation",class:e.validationCheckValue?"active":"inactive"},[e.error&&e.error.length>1?a("svg",{staticClass:"close",attrs:{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M24.48 6.7a1.77 1.77 0 00-2.506-.001L16 12.66l-5.974-5.975a1.77 1.77 0 00-2.506 0 1.77 1.77 0 000 2.507l5.974 5.974L7.52 21.14a1.77 1.77 0 000 2.506 1.77 1.77 0 002.506 0L16 17.673l5.974 5.974a1.77 1.77 0 002.506 0 1.77 1.77 0 000-2.506l-5.974-5.974 5.974-5.974c.68-.68.68-1.814 0-2.494z"}})]):a("svg",{staticClass:"check",attrs:{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M7.845 16.462L12 20.617 24.702 7.93c.78-.78 2.042-.78 2.823 0 .78.78.78 2.042 0 2.822L13.418 24.858c-.78.78-2.042.78-2.823 0l-5.573-5.573a1.994 1.994 0 010-2.823c.78-.78 2.042-.78 2.823 0z"}})])]):e._e()])},staticRenderFns:[]},void 0,{name:"Select",components:{Icon:F},props:{
|
|
311
324
|
/**
|
|
312
325
|
* Nome do campo, utilizado no callback do evento<br>
|
|
313
326
|
* Example: `Name`
|
|
@@ -372,7 +385,7 @@ validationCheckValue:{type:Boolean,required:!1,default:!1}},data:function(){retu
|
|
|
372
385
|
* Evento disparado sempre que o valor for alterado.<br>
|
|
373
386
|
* Retorna um objeto com target (name do campo), key ativo e value ativo.
|
|
374
387
|
*/
|
|
375
|
-
this.$emit("update",a)}}},"data-v-2601271e",!1,void 0,!1,void 0,void 0,void 0),$=require("axios"),j=A({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main-tool",class:[e.sidebarOpen?"active":"inactive",!e.isMobile&&e.toolbarAnimate?"shake":"stop-shake","rtl"===e.dir?"is-rtl":""],style:e.colorsVar,attrs:{dir:e.dir}},[e.isMobile?e._e():a("div",{staticClass:"backdrop",on:{click:function(t){"active"==e.sidebarOpen&&e.toggleSidebar()}}}),e._v(" "),a("div",{staticClass:"custom-properties",class:[e.sidebarOpen?"active":"inactive"],style:e.colorsVar,attrs:{dir:e.dir}},[a("div",{staticClass:"box-close",on:{click:function(t){return e.toggleSidebar()}}},[a("span",{staticClass:"icon icons-close size-lg"},[e.preview_color?a("Icon",{attrs:{name:"close",fill:e.preview_color,stroke:e.preview_color,size:"md"}}):e._e()],1),e._v(" "),a("span",{staticClass:"icon icon-edit-menu size-lg"},[a("Icon",{attrs:{name:"edit",fill:"#fff",size:"md",stroke:"transparent"}})],1)]),e._v(" "),a("div",{staticClass:"list-properties"},[a("div",{staticClass:"title-custom-properties"},[a("Heading",{attrs:{kind:"h4",size:e.isMobile?"xs":"sm",color:"#68596E"}},[e._v(e._s(e.lang.editArea))])],1),e._v(" "),a("HR",{attrs:{height:"1px",color:e.preview_color}}),e._v(" "),e.properties?a("div",{staticClass:"itens-properties"},e._l(e.properties,(function(t,o){return a("div",{key:o,staticClass:"item",on:{click:function(a){return e.showModal(t)}}},[a("div",{staticClass:"text-list"},["nome"==t.code||24==t.property_id?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.name))]):e._e(),e._v(" "),"dedicatoria"==t.code||26==t.property_id?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.dedication))]):e._e(),e._v(" "),"nome-do-mooner"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.moonerLabelSidebar))]):e._e(),e._v(" "),"nome-pet"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.pet))]):e._e(),e._v(" "),"numero"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.birthday_label)+" - "+e._s(t.code))]):e._e(),e._v(" "),"birthday"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.birthday_label))]):e._e(),e._v(" "),"fantasy"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.fantasy))]):e._e(),e._v(" "),"languages"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.bookLanguage))]):e._e(),e._v(" "),"layouts"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.bookScript))]):e._e(),e._v(" "),"nome"==t.code||24==t.property_id?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"dedicatoria"==t.code||26==t.property_id?a("Paragraph",{staticClass:"dedication-text tool-value",attrs:{size:"sm"}},[e._v("\n "+e._s(e.dedicationFirstEdit?e.lang.writeDedication:e.current_dedication_text)+"\n ")]):e._e(),e._v(" "),"nome-do-mooner"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"nome-pet"==t.code?a("Paragraph",{attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"birthday"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(e.birthdaySidebarLabel(t)))]):e._e(),e._v(" "),"fantasy"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"languages"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"layouts"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e()],1),e._v(" "),a("Icon",{attrs:{name:"edit",size:"md",fill:e.preview_color,stroke:"transparent"}})],1)})),0):e._e(),e._v(" "),e.isMobile?a("Button",{staticClass:"continue-mobile-tools",attrs:{kind:"primary",size:"md",icon:"right",width:"fluid"},on:{click:e.clickContinue}},[a("Icon",{attrs:{name:"chevron-right",size:"md",stroke:"transparent"}}),e._v(" "),a("span",[e._v(e._s(e.lang.continue))])],1):e._e()],1)]),e._v(" "),e.modalName?a("Modal",{attrs:{heading:e.lang.kidName,headingColor:e.preview_color,paragraph:e.lang.nameModalParagraph,size:"md",bottomFixed:!1},on:{closeModal:e.closeModal}},[a("Input",{attrs:{type:"text",numeric:!1,name:"name",label:e.lang.kidName,placeholder:"",helper:e.lang.reccomendName,value:e.current_character_name,disabled:!1,maxlength:"20"},on:{update:e.updateName}}),e._v(" "),a("div",{staticClass:"name-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.saveName()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),e.isMobile?e._e():a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalDedication?a("Modal",{attrs:{size:"md",heading:e.lang.dedicationFree,headingColor:e.preview_color,paragraph:e.lang.cusutomDedication,bottomFixed:!1},on:{closeModal:e.closeModal}},[a("TextArea",{attrs:{name:"dedication",value:e.current_dedication_text,label:e.lang.messageDedication,placeholder:e.lang.dedcationPlaceholder,maxlength:400,counter:!0,disabled:!1},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:void t.preventDefault()},update:e.updateDedicationText}}),e._v(" "),a("div",{staticClass:"dedication-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.saveDedication()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),e.isMobile?e._e():a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalShirtNumber?a("Modal",{attrs:{heading:e.lang.editShirt},on:{closeModal:e.closeModal}},[a("Input",{attrs:{type:"text",numeric:!1,name:"number",label:e.lang.shirtNumber,placeholder:"",helper:e.lang.reccomendName,value:e.currentShirtNumber,disabled:!1},on:{change:e.updateShirtNumber}}),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalLayout?a("Modal",{attrs:{heading:e.lang.chooseScript,paragraph:e.lang.choosePetLabel1+" <b>"+e.current_character_name+"</b> "+e.lang.choosePetLabel1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"layout-boxes"},e._l(e.layouts,(function(t,o){return a("div",{key:o,staticClass:"layout-option",class:e.currentLayout==t?"active":"inactive",on:{click:function(t){return e.setCurrentLayout(o)}}},[a("div",{staticClass:"imagem"},[a("img",{attrs:{width:"100%",src:t.image,alt:""}})]),e._v(" "),a("div",{staticClass:"panel-title"},[a("div",{staticClass:"title"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"flag",class:e.currentLayout==t?"active":"inactive"},[a("Icon",{attrs:{name:"check"}})],1)])])})),0),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalLanguage?a("Modal",{attrs:{heading:e.lang.chooseScript,paragraph:e.lang.choosePetLabel1+" <b>"+e.current_character_name+"</b> "+e.lang.choosePetLabel1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"layout-boxes"},e._l(e.languages,(function(t,o){return a("div",{key:o,staticClass:"layout-option",class:t==e.currentLanguage?"active":"inactive",on:{click:function(t){return e.setCurrentLayout(o)}}},[a("div",{staticClass:"imagem"},[a("img",{attrs:{width:"100%",src:t.Image,alt:""}})]),e._v(" "),a("div",{staticClass:"panel-title"},[a("div",{staticClass:"title"},[e._v(e._s(t.label))]),e._v(" "),a("div",{staticClass:"flag",class:e.currentLanguage==o?"active":"inactive"},[a("Icon",{attrs:{name:"check"}})],1)])])})),0),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalBirthdate?a("Modal",{attrs:{heading:e.lang.editDateBirth,size:"md"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"box-dates-columns"},[e.selectedBirthDay?a("div",{staticClass:"day"},[a("Select",{attrs:{selected:e.selectedBirthDay,name:"day",label:e.lang.day,placeholder:e.lang.day,options:e.days},on:{change:e.onChangeDay}})],1):e._e(),e._v(" "),e.selectedBirthMonth?a("div",{staticClass:"month"},[a("Select",{attrs:{selected:e.selectedBirthMonth,name:"month",label:e.lang.month,placeholder:e.lang.month,options:e.months},on:{change:e.onChangeMonth}})],1):e._e()]),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalPet?a("Modal",{staticClass:"modal-pet",attrs:{heading:e.lang.changePet,headingColor:e.preview_color,paragraph:e.lang.petDescription1+"<span>"+e.current_character_name+"</span> "+e.lang.petDescription2,size:"lg"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"pet-view"},[e.currentPet?a("div",{staticClass:"selected-pet",class:[e.currentPet?"active":"inactive",e.petAnimation?"fade-in-image":"inactive-pet"]},[e.currentPet&&e.currentPet.assets&&e.currentPet.assets.asset?a("div",[e.currentPetColor.assets.asset?a("img",{class:e.petInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentPetColor.assets.asset,width:"100%",alt:""}}):e._e()]):e._e()]):e._e(),e._v(" "),a("div",{staticClass:"pet-selectors",style:e.currentPetColor?"width: 70%;":""},[a("div",{},[a("Input",{attrs:{value:e.searchExtraProperty("nome-pet").value.name,error:"",helper:"",label:e.lang.typePetname,name:"currentPetName"},on:{input:function(t){e.searchExtraProperty("nome-pet").value.name=t.target.value.toUpperCase()}}})],1),e._v(" "),a("label",{staticClass:"pet-label"},[e._v(e._s(e.lang.selectPet))]),e._v(" "),a("div",{staticClass:"pet-combo-list"},[a("div",{staticClass:"full-list",class:[e.currentPet?"active":"inactive"]},[e.listPet?a("div",{staticClass:"pet-list"},e._l(e.listPet.assets.subcategories,(function(t,o){return a("div",{key:o,class:e.currentPet===t?"active":"inactive",on:{click:function(a){return e.setPet(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e(),e._v(" "),e.currentPet?a("div",{staticClass:"colors-list"},e._l(e.currentPet.assets.colors,(function(t,o){return a("div",{key:o,class:e.currentPetColor===t?"active":"inactive",on:{click:function(a){return e.setColor(t)}}},[a("div",{staticClass:"color-selector"},[a("span",{staticClass:"main-color",style:"background-color:"+t.hexa+";"}),e._v(" "),a("span",{staticClass:"auxiliary",style:"background-color:"+t.auxiliary+";"})]),e._v(" "),a("br")])})),0):e._e()])])]),e._v(" "),e.searchExtraProperty("nome-pet").value.newPet?a("div",{staticClass:"pet-avatar",style:e.searchExtraProperty("nome-pet").value.newPet?"width: 30%;":""},[a("img",{attrs:{src:e.searchExtraProperty("nome-pet").value.newPet.assets.asset,alt:""}}),e._v(" "),a("br")]):e._e()]),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeMoonerLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalMooner?a("Modal",{staticClass:"modal-mooner",attrs:{size:"lg",heading:e.currentTitleMooney,paragraph:e.currentParagraphMooney,divider:!0,headingColor:e.preview_color,haveClose:!0,bottomFixed:!1,paragraphSize:e.isMobile?"sm":"lg"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"mooner-view"},[a("div",{staticClass:"mooner-selectors",style:e.currentMooner?"width: 60%;":""},[a("div",{staticClass:"mooney-align-center"},[a("label",{staticClass:"mooner-label"},[e._v(e._s(e.lang.moonerLabelSelector))]),e._v(" "),a("div",{staticClass:"mooner-combo-list"},[a("div",{staticClass:"full-list",class:e.currentMooner?"active":"inactive"},[e.listMooner?a("div",{staticClass:"mooner-list",class:e.currentComboClassList},e._l(e.listMooner.assets.subcategories,(function(t,o){return a("div",{key:o,class:e.currentMooner===t?"active":"inactive",on:{click:function(a){return e.setMooner(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e(),e._v(" "),e.currentMooner?a("div",{staticClass:"colors-list"},e._l(e.currentMooner.assets.colors,(function(t,o){return a("div",{key:o,class:e.currentMoonerColor===t?"active":"inactive",on:{click:function(a){return e.setColor(t)}}},[a("div",{staticClass:"color-selector"},[a("span",{staticClass:"main-color",style:"background-color:"+t.hexa+";"}),e._v(" "),a("span",{staticClass:"auxiliary",style:"background-color:"+t.auxiliary+";"})]),e._v(" "),a("br")])})),0):e._e()])])])]),e._v(" "),e.currentMooner?a("div",{staticClass:"selected-mooner",class:[e.currentMooner?"active":"inactive",e.moonerAnimation?"fade-in-image":"inactive-pet"]},[e.currentMooner&&e.currentMooner.assets&&e.currentMooner.assets.asset?a("div",[e.currentMooner.assets.asset?a("img",{class:e.moonerInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentMooner.assets.asset,width:"100%",alt:""}}):e._e()]):e._e()]):e._e()]),e._v(" "),a("div",{staticClass:"mooner-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:0==e.currentMoonerName.length,inverted:!1},on:{click:function(t){return e.changeMoonerLayout()}}},[e._v("\n "+e._s(e.isCreated?e.lang.moonerCtaFirstOpen:e.lang.moonerCta)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return t.preventDefault(),e.closeModal(t)}}},[e._v("\n "+e._s(e.isCreated?e.lang.chooseLater:e.lang.close)+"\n ")])],1)]):e._e(),e._v(" "),e.modalFantasy?a("Modal",{staticClass:"modal-fantasy",attrs:{heading:e.lang.fantasy,headingColor:e.preview_color,paragraph:e.lang.fantasyDescription,haveClose:!1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"fantasy-view"},[a("div",{staticClass:"selected-fantasy",class:[e.currentFantasy?"active":"inactive",e.fantasyAnimation?"fade-in-image":"inactive-pet"]},[a("div",{staticClass:"fantasy-items"},[e.currentFantasy&&e.currentFantasy.assets&&e.currentFantasy.assets.asset?a("div",{staticClass:"clip-avatar"},[e.currentFantasy.assets.asset?a("img",{class:e.fantasyInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentFantasy.assets.asset,alt:""}}):e._e()]):e._e(),e._v(" "),a("div",{staticClass:"avatar-fantasy"},e._l(e.avatarFantasy,(function(t,o){return a("div",{key:o,staticClass:"avatar-item"},[a("img",{attrs:{src:t.assets.asset,alt:""}}),e._v(" "),a("br")])})),0)])]),e._v(" "),a("div",[a("div",{staticClass:"pet-selectors",style:e.currentFantasy?"width: 100%;":""},[a("label",{staticClass:"pet-label"},[e._v(e._s(e.lang.fantasy))]),e._v(" "),a("div",{staticClass:"pet-combo-list"},[e.listFantasy?a("div",{staticClass:"pet-list",class:e.currentFantasy?"active":"inactive"},e._l(e.listFantasy,(function(t,o){return a("div",{key:o,class:e.currentFantasy===t?"active":"inactive",on:{click:function(a){return e.setFantasy(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e()])])])]),e._v(" "),a("div",{staticClass:"mooner-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!e.currentFantasy,inverted:!1},on:{click:function(t){return e.changeFantasyLayout()}}},[e._v("\n "+e._s(e.lang.fantasySave)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.chooseLater)+"\n ")])],1)]):e._e()],1)},staticRenderFns:[]},void 0,{name:"PreviewTools",components:{Vue:e,Heading:q,Paragraph:N,Icon:D,Modal:F,Input:O,Button:E,TextArea:R,Select:I},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},dedication_text:{type:String,required:!1,default:""},/** Preview external color. `#000` */preview_color:{type:String,default:"#12d3db",required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},// Idioma do livro (slug API). Opcional: deriva de typeLanguage se omitido.
|
|
388
|
+
this.$emit("update",a)}}},"data-v-2601271e",!1,void 0,!1,void 0,void 0,void 0),U=require("axios"),H=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"main-tool",class:[e.sidebarOpen?"active":"inactive",!e.isMobile&&e.toolbarAnimate?"shake":"stop-shake","rtl"===e.dir?"is-rtl":""],style:e.colorsVar,attrs:{dir:e.dir}},[e.isMobile?e._e():a("div",{staticClass:"backdrop",on:{click:function(t){"active"==e.sidebarOpen&&e.toggleSidebar()}}}),e._v(" "),a("div",{staticClass:"custom-properties",class:[e.sidebarOpen?"active":"inactive"],style:e.colorsVar,attrs:{dir:e.dir}},[a("div",{staticClass:"box-close",on:{click:function(t){return e.toggleSidebar()}}},[a("span",{staticClass:"icon icons-close size-lg"},[e.preview_color?a("Icon",{attrs:{name:"close",fill:e.preview_color,stroke:e.preview_color,size:"md"}}):e._e()],1),e._v(" "),a("span",{staticClass:"icon icon-edit-menu size-lg"},[a("Icon",{attrs:{name:"edit",fill:"#fff",size:"md",stroke:"transparent"}})],1)]),e._v(" "),a("div",{staticClass:"list-properties"},[a("div",{staticClass:"title-custom-properties"},[a("Heading",{attrs:{kind:"h4",size:e.isMobile?"xs":"sm",color:"#68596E"}},[e._v(e._s(e.lang.editArea))])],1),e._v(" "),a("HR",{attrs:{height:"1px",color:e.preview_color}}),e._v(" "),e.properties?a("div",{staticClass:"itens-properties"},e._l(e.properties,(function(t,o){return a("div",{key:o,staticClass:"item",on:{click:function(a){return e.showModal(t)}}},[a("div",{staticClass:"text-list"},["nome"==t.code||24==t.property_id?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.name))]):e._e(),e._v(" "),"dedicatoria"==t.code||26==t.property_id?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.dedication))]):e._e(),e._v(" "),"nome-do-mooner"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.moonerLabelSidebar))]):e._e(),e._v(" "),"nome-pet"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.pet))]):e._e(),e._v(" "),"numero"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.birthday_label)+" - "+e._s(t.code))]):e._e(),e._v(" "),"birthday"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.birthday_label))]):e._e(),e._v(" "),"fantasy"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.fantasy))]):e._e(),e._v(" "),"languages"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.bookLanguage))]):e._e(),e._v(" "),"layouts"==t.code?a("Paragraph",{attrs:{size:"xs",color:"#AFA2BA"}},[e._v(e._s(e.lang.bookScript))]):e._e(),e._v(" "),"nome"==t.code||24==t.property_id?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"dedicatoria"==t.code||26==t.property_id?a("Paragraph",{staticClass:"dedication-text tool-value",attrs:{size:"sm"}},[e._v("\n "+e._s(e.dedicationFirstEdit?e.lang.writeDedication:e.current_dedication_text)+"\n ")]):e._e(),e._v(" "),"nome-do-mooner"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"nome-pet"==t.code?a("Paragraph",{attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"birthday"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(e.birthdaySidebarLabel(t)))]):e._e(),e._v(" "),"fantasy"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"languages"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e(),e._v(" "),"layouts"==t.code?a("Paragraph",{staticClass:"tool-value",attrs:{size:"sm"}},[e._v(e._s(t.value))]):e._e()],1),e._v(" "),a("Icon",{attrs:{name:"edit",size:"md",fill:e.preview_color,stroke:"transparent"}})],1)})),0):e._e(),e._v(" "),e.isMobile?a("Button",{staticClass:"continue-mobile-tools",attrs:{kind:"primary",size:"md",icon:"right",width:"fluid"},on:{click:e.clickContinue}},[a("Icon",{attrs:{name:"chevron-right",size:"md",stroke:"transparent"}}),e._v(" "),a("span",[e._v(e._s(e.lang.continue))])],1):e._e()],1)]),e._v(" "),e.modalName?a("Modal",{attrs:{heading:e.lang.kidName,headingColor:e.preview_color,paragraph:e.lang.nameModalParagraph,size:"md",bottomFixed:!1},on:{closeModal:e.closeModal}},[a("Input",{attrs:{type:"text",numeric:!1,name:"name",label:e.lang.kidName,placeholder:"",helper:e.lang.reccomendName,value:e.current_character_name,disabled:!1,maxlength:"20"},on:{update:e.updateName}}),e._v(" "),a("div",{staticClass:"name-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.saveName()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),e.isMobile?e._e():a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalDedication?a("Modal",{attrs:{size:"md",heading:e.lang.dedicationFree,headingColor:e.preview_color,paragraph:e.lang.cusutomDedication,bottomFixed:!1},on:{closeModal:e.closeModal}},[a("TextArea",{attrs:{name:"dedication",value:e.current_dedication_text,label:e.lang.messageDedication,placeholder:e.lang.dedcationPlaceholder,maxlength:400,counter:!0,disabled:!1},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:void t.preventDefault()},update:e.updateDedicationText}}),e._v(" "),a("div",{staticClass:"dedication-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.saveDedication()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),e.isMobile?e._e():a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalShirtNumber?a("Modal",{attrs:{heading:e.lang.editShirt},on:{closeModal:e.closeModal}},[a("Input",{attrs:{type:"text",numeric:!1,name:"number",label:e.lang.shirtNumber,placeholder:"",helper:e.lang.reccomendName,value:e.currentShirtNumber,disabled:!1},on:{change:e.updateShirtNumber}}),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)],1):e._e(),e._v(" "),e.modalLayout?a("Modal",{attrs:{heading:e.lang.chooseScript,paragraph:e.lang.choosePetLabel1+" <b>"+e.current_character_name+"</b> "+e.lang.choosePetLabel1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"layout-boxes"},e._l(e.layouts,(function(t,o){return a("div",{key:o,staticClass:"layout-option",class:e.currentLayout==t?"active":"inactive",on:{click:function(t){return e.setCurrentLayout(o)}}},[a("div",{staticClass:"imagem"},[a("img",{attrs:{width:"100%",src:t.image,alt:""}})]),e._v(" "),a("div",{staticClass:"panel-title"},[a("div",{staticClass:"title"},[e._v(e._s(t.name))]),e._v(" "),a("div",{staticClass:"flag",class:e.currentLayout==t?"active":"inactive"},[a("Icon",{attrs:{name:"check"}})],1)])])})),0),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalLanguage?a("Modal",{attrs:{heading:e.lang.chooseScript,paragraph:e.lang.choosePetLabel1+" <b>"+e.current_character_name+"</b> "+e.lang.choosePetLabel1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"layout-boxes"},e._l(e.languages,(function(t,o){return a("div",{key:o,staticClass:"layout-option",class:t==e.currentLanguage?"active":"inactive",on:{click:function(t){return e.setCurrentLayout(o)}}},[a("div",{staticClass:"imagem"},[a("img",{attrs:{width:"100%",src:t.Image,alt:""}})]),e._v(" "),a("div",{staticClass:"panel-title"},[a("div",{staticClass:"title"},[e._v(e._s(t.label))]),e._v(" "),a("div",{staticClass:"flag",class:e.currentLanguage==o?"active":"inactive"},[a("Icon",{attrs:{name:"check"}})],1)])])})),0),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalBirthdate?a("Modal",{attrs:{heading:e.lang.editDateBirth,size:"md"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"box-dates-columns"},[e.selectedBirthDay?a("div",{staticClass:"day"},[a("Select",{attrs:{selected:e.selectedBirthDay,name:"day",label:e.lang.day,placeholder:e.lang.day,options:e.days},on:{change:e.onChangeDay}})],1):e._e(),e._v(" "),e.selectedBirthMonth?a("div",{staticClass:"month"},[a("Select",{attrs:{selected:e.selectedBirthMonth,name:"month",label:e.lang.month,placeholder:e.lang.month,options:e.months},on:{change:e.onChangeMonth}})],1):e._e()]),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalPet?a("Modal",{staticClass:"modal-pet",attrs:{heading:e.lang.changePet,headingColor:e.preview_color,paragraph:e.lang.petDescription1+"<span>"+e.current_character_name+"</span> "+e.lang.petDescription2,size:"lg"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"pet-view"},[e.currentPet?a("div",{staticClass:"selected-pet",class:[e.currentPet?"active":"inactive",e.petAnimation?"fade-in-image":"inactive-pet"]},[e.currentPet&&e.currentPet.assets&&e.currentPet.assets.asset?a("div",[e.currentPetColor.assets.asset?a("img",{class:e.petInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentPetColor.assets.asset,width:"100%",alt:""}}):e._e()]):e._e()]):e._e(),e._v(" "),a("div",{staticClass:"pet-selectors",style:e.currentPetColor?"width: 70%;":""},[a("div",{},[a("Input",{attrs:{value:e.searchExtraProperty("nome-pet").value.name,error:"",helper:"",label:e.lang.typePetname,name:"currentPetName"},on:{input:function(t){e.searchExtraProperty("nome-pet").value.name=t.target.value.toUpperCase()}}})],1),e._v(" "),a("label",{staticClass:"pet-label"},[e._v(e._s(e.lang.selectPet))]),e._v(" "),a("div",{staticClass:"pet-combo-list"},[a("div",{staticClass:"full-list",class:[e.currentPet?"active":"inactive"]},[e.listPet?a("div",{staticClass:"pet-list"},e._l(e.listPet.assets.subcategories,(function(t,o){return a("div",{key:o,class:e.currentPet===t?"active":"inactive",on:{click:function(a){return e.setPet(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e(),e._v(" "),e.currentPet?a("div",{staticClass:"colors-list"},e._l(e.currentPet.assets.colors,(function(t,o){return a("div",{key:o,class:e.currentPetColor===t?"active":"inactive",on:{click:function(a){return e.setColor(t)}}},[a("div",{staticClass:"color-selector"},[a("span",{staticClass:"main-color",style:"background-color:"+t.hexa+";"}),e._v(" "),a("span",{staticClass:"auxiliary",style:"background-color:"+t.auxiliary+";"})]),e._v(" "),a("br")])})),0):e._e()])])]),e._v(" "),e.searchExtraProperty("nome-pet").value.newPet?a("div",{staticClass:"pet-avatar",style:e.searchExtraProperty("nome-pet").value.newPet?"width: 30%;":""},[a("img",{attrs:{src:e.searchExtraProperty("nome-pet").value.newPet.assets.asset,alt:""}}),e._v(" "),a("br")]):e._e()]),e._v(" "),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return e.changeMoonerLayout()}}},[e._v("\n "+e._s(e.lang.update)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.cancel)+"\n ")])],1)]):e._e(),e._v(" "),e.modalMooner?a("Modal",{staticClass:"modal-mooner",attrs:{size:"lg",heading:e.currentTitleMooney,paragraph:e.currentParagraphMooney,divider:!0,headingColor:e.preview_color,haveClose:!0,bottomFixed:!1,paragraphSize:e.isMobile?"sm":"lg"},on:{closeModal:e.closeModal}},[a("div",{staticClass:"mooner-view"},[a("div",{staticClass:"mooner-selectors",style:e.currentMooner?"width: 60%;":""},[a("div",{staticClass:"mooney-align-center"},[a("label",{staticClass:"mooner-label"},[e._v(e._s(e.lang.moonerLabelSelector))]),e._v(" "),a("div",{staticClass:"mooner-combo-list"},[a("div",{staticClass:"full-list",class:e.currentMooner?"active":"inactive"},[e.listMooner?a("div",{staticClass:"mooner-list",class:e.currentComboClassList},e._l(e.listMooner.assets.subcategories,(function(t,o){return a("div",{key:o,class:e.currentMooner===t?"active":"inactive",on:{click:function(a){return e.setMooner(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e(),e._v(" "),e.currentMooner?a("div",{staticClass:"colors-list"},e._l(e.currentMooner.assets.colors,(function(t,o){return a("div",{key:o,class:e.currentMoonerColor===t?"active":"inactive",on:{click:function(a){return e.setColor(t)}}},[a("div",{staticClass:"color-selector"},[a("span",{staticClass:"main-color",style:"background-color:"+t.hexa+";"}),e._v(" "),a("span",{staticClass:"auxiliary",style:"background-color:"+t.auxiliary+";"})]),e._v(" "),a("br")])})),0):e._e()])])])]),e._v(" "),e.currentMooner?a("div",{staticClass:"selected-mooner",class:[e.currentMooner?"active":"inactive",e.moonerAnimation?"fade-in-image":"inactive-pet"]},[e.currentMooner&&e.currentMooner.assets&&e.currentMooner.assets.asset?a("div",[e.currentMooner.assets.asset?a("img",{class:e.moonerInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentMooner.assets.asset,width:"100%",alt:""}}):e._e()]):e._e()]):e._e()]),e._v(" "),a("div",{staticClass:"mooner-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:0==e.currentMoonerName.length,inverted:!1},on:{click:function(t){return e.changeMoonerLayout()}}},[e._v("\n "+e._s(e.isCreated?e.lang.moonerCtaFirstOpen:e.lang.moonerCta)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:function(t){return t.preventDefault(),e.closeModal(t)}}},[e._v("\n "+e._s(e.isCreated?e.lang.chooseLater:e.lang.close)+"\n ")])],1)]):e._e(),e._v(" "),e.modalFantasy?a("Modal",{staticClass:"modal-fantasy",attrs:{heading:e.lang.fantasy,headingColor:e.preview_color,paragraph:e.lang.fantasyDescription,haveClose:!1},on:{closeModal:e.closeModal}},[a("div",{staticClass:"fantasy-view"},[a("div",{staticClass:"selected-fantasy",class:[e.currentFantasy?"active":"inactive",e.fantasyAnimation?"fade-in-image":"inactive-pet"]},[a("div",{staticClass:"fantasy-items"},[e.currentFantasy&&e.currentFantasy.assets&&e.currentFantasy.assets.asset?a("div",{staticClass:"clip-avatar"},[e.currentFantasy.assets.asset?a("img",{class:e.fantasyInitAnimation?"fade-in-image-init":"",attrs:{src:e.currentFantasy.assets.asset,alt:""}}):e._e()]):e._e(),e._v(" "),a("div",{staticClass:"avatar-fantasy"},e._l(e.avatarFantasy,(function(t,o){return a("div",{key:o,staticClass:"avatar-item"},[a("img",{attrs:{src:t.assets.asset,alt:""}}),e._v(" "),a("br")])})),0)])]),e._v(" "),a("div",[a("div",{staticClass:"pet-selectors",style:e.currentFantasy?"width: 100%;":""},[a("label",{staticClass:"pet-label"},[e._v(e._s(e.lang.fantasy))]),e._v(" "),a("div",{staticClass:"pet-combo-list"},[e.listFantasy?a("div",{staticClass:"pet-list",class:e.currentFantasy?"active":"inactive"},e._l(e.listFantasy,(function(t,o){return a("div",{key:o,class:e.currentFantasy===t?"active":"inactive",on:{click:function(a){return e.setFantasy(t)}}},[a("img",{attrs:{src:t.assets.icon,alt:""}}),e._v(" "),a("br")])})),0):e._e()])])])]),e._v(" "),a("div",{staticClass:"mooner-footer",attrs:{slot:"footer"},slot:"footer"},[a("Button",{attrs:{kind:"secondary",size:"md",width:"liquid",disabled:!e.currentFantasy,inverted:!1},on:{click:function(t){return e.changeFantasyLayout()}}},[e._v("\n "+e._s(e.lang.fantasySave)+"\n ")]),e._v(" "),a("Button",{attrs:{kind:"ghost",size:"md",width:"liquid",disabled:!1,inverted:!1},on:{click:e.closeModal}},[e._v("\n "+e._s(e.lang.chooseLater)+"\n ")])],1)]):e._e()],1)},staticRenderFns:[]},void 0,{name:"PreviewTools",components:{Vue:e,Heading:N,Paragraph:E,Icon:F,Modal:R,Input:I,Button:O,TextArea:$,Select:j},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},dedication_text:{type:String,required:!1,default:""},/** Preview external color. `#000` */preview_color:{type:String,default:"#12d3db",required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},// Idioma do livro (slug API). Opcional: deriva de typeLanguage se omitido.
|
|
376
389
|
language:{type:String,required:!1},languages:{type:Object,required:!1},// Layouts
|
|
377
390
|
layout:{type:Number,required:!1},// Layouts
|
|
378
391
|
layouts:{type:Array,required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},is_subscription:{type:Boolean,required:!1,default:!1},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},is_created:{type:Boolean,required:!1,default:!1},/** Builder APK opcional para API do builder */builder_apk:{type:String,required:!1,default:void 0},dir:{type:String,default:"ltr",required:!1}},data:function(){for(var e=[],t=[],a=(new Date).getFullYear(),o=1;o<=31;o++)e.push({key:o,value:o});for(var i=0;i<16;i++)t.push({key:a-i,value:a-i});return t.push({key:"outro",value:"Outro"}),{properties:null,// Sidebar
|
|
@@ -388,9 +401,9 @@ listPet:[],petAnimation:!1,petInitAnimation:!1,currentPetName:"",currentPet:null
|
|
|
388
401
|
listFantasy:[],fantasyAnimation:!1,fantasyInitAnimation:!1,currentFantasy:null,avatarFantasy:[],haveWheelChair:!1,// Languages
|
|
389
402
|
currentLanguage:null,// Layouts
|
|
390
403
|
currentLayout:null,// Preview default props
|
|
391
|
-
pages:[],pageNum:36,isMobile:!1,isPagesNumLoaded:!1,isLoading:!0,custom_character:null,custom:null,callingLayout:!1,currentShirtNumber:7,firstBookSelected:!1,type_id:0,toolbarAnimate:!1}},computed:{lang:function(){return
|
|
404
|
+
pages:[],pageNum:36,isMobile:!1,isPagesNumLoaded:!1,isLoading:!0,custom_character:null,custom:null,callingLayout:!1,currentShirtNumber:7,firstBookSelected:!1,type_id:0,toolbarAnimate:!1}},computed:{lang:function(){return S(this.typeLanguage)},builderLanguage:function(){return x(this.typeLanguage,this.language)},months:function(){return e=this.typeLanguage,t=S(e),Array.from({length:12},(function(e,a){var o=a+1,i=t["month".concat(o)];return{name:i,value:i,key:o}}));var e,t},colorsVar:function(){return{"--preview-color":this.preview_color}}},watch:{typeLanguage:function(){if(this.properties){var e=q({properties:this.properties,typeLanguage:this.typeLanguage,custom_numero:this.custom_numero,custom_mes:this.custom_mes});e.selectedBirthDay&&(this.selectedBirthDay=e.selectedBirthDay),e.selectedBirthMonth&&(this.selectedBirthMonth=e.selectedBirthMonth)}}},mounted:function(){var e=this;window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()})),e.isMobile=e.detectSize(),e.isCreated=e.is_created,this.initMounted(),setTimeout((function(){//this.$refs.error.style.opacity = "0";
|
|
392
405
|
// Animate tools
|
|
393
|
-
if(!e.listMooner){e.toolbarAnimate=!0;var t=0,a=setInterval((function(){t<6?t++:(e.toolbarAnimate=!1,clearInterval(a))}),1600)}}),1e4)},methods:{clickContinue:function(){this.$emit("clickContinue",null)},birthdaySidebarLabel:function(e){if(this.selectedBirthDay&&this.selectedBirthMonth>0)return
|
|
406
|
+
if(!e.listMooner){e.toolbarAnimate=!0;var t=0,a=setInterval((function(){t<6?t++:(e.toolbarAnimate=!1,clearInterval(a))}),1600)}}),1e4)},methods:{clickContinue:function(){this.$emit("clickContinue",null)},birthdaySidebarLabel:function(e){if(this.selectedBirthDay&&this.selectedBirthMonth>0)return T(this.selectedBirthDay,this.selectedBirthMonth,this.typeLanguage);if(e&&e.value){var t=A(e.value);if(t){var a=t.monthKey||B(t.monthName);return T(t.day,a||t.monthName,this.typeLanguage)}}return e?e.value:""},detectSize:function(){var e=!1;return window.innerWidth<990&&(e=!0),e},toggleSidebar:function(){this.toolbarAnimate=!1,this.sidebarOpen=!this.sidebarOpen},modalIsOpen:function(){return!!(this.modalLayout||this.modalName||this.modalDedication||this.modalShirtNumber||this.modalPet||this.modalMooner||this.modalBirthdate)},updateName:function(e){console.log(this.current_character_name),this.current_character_name=e.value.toUpperCase()},updateDedicationText:function(e){this.current_dedication_text=e.value.toUpperCase();//this.sidebarOpen = false;
|
|
394
407
|
},updateShirtNumber:function(e){this.currentShirtNumber=e.value},onChangeDay:function(e){this.selectedBirthDay=e.target.value;//self.
|
|
395
408
|
// this.validateDays({
|
|
396
409
|
// year: payload.value,
|
|
@@ -418,7 +431,7 @@ this.currentPetColor=e},showModal:function(e){//var modalName = Object.keys(key)
|
|
|
418
431
|
// console.log(modalName);
|
|
419
432
|
"nome"!=e.code&&24!=e.property_id||(this.modalName=!0),"dedicatoria"!=e.code&&26!=e.property_id||(this.modalDedication=!0),"nome-do-mooner"==e.code&&(this.modalMooner=!0),"nome-pet"==e.code&&(this.modalPet=!0),"script"==e.code&&(this.modalLayout=!0),"camisa"==e.code&&(this.modalShirtNumber=!0),"birthday"==e.code&&(this.modalBirthdate=!0),"fantasy"==e.code&&(this.modalFantasy=!0),"languages"==e.code&&(this.modalLanguage=!0),"layouts"==e.code&&(this.modalLayout=!0)},showModalName:function(){this.modalName=!0},showmodalLayout:function(){this.modalLayout=!0},showModalDedication:function(){this.modalDedication=!0},showModalShirtNumber:function(){this.modalShirtNumber=!0},showModalBirthdate:function(){this.modalBirthdate=!0},showModalPet:function(){},searchExtraProperty:function(e){var t=null;return Object.entries(this.properties).forEach((function(a){a[1].code===e&&(t=a[1])})),t},searchCustomUserDataProperty:function(e){var t=null;return Object.entries(e).forEach((function(e){"nome-do-mooner"==e[0]&&(t=e[1])})),t},searchCategoryProperty:function(e,t){var a=null;return Object.keys(e).forEach((function(o){e[o].code.includes(t)&&(a=e[o]),console.log(o+" - "+e[o])})),a},getTreeList:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:// Todo Guto
|
|
420
433
|
return o="https://builder.dentrodahistoria.com.br/api/v2/characters/"+(a=e).character_id+"/categories/assets/treelist?character_type_id="+a.type_id+"&subscription="+a.is_subscription+"&product_id="+parseInt(a.product_id),a.character_position_id&&(o=o+"&character_position_id="+parseInt(a.character_position_id)),// Adiciona builder_apk se presente
|
|
421
|
-
a.builder_apk&&(o+="&builder_apk=".concat(encodeURIComponent(a.builder_apk))),t.a(2
|
|
434
|
+
a.builder_apk&&(o+="&builder_apk=".concat(encodeURIComponent(a.builder_apk))),t.a(2,U.get(o).then((function(e){var t=[];e.data.character_categories_assets&&e.data.character_categories_assets[0]&&e.data.character_categories_assets[0].characters_extra&&(// Get mooner from extra character customization
|
|
422
435
|
e.data.character_categories_assets[0].characters_extra.forEach((function(e){"mooner"===e.code&&(a.typeRead||(a.listMooner=e,// Pesquisa pelo nome do mooner
|
|
423
436
|
Object.keys(a.custom).forEach((function(e){var t=a.custom[e];if(t.assets&&t.assets.name&&t.assets.name.includes("mooner")){console.log(t.assets);var o=t.assets.id;a.listMooner.assets.subcategories.forEach((function(e,t){e.id==o&&(a.setMooner(e),a.defaultMooner=a.itemMoonerList)}))}})),a.isCreated&&(a.modalMooner=!0,a.setMooner(a.listMooner.assets.subcategories[0]),a.defaultMooner=a.listMooner.assets.subcategories[0],a.currentMoonerName="")))})),//Get pet from extra character customization
|
|
424
437
|
e.data.character_categories_assets[0].characters_extra.forEach((function(e){"pet"===e.code&&(a.typeRead||(a.modalPet=!0,a.listPet=e))})),//Get pet from extra character customization
|
|
@@ -426,7 +439,7 @@ e.data.character_categories_assets[0].characters_extra.forEach((function(e){"fan
|
|
|
426
439
|
e.assets.subcategories.forEach((function(e){(1==a.haveWheelChair&&1==e.name.includes("cadeirante")||0==a.haveWheelChair&&0==e.name.includes("cadeirante"))&&t.push(e)})))),a.listFantasy=t,a.setFantasy(a.listFantasy[0])})))})).catch((function(e){console.log(e)})))}}),t)})))()},closeModal:function(){this.modalLayout=!1,this.modalName=!1,this.modalDedication=!1,this.modalShirtNumber=!1,this.modalPet=!1,this.modalMooner=!1,this.modalBirthdate=!1,this.modalFantasy=!1,this.modalLanguage=!1},setCurrentLayout:function(e){this.currentLayout=e,this.firstBookSelected=!0},initMounted:function(){var e=this;return u(g().m((function t(){var a;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,t.n=1,a.getProductInfo();case 1:a.getCustomCharacter();//alert("deu load novamente");
|
|
427
440
|
// self.getProductInfo();
|
|
428
441
|
// self.getTreeList();
|
|
429
|
-
case 2:return t.a(2)}}),t)})))()},setHeaderMoonner:function(){this.isMobile?(this.currentTitleMooney=this.isCreated?this.lang.moonerTitleFirstOpenMobile:this.lang.moonerTitleMobile,this.isCreated,this.currentParagraphMooney=this.lang.moonerDescriptionOne+"<b>"+this.current_character_name+"</b>"+this.lang.moonerDescriptionTwoMobile):(this.currentTitleMooney=this.isCreated?this.lang.moonerTitleFirstOpen:this.lang.moonerTitle,this.isCreated,this.currentParagraphMooney=this.lang.moonerDescriptionOne+"<b>"+this.current_character_name+"</b>"+this.lang.moonerDescriptionTwo)},getCustomCharacter:function(){var e=this,t=this.lang.urlBuilder+"/api/customs_characters/"+e.uuid;e.builder_apk&&(t+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
442
|
+
case 2:return t.a(2)}}),t)})))()},setHeaderMoonner:function(){this.isMobile?(this.currentTitleMooney=this.isCreated?this.lang.moonerTitleFirstOpenMobile:this.lang.moonerTitleMobile,this.isCreated,this.currentParagraphMooney=this.lang.moonerDescriptionOne+"<b>"+this.current_character_name+"</b>"+this.lang.moonerDescriptionTwoMobile):(this.currentTitleMooney=this.isCreated?this.lang.moonerTitleFirstOpen:this.lang.moonerTitle,this.isCreated,this.currentParagraphMooney=this.lang.moonerDescriptionOne+"<b>"+this.current_character_name+"</b>"+this.lang.moonerDescriptionTwo)},getCustomCharacter:function(){var e=this,t=this.lang.urlBuilder+"/api/customs_characters/"+e.uuid;e.builder_apk&&(t+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.get(t).then((function(t){// Dedicatória
|
|
430
443
|
if(e.custom=t.data.custom,e.properties=t.data.custom.user_data.properties,e.type_id=t.data.custom.user_data.type,// Nome
|
|
431
444
|
e.properties.nome&&(e.default_character_name=e.properties.nome.value.toUpperCase(),e.current_character_name=e.properties.nome.value.toUpperCase()),e.properties.dedicatoria&&e.properties.dedicatoria.value.length>2){var a=e.properties.dedicatoria.value.toUpperCase().replace("{NOME}",e.default_character_name);e.default_dedication_text=a,e.current_dedication_text=a,e.dedicationFirstEdit=!1}else if(e.dedication_text&&e.dedication_text.length>2){a=e.dedication_text.toUpperCase().replace("{NOME}",e.default_character_name);//self.default_dedication_text = dedicationWithReplace;
|
|
432
445
|
e.current_dedication_text=a}!1===e.have_dedication&&delete e.properties.dedicatoria,// Mooner
|
|
@@ -434,29 +447,29 @@ e.properties["nome-do-mooner"]&&(// self.mooner_name =
|
|
|
434
447
|
// self.properties["nome-do-mooner"].value.toUpperCase();
|
|
435
448
|
e.defaultMoonerName=e.properties["nome-do-mooner"].value.toUpperCase(),e.currentMoonerName=e.properties["nome-do-mooner"].value.toUpperCase(),e.currentComboClassList="is-three",//self.$refs.mooneyName.$el.querySelector("input").focus();
|
|
436
449
|
e.setHeaderMoonner());// Aniversário
|
|
437
|
-
var o=
|
|
450
|
+
var o=q({properties:e.properties,typeLanguage:e.typeLanguage,custom_numero:e.custom_numero,custom_mes:e.custom_mes});// Linguagens
|
|
438
451
|
if(o.selectedBirthDay&&(e.selectedBirthDay=o.selectedBirthDay),o.selectedBirthMonth&&(e.selectedBirthMonth=o.selectedBirthMonth),// Fantasia
|
|
439
452
|
t.data.assets.forEach((function(t,a){t.assets.name.includes("roupa-cadeirante")&&(e.haveWheelChair=!0)})),t.data.assets.forEach((function(a,o){if(a.assets.name.includes("fantasia")){var i={code:"fantasy",value:a.assets.name};e.properties.fantasy=i,e.avatarFantasy=t.data.assets}})),e.languages&&e.builderLanguage){e.languages.forEach((function(t){t.Slug==e.builderLanguage&&(e.currentLanguage=t)}));var i={code:"languages",value:e.currentLanguage.Label};e.properties.languages=i}// Layouts
|
|
440
|
-
if(e.layouts&&e.layout){e.layouts.forEach((function(t){t.builderProductId==e.layout&&(e.currentLayout=t)}));var r={code:"layouts",value:e.currentLayout.name};e.properties.layouts=r}e.getTreeList()})).catch((function(e){console.log(e)}))},getProductInfo:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,o=e.lang.urlBuilder+"/api/products/info/"+a.product_id,a.builder_apk&&(o+="?apk=".concat(encodeURIComponent(a.builder_apk))),t.a(2
|
|
441
|
-
var i=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(i+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
453
|
+
if(e.layouts&&e.layout){e.layouts.forEach((function(t){t.builderProductId==e.layout&&(e.currentLayout=t)}));var r={code:"layouts",value:e.currentLayout.name};e.properties.layouts=r}e.getTreeList()})).catch((function(e){console.log(e)}))},getProductInfo:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,o=e.lang.urlBuilder+"/api/products/info/"+a.product_id,a.builder_apk&&(o+="?apk=".concat(encodeURIComponent(a.builder_apk))),t.a(2,U.get(o).then((function(e){a.pageNum=e.data.product.pages,a.isPagesNumLoaded=!0,a.availableLayouts=e.data.product.layout})).catch((function(e){console.log(e)})))}}),t)})))()},changeMoonerLayout:function(){var e=this;if(e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1),e.defaultMooner==e.currentMooner&&e.defaultMoonerName==e.currentMoonerName)return e.closeModal(),e.sidebarOpen=!1,!1;var t=e.dedicationFirstEdit?"":e.current_dedication_text,a={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:t}}},uuid:e.uuid}};if(e.currentMooner&&e.properties["nome-do-mooner"]){var o={property_id:e.properties["nome-do-mooner"].property_id,value:e.currentMoonerName,code:e.properties["nome-do-mooner"].code};a.custom_character.user_data.properties["nome-do-mooner"]=o}// Envio da custom porperties dynamic
|
|
454
|
+
var i=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(i+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(i,a).then((function(t){e.custom=JSON.parse(t.data.custom.customCharacter.data);var a=!1,o=null;e.custom.categories.forEach((function(t){if(t.parent_id===e.currentMooner.parent_id){a=!0;var o=e.custom.categories.indexOf(t);e.custom.categories[o]={parent_id:e.currentMooner.parent_id,id:e.currentMooner.id}}})),e.defaultMoonerName=e.currentMoonerName,e.defaultMooner=e.currentMooner,e.isCreated=!1,e.sidebarOpen=!1,e.properties["nome-do-mooner"].value=e.currentMoonerName,e.setHeaderMoonner(),!1===a&&(o={parent_id:e.currentMooner.parent_id,id:e.currentMooner.id},e.custom.categories.push(o)),e.sendCustomCharacter()})).catch((function(e){console.log(e)}))},changeFantasyLayout:function(){var e=this;e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1);var t={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:e.dedicationText}}},uuid:e.uuid}};e.currentFantasy&&///var property = self.searchExtraProperty("nome-do-mooner");
|
|
442
455
|
e.extras.forEach((function(a){if(a.code.includes("nome-do-mooner")){var o={property_id:a.id,value:e.currentMoonerName,code:a.code};a.value=e.currentMoonerName,t.custom_character.user_data.properties[a.code]=o}}));//var data_custom;
|
|
443
456
|
// Envio da custom porperties dynamic
|
|
444
|
-
var a=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(a+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
445
|
-
e.sidebarOpen=!1,e.sendCustomCharacter()})).catch((function(e){console.log(e)}))},saveName:function(){var e=this;if(e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1),e.default_character_name==e.current_character_name)return e.closeModal(),e.sidebarOpen=!1,!1;var t=e.dedicationFirstEdit?" ":e.current_dedication_text,a={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:t}}},uuid:e.uuid}};if(e.currentMooner&&e.extras&&e.extras.forEach((function(t){if(t.code.includes("nome-do-mooner")){var o={property_id:t.id,value:e.currentMoonerName,code:t.code};t.value=e.currentMoonerName,a.custom_character.user_data.properties[t.code]=o}})),e.searchExtraProperty("birthday")){e.searchExtraProperty("birthday");a.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},a.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var o=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(o+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
457
|
+
var a=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(a+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(a,t).then((function(t){e.custom=JSON.parse(t.data.custom.customCharacter.data);var a=!1,o=null;e.custom.categories.forEach((function(t){if(t.parent_id===e.currentMooner.parent_id){a=!0;var o=e.custom.categories.indexOf(t);e.custom.categories[o]={parent_id:e.currentMooner.parent_id,id:e.currentMooner.id}}})),!1===a&&(o={parent_id:e.currentMooner.parent_id,id:e.currentMooner.id},e.custom.categories.push(o)),//self.modalMoonerFirstOpen = true;
|
|
458
|
+
e.sidebarOpen=!1,e.sendCustomCharacter()})).catch((function(e){console.log(e)}))},saveName:function(){var e=this;if(e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1),e.default_character_name==e.current_character_name)return e.closeModal(),e.sidebarOpen=!1,!1;var t=e.dedicationFirstEdit?" ":e.current_dedication_text,a={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:t}}},uuid:e.uuid}};if(e.currentMooner&&e.extras&&e.extras.forEach((function(t){if(t.code.includes("nome-do-mooner")){var o={property_id:t.id,value:e.currentMoonerName,code:t.code};t.value=e.currentMoonerName,a.custom_character.user_data.properties[t.code]=o}})),e.searchExtraProperty("birthday")){e.searchExtraProperty("birthday");a.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},a.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var o=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(o+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(o,a).then((function(t){if(e.custom=JSON.parse(t.data.custom.customCharacter.data),e.extras&&e.extras.forEach((function(t){"nome"===t.code&&(t.value=e.current_character_name),"dedicatoria"===t.code&&(t.value=e.dedicationText)})),//self.changeUuid(response.data.custom.uuid);
|
|
446
459
|
e.changeName(e.current_character_name,t.data.custom.uuid),e.getCustomCharacter(),e.have_birth_date){var a={custom_numero:e.selectedBirthDay,custom_mes:e.months[e.selectedBirthMonth-1].value};e.changeBirthday(a)}e.closeModal(),e.sidebarOpen=!1})).catch((function(e){console.log(e)}))},saveDedication:function(){var e=this;if(e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1),e.default_dedication_text==e.current_dedication_text)return e.closeModal(),e.sidebarOpen=!1,!1;//alert("Teste preview send 1");
|
|
447
|
-
var t={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:e.current_dedication_text?e.current_dedication_text:" "}}},uuid:e.uuid}};if(e.currentMooner&&e.extras&&e.extras.forEach((function(a){if(a.code.includes("nome-do-mooner")){var o={property_id:a.id,value:e.currentMoonerName,code:a.code};a.value=e.currentMoonerName,t.custom_character.user_data.properties[a.code]=o}})),e.searchExtraProperty("birthday")){e.searchExtraProperty("birthday");t.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},t.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var a=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(a+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
460
|
+
var t={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:e.current_dedication_text?e.current_dedication_text:" "}}},uuid:e.uuid}};if(e.currentMooner&&e.extras&&e.extras.forEach((function(a){if(a.code.includes("nome-do-mooner")){var o={property_id:a.id,value:e.currentMoonerName,code:a.code};a.value=e.currentMoonerName,t.custom_character.user_data.properties[a.code]=o}})),e.searchExtraProperty("birthday")){e.searchExtraProperty("birthday");t.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},t.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var a=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(a+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(a,t).then((function(t){e.custom=JSON.parse(t.data.custom.customCharacter.data),e.properties.dedicatoria.value=e.current_dedication_text,e.dedicationFirstEdit=!1,e.changeDedication(e.current_dedication_text,t.data.custom.uuid),e.closeModal(),e.sidebarOpen=!1})).catch((function(e){console.log(e)}))},updateDedicationCustomCharacter:function(){var e=this;e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1);var t={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{dedicatoria:{code:"dedicatoria",property_id:26,value:e.dedicationText}}},uuid:e.uuid}},a=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(a+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(a,t).then((function(t){e.custom=JSON.parse(t.data.custom.customCharacter.data),// self.extras.forEach((itemProperty) => {
|
|
448
461
|
// if (itemProperty.code === "dedicatoria") {
|
|
449
462
|
// itemProperty.value = self.dedicationText;
|
|
450
463
|
// }
|
|
451
464
|
// });
|
|
452
|
-
e.searchExtraProperty("dedicatoria").value=e.dedicationText,e.changeUuid(t.data.custom.uuid)})).catch((function(e){console.log(e)}))},changeLayout:function(){var e=this;e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1);var t,a=e.dedicationFirstEdit?"":e.current_dedication_text,o={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:a}}},uuid:e.uuid}};if(e.properties["nome-do-mooner"]){var i={property_id:(r=e.properties["nome-do-mooner"]).id,value:r.value,code:r.code};o.custom_character.user_data.properties[r.code]=i}if(e.properties.birthday){var r=e.properties.birthday;o.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},o.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var n=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(n+="?builder_apk=".concat(encodeURIComponent(e.builder_apk)))
|
|
465
|
+
e.searchExtraProperty("dedicatoria").value=e.dedicationText,e.changeUuid(t.data.custom.uuid)})).catch((function(e){console.log(e)}))},changeLayout:function(){var e=this;e.callingLayout=!0,e.closeModal(),e.isLoadingMethod(!1);var t,a=e.dedicationFirstEdit?"":e.current_dedication_text,o={custom_character:{character_id:e.character_id,product_id:e.product_id,type_id:e.type_id,user_data:{type:e.type_id,properties:{nome:{code:"nome",property_id:24,value:e.current_character_name},dedicatoria:{code:"dedicatoria",property_id:26,value:a}}},uuid:e.uuid}};if(e.properties["nome-do-mooner"]){var i={property_id:(r=e.properties["nome-do-mooner"]).id,value:r.value,code:r.code};o.custom_character.user_data.properties[r.code]=i}if(e.properties.birthday){var r=e.properties.birthday;o.custom_character.user_data.properties.mes={property_id:38,value:e.months[e.selectedBirthMonth-1].value,code:"mes"},o.custom_character.user_data.properties.numero={property_id:29,value:e.selectedBirthDay,code:"numero"}}var n=this.lang.urlBuilder+"/api/customs_characters/changePropertiesDynamic";e.builder_apk&&(n+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(n,o).then((function(a){if(e.custom=JSON.parse(a.data.custom.customCharacter.data),e.currentPet&&e.currentPet.parent_id&&(t={parent_id:e.currentPet.parent_id,id:e.currentPetColor.id},e.custom.categories.push(t)),e.custom_mes&&e.custom_numero){var o={mes:e.selectedBirthMonth,dia:e.selectedBirthDay};e.changeBirthday(o)}e.properties.birthday&&e.selectedBirthDay&&e.selectedBirthMonth>0&&(e.properties.birthday.value=T(e.selectedBirthDay,e.selectedBirthMonth,e.typeLanguage)),e.sidebarOpen=!1,e.sendCustomCharacter()})).catch((function(e){console.log(e)}))},sendCustomCharacter:function(){var e=this,t=this.lang.urlBuilder+"/api/customs_characters";e.builder_apk&&(t+="?builder_apk=".concat(encodeURIComponent(e.builder_apk))),U.post(t,{custom_character:e.custom}).then((function(t){//self.custom = JSON.parse(response.data.custom.customCharacter.data);
|
|
453
466
|
//alert("salvou catiolo");
|
|
454
467
|
var a={uuid:t.data.custom.uuid};e.changeUuid(a)})).catch((function(e){console.log(e)}))},changeUuid:function(e){//alert("alterou uuid");
|
|
455
468
|
this.$emit("changeUuid",e)},changeName:function(e,t){//alert("Método de change name");
|
|
456
469
|
//console.log("Bereta", payload);
|
|
457
470
|
var a={name:e,uuid:t};self.sidebarOpen=!1,this.$emit("changeName",a)},changeDedication:function(e,t){//alert("Método de change name");
|
|
458
471
|
var a={dedication:e,uuid:t};self.sidebarOpen=!1,//console.log("Bereta", payload);
|
|
459
|
-
this.$emit("changeDedication",a)},changeBirthday:function(e){this.$emit("changeBirthday",e)},isLoadingMethod:function(e){this.$emit("isLoadingMethod",e)},validateDays:function(e){var t,a=e.month?e.month:this.selectedBirthMonth,o=e.year?e.year:this.selectedBirthYear;a||(a=13);var i=[];t=1===a||3===a||5===a||7===a||8===a||10===a||12===a||13===a?31:4===a||6===a||9===a||11===a?30:o%4==0&&o%100>0||o%400==0?29:28,a||o||(t=31);for(var r=1;r<=t;r++)i.push({key:r,value:r});this.days=i}}},"data-v-d1a86b46",!1,void 0,!1,void 0,void 0,void 0),
|
|
472
|
+
this.$emit("changeDedication",a)},changeBirthday:function(e){this.$emit("changeBirthday",e)},isLoadingMethod:function(e){this.$emit("isLoadingMethod",e)},validateDays:function(e){var t,a=e.month?e.month:this.selectedBirthMonth,o=e.year?e.year:this.selectedBirthYear;a||(a=13);var i=[];t=1===a||3===a||5===a||7===a||8===a||10===a||12===a||13===a?31:4===a||6===a||9===a||11===a?30:o%4==0&&o%100>0||o%400==0?29:28,a||o||(t=31);for(var r=1;r<=t;r++)i.push({key:r,value:r});this.days=i}}},"data-v-d1a86b46",!1,void 0,!1,void 0,void 0,void 0),W=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"stepper",style:e.colorsVar,attrs:{dir:e.dir}},"div",e.$attrs,!1),e.$listeners),e._l(e.steps,(function(t,o){return a("div",{key:o,staticClass:"stepper-links"},[t?a("div",{staticClass:"stepper-links-item-area"},[a("Paragraph",{staticClass:"stepper-link-text",class:e.steps.length-1==o?"is-current":"not-current",attrs:{size:"sm",color:e.color}},[a("div",{staticClass:"preview-button",style:"color:"+e.color,on:{click:function(a){e.steps.length,e.onClick(t)}}},[0==o&&e.back_button?a("Icon",{staticClass:"back-button",class:e.dir,attrs:{name:"rtl"===e.dir?"arrow-right":"arrow-left",fill:e.color,color:e.color,size:"md",stroke:"transparent"}}):e._e()],1),e._v("\n\n "+e._s(t.value))])],1):e._e(),e._v(" "),e.steps.length-1!=o?a("Paragraph",{staticClass:"stepper-link-divider",attrs:{size:"sm",color:e.color},domProps:{innerHTML:e._s("-")}}):e._e()],1)})),0)},staticRenderFns:[]},void 0,{name:"Stepper",components:{Button:O,Heading:N,Paragraph:E,Icon:F},computed:{colorsVar:function(){return{"--color-active":this.colors.colorActive,"--color-hover":this.colors.colorHover,"--color":this.colors.color,"--text-active":this.colors.textActive,"--text":this.colors.text}}},props:{steps:{type:Array,required:!0},color:{type:String,required:!1,default:"#68596E"},colors:{type:[Array,Object,String],required:!1,default:"#68596E"},back_button:{type:Boolean,required:!1,default:!0},dir:{type:String,default:"ltr",required:!1}},methods:{onClick:function(e){this.$emit("click",e)}}},"data-v-3c47c735",!1,void 0,!1,void 0,void 0,void 0),Z=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.stick?"stick-top-bar":"",attrs:{dir:e.dir}},[e.stick?a("div",{staticClass:"stick-relative"}):e._e(),e._v(" "),a("div",{staticClass:"top-bar",style:e.colorsVar,attrs:{dir:e.dir}},[e.steps&&e.steps.length?a("div",{staticClass:"steppers"},[a("Stepper",{attrs:{steps:e.localizedSteps,route:"backurl",color:e.color,colors:e.colors,dir:e.dir},on:{click:e.onClick}})],1):e._e(),e._v(" "),e.breadcrumbs&&e.breadcrumbs.length?a("div",{staticClass:"breadcrumb"},[a("Breadcrumb",{attrs:{routes:e.localizedBreadcrumbs,color:e.color,colors:e.colors,dir:e.dir},on:{click:e.onClick}})],1):e._e(),e._v(" "),e.have_button&&e.isMobile?a("div",{staticClass:"button-right"},[a("Button",{attrs:{kind:"secondary",size:"sm",width:"fluid",dir:e.dir},on:{click:e.clickContinue}},[a("span",[e._v(e._s(e.continueLabel))])])],1):e._e(),e._v(" "),e.menu&&e.menu.length?a("div",{staticClass:"menu-topbar"},[e.selectedMenu?a("MenuNavigation",{attrs:{colors:e.colors,selected:e.selectedMenu,name:"nome",options:e.menu,size:"md"},on:{changeMenu:e.onClickMenu}}):e._e()],1):e._e()]),e._v(" "),e.menu&&e.menu.length?a("div",{staticClass:"menu-topbar-mobile",class:e.floatingSubmenu?"is-active":""},[e.stick?a("div",{staticClass:"stick-relative-mobile"}):e._e(),e._v(" "),e.selectedMenu?a("TabsLine",{attrs:{colors:e.colors,selected:e.selectedMenu,options:e.menu,size:"sm",width:"liquid"},on:{change:e.onClickMenu}}):e._e()],1):e._e()])},staticRenderFns:[]},void 0,{name:"TopBar",components:{Button:O,Heading:N,Paragraph:E,Icon:F,Stepper:W,Breadcrumb:D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"breadcrumb",style:e.colorsVar,attrs:{dir:e.dir}},"div",e.$attrs,!1),e.$listeners),e._l(e.routes,(function(t,o){return a("div",{key:o,staticClass:"breadcrumb-links"},[t?a("div",{staticClass:"breadcrumb-links-item-area"},[a("Paragraph",{staticClass:"breadcrumb-link-text",class:e.routes.length-1==o?"is-current":"not-current",attrs:{size:"sm",color:e.color},on:{click:function(a){e.routes.length,e.onClick(t)}}},[e.back_button?a("div",{staticClass:"preview-button",style:"color:"+e.color,on:{click:function(a){return e.onClick(t)}}},[0==o?a("Icon",{staticClass:"back-button",class:e.dir,attrs:{name:"rtl"===e.dir?"arrow-right":"arrow-left",fill:e.color,color:e.color,size:"md",stroke:"transparent"}}):e._e()],1):e._e(),e._v("\n\n\t\t\t\t"+e._s(t.value))])],1):e._e(),e._v(" "),e.routes.length-1!=o?a("Paragraph",{staticClass:"breadcrumb-link-divider",attrs:{size:"sm",color:e.color},domProps:{innerHTML:e._s("/")}}):e._e()],1)})),0)},staticRenderFns:[]},void 0,{name:"Breadcrumb",components:{Button:O,Heading:N,Paragraph:E,Icon:F},computed:{colorsVar:function(){return{"--color-active":this.colors.colorActive,"--color-hover":this.colors.colorHover,"--color":this.colors.color,"--text-active":this.colors.textActive,"--text":this.colors.text}}},props:{routes:{type:Array,required:!0},color:{type:String,required:!1,default:"#68596E"},colors:{type:[Array,Object,String],required:!1,default:"#68596E"},back_button:{type:Boolean,required:!1,default:!0},direction:{type:String,default:"ltr",required:!1},dir:{type:String,default:"ltr",required:!1}},methods:{onClick:function(e){this.$emit("click",e)}}},"data-v-9d787ad6",!1,void 0,!1,void 0,void 0,void 0),MenuNavigation:D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"menu-group",style:e.colorsVar},"div",e.$attrs,!1),e.$listeners),[a("div",{staticClass:"menu"},e._l(e.options,(function(t,o){return a("button",{key:o,staticClass:"tab",class:["size-"+e.size,t.key===e.selected?"is-selected":null],on:{click:function(a){return e.onChange(t.key,t.name)}}},[a("Paragraph",{attrs:{size:"sm",color:"#fff"}},[e._v(e._s(t.value))])],1)})),0)])},staticRenderFns:[]},void 0,{name:"MenuNavigation",components:{Paragraph:E},props:{
|
|
460
473
|
/**
|
|
461
474
|
* Nome do campo, utilizado no callback do evento<br>
|
|
462
475
|
* Example: `Name`
|
|
@@ -488,7 +501,7 @@ this.scrollSelectedIntoView(e)}},data:function(){return{}},computed:{colorsVar:f
|
|
|
488
501
|
/**
|
|
489
502
|
* Evento disparado sempre que o valor for alterado.<br>
|
|
490
503
|
* Retorna um objeto com target (name do campo), key ativo e value ativo.
|
|
491
|
-
*/this.$emit("changeMenu",a)},scrollSelectedIntoView:function(e){}}},"data-v-2d7f8d19",!1,void 0,!1,void 0,void 0,void 0),TabsLine:
|
|
504
|
+
*/this.$emit("changeMenu",a)},scrollSelectedIntoView:function(e){}}},"data-v-2d7f8d19",!1,void 0,!1,void 0,void 0,void 0),TabsLine:D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({ref:"tabsContainer",staticClass:"tabs-group",class:"width-"+e.width,style:e.colorsVar},"div",e.$attrs,!1),e.$listeners),[a("div",{ref:"tabs",staticClass:"tabs",style:e.tabMobileSize?"width:"+e.tabMobileSize+"px":"width:100%;"},e._l(e.options,(function(t,o){return a("div",{key:o+1,ref:"tab",refInFor:!0,staticClass:"tab-spacing"},[a("button",{staticClass:"tab",class:["size-"+e.size,t.key===e.selected?"is-selected":null],on:{click:function(a){return e.onChange(t.key,t.value)}}},[a("span",[e._v("\n "+e._s(t.value)+"\n ")])])])})),0)])},staticRenderFns:[]},void 0,{name:"TabsLine",props:{
|
|
492
505
|
/**
|
|
493
506
|
* Nome do campo, utilizado no callback do evento<br>
|
|
494
507
|
* Example: `Name`
|
|
@@ -529,37 +542,37 @@ for(var o=a.tabs.getElementsByClassName("tab-spacing"),i=0;i<o.length;i++){var r
|
|
|
529
542
|
// required: false,
|
|
530
543
|
// },
|
|
531
544
|
stick:{type:Boolean,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},selectedMenu:{type:[String,Number],//default: "#12d3db",
|
|
532
|
-
required:!1},dir:{type:String,default:"ltr",required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"}},computed:{lang:function(){return
|
|
545
|
+
required:!1},dir:{type:String,default:"ltr",required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"}},computed:{lang:function(){return S(this.typeLanguage)},continueLabel:function(){return this.lang.continue||"CONTINUAR"},localizedSteps:function(){return this.localizeRoutes(this.steps)},localizedBreadcrumbs:function(){return this.localizeRoutes(this.breadcrumbs)},colorsVar:function(){return{"--preview-color":this.preview_color,"--button-color":this.colors.colorActive}}},data:function(){return{isMobile:!1,floatingSubmenu:!1,oldMenuMobilePosition:0}},mounted:function(){var e=this;// Attach the scroll event listener when the component is mounted
|
|
533
546
|
e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()})),e.stick&&window.addEventListener("scroll",e.handleScroll)},beforeDestroy:function(){this.stick&&// Remove the scroll event listener when the component is about to be destroyed
|
|
534
547
|
window.removeEventListener("scroll",this.handleScroll)},methods:{localizeRoutes:function(e){if(!e||!e.length)return e;var t=this.lang;return e.map((function(e){return e&&e.key?"index"===e.key?m(m({},e),{},{value:t.stepBack||e.value}):"second"===e.key?m(m({},e),{},{value:t.stepPreview||e.value}):e:e}))},handleScroll:function(){var e=window.scrollY,t=document.getElementsByClassName("menu-topbar-mobile")[0].offsetTop;// Update the windowScrollPosition data property with the current scroll position
|
|
535
|
-
e>=t&&(this.floatingSubmenu=!0,0==this.oldMenuMobilePosition&&(this.oldMenuMobilePosition=t)),e<this.oldMenuMobilePosition&&(this.floatingSubmenu=!1)},detectSize:function(){this.isMobile=!1,window.innerWidth<990&&(this.isMobile=!0)},onClick:function(e){this.$emit("click",e)},onClickMenu:function(e){this.$emit("clickMenu",e)},clickContinue:function(){this.$emit("clickContinue",null)}}},"data-v-2cdf7fe0",!1,void 0,!1,void 0,void 0,void 0),
|
|
536
|
-
imageAsset:null,routes:[{path:"index",stepperName:"Etapa 2"},{path:"second",stepperName:"5 - Próximos personagens"}]}},mounted:function(){var e=this;e.isMobile=e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()}));var t="https://builder.dentrodahistoria.com.br/api/builder/getpreview/"+e.uuid+"?page=1&w=120&v=0&noCache=true";e.builder_apk&&(t+="&apk=".concat(encodeURIComponent(e.builder_apk))),e.getBase64(t)},methods:p(p(p({detectSize:function(){var e=!1;return window.innerWidth<990&&(e=!0),e},onClick:function(){this.$emit("click")},action:function(){this.$emit("changeUrl")}},"detectSize",(function(){var e=!1;return window.innerWidth<990&&(e=!0),e})),"closeModal",(function(){this.$emit("closeModal"),document.getElementsByTagName("html")[0].removeAttribute("style"),document.getElementsByTagName("body")[0].removeAttribute("style"),document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&document.getElementsByClassName("boxes")[0].removeAttribute("style")})),"getBase64",(function(e){var t=this;o.get(e,{responseType:"arraybuffer"}).then((function(e){t.imageAsset="data:image/png;base64,"+Buffer.from(e.data,"binary").toString("base64")}))}))},"data-v-06b89b9f",!1,void 0,!1,void 0,void 0,void 0);/* template */function
|
|
537
|
-
}}}!function(e){function t(e,t,a){if(!a[0]||"object"==b(a[0]))return t.init.apply(e,a);if(t[a[0]])return t[a[0]].apply(e,Array.prototype.slice.call(a,1));throw u(a[0]+" is not a method or property")}function a(e,t,a,o){return{css:{position:"absolute",top:e,left:t,overflow:o||"hidden",zIndex:a||"auto"}}}function o(e,t,a,o,r){var n=1-r,s=n*n*n,d=r*r*r;return i(Math.round(s*e.x+3*r*n*n*t.x+3*r*r*n*a.x+d*o.x),Math.round(s*e.y+3*r*n*n*t.y+3*r*r*n*a.y+d*o.y))}function i(e,t){return{x:e,y:t}}function r(e,t,a){return h&&a?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "}function n(e){return" rotate("+e+"deg) "}function s(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function d(){for(var e=["Moz","Webkit","Khtml","O","ms"],t=e.length,a="";t--;)e[t]+"Transform"in document.body.style&&(a="-"+e[t].toLowerCase()+"-");return a}function l(e,t,a,o,r){var n,s=[];if("-webkit-"==g){for(n=0;n<r;n++)s.push("color-stop("+o[n][0]+", "+o[n][1]+")");e.css({"background-image":"-webkit-gradient(linear, "+t.x+"% "+t.y+"%,"+a.x+"% "+a.y+"%, "+s.join(",")+" )"})}else{t={x:t.x/100*e.width(),y:t.y/100*e.height()};var d=(a={x:a.x/100*e.width(),y:a.y/100*e.height()}).x-t.x;n=a.y-t.y;var l=Math.atan2(n,d),c=l-Math.PI/2,u=(c=Math.abs(e.width()*Math.sin(c))+Math.abs(e.height()*Math.cos(c)),d=Math.sqrt(n*n+d*d),a=i(a.x<t.x?e.width():0,a.y<t.y?e.height():0),Math.tan(l));for(a=(n=-1/u)*(u=(n*a.x-a.y-u*t.x+t.y)/(n-u))-n*a.x+a.y,t=Math.sqrt(Math.pow(u-t.x,2)+Math.pow(a-t.y,2)),n=0;n<r;n++)s.push(" "+o[n][1]+" "+100*(t+d*o[n][0])/c+"%");e.css({"background-image":g+"linear-gradient("+-l+"rad,"+s.join(",")+")"})}}function c(t,a,o){return t=e.Event(t),a.trigger(t,o),t.isDefaultPrevented()?"prevented":t.isPropagationStopped()?"stopped":""}function u(e){function t(e){this.name="TurnJsError",this.message=e}return t.prototype=Error(),t.prototype.constructor=t,new t(e)}function p(e){var t={top:0,left:0};do{t.left+=e.offsetLeft,t.top+=e.offsetTop}while(e=e.offsetParent);return t}var h,m,g="",f=Math.PI,v=f/2,y="ontouchstart"in window,_=y?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},w={backward:["bl","tl"],forward:["br","tr"],all:"tl bl tr br l r".split(" ")},k=["single","double"],C=["ltr","rtl"],P={acceleration:!0,display:"double",duration:600,page:1,gradients:!0,turnCorners:"bl,br",when:null},M={cornerSize:100},x={init:function(t){var a,o;h="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,m=!(a=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent))||534.3<parseFloat(a[1]),g=d(),a=0;var i=this.data(),n=this.children();t=e.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},P,t);if(i.opts=t,i.pageObjs={},i.pages={},i.pageWrap={},i.pageZoom={},i.pagePlace={},i.pageMv=[],i.zoom=1,i.totalPages=t.pages||0,i.eventHandlers={touchStart:e.proxy(x._touchStart,this),touchMove:e.proxy(x._touchMove,this),touchEnd:e.proxy(x._touchEnd,this),start:e.proxy(x._eventStart,this)},t.when)for(o in t.when)s(o,t.when)&&this.bind(o,t.when[o]);for(this.css({position:"relative",width:t.width,height:t.height}),this.turn("display",t.display),""!==t.direction&&this.turn("direction",t.direction),h&&!y&&t.acceleration&&this.transform(r(0,0,!0)),o=0;o<n.length;o++)"1"!=e(n[o]).attr("ignore")&&this.turn("addPage",n[o],++a);return e(this).bind(_.down,i.eventHandlers.touchStart).bind("end",x._eventEnd).bind("pressed",x._eventPressed).bind("released",x._eventReleased).bind("flip",x._flip),e(this).parent().bind("start",i.eventHandlers.start),e(document).bind(_.move,i.eventHandlers.touchMove).bind(_.up,i.eventHandlers.touchEnd),this.turn("page",t.page),i.done=!0,this},addPage:function(t,a){var o,i=!1,r=this.data(),n=r.totalPages+1;if(r.destroying)return!1;if((o=/\bp([0-9]+)\b/.exec(e(t).attr("class")))&&(a=parseInt(o[1],10)),a){if(a==n)i=!0;else if(a>n)throw u('Page "'+a+'" cannot be inserted')}else a=n,i=!0;return 1<=a&&a<=n&&(o="double"==r.display?a%2?" odd":" even":"",r.done&&this.turn("stop"),a in r.pageObjs&&x._movePages.call(this,a,1),i&&(r.totalPages=n),r.pageObjs[a]=e(t).css({float:"left"}).addClass("page p"+a+o),-1!=navigator.userAgent.indexOf("MSIE 9.0")&&r.pageObjs[a].hasClass("hard")&&r.pageObjs[a].removeClass("hard"),x._addPage.call(this,a),x._removeFromDOM.call(this)),this},_addPage:function(t){var a=this.data(),o=a.pageObjs[t];if(o)if(x._necessPage.call(this,t)){if(!a.pageWrap[t]){a.pageWrap[t]=e("<div/>",{class:"page-wrapper",page:t,css:{position:"absolute",overflow:"hidden"}}),this.append(a.pageWrap[t]),a.pagePlace[t]||(a.pagePlace[t]=t,a.pageObjs[t].appendTo(a.pageWrap[t]));var i=x._pageSize.call(this,t,!0);o.css({width:i.width,height:i.height}),a.pageWrap[t].css(i)}a.pagePlace[t]==t&&x._makeFlip.call(this,t)}else a.pagePlace[t]=0,a.pageObjs[t]&&a.pageObjs[t].remove()},hasPage:function(e){return s(e,this.data().pageObjs)},center:function(t){var a=this.data(),o=e(this).turn("size"),i=0;return a.noCenter||("double"==a.display&&(t=this.turn("view",t||a.tpage||a.page),"ltr"==a.direction?t[0]?t[1]||(i+=o.width/4):i-=o.width/4:t[0]?t[1]||(i-=o.width/4):i+=o.width/4),e(this).css({marginLeft:i})),this},destroy:function(){var t=this,a=this.data(),o="end first flip last pressed released start turning turned zooming missing".split(" ");if("prevented"!=c("destroying",this)){for(a.destroying=!0,e.each(o,(function(e,a){t.unbind(a)})),this.parent().unbind("start",a.eventHandlers.start),e(document).unbind(_.move,a.eventHandlers.touchMove).unbind(_.up,a.eventHandlers.touchEnd);0!==a.totalPages;)this.turn("removePage",a.totalPages);return a.fparent&&a.fparent.remove(),a.shadow&&a.shadow.remove(),this.removeData(),a=null,this}},is:function(){return"object"==b(this.data().pages)},zoom:function(t){var a=this.data();if("number"==typeof t){if(.001>t||100<t)throw u(t+" is not a value for zoom");if("prevented"==c("zooming",this,[t,a.zoom]))return this;var o=this.turn("size"),i=this.turn("view"),r=1/a.zoom,n=Math.round(o.width*r*t);o=Math.round(o.height*r*t);for(a.zoom=t,e(this).turn("stop").turn("size",n,o),a.opts.autoCenter&&this.turn("center"),x._updateShadow.call(this),t=0;t<i.length;t++)i[t]&&a.pageZoom[i[t]]!=a.zoom&&(this.trigger("zoomed",[i[t],i,a.pageZoom[i[t]],a.zoom]),a.pageZoom[i[t]]=a.zoom);return this}return a.zoom},_pageSize:function(e,t){var a=this.data(),o={};if("single"==a.display)o.width=this.width(),o.height=this.height(),t&&(o.top=0,o.left=0,o.right="auto");else{var i=this.width()/2,r=this.height();if(a.pageObjs[e].hasClass("own-size")?(o.width=a.pageObjs[e].width(),o.height=a.pageObjs[e].height()):(o.width=i,o.height=r),t){var n=e%2;o.top=(r-o.height)/2,"ltr"==a.direction?(o[n?"right":"left"]=i-o.width,o[n?"left":"right"]="auto"):(o[n?"left":"right"]=i-o.width,o[n?"right":"left"]="auto")}}return o},_makeFlip:function(e){var t=this.data();if(!t.pages[e]&&t.pagePlace[e]==e){var a="single"==t.display,o=e%2;t.pages[e]=t.pageObjs[e].css(x._pageSize.call(this,e)).flip({page:e,next:o||a?e+1:e-1,turn:this}).flip("disable",t.disabled),x._setPageLoc.call(this,e),t.pageZoom[e]=t.zoom}return t.pages[e]},_makeRange:function(){var e,t;if(!(1>this.data().totalPages))for(e=(t=this.turn("range"))[0];e<=t[1];e++)x._addPage.call(this,e)},range:function(e){var t,a,o,i=this.data();e=e||i.tpage||i.page||1;if(o=x._view.call(this,e),1>e||e>i.totalPages)throw u('"'+e+'" is not a valid page');return o[1]=o[1]||o[0],1<=o[0]&&o[1]<=i.totalPages?(e=Math.floor(2),i.totalPages-o[1]>o[0]?a=2*e-(t=Math.min(o[0]-1,e)):t=2*e-(a=Math.min(i.totalPages-o[1],e))):a=t=5,[Math.max(1,o[0]-t),Math.min(i.totalPages,o[1]+a)]},_necessPage:function(e){if(0===e)return!0;var t=this.turn("range");return this.data().pageObjs[e].hasClass("fixed")||e>=t[0]&&e<=t[1]},_removeFromDOM:function(){var e,t=this.data();for(e in t.pageWrap)s(e,t.pageWrap)&&!x._necessPage.call(this,e)&&x._removePageFromDOM.call(this,e)},_removePageFromDOM:function(e){var t=this.data();if(t.pages[e]){var a=t.pages[e].data();z._moveFoldingPage.call(t.pages[e],!1),a.f&&a.f.fwrapper&&a.f.fwrapper.remove(),t.pages[e].removeData(),t.pages[e].remove(),delete t.pages[e]}t.pageObjs[e]&&t.pageObjs[e].remove(),t.pageWrap[e]&&(t.pageWrap[e].remove(),delete t.pageWrap[e]),x._removeMv.call(this,e),delete t.pagePlace[e],delete t.pageZoom[e]},removePage:function(e){var t=this.data();if("*"==e)for(;0!==t.totalPages;)this.turn("removePage",t.totalPages);else{if(1>e||e>t.totalPages)throw u("The page "+e+" doesn't exist");t.pageObjs[e]&&(this.turn("stop"),x._removePageFromDOM.call(this,e),delete t.pageObjs[e]),x._movePages.call(this,e,-1),t.totalPages-=1,t.page>t.totalPages?(t.page=null,x._fitPage.call(this,t.totalPages)):(x._makeRange.call(this),this.turn("update"))}return this},_movePages:function(e,t){var a,o=this,i=this.data(),r="single"==i.display,n=function(e){var a=e+t,n=a%2,s=n?" odd ":" even ";i.pageObjs[e]&&(i.pageObjs[a]=i.pageObjs[e].removeClass("p"+e+" odd even").addClass("p"+a+s)),i.pagePlace[e]&&i.pageWrap[e]&&(i.pagePlace[a]=a,i.pageWrap[a]=i.pageObjs[a].hasClass("fixed")?i.pageWrap[e].attr("page",a):i.pageWrap[e].css(x._pageSize.call(o,a,!0)).attr("page",a),i.pages[e]&&(i.pages[a]=i.pages[e].flip("options",{page:a,next:r||n?a+1:a-1})),t&&(delete i.pages[e],delete i.pagePlace[e],delete i.pageZoom[e],delete i.pageObjs[e],delete i.pageWrap[e]))};if(0<t)for(a=i.totalPages;a>=e;a--)n(a);else for(a=e;a<=i.totalPages;a++)n(a)},display:function(t){var a=this.data(),o=a.display;if(void 0===t)return o;if(-1==e.inArray(t,k))throw u('"'+t+'" is not a value for display');switch(t){case"single":a.pageObjs[0]||(this.turn("stop").css({overflow:"hidden"}),a.pageObjs[0]=e("<div />",{class:"page p-temporal"}).css({width:this.width(),height:this.height()}).appendTo(this)),this.addClass("shadow");break;case"double":a.pageObjs[0]&&(this.turn("stop").css({overflow:""}),a.pageObjs[0].remove(),delete a.pageObjs[0]),this.removeClass("shadow")}return a.display=t,o&&(t=this.turn("size"),x._movePages.call(this,1,0),this.turn("size",t.width,t.height).turn("update")),this},direction:function(t){var a=this.data();if(void 0===t)return a.direction;if(t=t.toLowerCase(),-1==e.inArray(t,C))throw u('"'+t+'" is not a value for direction');return"rtl"==t&&e(this).attr("dir","ltr").css({direction:"ltr"}),a.direction=t,a.done&&this.turn("size",e(this).width(),e(this).height()),this},animating:function(){return 0<this.data().pageMv.length},corner:function(){var e,t,a=this.data();for(t in a.pages)if(s(t,a.pages)&&(e=a.pages[t].flip("corner")))return e;return!1},data:function(){return this.data()},disable:function(t){var a,o=this.data(),i=this.turn("view");for(a in o.disabled=void 0===t||!0===t,o.pages)s(a,o.pages)&&o.pages[a].flip("disable",!!o.disabled||-1==e.inArray(parseInt(a,10),i));return this},disabled:function(e){return void 0===e?!0===this.data().disabled:this.turn("disable",e)},size:function(e,t){if(void 0===e||void 0===t)return{width:this.width(),height:this.height()};this.turn("stop");var a,o,i=this.data();for(a in o="double"==i.display?e/2:e,this.css({width:e,height:t}),i.pageObjs[0]&&i.pageObjs[0].css({width:o,height:t}),i.pageWrap)s(a,i.pageWrap)&&(o=x._pageSize.call(this,a,!0),i.pageObjs[a].css({width:o.width,height:o.height}),i.pageWrap[a].css(o),i.pages[a]&&i.pages[a].css({width:o.width,height:o.height}));return this.turn("resize"),this},resize:function(){var e,t=this.data();for(t.pages[0]&&(t.pageWrap[0].css({left:-this.width()}),t.pages[0].flip("resize",!0)),e=1;e<=t.totalPages;e++)t.pages[e]&&t.pages[e].flip("resize",!0);x._updateShadow.call(this),t.opts.autoCenter&&this.turn("center")},_removeMv:function(e){var t,a=this.data();for(t=0;t<a.pageMv.length;t++)if(a.pageMv[t]==e)return a.pageMv.splice(t,1),!0;return!1},_addMv:function(e){var t=this.data();x._removeMv.call(this,e),t.pageMv.push(e)},_view:function(e){var t=this.data();e=e||t.page;return"double"==t.display?e%2?[e-1,e]:[e,e+1]:[e]},view:function(e){var t=this.data();e=x._view.call(this,e);return"double"==t.display?[0<e[0]?e[0]:0,e[1]<=t.totalPages?e[1]:0]:[0<e[0]&&e[0]<=t.totalPages?e[0]:0]},stop:function(e,t){if(this.turn("animating")){var a,o,i,r=this.data();for(r.tpage&&(r.page=r.tpage,delete r.tpage),a=0;a<r.pageMv.length;a++)r.pageMv[a]&&r.pageMv[a]!==e&&(o=(i=r.pages[r.pageMv[a]]).data().f.opts,i.flip("hideFoldedPage",t),t||z._moveFoldingPage.call(i,!1),o.force&&(o.next=0==o.page%2?o.page-1:o.page+1,delete o.force))}return this.turn("update"),this},pages:function(e){var t=this.data();if(e){if(e<t.totalPages)for(var a=t.totalPages;a>e;a--)this.turn("removePage",a);return t.totalPages=e,x._fitPage.call(this,t.page),this}return t.totalPages},_missing:function(e){var t=this.data();if(!(1>t.totalPages)){var a=this.turn("range",e),o=[];for(e=a[0];e<=a[1];e++)t.pageObjs[e]||o.push(e);0<o.length&&this.trigger("missing",[o])}},_fitPage:function(e){var t=this.data(),a=this.turn("view",e);if(x._missing.call(this,e),t.pageObjs[e]){t.page=e,this.turn("stop");for(var o=0;o<a.length;o++)a[o]&&t.pageZoom[a[o]]!=t.zoom&&(this.trigger("zoomed",[a[o],a,t.pageZoom[a[o]],t.zoom]),t.pageZoom[a[o]]=t.zoom);x._removeFromDOM.call(this),x._makeRange.call(this),x._updateShadow.call(this),this.trigger("turned",[e,a]),this.turn("update"),t.opts.autoCenter&&this.turn("center")}},_turnPage:function(t){var a,o,i=this.data(),r=i.pagePlace[t],n=this.turn("view"),s=this.turn("view",t);if(i.page!=t){var d=i.page;if("prevented"==c("turning",this,[t,s]))return void(d==i.page&&-1!=e.inArray(r,i.pageMv)&&i.pages[r].flip("hideFoldedPage",!0));-1!=e.inArray(1,s)&&this.trigger("first"),-1!=e.inArray(i.totalPages,s)&&this.trigger("last")}"single"==i.display?(a=n[0],o=s[0]):n[1]&&t>n[1]?(a=n[1],o=s[0]):n[0]&&t<n[0]&&(a=n[0],o=s[1]),r=i.opts.turnCorners.split(","),s=(n=i.pages[a].data().f).opts,d=n.point,x._missing.call(this,t),i.pageObjs[t]&&(this.turn("stop"),i.page=t,x._makeRange.call(this),i.tpage=o,s.next!=o&&(s.next=o,s.force=!0),this.turn("update"),n.point=d,"hard"==n.effect?"ltr"==i.direction?i.pages[a].flip("turnPage",t>a?"r":"l"):i.pages[a].flip("turnPage",t>a?"l":"r"):"ltr"==i.direction?i.pages[a].flip("turnPage",r[t>a?1:0]):i.pages[a].flip("turnPage",r[t>a?0:1]))},page:function(t){var a=this.data();if(void 0===t)return a.page;if(!a.disabled&&!a.destroying){if(0<(t=parseInt(t,10))&&t<=a.totalPages)return t!=a.page&&(a.done&&-1==e.inArray(t,this.turn("view"))?x._turnPage.call(this,t):x._fitPage.call(this,t)),this;throw u("The page "+t+" does not exist")}},next:function(){return this.turn("page",Math.min(this.data().totalPages,x._view.call(this,this.data().page).pop()+1))},previous:function(){return this.turn("page",Math.max(1,x._view.call(this,this.data().page).shift()-1))},peel:function(e,t){var a=this.data(),o=this.turn("view");t=void 0===t||!0===t;return!1===e?this.turn("stop",null,t):"single"==a.display?a.pages[a.page].flip("peel",e,t):(o="ltr"==a.direction?-1!=e.indexOf("l")?o[0]:o[1]:-1!=e.indexOf("l")?o[1]:o[0],a.pages[o]&&a.pages[o].flip("peel",e,t)),this},_addMotionPage:function(){var t=e(this).data().f.opts,a=t.turn;a.data(),x._addMv.call(a,t.page)},_eventStart:function(e,t,a){var o=t.turn.data(),i=o.pageZoom[t.page];e.isDefaultPrevented()||(i&&i!=o.zoom&&(t.turn.trigger("zoomed",[t.page,t.turn.turn("view",t.page),i,o.zoom]),o.pageZoom[t.page]=o.zoom),"single"==o.display&&a&&("l"==a.charAt(1)&&"ltr"==o.direction||"r"==a.charAt(1)&&"rtl"==o.direction?(t.next=t.next<t.page?t.next:t.page-1,t.force=!0):t.next=t.next>t.page?t.next:t.page+1),x._addMotionPage.call(e.target)),x._updateShadow.call(t.turn)},_eventEnd:function(t,a,o){e(t.target).data();var i=(t=a.turn).data();o?((o=i.tpage||i.page)==a.next||o==a.page)&&(delete i.tpage,x._fitPage.call(t,o||a.next,!0)):(x._removeMv.call(t,a.page),x._updateShadow.call(t),t.turn("update"))},_eventPressed:function(t){var a=(t=e(t.target).data().f).opts.turn;return a.data().mouseAction=!0,a.turn("update"),t.time=(new Date).getTime()},_eventReleased:function(t,a){var o,i=(o=e(t.target)).data().f,r=i.opts.turn,n=r.data();o="single"==n.display?"br"==a.corner||"tr"==a.corner?a.x<o.width()/2:a.x>o.width()/2:0>a.x||a.x>o.width(),(200>(new Date).getTime()-i.time||o)&&(t.preventDefault(),x._turnPage.call(r,i.opts.next)),n.mouseAction=!1},_flip:function(t){t.stopPropagation(),(t=e(t.target).data().f.opts).turn.trigger("turn",[t.next]),t.turn.data().opts.autoCenter&&t.turn.turn("center",t.next)},_touchStart:function(){var e,t=this.data();for(e in t.pages)if(s(e,t.pages)&&!1===z._eventStart.apply(t.pages[e],arguments))return!1},_touchMove:function(){var e,t=this.data();for(e in t.pages)s(e,t.pages)&&z._eventMove.apply(t.pages[e],arguments)},_touchEnd:function(){var e,t=this.data();for(e in t.pages)s(e,t.pages)&&z._eventEnd.apply(t.pages[e],arguments)},calculateZ:function(e){var t,a,o,i,r=this,n=this.data(),s=(t=this.turn("view"))[0]||t[1],d=e.length-1,l={pageZ:{},partZ:{},pageV:{}},c=function(e){(e=r.turn("view",e))[0]&&(l.pageV[e[0]]=!0),e[1]&&(l.pageV[e[1]]=!0)};for(t=0;t<=d;t++)a=e[t],o=n.pages[a].data().f.opts.next,i=n.pagePlace[a],c(a),c(o),a=n.pagePlace[o]==o?o:a,l.pageZ[a]=n.totalPages-Math.abs(s-a),l.partZ[i]=2*n.totalPages-d+t;return l},update:function(){var t,a=this.data();if(this.turn("animating")&&0!==a.pageMv[0]){var o,i=this.turn("calculateZ",a.pageMv),r=this.turn("corner"),n=this.turn("view"),d=this.turn("view",a.tpage);for(t in a.pageWrap)s(t,a.pageWrap)&&(o=a.pageObjs[t].hasClass("fixed"),a.pageWrap[t].css({display:i.pageV[t]||o?"":"none",zIndex:(a.pageObjs[t].hasClass("hard")?i.partZ[t]:i.pageZ[t])||(o?-1:0)}),o=a.pages[t])&&(o.flip("z",i.partZ[t]||null),i.pageV[t]&&o.flip("resize"),a.tpage?o.flip("hover",!1).flip("disable",-1==e.inArray(parseInt(t,10),a.pageMv)&&t!=d[0]&&t!=d[1]):o.flip("hover",!1===r).flip("disable",t!=n[0]&&t!=n[1]))}else for(t in a.pageWrap)s(t,a.pageWrap)&&(i=x._setPageLoc.call(this,t),a.pages[t]&&a.pages[t].flip("disable",a.disabled||1!=i).flip("hover",!0).flip("z",null));return this},_updateShadow:function(){var t,o,i=this.data(),r=this.width(),n=this.height(),s="single"==i.display?r:r/2;t=this.turn("view"),i.shadow||(i.shadow=e("<div />",{class:"shadow",css:a(0,0,0).css}).appendTo(this));for(var d=0;d<i.pageMv.length&&t[0]&&t[1];d++)t=this.turn("view",i.pages[i.pageMv[d]].data().f.opts.next),o=this.turn("view",i.pageMv[d]),t[0]=t[0]&&o[0],t[1]=t[1]&&o[1];switch(t[0]?t[1]?3:"ltr"==i.direction?2:1:"ltr"==i.direction?1:2){case 1:i.shadow.css({width:s,height:n,top:0,left:s});break;case 2:i.shadow.css({width:s,height:n,top:0,left:0});break;case 3:i.shadow.css({width:r,height:n,top:0,left:0})}},_setPageLoc:function(e){var t=this.data(),a=this.turn("view"),o=0;if(e==a[0]||e==a[1]?o=1:("single"==t.display&&e==a[0]+1||"double"==t.display&&e==a[0]-2||e==a[1]+2)&&(o=2),!this.turn("animating"))switch(o){case 1:t.pageWrap[e].css({zIndex:t.totalPages,display:""});break;case 2:t.pageWrap[e].css({zIndex:t.totalPages-1,display:""});break;case 0:t.pageWrap[e].css({zIndex:0,display:t.pageObjs[e].hasClass("fixed")?"":"none"})}return o},options:function(t){if(void 0===t)return this.data().opts;var a=this.data();if(e.extend(a.opts,t),t.pages&&this.turn("pages",t.pages),t.page&&this.turn("page",t.page),t.display&&this.turn("display",t.display),t.direction&&this.turn("direction",t.direction),t.width&&t.height&&this.turn("size",t.width,t.height),t.when)for(var o in t.when)s(o,t.when)&&this.unbind(o).bind(o,t.when[o]);return this},version:function(){return"4.1.0"}},z={init:function(e){return this.data({f:{disabled:!1,hover:!1,effect:this.hasClass("hard")?"hard":"sheet"}}),this.flip("options",e),z._addPageWrapper.call(this),this},setData:function(t){var a=this.data();return a.f=e.extend(a.f,t),this},options:function(t){var a=this.data().f;return t?(z.setData.call(this,{opts:e.extend({},a.opts||M,t)}),this):a.opts},z:function(e){var t=this.data().f;return t.opts["z-index"]=e,t.fwrapper&&t.fwrapper.css({zIndex:e||parseInt(t.parent.css("z-index"),10)||0}),this},_cAllowed:function(){var e=this.data().f,t=e.opts.page,a=e.opts.turn.data(),o=t%2;return"hard"==e.effect?"ltr"==a.direction?[o?"r":"l"]:[o?"l":"r"]:"single"==a.display?1==t?"ltr"==a.direction?w.forward:w.backward:t==a.totalPages?"ltr"==a.direction?w.backward:w.forward:w.all:"ltr"==a.direction?w[o?"forward":"backward"]:w[o?"backward":"forward"]},_cornerActivated:function(t){var a=this.data().f,o=this.width(),i=this.height(),r=(t={x:t.x,y:t.y,corner:""},a.opts.cornerSize);if(0>=t.x||0>=t.y||t.x>=o||t.y>=i)return!1;var n=z._cAllowed.call(this);switch(a.effect){case"hard":if(t.x>o-r)t.corner="r";else{if(!(t.x<r))return!1;t.corner="l"}break;case"sheet":if(t.y<r)t.corner+="t";else{if(!(t.y>=i-r))return!1;t.corner+="b"}if(t.x<=r)t.corner+="l";else{if(!(t.x>=o-r))return!1;t.corner+="r"}}return!(!t.corner||-1==e.inArray(t.corner,n))&&t},_isIArea:function(e){var t=this.data().f.parent.offset();e=y&&e.originalEvent?e.originalEvent.touches[0]:e;return z._cornerActivated.call(this,{x:e.pageX-t.left,y:e.pageY-t.top})},_c:function(e,t){switch(t=t||0,e){case"tl":return i(t,t);case"tr":return i(this.width()-t,t);case"bl":return i(t,this.height()-t);case"br":return i(this.width()-t,this.height()-t);case"l":return i(t,0);case"r":return i(this.width()-t,0)}},_c2:function(e){switch(e){case"tl":return i(2*this.width(),0);case"tr":return i(-this.width(),0);case"bl":return i(2*this.width(),this.height());case"br":return i(-this.width(),this.height());case"l":return i(2*this.width(),0);case"r":return i(-this.width(),0)}},_foldingPage:function(){var e=this.data().f;if(e){var t=e.opts;if(t.turn)return"single"==(e=t.turn.data()).display?1<t.next||1<t.page?e.pageObjs[0]:null:e.pageObjs[t.next]}},_backGradient:function(){var t=this.data().f,o=t.opts.turn.data();return(o=o.opts.gradients&&("single"==o.display||2!=t.opts.page&&t.opts.page!=o.totalPages-1))&&!t.bshadow&&(t.bshadow=e("<div/>",a(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(t.parent)),o},type:function(){return this.data().f.effect},resize:function(e){var t=this.data().f,a=t.opts.turn.data(),o=this.width(),i=this.height();switch(t.effect){case"hard":e&&(t.wrapper.css({width:o,height:i}),t.fpage.css({width:o,height:i}),a.opts.gradients&&(t.ashadow.css({width:o,height:i}),t.bshadow.css({width:o,height:i})));break;case"sheet":e&&(e=Math.round(Math.sqrt(Math.pow(o,2)+Math.pow(i,2))),t.wrapper.css({width:e,height:e}),t.fwrapper.css({width:e,height:e}).children(":first-child").css({width:o,height:i}),t.fpage.css({width:o,height:i}),a.opts.gradients&&t.ashadow.css({width:o,height:i}),z._backGradient.call(this)&&t.bshadow.css({width:o,height:i})),t.parent.is(":visible")&&(a=p(t.parent[0]),t.fwrapper.css({top:a.top,left:a.left}),a=p(t.opts.turn[0]),t.fparent.css({top:-a.top,left:-a.left})),this.flip("z",t.opts["z-index"])}},_addPageWrapper:function(){var t=this.data().f,o=t.opts.turn.data(),i=this.parent();if(t.parent=i,!t.wrapper)switch(t.effect){case"hard":(r={})[g+"transform-style"]="preserve-3d",r[g+"backface-visibility"]="hidden",t.wrapper=e("<div/>",a(0,0,2)).css(r).appendTo(i).prepend(this),t.fpage=e("<div/>",a(0,0,1)).css(r).appendTo(i),o.opts.gradients&&(t.ashadow=e("<div/>",a(0,0,0)).hide().appendTo(i),t.bshadow=e("<div/>",a(0,0,0)));break;case"sheet":var r=this.width();this.height();t.fparent=t.opts.turn.data().fparent,t.fparent||((r=e("<div/>",{css:{"pointer-events":"none"}}).hide()).data().flips=0,r.css(a(0,0,"auto","visible").css).appendTo(t.opts.turn),t.opts.turn.data().fparent=r,t.fparent=r),this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),t.wrapper=e("<div/>",a(0,0,this.css("z-index"))).appendTo(i).prepend(this),t.fwrapper=e("<div/>",a(i.offset().top,i.offset().left)).hide().appendTo(t.fparent),t.fpage=e("<div/>",a(0,0,0,"visible")).css({cursor:"default"}).appendTo(t.fwrapper),o.opts.gradients&&(t.ashadow=e("<div/>",a(0,0,1)).appendTo(t.fpage)),z.setData.call(this,t)}z.resize.call(this,!0)},_fold:function(e){var t=this.data().f,a=t.opts.turn.data(),o=z._c.call(this,e.corner),s=this.width(),d=this.height();switch(t.effect){case"hard":e.x="l"==e.corner?Math.min(Math.max(e.x,0),2*s):Math.max(Math.min(e.x,s),-s);var c,u,p,h,b,y=a.totalPages,_=t.opts["z-index"]||y,w={overflow:"visible"},k=o.x?(o.x-e.x)/s:e.x/s,C=90*k,P=90>C;switch(e.corner){case"l":h="0% 50%",b="100% 50%",P?(c=0,u=0<t.opts.next-1,p=1):(c="100%",u=t.opts.page+1<y,p=0);break;case"r":h="100% 50%",b="0% 50%",C=-C,s=-s,P?(c=0,u=t.opts.next+1<y,p=0):(c="-100%",u=1!=t.opts.page,p=1)}w[g+"perspective-origin"]=b,t.wrapper.transform("rotateY("+C+"deg)translate3d(0px, 0px, "+(this.attr("depth")||0)+"px)",b),t.fpage.transform("translateX("+s+"px) rotateY("+(180+C)+"deg)",h),t.parent.css(w),P?(k=1-k,t.wrapper.css({zIndex:_+1}),t.fpage.css({zIndex:_})):(k-=1,t.wrapper.css({zIndex:_}),t.fpage.css({zIndex:_+1})),a.opts.gradients&&(u?t.ashadow.css({display:"",left:c,backgroundColor:"rgba(0,0,0,"+.5*k+")"}).transform("rotateY(0deg)"):t.ashadow.hide(),t.bshadow.css({opacity:1-k}),P?t.bshadow.parent()[0]!=t.wrapper[0]&&t.bshadow.appendTo(t.wrapper):t.bshadow.parent()[0]!=t.fpage[0]&&t.bshadow.appendTo(t.fpage),l(t.bshadow,i(100*p,0),i(100*(1-p),0),[[0,"rgba(0,0,0,0.3)"],[1,"rgba(0,0,0,0)"]],2));break;case"sheet":var M,x,S,L,B,T,A,q=this,N=0,D=i(0,0),E=i(0,0),F=i(0,0),O=z._foldingPage.call(this),R=a.opts.acceleration,I=t.wrapper.height(),$="t"==e.corner.substr(0,1),j="l"==e.corner.substr(1,1),U=function(){var t=i(0,0),r=i(0,0);t.x=o.x?o.x-e.x:e.x,t.y=m?o.y?o.y-e.y:e.y:0,r.x=j?s-t.x/2:e.x+t.x/2,r.y=t.y/2;var n=v-Math.atan2(t.y,t.x),l=n-Math.atan2(r.y,r.x);l=Math.max(0,Math.sin(l)*Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)));return N=n/f*180,F=i(l*Math.sin(n),l*Math.cos(n)),n>v&&(F.x+=Math.abs(F.y*t.y/t.x),F.y=0,Math.round(F.x*Math.tan(f-n))<d)?(e.y=Math.sqrt(Math.pow(d,2)+2*r.x*t.x),$&&(e.y=d-e.y),U()):(n>v&&(t=f-n,r=I-d/Math.sin(t),D=i(Math.round(r*Math.cos(t)),Math.round(r*Math.sin(t))),j&&(D.x=-D.x),$&&(D.y=-D.y)),M=Math.round(F.y/Math.tan(n)+F.x),r=(t=s-M)*Math.cos(2*n),l=t*Math.sin(2*n),E=i(Math.round(j?t-r:M+r),Math.round($?l:d-l)),a.opts.gradients&&(B=t*Math.sin(n),t=z._c2.call(q,e.corner),t=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))/s,A=Math.sin(v*(1<t?2-t:t)),T=Math.min(t,1),L=100<B?(B-100)/B:0,x=i(B*Math.sin(n)/s*100,B*Math.cos(n)/d*100),z._backGradient.call(q)&&(S=i(1.2*B*Math.sin(n)/s*100,1.2*B*Math.cos(n)/d*100),j||(S.x=100-S.x),$||(S.y=100-S.y))),F.x=Math.round(F.x),F.y=Math.round(F.y),!0)};switch(c=function(e,o,c,u){var p=["0","auto"],h=(s-I)*c[0]/100,m=(d-I)*c[1]/100,g=(o={left:p[o[0]],top:p[o[1]],right:p[o[2]],bottom:p[o[3]]},p={},90!=u&&-90!=u?j?-1:1:0),f=c[0]+"% "+c[1]+"%";q.css(o).transform(n(u)+r(e.x+g,e.y,R),f),t.fpage.css(o).transform(n(u)+r(e.x+E.x-D.x-s*c[0]/100,e.y+E.y-D.y-d*c[1]/100,R)+n((180/u-2)*u),f),t.wrapper.transform(r(-e.x+h-g,-e.y+m,R)+n(-u),f),t.fwrapper.transform(r(-e.x+D.x+h,-e.y+D.y+m,R)+n(-u),f),a.opts.gradients&&(c[0]&&(x.x=100-x.x),c[1]&&(x.y=100-x.y),p["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*A+")",O.css(p),l(t.ashadow,i(j?100:0,$?0:100),i(x.x,x.y),[[L,"rgba(0,0,0,0)"],[.8*(1-L)+L,"rgba(0,0,0,"+.2*T+")"],[1,"rgba(255,255,255,"+.2*T+")"]],3),z._backGradient.call(q)&&l(t.bshadow,i(j?0:100,$?0:100),i(S.x,S.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*T+")"],[1,"rgba(0,0,0,0)"]],3))},e.corner){case"tl":e.x=Math.max(e.x,1),U(),c(F,[1,0,0,1],[100,0],N);break;case"tr":e.x=Math.min(e.x,s-1),U(),c(i(-F.x,F.y),[0,0,0,1],[0,0],-N);break;case"bl":e.x=Math.max(e.x,1),U(),c(i(F.x,-F.y),[1,1,0,0],[100,100],-N);break;case"br":e.x=Math.min(e.x,s-1),U(),c(i(-F.x,-F.y),[0,1,1,0],[0,100],N)}}t.point=e},_moveFoldingPage:function(e){var t=this.data().f;if(t){var a=t.opts.turn,o=a.data(),i=o.pagePlace;e?(i[o=t.opts.next]!=t.opts.page&&(t.folding&&z._moveFoldingPage.call(this,!1),z._foldingPage.call(this).appendTo(t.fpage),i[o]=t.opts.page,t.folding=o),a.turn("update")):t.folding&&(o.pages[t.folding]?(a=o.pages[t.folding].data().f,o.pageObjs[t.folding].appendTo(a.wrapper)):o.pageWrap[t.folding]&&o.pageObjs[t.folding].appendTo(o.pageWrap[t.folding]),t.folding in i&&(i[t.folding]=t.folding),delete t.folding)}},_showFoldedPage:function(e,t){var a=z._foldingPage.call(this),o=(n=this.data()).f,i=o.visible;if(a){if(!(i&&o.point&&o.point.corner==e.corner||(a="hover"==o.status||"peel"==o.status||o.opts.turn.data().mouseAction?e.corner:null,i=!1,"prevented"!=c("start",this,[o.opts,a]))))return!1;if(t){var r=this,n=o.point&&o.point.corner==e.corner?o.point:z._c.call(this,e.corner,1);this.animatef({from:[n.x,n.y],to:[e.x,e.y],duration:500,frame:function(t){e.x=Math.round(t[0]),e.y=Math.round(t[1]),z._fold.call(r,e)}})}else z._fold.call(this,e),n.effect&&!n.effect.turning&&this.animatef(!1);if(!i)switch(o.effect){case"hard":o.visible=!0,z._moveFoldingPage.call(this,!0),o.fpage.show(),o.opts.shadows&&o.bshadow.show();break;case"sheet":o.visible=!0,o.fparent.show().data().flips++,z._moveFoldingPage.call(this,!0),o.fwrapper.show(),o.bshadow&&o.bshadow.show()}return!0}return!1},hide:function(){var e=this.data().f,t=e.opts.turn.data(),a=z._foldingPage.call(this);switch(e.effect){case"hard":t.opts.gradients&&(e.bshadowLoc=0,e.bshadow.remove(),e.ashadow.hide()),e.wrapper.transform(""),e.fpage.hide();break;case"sheet":0==--e.fparent.data().flips&&e.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),e.wrapper.transform(""),e.fwrapper.hide(),e.bshadow&&e.bshadow.hide(),a.transform("")}return e.visible=!1,this},hideFoldedPage:function(e){var t=this.data().f;if(t.point){var a=this,r=t.point,n=function(){t.point=null,t.status="",a.flip("hide"),a.trigger("end",[t.opts,!1])};if(e){var s=z._c.call(this,r.corner),d=(e="t"==r.corner.substr(0,1)?Math.min(0,r.y-s.y)/2:Math.max(0,r.y-s.y)/2,i(r.x,r.y+e)),l=i(s.x,s.y-e);this.animatef({from:0,to:1,frame:function(e){e=o(r,d,l,s,e),r.x=e.x,r.y=e.y,z._fold.call(a,r)},complete:n,duration:800,hiding:!0})}else this.animatef(!1),n()}},turnPage:function(e){var t=this,a=this.data().f,i=a.opts.turn.data(),r=(e={corner:a.corner?a.corner.corner:e||z._cAllowed.call(this)[0]},a.point||z._c.call(this,e.corner,a.opts.turn?i.opts.elevation:0)),n=z._c2.call(this,e.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(a){a=o(r,r,n,n,a),e.x=a.x,e.y=a.y,z._showFoldedPage.call(t,e)},complete:function(){t.trigger("end",[a.opts,!0])},duration:i.opts.duration,turning:!0}),a.corner=null},moving:function(){return"effect"in this.data()},isTurning:function(){return this.flip("moving")&&this.data().effect.turning},corner:function(){return this.data().f.corner},_eventStart:function(e){var t=this.data().f,a=t.opts.turn;if(!t.corner&&!t.disabled&&!this.flip("isTurning")&&t.opts.page==a.data().pagePlace[t.opts.page]){if(t.corner=z._isIArea.call(this,e),t.corner&&z._foldingPage.call(this))return this.trigger("pressed",[t.point]),z._showFoldedPage.call(this,t.corner),!1;t.corner=null}},_eventMove:function(e){var t=this.data().f;if(!t.disabled)if(e=y?e.originalEvent.touches:[e],t.corner){var a=t.parent.offset();t.corner.x=e[0].pageX-a.left,t.corner.y=e[0].pageY-a.top,z._showFoldedPage.call(this,t.corner)}else t.hover&&!this.data().effect&&this.is(":visible")&&((e=z._isIArea.call(this,e[0]))?("sheet"==t.effect&&2==e.corner.length||"hard"==t.effect)&&(t.status="hover",t=z._c.call(this,e.corner,t.opts.cornerSize/2),e.x=t.x,e.y=t.y,z._showFoldedPage.call(this,e,!0)):"hover"==t.status&&(t.status="",z.hideFoldedPage.call(this,!0)))},_eventEnd:function(){var e=this.data().f,t=e.corner;!e.disabled&&t&&"prevented"!=c("released",this,[e.point||t])&&z.hideFoldedPage.call(this,!0),e.corner=null},disable:function(e){return z.setData.call(this,{disabled:e}),this},hover:function(e){return z.setData.call(this,{hover:e}),this},peel:function(t,a){var o=this.data().f;if(t){if(-1==e.inArray(t,w.all))throw u("Corner "+t+" is not permitted");if(-1!=e.inArray(t,z._cAllowed.call(this))){var i=z._c.call(this,t,o.opts.cornerSize/2);o.status="peel",z._showFoldedPage.call(this,{corner:t,x:i.x,y:i.y},a)}}else o.status="",z.hideFoldedPage.call(this,a);return this}};window.requestAnim=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},e.extend(e.fn,{flip:function(){return t(e(this[0]),z,arguments)},turn:function(){return t(e(this[0]),x,arguments)},transform:function(e,t){var a={};return t&&(a[g+"transform-origin"]=t),a[g+"transform"]=e,this.css(a)},animatef:function(t){var a=this.data();if(a.effect&&a.effect.stop(),t){t.to.length||(t.to=[t.to]),t.from.length||(t.from=[t.from]);for(var o=[],i=t.to.length,r=!0,n=this,s=(new Date).getTime(),d=function(){if(a.effect&&r){for(var e=[],l=Math.min(t.duration,(new Date).getTime()-s),c=0;c<i;c++)e.push(a.effect.easing(1,l,t.from[c],o[c],t.duration));t.frame(1==i?e[0]:e),l==t.duration?(delete a.effect,n.data(a),t.complete&&t.complete()):window.requestAnim(d)}},l=0;l<i;l++)o.push(t.to[l]-t.from[l]);a.effect=e.extend({stop:function(){r=!1},easing:function(e,t,a,o,i){return o*Math.sqrt(1-(t=t/i-1)*t)+a}},t),this.data(a),d()}else delete a.effect}}),e.isTouch=y,e.mouseEvents=_,e.cssPrefix=d,e.cssTransitionEnd=function(){var e,t=document.createElement("fakeelement"),a={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in a)if(void 0!==t.style[e])return a[e]},e.findPos=p}(r),function(e){function t(e){function t(e){this.name="TurnJsError",this.message=e}return t.prototype=Error(),t.prototype.constructor=t,new t(e)}function a(e,t,a){return n&&a?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "}function o(e,t){return n&&t?" scale3d("+e+", "+e+", 1) ":" scale("+e+") "}function i(e,t){return{x:e,y:t}}function r(e,t){return function(){return e.apply(t,arguments)}}var n,s={max:2,flipbook:null,easeFunction:"ease-in-out",duration:500,when:{}},d={init:function(a){var o=this,l=this.data();if(!(a=e.extend({},s,a)).flipbook||!a.flipbook.turn("is"))throw t("options.flipbook is required");if(n="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,"function"!=typeof a.max){var c=a.max;a.max=function(){return c}}for(var u in l.zoom={opts:a,axis:i(0,0),scrollPos:i(0,0),eventQueue:[],mouseupEvent:function(){return d._eMouseUp.apply(o,arguments)},eventTouchStart:r(d._eTouchStart,o),eventTouchMove:r(d._eTouchMove,o),eventTouchEnd:r(d._eTouchEnd,o),flipbookEvents:{zooming:r(d._eZoom,o),pressed:r(d._ePressed,o),released:r(d._eReleased,o),start:r(d._eStart,o),turning:r(d._eTurning,o),turned:r(d._eTurned,o),destroying:r(d._eDestroying,o)}},a.when)Object.prototype.hasOwnProperty.call(a.when,u)&&this.bind("zoom."+u,a.when[u]);for(u in l.zoom.flipbookEvents)Object.prototype.hasOwnProperty.call(l.zoom.flipbookEvents,u)&&a.flipbook.bind(u,l.zoom.flipbookEvents[u]);this.css({position:"relative",overflow:"hidden"}),e.isTouch?(a.flipbook.bind("touchstart",l.zoom.eventTouchStart).bind("touchmove",l.zoom.eventTouchMove).bind("touchend",l.zoom.eventTouchEnd),this.bind("touchstart",d._tap)):this.mousedown(d._mousedown).click(d._tap)},_tap:function(t){var a=e(this),o=a.data().zoom;!o.draggingCorner&&!o.dragging&&function e(t,a){return t[0]!=a[0]&&(!!t.attr("page")||!!t.parent()[0]&&e(t.parent(),a))}(e(t.target),a)&&(d._addEvent.call(a,"tap",t),(t=d._eventSeq.call(a))&&a.trigger(t))},_addEvent:function(e,t){var a=this.data().zoom,o=(new Date).getTime();a.eventQueue.push({name:e,timestamp:o,event:t}),10<a.eventQueue.length&&a.eventQueue.splice(0,1)},_eventSeq:function(){var t=this.data().zoom.eventQueue,a=t.length-1;return 0<a&&"tap"==t[a].name&&"tap"==t[a-1].name&&t[a].event.pageX==t[a-1].event.pageX&&t[a].event.pageY==t[a-1].event.pageY&&200>t[a].timestamp-t[a-1].timestamp&&50<t[a].timestamp-t[a-1].timestamp?e.extend(t[a].event,{type:"zoom.doubleTap"}):"tap"==t[a].name?e.extend(t[a].event,{type:"zoom.tap"}):void 0},_prepareZoom:function(){var t,a=0,o=this.data().zoom,r=1/this.zoom("value"),n=(t=o.opts.flipbook).turn("direction"),s=t.data(),d=t.offset(),l=this.offset(),c={height:t.height()},u=t.turn("view");if("double"==t.turn("display")&&t.data().opts.autoCenter?u[0]?u[1]?(c.width=t.width(),t=i(d.left-l.left,d.top-l.top)):(c.width=t.width()/2,a="ltr"==n?0:c.width,t=i("ltr"==n?d.left-l.left:d.left-l.left+c.width,d.top-l.top)):(c.width=t.width()/2,a="ltr"==n?c.width:0,t=i("ltr"==n?d.left-l.left+c.width:d.left-l.left,d.top-l.top)):(c.width=t.width(),t=i(d.left-l.left,d.top-l.top)),o.zoomer||(o.zoomer=e("<div />",{class:"zoomer",css:{overflow:"hidden",position:"absolute",zIndex:"1000000"}}).mousedown((function(){return!1})).appendTo(this)),o.zoomer.css({top:t.y,left:t.x,width:c.width,height:c.height}),(n=u.join(","))!=o.zoomerView)for(o.zoomerView=n,o.zoomer.find("*").remove(),n=0;n<u.length;n++)if(u[n]){l=s.pageObjs[u[n]].offset();var p=e(s.pageObjs[u[n]]);p.clone().transform("").css({width:p.width()*r,height:p.height()*r,position:"absolute",display:"",top:(l.top-d.top)*r,left:(l.left-d.left-a)*r}).appendTo(o.zoomer)}return{pos:t,size:c}},value:function(){return this.data().zoom.opts.flipbook.turn("zoom")},zoomIn:function(t){var r=this,n=this.data().zoom,s=n.opts.flipbook,l=n.opts.max();s.offset();var c=this.offset();if(n.zoomIn)return this;s.turn("stop");var u=e.Event("zoom.change");if(this.trigger(u,[l]),u.isDefaultPrevented())return this;var p=(v=d._prepareZoom.call(this)).pos,h=i(v.size.width/2,v.size.height/2),m=(u=e.cssPrefix(),e.cssTransitionEnd()),g=s.data().opts.autoCenter;n.scale=l,s.data().noCenter=!0,(0>(t=void 0!==t?"x"in t&&"y"in t?i(t.x-p.x,t.y-p.y):e.isTouch?i(t.originalEvent.touches[0].pageX-p.x-c.left,t.originalEvent.touches[0].pageY-p.y-c.top):i(t.pageX-p.x-c.left,t.pageY-p.y-c.top):i(h.x,h.y)).x||0>t.y||t.x>v.width||t.y>v.height)&&(t.x=h.x,t.y=h.y);var f=i((t.x-h.x)*l+h.x,(t.y-h.y)*l+h.y),v=(t=i(v.size.width*l>this.width()?t.x-f.x:0,v.size.height*l>this.height()?t.y-f.y:0),f=i(Math.abs(v.size.width*l-this.width()),Math.abs(v.size.height*l-this.height())),i(Math.min(0,v.size.width*l-this.width()),Math.min(0,v.size.height*l-this.height()))),b=i(h.x*l-h.x-p.x-t.x,h.y*l-h.y-p.y-t.y);b.y>f.y?t.y=b.y-f.y+t.y:b.y<v.y&&(t.y=b.y-v.y+t.y),b.x>f.x?t.x=b.x-f.x+t.x:b.x<v.x&&(t.x=b.x-v.x+t.x),b=i(h.x*l-h.x-p.x-t.x,h.y*l-h.y-p.y-t.y),(p={})[u+"transition"]=u+"transform "+n.opts.easeFunction+" "+n.opts.duration+"ms";var y=function(){r.trigger("zoom.zoomIn"),n.zoomIn=!0,n.flipPosition=i(s.css("left"),s.css("top")),s.turn("zoom",l).css({position:"absolute",margin:"",top:0,left:0});var t=s.offset();n.axis=i(t.left-c.left,t.top-c.top),g&&"double"==s.turn("display")&&("ltr"==s.turn("direction")&&!s.turn("view")[0]||"rtl"==s.turn("direction")&&!s.turn("view")[1])&&(n.axis.x+=s.width()/2),r.zoom("scroll",b),r.bind(e.mouseEvents.down,d._eMouseDown),r.bind(e.mouseEvents.move,d._eMouseMove),e(document).bind(e.mouseEvents.up,n.mouseupEvent),r.bind("mousewheel",d._eMouseWheel),setTimeout((function(){n.zoomer.hide(),n.zoomer.remove(),n.zoomer=null,n.zoomerView=null}),50)};return n.zoomer.css(p).show(),m?n.zoomer.bind(m,(function(){e(this).unbind(m),y()})):setTimeout(y,n.opts.duration),n.zoomer.transform(a(t.x,t.y,!0)+o(l,!0)),this},zoomOut:function(t){var r,n=this,s=this.data().zoom,l=s.opts.flipbook,c=1/s.scale,u=e.cssPrefix(),p=e.cssTransitionEnd();if(r=this.offset(),t=void 0!==t?t:s.opts.duration,s.zoomIn){var h=e.Event("zoom.change");if(this.trigger(h,[1]),h.isDefaultPrevented())return this;s.zoomIn=!1,s.scale=1,l.data().noCenter=!1,n.unbind(e.mouseEvents.down,d._eMouseDown),n.unbind(e.mouseEvents.move,d._eMouseMove),e(document).unbind(e.mouseEvents.up,s.mouseupEvent),n.unbind("mousewheel",d._eMouseWheel),(h={})[u+"transition"]=u+"transform "+s.opts.easeFunction+" "+t+"ms",l.css(h);var m=e("<div />",{css:{position:"relative",top:s.flipPosition.y,left:s.flipPosition.x,width:l.width()*c,height:l.height()*c,background:"blue"}}).appendTo(l.parent());h=i(m.offset().left-r.left,m.offset().top-r.top);m.remove();var g=l.data().opts.autoCenter;g&&"double"==l.turn("display")&&(l.turn("view")[0]?l.turn("view")[1]||(h.x="ltr"==l.turn("direction")?h.x+m.width()/4:h.x-m.width()/4):h.x="ltr"==l.turn("direction")?h.x-m.width()/4:h.x+m.width()/4);var f=e.findPos(l[0]);r=i(-l.width()/2-f.left+m.width()/2+h.x+r.left,-l.height()/2-f.top+m.height()/2+h.y+r.top);var v=function(){l[0].style.removeProperty?(l[0].style.removeProperty(u+"transition"),l.transform(l.turn("options").acceleration?a(0,0,!0):"").turn("zoom",1),l[0].style.removeProperty("margin"),l.css({position:"relative",top:s.flipPosition.y,left:s.flipPosition.x})):l.transform("none").turn("zoom",1).css({margin:"",top:s.flipPosition.y,left:s.flipPosition.x,position:"relative"}),g&&l.turn("center"),n.trigger("zoom.zoomOut")};return 0===t?v():(p?l.bind(p,(function(){e(this).unbind(p),v()})):setTimeout(v,t),l.transform(a(r.x,r.y,!0)+o(c,!0))),this}},flipbookWidth:function(){var e=this.data().zoom.opts.flipbook,t=e.turn("view");return"double"!=e.turn("display")||t[0]&&t[1]?e.width():e.width()/2},scroll:function(t,o,r){var s=this.data().zoom,d=s.opts.flipbook,l=this.zoom("flipbookWidth"),c=e.cssPrefix();if(n){var u={};u[c+"transition"]=r?c+"transform 200ms":"none",d.css(u),d.transform(a(-s.axis.x-t.x,-s.axis.y-t.y,!0))}else d.css({top:-s.axis.y-t.y,left:-s.axis.x-t.x});if(!o){var p;o=i(Math.min(0,(l-this.width())/2),Math.min(0,(d.height()-this.height())/2)),d=i(l>this.width()?l-this.width():(l-this.width())/2,d.height()>this.height()?d.height()-this.height():(d.height()-this.height())/2);t.y<o.y?(t.y=o.y,p=!0):t.y>d.y&&(t.y=d.y,p=!0),t.x<o.x?(t.x=o.x,p=!0):t.x>d.x&&(t.x=d.x,p=!0),p&&this.zoom("scroll",t,!0,!0)}s.scrollPos=i(t.x,t.y)},resize:function(){var e=this.data().zoom,t=e.opts.flipbook;if(1<this.zoom("value")){var a=t.offset(),o=this.offset();e.axis=i(a.left-o.left+(e.axis.x+e.scrollPos.x),a.top-o.top+(e.axis.y+e.scrollPos.y)),"double"==t.turn("display")&&"ltr"==t.turn("direction")&&!t.turn("view")[0]&&(e.axis.x+=t.width()/2),this.zoom("scroll",e.scrollPos)}},_eZoom:function(){for(var e=this.data().zoom,t=e.opts.flipbook,a=t.turn("view"),o=0;o<a.length;o++)a[o]&&this.trigger("zoom.resize",[e.scale,a[o],t.data().pageObjs[a[o]]])},_eStart:function(e){1!=this.zoom("value")&&e.preventDefault()},_eTurning:function(e,t,a){var o=this,i=(e=this.zoom("value"),this.data().zoom);t=i.opts.flipbook;if(i.page=t.turn("page"),1!=e){for(i=0;i<a.length;i++)a[i]&&this.trigger("zoom.resize",[e,a[i],t.data().pageObjs[a[i]]]);setTimeout((function(){o.zoom("resize")}),0)}},_eTurned:function(e,t){if(1!=this.zoom("value")){var a=this.data().zoom,o=a.opts.flipbook;t>a.page?this.zoom("scroll",i(0,a.scrollPos.y),!1,!0):t<a.page&&this.zoom("scroll",i(o.width(),a.scrollPos.y),!1,!0)}},_ePressed:function(){e(this).data().zoom.draggingCorner=!0},_eReleased:function(){var t=e(this).data().zoom;setTimeout((function(){t.draggingCorner=!1}),1)},_eMouseDown:function(t){return e(this).data().zoom.draggingCur=e.isTouch?i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY):i(t.pageX,t.pageY),!1},_eMouseMove:function(t){var a=e(this).data().zoom;if(a.draggingCur){a.dragging=!0;t=e.isTouch?i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY):i(t.pageX,t.pageY);var o=i(t.x-a.draggingCur.x,t.y-a.draggingCur.y);return e(this).zoom("scroll",i(a.scrollPos.x-o.x,a.scrollPos.y-o.y),!0),a.draggingCur=t,!1}},_eMouseUp:function(){var t=e(this).data().zoom;t.dragging&&e(this).zoom("scroll",t.scrollPos),t.draggingCur=null,setTimeout((function(){t.dragging=!1}),1)},_eMouseWheel:function(t,a,o,r){o=i((t=e(this).data().zoom).scrollPos.x+10*o,t.scrollPos.y-10*r),e(this).zoom("scroll",o,!1,!0)},_eTouchStart:function(t){var a=e(this).data().zoom;t=i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY);a.touch={},a.touch.initial=t,a.touch.last=t,a.touch.timestamp=(new Date).getTime(),a.touch.speed=i(0,0)},_eTouchMove:function(t){var a=e(this).data().zoom,o=e(this).zoom("value"),r=a.opts.flipbook,n=(new Date).getTime();t=i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY);a.touch&&1==o&&!r.data().mouseAction&&(a.touch.motion=i(t.x-a.touch.last.x,t.y-a.touch.last.y),a.touch.speed.x=0===a.touch.speed.x?a.touch.motion.x/(n-a.touch.timestamp):(a.touch.speed.x+a.touch.motion.x/(n-a.touch.timestamp))/2,a.touch.last=t,a.touch.timestamp=n)},_eTouchEnd:function(){var t=e(this).data().zoom;if(t.touch&&1==e(this).zoom("value")){var a=Math.abs(t.touch.initial.y-t.touch.last.y);50>a&&(-1>t.touch.speed.x||-100>t.touch.last.x-t.touch.initial.x)?this.trigger("zoom.swipeLeft"):50>a&&(1<t.touch.speed.x||100<t.touch.last.x-t.touch.initial.x)&&this.trigger("zoom.swipeRight")}},_eDestroying:function(){var t=this,a=this.data().zoom,o=a.opts.flipbook;for(var i in this.zoom("zoomOut",0),e.each("tap doubleTap resize zoomIn zoomOut swipeLeft swipeRight".split(" "),(function(e,a){t.unbind("zoom."+a)})),a.flipbookEvents)Object.prototype.hasOwnProperty.call(a.flipbookEvents,i)&&o.unbind(i,a.flipbookEvents[i]);o.unbind("touchstart",a.eventTouchStart).unbind("touchmove",a.eventTouchMove).unbind("touchend",a.eventTouchEnd),this.unbind("touchstart",d._tap).unbind("click",d._tap),a=null,this.data().zoom=null}};e.extend(e.fn,{zoom:function(){var a=arguments;if(!a[0]||"object"==b(a[0]))return d.init.apply(e(this[0]),a);if(d[a[0]])return d[a[0]].apply(e(this[0]),Array.prototype.slice.call(a,1));throw t(a[0]+" is not a method")}})}(r);for(var G=r,Y=require("axios"),K=A({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-box"},[a("div",{staticClass:"flipbook-container",class:e.book_format},[e.isLoading&&e.loader?a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]):e._e(),e._v(" "),a("div",{staticClass:"book-centered",style:e.centered?{"margin-left":e.isCover+"px"}:null},[!e.isLoading&&e.loader?a("div",{staticClass:"arrow-animate"},[a("Icon",{attrs:{name:"arrow-right",size:"lg",fill:e.preview_color,stroke:"transparent"}})],1):e._e(),e._v(" "),a("div",{staticClass:"preview-desktop",class:e.isLoading?"invisible":"visible",attrs:{dir:"ltr"}},[a("div",{staticClass:"flipbook-lib",class:[e.formato],attrs:{id:"flipbook"}})])])]),e._v(" "),e.controls&&0==e.isLoading?a("div",{staticClass:"controls",attrs:{dir:e.dir}},[a("div",[1!=e.currentPage?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheLeft}},[a("Icon",{attrs:{name:"chevron-left",stroke:"transparent",size:"md",fill:e.preview_color}})],1):e._e()],1),e._v(" "),a("div",[e.currentPage!=e.pages?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheRight}},[a("Icon",{attrs:{name:"chevron-right",stroke:"transparent",fill:e.preview_color,size:"md"}})],1):e._e()],1)]):e._e()])},staticRenderFns:[]},void 0,{name:"Preview",components:{Icon:D,Button:E},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0,default:32},/** Book format. `5` */book_format:{type:String,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** The five first pages. `https://builder.dentrodahistoria.com.br/api/builder/getpreview/ddh5e177ff920f15?page=X` */preloaded_pages:{type:Array,required:!1},/** Download and convert preloaded images to base64. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},dir:{type:String,default:"ltr",required:!1},zoom:{type:Boolean,default:!1},/** Show preview controls */controls:{type:Boolean,default:!0},/** Center book on first and last page */centered:{type:Boolean,default:!0},/** Show loader */loader:{type:Boolean,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},/** APK do builder (opcional) */builder_apk:{type:String,required:!1},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},typeRead:{type:Boolean,required:!1,default:!1}},data:function(){return{formato:"a4",bookDimensions:{widthPlaceholder:100,width:800},flipbookWidth:null,flipbookHeight:null,isCover:0,currentPage:1,loadedPages:5,numberPositions:0,isLoading:!0,lang:z(this.typeLanguage),_destroyed:!1,_onResize:null}},mounted:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,e._destroyed=!1,"square"==e.book_format?e.formato="square":e.formato="a4",t.n=1,e.createInitialPages();case 1:t.v&&(e.initBook(),e._onResize=function(){if(!a._destroyed){var e=W(G);if(e){var t=a.resize();e.turn("size",t.width,t.height),e.turn("resize"),a.updated()}}},window.addEventListener("resize",e._onResize),e.loader,//setTimeout(function () {
|
|
538
|
-
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return
|
|
539
|
-
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&builder_apk="+encodeURIComponent(o.builder_apk)),a.n=1,
|
|
540
|
-
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%' firstPage='true'></div>";case 3:r++,t.n=1;break;case 4:return
|
|
548
|
+
e>=t&&(this.floatingSubmenu=!0,0==this.oldMenuMobilePosition&&(this.oldMenuMobilePosition=t)),e<this.oldMenuMobilePosition&&(this.floatingSubmenu=!1)},detectSize:function(){this.isMobile=!1,window.innerWidth<990&&(this.isMobile=!0)},onClick:function(e){this.$emit("click",e)},onClickMenu:function(e){this.$emit("clickMenu",e)},clickContinue:function(){this.$emit("clickContinue",null)}}},"data-v-2cdf7fe0",!1,void 0,!1,void 0,void 0,void 0),V=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bottom-bar",class:e.dir,style:e.colorsVar},[e.isMobile?e._e():a("div",{staticClass:"book-area"},[a("div",{staticClass:"book-cover"},[e.imageAsset?a("img",{attrs:{src:e.imageAsset,width:"46",alt:""}}):a("div",{staticClass:"placeholder-loading"},[e._m(0),e._v(" "),"livro"===e.productType?a("div",["a4"==e.book_format?a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/placeholder-a4.jpg",width:"46",alt:""}}):a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/placeholder-square.jpg",width:"46",alt:""}})]):e._e(),e._v(" "),"wallpaper"===e.productType?a("div",[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/placeholder-wallpaper-loading.jpg",width:"44",alt:""}})]):e._e(),e._v(" "),"poster"===e.productType?a("div",[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/placeholder-poster-loading.jpg",width:"46",alt:""}})]):e._e()])]),e._v(" "),a("div",{staticClass:"book-info"},[a("div",[e.book_brand?a("Paragraph",{attrs:{size:"sm",color:"#68596E"}},[e._v(e._s(e.book_brand))]):e._e(),e._v(" "),e.book_name?a("Paragraph",{attrs:{size:"sm",color:"#68596E",type:"bold"}},[e._v(e._s(e.book_name))]):e._e()],1)])]),e._v(" "),a("div",{staticClass:"btn-foward"},[a("Button",{attrs:{kind:"primary",size:"md",width:"fluid"},on:{click:e.action}},[a("span",[e._v(e._s(e.continueLabelText))])])],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"loading-bg"},[t("div",{staticClass:"loading book-loading"})])}]},void 0,{name:"BottomBar",components:{Button:O,Heading:N,Paragraph:E,Icon:F,Stepper:W,VLazyImage:i},props:{uuid:{type:String,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},book_format:{type:String,required:!0},typeLanguage:{type:String,required:!1,default:"pt-BR"},productType:{type:String,required:!1,default:"livro"},dir:{type:String,default:"ltr",required:!1},continueLabel:{type:String,required:!1},builder_apk:{type:String,required:!1}},computed:{lang:function(){return S(this.typeLanguage)},continueLabelText:function(){return this.continueLabel&&this.continueLabel.length>1?this.continueLabel:this.lang.continue||"CONTINUAR"},colorsVar:function(){return{"--preview-color":this.preview_color}}},data:function(){return{isMobile:null,//coverLoading: true,
|
|
549
|
+
imageAsset:null,routes:[{path:"index",stepperName:"Etapa 2"},{path:"second",stepperName:"5 - Próximos personagens"}]}},mounted:function(){var e=this;e.isMobile=e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()}));var t="https://builder.dentrodahistoria.com.br/api/builder/getpreview/"+e.uuid+"?page=1&w=120&v=0&noCache=true";e.builder_apk&&(t+="&apk=".concat(encodeURIComponent(e.builder_apk))),e.getBase64(t)},methods:p(p(p({detectSize:function(){var e=!1;return window.innerWidth<990&&(e=!0),e},onClick:function(){this.$emit("click")},action:function(){this.$emit("changeUrl")}},"detectSize",(function(){var e=!1;return window.innerWidth<990&&(e=!0),e})),"closeModal",(function(){this.$emit("closeModal"),document.getElementsByTagName("html")[0].removeAttribute("style"),document.getElementsByTagName("body")[0].removeAttribute("style"),document.getElementsByClassName("boxes")&&document.getElementsByClassName("boxes").length>0&&document.getElementsByClassName("boxes")[0].removeAttribute("style")})),"getBase64",(function(e){var t=this;o.get(e,{responseType:"arraybuffer"}).then((function(e){t.imageAsset="data:image/png;base64,"+Buffer.from(e.data,"binary").toString("base64")}))}))},"data-v-06b89b9f",!1,void 0,!1,void 0,void 0,void 0);/* template */function J(e){var t=e("#flipbook");if(!t.length)return null;try{if(t.turn("is"))return t}catch(e){return null}return null}function G(e){var t=J(e);if(!t)return null;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];return t.turn.apply(t,o)}function Y(e){var t=e("#flipbook");if(t.length)try{t.turn("is")&&t.turn("destroy")}catch(e){try{t.removeData()}catch(e){// ignore cleanup errors on already-destroyed instances
|
|
550
|
+
}}}!function(e){function t(e,t,a){if(!a[0]||"object"==b(a[0]))return t.init.apply(e,a);if(t[a[0]])return t[a[0]].apply(e,Array.prototype.slice.call(a,1));throw u(a[0]+" is not a method or property")}function a(e,t,a,o){return{css:{position:"absolute",top:e,left:t,overflow:o||"hidden",zIndex:a||"auto"}}}function o(e,t,a,o,r){var n=1-r,s=n*n*n,d=r*r*r;return i(Math.round(s*e.x+3*r*n*n*t.x+3*r*r*n*a.x+d*o.x),Math.round(s*e.y+3*r*n*n*t.y+3*r*r*n*a.y+d*o.y))}function i(e,t){return{x:e,y:t}}function r(e,t,a){return h&&a?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "}function n(e){return" rotate("+e+"deg) "}function s(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function d(){for(var e=["Moz","Webkit","Khtml","O","ms"],t=e.length,a="";t--;)e[t]+"Transform"in document.body.style&&(a="-"+e[t].toLowerCase()+"-");return a}function l(e,t,a,o,r){var n,s=[];if("-webkit-"==g){for(n=0;n<r;n++)s.push("color-stop("+o[n][0]+", "+o[n][1]+")");e.css({"background-image":"-webkit-gradient(linear, "+t.x+"% "+t.y+"%,"+a.x+"% "+a.y+"%, "+s.join(",")+" )"})}else{t={x:t.x/100*e.width(),y:t.y/100*e.height()};var d=(a={x:a.x/100*e.width(),y:a.y/100*e.height()}).x-t.x;n=a.y-t.y;var l=Math.atan2(n,d),c=l-Math.PI/2,u=(c=Math.abs(e.width()*Math.sin(c))+Math.abs(e.height()*Math.cos(c)),d=Math.sqrt(n*n+d*d),a=i(a.x<t.x?e.width():0,a.y<t.y?e.height():0),Math.tan(l));for(a=(n=-1/u)*(u=(n*a.x-a.y-u*t.x+t.y)/(n-u))-n*a.x+a.y,t=Math.sqrt(Math.pow(u-t.x,2)+Math.pow(a-t.y,2)),n=0;n<r;n++)s.push(" "+o[n][1]+" "+100*(t+d*o[n][0])/c+"%");e.css({"background-image":g+"linear-gradient("+-l+"rad,"+s.join(",")+")"})}}function c(t,a,o){return t=e.Event(t),a.trigger(t,o),t.isDefaultPrevented()?"prevented":t.isPropagationStopped()?"stopped":""}function u(e){function t(e){this.name="TurnJsError",this.message=e}return t.prototype=Error(),t.prototype.constructor=t,new t(e)}function p(e){var t={top:0,left:0};do{t.left+=e.offsetLeft,t.top+=e.offsetTop}while(e=e.offsetParent);return t}var h,m,g="",f=Math.PI,v=f/2,y="ontouchstart"in window,_=y?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},w={backward:["bl","tl"],forward:["br","tr"],all:"tl bl tr br l r".split(" ")},k=["single","double"],C=["ltr","rtl"],P={acceleration:!0,display:"double",duration:600,page:1,gradients:!0,turnCorners:"bl,br",when:null},M={cornerSize:100},x={init:function(t){var a,o;h="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,m=!(a=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent))||534.3<parseFloat(a[1]),g=d(),a=0;var i=this.data(),n=this.children();t=e.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},P,t);if(i.opts=t,i.pageObjs={},i.pages={},i.pageWrap={},i.pageZoom={},i.pagePlace={},i.pageMv=[],i.zoom=1,i.totalPages=t.pages||0,i.eventHandlers={touchStart:e.proxy(x._touchStart,this),touchMove:e.proxy(x._touchMove,this),touchEnd:e.proxy(x._touchEnd,this),start:e.proxy(x._eventStart,this)},t.when)for(o in t.when)s(o,t.when)&&this.bind(o,t.when[o]);for(this.css({position:"relative",width:t.width,height:t.height}),this.turn("display",t.display),""!==t.direction&&this.turn("direction",t.direction),h&&!y&&t.acceleration&&this.transform(r(0,0,!0)),o=0;o<n.length;o++)"1"!=e(n[o]).attr("ignore")&&this.turn("addPage",n[o],++a);return e(this).bind(_.down,i.eventHandlers.touchStart).bind("end",x._eventEnd).bind("pressed",x._eventPressed).bind("released",x._eventReleased).bind("flip",x._flip),e(this).parent().bind("start",i.eventHandlers.start),e(document).bind(_.move,i.eventHandlers.touchMove).bind(_.up,i.eventHandlers.touchEnd),this.turn("page",t.page),i.done=!0,this},addPage:function(t,a){var o,i=!1,r=this.data(),n=r.totalPages+1;if(r.destroying)return!1;if((o=/\bp([0-9]+)\b/.exec(e(t).attr("class")))&&(a=parseInt(o[1],10)),a){if(a==n)i=!0;else if(a>n)throw u('Page "'+a+'" cannot be inserted')}else a=n,i=!0;return 1<=a&&a<=n&&(o="double"==r.display?a%2?" odd":" even":"",r.done&&this.turn("stop"),a in r.pageObjs&&x._movePages.call(this,a,1),i&&(r.totalPages=n),r.pageObjs[a]=e(t).css({float:"left"}).addClass("page p"+a+o),-1!=navigator.userAgent.indexOf("MSIE 9.0")&&r.pageObjs[a].hasClass("hard")&&r.pageObjs[a].removeClass("hard"),x._addPage.call(this,a),x._removeFromDOM.call(this)),this},_addPage:function(t){var a=this.data(),o=a.pageObjs[t];if(o)if(x._necessPage.call(this,t)){if(!a.pageWrap[t]){a.pageWrap[t]=e("<div/>",{class:"page-wrapper",page:t,css:{position:"absolute",overflow:"hidden"}}),this.append(a.pageWrap[t]),a.pagePlace[t]||(a.pagePlace[t]=t,a.pageObjs[t].appendTo(a.pageWrap[t]));var i=x._pageSize.call(this,t,!0);o.css({width:i.width,height:i.height}),a.pageWrap[t].css(i)}a.pagePlace[t]==t&&x._makeFlip.call(this,t)}else a.pagePlace[t]=0,a.pageObjs[t]&&a.pageObjs[t].remove()},hasPage:function(e){return s(e,this.data().pageObjs)},center:function(t){var a=this.data(),o=e(this).turn("size"),i=0;return a.noCenter||("double"==a.display&&(t=this.turn("view",t||a.tpage||a.page),"ltr"==a.direction?t[0]?t[1]||(i+=o.width/4):i-=o.width/4:t[0]?t[1]||(i-=o.width/4):i+=o.width/4),e(this).css({marginLeft:i})),this},destroy:function(){var t=this,a=this.data(),o="end first flip last pressed released start turning turned zooming missing".split(" ");if("prevented"!=c("destroying",this)){for(a.destroying=!0,e.each(o,(function(e,a){t.unbind(a)})),this.parent().unbind("start",a.eventHandlers.start),e(document).unbind(_.move,a.eventHandlers.touchMove).unbind(_.up,a.eventHandlers.touchEnd);0!==a.totalPages;)this.turn("removePage",a.totalPages);return a.fparent&&a.fparent.remove(),a.shadow&&a.shadow.remove(),this.removeData(),a=null,this}},is:function(){return"object"==b(this.data().pages)},zoom:function(t){var a=this.data();if("number"==typeof t){if(.001>t||100<t)throw u(t+" is not a value for zoom");if("prevented"==c("zooming",this,[t,a.zoom]))return this;var o=this.turn("size"),i=this.turn("view"),r=1/a.zoom,n=Math.round(o.width*r*t);o=Math.round(o.height*r*t);for(a.zoom=t,e(this).turn("stop").turn("size",n,o),a.opts.autoCenter&&this.turn("center"),x._updateShadow.call(this),t=0;t<i.length;t++)i[t]&&a.pageZoom[i[t]]!=a.zoom&&(this.trigger("zoomed",[i[t],i,a.pageZoom[i[t]],a.zoom]),a.pageZoom[i[t]]=a.zoom);return this}return a.zoom},_pageSize:function(e,t){var a=this.data(),o={};if("single"==a.display)o.width=this.width(),o.height=this.height(),t&&(o.top=0,o.left=0,o.right="auto");else{var i=this.width()/2,r=this.height();if(a.pageObjs[e].hasClass("own-size")?(o.width=a.pageObjs[e].width(),o.height=a.pageObjs[e].height()):(o.width=i,o.height=r),t){var n=e%2;o.top=(r-o.height)/2,"ltr"==a.direction?(o[n?"right":"left"]=i-o.width,o[n?"left":"right"]="auto"):(o[n?"left":"right"]=i-o.width,o[n?"right":"left"]="auto")}}return o},_makeFlip:function(e){var t=this.data();if(!t.pages[e]&&t.pagePlace[e]==e){var a="single"==t.display,o=e%2;t.pages[e]=t.pageObjs[e].css(x._pageSize.call(this,e)).flip({page:e,next:o||a?e+1:e-1,turn:this}).flip("disable",t.disabled),x._setPageLoc.call(this,e),t.pageZoom[e]=t.zoom}return t.pages[e]},_makeRange:function(){var e,t;if(!(1>this.data().totalPages))for(e=(t=this.turn("range"))[0];e<=t[1];e++)x._addPage.call(this,e)},range:function(e){var t,a,o,i=this.data();e=e||i.tpage||i.page||1;if(o=x._view.call(this,e),1>e||e>i.totalPages)throw u('"'+e+'" is not a valid page');return o[1]=o[1]||o[0],1<=o[0]&&o[1]<=i.totalPages?(e=Math.floor(2),i.totalPages-o[1]>o[0]?a=2*e-(t=Math.min(o[0]-1,e)):t=2*e-(a=Math.min(i.totalPages-o[1],e))):a=t=5,[Math.max(1,o[0]-t),Math.min(i.totalPages,o[1]+a)]},_necessPage:function(e){if(0===e)return!0;var t=this.turn("range");return this.data().pageObjs[e].hasClass("fixed")||e>=t[0]&&e<=t[1]},_removeFromDOM:function(){var e,t=this.data();for(e in t.pageWrap)s(e,t.pageWrap)&&!x._necessPage.call(this,e)&&x._removePageFromDOM.call(this,e)},_removePageFromDOM:function(e){var t=this.data();if(t.pages[e]){var a=t.pages[e].data();z._moveFoldingPage.call(t.pages[e],!1),a.f&&a.f.fwrapper&&a.f.fwrapper.remove(),t.pages[e].removeData(),t.pages[e].remove(),delete t.pages[e]}t.pageObjs[e]&&t.pageObjs[e].remove(),t.pageWrap[e]&&(t.pageWrap[e].remove(),delete t.pageWrap[e]),x._removeMv.call(this,e),delete t.pagePlace[e],delete t.pageZoom[e]},removePage:function(e){var t=this.data();if("*"==e)for(;0!==t.totalPages;)this.turn("removePage",t.totalPages);else{if(1>e||e>t.totalPages)throw u("The page "+e+" doesn't exist");t.pageObjs[e]&&(this.turn("stop"),x._removePageFromDOM.call(this,e),delete t.pageObjs[e]),x._movePages.call(this,e,-1),t.totalPages-=1,t.page>t.totalPages?(t.page=null,x._fitPage.call(this,t.totalPages)):(x._makeRange.call(this),this.turn("update"))}return this},_movePages:function(e,t){var a,o=this,i=this.data(),r="single"==i.display,n=function(e){var a=e+t,n=a%2,s=n?" odd ":" even ";i.pageObjs[e]&&(i.pageObjs[a]=i.pageObjs[e].removeClass("p"+e+" odd even").addClass("p"+a+s)),i.pagePlace[e]&&i.pageWrap[e]&&(i.pagePlace[a]=a,i.pageWrap[a]=i.pageObjs[a].hasClass("fixed")?i.pageWrap[e].attr("page",a):i.pageWrap[e].css(x._pageSize.call(o,a,!0)).attr("page",a),i.pages[e]&&(i.pages[a]=i.pages[e].flip("options",{page:a,next:r||n?a+1:a-1})),t&&(delete i.pages[e],delete i.pagePlace[e],delete i.pageZoom[e],delete i.pageObjs[e],delete i.pageWrap[e]))};if(0<t)for(a=i.totalPages;a>=e;a--)n(a);else for(a=e;a<=i.totalPages;a++)n(a)},display:function(t){var a=this.data(),o=a.display;if(void 0===t)return o;if(-1==e.inArray(t,k))throw u('"'+t+'" is not a value for display');switch(t){case"single":a.pageObjs[0]||(this.turn("stop").css({overflow:"hidden"}),a.pageObjs[0]=e("<div />",{class:"page p-temporal"}).css({width:this.width(),height:this.height()}).appendTo(this)),this.addClass("shadow");break;case"double":a.pageObjs[0]&&(this.turn("stop").css({overflow:""}),a.pageObjs[0].remove(),delete a.pageObjs[0]),this.removeClass("shadow")}return a.display=t,o&&(t=this.turn("size"),x._movePages.call(this,1,0),this.turn("size",t.width,t.height).turn("update")),this},direction:function(t){var a=this.data();if(void 0===t)return a.direction;if(t=t.toLowerCase(),-1==e.inArray(t,C))throw u('"'+t+'" is not a value for direction');return"rtl"==t&&e(this).attr("dir","ltr").css({direction:"ltr"}),a.direction=t,a.done&&this.turn("size",e(this).width(),e(this).height()),this},animating:function(){return 0<this.data().pageMv.length},corner:function(){var e,t,a=this.data();for(t in a.pages)if(s(t,a.pages)&&(e=a.pages[t].flip("corner")))return e;return!1},data:function(){return this.data()},disable:function(t){var a,o=this.data(),i=this.turn("view");for(a in o.disabled=void 0===t||!0===t,o.pages)s(a,o.pages)&&o.pages[a].flip("disable",!!o.disabled||-1==e.inArray(parseInt(a,10),i));return this},disabled:function(e){return void 0===e?!0===this.data().disabled:this.turn("disable",e)},size:function(e,t){if(void 0===e||void 0===t)return{width:this.width(),height:this.height()};this.turn("stop");var a,o,i=this.data();for(a in o="double"==i.display?e/2:e,this.css({width:e,height:t}),i.pageObjs[0]&&i.pageObjs[0].css({width:o,height:t}),i.pageWrap)s(a,i.pageWrap)&&(o=x._pageSize.call(this,a,!0),i.pageObjs[a].css({width:o.width,height:o.height}),i.pageWrap[a].css(o),i.pages[a]&&i.pages[a].css({width:o.width,height:o.height}));return this.turn("resize"),this},resize:function(){var e,t=this.data();for(t.pages[0]&&(t.pageWrap[0].css({left:-this.width()}),t.pages[0].flip("resize",!0)),e=1;e<=t.totalPages;e++)t.pages[e]&&t.pages[e].flip("resize",!0);x._updateShadow.call(this),t.opts.autoCenter&&this.turn("center")},_removeMv:function(e){var t,a=this.data();for(t=0;t<a.pageMv.length;t++)if(a.pageMv[t]==e)return a.pageMv.splice(t,1),!0;return!1},_addMv:function(e){var t=this.data();x._removeMv.call(this,e),t.pageMv.push(e)},_view:function(e){var t=this.data();e=e||t.page;return"double"==t.display?e%2?[e-1,e]:[e,e+1]:[e]},view:function(e){var t=this.data();e=x._view.call(this,e);return"double"==t.display?[0<e[0]?e[0]:0,e[1]<=t.totalPages?e[1]:0]:[0<e[0]&&e[0]<=t.totalPages?e[0]:0]},stop:function(e,t){if(this.turn("animating")){var a,o,i,r=this.data();for(r.tpage&&(r.page=r.tpage,delete r.tpage),a=0;a<r.pageMv.length;a++)r.pageMv[a]&&r.pageMv[a]!==e&&(o=(i=r.pages[r.pageMv[a]]).data().f.opts,i.flip("hideFoldedPage",t),t||z._moveFoldingPage.call(i,!1),o.force&&(o.next=0==o.page%2?o.page-1:o.page+1,delete o.force))}return this.turn("update"),this},pages:function(e){var t=this.data();if(e){if(e<t.totalPages)for(var a=t.totalPages;a>e;a--)this.turn("removePage",a);return t.totalPages=e,x._fitPage.call(this,t.page),this}return t.totalPages},_missing:function(e){var t=this.data();if(!(1>t.totalPages)){var a=this.turn("range",e),o=[];for(e=a[0];e<=a[1];e++)t.pageObjs[e]||o.push(e);0<o.length&&this.trigger("missing",[o])}},_fitPage:function(e){var t=this.data(),a=this.turn("view",e);if(x._missing.call(this,e),t.pageObjs[e]){t.page=e,this.turn("stop");for(var o=0;o<a.length;o++)a[o]&&t.pageZoom[a[o]]!=t.zoom&&(this.trigger("zoomed",[a[o],a,t.pageZoom[a[o]],t.zoom]),t.pageZoom[a[o]]=t.zoom);x._removeFromDOM.call(this),x._makeRange.call(this),x._updateShadow.call(this),this.trigger("turned",[e,a]),this.turn("update"),t.opts.autoCenter&&this.turn("center")}},_turnPage:function(t){var a,o,i=this.data(),r=i.pagePlace[t],n=this.turn("view"),s=this.turn("view",t);if(i.page!=t){var d=i.page;if("prevented"==c("turning",this,[t,s]))return void(d==i.page&&-1!=e.inArray(r,i.pageMv)&&i.pages[r].flip("hideFoldedPage",!0));-1!=e.inArray(1,s)&&this.trigger("first"),-1!=e.inArray(i.totalPages,s)&&this.trigger("last")}"single"==i.display?(a=n[0],o=s[0]):n[1]&&t>n[1]?(a=n[1],o=s[0]):n[0]&&t<n[0]&&(a=n[0],o=s[1]),r=i.opts.turnCorners.split(","),s=(n=i.pages[a].data().f).opts,d=n.point,x._missing.call(this,t),i.pageObjs[t]&&(this.turn("stop"),i.page=t,x._makeRange.call(this),i.tpage=o,s.next!=o&&(s.next=o,s.force=!0),this.turn("update"),n.point=d,"hard"==n.effect?"ltr"==i.direction?i.pages[a].flip("turnPage",t>a?"r":"l"):i.pages[a].flip("turnPage",t>a?"l":"r"):"ltr"==i.direction?i.pages[a].flip("turnPage",r[t>a?1:0]):i.pages[a].flip("turnPage",r[t>a?0:1]))},page:function(t){var a=this.data();if(void 0===t)return a.page;if(!a.disabled&&!a.destroying){if(0<(t=parseInt(t,10))&&t<=a.totalPages)return t!=a.page&&(a.done&&-1==e.inArray(t,this.turn("view"))?x._turnPage.call(this,t):x._fitPage.call(this,t)),this;throw u("The page "+t+" does not exist")}},next:function(){return this.turn("page",Math.min(this.data().totalPages,x._view.call(this,this.data().page).pop()+1))},previous:function(){return this.turn("page",Math.max(1,x._view.call(this,this.data().page).shift()-1))},peel:function(e,t){var a=this.data(),o=this.turn("view");t=void 0===t||!0===t;return!1===e?this.turn("stop",null,t):"single"==a.display?a.pages[a.page].flip("peel",e,t):(o="ltr"==a.direction?-1!=e.indexOf("l")?o[0]:o[1]:-1!=e.indexOf("l")?o[1]:o[0],a.pages[o]&&a.pages[o].flip("peel",e,t)),this},_addMotionPage:function(){var t=e(this).data().f.opts,a=t.turn;a.data(),x._addMv.call(a,t.page)},_eventStart:function(e,t,a){var o=t.turn.data(),i=o.pageZoom[t.page];e.isDefaultPrevented()||(i&&i!=o.zoom&&(t.turn.trigger("zoomed",[t.page,t.turn.turn("view",t.page),i,o.zoom]),o.pageZoom[t.page]=o.zoom),"single"==o.display&&a&&("l"==a.charAt(1)&&"ltr"==o.direction||"r"==a.charAt(1)&&"rtl"==o.direction?(t.next=t.next<t.page?t.next:t.page-1,t.force=!0):t.next=t.next>t.page?t.next:t.page+1),x._addMotionPage.call(e.target)),x._updateShadow.call(t.turn)},_eventEnd:function(t,a,o){e(t.target).data();var i=(t=a.turn).data();o?((o=i.tpage||i.page)==a.next||o==a.page)&&(delete i.tpage,x._fitPage.call(t,o||a.next,!0)):(x._removeMv.call(t,a.page),x._updateShadow.call(t),t.turn("update"))},_eventPressed:function(t){var a=(t=e(t.target).data().f).opts.turn;return a.data().mouseAction=!0,a.turn("update"),t.time=(new Date).getTime()},_eventReleased:function(t,a){var o,i=(o=e(t.target)).data().f,r=i.opts.turn,n=r.data();o="single"==n.display?"br"==a.corner||"tr"==a.corner?a.x<o.width()/2:a.x>o.width()/2:0>a.x||a.x>o.width(),(200>(new Date).getTime()-i.time||o)&&(t.preventDefault(),x._turnPage.call(r,i.opts.next)),n.mouseAction=!1},_flip:function(t){t.stopPropagation(),(t=e(t.target).data().f.opts).turn.trigger("turn",[t.next]),t.turn.data().opts.autoCenter&&t.turn.turn("center",t.next)},_touchStart:function(){var e,t=this.data();for(e in t.pages)if(s(e,t.pages)&&!1===z._eventStart.apply(t.pages[e],arguments))return!1},_touchMove:function(){var e,t=this.data();for(e in t.pages)s(e,t.pages)&&z._eventMove.apply(t.pages[e],arguments)},_touchEnd:function(){var e,t=this.data();for(e in t.pages)s(e,t.pages)&&z._eventEnd.apply(t.pages[e],arguments)},calculateZ:function(e){var t,a,o,i,r=this,n=this.data(),s=(t=this.turn("view"))[0]||t[1],d=e.length-1,l={pageZ:{},partZ:{},pageV:{}},c=function(e){(e=r.turn("view",e))[0]&&(l.pageV[e[0]]=!0),e[1]&&(l.pageV[e[1]]=!0)};for(t=0;t<=d;t++)a=e[t],o=n.pages[a].data().f.opts.next,i=n.pagePlace[a],c(a),c(o),a=n.pagePlace[o]==o?o:a,l.pageZ[a]=n.totalPages-Math.abs(s-a),l.partZ[i]=2*n.totalPages-d+t;return l},update:function(){var t,a=this.data();if(this.turn("animating")&&0!==a.pageMv[0]){var o,i=this.turn("calculateZ",a.pageMv),r=this.turn("corner"),n=this.turn("view"),d=this.turn("view",a.tpage);for(t in a.pageWrap)s(t,a.pageWrap)&&(o=a.pageObjs[t].hasClass("fixed"),a.pageWrap[t].css({display:i.pageV[t]||o?"":"none",zIndex:(a.pageObjs[t].hasClass("hard")?i.partZ[t]:i.pageZ[t])||(o?-1:0)}),o=a.pages[t])&&(o.flip("z",i.partZ[t]||null),i.pageV[t]&&o.flip("resize"),a.tpage?o.flip("hover",!1).flip("disable",-1==e.inArray(parseInt(t,10),a.pageMv)&&t!=d[0]&&t!=d[1]):o.flip("hover",!1===r).flip("disable",t!=n[0]&&t!=n[1]))}else for(t in a.pageWrap)s(t,a.pageWrap)&&(i=x._setPageLoc.call(this,t),a.pages[t]&&a.pages[t].flip("disable",a.disabled||1!=i).flip("hover",!0).flip("z",null));return this},_updateShadow:function(){var t,o,i=this.data(),r=this.width(),n=this.height(),s="single"==i.display?r:r/2;t=this.turn("view"),i.shadow||(i.shadow=e("<div />",{class:"shadow",css:a(0,0,0).css}).appendTo(this));for(var d=0;d<i.pageMv.length&&t[0]&&t[1];d++)t=this.turn("view",i.pages[i.pageMv[d]].data().f.opts.next),o=this.turn("view",i.pageMv[d]),t[0]=t[0]&&o[0],t[1]=t[1]&&o[1];switch(t[0]?t[1]?3:"ltr"==i.direction?2:1:"ltr"==i.direction?1:2){case 1:i.shadow.css({width:s,height:n,top:0,left:s});break;case 2:i.shadow.css({width:s,height:n,top:0,left:0});break;case 3:i.shadow.css({width:r,height:n,top:0,left:0})}},_setPageLoc:function(e){var t=this.data(),a=this.turn("view"),o=0;if(e==a[0]||e==a[1]?o=1:("single"==t.display&&e==a[0]+1||"double"==t.display&&e==a[0]-2||e==a[1]+2)&&(o=2),!this.turn("animating"))switch(o){case 1:t.pageWrap[e].css({zIndex:t.totalPages,display:""});break;case 2:t.pageWrap[e].css({zIndex:t.totalPages-1,display:""});break;case 0:t.pageWrap[e].css({zIndex:0,display:t.pageObjs[e].hasClass("fixed")?"":"none"})}return o},options:function(t){if(void 0===t)return this.data().opts;var a=this.data();if(e.extend(a.opts,t),t.pages&&this.turn("pages",t.pages),t.page&&this.turn("page",t.page),t.display&&this.turn("display",t.display),t.direction&&this.turn("direction",t.direction),t.width&&t.height&&this.turn("size",t.width,t.height),t.when)for(var o in t.when)s(o,t.when)&&this.unbind(o).bind(o,t.when[o]);return this},version:function(){return"4.1.0"}},z={init:function(e){return this.data({f:{disabled:!1,hover:!1,effect:this.hasClass("hard")?"hard":"sheet"}}),this.flip("options",e),z._addPageWrapper.call(this),this},setData:function(t){var a=this.data();return a.f=e.extend(a.f,t),this},options:function(t){var a=this.data().f;return t?(z.setData.call(this,{opts:e.extend({},a.opts||M,t)}),this):a.opts},z:function(e){var t=this.data().f;return t.opts["z-index"]=e,t.fwrapper&&t.fwrapper.css({zIndex:e||parseInt(t.parent.css("z-index"),10)||0}),this},_cAllowed:function(){var e=this.data().f,t=e.opts.page,a=e.opts.turn.data(),o=t%2;return"hard"==e.effect?"ltr"==a.direction?[o?"r":"l"]:[o?"l":"r"]:"single"==a.display?1==t?"ltr"==a.direction?w.forward:w.backward:t==a.totalPages?"ltr"==a.direction?w.backward:w.forward:w.all:"ltr"==a.direction?w[o?"forward":"backward"]:w[o?"backward":"forward"]},_cornerActivated:function(t){var a=this.data().f,o=this.width(),i=this.height(),r=(t={x:t.x,y:t.y,corner:""},a.opts.cornerSize);if(0>=t.x||0>=t.y||t.x>=o||t.y>=i)return!1;var n=z._cAllowed.call(this);switch(a.effect){case"hard":if(t.x>o-r)t.corner="r";else{if(!(t.x<r))return!1;t.corner="l"}break;case"sheet":if(t.y<r)t.corner+="t";else{if(!(t.y>=i-r))return!1;t.corner+="b"}if(t.x<=r)t.corner+="l";else{if(!(t.x>=o-r))return!1;t.corner+="r"}}return!(!t.corner||-1==e.inArray(t.corner,n))&&t},_isIArea:function(e){var t=this.data().f.parent.offset();e=y&&e.originalEvent?e.originalEvent.touches[0]:e;return z._cornerActivated.call(this,{x:e.pageX-t.left,y:e.pageY-t.top})},_c:function(e,t){switch(t=t||0,e){case"tl":return i(t,t);case"tr":return i(this.width()-t,t);case"bl":return i(t,this.height()-t);case"br":return i(this.width()-t,this.height()-t);case"l":return i(t,0);case"r":return i(this.width()-t,0)}},_c2:function(e){switch(e){case"tl":return i(2*this.width(),0);case"tr":return i(-this.width(),0);case"bl":return i(2*this.width(),this.height());case"br":return i(-this.width(),this.height());case"l":return i(2*this.width(),0);case"r":return i(-this.width(),0)}},_foldingPage:function(){var e=this.data().f;if(e){var t=e.opts;if(t.turn)return"single"==(e=t.turn.data()).display?1<t.next||1<t.page?e.pageObjs[0]:null:e.pageObjs[t.next]}},_backGradient:function(){var t=this.data().f,o=t.opts.turn.data();return(o=o.opts.gradients&&("single"==o.display||2!=t.opts.page&&t.opts.page!=o.totalPages-1))&&!t.bshadow&&(t.bshadow=e("<div/>",a(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(t.parent)),o},type:function(){return this.data().f.effect},resize:function(e){var t=this.data().f,a=t.opts.turn.data(),o=this.width(),i=this.height();switch(t.effect){case"hard":e&&(t.wrapper.css({width:o,height:i}),t.fpage.css({width:o,height:i}),a.opts.gradients&&(t.ashadow.css({width:o,height:i}),t.bshadow.css({width:o,height:i})));break;case"sheet":e&&(e=Math.round(Math.sqrt(Math.pow(o,2)+Math.pow(i,2))),t.wrapper.css({width:e,height:e}),t.fwrapper.css({width:e,height:e}).children(":first-child").css({width:o,height:i}),t.fpage.css({width:o,height:i}),a.opts.gradients&&t.ashadow.css({width:o,height:i}),z._backGradient.call(this)&&t.bshadow.css({width:o,height:i})),t.parent.is(":visible")&&(a=p(t.parent[0]),t.fwrapper.css({top:a.top,left:a.left}),a=p(t.opts.turn[0]),t.fparent.css({top:-a.top,left:-a.left})),this.flip("z",t.opts["z-index"])}},_addPageWrapper:function(){var t=this.data().f,o=t.opts.turn.data(),i=this.parent();if(t.parent=i,!t.wrapper)switch(t.effect){case"hard":(r={})[g+"transform-style"]="preserve-3d",r[g+"backface-visibility"]="hidden",t.wrapper=e("<div/>",a(0,0,2)).css(r).appendTo(i).prepend(this),t.fpage=e("<div/>",a(0,0,1)).css(r).appendTo(i),o.opts.gradients&&(t.ashadow=e("<div/>",a(0,0,0)).hide().appendTo(i),t.bshadow=e("<div/>",a(0,0,0)));break;case"sheet":var r=this.width();this.height();t.fparent=t.opts.turn.data().fparent,t.fparent||((r=e("<div/>",{css:{"pointer-events":"none"}}).hide()).data().flips=0,r.css(a(0,0,"auto","visible").css).appendTo(t.opts.turn),t.opts.turn.data().fparent=r,t.fparent=r),this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),t.wrapper=e("<div/>",a(0,0,this.css("z-index"))).appendTo(i).prepend(this),t.fwrapper=e("<div/>",a(i.offset().top,i.offset().left)).hide().appendTo(t.fparent),t.fpage=e("<div/>",a(0,0,0,"visible")).css({cursor:"default"}).appendTo(t.fwrapper),o.opts.gradients&&(t.ashadow=e("<div/>",a(0,0,1)).appendTo(t.fpage)),z.setData.call(this,t)}z.resize.call(this,!0)},_fold:function(e){var t=this.data().f,a=t.opts.turn.data(),o=z._c.call(this,e.corner),s=this.width(),d=this.height();switch(t.effect){case"hard":e.x="l"==e.corner?Math.min(Math.max(e.x,0),2*s):Math.max(Math.min(e.x,s),-s);var c,u,p,h,b,y=a.totalPages,_=t.opts["z-index"]||y,w={overflow:"visible"},k=o.x?(o.x-e.x)/s:e.x/s,C=90*k,P=90>C;switch(e.corner){case"l":h="0% 50%",b="100% 50%",P?(c=0,u=0<t.opts.next-1,p=1):(c="100%",u=t.opts.page+1<y,p=0);break;case"r":h="100% 50%",b="0% 50%",C=-C,s=-s,P?(c=0,u=t.opts.next+1<y,p=0):(c="-100%",u=1!=t.opts.page,p=1)}w[g+"perspective-origin"]=b,t.wrapper.transform("rotateY("+C+"deg)translate3d(0px, 0px, "+(this.attr("depth")||0)+"px)",b),t.fpage.transform("translateX("+s+"px) rotateY("+(180+C)+"deg)",h),t.parent.css(w),P?(k=1-k,t.wrapper.css({zIndex:_+1}),t.fpage.css({zIndex:_})):(k-=1,t.wrapper.css({zIndex:_}),t.fpage.css({zIndex:_+1})),a.opts.gradients&&(u?t.ashadow.css({display:"",left:c,backgroundColor:"rgba(0,0,0,"+.5*k+")"}).transform("rotateY(0deg)"):t.ashadow.hide(),t.bshadow.css({opacity:1-k}),P?t.bshadow.parent()[0]!=t.wrapper[0]&&t.bshadow.appendTo(t.wrapper):t.bshadow.parent()[0]!=t.fpage[0]&&t.bshadow.appendTo(t.fpage),l(t.bshadow,i(100*p,0),i(100*(1-p),0),[[0,"rgba(0,0,0,0.3)"],[1,"rgba(0,0,0,0)"]],2));break;case"sheet":var M,x,S,L,B,T,A,q=this,D=0,N=i(0,0),E=i(0,0),F=i(0,0),O=z._foldingPage.call(this),R=a.opts.acceleration,I=t.wrapper.height(),$="t"==e.corner.substr(0,1),j="l"==e.corner.substr(1,1),U=function(){var t=i(0,0),r=i(0,0);t.x=o.x?o.x-e.x:e.x,t.y=m?o.y?o.y-e.y:e.y:0,r.x=j?s-t.x/2:e.x+t.x/2,r.y=t.y/2;var n=v-Math.atan2(t.y,t.x),l=n-Math.atan2(r.y,r.x);l=Math.max(0,Math.sin(l)*Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)));return D=n/f*180,F=i(l*Math.sin(n),l*Math.cos(n)),n>v&&(F.x+=Math.abs(F.y*t.y/t.x),F.y=0,Math.round(F.x*Math.tan(f-n))<d)?(e.y=Math.sqrt(Math.pow(d,2)+2*r.x*t.x),$&&(e.y=d-e.y),U()):(n>v&&(t=f-n,r=I-d/Math.sin(t),N=i(Math.round(r*Math.cos(t)),Math.round(r*Math.sin(t))),j&&(N.x=-N.x),$&&(N.y=-N.y)),M=Math.round(F.y/Math.tan(n)+F.x),r=(t=s-M)*Math.cos(2*n),l=t*Math.sin(2*n),E=i(Math.round(j?t-r:M+r),Math.round($?l:d-l)),a.opts.gradients&&(B=t*Math.sin(n),t=z._c2.call(q,e.corner),t=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))/s,A=Math.sin(v*(1<t?2-t:t)),T=Math.min(t,1),L=100<B?(B-100)/B:0,x=i(B*Math.sin(n)/s*100,B*Math.cos(n)/d*100),z._backGradient.call(q)&&(S=i(1.2*B*Math.sin(n)/s*100,1.2*B*Math.cos(n)/d*100),j||(S.x=100-S.x),$||(S.y=100-S.y))),F.x=Math.round(F.x),F.y=Math.round(F.y),!0)};switch(c=function(e,o,c,u){var p=["0","auto"],h=(s-I)*c[0]/100,m=(d-I)*c[1]/100,g=(o={left:p[o[0]],top:p[o[1]],right:p[o[2]],bottom:p[o[3]]},p={},90!=u&&-90!=u?j?-1:1:0),f=c[0]+"% "+c[1]+"%";q.css(o).transform(n(u)+r(e.x+g,e.y,R),f),t.fpage.css(o).transform(n(u)+r(e.x+E.x-N.x-s*c[0]/100,e.y+E.y-N.y-d*c[1]/100,R)+n((180/u-2)*u),f),t.wrapper.transform(r(-e.x+h-g,-e.y+m,R)+n(-u),f),t.fwrapper.transform(r(-e.x+N.x+h,-e.y+N.y+m,R)+n(-u),f),a.opts.gradients&&(c[0]&&(x.x=100-x.x),c[1]&&(x.y=100-x.y),p["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*A+")",O.css(p),l(t.ashadow,i(j?100:0,$?0:100),i(x.x,x.y),[[L,"rgba(0,0,0,0)"],[.8*(1-L)+L,"rgba(0,0,0,"+.2*T+")"],[1,"rgba(255,255,255,"+.2*T+")"]],3),z._backGradient.call(q)&&l(t.bshadow,i(j?0:100,$?0:100),i(S.x,S.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*T+")"],[1,"rgba(0,0,0,0)"]],3))},e.corner){case"tl":e.x=Math.max(e.x,1),U(),c(F,[1,0,0,1],[100,0],D);break;case"tr":e.x=Math.min(e.x,s-1),U(),c(i(-F.x,F.y),[0,0,0,1],[0,0],-D);break;case"bl":e.x=Math.max(e.x,1),U(),c(i(F.x,-F.y),[1,1,0,0],[100,100],-D);break;case"br":e.x=Math.min(e.x,s-1),U(),c(i(-F.x,-F.y),[0,1,1,0],[0,100],D)}}t.point=e},_moveFoldingPage:function(e){var t=this.data().f;if(t){var a=t.opts.turn,o=a.data(),i=o.pagePlace;e?(i[o=t.opts.next]!=t.opts.page&&(t.folding&&z._moveFoldingPage.call(this,!1),z._foldingPage.call(this).appendTo(t.fpage),i[o]=t.opts.page,t.folding=o),a.turn("update")):t.folding&&(o.pages[t.folding]?(a=o.pages[t.folding].data().f,o.pageObjs[t.folding].appendTo(a.wrapper)):o.pageWrap[t.folding]&&o.pageObjs[t.folding].appendTo(o.pageWrap[t.folding]),t.folding in i&&(i[t.folding]=t.folding),delete t.folding)}},_showFoldedPage:function(e,t){var a=z._foldingPage.call(this),o=(n=this.data()).f,i=o.visible;if(a){if(!(i&&o.point&&o.point.corner==e.corner||(a="hover"==o.status||"peel"==o.status||o.opts.turn.data().mouseAction?e.corner:null,i=!1,"prevented"!=c("start",this,[o.opts,a]))))return!1;if(t){var r=this,n=o.point&&o.point.corner==e.corner?o.point:z._c.call(this,e.corner,1);this.animatef({from:[n.x,n.y],to:[e.x,e.y],duration:500,frame:function(t){e.x=Math.round(t[0]),e.y=Math.round(t[1]),z._fold.call(r,e)}})}else z._fold.call(this,e),n.effect&&!n.effect.turning&&this.animatef(!1);if(!i)switch(o.effect){case"hard":o.visible=!0,z._moveFoldingPage.call(this,!0),o.fpage.show(),o.opts.shadows&&o.bshadow.show();break;case"sheet":o.visible=!0,o.fparent.show().data().flips++,z._moveFoldingPage.call(this,!0),o.fwrapper.show(),o.bshadow&&o.bshadow.show()}return!0}return!1},hide:function(){var e=this.data().f,t=e.opts.turn.data(),a=z._foldingPage.call(this);switch(e.effect){case"hard":t.opts.gradients&&(e.bshadowLoc=0,e.bshadow.remove(),e.ashadow.hide()),e.wrapper.transform(""),e.fpage.hide();break;case"sheet":0==--e.fparent.data().flips&&e.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),e.wrapper.transform(""),e.fwrapper.hide(),e.bshadow&&e.bshadow.hide(),a.transform("")}return e.visible=!1,this},hideFoldedPage:function(e){var t=this.data().f;if(t.point){var a=this,r=t.point,n=function(){t.point=null,t.status="",a.flip("hide"),a.trigger("end",[t.opts,!1])};if(e){var s=z._c.call(this,r.corner),d=(e="t"==r.corner.substr(0,1)?Math.min(0,r.y-s.y)/2:Math.max(0,r.y-s.y)/2,i(r.x,r.y+e)),l=i(s.x,s.y-e);this.animatef({from:0,to:1,frame:function(e){e=o(r,d,l,s,e),r.x=e.x,r.y=e.y,z._fold.call(a,r)},complete:n,duration:800,hiding:!0})}else this.animatef(!1),n()}},turnPage:function(e){var t=this,a=this.data().f,i=a.opts.turn.data(),r=(e={corner:a.corner?a.corner.corner:e||z._cAllowed.call(this)[0]},a.point||z._c.call(this,e.corner,a.opts.turn?i.opts.elevation:0)),n=z._c2.call(this,e.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(a){a=o(r,r,n,n,a),e.x=a.x,e.y=a.y,z._showFoldedPage.call(t,e)},complete:function(){t.trigger("end",[a.opts,!0])},duration:i.opts.duration,turning:!0}),a.corner=null},moving:function(){return"effect"in this.data()},isTurning:function(){return this.flip("moving")&&this.data().effect.turning},corner:function(){return this.data().f.corner},_eventStart:function(e){var t=this.data().f,a=t.opts.turn;if(!t.corner&&!t.disabled&&!this.flip("isTurning")&&t.opts.page==a.data().pagePlace[t.opts.page]){if(t.corner=z._isIArea.call(this,e),t.corner&&z._foldingPage.call(this))return this.trigger("pressed",[t.point]),z._showFoldedPage.call(this,t.corner),!1;t.corner=null}},_eventMove:function(e){var t=this.data().f;if(!t.disabled)if(e=y?e.originalEvent.touches:[e],t.corner){var a=t.parent.offset();t.corner.x=e[0].pageX-a.left,t.corner.y=e[0].pageY-a.top,z._showFoldedPage.call(this,t.corner)}else t.hover&&!this.data().effect&&this.is(":visible")&&((e=z._isIArea.call(this,e[0]))?("sheet"==t.effect&&2==e.corner.length||"hard"==t.effect)&&(t.status="hover",t=z._c.call(this,e.corner,t.opts.cornerSize/2),e.x=t.x,e.y=t.y,z._showFoldedPage.call(this,e,!0)):"hover"==t.status&&(t.status="",z.hideFoldedPage.call(this,!0)))},_eventEnd:function(){var e=this.data().f,t=e.corner;!e.disabled&&t&&"prevented"!=c("released",this,[e.point||t])&&z.hideFoldedPage.call(this,!0),e.corner=null},disable:function(e){return z.setData.call(this,{disabled:e}),this},hover:function(e){return z.setData.call(this,{hover:e}),this},peel:function(t,a){var o=this.data().f;if(t){if(-1==e.inArray(t,w.all))throw u("Corner "+t+" is not permitted");if(-1!=e.inArray(t,z._cAllowed.call(this))){var i=z._c.call(this,t,o.opts.cornerSize/2);o.status="peel",z._showFoldedPage.call(this,{corner:t,x:i.x,y:i.y},a)}}else o.status="",z.hideFoldedPage.call(this,a);return this}};window.requestAnim=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},e.extend(e.fn,{flip:function(){return t(e(this[0]),z,arguments)},turn:function(){return t(e(this[0]),x,arguments)},transform:function(e,t){var a={};return t&&(a[g+"transform-origin"]=t),a[g+"transform"]=e,this.css(a)},animatef:function(t){var a=this.data();if(a.effect&&a.effect.stop(),t){t.to.length||(t.to=[t.to]),t.from.length||(t.from=[t.from]);for(var o=[],i=t.to.length,r=!0,n=this,s=(new Date).getTime(),d=function(){if(a.effect&&r){for(var e=[],l=Math.min(t.duration,(new Date).getTime()-s),c=0;c<i;c++)e.push(a.effect.easing(1,l,t.from[c],o[c],t.duration));t.frame(1==i?e[0]:e),l==t.duration?(delete a.effect,n.data(a),t.complete&&t.complete()):window.requestAnim(d)}},l=0;l<i;l++)o.push(t.to[l]-t.from[l]);a.effect=e.extend({stop:function(){r=!1},easing:function(e,t,a,o,i){return o*Math.sqrt(1-(t=t/i-1)*t)+a}},t),this.data(a),d()}else delete a.effect}}),e.isTouch=y,e.mouseEvents=_,e.cssPrefix=d,e.cssTransitionEnd=function(){var e,t=document.createElement("fakeelement"),a={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in a)if(void 0!==t.style[e])return a[e]},e.findPos=p}(r),function(e){function t(e){function t(e){this.name="TurnJsError",this.message=e}return t.prototype=Error(),t.prototype.constructor=t,new t(e)}function a(e,t,a){return n&&a?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "}function o(e,t){return n&&t?" scale3d("+e+", "+e+", 1) ":" scale("+e+") "}function i(e,t){return{x:e,y:t}}function r(e,t){return function(){return e.apply(t,arguments)}}var n,s={max:2,flipbook:null,easeFunction:"ease-in-out",duration:500,when:{}},d={init:function(a){var o=this,l=this.data();if(!(a=e.extend({},s,a)).flipbook||!a.flipbook.turn("is"))throw t("options.flipbook is required");if(n="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,"function"!=typeof a.max){var c=a.max;a.max=function(){return c}}for(var u in l.zoom={opts:a,axis:i(0,0),scrollPos:i(0,0),eventQueue:[],mouseupEvent:function(){return d._eMouseUp.apply(o,arguments)},eventTouchStart:r(d._eTouchStart,o),eventTouchMove:r(d._eTouchMove,o),eventTouchEnd:r(d._eTouchEnd,o),flipbookEvents:{zooming:r(d._eZoom,o),pressed:r(d._ePressed,o),released:r(d._eReleased,o),start:r(d._eStart,o),turning:r(d._eTurning,o),turned:r(d._eTurned,o),destroying:r(d._eDestroying,o)}},a.when)Object.prototype.hasOwnProperty.call(a.when,u)&&this.bind("zoom."+u,a.when[u]);for(u in l.zoom.flipbookEvents)Object.prototype.hasOwnProperty.call(l.zoom.flipbookEvents,u)&&a.flipbook.bind(u,l.zoom.flipbookEvents[u]);this.css({position:"relative",overflow:"hidden"}),e.isTouch?(a.flipbook.bind("touchstart",l.zoom.eventTouchStart).bind("touchmove",l.zoom.eventTouchMove).bind("touchend",l.zoom.eventTouchEnd),this.bind("touchstart",d._tap)):this.mousedown(d._mousedown).click(d._tap)},_tap:function(t){var a=e(this),o=a.data().zoom;!o.draggingCorner&&!o.dragging&&function e(t,a){return t[0]!=a[0]&&(!!t.attr("page")||!!t.parent()[0]&&e(t.parent(),a))}(e(t.target),a)&&(d._addEvent.call(a,"tap",t),(t=d._eventSeq.call(a))&&a.trigger(t))},_addEvent:function(e,t){var a=this.data().zoom,o=(new Date).getTime();a.eventQueue.push({name:e,timestamp:o,event:t}),10<a.eventQueue.length&&a.eventQueue.splice(0,1)},_eventSeq:function(){var t=this.data().zoom.eventQueue,a=t.length-1;return 0<a&&"tap"==t[a].name&&"tap"==t[a-1].name&&t[a].event.pageX==t[a-1].event.pageX&&t[a].event.pageY==t[a-1].event.pageY&&200>t[a].timestamp-t[a-1].timestamp&&50<t[a].timestamp-t[a-1].timestamp?e.extend(t[a].event,{type:"zoom.doubleTap"}):"tap"==t[a].name?e.extend(t[a].event,{type:"zoom.tap"}):void 0},_prepareZoom:function(){var t,a=0,o=this.data().zoom,r=1/this.zoom("value"),n=(t=o.opts.flipbook).turn("direction"),s=t.data(),d=t.offset(),l=this.offset(),c={height:t.height()},u=t.turn("view");if("double"==t.turn("display")&&t.data().opts.autoCenter?u[0]?u[1]?(c.width=t.width(),t=i(d.left-l.left,d.top-l.top)):(c.width=t.width()/2,a="ltr"==n?0:c.width,t=i("ltr"==n?d.left-l.left:d.left-l.left+c.width,d.top-l.top)):(c.width=t.width()/2,a="ltr"==n?c.width:0,t=i("ltr"==n?d.left-l.left+c.width:d.left-l.left,d.top-l.top)):(c.width=t.width(),t=i(d.left-l.left,d.top-l.top)),o.zoomer||(o.zoomer=e("<div />",{class:"zoomer",css:{overflow:"hidden",position:"absolute",zIndex:"1000000"}}).mousedown((function(){return!1})).appendTo(this)),o.zoomer.css({top:t.y,left:t.x,width:c.width,height:c.height}),(n=u.join(","))!=o.zoomerView)for(o.zoomerView=n,o.zoomer.find("*").remove(),n=0;n<u.length;n++)if(u[n]){l=s.pageObjs[u[n]].offset();var p=e(s.pageObjs[u[n]]);p.clone().transform("").css({width:p.width()*r,height:p.height()*r,position:"absolute",display:"",top:(l.top-d.top)*r,left:(l.left-d.left-a)*r}).appendTo(o.zoomer)}return{pos:t,size:c}},value:function(){return this.data().zoom.opts.flipbook.turn("zoom")},zoomIn:function(t){var r=this,n=this.data().zoom,s=n.opts.flipbook,l=n.opts.max();s.offset();var c=this.offset();if(n.zoomIn)return this;s.turn("stop");var u=e.Event("zoom.change");if(this.trigger(u,[l]),u.isDefaultPrevented())return this;var p=(v=d._prepareZoom.call(this)).pos,h=i(v.size.width/2,v.size.height/2),m=(u=e.cssPrefix(),e.cssTransitionEnd()),g=s.data().opts.autoCenter;n.scale=l,s.data().noCenter=!0,(0>(t=void 0!==t?"x"in t&&"y"in t?i(t.x-p.x,t.y-p.y):e.isTouch?i(t.originalEvent.touches[0].pageX-p.x-c.left,t.originalEvent.touches[0].pageY-p.y-c.top):i(t.pageX-p.x-c.left,t.pageY-p.y-c.top):i(h.x,h.y)).x||0>t.y||t.x>v.width||t.y>v.height)&&(t.x=h.x,t.y=h.y);var f=i((t.x-h.x)*l+h.x,(t.y-h.y)*l+h.y),v=(t=i(v.size.width*l>this.width()?t.x-f.x:0,v.size.height*l>this.height()?t.y-f.y:0),f=i(Math.abs(v.size.width*l-this.width()),Math.abs(v.size.height*l-this.height())),i(Math.min(0,v.size.width*l-this.width()),Math.min(0,v.size.height*l-this.height()))),b=i(h.x*l-h.x-p.x-t.x,h.y*l-h.y-p.y-t.y);b.y>f.y?t.y=b.y-f.y+t.y:b.y<v.y&&(t.y=b.y-v.y+t.y),b.x>f.x?t.x=b.x-f.x+t.x:b.x<v.x&&(t.x=b.x-v.x+t.x),b=i(h.x*l-h.x-p.x-t.x,h.y*l-h.y-p.y-t.y),(p={})[u+"transition"]=u+"transform "+n.opts.easeFunction+" "+n.opts.duration+"ms";var y=function(){r.trigger("zoom.zoomIn"),n.zoomIn=!0,n.flipPosition=i(s.css("left"),s.css("top")),s.turn("zoom",l).css({position:"absolute",margin:"",top:0,left:0});var t=s.offset();n.axis=i(t.left-c.left,t.top-c.top),g&&"double"==s.turn("display")&&("ltr"==s.turn("direction")&&!s.turn("view")[0]||"rtl"==s.turn("direction")&&!s.turn("view")[1])&&(n.axis.x+=s.width()/2),r.zoom("scroll",b),r.bind(e.mouseEvents.down,d._eMouseDown),r.bind(e.mouseEvents.move,d._eMouseMove),e(document).bind(e.mouseEvents.up,n.mouseupEvent),r.bind("mousewheel",d._eMouseWheel),setTimeout((function(){n.zoomer.hide(),n.zoomer.remove(),n.zoomer=null,n.zoomerView=null}),50)};return n.zoomer.css(p).show(),m?n.zoomer.bind(m,(function(){e(this).unbind(m),y()})):setTimeout(y,n.opts.duration),n.zoomer.transform(a(t.x,t.y,!0)+o(l,!0)),this},zoomOut:function(t){var r,n=this,s=this.data().zoom,l=s.opts.flipbook,c=1/s.scale,u=e.cssPrefix(),p=e.cssTransitionEnd();if(r=this.offset(),t=void 0!==t?t:s.opts.duration,s.zoomIn){var h=e.Event("zoom.change");if(this.trigger(h,[1]),h.isDefaultPrevented())return this;s.zoomIn=!1,s.scale=1,l.data().noCenter=!1,n.unbind(e.mouseEvents.down,d._eMouseDown),n.unbind(e.mouseEvents.move,d._eMouseMove),e(document).unbind(e.mouseEvents.up,s.mouseupEvent),n.unbind("mousewheel",d._eMouseWheel),(h={})[u+"transition"]=u+"transform "+s.opts.easeFunction+" "+t+"ms",l.css(h);var m=e("<div />",{css:{position:"relative",top:s.flipPosition.y,left:s.flipPosition.x,width:l.width()*c,height:l.height()*c,background:"blue"}}).appendTo(l.parent());h=i(m.offset().left-r.left,m.offset().top-r.top);m.remove();var g=l.data().opts.autoCenter;g&&"double"==l.turn("display")&&(l.turn("view")[0]?l.turn("view")[1]||(h.x="ltr"==l.turn("direction")?h.x+m.width()/4:h.x-m.width()/4):h.x="ltr"==l.turn("direction")?h.x-m.width()/4:h.x+m.width()/4);var f=e.findPos(l[0]);r=i(-l.width()/2-f.left+m.width()/2+h.x+r.left,-l.height()/2-f.top+m.height()/2+h.y+r.top);var v=function(){l[0].style.removeProperty?(l[0].style.removeProperty(u+"transition"),l.transform(l.turn("options").acceleration?a(0,0,!0):"").turn("zoom",1),l[0].style.removeProperty("margin"),l.css({position:"relative",top:s.flipPosition.y,left:s.flipPosition.x})):l.transform("none").turn("zoom",1).css({margin:"",top:s.flipPosition.y,left:s.flipPosition.x,position:"relative"}),g&&l.turn("center"),n.trigger("zoom.zoomOut")};return 0===t?v():(p?l.bind(p,(function(){e(this).unbind(p),v()})):setTimeout(v,t),l.transform(a(r.x,r.y,!0)+o(c,!0))),this}},flipbookWidth:function(){var e=this.data().zoom.opts.flipbook,t=e.turn("view");return"double"!=e.turn("display")||t[0]&&t[1]?e.width():e.width()/2},scroll:function(t,o,r){var s=this.data().zoom,d=s.opts.flipbook,l=this.zoom("flipbookWidth"),c=e.cssPrefix();if(n){var u={};u[c+"transition"]=r?c+"transform 200ms":"none",d.css(u),d.transform(a(-s.axis.x-t.x,-s.axis.y-t.y,!0))}else d.css({top:-s.axis.y-t.y,left:-s.axis.x-t.x});if(!o){var p;o=i(Math.min(0,(l-this.width())/2),Math.min(0,(d.height()-this.height())/2)),d=i(l>this.width()?l-this.width():(l-this.width())/2,d.height()>this.height()?d.height()-this.height():(d.height()-this.height())/2);t.y<o.y?(t.y=o.y,p=!0):t.y>d.y&&(t.y=d.y,p=!0),t.x<o.x?(t.x=o.x,p=!0):t.x>d.x&&(t.x=d.x,p=!0),p&&this.zoom("scroll",t,!0,!0)}s.scrollPos=i(t.x,t.y)},resize:function(){var e=this.data().zoom,t=e.opts.flipbook;if(1<this.zoom("value")){var a=t.offset(),o=this.offset();e.axis=i(a.left-o.left+(e.axis.x+e.scrollPos.x),a.top-o.top+(e.axis.y+e.scrollPos.y)),"double"==t.turn("display")&&"ltr"==t.turn("direction")&&!t.turn("view")[0]&&(e.axis.x+=t.width()/2),this.zoom("scroll",e.scrollPos)}},_eZoom:function(){for(var e=this.data().zoom,t=e.opts.flipbook,a=t.turn("view"),o=0;o<a.length;o++)a[o]&&this.trigger("zoom.resize",[e.scale,a[o],t.data().pageObjs[a[o]]])},_eStart:function(e){1!=this.zoom("value")&&e.preventDefault()},_eTurning:function(e,t,a){var o=this,i=(e=this.zoom("value"),this.data().zoom);t=i.opts.flipbook;if(i.page=t.turn("page"),1!=e){for(i=0;i<a.length;i++)a[i]&&this.trigger("zoom.resize",[e,a[i],t.data().pageObjs[a[i]]]);setTimeout((function(){o.zoom("resize")}),0)}},_eTurned:function(e,t){if(1!=this.zoom("value")){var a=this.data().zoom,o=a.opts.flipbook;t>a.page?this.zoom("scroll",i(0,a.scrollPos.y),!1,!0):t<a.page&&this.zoom("scroll",i(o.width(),a.scrollPos.y),!1,!0)}},_ePressed:function(){e(this).data().zoom.draggingCorner=!0},_eReleased:function(){var t=e(this).data().zoom;setTimeout((function(){t.draggingCorner=!1}),1)},_eMouseDown:function(t){return e(this).data().zoom.draggingCur=e.isTouch?i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY):i(t.pageX,t.pageY),!1},_eMouseMove:function(t){var a=e(this).data().zoom;if(a.draggingCur){a.dragging=!0;t=e.isTouch?i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY):i(t.pageX,t.pageY);var o=i(t.x-a.draggingCur.x,t.y-a.draggingCur.y);return e(this).zoom("scroll",i(a.scrollPos.x-o.x,a.scrollPos.y-o.y),!0),a.draggingCur=t,!1}},_eMouseUp:function(){var t=e(this).data().zoom;t.dragging&&e(this).zoom("scroll",t.scrollPos),t.draggingCur=null,setTimeout((function(){t.dragging=!1}),1)},_eMouseWheel:function(t,a,o,r){o=i((t=e(this).data().zoom).scrollPos.x+10*o,t.scrollPos.y-10*r),e(this).zoom("scroll",o,!1,!0)},_eTouchStart:function(t){var a=e(this).data().zoom;t=i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY);a.touch={},a.touch.initial=t,a.touch.last=t,a.touch.timestamp=(new Date).getTime(),a.touch.speed=i(0,0)},_eTouchMove:function(t){var a=e(this).data().zoom,o=e(this).zoom("value"),r=a.opts.flipbook,n=(new Date).getTime();t=i(t.originalEvent.touches[0].pageX,t.originalEvent.touches[0].pageY);a.touch&&1==o&&!r.data().mouseAction&&(a.touch.motion=i(t.x-a.touch.last.x,t.y-a.touch.last.y),a.touch.speed.x=0===a.touch.speed.x?a.touch.motion.x/(n-a.touch.timestamp):(a.touch.speed.x+a.touch.motion.x/(n-a.touch.timestamp))/2,a.touch.last=t,a.touch.timestamp=n)},_eTouchEnd:function(){var t=e(this).data().zoom;if(t.touch&&1==e(this).zoom("value")){var a=Math.abs(t.touch.initial.y-t.touch.last.y);50>a&&(-1>t.touch.speed.x||-100>t.touch.last.x-t.touch.initial.x)?this.trigger("zoom.swipeLeft"):50>a&&(1<t.touch.speed.x||100<t.touch.last.x-t.touch.initial.x)&&this.trigger("zoom.swipeRight")}},_eDestroying:function(){var t=this,a=this.data().zoom,o=a.opts.flipbook;for(var i in this.zoom("zoomOut",0),e.each("tap doubleTap resize zoomIn zoomOut swipeLeft swipeRight".split(" "),(function(e,a){t.unbind("zoom."+a)})),a.flipbookEvents)Object.prototype.hasOwnProperty.call(a.flipbookEvents,i)&&o.unbind(i,a.flipbookEvents[i]);o.unbind("touchstart",a.eventTouchStart).unbind("touchmove",a.eventTouchMove).unbind("touchend",a.eventTouchEnd),this.unbind("touchstart",d._tap).unbind("click",d._tap),a=null,this.data().zoom=null}};e.extend(e.fn,{zoom:function(){var a=arguments;if(!a[0]||"object"==b(a[0]))return d.init.apply(e(this[0]),a);if(d[a[0]])return d[a[0]].apply(e(this[0]),Array.prototype.slice.call(a,1));throw t(a[0]+" is not a method")}})}(r);for(var K=r,X=require("axios"),Q=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-box"},[a("div",{staticClass:"flipbook-container",class:e.book_format},[e.isLoading&&e.loader?a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]):e._e(),e._v(" "),a("div",{staticClass:"book-centered",style:e.centered?{"margin-left":e.isCover+"px"}:null},[!e.isLoading&&e.loader?a("div",{staticClass:"arrow-animate"},[a("Icon",{attrs:{name:"arrow-right",size:"lg",fill:e.preview_color,stroke:"transparent"}})],1):e._e(),e._v(" "),a("div",{staticClass:"preview-desktop",class:e.isLoading?"invisible":"visible",attrs:{dir:"ltr"}},[a("div",{staticClass:"flipbook-lib",class:[e.formato],attrs:{id:"flipbook"}})])])]),e._v(" "),e.controls&&0==e.isLoading?a("div",{staticClass:"controls",attrs:{dir:e.dir}},[a("div",[1!=e.currentPage?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheLeft}},[a("Icon",{attrs:{name:"chevron-left",stroke:"transparent",size:"md",fill:e.preview_color}})],1):e._e()],1),e._v(" "),a("div",[e.currentPage!=e.pages?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheRight}},[a("Icon",{attrs:{name:"chevron-right",stroke:"transparent",fill:e.preview_color,size:"md"}})],1):e._e()],1)]):e._e()])},staticRenderFns:[]},void 0,{name:"Preview",components:{Icon:F,Button:O},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0,default:32},/** Book format. `5` */book_format:{type:String,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** The five first pages. `https://builder.dentrodahistoria.com.br/api/builder/getpreview/ddh5e177ff920f15?page=X` */preloaded_pages:{type:Array,required:!1},/** Download and convert preloaded images to base64. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},dir:{type:String,default:"ltr",required:!1},zoom:{type:Boolean,default:!1},/** Show preview controls */controls:{type:Boolean,default:!0},/** Center book on first and last page */centered:{type:Boolean,default:!0},/** Show loader */loader:{type:Boolean,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},/** APK do builder (opcional) */builder_apk:{type:String,required:!1},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},typeRead:{type:Boolean,required:!1,default:!1}},data:function(){return{formato:"a4",bookDimensions:{widthPlaceholder:100,width:800},flipbookWidth:null,flipbookHeight:null,isCover:0,currentPage:1,loadedPages:5,numberPositions:0,isLoading:!0,lang:S(this.typeLanguage),_destroyed:!1,_onResize:null}},mounted:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,e._destroyed=!1,"square"==e.book_format?e.formato="square":e.formato="a4",t.n=1,e.createInitialPages();case 1:t.v&&(e.initBook(),e._onResize=function(){if(!a._destroyed){var e=J(K);if(e){var t=a.resize();e.turn("size",t.width,t.height),e.turn("resize"),a.updated()}}},window.addEventListener("resize",e._onResize),e.loader,//setTimeout(function () {
|
|
551
|
+
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return G.apply(void 0,[K].concat(t))},started:function(){//this.cleanClickPages();
|
|
552
|
+
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&builder_apk="+encodeURIComponent(o.builder_apk)),a.n=1,X.get(n,{responseType:"arraybuffer"}).then((function(e){return Buffer.from(e.data,"binary").toString("base64")}));case 1:return a.a(2,a.v)}}),a)})))()},createInitialPages:function(){var e=this;return u(g().m((function t(){var a,o,i,r,n;return g().w((function(t){for(;;)switch(t.n){case 0:a=e,o=new Date,o.getMilliseconds(),//var n = Math.floor(Math.random() * 1000);
|
|
553
|
+
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%' firstPage='true'></div>";case 3:r++,t.n=1;break;case 4:return K("#flipbook").html(i),t.a(2,!0)}}),t)})))()},initBook:function(){var e=this,t=e.resize();// this.flipbookWidth = self.formato === "square" ? "100vh" : "100vh";
|
|
541
554
|
//this.flipbookHeight = document.getElementsByClassName("top-bar")[0].offsetHeight
|
|
542
555
|
// self.formato === "square"
|
|
543
556
|
// ? "calc(100vh - 91px)"
|
|
544
557
|
// : "calc(100vh - 91px)";
|
|
545
|
-
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,
|
|
558
|
+
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,K("#flipbook").length>0){K("#flipbook").turn({width:e.flipbookWidth,height:e.flipbookHeight,autoCenter:!1,gradients:!0,acceleration:!0,duration:800,elevation:150}),K("#flipbook").bind("start",(function(e,t,a){console.log(e),console.log(t),console.log(a),"r"==a||"l"==a?K(".page-wrapper").css("cursor","pointer"):K(".page-wrapper").css("cursor","unset"),"tl"!=a&&"tr"!=a&&"bl"!=a&&"br"!=a||e.preventDefault()})),K("#flipbook").bind("end",(function(e,t,a){//$(".page-wrapper").css("cursor", "unset");
|
|
546
559
|
})),// Capa
|
|
547
|
-
e.isCover="-"+
|
|
548
|
-
|
|
560
|
+
e.isCover="-"+K(".page-wrapper[page="+e.currentPage+"]").width(),// Virada da páginas
|
|
561
|
+
K("#flipbook").bind("turning",(function(t,a,o){e.currentPage=a,e.$emit("updateCurrentPage",e.currentPage),e.currentPage>=e.loadedPages-2&&e.morePages(),1===e.currentPage?(e.numberPositions=0,e.isCover="-"+K(".page-wrapper[page="+e.currentPage+"]").width()):e.currentPage===e.pages?(e.isCover=K(".page-wrapper[page="+e.currentPage+"]").width(),e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1)):(e.isCover=0,e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1))})),K("#flipbook").bind("turned",(function(t,a,o){e.cleanClickPages()}));for(var a=this.loadedPages;a<this.pages;a++){var o=this.flipbookTurn("pages")+1,i=K('<div><img class="img-book" width="100%" src="'+this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+a+"&w="+this.bookDimensions.widthPlaceholder+'&pw=0&noCache=true" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div> </div>');this.flipbookTurn("addPage",i),this.flipbookTurn("pages",o)}//self.cleanClickPages();
|
|
549
562
|
}// Habilitar passagem via o dedo
|
|
550
|
-
|
|
563
|
+
K(document).keydown((function(t){switch(t.keyCode){case 37:e.flipbookTurn("previous");break;case 39:e.flipbookTurn("next")}})),this.started()},cleanClickPages:function(){K("#flipbook .even").each((function(){K(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
551
564
|
})),// Resetting the click event for odd elements
|
|
552
|
-
|
|
553
|
-
})),
|
|
565
|
+
K("#flipbook .odd").each((function(){K(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
566
|
+
})),K("#flipbook .even").each((function(){K(this).parents().eq(1).click((function(){this.flipbookTurn("previous")}))})),K("#flipbook .odd").each((function(){K(this).parents().eq(1).click((function(){this.flipbookTurn("next")}))}))},toTheLeft:function(){this.flipbookTurn("previous")},toTheRight:function(){this.flipbookTurn("next")},zoomTo:function(e){setTimeout((function(){K(".flipbook-container").data().regionClicked?K(".flipbook-container").data().regionClicked=!1:1==K(".flipbook-container").zoom("value")?K(".flipbook-container").zoom("zoomIn",e):K(".flipbook-container").zoom("zoomOut")}),1)},activateZoom:function(){var e=this;K(".flipbook-container").zoom({flipbook:K("#flipbook"),max:function(){return 1452/K("#flipbook").width()},when:{swipeLeft:function(){G(K,"next")},swipeRight:function(){G(K,"previous")},resize:function(e,t,a,o){// if (scale==1)
|
|
554
567
|
// loadSmallPage(page, pageElement);
|
|
555
568
|
// else
|
|
556
569
|
// loadLargePage(page, pageElement);
|
|
557
|
-
},zoomIn:function(){
|
|
570
|
+
},zoomIn:function(){K(".flipbook-container").removeClass("zoom-in"),K(".flipbook-container").removeClass("zoom-out"),K(".flipbook-container").addClass("zoom-in")},zoomOut:function(){K(".flipbook-container").removeClass("zoom-in"),K(".flipbook-container").removeClass("zoom-out"),K(".flipbook-container").addClass("zoom-out"),// $('.exit-message').hide();
|
|
558
571
|
// $('.thumbnails').fadeIn();
|
|
559
572
|
// $('.made').fadeIn();
|
|
560
573
|
// $('.zoom-icon').removeClass('zoom-icon-out').addClass('zoom-icon-in');
|
|
561
|
-
setTimeout((function(){
|
|
562
|
-
|
|
574
|
+
setTimeout((function(){K("#flipbook").addClass("animated").removeClass("zoom-in"),e.resizeViewport()}),0)}}}),// Zoom event
|
|
575
|
+
K.isTouch?K(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):K(".flipbook-container").bind("zoom.tap",e.zoomTo)},resizeViewport:function(){var e=self.resize(),t=e.width,a=e.height,o=this.flipbookTurn("options");if(o){if(K("#flipbook").removeClass("animated"),K(".flipbook-container").css({width:t,height:a}).zoom("resize"),1==this.flipbookTurn("zoom")){var i=calculateBound({width:o.width,height:o.height,boundWidth:Math.min(o.width,t),boundHeight:Math.min(o.height,a)});i.width%2!=0&&(i.width-=1),i.width==K("#flipbook").width()&&i.height==K("#flipbook").height()||(this.flipbookTurn("size",i.width,i.height),1==this.flipbookTurn("page")&&this.flipbookTurn("peel","br")),K("#flipbook").css({top:-i.height/2,left:-i.width/2})}// var magazineOffset = $('#flipbook').offset(),
|
|
563
576
|
// boundH = height - magazineOffset.top - $('#flipbook').height(),
|
|
564
577
|
// marginTop = (boundH - $('.thumbnails > div').height()) / 2;
|
|
565
578
|
// if (marginTop<0) {
|
|
@@ -572,7 +585,7 @@ G.isTouch?G(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):G(".flipbook-
|
|
|
572
585
|
// $('.made').hide();
|
|
573
586
|
// else
|
|
574
587
|
// $('.made').show();
|
|
575
|
-
|
|
588
|
+
K("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loadedPages+1;e<=this.loadedPages+4;e++)this.addPage(e,J(K));this.cleanClickPages(),// $("#flipbook .even").each(function () {
|
|
576
589
|
// $(this)
|
|
577
590
|
// .parents()
|
|
578
591
|
// .eq(1)
|
|
@@ -588,9 +601,9 @@ G("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loaded
|
|
|
588
601
|
// //this.flipbookTurn("next");
|
|
589
602
|
// });
|
|
590
603
|
// });
|
|
591
|
-
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=
|
|
592
|
-
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-G(".page-wrapper[page="+this.currentPage+"]").width():this.currentPage===this.pages?this.isCover=G(".page-wrapper[page="+this.currentPage+"]").width():this.isCover=0,{width:r,height:i}}},beforeDestroy:function(){this._destroyed=!0,this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),J(G),this.isLoading=!0},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}},watch:{goToPage:function(e){var t=this;if(e==t.dedication_page){var a=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(a+="&builder_apk="+encodeURIComponent(t.builder_apk)),G("#flipbook .page-wrapper[page='"+e+"] .p"+e+" img").attr("src",a),G("#flipbook").bind("turned",(function(a,o,i){if(G("#flipbook").length>0&&e==t.dedication_page){var r=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(r+="&builder_apk="+encodeURIComponent(t.builder_apk)),G("#flipbook .page-wrapper[page='"+e+"] .p"+e+" img").attr("src",r)}}))}}}},"data-v-3dc5ea7e",!1,void 0,!1,void 0,void 0,void 0),X=r,Q=require("axios"),ee=A({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-page",class:e.isLoading?"":"preview-loading",attrs:{id:"previewMobile"}},[e.isLoading?e._e():a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]),e._v(" "),a("div",{class:e.isLoading?"":"invisible"},[a("div",{staticClass:"block-preview-mobile"},[a("div",{staticClass:"list-mobile",attrs:{id:"list-mobile"}},[a("div",{staticClass:"mobile-shelf",class:e.mobileStopped?"active":"",style:{width:318*e.pageNum+"px"}},e._l(e.pagesToRender,(function(t,o){return a("div",{key:o,staticClass:"mini-cover",class:t.isLoaded?"":"is-loading",attrs:{id:"page-"+o}},[a("img",{staticClass:"img-book",attrs:{width:"100%",src:t.url,alt:""}}),e._v(" "),t.isLoaded?e._e():a("div",{staticClass:"loading-bg"},[a("div",{staticClass:"loading book-loading"})]),e._v(" "),a("span",{staticClass:"scrollable-preview-page-shadow"})])})),0)])]),e._v(" "),e.zoomActive?a("div",{directives:[{name:"style",rawName:"v-style",value:"margin-top:"+e.marginMenu+"px",expression:"'margin-top:' + marginMenu + 'px'"}],staticClass:"zoom",style:{marginTop:"-"+e.marginMenu+"px"}},[a("div",{staticClass:"top-zoom"},[a("div",{staticClass:"close",on:{click:function(t){return e.closeZoom()}}},[a("svg",{attrs:{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5607 8.43934C9.97487 7.85355 9.02513 7.85355 8.43934 8.43934C7.85355 9.02513 7.85355 9.97487 8.43934 10.5607L14.0962 16.2175L8.43937 21.8744C7.85358 22.4602 7.85358 23.4099 8.43937 23.9957C9.02516 24.5815 9.9749 24.5815 10.5607 23.9957L16.2175 18.3388L21.8744 23.9957C22.4602 24.5815 23.4099 24.5815 23.9957 23.9957C24.5815 23.4099 24.5815 22.4602 23.9957 21.8744L18.3388 16.2175L23.9957 10.5607C24.5815 9.97487 24.5815 9.02513 23.9957 8.43934C23.4099 7.85355 22.4602 7.85355 21.8744 8.43934L16.2175 14.0962L10.5607 8.43934Z"}})])]),e._v(" "),a("div",{staticClass:"toggle"},[a("div",{staticClass:"one-page",class:1===e.zoomSettings.slidesToShow?"active":"inactive",on:{click:function(t){return e.setFormatZoom(1)}}},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 5.58678C18 4.71042 17.2138 4 16.2439 4L7.7561 4C6.78623 4 6 4.71042 6 5.58678L6 18.4132C6 19.2896 6.78623 20 7.7561 20L16.2439 20C17.2138 20 18 19.2896 18 18.4132L18 5.58678ZM16.2439 18.4132L16.2439 5.58678L7.7561 5.58678L7.7561 18.4132L16.2439 18.4132Z"}})])]),e._v(" "),a("div",{staticClass:"many-pages",class:2===e.zoomSettings.slidesToShow?"active":"inactive",on:{click:function(t){return e.setFormatZoom(2)}}},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 5.58678C21 4.71042 20.2674 4 19.3636 4L12.9545 4C12.0508 4 11.3182 4.71042 11.3182 5.58678L11.3182 18.4132C11.3182 19.2896 12.0508 20 12.9545 20L19.3636 20C20.2674 20 21 19.2896 21 18.4132L21 5.58678ZM19.3636 18.4132L19.3636 5.58678L12.9545 5.58678L12.9545 18.4132L19.3636 18.4132Z"}}),e._v(" "),a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.6818 5.58678C12.6818 4.71042 11.9492 4 11.0455 4L4.63636 4C3.73262 4 3 4.71042 3 5.58678L3 18.4132C3 19.2896 3.73262 20 4.63636 20L11.0455 20C11.9492 20 12.6818 19.2896 12.6818 18.4132L12.6818 5.58678ZM11.0455 18.4132L11.0455 5.58678L4.63636 5.58678L4.63636 18.4132L11.0455 18.4132Z"}})])])])]),e._v(" "),e.zoomActive?a("div",{staticClass:"carousel"},[a("VueSlickCarousel",e._b({attrs:{infinite:!1,lazyLoad:"progressive"},on:{beforeChange:e.changeZoom},scopedSlots:e._u([{key:"prevArrow",fn:function(t){return[a("div",{staticClass:"custom-arrow"},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M12.136 7.52267C12.5628 7.09594 13.2546 7.09594 13.6814 7.52267C14.1081 7.94941 14.1081 8.64128 13.6814 9.06802L9.818 12.9314C9.39127 13.3581 8.69939 13.3581 8.27266 12.9314C7.84592 12.5046 7.84592 11.8128 8.27266 11.386L12.136 7.52267Z"}}),e._v(" "),a("path",{attrs:{d:"M13.6814 15.2106C14.1081 15.6373 14.1081 16.3292 13.6814 16.7559C13.2546 17.1827 12.5628 17.1827 12.136 16.7559L8.27266 12.8926C7.84592 12.4658 7.84592 11.7739 8.27266 11.3472C8.69939 10.9205 9.39127 10.9205 9.818 11.3472L13.6814 15.2106Z"}})])])]}},{key:"nextArrow",fn:function(t){return[a("div",{staticClass:"custom-arrow"},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M11.864 16.4773C11.4372 16.9041 10.7453 16.9041 10.3186 16.4773C9.89187 16.0506 9.89187 15.3587 10.3186 14.932L14.182 11.0686C14.6087 10.6419 15.3006 10.6419 15.7273 11.0686C16.154 11.4954 16.154 12.1872 15.7273 12.614L11.864 16.4773Z"}}),e._v(" "),a("path",{attrs:{d:"M10.3186 8.78943C9.8919 8.36269 9.8919 7.67082 10.3186 7.24408C10.7454 6.81735 11.4372 6.81735 11.864 7.24408L15.7273 11.1074C16.1541 11.5342 16.1541 12.2261 15.7273 12.6528C15.3006 13.0795 14.6087 13.0795 14.182 12.6528L10.3186 8.78943Z"}})])])]}}],null,!1,1487813583)},"VueSlickCarousel",e.zoomSettings,!1),[e._v(" "),e._v(" "),e._l(e.pagesZoom,(function(t,o){return a("div",{key:o,staticClass:"mini-cover-zoom",attrs:{id:"page-"+o}},[a("img",{staticClass:"img-book",class:t.isLoaded?"":"book-is-loading",attrs:{width:"100%",src:t.url,alt:""}}),e._v(" "),t.isLoaded?e._e():a("div",{staticClass:"loading-bg-mobile"},[a("div",{staticClass:"loading book-loading"})])])}))],2)],1):e._e(),e._v(" "),a("div",{staticClass:"page-count"},[a("span",[e._v(e._s(e.lang.pages)+" "+e._s(e.currentPage+1)+"\n\t\t\t\t\t"),2===e.zoomSettings.slidesToShow?a("span",[e._v("- "+e._s(e.currentPage+2))]):e._e()]),e._v("\n\t\t\t\t/ "+e._s(e.pageNum)+"\n\t\t\t")])]):e._e()])])},staticRenderFns:[]},void 0,{name:"PreviewMobile",components:{VueSlickCarousel:n,Icon:D},props:{uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** If preloaded images are base64 formated. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},zoom:{type:Boolean,required:!1,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1}},data:function(){return p(p({mobileStopped:!0,pageNum:32,pagesToRender:[],pagesZoom:[],numberPositions:0,mobilePagePosition:0,loadedPages:3,loadedPagesZoom:1,isLoading:!1,lang:z(this.typeLanguage),zoomActive:!1,zoomMultiPages:!1,zoomSettings:{dots:!1,focusOnSelect:!0,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,touchThreshold:5},currentPage:0},"lang",z(this.typeLanguage)),"marginMenu",0)},mounted:function(){var e=this;this.pageNum=this.pages,this.initBookMobile(),this.initBookMobileZoom(),setTimeout((function(){e.isLoading=!0}),3e3);var t=document.getElementById("header-menu");t&&(e.marginMenu=t.offsetHeight+40),window.addEventListener("resize",(function(t){var a=document.getElementById("header-menu");a&&(e.marginMenu=a.offsetHeight+40)}))},updated:function(){var e=this;this.$nextTick((function(){document.getElementById("page-"+(e.loadedPages-1))&&(e.mobilePagePosition=document.getElementById("page-"+(e.loadedPages-1)).offsetLeft-50,document.getElementById("list-mobile").addEventListener("scroll",e.handleScroll))}))},methods:{changeZoom:function(e,t){this.currentPage=t,(2==this.zoomSettings.slidesToShow&&this.currentPage+1===this.loadedPagesZoom||1==this.zoomSettings.slidesToShow&&this.currentPage===this.loadedPagesZoom)&&this.getZoomList()},setFormatZoom:function(e){this.zoomSettings.slidesToShow=e,this.zoomSettings.slidesToScroll=e,this.currentPage=0},openZoom:function(){this.mobileStopped=!1,this.getZoomList(),this.zoomActive=!0},closeZoom:function(){this.zoomSettings.slidesToShow=1,this.zoomActive=!1},initBookMobile:function(){this.loadedPages=1;for(var e=1;e<this.pageNum;e++)if(e<5){var t={url:this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w=533&pw=0&noCache=true",isLoaded:!0};this.pagesToRender.push(t)}else{var a={url:this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+e+"&w=100&pw=0&noCache=true",isLoaded:!1};this.pagesToRender.push(a)}this.moreBooksMobile()},initBookMobileZoom:function(){this.loadedPages=1;for(var e=1;e<this.pageNum+1;e++)if(e<5){var t={url:this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w=533&pw=0&noCache=true",isLoaded:!0};this.pagesZoom.push(t)}else{var a={url:this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+e+"&w=100&pw=0&noCache=true",isLoaded:!1};this.pagesZoom.push(a)}},getZoomList:function(){for(var e,t=this,a=this,o=function(){var o=i;e=t.apiUrl+"/api/builder/getpreview/"+a.uuid+"?page="+i+"&w=533&v=0",Q.get(e,{responseType:"arraybuffer"}).then((function(e){var t={url:"data:image/png;base64,"+new Buffer.from(e.data,"binary").toString("base64"),isLoaded:!0};a.pagesZoom.splice(o-1,1,t)}))},i=a.loadedPagesZoom;i<=a.loadedPagesZoom+4&&i<=a.pageNum;i++)o();a.loadedPagesZoom=a.loadedPagesZoom+4},moreBooksMobile:function(){for(var e,t=this,a=this,o=function(){var o=i;e=t.apiUrl+"/api/builder/getpreview/"+a.uuid+"?page="+i+"&w=533&v=0",Q.get(e,{responseType:"arraybuffer"}).then((function(e){var t={url:"data:image/png;base64,"+new Buffer.from(e.data,"binary").toString("base64"),isLoaded:!0};a.pagesToRender.splice(o-1,1,t)}))},i=a.loadedPages;i<=a.loadedPages+4&&i<=a.pageNum;i++)o();a.loadedPages=a.loadedPages+4,document.getElementById("page-"+a.loadedPages-1)&&(a.mobilePagePosition=document.getElementById("page-"+a.loadedPages).offsetLeft-50)},handleScroll:function(e){null!==document.getElementById("list-mobile")&&document.getElementById("list-mobile").scrollLeft>=this.mobilePagePosition&&this.moreBooksMobile(),this.mobileStopped=!1},startedMethod:function(){this.$emit("start")},completedMethod:function(e){this.$emit("completed",e)}},computed:{},watch:{goToPage:function(e){if(e==this.dedication_page){//alert("AFF");
|
|
593
|
-
|
|
604
|
+
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=K("<div />",{class:"hard"}).html('<img class="img-book loading-blur" width="100%" src="https://dka04237waacy.cloudfront.net/api/builder/getplaceholder/'+this.product_id+"?page="+e+"&w="+this.bookDimensions.widthPlaceholder+"&pw=0&noCache=true"+(this.builder_apk?"&builder_apk="+encodeURIComponent(this.builder_apk):"")+'" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div>');t.turn("addPage",a,e);var o=this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w="+this.bookDimensions.width+"&v=0";this.builder_apk&&(o+="&builder_apk="+encodeURIComponent(this.builder_apk)),X.get(o,{progress:!1,responseType:"arraybuffer"}).then((function(e){var t=new Buffer.from(e.data,"binary").toString("base64");a.html("<img width='100%' src='data:image/png;base64,"+t+"'>")}))}},resize:function(){var e=0;document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight);var t=751,a=.88*K(window).height();"square"==this.formato&&(a=1.1*K(window).height());var o,i=a-e,r=o=1064*(100*i/t)/100;// Contas porcentagem
|
|
605
|
+
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-K(".page-wrapper[page="+this.currentPage+"]").width():this.currentPage===this.pages?this.isCover=K(".page-wrapper[page="+this.currentPage+"]").width():this.isCover=0,{width:r,height:i}}},beforeDestroy:function(){this._destroyed=!0,this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),Y(K),this.isLoading=!0},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}},watch:{goToPage:function(e){var t=this;if(e==t.dedication_page){var a=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(a+="&builder_apk="+encodeURIComponent(t.builder_apk)),K("#flipbook .page-wrapper[page='"+e+"] .p"+e+" img").attr("src",a),K("#flipbook").bind("turned",(function(a,o,i){if(K("#flipbook").length>0&&e==t.dedication_page){var r=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(r+="&builder_apk="+encodeURIComponent(t.builder_apk)),K("#flipbook .page-wrapper[page='"+e+"] .p"+e+" img").attr("src",r)}}))}}}},"data-v-3dc5ea7e",!1,void 0,!1,void 0,void 0,void 0),ee=r,te=require("axios"),ae=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-page",class:e.isLoading?"":"preview-loading",attrs:{id:"previewMobile"}},[e.isLoading?e._e():a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]),e._v(" "),a("div",{class:e.isLoading?"":"invisible"},[a("div",{staticClass:"block-preview-mobile"},[a("div",{staticClass:"list-mobile",attrs:{id:"list-mobile"}},[a("div",{staticClass:"mobile-shelf",class:e.mobileStopped?"active":"",style:{width:318*e.pageNum+"px"}},e._l(e.pagesToRender,(function(t,o){return a("div",{key:o,staticClass:"mini-cover",class:t.isLoaded?"":"is-loading",attrs:{id:"page-"+o}},[a("img",{staticClass:"img-book",attrs:{width:"100%",src:t.url,alt:""}}),e._v(" "),t.isLoaded?e._e():a("div",{staticClass:"loading-bg"},[a("div",{staticClass:"loading book-loading"})]),e._v(" "),a("span",{staticClass:"scrollable-preview-page-shadow"})])})),0)])]),e._v(" "),e.zoomActive?a("div",{directives:[{name:"style",rawName:"v-style",value:"margin-top:"+e.marginMenu+"px",expression:"'margin-top:' + marginMenu + 'px'"}],staticClass:"zoom",style:{marginTop:"-"+e.marginMenu+"px"}},[a("div",{staticClass:"top-zoom"},[a("div",{staticClass:"close",on:{click:function(t){return e.closeZoom()}}},[a("svg",{attrs:{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5607 8.43934C9.97487 7.85355 9.02513 7.85355 8.43934 8.43934C7.85355 9.02513 7.85355 9.97487 8.43934 10.5607L14.0962 16.2175L8.43937 21.8744C7.85358 22.4602 7.85358 23.4099 8.43937 23.9957C9.02516 24.5815 9.9749 24.5815 10.5607 23.9957L16.2175 18.3388L21.8744 23.9957C22.4602 24.5815 23.4099 24.5815 23.9957 23.9957C24.5815 23.4099 24.5815 22.4602 23.9957 21.8744L18.3388 16.2175L23.9957 10.5607C24.5815 9.97487 24.5815 9.02513 23.9957 8.43934C23.4099 7.85355 22.4602 7.85355 21.8744 8.43934L16.2175 14.0962L10.5607 8.43934Z"}})])]),e._v(" "),a("div",{staticClass:"toggle"},[a("div",{staticClass:"one-page",class:1===e.zoomSettings.slidesToShow?"active":"inactive",on:{click:function(t){return e.setFormatZoom(1)}}},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 5.58678C18 4.71042 17.2138 4 16.2439 4L7.7561 4C6.78623 4 6 4.71042 6 5.58678L6 18.4132C6 19.2896 6.78623 20 7.7561 20L16.2439 20C17.2138 20 18 19.2896 18 18.4132L18 5.58678ZM16.2439 18.4132L16.2439 5.58678L7.7561 5.58678L7.7561 18.4132L16.2439 18.4132Z"}})])]),e._v(" "),a("div",{staticClass:"many-pages",class:2===e.zoomSettings.slidesToShow?"active":"inactive",on:{click:function(t){return e.setFormatZoom(2)}}},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 5.58678C21 4.71042 20.2674 4 19.3636 4L12.9545 4C12.0508 4 11.3182 4.71042 11.3182 5.58678L11.3182 18.4132C11.3182 19.2896 12.0508 20 12.9545 20L19.3636 20C20.2674 20 21 19.2896 21 18.4132L21 5.58678ZM19.3636 18.4132L19.3636 5.58678L12.9545 5.58678L12.9545 18.4132L19.3636 18.4132Z"}}),e._v(" "),a("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.6818 5.58678C12.6818 4.71042 11.9492 4 11.0455 4L4.63636 4C3.73262 4 3 4.71042 3 5.58678L3 18.4132C3 19.2896 3.73262 20 4.63636 20L11.0455 20C11.9492 20 12.6818 19.2896 12.6818 18.4132L12.6818 5.58678ZM11.0455 18.4132L11.0455 5.58678L4.63636 5.58678L4.63636 18.4132L11.0455 18.4132Z"}})])])])]),e._v(" "),e.zoomActive?a("div",{staticClass:"carousel"},[a("VueSlickCarousel",e._b({attrs:{infinite:!1,lazyLoad:"progressive"},on:{beforeChange:e.changeZoom},scopedSlots:e._u([{key:"prevArrow",fn:function(t){return[a("div",{staticClass:"custom-arrow"},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M12.136 7.52267C12.5628 7.09594 13.2546 7.09594 13.6814 7.52267C14.1081 7.94941 14.1081 8.64128 13.6814 9.06802L9.818 12.9314C9.39127 13.3581 8.69939 13.3581 8.27266 12.9314C7.84592 12.5046 7.84592 11.8128 8.27266 11.386L12.136 7.52267Z"}}),e._v(" "),a("path",{attrs:{d:"M13.6814 15.2106C14.1081 15.6373 14.1081 16.3292 13.6814 16.7559C13.2546 17.1827 12.5628 17.1827 12.136 16.7559L8.27266 12.8926C7.84592 12.4658 7.84592 11.7739 8.27266 11.3472C8.69939 10.9205 9.39127 10.9205 9.818 11.3472L13.6814 15.2106Z"}})])])]}},{key:"nextArrow",fn:function(t){return[a("div",{staticClass:"custom-arrow"},[a("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:"M11.864 16.4773C11.4372 16.9041 10.7453 16.9041 10.3186 16.4773C9.89187 16.0506 9.89187 15.3587 10.3186 14.932L14.182 11.0686C14.6087 10.6419 15.3006 10.6419 15.7273 11.0686C16.154 11.4954 16.154 12.1872 15.7273 12.614L11.864 16.4773Z"}}),e._v(" "),a("path",{attrs:{d:"M10.3186 8.78943C9.8919 8.36269 9.8919 7.67082 10.3186 7.24408C10.7454 6.81735 11.4372 6.81735 11.864 7.24408L15.7273 11.1074C16.1541 11.5342 16.1541 12.2261 15.7273 12.6528C15.3006 13.0795 14.6087 13.0795 14.182 12.6528L10.3186 8.78943Z"}})])])]}}],null,!1,1487813583)},"VueSlickCarousel",e.zoomSettings,!1),[e._v(" "),e._v(" "),e._l(e.pagesZoom,(function(t,o){return a("div",{key:o,staticClass:"mini-cover-zoom",attrs:{id:"page-"+o}},[a("img",{staticClass:"img-book",class:t.isLoaded?"":"book-is-loading",attrs:{width:"100%",src:t.url,alt:""}}),e._v(" "),t.isLoaded?e._e():a("div",{staticClass:"loading-bg-mobile"},[a("div",{staticClass:"loading book-loading"})])])}))],2)],1):e._e(),e._v(" "),a("div",{staticClass:"page-count"},[a("span",[e._v(e._s(e.lang.pages)+" "+e._s(e.currentPage+1)+"\n\t\t\t\t\t"),2===e.zoomSettings.slidesToShow?a("span",[e._v("- "+e._s(e.currentPage+2))]):e._e()]),e._v("\n\t\t\t\t/ "+e._s(e.pageNum)+"\n\t\t\t")])]):e._e()])])},staticRenderFns:[]},void 0,{name:"PreviewMobile",components:{VueSlickCarousel:n,Icon:F},props:{uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** If preloaded images are base64 formated. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},zoom:{type:Boolean,required:!1,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1}},data:function(){return p(p({mobileStopped:!0,pageNum:32,pagesToRender:[],pagesZoom:[],numberPositions:0,mobilePagePosition:0,loadedPages:3,loadedPagesZoom:1,isLoading:!1,lang:S(this.typeLanguage),zoomActive:!1,zoomMultiPages:!1,zoomSettings:{dots:!1,focusOnSelect:!0,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,touchThreshold:5},currentPage:0},"lang",S(this.typeLanguage)),"marginMenu",0)},mounted:function(){var e=this;this.pageNum=this.pages,this.initBookMobile(),this.initBookMobileZoom(),setTimeout((function(){e.isLoading=!0}),3e3);var t=document.getElementById("header-menu");t&&(e.marginMenu=t.offsetHeight+40),window.addEventListener("resize",(function(t){var a=document.getElementById("header-menu");a&&(e.marginMenu=a.offsetHeight+40)}))},updated:function(){var e=this;this.$nextTick((function(){document.getElementById("page-"+(e.loadedPages-1))&&(e.mobilePagePosition=document.getElementById("page-"+(e.loadedPages-1)).offsetLeft-50,document.getElementById("list-mobile").addEventListener("scroll",e.handleScroll))}))},methods:{changeZoom:function(e,t){this.currentPage=t,(2==this.zoomSettings.slidesToShow&&this.currentPage+1===this.loadedPagesZoom||1==this.zoomSettings.slidesToShow&&this.currentPage===this.loadedPagesZoom)&&this.getZoomList()},setFormatZoom:function(e){this.zoomSettings.slidesToShow=e,this.zoomSettings.slidesToScroll=e,this.currentPage=0},openZoom:function(){this.mobileStopped=!1,this.getZoomList(),this.zoomActive=!0},closeZoom:function(){this.zoomSettings.slidesToShow=1,this.zoomActive=!1},initBookMobile:function(){this.loadedPages=1;for(var e=1;e<this.pageNum;e++)if(e<5){var t={url:this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w=533&pw=0&noCache=true",isLoaded:!0};this.pagesToRender.push(t)}else{var a={url:this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+e+"&w=100&pw=0&noCache=true",isLoaded:!1};this.pagesToRender.push(a)}this.moreBooksMobile()},initBookMobileZoom:function(){this.loadedPages=1;for(var e=1;e<this.pageNum+1;e++)if(e<5){var t={url:this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w=533&pw=0&noCache=true",isLoaded:!0};this.pagesZoom.push(t)}else{var a={url:this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+e+"&w=100&pw=0&noCache=true",isLoaded:!1};this.pagesZoom.push(a)}},getZoomList:function(){for(var e,t=this,a=this,o=function(){var o=i;e=t.apiUrl+"/api/builder/getpreview/"+a.uuid+"?page="+i+"&w=533&v=0",te.get(e,{responseType:"arraybuffer"}).then((function(e){var t={url:"data:image/png;base64,"+new Buffer.from(e.data,"binary").toString("base64"),isLoaded:!0};a.pagesZoom.splice(o-1,1,t)}))},i=a.loadedPagesZoom;i<=a.loadedPagesZoom+4&&i<=a.pageNum;i++)o();a.loadedPagesZoom=a.loadedPagesZoom+4},moreBooksMobile:function(){for(var e,t=this,a=this,o=function(){var o=i;e=t.apiUrl+"/api/builder/getpreview/"+a.uuid+"?page="+i+"&w=533&v=0",te.get(e,{responseType:"arraybuffer"}).then((function(e){var t={url:"data:image/png;base64,"+new Buffer.from(e.data,"binary").toString("base64"),isLoaded:!0};a.pagesToRender.splice(o-1,1,t)}))},i=a.loadedPages;i<=a.loadedPages+4&&i<=a.pageNum;i++)o();a.loadedPages=a.loadedPages+4,document.getElementById("page-"+a.loadedPages-1)&&(a.mobilePagePosition=document.getElementById("page-"+a.loadedPages).offsetLeft-50)},handleScroll:function(e){null!==document.getElementById("list-mobile")&&document.getElementById("list-mobile").scrollLeft>=this.mobilePagePosition&&this.moreBooksMobile(),this.mobileStopped=!1},startedMethod:function(){this.$emit("start")},completedMethod:function(e){this.$emit("completed",e)}},computed:{},watch:{goToPage:function(e){if(e==this.dedication_page){//alert("AFF");
|
|
606
|
+
ee("#page-"+(e-1)+" img").attr("src",this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random());var t=ee("#page-"+(e-1))[0].offsetLeft-40;ee("#list-mobile").animate({scrollLeft:t},1e3)}}}},"data-v-72b1cbd8",!1,void 0,!1,void 0,void 0,void 0),oe=require("axios"),ie=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[e.isLoaded&&!e.isMobile?a("div",{staticClass:"preview-desktop-area"},[a("Preview",{attrs:{uuid:e.uuid,pages:e.pages,book_format:e.book_format,product_id:e.product_id,preview_color:e.preview_color,typeLanguage:e.typeLanguage,dir:e.dir,goToPage:e.currentPage,dedication_page:e.dedication_page,builder_apk:e.builder_apk},on:{updateCurrentPage:e.updateCurrentPage}})],1):e._e(),e._v(" "),e.isLoaded&&e.isMobile?a("div",{staticClass:"preview-mobile-area"},[a("PreviewMobile",{attrs:{uuid:e.uuid,pages:e.pages,book_format:e.book_format,product_id:e.product_id,goToPage:e.currentPage,dedication_page:e.dedication_page,typeLanguage:e.typeLanguage,builder_apk:e.builder_apk}})],1):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewBook",components:{Preview:Q,PreviewMobile:ae,PreviewTools:H,TopBar:Z,BottomBar:V},props:{dedication_text:{type:String,required:!1},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_tools:{type:Boolean,required:!0,default:!0},/** Character uuid. `ddh5e177ff920f15` */preview_color:{type:String,default:"#16D3DB",required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},language:{type:String,required:!1},languages:{type:Array,required:!1},layout:{type:Number,required:!1},layouts:{type:Array,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},breadcrumbs:{type:Array,required:!1},steps:{type:Array,required:!1},is_created:{type:Boolean,required:!1,default:!1},dir:{type:String,default:"ltr",required:!1},colors:{type:[Object,Array],required:!1,default:function(){return{text:"#AFA2BA",textActive:"#FFFFFF",color:"#FFFFFF",colorHover:"#16d3db",colorActive:"#16d3db"}}},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!1,isMobile:!1,pages:0,book_format:"a4",lang:null,currentPage:0,dedication_page:null,currentLayout:null}},mounted:function(){var e=this;e.isMobile=e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()})),e.lang=S(e.typeLanguage),e.getProductInfo(),e.layout&&(e.currentLayout=e.layout)},methods:{updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),oe.get(t).then((function(t){e.pages=t.data.product.pages,t.data.product.extra&&t.data.product.extra.size&&(e.book_format=t.data.product.extra.size),t.data.product.layout&&e.layout&&t.data.product.layout.forEach((function(a,o){a.id===e.layout&&a.dedication_pages&&a.dedication_pages.length>0&&(e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})),!e.dedication_page&&t.data.product.layout&&t.data.product.layout[0].id&&t.data.product.layout[0].dedication_pages[0]&&(e.currentLayout=t.data.product.layout[0].id,e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0])),e.isLoaded=!0})).catch((function(e){console.log(e)}))},detectSize:function(){return!!/mobile|android/i.test(navigator.userAgent);// var menuStatus = false;
|
|
594
607
|
// if (window.innerWidth < 990) {
|
|
595
608
|
// menuStatus = true;
|
|
596
609
|
// }
|
|
@@ -614,7 +627,7 @@ this.$emit("completedDedication",e)},completedBirthday:function(e){
|
|
|
614
627
|
/**
|
|
615
628
|
* Função disparada ao ser finalizada customização. Recebe um objeto.
|
|
616
629
|
*/
|
|
617
|
-
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),
|
|
630
|
+
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),re=require("axios"),ne=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[e.isLoading?e._e():a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]),e._v(" "),a("div",{staticClass:"item-compensation"}),e._v(" "),e.isLoading?a("div",{staticClass:"poster-container",style:e.height?"height:"+e.height+"px":""},[a("div",{staticClass:"poster"},[e.isMobile?e._e():a("div",{staticClass:"frame"},[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/product-type-a3-frame@2x.png",alt:""}})]),e._v(" "),e.isMobile?a("div",{staticClass:"frame"},[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/product-type-a3-frame@2x.png",alt:""}})]):e._e(),e._v(" "),a("div",{staticClass:"cover"},[a("img",{attrs:{src:e.poster,alt:""}})])])]):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewPoster",components:{PreviewTools:H,TopBar:Z,BottomBar:V},props:{dedication_text:{type:String,required:!1},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_tools:{type:Boolean,required:!0,default:!0},/** Character uuid. `ddh5e177ff920f15` */preview_color:{type:String,default:"#16D3DB",required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},language:{type:String,required:!1},languages:{type:Array,required:!1},layout:{type:Number,required:!1},layouts:{type:Array,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},breadcrumbs:{type:Array,required:!1},steps:{type:Array,required:!1},is_created:{type:Boolean,required:!1,default:!1},dir:{type:String,default:"ltr",required:!1},colors:{type:[Object],required:!1,default:{text:"#AFA2BA",textActive:"#FFFFFF",color:"#FFFFFF",colorHover:"#F8F6FF",colorActive:"#16d3db"}},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!1,isMobile:!1,pages:0,book_format:"a4",lang:S(this.typeLanguage),currentPage:0,dedication_page:null,currentLayout:null,poster:"",width:0,height:0,isLoading:!1}},mounted:function(){var e=this;//self.lang = Language[self.typeLanguage];
|
|
618
631
|
e.isMobile=e.detectSize(),e.layout&&(e.currentLayout=e.layout),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize(),e.isMobile||e.resize()})),// if (!self.isMobile) {
|
|
619
632
|
// self.resize();
|
|
620
633
|
// }
|
|
@@ -625,7 +638,7 @@ e.getProductInfo()},methods:{resize:function(){var e=this,t=0;document.getElemen
|
|
|
625
638
|
// document.documentElement.scrollHeight,
|
|
626
639
|
// document.documentElement.offsetHeight
|
|
627
640
|
// );
|
|
628
|
-
var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width=o,e.height=a}))},updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),
|
|
641
|
+
var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width=o,e.height=a}))},updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),re.get(t).then((function(t){e.pages=t.data.product.pages,t.data.product.extra&&t.data.product.extra.size&&(e.book_format=t.data.product.extra.size),t.data.product.layout&&e.layout&&t.data.product.layout.forEach((function(a,o){a.id===e.layout&&a.dedication_pages&&a.dedication_pages.length>0&&(e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})),!e.dedication_page&&t.data.product.layout&&t.data.product.layout[0].id&&t.data.product.layout[0].dedication_pages[0]&&(e.currentLayout=t.data.product.layout[0].id,e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0])),e.getPoster()})).catch((function(e){console.log(e)}))},getPoster:function(){var e=this;return u(g().m((function t(){var a,o,i;return g().w((function(t){for(;;)switch(t.n){case 0:a=e,o=new Date,o.getMilliseconds(),//alert("teste");
|
|
629
642
|
// var url =
|
|
630
643
|
// self.apiUrl +
|
|
631
644
|
// "/api/builder/getpreview/" +
|
|
@@ -635,7 +648,7 @@ var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width
|
|
|
635
648
|
// timestamp +
|
|
636
649
|
// "&w=533&v=0&noCache=true";
|
|
637
650
|
i="https://builder.dentrodahistoria.com.br/api/builder/getpreview/"+a.uuid+"?page=1&w=521&v=0&noCache=true",a.builder_apk&&(i+="&builder_apk="+encodeURIComponent(a.builder_apk)),// Make a GET request to fetch the image
|
|
638
|
-
|
|
651
|
+
re.get(i,{responseType:"arraybuffer"}).then((function(e){// Convert the response data to a base64-encoded string
|
|
639
652
|
var t=Buffer.from(e.data,"binary").toString("base64");// Set the source of the image to the base64 string
|
|
640
653
|
//imageElement.src = `data:image/jpeg;base64, ${imageData}`;
|
|
641
654
|
a.poster="data:image/jpeg;base64, ".concat(t),a.isMobile||a.resize(),a.isLoading=!0})).catch((function(e){console.error("Error fetching image:",e)}));case 1:return t.a(2)}}),t)})))()},detectSize:function(){return!!/mobile|android/i.test(navigator.userAgent)},isLoadingMethod:function(e){},changeUuid:function(e){//console.log("uuid", payload)
|
|
@@ -657,7 +670,7 @@ this.$emit("completedDedication",e)},completedBirthday:function(e){
|
|
|
657
670
|
/**
|
|
658
671
|
* Função disparada ao ser finalizada customização. Recebe um objeto.
|
|
659
672
|
*/
|
|
660
|
-
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),
|
|
673
|
+
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),se=require("axios"),de=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[e.isLoading?e._e():a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]),e._v(" "),a("div",{staticClass:"item-compensation"}),e._v(" "),e.isLoading?a("div",{staticClass:"wallpaper-container",style:e.height?"height:"+e.height+"px":""},[a("div",{staticClass:"wallpaper"},[e.isMobile?e._e():a("div",{staticClass:"frame"},[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/wallpaper-preview-lg@2x.png",alt:""}})]),e._v(" "),e.isMobile?a("div",{staticClass:"frame"},[a("img",{attrs:{src:"https://brave.dentrodahistoria.com.br/images/wallpaper-preview-sm@2x.png",alt:""}})]):e._e(),e._v(" "),a("div",{staticClass:"cover"},[a("img",{attrs:{src:e.wallpaper,alt:""}})])])]):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewWallpaper",components:{PreviewTools:H,TopBar:Z,BottomBar:V},props:{dedication_text:{type:String,required:!1},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_tools:{type:Boolean,required:!0,default:!0},/** Character uuid. `ddh5e177ff920f15` */preview_color:{type:String,default:"#16D3DB",required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},language:{type:String,required:!1},languages:{type:Array,required:!1},layout:{type:Number,required:!1},layouts:{type:Array,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},breadcrumbs:{type:Array,required:!1},steps:{type:Array,required:!1},is_created:{type:Boolean,required:!1,default:!1},dir:{type:String,default:"ltr",required:!1},colors:{type:[Object,Array],required:!1,default:function(){return{text:"#AFA2BA",textActive:"#FFFFFF",color:"#FFFFFF",colorHover:"#F8F6FF",colorActive:"#16d3db"}}},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!1,isMobile:!1,pages:0,book_format:"a4",lang:S(this.typeLanguage),currentPage:0,dedication_page:null,currentLayout:null,wallpaper:"",width:0,height:0,isLoading:!1}},mounted:function(){var e=this;//self.lang = Language[self.typeLanguage];
|
|
661
674
|
e.isMobile=e.detectSize(),e.layout&&(e.currentLayout=e.layout),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize(),e.isMobile||e.resize()})),// if (!self.isMobile) {
|
|
662
675
|
// self.resize();
|
|
663
676
|
// }
|
|
@@ -668,7 +681,7 @@ e.getProductInfo()},methods:{resize:function(){var e=this,t=0;document.getElemen
|
|
|
668
681
|
// document.documentElement.scrollHeight,
|
|
669
682
|
// document.documentElement.offsetHeight
|
|
670
683
|
// );
|
|
671
|
-
var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width=o,e.height=a}))},updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),
|
|
684
|
+
var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width=o,e.height=a}))},updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),se.get(t).then((function(t){e.pages=t.data.product.pages,t.data.product.extra&&t.data.product.extra.size&&(e.book_format=t.data.product.extra.size),t.data.product.layout&&e.layout&&t.data.product.layout.forEach((function(a,o){a.id===e.layout&&a.dedication_pages&&a.dedication_pages.length>0&&(e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})),!e.dedication_page&&t.data.product.layout&&t.data.product.layout[0].id&&t.data.product.layout[0].dedication_pages[0]&&(e.currentLayout=t.data.product.layout[0].id,e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0])),e.getWallpaper()})).catch((function(e){console.log(e)}))},getWallpaper:function(){var e=this;return u(g().m((function t(){var a,o,i;return g().w((function(t){for(;;)switch(t.n){case 0:a=e,o=new Date,o.getMilliseconds(),//alert("teste");
|
|
672
685
|
// var url =
|
|
673
686
|
// self.apiUrl +
|
|
674
687
|
// "/api/builder/getpreview/" +
|
|
@@ -679,7 +692,7 @@ var a=window.innerHeight-t,o=1064*(100*a/72)/100;e.$nextTick((function(){e.width
|
|
|
679
692
|
// "&w=533&v=0&noCache=true";
|
|
680
693
|
// S;
|
|
681
694
|
i="https://builder.dentrodahistoria.com.br/api/builder/getpreview/"+a.uuid+"?page=1&w=521&v=0&noCache=true",a.builder_apk&&(i+="&builder_apk="+encodeURIComponent(a.builder_apk)),// Make a GET request to fetch the image
|
|
682
|
-
|
|
695
|
+
se.get(i,{responseType:"arraybuffer"}).then((function(e){// Convert the response data to a base64-encoded string
|
|
683
696
|
var t=Buffer.from(e.data,"binary").toString("base64");// Set the source of the image to the base64 string
|
|
684
697
|
//imageElement.src = `data:image/jpeg;base64, ${imageData}`;
|
|
685
698
|
a.wallpaper="data:image/jpeg;base64, ".concat(t),a.isMobile||a.resize(),a.isLoading=!0})).catch((function(e){console.error("Error fetching image:",e)}));case 1:return t.a(2)}}),t)})))()},detectSize:function(){return!!/mobile|android/i.test(navigator.userAgent)},isLoadingMethod:function(e){},changeUuid:function(e){//console.log("uuid", payload)
|
|
@@ -701,9 +714,9 @@ this.$emit("completedDedication",e)},completedBirthday:function(e){
|
|
|
701
714
|
/**
|
|
702
715
|
* Função disparada ao ser finalizada customização. Recebe um objeto.
|
|
703
716
|
*/
|
|
704
|
-
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),
|
|
717
|
+
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),le=require("axios"),ce=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[a("div",{staticClass:"top-bar-area",attrs:{dir:e.dir}},[a("TopBar",{attrs:{breadcrumbs:e.breadcrumbs,steps:e.steps,isMobile:e.isMobile,have_button:!0,color:(e.isMobile,"#afa2ba"),preview_color:"transparent",dir:e.dir,typeLanguage:e.typeLanguage,colors:e.colors},on:{click:e.changeRoute,clickContinue:e.changeRouteContinue}})],1),e._v(" "),a("div",["book"===e.type||"livro"===e.type||"Combo"===e.type||"combo"===e.type?a("div",{staticClass:"preview-height"},[a("PreviewBook",{attrs:{uuid:e.uuid,slug:e.slug,have_tools:e.have_tools,dedication_text:e.dedication_text,have_dedication:e.have_dedication,character_id:e.character_id,product_id:e.product_id,gender:e.gender,preview_color:e.preview_color,book_name:e.book_name,book_brand:e.book_brand,character_position_id:e.character_position_id,language:e.builderLanguage,languages:e.languages,layout:e.layout,layouts:e.layouts,breadcrumbs:e.breadcrumbs,steps:e.steps,is_created:e.is_created,builder_apk:e.builder_apk,typeLanguage:e.typeLanguage,dir:e.dir},on:{completed:e.completed}})],1):e._e(),e._v(" "),"wallpaper"===e.type?a("div",{staticClass:"preview-height"},[a("PreviewWallpaper",{attrs:{uuid:e.uuid,slug:e.slug,have_tools:e.have_tools,dedication_text:e.dedication_text,have_dedication:e.have_dedication,character_id:e.character_id,product_id:e.product_id,gender:e.gender,preview_color:e.preview_color,book_name:e.book_name,book_brand:e.book_brand,character_position_id:e.character_position_id,language:e.builderLanguage,languages:e.languages,layout:e.layout,layouts:e.layouts,breadcrumbs:e.breadcrumbs,steps:e.steps,is_created:e.is_created,builder_apk:e.builder_apk,typeLanguage:e.typeLanguage,dir:e.dir},on:{completed:e.completed}})],1):e._e(),e._v(" "),"poster"===e.type?a("div",{staticClass:"preview-height"},[a("PreviewPoster",{attrs:{uuid:e.uuid,slug:e.slug,have_tools:e.have_tools,dedication_text:e.dedication_text,have_dedication:e.have_dedication,character_id:e.character_id,product_id:e.product_id,gender:e.gender,preview_color:e.preview_color,book_name:e.book_name,book_brand:e.book_brand,character_position_id:e.character_position_id,language:e.builderLanguage,languages:e.languages,layout:e.layout,layouts:e.layouts,breadcrumbs:e.breadcrumbs,steps:e.steps,is_created:e.is_created,builder_apk:e.builder_apk,typeLanguage:e.typeLanguage,dir:e.dir},on:{completed:e.completed}})],1):e._e()]),e._v(" "),a("div",{staticClass:"preview-mobile-tools",class:e.isLoaded?"":"invisible"},[a("PreviewTools",{directives:[{name:"show",rawName:"v-show",value:e.isLoaded&&e.have_tools,expression:"isLoaded && have_tools"}],attrs:{dedication_text:e.dedication_text,uuid:e.uuid,slug:e.slug,character_id:e.character_id,have_dedication:e.have_dedication,product_id:e.product_id,gender:e.gender,typeLanguage:e.typeLanguage,language:e.builderLanguage,languages:e.languages,layout:e.currentLayout,layouts:e.layouts,preview_color:e.preview_color,character_position_id:e.character_position_id,typeRead:e.typeRead,custom_mes:e.custom_mes,custom_numero:e.custom_numero,is_created:e.is_created,builder_apk:e.builder_apk,dir:e.dir},on:{isLoadingMethod:e.isLoadingMethod,changeUuid:e.changeUuid,changeName:e.changeName,changeDedication:e.changeDedication,changeBirthday:e.changeBirthday,clickContinue:e.changeRouteContinue}})],1),e._v(" "),a("div",{staticClass:"bottom-bar-area",attrs:{dir:e.dir}},[e.isLoaded?a("BottomBar",{attrs:{uuid:e.uuid,book_brand:e.book_brand,book_name:e.book_name,preview_color:e.preview_color,book_format:e.book_format,typeLanguage:e.typeLanguage,productType:e.type,dir:e.dir,continueLabel:e.continueLabel,builder_apk:e.builder_apk},on:{changeUrl:e.changeUrl}}):e._e()],1)])},staticRenderFns:[]},void 0,{name:"PreviewMain",components:{PreviewBook:ie,PreviewPoster:ne,PreviewWallpaper:de,PreviewTools:H,TopBar:Z,BottomBar:V},props:{type:{type:String,//required: false,
|
|
705
718
|
default:"book"},dedication_text:{type:String,required:!1},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_tools:{type:Boolean,required:!0,default:!0},/** Character uuid. `ddh5e177ff920f15` */preview_color:{type:String,default:"#16D3DB",required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},/** Slug do idioma do livro na API. Se omitido, deriva de typeLanguage. */language:{type:String,required:!1},languages:{type:Array,required:!1},layout:{type:Number,required:!1},layouts:{type:Array,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},breadcrumbs:{type:Array,required:!1},steps:{type:Array,required:!1},is_created:{type:Boolean,required:!1,default:!1},dir:{type:String,default:"ltr",required:!1},colors:{type:[Object,Array],required:!1,default:function(){return{text:"#AFA2BA",textActive:"#FFFFFF",color:"#FFFFFF",colorHover:"#16d3db",colorActive:"#16d3db"}}},continueLabel:{type:String,//default: "ltr",
|
|
706
|
-
required:!1},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!0,isMobile:!1,pages:0,book_format:"a4",currentPage:0,dedication_page:null,currentLayout:null}},computed:{lang:function(){return
|
|
719
|
+
required:!1},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!0,isMobile:!1,pages:0,book_format:"a4",currentPage:0,dedication_page:null,currentLayout:null}},computed:{lang:function(){return S(this.typeLanguage)},builderLanguage:function(){return x(this.typeLanguage,this.language)}},mounted:function(){// window.addEventListener("resize", function (e) {
|
|
707
720
|
// self.isMobile = self.detectSize();
|
|
708
721
|
// });
|
|
709
722
|
// self.lang = getLanguage(self.typeLanguage);
|
|
@@ -711,7 +724,7 @@ required:!1},/** APK do builder (opcional) */builder_apk:{type:String,required:!
|
|
|
711
724
|
// if (self.layout) {
|
|
712
725
|
// self.currentLayout = self.layout;
|
|
713
726
|
// }
|
|
714
|
-
},methods:{updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),
|
|
727
|
+
},methods:{updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),le.get(t).then((function(t){e.isLoaded=!0,e.pages=t.data.product.pages,t.data.product.extra&&t.data.product.extra.size&&(e.book_format=t.data.product.extra.size),t.data.product.layout&&e.layout&&t.data.product.layout.forEach((function(a,o){a.id===e.layout&&a.dedication_pages&&a.dedication_pages.length>0&&(e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})),!e.dedication_page&&t.data.product.layout&&t.data.product.layout[0].id&&t.data.product.layout[0].dedication_pages[0]&&(e.currentLayout=t.data.product.layout[0].id,e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})).catch((function(e){console.log(e)}))},detectSize:function(){if(self.isMobile=!1,window.innerWidth<990)return!0},isLoadingMethod:function(e){},changeUuid:function(e){//console.log("uuid", payload)
|
|
715
728
|
var t=this;t.isLoaded=!1,t.completed(e),this.$nextTick((function(){t.isLoaded=!0}))},changeName:function(e){var t=this;t.isLoaded=!1,t.completed(e),this.$nextTick((function(){t.isLoaded=!0})),// setTimeout(() => {
|
|
716
729
|
// self.currentPage = 1;
|
|
717
730
|
// }, 4000);
|
|
@@ -730,33 +743,33 @@ this.$emit("completedDedication",e)},completedBirthday:function(e){
|
|
|
730
743
|
/**
|
|
731
744
|
* Função disparada ao ser finalizada customização. Recebe um objeto.
|
|
732
745
|
*/
|
|
733
|
-
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),
|
|
734
|
-
this.isLoaded=!0}}},void 0,!1,void 0,!1,void 0,void 0,void 0)),
|
|
735
|
-
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return
|
|
736
|
-
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&apk=".concat(encodeURIComponent(o.builder_apk))),a.n=1,
|
|
737
|
-
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%' firstPage='true'></div>";case 3:r++,t.n=1;break;case 4:return
|
|
746
|
+
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),ue=(require("axios"),D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[e.isLoaded&&!e.isMobile?a("Preview",{attrs:{uuid:e.uuid,pages:e.pages,age:e.age,product_id:e.product_id,typeLanguage:e.typeLanguage,apiUrl:e.apiUrl,builder_apk:e.builder_apk}}):e._e(),e._v(" "),e.isLoaded&&e.isMobile?a("PreviewMobile",{attrs:{uuid:e.uuid,pages:e.pages,age:e.age,product_id:e.product_id,typeLanguage:e.typeLanguage,apiUrl:e.apiUrl,builder_apk:e.builder_apk}}):e._e()],1)},staticRenderFns:[]},void 0,{name:"PreviewFull",components:{Preview:Q,PreviewMobile:ae},props:{/** Name of protagonist. `Diego` */current_name:{type:String,required:!0},pages:{type:String,required:!0},age:{type:String,required:!0},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Type id of Gender. `89` */type_id:{type:Number,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_name:{type:Boolean,required:!1,default:!1},/** Show number at shirt. */have_shirt_number:{type:Boolean,required:!1,default:!1},/** Show layout changes. */have_layout:{type:Boolean,required:!1,default:!1},/** Show Birth date. */have_birth_date:{type:Boolean,required:!1,default:!1},/** Show Pet. */have_pet:{type:Boolean,required:!1,default:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!0,isMobile:!1,uuid:"ddh5e5fb1b09b88d",pages:32,age:6,character_id:57,product_id:595}},mounted:function(){var e=this;e.isMobile=e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()}))},methods:{detectSize:function(){var e=!1;return window.innerWidth<990&&(e=!0),e},isLoadingMethod:function(e){this.isLoaded=e},changeUuid:function(e){this.uuid=e,//.uuid
|
|
747
|
+
this.isLoaded=!0}}},void 0,!1,void 0,!1,void 0,void 0,void 0)),pe=r,he=require("axios"),me=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-box"},[a("div",{staticClass:"flipbook-container",class:e.book_format},[e.isLoading&&e.loader?a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]):e._e(),e._v(" "),a("div",{staticClass:"book-centered",style:e.centered?{"margin-left":e.isCover+"px"}:null},[!e.isLoading&&e.loader?a("div",{staticClass:"arrow-animate"},[a("Icon",{attrs:{name:"arrow-right",size:"lg",fill:e.preview_color,stroke:"transparent"}})],1):e._e(),e._v(" "),a("div",{staticClass:"preview-desktop",class:e.isLoading?"invisible":"visible",attrs:{dir:"ltr"}},[a("div",{staticClass:"flipbook-lib",class:[e.formato],attrs:{id:"flipbook"}})])])]),e._v(" "),e.controls&&0==e.isLoading?a("div",{staticClass:"controls"},[a("div",[1!=e.currentPage?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheLeft}},[a("Icon",{attrs:{name:"chevron-left",stroke:"transparent",size:"md",fill:e.preview_color}})],1):e._e()],1),e._v(" "),a("div",[e.currentPage!=e.pages?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheRight}},[a("Icon",{attrs:{name:"chevron-right",stroke:"transparent",fill:e.preview_color,size:"md"}})],1):e._e()],1)]):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewSnippetHorizontal",components:{Icon:F,Button:O},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0,default:32},/** Book format. `5` */book_format:{type:String,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** The five first pages. `https://builder.dentrodahistoria.com.br/api/builder/getpreview/ddh5e177ff920f15?page=X` */preloaded_pages:{type:Array,required:!1},/** Download and convert preloaded images to base64. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},zoom:{type:Boolean,default:!1},/** Show preview controls */controls:{type:Boolean,default:!0},/** Center book on first and last page */centered:{type:Boolean,default:!0},/** Show loader */loader:{type:Boolean,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},builder_apk:{type:String,required:!1},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},typeRead:{type:Boolean,required:!1,default:!1}},data:function(){return{formato:"a4",bookDimensions:{widthPlaceholder:100,width:800},flipbookWidth:null,flipbookHeight:null,isCover:0,currentPage:1,loadedPages:5,numberPositions:0,isLoading:!0,lang:S(this.typeLanguage),_destroyed:!1,_onResize:null}},mounted:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,e._destroyed=!1,"square"==e.book_format?e.formato="square":e.formato="a4",t.n=1,e.createInitialPages();case 1:t.v&&(e.initBook(),e._onResize=function(){if(!a._destroyed){var e=J(pe);if(e){var t=a.resize();e.turn("size",t.width,t.height),e.turn("resize"),a.updated()}}},window.addEventListener("resize",e._onResize),e.loader,//setTimeout(function () {
|
|
748
|
+
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return G.apply(void 0,[pe].concat(t))},started:function(){//this.cleanClickPages();
|
|
749
|
+
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&apk=".concat(encodeURIComponent(o.builder_apk))),a.n=1,he.get(n,{responseType:"arraybuffer"}).then((function(e){return Buffer.from(e.data,"binary").toString("base64")}));case 1:return a.a(2,a.v)}}),a)})))()},createInitialPages:function(){var e=this;return u(g().m((function t(){var a,o,i,r,n;return g().w((function(t){for(;;)switch(t.n){case 0:a=e,o=new Date,o.getMilliseconds(),//var n = Math.floor(Math.random() * 1000);
|
|
750
|
+
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%' firstPage='true'></div>";case 3:r++,t.n=1;break;case 4:return pe("#flipbook").html(i),t.a(2,!0)}}),t)})))()},initBook:function(){var e=this,t=e.resize();// this.flipbookWidth = self.formato === "square" ? "100vh" : "100vh";
|
|
738
751
|
//this.flipbookHeight = document.getElementsByClassName("top-bar")[0].offsetHeight
|
|
739
752
|
// self.formato === "square"
|
|
740
753
|
// ? "calc(100vh - 91px)"
|
|
741
754
|
// : "calc(100vh - 91px)";
|
|
742
|
-
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,
|
|
755
|
+
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,pe("#flipbook").length>0){pe("#flipbook").turn({width:e.flipbookWidth,height:e.flipbookHeight,autoCenter:!1,gradients:!0,acceleration:!0,duration:800,elevation:150}),pe("#flipbook").bind("start",(function(e,t,a){console.log(e),console.log(t),console.log(a),"r"==a||"l"==a?pe(".page-wrapper").css("cursor","pointer"):pe(".page-wrapper").css("cursor","unset"),"tl"!=a&&"tr"!=a&&"bl"!=a&&"br"!=a||e.preventDefault()})),pe("#flipbook").bind("end",(function(e,t,a){//$(".page-wrapper").css("cursor", "unset");
|
|
743
756
|
})),// Capa
|
|
744
|
-
e.isCover="-"+
|
|
745
|
-
|
|
757
|
+
e.isCover="-"+pe(".page-wrapper[page="+e.currentPage+"]").width(),// Virada da páginas
|
|
758
|
+
pe("#flipbook").bind("turning",(function(t,a,o){e.currentPage=a,e.$emit("updateCurrentPage",e.currentPage),e.currentPage>=e.loadedPages-2&&e.morePages(),1===e.currentPage?(e.numberPositions=0,e.isCover="-"+pe(".page-wrapper[page="+e.currentPage+"]").width()):e.currentPage===e.pages?(e.isCover=pe(".page-wrapper[page="+e.currentPage+"]").width(),e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1)):(e.isCover=0,e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1))})),pe("#flipbook").bind("turned",(function(t,a,o){e.cleanClickPages()}));for(var a=this.loadedPages;a<this.pages;a++){var o=this.flipbookTurn("pages")+1,i=pe('<div><img class="img-book" width="100%" src="'+this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+a+"&w="+this.bookDimensions.widthPlaceholder+'&pw=0&noCache=true" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div> </div>');this.flipbookTurn("addPage",i),this.flipbookTurn("pages",o)}//self.cleanClickPages();
|
|
746
759
|
}// Habilitar passagem via o dedo
|
|
747
|
-
|
|
760
|
+
pe(document).keydown((function(t){switch(t.keyCode){case 37:e.flipbookTurn("previous");break;case 39:e.flipbookTurn("next")}})),this.started()},cleanClickPages:function(){pe("#flipbook .even").each((function(){pe(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
748
761
|
})),// Resetting the click event for odd elements
|
|
749
|
-
|
|
750
|
-
})),
|
|
762
|
+
pe("#flipbook .odd").each((function(){pe(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
763
|
+
})),pe("#flipbook .even").each((function(){pe(this).parents().eq(1).click((function(){this.flipbookTurn("previous")}))})),pe("#flipbook .odd").each((function(){pe(this).parents().eq(1).click((function(){this.flipbookTurn("next")}))}))},toTheLeft:function(){this.flipbookTurn("previous")},toTheRight:function(){this.flipbookTurn("next")},zoomTo:function(e){setTimeout((function(){pe(".flipbook-container").data().regionClicked?pe(".flipbook-container").data().regionClicked=!1:1==pe(".flipbook-container").zoom("value")?pe(".flipbook-container").zoom("zoomIn",e):pe(".flipbook-container").zoom("zoomOut")}),1)},activateZoom:function(){var e=this;pe(".flipbook-container").zoom({flipbook:pe("#flipbook"),max:function(){return 2},when:{swipeLeft:function(){G(pe,"next")},swipeRight:function(){G(pe,"previous")},resize:function(e,t,a,o){// if (scale==1)
|
|
751
764
|
// loadSmallPage(page, pageElement);
|
|
752
765
|
// else
|
|
753
766
|
// loadLargePage(page, pageElement);
|
|
754
|
-
},zoomIn:function(){
|
|
767
|
+
},zoomIn:function(){pe(".flipbook-container").removeClass("zoom-in"),pe(".flipbook-container").removeClass("zoom-out"),pe(".flipbook-container").addClass("zoom-in")},zoomOut:function(){pe(".flipbook-container").removeClass("zoom-in"),pe(".flipbook-container").removeClass("zoom-out"),pe(".flipbook-container").addClass("zoom-out"),// $('.exit-message').hide();
|
|
755
768
|
// $('.thumbnails').fadeIn();
|
|
756
769
|
// $('.made').fadeIn();
|
|
757
770
|
// $('.zoom-icon').removeClass('zoom-icon-out').addClass('zoom-icon-in');
|
|
758
|
-
setTimeout((function(){
|
|
759
|
-
|
|
771
|
+
setTimeout((function(){pe("#flipbook").addClass("animated").removeClass("zoom-in"),e.resizeViewport()}),0)}}}),// Zoom event
|
|
772
|
+
pe.isTouch?pe(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):pe(".flipbook-container").bind("zoom.tap",e.zoomTo)},resizeViewport:function(){var e=self.resize(),t=e.width,a=e.height,o=this.flipbookTurn("options");if(o){if(pe("#flipbook").removeClass("animated"),pe(".flipbook-container").css({width:t,height:a}).zoom("resize"),1==this.flipbookTurn("zoom")){var i=calculateBound({width:o.width,height:o.height,boundWidth:Math.min(o.width,t),boundHeight:Math.min(o.height,a)});i.width%2!=0&&(i.width-=1),i.width==pe("#flipbook").width()&&i.height==pe("#flipbook").height()||(this.flipbookTurn("size",i.width,i.height),1==this.flipbookTurn("page")&&this.flipbookTurn("peel","br")),pe("#flipbook").css({top:-i.height/2,left:-i.width/2})}// var magazineOffset = $('#flipbook').offset(),
|
|
760
773
|
// boundH = height - magazineOffset.top - $('#flipbook').height(),
|
|
761
774
|
// marginTop = (boundH - $('.thumbnails > div').height()) / 2;
|
|
762
775
|
// if (marginTop<0) {
|
|
@@ -769,7 +782,7 @@ ce.isTouch?ce(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):ce(".flipbo
|
|
|
769
782
|
// $('.made').hide();
|
|
770
783
|
// else
|
|
771
784
|
// $('.made').show();
|
|
772
|
-
|
|
785
|
+
pe("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loadedPages+1;e<=this.loadedPages+4;e++)this.addPage(e,J(pe));this.cleanClickPages(),// $("#flipbook .even").each(function () {
|
|
773
786
|
// $(this)
|
|
774
787
|
// .parents()
|
|
775
788
|
// .eq(1)
|
|
@@ -785,19 +798,19 @@ ce("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loade
|
|
|
785
798
|
// //this.flipbookTurn("next");
|
|
786
799
|
// });
|
|
787
800
|
// });
|
|
788
|
-
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=
|
|
789
|
-
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-
|
|
801
|
+
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=pe("<div />",{class:"hard"}).html('<img class="img-book loading-blur" width="100%" src="https://dka04237waacy.cloudfront.net/api/builder/getplaceholder/'+this.product_id+"?page="+e+"&w="+this.bookDimensions.widthPlaceholder+'&pw=0" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div>');t.turn("addPage",a,e);var o=this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w="+this.bookDimensions.width+"&v=0";this.builder_apk&&(o+="&apk=".concat(encodeURIComponent(this.builder_apk))),he.get(o,{progress:!1,responseType:"arraybuffer"}).then((function(e){var t=new Buffer.from(e.data,"binary").toString("base64");a.html("<img width='100%' src='data:image/png;base64,"+t+"'>")}))}},resize:function(){var e=0;document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight);var t=751,a=.88*pe(window).height();"square"==this.formato&&(a=1.1*pe(window).height());var o,i=a-e,r=o=1064*(100*i/t)/100;// Contas porcentagem
|
|
802
|
+
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-pe(".page-wrapper[page="+this.currentPage+"]").width():this.currentPage===this.pages?this.isCover=pe(".page-wrapper[page="+this.currentPage+"]").width():this.isCover=0,{width:r,height:i}}},beforeDestroy:function(){this._destroyed=!0,this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),Y(pe),this.isLoading=!0},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}},watch:{goToPage:function(e){var t=this;if(e==t.dedication_page&&(this.flipbookTurn("page",e,{animate:!0}),pe("#flipbook").bind("turned",(function(a,o,i){if(pe("#flipbook").length>0&&e==t.dedication_page){var r=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(r+="&apk=".concat(encodeURIComponent(t.builder_apk))),pe("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img").attr("src",r)}})),pe("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img"))){var a=this.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(a+="&apk=".concat(encodeURIComponent(t.builder_apk))),pe("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img").attr("src",a)}//setTimeout(() => {
|
|
790
803
|
//alert("Atualizou dedicas");
|
|
791
804
|
//}, 500);
|
|
792
|
-
}}},"data-v-0e6f67e0",!1,void 0,!1,void 0,void 0,void 0),
|
|
793
|
-
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return
|
|
794
|
-
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&apk=".concat(encodeURIComponent(o.builder_apk))),a.n=1,
|
|
795
|
-
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%'></div>";case 3:r++,t.n=1;break;case 4:return
|
|
805
|
+
}}},"data-v-0e6f67e0",!1,void 0,!1,void 0,void 0,void 0),ge=r,fe=require("axios"),ve=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-box"},[a("div",{staticClass:"flipbook-container",class:e.book_format},[e.isLoading&&e.loader?a("div",{staticClass:"loading-box"},[a("div",{attrs:{id:"loading"}}),e._v(" "),a("small",[e._v(e._s(e.lang.justASecond))]),e._v(" "),a("h4",[e._v(e._s(e.lang.loadingPhrase))])]):e._e(),e._v(" "),a("div",{staticClass:"book-centered"},[!e.isLoading&&e.loader?a("div",{staticClass:"arrow-animate"},[a("Icon",{attrs:{name:"arrow-right",size:"lg",fill:e.preview_color,stroke:"transparent"}})],1):e._e(),e._v(" "),a("div",{staticClass:"flipbook-lens flipbook-lens-left",on:{click:function(t){return t.stopPropagation(),e.lensLeftClick(t)}}}),e._v(" "),a("div",{staticClass:"flipbook-lens flipbook-lens-right",on:{click:function(t){return t.stopPropagation(),e.lensRightClick(t)}}}),e._v(" "),a("div",{staticClass:"preview-desktop",class:e.isLoading?"invisible":"visible",attrs:{dir:"ltr"}},[a("div",{staticClass:"flipbook-lib",class:[e.formato],attrs:{id:"flipbook"}})])])]),e._v(" "),e.controls&&0==e.isLoading?a("div",{staticClass:"controls"},[a("div",[1!=e.currentPage?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheLeft}},[a("Icon",{attrs:{name:"chevron-left",stroke:"transparent",size:"md",fill:e.preview_color}})],1):e._e()],1),e._v(" "),a("div",[e.currentPage!=e.pages?a("Button",{attrs:{kind:"primary",size:"xl",width:"circle",inverted:!0},on:{click:e.toTheRight}},[a("Icon",{attrs:{name:"chevron-right",stroke:"transparent",fill:e.preview_color,size:"md"}})],1):e._e()],1)]):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewSnippetVertical",components:{Icon:F,Button:O},props:{/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Number of pages. `32` */pages:{type:Number,required:!0,default:32},/** Book format. `5` */book_format:{type:String,required:!0},/** Product ID. `109` */product_id:{type:Number,required:!0},/** The five first pages. `https://builder.dentrodahistoria.com.br/api/builder/getpreview/ddh5e177ff920f15?page=X` */preloaded_pages:{type:Array,required:!1},/** Download and convert preloaded images to base64. `false` */base64:{type:Boolean,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},zoom:{type:Boolean,default:!1},/** Show preview controls */controls:{type:Boolean,default:!0},/** Center book on first and last page */centered:{type:Boolean,default:!0},/** Show loader */loader:{type:Boolean,default:!0},apiUrl:{type:String,required:!1,default:"https://builder.dentrodahistoria.com.br"},builder_apk:{type:String,required:!1},goToPage:{type:Number,required:!1},dedication_page:{type:Number,required:!1},preview_color:{type:String,default:"#12d3db",required:!1},typeRead:{type:Boolean,required:!1,default:!1}},data:function(){return{formato:"a4",bookDimensions:{widthPlaceholder:100,width:800},flipbookWidth:null,flipbookHeight:null,isCover:0,currentPage:1,loadedPages:5,numberPositions:0,isLoading:!0,lang:S(this.typeLanguage),_destroyed:!1,_onResize:null}},mounted:function(){var e=this;return u(g().m((function t(){var a,o;return g().w((function(t){for(;;)switch(t.n){case 0:return a=e,e._destroyed=!1,"square"==e.book_format?e.formato="square":e.formato="a4",t.n=1,e.createInitialPages();case 1:t.v&&(e.initBook(),e._onResize=function(){if(!a._destroyed){var e=J(ge);if(e){var t=a.resize();e.turn("size",t.width,t.height),e.turn("resize"),a.updated()}}},window.addEventListener("resize",e._onResize),e.loader,//setTimeout(function () {
|
|
806
|
+
a.isLoading=!1,o=a.resize(),a.flipbookTurn("size",o.width,o.height),a.flipbookTurn("resize"),a.zoom&&e.activateZoom());case 2:return t.a(2)}}),t)})))()},methods:{flipbookTurn:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return G.apply(void 0,[ge].concat(t))},started:function(){//this.cleanClickPages();
|
|
807
|
+
this.$emit("started")},updated:function(){this.$emit("updated")},completed:function(e){e.success&&this.$emit("completed")},getImagePuzzle:function(e){var t=this;return u(g().m((function a(){var o,i,r,n;return g().w((function(a){for(;;)switch(a.n){case 0:return o=t,i=new Date,r=i.getMilliseconds(),n=o.apiUrl+"/api/builder/getpreview/"+o.uuid+"?page="+e+"&update="+r+"&w=533&v=0&noCache=true",o.builder_apk&&(n+="&apk=".concat(encodeURIComponent(o.builder_apk))),a.n=1,fe.get(n,{responseType:"arraybuffer"}).then((function(e){return Buffer.from(e.data,"binary").toString("base64")}));case 1:return a.a(2,a.v)}}),a)})))()},createInitialPages:function(){var e=this;return u(g().m((function t(){var a,o,i,r,n;return g().w((function(t){for(;;)switch(t.n){case 0:a=e,o=new Date,o.getMilliseconds(),//var n = Math.floor(Math.random() * 1000);
|
|
808
|
+
i="",r=1;case 1:if(!(r<6)){t.n=4;break}return t.n=2,a.getImagePuzzle(r);case 2:n=t.v,i+="<div class='hard'><img src='data:image/png;base64,"+n+"' alt='' width='100%'></div>";case 3:r++,t.n=1;break;case 4:return ge("#flipbook").html(i),t.a(2,!0)}}),t)})))()},initBook:function(){var e=this,t=e.resize();// this.flipbookWidth = self.formato === "square" ? "100vh" : "100vh";
|
|
796
809
|
//this.flipbookHeight = document.getElementsByClassName("top-bar")[0].offsetHeight
|
|
797
810
|
// self.formato === "square"
|
|
798
811
|
// ? "calc(100vh - 91px)"
|
|
799
812
|
// : "calc(100vh - 91px)";
|
|
800
|
-
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,
|
|
813
|
+
if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,ge("#flipbook").length>0){ge("#flipbook").turn({display:"single",width:e.flipbookWidth,height:e.flipbookHeight,autoCenter:!1,gradients:!0,acceleration:!0,duration:800,elevation:150}),// $("#flipbook").bind("start", function (event, pageObject, corner) {
|
|
801
814
|
// console.log(event);
|
|
802
815
|
// console.log(pageObject);
|
|
803
816
|
// console.log(corner);
|
|
@@ -815,24 +828,24 @@ if(this.flipbookWidth=t.width,this.flipbookHeight=t.height,he("#flipbook").lengt
|
|
|
815
828
|
// event.preventDefault();
|
|
816
829
|
// }
|
|
817
830
|
// });
|
|
818
|
-
|
|
831
|
+
ge("#flipbook").bind("end",(function(e,t,a){//$(".page-wrapper").css("cursor", "unset");
|
|
819
832
|
})),// Capa
|
|
820
|
-
e.isCover="-"+
|
|
821
|
-
|
|
833
|
+
e.isCover="-"+ge(".page-wrapper[page="+e.currentPage+"]").width(),// Virada da páginas
|
|
834
|
+
ge("#flipbook").bind("turning",(function(t,a,o){e.currentPage=a,e.$emit("updateCurrentPage",e.currentPage),e.currentPage>=e.loadedPages-2&&e.morePages(),1===e.currentPage?(e.numberPositions=0,e.isCover="-"+ge(".page-wrapper[page="+e.currentPage+"]").width()):e.currentPage===e.pages?(e.isCover=ge(".page-wrapper[page="+e.currentPage+"]").width(),e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1)):(e.isCover=0,e.currentPage%2==0?e.numberPositions=30*e.currentPage:e.numberPositions=30*(e.currentPage-1))})),ge("#flipbook").bind("turned",(function(t,a,o){e.cleanClickPages()}));for(var a=this.loadedPages;a<this.pages;a++){var o=this.flipbookTurn("pages")+1,i=ge('<div><img class="img-book" width="100%" src="'+this.apiUrl+"/api/builder/getplaceholder/"+this.product_id+"?page="+a+"&w="+this.bookDimensions.widthPlaceholder+'&pw=0&noCache=true" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div> </div>');this.flipbookTurn("addPage",i),this.flipbookTurn("pages",o)}//self.cleanClickPages();
|
|
822
835
|
}// Habilitar passagem via o dedo
|
|
823
|
-
|
|
836
|
+
ge(document).keydown((function(t){switch(t.keyCode){case 37:e.flipbookTurn("previous");break;case 39:e.flipbookTurn("next")}})),this.started()},cleanClickPages:function(){ge("#flipbook .even").each((function(){ge(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
824
837
|
})),// Resetting the click event for odd elements
|
|
825
|
-
|
|
826
|
-
})),
|
|
838
|
+
ge("#flipbook .odd").each((function(){ge(this).parents().eq(1).off("click");// Remove the click event handler from parent element
|
|
839
|
+
})),ge("#flipbook .even").each((function(){ge(this).parents().eq(1).click((function(){this.flipbookTurn("previous")}))})),ge("#flipbook .odd").each((function(){ge(this).parents().eq(1).click((function(){this.flipbookTurn("next")}))}))},toTheLeft:function(){this.flipbookTurn("previous")},toTheRight:function(){this.flipbookTurn("next")},zoomTo:function(e){setTimeout((function(){ge(".flipbook-container").data().regionClicked?ge(".flipbook-container").data().regionClicked=!1:1==ge(".flipbook-container").zoom("value")?ge(".flipbook-container").zoom("zoomIn",e):ge(".flipbook-container").zoom("zoomOut")}),1)},activateZoom:function(){var e=this;ge(".flipbook-container").zoom({flipbook:ge("#flipbook"),max:function(){return 2},when:{swipeLeft:function(){G(ge,"next")},swipeRight:function(){G(ge,"previous")},resize:function(e,t,a,o){// if (scale==1)
|
|
827
840
|
// loadSmallPage(page, pageElement);
|
|
828
841
|
// else
|
|
829
842
|
// loadLargePage(page, pageElement);
|
|
830
|
-
},zoomIn:function(){
|
|
843
|
+
},zoomIn:function(){ge(".flipbook-container").removeClass("zoom-in"),ge(".flipbook-container").removeClass("zoom-out"),ge(".flipbook-container").addClass("zoom-in")},zoomOut:function(){ge(".flipbook-container").removeClass("zoom-in"),ge(".flipbook-container").removeClass("zoom-out"),ge(".flipbook-container").addClass("zoom-out"),// $('.exit-message').hide();
|
|
831
844
|
// $('.thumbnails').fadeIn();
|
|
832
845
|
// $('.made').fadeIn();
|
|
833
846
|
// $('.zoom-icon').removeClass('zoom-icon-out').addClass('zoom-icon-in');
|
|
834
|
-
setTimeout((function(){
|
|
835
|
-
|
|
847
|
+
setTimeout((function(){ge("#flipbook").addClass("animated").removeClass("zoom-in"),e.resizeViewport()}),0)}}}),// Zoom event
|
|
848
|
+
ge.isTouch?ge(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):ge(".flipbook-container").bind("zoom.tap",e.zoomTo)},resizeViewport:function(){var e=self.resize(),t=e.width,a=e.height,o=this.flipbookTurn("options");if(o){if(ge("#flipbook").removeClass("animated"),ge(".flipbook-container").css({width:t,height:a}).zoom("resize"),1==this.flipbookTurn("zoom")){var i=calculateBound({width:o.width,height:o.height,boundWidth:Math.min(o.width,t),boundHeight:Math.min(o.height,a)});i.width%2!=0&&(i.width-=1),i.width==ge("#flipbook").width()&&i.height==ge("#flipbook").height()||(this.flipbookTurn("size",i.width,i.height),1==this.flipbookTurn("page")&&this.flipbookTurn("peel","br")),ge("#flipbook").css({top:-i.height/2,left:-i.width/2})}// var magazineOffset = $('#flipbook').offset(),
|
|
836
849
|
// boundH = height - magazineOffset.top - $('#flipbook').height(),
|
|
837
850
|
// marginTop = (boundH - $('.thumbnails > div').height()) / 2;
|
|
838
851
|
// if (marginTop<0) {
|
|
@@ -845,7 +858,7 @@ he.isTouch?he(".flipbook-container").bind("zoom.doubleTap",e.zoomTo):he(".flipbo
|
|
|
845
858
|
// $('.made').hide();
|
|
846
859
|
// else
|
|
847
860
|
// $('.made').show();
|
|
848
|
-
|
|
861
|
+
ge("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loadedPages+1;e<=this.loadedPages+4;e++)this.addPage(e,J(ge));this.cleanClickPages(),// $("#flipbook .even").each(function () {
|
|
849
862
|
// $(this)
|
|
850
863
|
// .parents()
|
|
851
864
|
// .eq(1)
|
|
@@ -861,11 +874,11 @@ he("#flipbook").addClass("animated")}},morePages:function(){for(var e=this.loade
|
|
|
861
874
|
// //this.flipbookTurn("next");
|
|
862
875
|
// });
|
|
863
876
|
// });
|
|
864
|
-
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=
|
|
865
|
-
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-
|
|
877
|
+
this.loadedPages=this.loadedPages+4},addPage:function(e,t){if(t&&t.turn("hasPage",e)&&e<=this.pages){var a=ge("<div />",{class:"hard"}).html('<img class="img-book loading-blur" width="100%" src="https://dka04237waacy.cloudfront.net/api/builder/getplaceholder/'+this.product_id+"?page="+e+"&w="+this.bookDimensions.widthPlaceholder+'&pw=0" alt=""><div class="loading-bg"><div class="loading book-loading"></div></div>');t.turn("addPage",a,e);var o=this.apiUrl+"/api/builder/getpreview/"+this.uuid+"?page="+e+"&w="+this.bookDimensions.width+"&v=0";this.builder_apk&&(o+="&apk=".concat(encodeURIComponent(this.builder_apk))),fe.get(o,{progress:!1,responseType:"arraybuffer"}).then((function(e){var t=new Buffer.from(e.data,"binary").toString("base64");a.html("<img width='100%' src='data:image/png;base64,"+t+"'>")}))}},resize:function(){var e=0;document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight);var t=1680,a=.88*ge(window).height();"square"==this.formato&&(a=1.1*ge(window).height());var o,i=a-e,r=o=1064*(100*i/t)/100;// Contas porcentagem
|
|
878
|
+
"square"==this.book_format&&(e=48,document.getElementsByClassName("bottom-bar").length>0&&(e=document.getElementsByClassName("bottom-bar")[0].offsetHeight+48),i=a-e,a-=640,r=o=960*(100*i/(t=642))/100,i=o/2,this.bookDimensions.width=r);return 1===this.currentPage?this.isCover=-ge(".page-wrapper[page="+this.currentPage+"]").width():this.currentPage===this.pages?this.isCover=ge(".page-wrapper[page="+this.currentPage+"]").width():this.isCover=0,{width:375,height:534}},lensLeftClick:function(){this.flipbookTurn("previous")},lensRightClick:function(){this.flipbookTurn("next")}},beforeDestroy:function(){this._destroyed=!0,this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null),Y(ge),this.isLoading=!0},computed:{shadowVar:function(){return{"--shadow-color":this.shadowColor}}},watch:{goToPage:function(e){var t=this;if(e==t.dedication_page&&(this.flipbookTurn("page",e,{animate:!0}),ge("#flipbook").bind("turned",(function(a,o,i){if(ge("#flipbook").length>0&&e==t.dedication_page){var r=t.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(r+="&apk=".concat(encodeURIComponent(t.builder_apk))),ge("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img").attr("src",r)}})),ge("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img"))){var a=this.lang.urlBuilder+"/api/builder/getpreview/"+t.uuid+"?page="+e+"&w=800&noCache=true&v=0&random="+Math.random();t.builder_apk&&(a+="&apk=".concat(encodeURIComponent(t.builder_apk))),ge("#flipbook .page-wrapper[page='"+e+"'] .p"+e+" img").attr("src",a)}//setTimeout(() => {
|
|
866
879
|
//alert("Atualizou dedicas");
|
|
867
880
|
//}, 500);
|
|
868
|
-
}}},"data-v-89ec60ce",!1,void 0,!1,void 0,void 0,void 0),
|
|
881
|
+
}}},"data-v-89ec60ce",!1,void 0,!1,void 0,void 0,void 0),be=require("axios"),ye=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"preview-full"},[e.isLoaded&&!e.isMobile?a("div",{staticClass:"preview-desktop-area"},[a("PreviewSnippetHorizontal",{attrs:{uuid:e.uuid,pages:e.pages,book_format:e.book_format,product_id:e.product_id,preview_color:e.preview_color,typeLanguage:e.typeLanguage,goToPage:e.currentPage,dedication_page:e.dedication_page,builder_apk:e.builder_apk},on:{updateCurrentPage:e.updateCurrentPage}})],1):e._e(),e._v(" "),e.isLoaded&&e.isMobile?a("div",{staticClass:"preview-mobile-area"},[a("PreviewSnippetVertical",{attrs:{uuid:e.uuid,pages:e.pages,book_format:e.book_format,product_id:e.product_id,goToPage:e.currentPage,dedication_page:e.dedication_page,typeLanguage:e.typeLanguage,builder_apk:e.builder_apk}})],1):e._e()])},staticRenderFns:[]},void 0,{name:"PreviewSnippet",components:{PreviewSnippetHorizontal:me,PreviewSnippetVertical:ve},props:{/** Força formato horizontal (desktop/tablet) */forceHorizontal:{type:Boolean,required:!1,default:!1},dedication_text:{type:String,required:!1},/** Product id of Builder. `595` */product_id:{type:Number,required:!0},/** Character id of Builder. `57` */character_id:{type:Number,required:!0},/** Character id of Builder. `906` */character_position_id:{type:[Number,String],required:!1},/** Type id of Gender. `89` */gender:{type:String,required:!0},/** Slug of product on builder `bb-a-grande-viagem` */slug:{type:String,required:!0},/** Character uuid. `ddh5e177ff920f15` */uuid:{type:String,required:!0},/** Show edit name. */have_tools:{type:Boolean,required:!0,default:!0},/** Character uuid. `ddh5e177ff920f15` */preview_color:{type:String,default:"#16D3DB",required:!1},typeRead:{type:Boolean,required:!1,default:!1},have_dedication:{type:Boolean,required:!1,default:!0},/** Show edit name. */custom_numero:{type:String,required:!1},/** Show edit name. */custom_mes:{type:String,required:!1},typeLanguage:{type:String,required:!1,default:"pt-BR"},language:{type:String,required:!1},languages:{type:Array,required:!1},layout:{type:Number,required:!1},layouts:{type:Array,required:!1},book_name:{type:String,required:!1},book_brand:{type:String,required:!1},breadcrumbs:{type:Array,required:!1},steps:{type:Array,required:!1},is_created:{type:Boolean,required:!1,default:!1},dir:{type:String,default:"ltr",required:!1},colors:{type:[Object],required:!1,default:{text:"#AFA2BA",textActive:"#FFFFFF",color:"#FFFFFF",colorHover:"#F8F6FF",colorActive:"#16d3db"}},/** APK do builder (opcional) */builder_apk:{type:String,required:!1}},data:function(){return{isLoaded:!1,isMobile:!1,pages:0,book_format:"a4",lang:null,currentPage:0,dedication_page:null,currentLayout:null}},mounted:function(){var e=this;e.isMobile=e.detectSize(),window.addEventListener("resize",(function(t){e.isMobile=e.detectSize()})),e.lang=S(e.typeLanguage),e.getProductInfo(),e.layout&&(e.currentLayout=e.layout)},methods:{updateCurrentPage:function(e){this.currentPage=e},getProductInfo:function(){var e=this,t=this.lang.urlBuilder+"/api/products/info/"+e.product_id;e.builder_apk&&(t+="?apk=".concat(encodeURIComponent(e.builder_apk))),be.get(t).then((function(t){e.pages=t.data.product.pages,t.data.product.extra&&t.data.product.extra.size&&(e.book_format=t.data.product.extra.size),t.data.product.layout&&e.layout&&t.data.product.layout.forEach((function(a,o){a.id===e.layout&&a.dedication_pages&&a.dedication_pages.length>0&&(e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0]))})),!e.dedication_page&&t.data.product.layout&&t.data.product.layout[0].id&&t.data.product.layout[0].dedication_pages[0]&&(e.currentLayout=t.data.product.layout[0].id,e.dedication_page=parseInt(t.data.product.layout[0].dedication_pages[0])),e.isLoaded=!0})).catch((function(e){console.log(e)}))},detectSize:function(){// Se a prop forceHorizontal estiver ativada, sempre retorna falso (desktop/horizontal)
|
|
869
882
|
return!this.forceHorizontal&&!!window.matchMedia("(orientation: portrait)").matches;// Detecta orientação da tela: vertical (portrait) ou horizontal (landscape)
|
|
870
883
|
},isLoadingMethod:function(e){},changeUuid:function(e){//console.log("uuid", payload)
|
|
871
884
|
var t=this;t.isLoaded=!1,t.completed(e),this.$nextTick((function(){t.isLoaded=!0}))},changeName:function(e){var t=this;t.isLoaded=!1,t.completed(e),this.$nextTick((function(){t.isLoaded=!0})),// setTimeout(() => {
|
|
@@ -886,7 +899,7 @@ this.$emit("completedDedication",e)},completedBirthday:function(e){
|
|
|
886
899
|
/**
|
|
887
900
|
* Função disparada ao ser finalizada customização. Recebe um objeto.
|
|
888
901
|
*/
|
|
889
|
-
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),
|
|
902
|
+
this.$emit("completedBirthday",e)}}},void 0,!1,void 0,!1,void 0,void 0,void 0),_e=[],we=[],ke=(new Date).getFullYear(),Ce=1;Ce<=31;Ce++)_e.push({key:Ce,value:Ce,name:Ce});for(var Pe=0;Pe<18;Pe++)we.push({key:ke-Pe,value:ke-Pe,name:ke-Pe});var Me=[{name:"Janeiro",value:"Janeiro",key:1},{name:"Fevereiro",value:"Fevereiro",key:2},{name:"Março",value:"Março",key:3},{name:"Abril",value:"Abril",key:4},{name:"Maio",value:"Maio",key:5},{name:"Junho",value:"Junho",key:6},{name:"Julho",value:"Julho",key:7},{name:"Agosto",value:"Agosto",key:8},{name:"Setembro",value:"Setembro",key:9},{name:"Outubro",value:"Outubro",key:10},{name:"Novembro",value:"Novembro",key:11},{name:"Dezembro",value:"Dezembro",key:12}],xe=D({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._g(e._b({staticClass:"birthday-mobile-group"},"div",e.$attrs,!1),e.$listeners),[a("div",{staticClass:"birthday-mobile-input",class:[{"error-active":e.error.length>0}]},[e.label?a("label",{staticClass:"label",style:{color:e.labelColor},domProps:{innerHTML:e._s(e.label)}}):e._e(),e._v(" "),a("div",{staticClass:"input",class:e.placeholderShown?"placeholder-shown":null,on:{click:e.openPicker}},[e._v("\n\t\t\t"+e._s(e.placeholder)+"\n\t\t\t"),a("svg",{attrs:{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{"clip-rule":"evenodd",d:"M8.571 6.286a2.286 2.286 0 014.572 0v1.143h5.714V6.286a2.286 2.286 0 014.572 0v1.143h1.904A2.667 2.667 0 0128 10.095v17.238A2.667 2.667 0 0125.333 30H6.667A2.667 2.667 0 014 27.333V10.095A2.667 2.667 0 016.667 7.43H8.57V6.286zm-2.285 9.143v10.933c0 .736.597 1.333 1.333 1.333h16.762c.736 0 1.333-.597 1.333-1.333V15.429H6.286z"}})])]),e._v(" "),e.error&&e.error.length>0?a("span",{staticClass:"helper",domProps:{innerHTML:e._s(e.error)}}):e._e()]),e._v(" "),a("div",{staticClass:"overlay",class:{visible:e.pickerStatus.show},on:{click:function(){return e.pickerStatus.show=!1}}}),e._v(" "),a("div",{staticClass:"datepicker",class:{visible:e.pickerStatus.show}},[a("div",{staticClass:"btn-line"},[a("div",{staticClass:"txt"},[e._v("Data de nascimento")]),e._v(" "),a("Button",{attrs:{kind:"secondary",width:"liquid",size:"sm"},on:{click:e.confirmDatepicker}},[e._v("\n\t\t\t\tCONFIRMAR\n\t\t\t")])],1),e._v(" "),a("ScrollPickerGroup",{staticClass:"flex",staticStyle:{width:"100%"}},[a("ScrollPicker",{attrs:{placeholder:"Dia",options:e.days},model:{value:e.dataPicker.day,callback:function(t){e.$set(e.dataPicker,"day",t)},expression:"dataPicker.day"}}),e._v(" "),a("ScrollPicker",{attrs:{placeholder:"Mês",options:e.months},model:{value:e.dataPicker.month,callback:function(t){e.$set(e.dataPicker,"month",t)},expression:"dataPicker.month"}}),e._v(" "),a("ScrollPicker",{attrs:{placeholder:"Ano",options:e.years},model:{value:e.dataPicker.year,callback:function(t){e.$set(e.dataPicker,"year",t)},expression:"dataPicker.year"}})],1)],1)])},staticRenderFns:[]},void 0,{name:"BirthdayMobile",props:{
|
|
890
903
|
/**
|
|
891
904
|
* Dia do nascimento<br>
|
|
892
905
|
* Example: 05
|
|
@@ -916,4 +929,4 @@ labelColor:{type:String,default:"#68596E"},
|
|
|
916
929
|
* Exibir mensagem de erro ou não<br>
|
|
917
930
|
* Example: `true`
|
|
918
931
|
* */
|
|
919
|
-
error:{type:Boolean,default:!1}},components:{Input:
|
|
932
|
+
error:{type:Boolean,default:!1}},components:{Input:I,Button:O,ScrollPicker:s,ScrollPickerGroup:d},data:function(){return{days:_e,months:Me,years:we,maxAgeAllowed:18,currentYear:ke,pickerStatus:{show:!1},dataPicker:{day:"",month:"",year:""},placeholder:"Dia / Mês / Ano",placeholderShown:!0}},watch:{"dataPicker.day":function(e){var t={target:"day",key:e,value:e};this.$emit("update",t)},"dataPicker.month":function(e){var t={target:"month",key:this.monthToInt(e),value:e};this.validateDays(t),this.$emit("update",t)},"dataPicker.year":function(e){var t={target:"year",key:e,value:e};this.validateDays(t),this.$emit("update",t)},"pickerStatus.show":function(){this.pickerStatus.show?document.body.style.overflow="hidden":document.body.style.overflow="auto"}},mounted:function(){this.dataPicker={day:this.selectedDay,month:this.monthToName(this.selectedMonth),year:this.selectedYear},this.selectedDay&&this.selectedMonth&&this.selectedYear&&(this.placeholderShown=!1,this.placeholder="".concat(this.selectedDay," de ").concat(this.monthToName(this.selectedMonth)," de ").concat(this.selectedYear))},methods:{openPicker:function(){this.pickerStatus.show=!0,this.dataPicker={day:this.selectedDay,month:this.monthToName(this.selectedMonth),year:this.selectedYear}},confirmDatepicker:function(){this.dataPicker.day&&this.dataPicker.month&&this.dataPicker.year?(this.placeholderShown=!1,this.placeholder="".concat(this.dataPicker.day," de ").concat(this.dataPicker.month," de ").concat(this.dataPicker.year)):(this.placeholderShown=!0,this.placeholder="Dia / Mês / Ano",this.dataPicker={day:"",month:"",year:""}),this.pickerStatus.show=!1,this.$emit("close")},monthToName:function(e){switch(parseInt(e)){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"}},monthToInt:function(e){switch(e){case"Janeiro":return 1;case"Fevereiro":return 2;case"Março":return 3;case"Abril":return 4;case"Maio":return 5;case"Junho":return 6;case"Julho":return 7;case"Agosto":return 8;case"Setembro":return 9;case"Outubro":return 10;case"Novembro":return 11;case"Dezembro":return 12}},validateDays:function(e){var t,a="month"===e.target?parseInt(e.key):parseInt(this.selectedMonth),o="year"===e.target?parseInt(e.key):parseInt(this.selectedYear);a||(a=13);var i=[];t=1===a||3===a||5===a||7===a||8===a||10===a||12===a||13===a?31:4===a||6===a||9===a||11===a?30:o%4==0&&o%100>0||o%400==0?29:28,a||o||(t=31);for(var r=1;r<=t;r++)i.push({key:r,value:r,name:r});if(this.days=i,this.selectedDay>t){this.$emit("update",{target:"days",key:"",value:""})}}}},"data-v-495b9d50",!1,void 0,!1,void 0,void 0,void 0),ze={Preview:ce,PreviewMobile:ae,PreviewTools:H,PreviewFull:ue,PreviewSnippet:ye,BirthdayMobile:xe},Se=function(e){Se.installed||(Se.installed=!0,Object.entries(ze).forEach((function(t){var a=v(t,2),o=a[0],i=a[1];e.component(o,i)})))},Le={install:Se};export default Le;export{xe as BirthdayMobile,ce as Preview,ue as PreviewFull,ae as PreviewMobile,ye as PreviewSnippet,H as PreviewTools};
|