generic-skin 3.9.115 → 3.9.117

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.
@@ -199,7 +199,7 @@ Vue.component('lista-bosquejos', {
199
199
  <h4>Mensajes</h4>
200
200
  </div>
201
201
  <mando-foro id="upper-controls" app="true">
202
- <template slot="pagination" v-if="drafts.topics.pages.length > 1">
202
+ <template slot="pagination" v-if="drafts.messages.pages.length > 1">
203
203
  <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />
204
204
  </template>
205
205
  </mando-foro>
@@ -226,7 +226,7 @@ Vue.component('lista-bosquejos', {
226
226
  </ul>
227
227
  </section>
228
228
  <mando-foro id="lower-controls" app="true">
229
- <template slot="pagination" v-if="drafts.topics.pages.length > 1">
229
+ <template slot="pagination" v-if="drafts.messages.pages.length > 1">
230
230
  <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />
231
231
  </template>
232
232
  </mando-foro>
@@ -1,2 +1,2 @@
1
- Vue.component("panel-control",{props:["elements"],data:()=>({userId:_userdata.user_id,state:{page:0},content:{original:[],current:[]}}),computed:{validationPanel(){return FNR.utility.genValidation(this.content.current)},toSave(){let e=[];return[].forEach.call(this.content.current,(t,o)=>{t.value!==this.content.original[o].value&&e.push({name:t.name,type:t.type,value:t.value})}),e}},methods:{updateProfile(){this.toSave.length&&""===this.validationPanel&&(this.state.page=2,FNR.user.profile.setData(this.toSave).then(e=>{if(e){let e=!1;this.toSave.map(t=>{t.name.toLowerCase().indexOf("tema")>-1&&(e=!0)}),e?(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),FNR.user.setTheme(!0)):(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),setTimeout(()=>{window.location.reload()},2e3))}else FNR.html.genNotification("Atención","Hubo un problema al actualizar. Dale otro intento.","fas fa-exclamation")}))}},created(){FNR.user.profile.getData(JSON.parse(this.elements.replace(/'/g,'"'))).then(e=>{this.content.original=JSON.parse(JSON.stringify(e)),this.content.current=e,this.state.page=1})},template:'\n <section id="forum-cp" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Editar perfil</h2>\n <hr />\n <p>En esta página podrás editar tu perfil de usuario. En caso de que quieras editar tu contraseña, por favor dirígete a <a target="_blank" title="Ir a «Cambiar contraseña»" :href="\'/profile?change_password=Cambiar+tu+contraseña&mode=editprofile&page_profil=informations&user_id=\' + userId">este enlace</a>.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <aviso-foro v-show="validationPanel !== \'\'">\n <ul v-html="validationPanel"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li v-for="item in content.current">\n <campo-foro :name="item.name">\n <input v-model="item.value" v-if="item.type === \'input\' || item.type === \'avatar\'" type="text"/>\n <textarea v-model="item.value" v-else-if="item.type === \'textarea\'"></textarea>\n <div v-else-if="item.type === \'select\'" class="select-container">\n <select v-model="item.value">\n <option :value="option.value" v-for="option in item.options">{{ option.name }}</option>\n </select>\n </div>\n </campo-foro>\n </li>\n </ul>\n <div id="usereply-comand">\n <button class="button1 btn-main" @click="updateProfile()" title="Actualizar perfil">Actualizar</button>\n </div>\n </template>\n <template v-if="state.page === 2">\n <cargando-foro text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n '}),Vue.component("lista-bosquejos",{data:()=>({state:{page:0},drafts:{messages:{page:1,loading:0,pages:[],content:[]},topics:{page:1,loading:0,pages:[],content:[]}}}),methods:{getPageMessages(e){this.drafts.messages.loading=0,FNR.user.drafts.messages.getDrafts(e).then(e=>{this.drafts.messages.content=e,this.drafts.messages.loading=1,this.state.page=1})},getPageTopics(e){this.drafts.topics.loading=0,FNR.user.drafts.topics.getDrafts(e).then(e=>{this.drafts.topics.content=e,this.drafts.topics.loading=1,this.state.page=1})},setPageMessages(e){this.drafts.messages.page=e,this.getPageMessages(this.drafts.messages.pages[this.drafts.messages.page-1])},setPageTopics(e){this.drafts.topics.page=e,this.getPageMessages(this.drafts.topics.pages[this.drafts.topics.page-1])}},created(){Promise.all([FNR.user.drafts.messages.getPages(),FNR.user.drafts.topics.getPages()]).then(e=>{0!==e[0].items&&(this.drafts.messages.pages=e[0].pages,this.getPageMessages(this.drafts.messages.pages[this.drafts.messages.page-1])),0!==e[1].items&&(this.drafts.topics.pages=e[1].pages,this.getPageTopics(this.drafts.topics.pages[this.drafts.topics.page-1])),e[0].items+e[1].items===0&&(this.state.page=1)})},updated(){FNR.behaviour.genControls()},template:'\n <section class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Lista de Bosquejos</h2>\n <hr />\n <p>En esta página tienes tu lista de Bosquejos dividida entre mensajes y temas.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <div class="is-content mb-4">\n <h4>Mensajes</h4>\n </div>\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />\n </template>\n </mando-foro>\n <section id="forum-drafts-messages" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!drafts.messages.content.length || drafts.messages.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!drafts.messages.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes bosquejos</h6>\n </li>\n </template>\n <template v-else-if="drafts.messages.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.messages.content">\n <temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">\n <template slot="title">{{ draft.topic.name }}</template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />\n </template>\n </mando-foro>\n \t <separador-foro></separador-foro>\n <div class="is-content mb-4">\n <h4>Temas</h4>\n </div>\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.topics.page" :total="drafts.topics.pages.length" @setPage="setPageTopics" />\n </template>\n </mando-foro>\n <section id="forum-drafts-messages" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!drafts.topics.content.length || drafts.topics.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!drafts.topics.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes bosquejos</h6>\n </li>\n </template>\n <template v-else-if="drafts.topics.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.topics.content">\n <temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">\n <template slot="title">{{ draft.topic.name }}</template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.topics.page" :total="drafts.topics.pages.length" @setPage="setPageTopics" />\n </template>\n </mando-foro>\n </template>\n </section>\n '}),Vue.component("lista-seguidos",{data:()=>({state:{page:0,selected:[]},followed:{page:1,loading:0,pages:[],content:[]}}),methods:{getPage(e){this.followed.loading=0,FNR.user.followed.getFollowed(e).then(e=>{this.followed.content=e,this.followed.loading=1,this.state.page=1})},setPage(e){this.followed.page=e,this.getPage(this.followed.pages[this.followed.page-1])},setTopic(e){const t=this.state.selected.indexOf(e);-1===t?this.state.selected.push(e):this.state.selected.splice(t,1)},delTopics(){this.state.selected.length&&FNR.html.genPrompt("Necesitamos confirmación","Te dispones a retirar la supervisión de uno (o varios) temas. ¿Estás segur@?","Escribe «ELIMINAR» para confirmar","").then(e=>{"ELIMINAR"===e&&FNR.user.followed.delFollowed(this.state.selected).then(e=>{e?window.location.reload():FNR.html.genNotification("Atención","Hubo un problema al retirar. Inténtalo de nuevo.","fas fa-exclamation")})})}},created(){FNR.user.followed.getPages().then(e=>{0!==e.items?(this.followed.pages=e.pages,this.getPage(this.followed.pages[this.followed.page-1])):this.state.page=1})},updated(){FNR.behaviour.genControls()},template:'\n <section class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Lista de Temas Supervisados</h2>\n <hr />\n <p>En esta página tienes tu lista de Temas Supervisados.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="followed.pages.length > 1">\n <paginacion-foro :page="followed.page" :total="followed.pages.length" @setPage="setPage" />\n </template>\n <template slot="controls">\n <li v-if="followed.content.length" @click="delTopics()">\n <boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <section id="forum-followed" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!followed.content.length || followed.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!followed.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes temas supervisados</h6>\n </li>\n </template>\n <template v-else-if="followed.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li :class="\'row is-not-topic is-not-lastpost \' + topic.type" v-for="topic in followed.content" :key="topic.id">\n <temas-foro type="followed" mode="" :url="topic.url" :replies="topic.replies + \' respuestas\'" :views="topic.views + \' visitas\'">\n <template slot="title">{{ topic.name }}</template>\n <template slot="radio">\n <div :class="\'forum-checkbox\' + (state.selected.indexOf(topic.id) === -1 ? \'\' : \' is-active\')">\n <div class="checkbox-content" @click="setTopic(topic.id)">\n <div class="checkbox-click">\n <i class="fas fa-check"></i>\n </div>\n </div>\n </div>\n </template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="followed.pages.length > 1">\n <paginacion-foro :page="followed.page" :total="followed.pages.length" @setPage="setPage" />\n </template>\n <template slot="controls">\n <li v-if="followed.content.length" @click="delTopics()">\n <boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n </section>\n '}),Vue.component("editor-foro",{data:()=>({state:{page:0,editor:"none",admin:1===_userdata.user_level,guest:0===_userdata.session_logged_in,dice:document.querySelectorAll("#list_dice").length,draft:document.querySelectorAll('input[name="draft"]').length},colors:FNR.forum.getColors(),content:{username:"",subject:"",msg:"",type:-1,options:[]},users:{current:"",options:[],selected:[],selector:!0},groups:{type:-1,options:[]},dice:{options:[],current:[]}}),computed:{msgCheck(){let e="";return this.state.guest&&(this.content.username.trim().length<1||this.content.username.trim().length>60)&&(e+="<li>Escribe un nombre de usuario de tamaño adecuado.</li>"),"post"===this.state.editor&&0===this.users.selected.length&&-1===this.groups.type&&(e+="<li>Selecciona al menos un usuario.</li>"),this.state.admin&&"post"===this.state.editor&&0===this.users.selected.length&&-1===this.groups.type&&(e+="<li>Selecciona un grupo.</li>"),"newtopic"!==this.state.editor&&"post"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(this.content.subject.trim().length<4||this.content.subject.trim().length>100)&&(e+="<li>Escribe un titulo de tamaño adecuado (4 a 100 carácteres).</li>"),this.content.msg.trim().length<10&&(e+="<li>Escribe un mensaje lo suficientemente largo.</li>"),e},sortedCharacters(){return Object.keys(this.users.options).length?this.users.options.map(e=>e.user).filter(e=>-1===this.users.selected.indexOf(e)).filter(e=>e.toLowerCase().indexOf(this.users.current.toLowerCase())>-1).sort((e,t)=>e<t?-1:e>t?1:0):[]},sortedEditCharacters(){return this.users.selected.sort((e,t)=>e<t?-1:e>t?1:0)}},methods:{insertSomething(e,t){const o=document.getElementById("usereply-editor"),s=e.replace(/-jump-/g,"\n"),n=t.replace(/-jump-/g,"\n");if(document.selection)o.focus(),document.selection.createRange().text=s+document.selection.createRange().text+n;else if(o.selectionStart||"0"==o.selectionStart){const e=o.selectionStart,t=o.selectionEnd,i=t+s.length;o.value=o.value.substring(0,e)+s+o.value.substring(e,t)+n+o.value.substring(t,o.value.length),o.setSelectionRange(i,i)}this.content.msg=o.value},newDice(){this.dice.current.push({dice:-1,number:0})},addCharacter(e){this.users.selected.push(e),this.users.selector=!1,this.users.current="",setTimeout(()=>{this.users.selector=!0},250)},deleteCharacter(e){this.users.current="",this.users.selected.splice(e,1)},changeGroup(){this.users.selected=[],this.users.current=""},insertUrl(){const e=document.getElementById("usereply-editor"),t=e.selectionStart,o=e.selectionEnd;FNR.html.genPrompt("Insertar enlace","Introduce el título del enlace. Por defecto, ponemos la este como título.","Título del enlace","").then(s=>{!1!==s?this.insertSomething("[url=","]"+s+"[/url]"):this.insertSomething("[url=","]"+e.value.substring(t,o)+"[/url]")})},insertImg(){FNR.html.genPrompt("Insertar imagen","Introduce las medidas de la imagen en píxeles pero sin la medida (por ejemplo 100x100). <u>En caso de dejarlo en blanco, se insertará con la medida inicial</u>.","Medidas de la imagen","").then(e=>{!1!==e?this.insertSomething("[img="+e+"]","[/img]"):this.insertSomething("[img]","[/img]")})},insertSpoiler(){FNR.html.genPrompt("Insertar spoiler","Introduce el título del spoiler. <u>En caso de dejarlo en blanco, se insertará sin él.</u>.","Título del spoiler","").then(e=>{!1!==e?this.insertSomething("[spoiler="+e+"]","[/spoiler]"):this.insertSomething("[spoiler]","[/spoiler]")})},insertQuote(){FNR.html.genPrompt("Insertar cita","Introduce el destinatario de la cita. <u>En caso de dejarlo en blanco, se insertará sin él.</u>.","Destinatario de la cita","").then(e=>{!1!==e?this.insertSomething("[quote="+e+"]","[/quote]"):this.insertSomething("[quote]","[/quote]")})},parseMsg(){window.forumParsing=!0,document.querySelector("#forum-realreply > form .sceditor-container > textarea")?document.querySelector("#forum-realreply > form .sceditor-container > textarea").value=this.content.msg.replace(/#per/g,this.colors[this.colors.length-1].hex):document.querySelector("#forum-realreply > form textarea#text_editor_textarea").value=this.content.msg.replace(/#per/g,this.colors[this.colors.length-1].hex),this.state.guest&&(this.content.subject.trim().length>4||this.content.subject.trim().length<60)&&(document.querySelector('#forum-realreply > form input[name="username"]').value=this.content.username),"post"===this.state.editor&&this.users.selected.length>0&&-1===this.groups.type&&this.users.selected.forEach(e=>{document.querySelector("#forum-realreply > form #add_username").click(),document.querySelectorAll('#forum-realreply > form input[name="username[]"]')[document.querySelectorAll('#forum-realreply > form input[name="username[]"]').length-2].value=e}),this.state.admin&&("post"===this.state.editor?0===this.users.selected.length&&-1!==this.groups.type&&(document.querySelector('#forum-realreply > form select[name="usergroup"]').value=this.groups.type):"newtopic"===this.state.editor&&-1!==this.content.type&&(document.querySelector('#forum-realreply > form input[type="radio"][name="topictype"][value="'+this.content.type+'"]').checked=!0)),"newtopic"!==this.state.editor&&"post"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(this.content.subject.trim().length>4||this.content.subject.trim().length<100)&&(document.querySelector('#forum-realreply > form input[name="subject"]').value=this.content.subject.trim()),"reply"===this.state.editor&&FNR.content.isAutosave()&&!1!==FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)&&-1!==_userdata.user_id&&FNR.cache.delData("post"+document.post.t.value+"-"+_userdata.user_id),!this.state.dice||"reply"!==this.state.editor&&"newtopic"!==this.state.editor&&"editpostdraft"!==this.state.editor&&"edittopicdraft"!==this.state.editor||([].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice tr"),(e,t)=>{0!==t&&e.remove()}),document.querySelector("#forum-realreply > form #list_dice tr td").insertAdjacentHTML("beforeend",'<span id="dice_to_del"></span>'),this.dice.current.filter(e=>-1!==e.dice).filter(e=>0!==parseFloat(e.number)&&!isNaN(parseFloat(e.number))).forEach(e=>{add_dice(document.querySelectorAll("#list_dice tr").length,e.dice,e.number)}))},draftMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Bosquejo"], #forum-realreply input[value="Modificar"], #forum-realreply input[value="Registrar"]').click())},delMsg(){const e=new URLSearchParams(window.location.search);let t="topicdraft",o="t";"editpostdraft"===e.get("mode")&&(t="draft",o="p"),FNR.html.genPrompt("Necesitamos confirmación","Te dispones a eliminar un bosquejo. ¿Estás segur@?","Escribe «ELIMINAR» para confirmar","").then(s=>{"ELIMINAR"===s&&FNR.user.drafts.delDrafts(t,[e.get(o)]).then(e=>{e?window.location.replace(`${window.location.protocol}//${window.location.host}${forumConfig.usableDirections.ucp}#/bosquejos`):FNR.html.genNotification("Atención","Hubo un problema al eliminar. Inténtalo de nuevo.","fas fa-exclamation")})})},sendMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Enviar"], #forum-realreply input[value="Publicar"]').click())},prevMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Previsualización"], #forum-realreply input[value="Previsualizar"]').click())}},created(){const e=()=>{if(document.querySelector('#forum-realreply > form input[name="username"]')&&(this.content.username=document.querySelector('#forum-realreply > form input[name="username"]').value),document.querySelector("#forum-realreply > form #text_editor_textarea")){let e=document.querySelector("#forum-realreply > form #text_editor_textarea").value;this.content.msg=e}if(document.querySelector('#forum-realreply > form input[name="subject"]')){let e=document.querySelector('#forum-realreply input[name="subject"]').value;document.querySelector('#forum-realreply select[name="usergroup"]')&&""!==document.querySelector('#forum-realreply select[name="usergroup"]').value?this.groups.type=document.querySelector('#forum-realreply select[name="usergroup"]').value:document.querySelector('#forum-realreply input[name="username[]"]')&&[].forEach.call(document.querySelectorAll('#forum-realreply input[name="username[]"]'),e=>{""!==e.value&&this.users.selected.push(e.value)}),this.content.subject=e}document.querySelector("#forum-realreply > form #list_dice")&&([].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice #post_dice option"),e=>{""!==e.value&&this.dice.options.push({value:e.value,content:e.textContent})}),1===document.querySelectorAll("#forum-realreply > form #list_dice tr").length?this.dice.current.push({dice:-1,number:0}):[].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice tr"),e=>{""!==e.querySelector("select").value&&this.dice.current.push({dice:parseFloat(e.querySelector("select").value),number:parseFloat(e.querySelector("input").value)})})),4===document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]').length&&[].forEach.call(document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]'),e=>{this.content.options.push({value:e.value,name:e.parentElement.textContent.trim()}),e.checked&&(this.content.type=e.value)}),document.querySelector('#forum-realreply > form select[name="usergroup"]')&&[].forEach.call(document.querySelectorAll('#forum-realreply > form select[name="usergroup"] option'),e=>{""!==e.value&&this.groups.options.push({value:e.value,name:e.textContent})}),FNR.content.isAutosave()&&""===this.content.msg&&!1!==FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)&&-1!==_userdata.user_id&&(this.content.msg=FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)),this.state.page=1,document.onkeydown=(e=>{const t=document.getElementById("usereply-editor");document.activeElement===t&&(e.ctrlKey&&"b"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b]","[/b]")):e.ctrlKey&&"i"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[i]","[/i]")):e.ctrlKey&&"s"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[strike]","[/strike]")):e.ctrlKey&&"u"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[u]","[/u]")):e.ctrlKey&&","===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[left]","[/left]")):e.ctrlKey&&"."===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[center]","[/center]")):e.ctrlKey&&"-"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[right]","[/right]")):e.ctrlKey&&"o"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertUrl()):e.ctrlKey&&"p"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertImg()):e.ctrlKey&&"`"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSpoiler()):e.ctrlKey&&"+"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[code]","[/code]")):e.ctrlKey&&"l"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertQuote()):e.ctrlKey&&"ñ"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[hide]","[/hide]")):e.ctrlKey&&"´"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[youtube]","[/youtube]")):"Home"===e.key?(e.preventDefault(),e.stopPropagation(),t.setSelectionRange(0,0)):"End"===e.key?(e.preventDefault(),e.stopPropagation(),t.setSelectionRange(t.value.length,t.value.length)):e.ctrlKey&&"1"===e.key&&"undefined"!==this.colors[0]&&this.colors.length-1!=0?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[0].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"!"===e.key&&"undefined"!==this.colors[0]&&this.colors.length-1!=0?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[0].hex+"]","[/color][/b]")):e.ctrlKey&&"2"===e.key&&"undefined"!==this.colors[1]&&this.colors.length-1!=1?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[1].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&'"'===e.key&&"undefined"!==this.colors[1]&&this.colors.length-1!=1?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[1].hex+"]","[/color][/b]")):e.ctrlKey&&"3"===e.key&&"undefined"!==this.colors[2]&&this.colors.length-1!=2?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[2].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"·"===e.key&&"undefined"!==this.colors[2]&&this.colors.length-1!=2?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[2].hex+"]","[/color][/b]")):e.ctrlKey&&"4"===e.key&&"undefined"!==this.colors[3]&&this.colors.length-1!=3?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[3].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"$"===e.key&&"undefined"!==this.colors[3]&&this.colors.length-1!=3?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[3].hex+"]","[/color][/b]")):e.ctrlKey&&"5"===e.key&&"undefined"!==this.colors[4]&&this.colors.length-1!=4?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[4].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"%"===e.key&&"undefined"!==this.colors[4]&&this.colors.length-1!=4?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[4].hex+"]","[/color][/b]")):e.ctrlKey&&"6"===e.key&&"undefined"!==this.colors[5]&&this.colors.length-1!=5?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[5].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"&"===e.key&&"undefined"!==this.colors[5]&&this.colors.length-1!=5?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[5].hex+"]","[/color][/b]")):e.ctrlKey&&"7"===e.key&&"undefined"!==this.colors[6]&&this.colors.length-1!=6?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[6].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"/"===e.key&&"undefined"!==this.colors[6]&&this.colors.length-1!=6?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[6].hex+"]","[/color][/b]")):e.ctrlKey&&"8"===e.key&&"undefined"!==this.colors[7]&&this.colors.length-1!=7?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[7].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"("===e.key&&"undefined"!==this.colors[7]&&this.colors.length-1!=7?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[7].hex+"]","[/color][/b]")):e.ctrlKey&&"9"===e.key&&"undefined"!==this.colors[8]&&this.colors.length-1!=8?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[8].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&")"===e.key&&"undefined"!==this.colors[8]&&this.colors.length-1!=8?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[8].hex+"]","[/color][/b]")):e.ctrlKey&&"º"===e.key&&void 0!==forumConfig.skinOptions.customColour?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color=#per]","[/color]")):e.ctrlKey&&e.shiftKey&&"ª"===e.key&&void 0!==forumConfig.skinOptions.customColour?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color=#per]","[/color][/b]")):e.ctrlKey&&e.shiftKey&&"Enter"===e.key&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.prevMsg()):e.ctrlKey&&e.altKey&&"Enter"===e.key&&("reply"===this.state.editor||"newtopic"===this.state.editor)&&this.state.dice&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.draftMsg()):e.ctrlKey&&"Enter"===e.key&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.sendMsg()):!e.ctrlKey||"Backspace"!==e.key||"editpostdraft"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(e.preventDefault(),e.stopPropagation(),this.delMsg()))}),setTimeout(()=>{FNR.behaviour.genDropeable()},250)},t=()=>{"post"===this.state.editor?FNR.forum.getMembers(!0).then(t=>{this.users.options=t,e()}):e()};void 0!==document.post&&("editpost"===document.post.mode.value?void 0!==document.post.modif_topic_title?this.state.editor="newtopic":this.state.editor="reply":"edit"===document.post.mode.value?this.state.editor="post":this.state.editor=document.post.mode.value),this.state.guest?setTimeout(()=>{e()},2e3):void 0===forumConfig.skinOptions.customColour?t():FNR.user.profile.getData([{name:forumConfig.skinOptions.customColour,type:"input"}]).then(e=>{this.colors.push({hex:e[0].value,name:"Personal"}),t()}),this.state.replies=document.querySelectorAll(".forum-otherposts > *").length||document.querySelector('input[type="submit"][value="Modificar"]')?"Varios":""},mounted(){insertIntoEditor=(e=>{try{this.insertSomething(" "+e+" ","")}catch(e){console&&console.error(e)}}),$("#quickEmojInternal").on("load",function(){$("#quickEmojInternal").contents().find("head").append("<style>body{padding: 1rem!important}</style>")});let e="";document.querySelector('p[style="color: red;"]')&&(e=document.querySelector('p[style="color: red;"]').textContent,"preview"===document.querySelector('p[style="color: red;"]').parentElement.parentElement.id?document.querySelector('p[style="color: red;"]').parentElement.parentElement.remove():document.querySelector('p[style="color: red;"]').remove()),window.forumParsing=!1,
1
+ Vue.component("panel-control",{props:["elements"],data:()=>({userId:_userdata.user_id,state:{page:0},content:{original:[],current:[]}}),computed:{validationPanel(){return FNR.utility.genValidation(this.content.current)},toSave(){let e=[];return[].forEach.call(this.content.current,(t,o)=>{t.value!==this.content.original[o].value&&e.push({name:t.name,type:t.type,value:t.value})}),e}},methods:{updateProfile(){this.toSave.length&&""===this.validationPanel&&(this.state.page=2,FNR.user.profile.setData(this.toSave).then(e=>{if(e){let e=!1;this.toSave.map(t=>{t.name.toLowerCase().indexOf("tema")>-1&&(e=!0)}),e?(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),FNR.user.setTheme(!0)):(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),setTimeout(()=>{window.location.reload()},2e3))}else FNR.html.genNotification("Atención","Hubo un problema al actualizar. Dale otro intento.","fas fa-exclamation")}))}},created(){FNR.user.profile.getData(JSON.parse(this.elements.replace(/'/g,'"'))).then(e=>{this.content.original=JSON.parse(JSON.stringify(e)),this.content.current=e,this.state.page=1})},template:'\n <section id="forum-cp" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Editar perfil</h2>\n <hr />\n <p>En esta página podrás editar tu perfil de usuario. En caso de que quieras editar tu contraseña, por favor dirígete a <a target="_blank" title="Ir a «Cambiar contraseña»" :href="\'/profile?change_password=Cambiar+tu+contraseña&mode=editprofile&page_profil=informations&user_id=\' + userId">este enlace</a>.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <aviso-foro v-show="validationPanel !== \'\'">\n <ul v-html="validationPanel"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li v-for="item in content.current">\n <campo-foro :name="item.name">\n <input v-model="item.value" v-if="item.type === \'input\' || item.type === \'avatar\'" type="text"/>\n <textarea v-model="item.value" v-else-if="item.type === \'textarea\'"></textarea>\n <div v-else-if="item.type === \'select\'" class="select-container">\n <select v-model="item.value">\n <option :value="option.value" v-for="option in item.options">{{ option.name }}</option>\n </select>\n </div>\n </campo-foro>\n </li>\n </ul>\n <div id="usereply-comand">\n <button class="button1 btn-main" @click="updateProfile()" title="Actualizar perfil">Actualizar</button>\n </div>\n </template>\n <template v-if="state.page === 2">\n <cargando-foro text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n '}),Vue.component("lista-bosquejos",{data:()=>({state:{page:0},drafts:{messages:{page:1,loading:0,pages:[],content:[]},topics:{page:1,loading:0,pages:[],content:[]}}}),methods:{getPageMessages(e){this.drafts.messages.loading=0,FNR.user.drafts.messages.getDrafts(e).then(e=>{this.drafts.messages.content=e,this.drafts.messages.loading=1,this.state.page=1})},getPageTopics(e){this.drafts.topics.loading=0,FNR.user.drafts.topics.getDrafts(e).then(e=>{this.drafts.topics.content=e,this.drafts.topics.loading=1,this.state.page=1})},setPageMessages(e){this.drafts.messages.page=e,this.getPageMessages(this.drafts.messages.pages[this.drafts.messages.page-1])},setPageTopics(e){this.drafts.topics.page=e,this.getPageMessages(this.drafts.topics.pages[this.drafts.topics.page-1])}},created(){Promise.all([FNR.user.drafts.messages.getPages(),FNR.user.drafts.topics.getPages()]).then(e=>{0!==e[0].items&&(this.drafts.messages.pages=e[0].pages,this.getPageMessages(this.drafts.messages.pages[this.drafts.messages.page-1])),0!==e[1].items&&(this.drafts.topics.pages=e[1].pages,this.getPageTopics(this.drafts.topics.pages[this.drafts.topics.page-1])),e[0].items+e[1].items===0&&(this.state.page=1)})},updated(){FNR.behaviour.genControls()},template:'\n <section class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Lista de Bosquejos</h2>\n <hr />\n <p>En esta página tienes tu lista de Bosquejos dividida entre mensajes y temas.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <div class="is-content mb-4">\n <h4>Mensajes</h4>\n </div>\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="drafts.messages.pages.length > 1">\n <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />\n </template>\n </mando-foro>\n <section id="forum-drafts-messages" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!drafts.messages.content.length || drafts.messages.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!drafts.messages.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes bosquejos</h6>\n </li>\n </template>\n <template v-else-if="drafts.messages.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.messages.content">\n <temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">\n <template slot="title">{{ draft.topic.name }}</template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="drafts.messages.pages.length > 1">\n <paginacion-foro :page="drafts.messages.page" :total="drafts.messages.pages.length" @setPage="setPageMessages" />\n </template>\n </mando-foro>\n \t <separador-foro></separador-foro>\n <div class="is-content mb-4">\n <h4>Temas</h4>\n </div>\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.topics.page" :total="drafts.topics.pages.length" @setPage="setPageTopics" />\n </template>\n </mando-foro>\n <section id="forum-drafts-messages" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!drafts.topics.content.length || drafts.topics.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!drafts.topics.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes bosquejos</h6>\n </li>\n </template>\n <template v-else-if="drafts.topics.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li class="row is-not-topic is-not-lastpost" v-for="draft in drafts.topics.content">\n <temas-foro type="draft" mode="" :url="draft.topic.url" :replies="draft.info.location" :views="draft.info.date" :quick="draft.modify">\n <template slot="title">{{ draft.topic.name }}</template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="drafts.topics.pages.length > 1">\n <paginacion-foro :page="drafts.topics.page" :total="drafts.topics.pages.length" @setPage="setPageTopics" />\n </template>\n </mando-foro>\n </template>\n </section>\n '}),Vue.component("lista-seguidos",{data:()=>({state:{page:0,selected:[]},followed:{page:1,loading:0,pages:[],content:[]}}),methods:{getPage(e){this.followed.loading=0,FNR.user.followed.getFollowed(e).then(e=>{this.followed.content=e,this.followed.loading=1,this.state.page=1})},setPage(e){this.followed.page=e,this.getPage(this.followed.pages[this.followed.page-1])},setTopic(e){const t=this.state.selected.indexOf(e);-1===t?this.state.selected.push(e):this.state.selected.splice(t,1)},delTopics(){this.state.selected.length&&FNR.html.genPrompt("Necesitamos confirmación","Te dispones a retirar la supervisión de uno (o varios) temas. ¿Estás segur@?","Escribe «ELIMINAR» para confirmar","").then(e=>{"ELIMINAR"===e&&FNR.user.followed.delFollowed(this.state.selected).then(e=>{e?window.location.reload():FNR.html.genNotification("Atención","Hubo un problema al retirar. Inténtalo de nuevo.","fas fa-exclamation")})})}},created(){FNR.user.followed.getPages().then(e=>{0!==e.items?(this.followed.pages=e.pages,this.getPage(this.followed.pages[this.followed.page-1])):this.state.page=1})},updated(){FNR.behaviour.genControls()},template:'\n <section class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Lista de Temas Supervisados</h2>\n <hr />\n <p>En esta página tienes tu lista de Temas Supervisados.</p>\n <p>Ante cualquier duda o problema, contacta con la administración.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <mando-foro id="upper-controls" app="true">\n <template slot="pagination" v-if="followed.pages.length > 1">\n <paginacion-foro :page="followed.page" :total="followed.pages.length" @setPage="setPage" />\n </template>\n <template slot="controls">\n <li v-if="followed.content.length" @click="delTopics()">\n <boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <section id="forum-followed" class="forum-topiclist">\n <lista-temas-cabecera elements="[\'Tema\', \'Información\']"></lista-temas-cabecera>\n <ul :class="\'topiclist-topics no-style\' + (!followed.content.length || followed.loading === 0 ? \' no-results\': \'\')">\n <template v-if="!followed.content.length">\n <li class="is-not-topic is-not-lastpost">\n <h6>No tienes temas supervisados</h6>\n </li>\n </template>\n <template v-else-if="followed.loading === 0">\n <li class="is-not-topic is-not-lastpost">\n <cargando-foro text="Cargando temas…"></cargando-foro>\n </li>\n </template>\n <template v-else>\n <li :class="\'row is-not-topic is-not-lastpost \' + topic.type" v-for="topic in followed.content" :key="topic.id">\n <temas-foro type="followed" mode="" :url="topic.url" :replies="topic.replies + \' respuestas\'" :views="topic.views + \' visitas\'">\n <template slot="title">{{ topic.name }}</template>\n <template slot="radio">\n <div :class="\'forum-checkbox\' + (state.selected.indexOf(topic.id) === -1 ? \'\' : \' is-active\')">\n <div class="checkbox-content" @click="setTopic(topic.id)">\n <div class="checkbox-click">\n <i class="fas fa-check"></i>\n </div>\n </div>\n </div>\n </template>\n </temas-foro>\n </li>\n </template>\n </ul>\n </section>\n <mando-foro id="lower-controls" app="true">\n <template slot="pagination" v-if="followed.pages.length > 1">\n <paginacion-foro :page="followed.page" :total="followed.pages.length" @setPage="setPage" />\n </template>\n <template slot="controls">\n <li v-if="followed.content.length" @click="delTopics()">\n <boton-foro url="javascript:{}" name="Retirar" icon="fas fa-minus"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n </section>\n '}),Vue.component("editor-foro",{data:()=>({state:{page:0,editor:"none",admin:1===_userdata.user_level,guest:0===_userdata.session_logged_in,dice:document.querySelectorAll("#list_dice").length,draft:document.querySelectorAll('input[name="draft"]').length},colors:FNR.forum.getColors(),content:{username:"",subject:"",msg:"",type:-1,options:[]},users:{current:"",options:[],selected:[],selector:!0},groups:{type:-1,options:[]},dice:{options:[],current:[]}}),computed:{msgCheck(){let e="";return this.state.guest&&(this.content.username.trim().length<1||this.content.username.trim().length>60)&&(e+="<li>Escribe un nombre de usuario de tamaño adecuado.</li>"),"post"===this.state.editor&&0===this.users.selected.length&&-1===this.groups.type&&(e+="<li>Selecciona al menos un usuario.</li>"),this.state.admin&&"post"===this.state.editor&&0===this.users.selected.length&&-1===this.groups.type&&(e+="<li>Selecciona un grupo.</li>"),"newtopic"!==this.state.editor&&"post"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(this.content.subject.trim().length<4||this.content.subject.trim().length>100)&&(e+="<li>Escribe un titulo de tamaño adecuado (4 a 100 carácteres).</li>"),this.content.msg.trim().length<10&&(e+="<li>Escribe un mensaje lo suficientemente largo.</li>"),e},sortedCharacters(){return Object.keys(this.users.options).length?this.users.options.map(e=>e.user).filter(e=>-1===this.users.selected.indexOf(e)).filter(e=>e.toLowerCase().indexOf(this.users.current.toLowerCase())>-1).sort((e,t)=>e<t?-1:e>t?1:0):[]},sortedEditCharacters(){return this.users.selected.sort((e,t)=>e<t?-1:e>t?1:0)}},methods:{insertSomething(e,t){const o=document.getElementById("usereply-editor"),s=e.replace(/-jump-/g,"\n"),n=t.replace(/-jump-/g,"\n");if(document.selection)o.focus(),document.selection.createRange().text=s+document.selection.createRange().text+n;else if(o.selectionStart||"0"==o.selectionStart){const e=o.selectionStart,t=o.selectionEnd,i=t+s.length;o.value=o.value.substring(0,e)+s+o.value.substring(e,t)+n+o.value.substring(t,o.value.length),o.setSelectionRange(i,i)}this.content.msg=o.value},newDice(){this.dice.current.push({dice:-1,number:0})},addCharacter(e){this.users.selected.push(e),this.users.selector=!1,this.users.current="",setTimeout(()=>{this.users.selector=!0},250)},deleteCharacter(e){this.users.current="",this.users.selected.splice(e,1)},changeGroup(){this.users.selected=[],this.users.current=""},insertUrl(){const e=document.getElementById("usereply-editor"),t=e.selectionStart,o=e.selectionEnd;FNR.html.genPrompt("Insertar enlace","Introduce el título del enlace. Por defecto, ponemos la este como título.","Título del enlace","").then(s=>{!1!==s?this.insertSomething("[url=","]"+s+"[/url]"):this.insertSomething("[url=","]"+e.value.substring(t,o)+"[/url]")})},insertImg(){FNR.html.genPrompt("Insertar imagen","Introduce las medidas de la imagen en píxeles pero sin la medida (por ejemplo 100x100). <u>En caso de dejarlo en blanco, se insertará con la medida inicial</u>.","Medidas de la imagen","").then(e=>{!1!==e?this.insertSomething("[img="+e+"]","[/img]"):this.insertSomething("[img]","[/img]")})},insertSpoiler(){FNR.html.genPrompt("Insertar spoiler","Introduce el título del spoiler. <u>En caso de dejarlo en blanco, se insertará sin él.</u>.","Título del spoiler","").then(e=>{!1!==e?this.insertSomething("[spoiler="+e+"]","[/spoiler]"):this.insertSomething("[spoiler]","[/spoiler]")})},insertQuote(){FNR.html.genPrompt("Insertar cita","Introduce el destinatario de la cita. <u>En caso de dejarlo en blanco, se insertará sin él.</u>.","Destinatario de la cita","").then(e=>{!1!==e?this.insertSomething("[quote="+e+"]","[/quote]"):this.insertSomething("[quote]","[/quote]")})},parseMsg(){window.forumParsing=!0,document.querySelector("#forum-realreply > form .sceditor-container > textarea")?document.querySelector("#forum-realreply > form .sceditor-container > textarea").value=this.content.msg.replace(/#per/g,this.colors[this.colors.length-1].hex):document.querySelector("#forum-realreply > form textarea#text_editor_textarea").value=this.content.msg.replace(/#per/g,this.colors[this.colors.length-1].hex),this.state.guest&&(this.content.subject.trim().length>4||this.content.subject.trim().length<60)&&(document.querySelector('#forum-realreply > form input[name="username"]').value=this.content.username),"post"===this.state.editor&&this.users.selected.length>0&&-1===this.groups.type&&this.users.selected.forEach(e=>{document.querySelector("#forum-realreply > form #add_username").click(),document.querySelectorAll('#forum-realreply > form input[name="username[]"]')[document.querySelectorAll('#forum-realreply > form input[name="username[]"]').length-2].value=e}),this.state.admin&&("post"===this.state.editor?0===this.users.selected.length&&-1!==this.groups.type&&(document.querySelector('#forum-realreply > form select[name="usergroup"]').value=this.groups.type):"newtopic"===this.state.editor&&-1!==this.content.type&&(document.querySelector('#forum-realreply > form input[type="radio"][name="topictype"][value="'+this.content.type+'"]').checked=!0)),"newtopic"!==this.state.editor&&"post"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(this.content.subject.trim().length>4||this.content.subject.trim().length<100)&&(document.querySelector('#forum-realreply > form input[name="subject"]').value=this.content.subject.trim()),"reply"===this.state.editor&&FNR.content.isAutosave()&&!1!==FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)&&-1!==_userdata.user_id&&FNR.cache.delData("post"+document.post.t.value+"-"+_userdata.user_id),!this.state.dice||"reply"!==this.state.editor&&"newtopic"!==this.state.editor&&"editpostdraft"!==this.state.editor&&"edittopicdraft"!==this.state.editor||([].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice tr"),(e,t)=>{0!==t&&e.remove()}),document.querySelector("#forum-realreply > form #list_dice tr td").insertAdjacentHTML("beforeend",'<span id="dice_to_del"></span>'),this.dice.current.filter(e=>-1!==e.dice).filter(e=>0!==parseFloat(e.number)&&!isNaN(parseFloat(e.number))).forEach(e=>{add_dice(document.querySelectorAll("#list_dice tr").length,e.dice,e.number)}))},draftMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Bosquejo"], #forum-realreply input[value="Modificar"], #forum-realreply input[value="Registrar"]').click())},delMsg(){const e=new URLSearchParams(window.location.search);let t="topicdraft",o="t";"editpostdraft"===e.get("mode")&&(t="draft",o="p"),FNR.html.genPrompt("Necesitamos confirmación","Te dispones a eliminar un bosquejo. ¿Estás segur@?","Escribe «ELIMINAR» para confirmar","").then(s=>{"ELIMINAR"===s&&FNR.user.drafts.delDrafts(t,[e.get(o)]).then(e=>{e?window.location.replace(`${window.location.protocol}//${window.location.host}${forumConfig.usableDirections.ucp}#/bosquejos`):FNR.html.genNotification("Atención","Hubo un problema al eliminar. Inténtalo de nuevo.","fas fa-exclamation")})})},sendMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Enviar"], #forum-realreply input[value="Publicar"]').click())},prevMsg(){this.msgCheck.length||(this.parseMsg(),document.querySelector('#forum-realreply > form input[value="Previsualización"], #forum-realreply input[value="Previsualizar"]').click())}},created(){const e=()=>{if(document.querySelector('#forum-realreply > form input[name="username"]')&&(this.content.username=document.querySelector('#forum-realreply > form input[name="username"]').value),document.querySelector("#forum-realreply > form #text_editor_textarea")){let e=document.querySelector("#forum-realreply > form #text_editor_textarea").value;this.content.msg=e}if(document.querySelector('#forum-realreply > form input[name="subject"]')){let e=document.querySelector('#forum-realreply input[name="subject"]').value;document.querySelector('#forum-realreply select[name="usergroup"]')&&""!==document.querySelector('#forum-realreply select[name="usergroup"]').value?this.groups.type=document.querySelector('#forum-realreply select[name="usergroup"]').value:document.querySelector('#forum-realreply input[name="username[]"]')&&[].forEach.call(document.querySelectorAll('#forum-realreply input[name="username[]"]'),e=>{""!==e.value&&this.users.selected.push(e.value)}),this.content.subject=e}document.querySelector("#forum-realreply > form #list_dice")&&([].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice #post_dice option"),e=>{""!==e.value&&this.dice.options.push({value:e.value,content:e.textContent})}),1===document.querySelectorAll("#forum-realreply > form #list_dice tr").length?this.dice.current.push({dice:-1,number:0}):[].forEach.call(document.querySelectorAll("#forum-realreply > form #list_dice tr"),e=>{""!==e.querySelector("select").value&&this.dice.current.push({dice:parseFloat(e.querySelector("select").value),number:parseFloat(e.querySelector("input").value)})})),4===document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]').length&&[].forEach.call(document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]'),e=>{this.content.options.push({value:e.value,name:e.parentElement.textContent.trim()}),e.checked&&(this.content.type=e.value)}),document.querySelector('#forum-realreply > form select[name="usergroup"]')&&[].forEach.call(document.querySelectorAll('#forum-realreply > form select[name="usergroup"] option'),e=>{""!==e.value&&this.groups.options.push({value:e.value,name:e.textContent})}),FNR.content.isAutosave()&&""===this.content.msg&&!1!==FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)&&-1!==_userdata.user_id&&(this.content.msg=FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)),this.state.page=1,document.onkeydown=(e=>{const t=document.getElementById("usereply-editor");document.activeElement===t&&(e.ctrlKey&&"b"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b]","[/b]")):e.ctrlKey&&"i"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[i]","[/i]")):e.ctrlKey&&"s"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[strike]","[/strike]")):e.ctrlKey&&"u"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[u]","[/u]")):e.ctrlKey&&","===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[left]","[/left]")):e.ctrlKey&&"."===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[center]","[/center]")):e.ctrlKey&&"-"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[right]","[/right]")):e.ctrlKey&&"o"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertUrl()):e.ctrlKey&&"p"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertImg()):e.ctrlKey&&"`"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSpoiler()):e.ctrlKey&&"+"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[code]","[/code]")):e.ctrlKey&&"l"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertQuote()):e.ctrlKey&&"ñ"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[hide]","[/hide]")):e.ctrlKey&&"´"===e.key?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[youtube]","[/youtube]")):"Home"===e.key?(e.preventDefault(),e.stopPropagation(),t.setSelectionRange(0,0)):"End"===e.key?(e.preventDefault(),e.stopPropagation(),t.setSelectionRange(t.value.length,t.value.length)):e.ctrlKey&&"1"===e.key&&"undefined"!==this.colors[0]&&this.colors.length-1!=0?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[0].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"!"===e.key&&"undefined"!==this.colors[0]&&this.colors.length-1!=0?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[0].hex+"]","[/color][/b]")):e.ctrlKey&&"2"===e.key&&"undefined"!==this.colors[1]&&this.colors.length-1!=1?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[1].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&'"'===e.key&&"undefined"!==this.colors[1]&&this.colors.length-1!=1?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[1].hex+"]","[/color][/b]")):e.ctrlKey&&"3"===e.key&&"undefined"!==this.colors[2]&&this.colors.length-1!=2?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[2].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"·"===e.key&&"undefined"!==this.colors[2]&&this.colors.length-1!=2?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[2].hex+"]","[/color][/b]")):e.ctrlKey&&"4"===e.key&&"undefined"!==this.colors[3]&&this.colors.length-1!=3?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[3].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"$"===e.key&&"undefined"!==this.colors[3]&&this.colors.length-1!=3?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[3].hex+"]","[/color][/b]")):e.ctrlKey&&"5"===e.key&&"undefined"!==this.colors[4]&&this.colors.length-1!=4?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[4].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"%"===e.key&&"undefined"!==this.colors[4]&&this.colors.length-1!=4?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[4].hex+"]","[/color][/b]")):e.ctrlKey&&"6"===e.key&&"undefined"!==this.colors[5]&&this.colors.length-1!=5?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[5].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"&"===e.key&&"undefined"!==this.colors[5]&&this.colors.length-1!=5?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[5].hex+"]","[/color][/b]")):e.ctrlKey&&"7"===e.key&&"undefined"!==this.colors[6]&&this.colors.length-1!=6?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[6].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"/"===e.key&&"undefined"!==this.colors[6]&&this.colors.length-1!=6?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[6].hex+"]","[/color][/b]")):e.ctrlKey&&"8"===e.key&&"undefined"!==this.colors[7]&&this.colors.length-1!=7?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[7].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&"("===e.key&&"undefined"!==this.colors[7]&&this.colors.length-1!=7?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[7].hex+"]","[/color][/b]")):e.ctrlKey&&"9"===e.key&&"undefined"!==this.colors[8]&&this.colors.length-1!=8?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color="+this.colors[8].hex+"]","[/color]")):e.ctrlKey&&e.shiftKey&&")"===e.key&&"undefined"!==this.colors[8]&&this.colors.length-1!=8?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color="+this.colors[8].hex+"]","[/color][/b]")):e.ctrlKey&&"º"===e.key&&void 0!==forumConfig.skinOptions.customColour?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[color=#per]","[/color]")):e.ctrlKey&&e.shiftKey&&"ª"===e.key&&void 0!==forumConfig.skinOptions.customColour?(e.preventDefault(),e.stopPropagation(),this.insertSomething("[b][color=#per]","[/color][/b]")):e.ctrlKey&&e.shiftKey&&"Enter"===e.key&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.prevMsg()):e.ctrlKey&&e.altKey&&"Enter"===e.key&&("reply"===this.state.editor||"newtopic"===this.state.editor)&&this.state.dice&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.draftMsg()):e.ctrlKey&&"Enter"===e.key&&!this.msgCheck.length?(e.preventDefault(),e.stopPropagation(),this.sendMsg()):!e.ctrlKey||"Backspace"!==e.key||"editpostdraft"!==this.state.editor&&"edittopicdraft"!==this.state.editor||(e.preventDefault(),e.stopPropagation(),this.delMsg()))}),setTimeout(()=>{FNR.behaviour.genDropeable()},250)},t=()=>{"post"===this.state.editor?FNR.forum.getMembers(!0).then(t=>{this.users.options=t,e()}):e()};void 0!==document.post&&("editpost"===document.post.mode.value?void 0!==document.post.modif_topic_title?this.state.editor="newtopic":this.state.editor="reply":"edit"===document.post.mode.value?this.state.editor="post":this.state.editor=document.post.mode.value),this.state.guest?setTimeout(()=>{e()},2e3):void 0===forumConfig.skinOptions.customColour?t():FNR.user.profile.getData([{name:forumConfig.skinOptions.customColour,type:"input"}]).then(e=>{this.colors.push({hex:e[0].value,name:"Personal"}),t()}),this.state.replies=document.querySelectorAll(".forum-otherposts > *").length||document.querySelector('input[type="submit"][value="Modificar"]')?"Varios":""},mounted(){insertIntoEditor=(e=>{try{this.insertSomething(" "+e+" ","")}catch(e){console&&console.error(e)}}),$("#quickEmojInternal").on("load",function(){$("#quickEmojInternal").contents().find("head").append("<style>body{padding: 1rem!important}</style>")});let e="";document.querySelector('p[style="color: red;"]')&&(e=document.querySelector('p[style="color: red;"]').textContent,"preview"===document.querySelector('p[style="color: red;"]').parentElement.parentElement.id?document.querySelector('p[style="color: red;"]').parentElement.parentElement.remove():document.querySelector('p[style="color: red;"]').remove()),window.forumParsing=!1,
2
2
  ""!==e&&FNR.html.genNotification("Atención","Hubo un problema al enviar. Inténtalo de nuevo.","fas fa-exclamation"),FNR.content.isAutosave()&&window.addEventListener("beforeunload",()=>{!1===forumParsing&&(""===document.querySelector("#usereply-editor").value&&!1!==FNR.cache.getData("post"+document.post.t.value+"-"+_userdata.user_id)||""!==document.querySelector("#usereply-editor").value)&&FNR.cache.setData("post"+document.post.t.value+"-"+_userdata.user_id,document.querySelector("#usereply-editor").value,-1)},!1)},template:'\n <div id="forum-usereply">\n <template v-if="state.page === 0">\n <cargando-foro text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <aviso-foro v-show="msgCheck.length">\n <ul v-html="msgCheck"></ul>\n </aviso-foro>\n <ul id="usereply-extra" class="forum-fieldlist no-style" v-if="state.editor !== \'reply\'">\n <template v-if="state.guest">\n <li>\n <campo-foro name="Nombre de usuario">\n <input type="text" v-model="content.username" placeholder="Escribe tu nombre de usuario." />\n </campo-foro>\n </li>\n </template>\n <template v-if="state.editor === \'post\'">\n <li>\n <campo-foro name="Usuarios">\n <div class="character-selector">\n <input type="text" v-model="users.current" placeholder="Escribe el nombre de un usuario." :disabled="groups.type !== -1" />\n <ul class="no-style selector-list" v-if="users.selector && sortedCharacters.length > 0">\n <li v-for="(character, index) in sortedCharacters" @click="addCharacter(character)" :title="\'Seleccionar \' + character">{{ character }}<i class="fas fa-plus"></i></li>\n </ul>\n </div>\n <ul v-if="sortedEditCharacters.length" class="no-style character-list">\n <li v-for="(character, index) in sortedEditCharacters" @click="deleteCharacter(index)" :title="\'Quitar \' + character"><i class="fas fa-times"></i> {{ character }}</li>\n </ul>\n </campo-foro>\n </li>\n </template>\n <template v-if="state.admin">\n <template v-if="state.editor === \'post\'">\n <li>\n <campo-foro name="Grupo">\n <div class="select-container">\n <select v-model="groups.type" @change="changeGroup()" :disabled="users.selected.length !== 0">\n <option value="-1" hidden>Selecciona un grupo.</option>\n <option v-for="option in groups.options" :value="option.value">{{ option.name }}</option>\n </select>\n </div>\n </campo-foro>\n </li>\n </template>\n <template v-else-if="content.type !== -1 && (state.editor === \'newtopic\' || state.editor === \'edittopicdraft\')">\n <li>\n <campo-foro name="Tipo de tema">\n <div class="select-container">\n <select v-model="content.type">\n <option value="-1" hidden>Selecciona una opción.</option>\n <option v-for="option in content.options" :value="option.value">{{ option.name }}</option>\n </select>\n </div>\n </campo-foro>\n </li>\n </template>\n </template>\n <template v-if="state.editor === \'newtopic\' || state.editor === \'post\' || state.editor === \'edittopicdraft\'">\n <li>\n <campo-foro name="Título">\n <input type="text" v-model="content.subject" placeholder="Escribe el título." />\n </campo-foro>\n </li>\n </template>\n </ul>\n <div id="usereply-top" class="usereply-header">\n <h3>Editor de texto<small>Ver guía de <a href="https://www.bbcode.org/reference.php" target="_blank">BBCode</a>.</small></h3>\n <div id="usereply-buttons">\n <ul class="is-hidden-mobile">\n <li id="bold-button">\n <button class="usereply-button" @click="insertSomething(\'[b]\', \'[/b]\')" title="Negrita">\n <i class="fas fa-bold"></i>\n </button>\n </li>\n <li id="italic-button">\n <button class="usereply-button" @click="insertSomething(\'[i]\', \'[/i]\')" title="Cursiva">\n <i class="fas fa-italic"></i>\n </button>\n </li>\n <li id="underline-button">\n <button class="usereply-button" @click="insertSomething(\'[u]\', \'[/u]\')" title="Subrayado">\n <i class="fas fa-underline"></i>\n </button>\n </li>\n <li id="strike-button">\n <button class="usereply-button" @click="insertSomething(\'[strike]\', \'[/strike]\')" title="Tachado">\n <i class="fas fa-strikethrough"></i>\n </button>\n </li>\n </ul>\n <ul>\n <li id="colour-button">\n <div class="dropdown upper-controls is-dropeable is-right">\n <div class="dropdown-trigger">\n <button class="usereply-button" title="Color">\n <i class="fas fa-palette"></i>\n </button>\n </div>\n <div class="dropdown-menu" role="menu">\n <div id="colour-list" class="dropdown-content">\n <div v-for="color in colors" class="usereply-option" :style="\'color:\' + color.hex" @click="insertSomething(\'[color=\' + color.hex + \']\', \'[/color]\')">{{ color.name }}</div>\n </div>\n </div>\n </div>\n </li>\n <li id="emoji-button">\n <div class="dropdown upper-controls is-dropeable is-right">\n <div class="dropdown-trigger">\n <button class="usereply-button" title="Emoticono">\n <i class="fas fa-smile"></i>\n </button>\n </div>\n <div class="dropdown-menu" role="menu">\n <div id="emoji-list" class="dropdown-content">\n <iframe id="quickEmojInternal" marginheight="0" marginwidth="0" name="smilies" scrolling="auto" src="/smilies?mode=smilies_frame"></iframe>\n </div>\n </div>\n </div>\n </li>\n <li id="align-button">\n <div class="dropdown upper-controls is-dropeable is-right">\n <div class="dropdown-trigger">\n <button class="usereply-button" title="Alinear">\n <i class="fas fa-align-justify"></i>\n </button>\n </div>\n <div class="dropdown-menu" role="menu">\n <div id="align-list" class="dropdown-content">\n <div class="usereply-option" @click="insertSomething(\'[left]\', \'[/left]\')">Izquierda</div>\n <div class="usereply-option" @click="insertSomething(\'[center]\', \'[/center]\')">Centro</div>\n <div class="usereply-option" @click="insertSomething(\'[right]\', \'[/right]\')">Derecha</div>\n </div>\n </div>\n </div>\n </li>\n <li id="toolbox-button">\n <div class="dropdown upper-controls is-dropeable is-right">\n <div class="dropdown-trigger">\n <button class="usereply-button" title="Otros">\n <i class="fas fa-toolbox"></i>\n </button>\n </div>\n <div class="dropdown-menu" role="menu">\n <div id="toolbox-list" class="dropdown-content">\n <div class="usereply-option" @click="insertUrl()">Enlace</div>\n <div class="usereply-option" @click="insertImg()">Imagen</div>\n <div class="usereply-option" @click="insertSpoiler()">Spoiler</div>\n <div class="usereply-option" @click="insertSomething(\'[code]\', \'[/code]\')">Code</div>\n <div class="usereply-option" @click="insertQuote()">Cita</div>\n <div class="usereply-option" @click="insertSomething(\'[hide]\', \'[/hide]\')">Ocultar</div>\n <div class="usereply-option" @click="insertSomething(\'[youtube]\', \'[/youtube]\')">Youtube</div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n </div>\n </div>\n <textarea id="usereply-editor" contenteditable="true" v-model="content.msg"></textarea>\n <div id="usereply-comand">\n <button class="button1 btn-main" @click="sendMsg()">Enviar</button>\n <button class="button1" @click="draftMsg()" v-if="state.editor === \'editpostdraft\' || state.editor === \'edittopicdraft\'">Modificar</button>\n <button class="button1" @click="draftMsg()" v-else-if="state.draft && (state.editor === \'reply\' || state.editor === \'newtopic\')">Bosquejo</button>\n <button class="button1" @click="prevMsg()">Previsualizar</button>\n <button class="button1" @click="delMsg()" v-if="state.editor === \'editpostdraft\' || state.editor === \'edittopicdraft\'">Eliminar</button>\n </div>\n <div v-if="state.dice && (state.editor === \'reply\' || state.editor === \'newtopic\' || state.editor === \'editpostdraft\' || state.editor === \'edittopicdraft\')" id="usereply-dice">\n <div class="usereply-header">\n <h3>Tirar dados</h3>\n </div>\n <ul>\n <li v-for="(item, index) in dice.current">\n <div class="select-container">\n <select v-model="item.dice" @change="item.number = 1">\n <option value="-1" selected hidden>Selec. un dado</option>\n <option v-for="option in dice.options" :value="option.value">{{ option.content }}</option>\n </select>\n </div>\n <input type="number" v-model="item.number" />\n <button @click="newDice()" v-if="(index + 1) === dice.current.length" class="dice-more">\n <i class="fas fa-plus"></i>\n </button>\n <div v-else class="dice-more"></div>\n </li>\n </ul>\n </div>\n </template>\n </div>\n '});
@@ -162,7 +162,7 @@ Vue.component('paginacion-foro', {
162
162
  this.timeout = setTimeout(() => {
163
163
  this.input = val;
164
164
 
165
- if (val.match(/[a-zA-Z]+/g) === null) {
165
+ if (val.match(/[a-zA-Z]+/g) === null && val.trim() !== '') {
166
166
  if (val < 1) {
167
167
  this.$emit('setPage', 1);
168
168
  } else if (val > this.total) {
@@ -1,2 +1,2 @@
1
- Vue.component("categoria-foro",{props:["id"],computed:{slugName(){const e=this.id.indexOf("<h2>")>-1?FNR.utility.genSlug(this.id.split("<h2>")[1].split("</h2>")[0],"-"):FNR.utility.genSlug(this.id,"-");return"category-"+e}},template:"\n <section :class=\"'category-element ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("cabecera-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head regular-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("cabcategoria-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head category-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("cabespecial-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head special-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("subforo-foro",{props:["id"],computed:{slugId(){let e="";return window.location.pathname.match(/f(\d+)-/)?e=window.location.pathname.match(/f(\d+)-/)[1]:window.location.pathname.match(/f(\d+)p(\d+)-/)&&(e=window.location.pathname.match(/f(\d+)p(\d+)-/)[1]),"subforum-"+e},slugName(){const e=this.id.indexOf("<h2>")>-1?FNR.utility.genSlug(this.id.split("<h2>")[1].split("</h2>")[0],"-"):FNR.utility.genSlug(this.id,"-");return"subforum-"+e}},template:"\n <section :class=\"'subforum-element ' + slugId + ' ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("lista-temas-cabecera",{props:["elements"],data(){return{elementos:JSON.parse(this.elements.replace(/'/g,'"'))}},template:'\n <ul class="topiclist-header no-style">\n <li v-for="element in elementos">\n <titulo-especial :title="element"></titulo-especial>\n </li>\n </ul>\n '}),Vue.component("tema-foro",{computed:{slugId(){let e="";return window.location.pathname.match(/t(\d+)-/)?e=window.location.pathname.match(/t(\d+)-/)[1]:window.location.pathname.match(/t(\d+)p(\d+)-/)&&(e=window.location.pathname.match(/t(\d+)p(\d+)-/)[1]),"topic-"+e},slugName(){const e=FNR.utility.genSlug(void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text,"-");return"topic-"+e}},template:"\n <section :class=\"'topic-element ' + slugId + ' ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("mando-foro",{props:["id","app"],template:'\n <section :class="\'forum-controls \' + id">\n <template v-if="app === \'true\'">\n <ul class="left no-style page-buttons">\n <slot name="controls"></slot>\n </ul>\n <div class="right page-pagination">\n <slot name="pagination"></slot>\n </div>\n </template>\n <template v-else>\n <ul class="left no-style page-buttons"></ul>\n <div class="right page-pagination"></div>\n </template>\n </section>\n '}),Vue.component("paginacion-foro",{props:["page","total"],data:()=>({input:"",timeout:null}),computed:{value:{get(){return this.input},set(e){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.input=e,null===e.match(/[a-zA-Z]+/g)&&(e<1?this.$emit("setPage",1):e>this.total?this.$emit("setPage",this.total):this.$emit("setPage",e)),this.$refs.refInput.blur(),this.input="",this.doScroll()},750)}}},methods:{doScroll(){document.querySelector("body.is-touch")&&window.scroll(0,document.querySelector(".wiki-content").querySelector(".is-content").querySelector("p:last-child").offsetTop-40)}},template:'\n <div class="pagination-manager">\n <div class="page-action" v-if="page > 1">\n <a href="javascript:{}" class="page-prev" title="Ir a la página anterior" @click="$emit(\'setPage\', page - 1); doScroll()">\n <i class="fas fa-chevron-left"></i>\n </a>\n </div>\n <div class="pagination-input" v-if="total > 1">\n <input type="text" :placeholder="page" v-model="value" ref="refInput">de {{ total }}\n </div>\n <div class="page-action" v-if="page < total">\n <a href="javascript:{}" class="page-next" title="Ir a la página anterior" @click="$emit(\'setPage\', page + 1); doScroll()">\n <i class="fas fa-chevron-right"></i>\n </a>\n </div>\n </div>\n '}),Vue.component("titulo-especial",{props:["title"],template:'\n <h3 class="is-tweakeable"><span class="is-measurable" v-html="title"></span></h3>\n '}),Vue.component("cuerpo-widget",{props:["class"],computed:{currentClass(){return void 0===this.class?"plank-inner":"plank-inner "+this.class}},template:'\n <div class="plank-content">\n <div :class="currentClass">\n <slot></slot>\n </div>\t\t\t\t\t\t \n </div>\n '}),Vue.component("separador-foro",{props:["faction"],data:()=>({image:forumDefaults.separator}),template:'\n <section class="forumseparator-element">\n <img :src="image" />\n </section>\n '}),Vue.component("tema-ref",{props:["info"],data:()=>({profileName:forumConfig.profileOptions.profileName||"perfil"}),computed:{userColor(){return"color: "+this.info.lastpost.who.color}},template:'\n <div class="ltopic-element">\n <a class="ltopic-last" :href="info.lastpost.url" target="_blank" :title="\'Ir al último mensaje del tema «\' + info.name + \'»\'">\n <i class="fas fa-link"></i>\n </a>\n <div class="ltopic-data">\n <a class="ltopic-title" :href="info.url" target="_blank" :title="\'Ir al tema «\' + info.name + \'»\'">{{ info.name }}</a>\n <small class="ltopic-info"><a :href="info.lastpost.who.url" target="_blank" :style="userColor" :title="\'Ir al \' + profileName + \' de «\' + info.lastpost.who.name + \'»\'">{{ info.lastpost.who.name | just-name }}</a>, {{ info.lastpost.date }} en <a :href="info.forum.url" target="_blank" :title="\'Ir al subforo «\' + info.forum.name + \'»\'">{{ info.forum.name }}</a></small>\n </div>\n </div>\n '}),Vue.component("campo-foro",{props:["name"],mounted(){const e=this.$el.parentElement.classList;e.add("field-element"),e.add("field-"+FNR.utility.genSlug(this.name,"-"))},template:'\n <div class="forum-field">\n <div class="field-name">{{ name | capitalize }}</div>\n <div class="field-content">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("boton-foro",{props:["url","name","icon","type","input"],computed:{realClass(){return"true"===this.input?"forum-button is-input":"forum-button"},realName(){return"text"+("no-name"===this.type?" is-hidden-touch":"")},realUrl(){return"true"===this.input?"javascript:{}":this.url}},mounted(){const e=this.$el.parentElement.classList;e.add("btn-element"),e.add("btn-"+FNR.utility.genSlug(this.name,"-"))},template:'\n <a :href="realUrl" targer="_blank" :class="realClass" :title="name">\n <span class="icon">\n <i :class="icon"></i>\n </span>\n <span :class="realName">{{ name }}</span>\n <span v-if="input === \'true\'" class="input-real">\n <slot name="input"></slot>\n </span>\n </a>\n '}),Vue.component("cargando-foro",{props:["text"],template:'\n <section id="loading-element">\n <div id="loading-content">\n <i class="fas fa-circle-notch fa-spin"></i>\n <span>{{ text }}</span>\n </div>\n </section>\n '}),Vue.component("aviso-foro",{template:' \n <div class="forum-infoblock">\n <h5>Antes de proceder recuerda:</h5>\n <slot></slot>\n </div>\n '}),Vue.component("afiliaciones-foro",{data:()=>({afis:{}}),created(){FNR.forum.getAffiliates().then(e=>{this.afis=e})},template:'\n <ul v-html="afis.normal" class="no-style"></ul>\n '}),Vue.component("controles-foro",{data:()=>({maPage:0,userName:_userdata.username,userLevel:_userdata.user_level,userId:_userdata.user_id,userLog:_userdata.session_logged_in,userMP:0,userOut:"",isActive:!1}),computed:{isActiveClass(){return"has-bg"+(this.isActive?" visible":" not-visible")}},methods:{turnActive(){this.isActive=!this.isActive}},created(){0!==this.userLog&&(null!==document.getElementById("i_icon_mini_new_message")&&null!==document.getElementById("i_icon_mini_new_message").title.match(/[0-255]/)&&(this.userMP=parseInt(document.getElementById("i_icon_mini_new_message").title.match(/[0-255]/)[0])),this.userOut=document.getElementById("logout").href)},template:'\n <div class="main-body">\n \t\t<nav id="forum-breadcrumb" class="breadcrumb has-succeeds-separator left" aria-label="breadcrumbs">\n \t<ul>\n \t<li>\n \t<a href="/" title="Ir a «Inicio»">Inicio</a>\n \t</li>\n \t</ul>\n \t</nav>\n <nav class="right"> \n <section id="forum-navbar-desktop" class="is-hidden-touch">\n <navbar-foro :username="userName" :userlevel="userLevel" :userid="userId" :userlog="userLog" :usermp="userMP" :userout="userOut" />\n </section>\n <section id="forum-navbar-mobile" class="is-hidden-desktop">\n <div id="hmg-button" @click="turnActive()" class="is-pointer">\n <i class="fas fa-bars"></i>\n </div>\n <div id="hmg-menu" :class="isActiveClass">\n <h3>{{ userName | just-name }}<i class="fas fa-times is-pointer" @click="turnActive()"></i></h3>\n <navbar-foro :username="userName" :userlevel="userLevel" :userid="userId" :userlog="userLog" :usermp="userMP" :userout="userOut" />\n </div>\n <div class="bg-active" @click="turnActive()"></div>\n </section>\n <section v-if="maPage === 1" id="multiaccount-transition">\n <cargando-foro text="Cambiando de cuenta…"></cargando-foro>\n </section>\n </nav>\n </div>\n '}),Vue.component("navbar-foro",{props:["username","userlevel","userid","userlog","usermp","userout"],data:()=>({profileName:forumConfig.profileOptions.profileName||"perfil",items:forumContent.navbar,navigation:forumContent.links,directions:forumConfig.usableDirections,multiAccount:{status:!1,position:-1,accounts:[]}}),computed:{isStatusClass(){return(1===this.userlog?"is-logged":"is-unlogged")+(1===this.userlevel?" is-admin":" is-user")},mpText(){return"Mensajería"+(0!==this.usermp?" ("+this.usermp+")":"")},links(){return this.navigation.filter(e=>void 0!==e.icon)}},methods:{changeAccount(){this.$parent.maPage=1,FNR.user.changeAccount(this.userout,this.multiAccount.accounts[this.multiAccount.position].name,this.multiAccount.accounts[this.multiAccount.position].password).then(e=>{e&&window.location.reload()})}},created(){this.multiAccount.status=!1!==FNR.cache.getData("usermultiaccounts")&&!1!==FNR.cache.getData("userpassword"),this.multiAccount.accounts=(!1===FNR.cache.getData("usermultiaccounts")?[]:FNR.cache.getData("usermultiaccounts").map(e=>({name:e.name,password:sjcl.decrypt(FNR.cache.getData("userpassword"),e.password)}))).filter(e=>e.name!==_userdata.username).sort((e,n)=>e.name<n.name?-1:e.name>n.name?1:0)},template:'\n <ul :class="isStatusClass">\n <template v-if="!userlog">\n <li class="navbar-item">\n <a href="/register" title="Registrarse en el foro">\n <div class="icon">\n <i class="fas fa-user-plus"></i>\n </div>\n <div class="text">Registrarse</div>\n </a>\n </li>\n <li class="navbar-item">\n <a href="/login" title="Iniciar sesión en el foro">\n <div class="icon">\n <i class="fas fa-sign-in-alt"></i>\n </div>\n <div class="text">Conectarse</div>\n </a>\n </li>\n </template>\n <template v-else>\n <li class="navbar-item is-hidden-desktop" v-for="link in links">\n <a :href="link.url" :title="\'Ir a «\' + link.name + \'»\'">\n <div class="icon">\n <i :class="link.icon"></i>\n </div>\n <div class="text">{{ link.name }}</div>\n </a>\n </li>\n <li class="navbar-item" v-for="item in items">\n <a :href="item.url" :title="\'Ir a «\' + item.name + \'»\'">\n <div class="icon">\n <i :class="item.icon"></i>\n </div>\n <div class="text">{{ item.name }}</div>\n </a>\n </li>\n <li class="navbar-item">\n <a href="/privmsg?folder=inbox" title="Ir a tu mensajería privada">\n <div class="icon">\n <i class="fas fa-envelope"></i>\n </div>\n <div class="text">{{ mpText }}</div>\n </a>\n </li>\n <li class="navbar-item has-dropdown is-dropeable has-bg">\n <a class="navbar-link is-pointer" title="Accionar menú de usuario">\n <div class="icon">\n <i class="fas fa-user"></i>\n </div>\n <div class="text">{{ username | just-name }}</div>\n </a>\n <div class="navbar-dropdown is-right">\n <template v-if="userlevel === 1">\n <a class="navbar-item" href="/admin" target="_blank" title="Ir al «Panel de Administrador»">\n <div class="icon">\n <i class="fas fa-cogs"></i>\n </div>\n <div class="text">Panel Administrador</div>\n </a>\n </template>\n <a class="navbar-item" :href="directions.ucp" target="_blank" title="Ir al «Panel de Usuario»">\n <div class="icon">\n <i class="fas fa-sliders-h"></i>\n </div>\n <div class="text">Panel Usuario</div>\n </a>\n <a class="navbar-item" :href="\'/u\' + userid" :title="\'Ir a tu \' + profileName">\n <div class="icon">\n <i class="far fa-id-card"></i>\n </div>\n <div class="text">{{ profileName | capitalize }}</div>\n </a>\n <a class="navbar-item" href="/search?search_id=egosearch" title="Ir a tus temas personales">\n <div class="icon">\n <i class="fas fa-archive"></i>\n </div>\n <div class="text">Temas personales</div>\n </a>\n <a class="navbar-item" :href="userout" title="Cerrar sesión">\n <div class="icon">\n <i class="fas fa-sign-out-alt"></i>\n </div>\n <div class="text">Cerrar sesión</div>\n </a>\n <template v-if="multiAccount.status">\n <hr/>\n <div class="select-container">\n <select v-model="multiAccount.position" @change="changeAccount()" @click="$event.stopPropagation()">\n <option value="-1" hidden selected>Selec. personaje</option>\n <option v-for="(account, index) in multiAccount.accounts" :value="index">{{ account.name }}</option>\n </select>\n </div>\n </template>\n </div>\n </li>\n </template>\n </ul>\n '}),Vue.component("links-ayuda",{data:()=>({links:forumContent.links}),template:'\n <div class="columns is-multiline is-gapless is-vcentered">\n <a target="_blank" :href="link.url" :title="\'Ir a «\' + link.name + \'»\'" class="column" v-for="link in links">{{ link.name }}</a>\n </div>\n '}),Vue.component("links-anuncios",{data:()=>({announcements:forumContent.announcements}),template:'\n <div id="anmt-main">\n <template v-for="(announcement, index) in announcements">\n <a target="_blank" :href="announcement.url" :title="\'Ir al anuncio «\' + announcement.name + \'»\'" class="anmt-element"><span class="anmt-title">{{ announcement.name }}</span><span class="anmt-date">{{ announcement.date }}</span></a>\n <div class="anmt-sep" v-if="(announcements.length - 1) !== index"></div>\n </template>\n </div>\n '}),Vue.component("links-staff",{data:()=>({staff:forumContent.staff}),template:'\n <div id="admin-main">\n <a target="_blank" :href="admin.url" class="admin-element" :style="\'background-image: url(\' + admin.avatar + \')\'" :title="admin.title" v-for="admin in staff"><span class="admin-name">{{ admin.name }}</span><span class="admin-desc">{{ admin.desc }}</span></a>\n </div>\n '}),Vue.component("sabias-que",{data:()=>({content:forumContent.sq[Math.floor(Math.random()*forumContent.sq.length)]}),created(){setInterval(()=>{this.content=forumContent.sq[Math.floor(Math.random()*forumContent.sq.length)]},12e3)},template:'\n <img id="sq-img" :src="content" alt="¿Sabías que?" />\n '}),Vue.component("busquedas",{data:()=>({content:forumContent.searches[Math.floor(Math.random()*forumContent.searches.length)]}),created(){setInterval(()=>{this.content=forumContent.searches[Math.floor(Math.random()*forumContent.searches.length)]},16e3)},template:'\n <a id="search-img" :href="content.url" target="_blank" :title="content.desc">\n <img :src="content.img" alt="Búsqueda" />\n </a>\n '}),Vue.component("note-info",{template:'\n <div class="admin-block admin-note">\n <div class="admin-icon fas fa-caret-right"></div>\n <div class="admin-content admin-title">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("redirect",{props:["to"],computed:{currentStatus:()=>!!window.location.pathname.match(/t(\d+)-/)},created(){this.currentStatus&&window.location.replace(this.to)},template:'\n <div class="is-content">\n <template v-if="!currentStatus">\n <p>No hay mensaje.</p>\n </template>\n </div>\n '}),Vue.component("quote",{props:["from"],template:'\n <div class="admin-block admin-box user-coolquote">\n <div class="coolquote-quote">\n <div class="fas fa-quote-left"></div>\n <div class="coolquote-content">\n <slot></slot>\n </div>\n <div class="fas fa-quote-right"></div>\n </div>\n <div class="coolquote-from">{{ from }}</div>\n </div>\n '}),Vue.component("wiki-index-items-d",{props:["content"],template:'\n <ul>\n <li v-for="content in content">\n <div class="wiki-controls">\n <router-link :to="content.id" v-if="!content.children.length" :title="\'Ir al artículo de «\' + content.name + \'»\'">{{ content.name }}</router-link>\n <a class="wiki-cascade" :title="\'Desplegar categoría de «\' + content.name + \'»\'" v-else>\n <span class="text">{{ content.name }}</span>\n <span class="icon">\n <i class="fas fa-plus"></i>\n <i class="fas fa-minus"></i>\n </span>\n </a>\n </div>\n <wiki-index-items-d v-if="content.children.length" :content="content.children"></wiki-index-items-d>\n </li>\n </ul>\n '}),Vue.component("wiki-index",{computed:{indexContent(){const e=t=>n.filter(e=>e.component.page_parent===t).map(n=>({id:n.path,name:n.component.page_name,children:e(n.component.page_name)})),n=routes.filter(e=>void 0!==e.component).filter(e=>!e.component.page_skip);return n.filter(e=>void 0===e.component.page_parent).map(n=>({id:n.path,name:n.component.page_name,children:e(n.component.page_name)}))}},template:'\n <aside class="wiki-index is-content profile-sticky">\n <div class="is-hidden-touch">\n <h3>Contenido</h3>\n <wiki-index-items-d :content="indexContent"></wiki-index-items-d>\n </div>\n <div class="select-container is-hidden-desktop">\n <select>\n <option value="-1" hidden selected>Contenido</option>\n <template v-for="content in indexContent">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <option :value="content.id">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >— {{ content.name }}</option>\n </template>\n </select>\n </div>\n </aside>\n '}),Vue.component("wiki-contenido",{props:["mode"],template:'\n <div class="wiki-body has-small-topiclist">\n <wiki-index></wiki-index>\n <template v-if="mode === \'app\'">\n <slot></slot>\n </template>\n <template v-else>\n <section class="wiki-content is-dramatic">\n <slot></slot>\n </section>\n </template>\n </div>\n '}),Vue.component("wiki-nav",{computed:{more:()=>routes.filter(e=>e.component).filter(e=>e.component.page_parent===routes.filter(e=>e.path===router.history.current.path)[0].component.page_parent).length>1,nav(){const e=routes.filter(e=>e.component).filter(e=>e.component.page_parent===routes.filter(e=>e.path===router.history.current.path)[0].component.page_parent),n=e.map(e=>e.path).indexOf(router.history.current.path);return{next:!(n+1>=e.length)&&e[n+1],prev:!(n-1<0)&&e[n-1]}}},template:'\n <div class="wiki-nav" v-if="more">\n <h2>Navegación</h2>\n <template v-if="nav.prev !== false">* <router-link :to="nav.prev.path" :title="\'Ir al artículo «\' + nav.prev.component.page_name + \'»\'">Página anterior: {{ nav.prev.component.page_name }}</router-link></template>\n <br v-if="nav.prev !== false && nav.next !== false"/>\n <template v-if="nav.next !== false">* <router-link :to="nav.next.path" :title="\'Ir al artículo «\' + nav.next.component.page_name + \'»\'">Página siguiente: {{ nav.next.component.page_name }}</router-link></template>\n </div>\n '}),Vue.component("wiki-children",{props:["name","category"],computed:{nav(){return routes.filter(e=>e.component).filter(e=>e.component.page_parent===this.category)}},template:'\n <div class="wiki-nav" v-if="nav.length > 0">\n <h2>{{ name }}</h2>\n <template v-for="route in nav">* <router-link :to="route.path" :title="\'Ir al artículo «\' + route.component.page_name + \'»\'">{{ route.component.page_name }}</router-link><br/></template>\n </div>\n '}),Vue.component("modal-foro",{props:["title"],methods:{modalClose(){this.$parent.state.modal=!1,this.$emit("modal-close")}},template:' \n <div id="forum-modal">\n <div class="modal-element">\n <div class="modal-title">\n <h3>{{ title }}</h3>\n <a @click="modalClose()">\n <i class="fas fa-times"></i>\n </a>\n </div>\n <div class="modal-content">\n <div class="is-content">\n <slot name="content"></slot>\n </div>\n <slot name="controls"></slot>\n </div>\n </div>\n <div class="is-bgmodal bg-active" @click="modalClose()"></div>\n </div>\n '}),Vue.component("controles-modal",{template:' \n <div class="modal-buttons">\n <slot></slot>\n </div>\n '}),Vue.component("expediente-usuario",{data:()=>({info:{name:_userdata.username,level:_userdata.user_level,log:_userdata.session_logged_in},config:forumConfig.profileUser,profile:profile}),computed:{userRank(){return this.profile.fields[forumConfig.profileOptions.profileRank].content},userCite(){return this.profile.fields[forumConfig.profileOptions.profileCite].content},userCover(){return this.profile.fields[forumConfig.profileOptions.profileCover].content},usableMiniFields(){return void 0!==this.config.miniFields&&this.config.miniFields.length?Object.entries(this.profile.fields).filter(e=>this.config.miniFields.indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,content:e[1].content})).sort((e,n)=>this.config.miniFields.indexOf(e.id)>this.config.miniFields.indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,content:e.content})):[]},usableBigFields(){return void 0!==this.config.mainFields&&Object.keys(this.config.mainFields).length?Object.entries(this.profile.fields).filter(e=>Object.keys(this.config.mainFields).indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,subtitle:this.config.mainFields[e[0]],content:" &nbsp;-"===e[1].content?"":e[1].content})).sort((e,n)=>Object.keys(this.config.mainFields).indexOf(e.id)>Object.keys(this.config.mainFields).indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,subtitle:e.subtitle,content:e.content})):[]},lengthBigFields(){let e=0;return this.usableBigFields.map(n=>{void 0!==n.content&&(e+=n.content.length)}),e},usableExtraFields(){return void 0!==this.config.extraFields&&this.config.extraFields.length?Object.entries(this.profile.fields).filter(e=>this.config.extraFields.indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,content:" &nbsp;-"===e[1].content?"":e[1].content})).sort((e,n)=>this.config.extraFields.indexOf(e.id)>this.config.extraFields.indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,content:e.content})):[]},lengthExtraFields(){let e=0;return this.usableExtraFields.map(n=>{void 0!==n.content&&(e+=n.content.length)}),e},usableLinkFields(){return this.profile.contact.length?[]:Object.entries(this.profile.contact).filter(e=>"Mensaje Privado"!==e[1].label).map(e=>({id:FNR.utility.genSlug(e[1].label,"-"),title:e[1].label,url:e[1].content,icon:this.config.contactFields[e[0]],desc:"Ir a "+e[1].label+" de «"+this.profile.name+"»"}))},chronologyField(){return void 0!==this.config.cronoField&&this.config.cronoField.length?FNR.utility.genArray(this.profile.fields[FNR.utility.genSlug(this.config.cronoField,"_")].content):[]},relationshipsField(){return void 0!==this.config.relaField&&this.config.relaField.length?FNR.utility.genArray(this.profile.fields[FNR.utility.genSlug(this.config.relaField,"_")].content):[]},lengthHistoryFields(){let e=0;return e+=this.chronologyField.length,e+=this.relationshipsField.length,e},currentClass(){return"usergroup-"+this.profile.colour}},
1
+ Vue.component("categoria-foro",{props:["id"],computed:{slugName(){const e=this.id.indexOf("<h2>")>-1?FNR.utility.genSlug(this.id.split("<h2>")[1].split("</h2>")[0],"-"):FNR.utility.genSlug(this.id,"-");return"category-"+e}},template:"\n <section :class=\"'category-element ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("cabecera-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head regular-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("cabcategoria-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head category-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("cabespecial-foro",{data(){return{title:void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text}},template:'\n <div class="forum-head special-head">\n <titulo-especial :title="title"></titulo-especial>\n </div>\n '}),Vue.component("subforo-foro",{props:["id"],computed:{slugId(){let e="";return window.location.pathname.match(/f(\d+)-/)?e=window.location.pathname.match(/f(\d+)-/)[1]:window.location.pathname.match(/f(\d+)p(\d+)-/)&&(e=window.location.pathname.match(/f(\d+)p(\d+)-/)[1]),"subforum-"+e},slugName(){const e=this.id.indexOf("<h2>")>-1?FNR.utility.genSlug(this.id.split("<h2>")[1].split("</h2>")[0],"-"):FNR.utility.genSlug(this.id,"-");return"subforum-"+e}},template:"\n <section :class=\"'subforum-element ' + slugId + ' ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("lista-temas-cabecera",{props:["elements"],data(){return{elementos:JSON.parse(this.elements.replace(/'/g,'"'))}},template:'\n <ul class="topiclist-header no-style">\n <li v-for="element in elementos">\n <titulo-especial :title="element"></titulo-especial>\n </li>\n </ul>\n '}),Vue.component("tema-foro",{computed:{slugId(){let e="";return window.location.pathname.match(/t(\d+)-/)?e=window.location.pathname.match(/t(\d+)-/)[1]:window.location.pathname.match(/t(\d+)p(\d+)-/)&&(e=window.location.pathname.match(/t(\d+)p(\d+)-/)[1]),"topic-"+e},slugName(){const e=FNR.utility.genSlug(void 0===this.$slots.title[0].tag?this.$slots.title[0].text:this.$slots.title[0].children[0].text,"-");return"topic-"+e}},template:"\n <section :class=\"'topic-element ' + slugId + ' ' + slugName\">\n \t\t<slot></slot>\n </section>\n "}),Vue.component("mando-foro",{props:["id","app"],template:'\n <section :class="\'forum-controls \' + id">\n <template v-if="app === \'true\'">\n <ul class="left no-style page-buttons">\n <slot name="controls"></slot>\n </ul>\n <div class="right page-pagination">\n <slot name="pagination"></slot>\n </div>\n </template>\n <template v-else>\n <ul class="left no-style page-buttons"></ul>\n <div class="right page-pagination"></div>\n </template>\n </section>\n '}),Vue.component("paginacion-foro",{props:["page","total"],data:()=>({input:"",timeout:null}),computed:{value:{get(){return this.input},set(e){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.input=e,null===e.match(/[a-zA-Z]+/g)&&""!==e.trim()&&(e<1?this.$emit("setPage",1):e>this.total?this.$emit("setPage",this.total):this.$emit("setPage",e)),this.$refs.refInput.blur(),this.input="",this.doScroll()},750)}}},methods:{doScroll(){document.querySelector("body.is-touch")&&window.scroll(0,document.querySelector(".wiki-content").querySelector(".is-content").querySelector("p:last-child").offsetTop-40)}},template:'\n <div class="pagination-manager">\n <div class="page-action" v-if="page > 1">\n <a href="javascript:{}" class="page-prev" title="Ir a la página anterior" @click="$emit(\'setPage\', page - 1); doScroll()">\n <i class="fas fa-chevron-left"></i>\n </a>\n </div>\n <div class="pagination-input" v-if="total > 1">\n <input type="text" :placeholder="page" v-model="value" ref="refInput">de {{ total }}\n </div>\n <div class="page-action" v-if="page < total">\n <a href="javascript:{}" class="page-next" title="Ir a la página anterior" @click="$emit(\'setPage\', page + 1); doScroll()">\n <i class="fas fa-chevron-right"></i>\n </a>\n </div>\n </div>\n '}),Vue.component("titulo-especial",{props:["title"],template:'\n <h3 class="is-tweakeable"><span class="is-measurable" v-html="title"></span></h3>\n '}),Vue.component("cuerpo-widget",{props:["class"],computed:{currentClass(){return void 0===this.class?"plank-inner":"plank-inner "+this.class}},template:'\n <div class="plank-content">\n <div :class="currentClass">\n <slot></slot>\n </div>\t\t\t\t\t\t \n </div>\n '}),Vue.component("separador-foro",{props:["faction"],data:()=>({image:forumDefaults.separator}),template:'\n <section class="forumseparator-element">\n <img :src="image" />\n </section>\n '}),Vue.component("tema-ref",{props:["info"],data:()=>({profileName:forumConfig.profileOptions.profileName||"perfil"}),computed:{userColor(){return"color: "+this.info.lastpost.who.color}},template:'\n <div class="ltopic-element">\n <a class="ltopic-last" :href="info.lastpost.url" target="_blank" :title="\'Ir al último mensaje del tema «\' + info.name + \'»\'">\n <i class="fas fa-link"></i>\n </a>\n <div class="ltopic-data">\n <a class="ltopic-title" :href="info.url" target="_blank" :title="\'Ir al tema «\' + info.name + \'»\'">{{ info.name }}</a>\n <small class="ltopic-info"><a :href="info.lastpost.who.url" target="_blank" :style="userColor" :title="\'Ir al \' + profileName + \' de «\' + info.lastpost.who.name + \'»\'">{{ info.lastpost.who.name | just-name }}</a>, {{ info.lastpost.date }} en <a :href="info.forum.url" target="_blank" :title="\'Ir al subforo «\' + info.forum.name + \'»\'">{{ info.forum.name }}</a></small>\n </div>\n </div>\n '}),Vue.component("campo-foro",{props:["name"],mounted(){const e=this.$el.parentElement.classList;e.add("field-element"),e.add("field-"+FNR.utility.genSlug(this.name,"-"))},template:'\n <div class="forum-field">\n <div class="field-name">{{ name | capitalize }}</div>\n <div class="field-content">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("boton-foro",{props:["url","name","icon","type","input"],computed:{realClass(){return"true"===this.input?"forum-button is-input":"forum-button"},realName(){return"text"+("no-name"===this.type?" is-hidden-touch":"")},realUrl(){return"true"===this.input?"javascript:{}":this.url}},mounted(){const e=this.$el.parentElement.classList;e.add("btn-element"),e.add("btn-"+FNR.utility.genSlug(this.name,"-"))},template:'\n <a :href="realUrl" targer="_blank" :class="realClass" :title="name">\n <span class="icon">\n <i :class="icon"></i>\n </span>\n <span :class="realName">{{ name }}</span>\n <span v-if="input === \'true\'" class="input-real">\n <slot name="input"></slot>\n </span>\n </a>\n '}),Vue.component("cargando-foro",{props:["text"],template:'\n <section id="loading-element">\n <div id="loading-content">\n <i class="fas fa-circle-notch fa-spin"></i>\n <span>{{ text }}</span>\n </div>\n </section>\n '}),Vue.component("aviso-foro",{template:' \n <div class="forum-infoblock">\n <h5>Antes de proceder recuerda:</h5>\n <slot></slot>\n </div>\n '}),Vue.component("afiliaciones-foro",{data:()=>({afis:{}}),created(){FNR.forum.getAffiliates().then(e=>{this.afis=e})},template:'\n <ul v-html="afis.normal" class="no-style"></ul>\n '}),Vue.component("controles-foro",{data:()=>({maPage:0,userName:_userdata.username,userLevel:_userdata.user_level,userId:_userdata.user_id,userLog:_userdata.session_logged_in,userMP:0,userOut:"",isActive:!1}),computed:{isActiveClass(){return"has-bg"+(this.isActive?" visible":" not-visible")}},methods:{turnActive(){this.isActive=!this.isActive}},created(){0!==this.userLog&&(null!==document.getElementById("i_icon_mini_new_message")&&null!==document.getElementById("i_icon_mini_new_message").title.match(/[0-255]/)&&(this.userMP=parseInt(document.getElementById("i_icon_mini_new_message").title.match(/[0-255]/)[0])),this.userOut=document.getElementById("logout").href)},template:'\n <div class="main-body">\n \t\t<nav id="forum-breadcrumb" class="breadcrumb has-succeeds-separator left" aria-label="breadcrumbs">\n \t<ul>\n \t<li>\n \t<a href="/" title="Ir a «Inicio»">Inicio</a>\n \t</li>\n \t</ul>\n \t</nav>\n <nav class="right"> \n <section id="forum-navbar-desktop" class="is-hidden-touch">\n <navbar-foro :username="userName" :userlevel="userLevel" :userid="userId" :userlog="userLog" :usermp="userMP" :userout="userOut" />\n </section>\n <section id="forum-navbar-mobile" class="is-hidden-desktop">\n <div id="hmg-button" @click="turnActive()" class="is-pointer">\n <i class="fas fa-bars"></i>\n </div>\n <div id="hmg-menu" :class="isActiveClass">\n <h3>{{ userName | just-name }}<i class="fas fa-times is-pointer" @click="turnActive()"></i></h3>\n <navbar-foro :username="userName" :userlevel="userLevel" :userid="userId" :userlog="userLog" :usermp="userMP" :userout="userOut" />\n </div>\n <div class="bg-active" @click="turnActive()"></div>\n </section>\n <section v-if="maPage === 1" id="multiaccount-transition">\n <cargando-foro text="Cambiando de cuenta…"></cargando-foro>\n </section>\n </nav>\n </div>\n '}),Vue.component("navbar-foro",{props:["username","userlevel","userid","userlog","usermp","userout"],data:()=>({profileName:forumConfig.profileOptions.profileName||"perfil",items:forumContent.navbar,navigation:forumContent.links,directions:forumConfig.usableDirections,multiAccount:{status:!1,position:-1,accounts:[]}}),computed:{isStatusClass(){return(1===this.userlog?"is-logged":"is-unlogged")+(1===this.userlevel?" is-admin":" is-user")},mpText(){return"Mensajería"+(0!==this.usermp?" ("+this.usermp+")":"")},links(){return this.navigation.filter(e=>void 0!==e.icon)}},methods:{changeAccount(){this.$parent.maPage=1,FNR.user.changeAccount(this.userout,this.multiAccount.accounts[this.multiAccount.position].name,this.multiAccount.accounts[this.multiAccount.position].password).then(e=>{e&&window.location.reload()})}},created(){this.multiAccount.status=!1!==FNR.cache.getData("usermultiaccounts")&&!1!==FNR.cache.getData("userpassword"),this.multiAccount.accounts=(!1===FNR.cache.getData("usermultiaccounts")?[]:FNR.cache.getData("usermultiaccounts").map(e=>({name:e.name,password:sjcl.decrypt(FNR.cache.getData("userpassword"),e.password)}))).filter(e=>e.name!==_userdata.username).sort((e,n)=>e.name<n.name?-1:e.name>n.name?1:0)},template:'\n <ul :class="isStatusClass">\n <template v-if="!userlog">\n <li class="navbar-item">\n <a href="/register" title="Registrarse en el foro">\n <div class="icon">\n <i class="fas fa-user-plus"></i>\n </div>\n <div class="text">Registrarse</div>\n </a>\n </li>\n <li class="navbar-item">\n <a href="/login" title="Iniciar sesión en el foro">\n <div class="icon">\n <i class="fas fa-sign-in-alt"></i>\n </div>\n <div class="text">Conectarse</div>\n </a>\n </li>\n </template>\n <template v-else>\n <li class="navbar-item is-hidden-desktop" v-for="link in links">\n <a :href="link.url" :title="\'Ir a «\' + link.name + \'»\'">\n <div class="icon">\n <i :class="link.icon"></i>\n </div>\n <div class="text">{{ link.name }}</div>\n </a>\n </li>\n <li class="navbar-item" v-for="item in items">\n <a :href="item.url" :title="\'Ir a «\' + item.name + \'»\'">\n <div class="icon">\n <i :class="item.icon"></i>\n </div>\n <div class="text">{{ item.name }}</div>\n </a>\n </li>\n <li class="navbar-item">\n <a href="/privmsg?folder=inbox" title="Ir a tu mensajería privada">\n <div class="icon">\n <i class="fas fa-envelope"></i>\n </div>\n <div class="text">{{ mpText }}</div>\n </a>\n </li>\n <li class="navbar-item has-dropdown is-dropeable has-bg">\n <a class="navbar-link is-pointer" title="Accionar menú de usuario">\n <div class="icon">\n <i class="fas fa-user"></i>\n </div>\n <div class="text">{{ username | just-name }}</div>\n </a>\n <div class="navbar-dropdown is-right">\n <template v-if="userlevel === 1">\n <a class="navbar-item" href="/admin" target="_blank" title="Ir al «Panel de Administrador»">\n <div class="icon">\n <i class="fas fa-cogs"></i>\n </div>\n <div class="text">Panel Administrador</div>\n </a>\n </template>\n <a class="navbar-item" :href="directions.ucp" target="_blank" title="Ir al «Panel de Usuario»">\n <div class="icon">\n <i class="fas fa-sliders-h"></i>\n </div>\n <div class="text">Panel Usuario</div>\n </a>\n <a class="navbar-item" :href="\'/u\' + userid" :title="\'Ir a tu \' + profileName">\n <div class="icon">\n <i class="far fa-id-card"></i>\n </div>\n <div class="text">{{ profileName | capitalize }}</div>\n </a>\n <a class="navbar-item" href="/search?search_id=egosearch" title="Ir a tus temas personales">\n <div class="icon">\n <i class="fas fa-archive"></i>\n </div>\n <div class="text">Temas personales</div>\n </a>\n <a class="navbar-item" :href="userout" title="Cerrar sesión">\n <div class="icon">\n <i class="fas fa-sign-out-alt"></i>\n </div>\n <div class="text">Cerrar sesión</div>\n </a>\n <template v-if="multiAccount.status">\n <hr/>\n <div class="select-container">\n <select v-model="multiAccount.position" @change="changeAccount()" @click="$event.stopPropagation()">\n <option value="-1" hidden selected>Selec. personaje</option>\n <option v-for="(account, index) in multiAccount.accounts" :value="index">{{ account.name }}</option>\n </select>\n </div>\n </template>\n </div>\n </li>\n </template>\n </ul>\n '}),Vue.component("links-ayuda",{data:()=>({links:forumContent.links}),template:'\n <div class="columns is-multiline is-gapless is-vcentered">\n <a target="_blank" :href="link.url" :title="\'Ir a «\' + link.name + \'»\'" class="column" v-for="link in links">{{ link.name }}</a>\n </div>\n '}),Vue.component("links-anuncios",{data:()=>({announcements:forumContent.announcements}),template:'\n <div id="anmt-main">\n <template v-for="(announcement, index) in announcements">\n <a target="_blank" :href="announcement.url" :title="\'Ir al anuncio «\' + announcement.name + \'»\'" class="anmt-element"><span class="anmt-title">{{ announcement.name }}</span><span class="anmt-date">{{ announcement.date }}</span></a>\n <div class="anmt-sep" v-if="(announcements.length - 1) !== index"></div>\n </template>\n </div>\n '}),Vue.component("links-staff",{data:()=>({staff:forumContent.staff}),template:'\n <div id="admin-main">\n <a target="_blank" :href="admin.url" class="admin-element" :style="\'background-image: url(\' + admin.avatar + \')\'" :title="admin.title" v-for="admin in staff"><span class="admin-name">{{ admin.name }}</span><span class="admin-desc">{{ admin.desc }}</span></a>\n </div>\n '}),Vue.component("sabias-que",{data:()=>({content:forumContent.sq[Math.floor(Math.random()*forumContent.sq.length)]}),created(){setInterval(()=>{this.content=forumContent.sq[Math.floor(Math.random()*forumContent.sq.length)]},12e3)},template:'\n <img id="sq-img" :src="content" alt="¿Sabías que?" />\n '}),Vue.component("busquedas",{data:()=>({content:forumContent.searches[Math.floor(Math.random()*forumContent.searches.length)]}),created(){setInterval(()=>{this.content=forumContent.searches[Math.floor(Math.random()*forumContent.searches.length)]},16e3)},template:'\n <a id="search-img" :href="content.url" target="_blank" :title="content.desc">\n <img :src="content.img" alt="Búsqueda" />\n </a>\n '}),Vue.component("note-info",{template:'\n <div class="admin-block admin-note">\n <div class="admin-icon fas fa-caret-right"></div>\n <div class="admin-content admin-title">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("redirect",{props:["to"],computed:{currentStatus:()=>!!window.location.pathname.match(/t(\d+)-/)},created(){this.currentStatus&&window.location.replace(this.to)},template:'\n <div class="is-content">\n <template v-if="!currentStatus">\n <p>No hay mensaje.</p>\n </template>\n </div>\n '}),Vue.component("quote",{props:["from"],template:'\n <div class="admin-block admin-box user-coolquote">\n <div class="coolquote-quote">\n <div class="fas fa-quote-left"></div>\n <div class="coolquote-content">\n <slot></slot>\n </div>\n <div class="fas fa-quote-right"></div>\n </div>\n <div class="coolquote-from">{{ from }}</div>\n </div>\n '}),Vue.component("wiki-index-items-d",{props:["content"],template:'\n <ul>\n <li v-for="content in content">\n <div class="wiki-controls">\n <router-link :to="content.id" v-if="!content.children.length" :title="\'Ir al artículo de «\' + content.name + \'»\'">{{ content.name }}</router-link>\n <a class="wiki-cascade" :title="\'Desplegar categoría de «\' + content.name + \'»\'" v-else>\n <span class="text">{{ content.name }}</span>\n <span class="icon">\n <i class="fas fa-plus"></i>\n <i class="fas fa-minus"></i>\n </span>\n </a>\n </div>\n <wiki-index-items-d v-if="content.children.length" :content="content.children"></wiki-index-items-d>\n </li>\n </ul>\n '}),Vue.component("wiki-index",{computed:{indexContent(){const e=t=>n.filter(e=>e.component.page_parent===t).map(n=>({id:n.path,name:n.component.page_name,children:e(n.component.page_name)})),n=routes.filter(e=>void 0!==e.component).filter(e=>!e.component.page_skip);return n.filter(e=>void 0===e.component.page_parent).map(n=>({id:n.path,name:n.component.page_name,children:e(n.component.page_name)}))}},template:'\n <aside class="wiki-index is-content profile-sticky">\n <div class="is-hidden-touch">\n <h3>Contenido</h3>\n <wiki-index-items-d :content="indexContent"></wiki-index-items-d>\n </div>\n <div class="select-container is-hidden-desktop">\n <select>\n <option value="-1" hidden selected>Contenido</option>\n <template v-for="content in indexContent">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <template v-if="content.children.length">\n <option :value="content.id" disabled >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n <template v-for="content in content.children">\n <option :value="content.id">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >&nbsp&nbsp&nbsp&nbsp— {{ content.name }}</option>\n </template>\n </template>\n <option :value="content.id" v-else >— {{ content.name }}</option>\n </template>\n </select>\n </div>\n </aside>\n '}),Vue.component("wiki-contenido",{props:["mode"],template:'\n <div class="wiki-body has-small-topiclist">\n <wiki-index></wiki-index>\n <template v-if="mode === \'app\'">\n <slot></slot>\n </template>\n <template v-else>\n <section class="wiki-content is-dramatic">\n <slot></slot>\n </section>\n </template>\n </div>\n '}),Vue.component("wiki-nav",{computed:{more:()=>routes.filter(e=>e.component).filter(e=>e.component.page_parent===routes.filter(e=>e.path===router.history.current.path)[0].component.page_parent).length>1,nav(){const e=routes.filter(e=>e.component).filter(e=>e.component.page_parent===routes.filter(e=>e.path===router.history.current.path)[0].component.page_parent),n=e.map(e=>e.path).indexOf(router.history.current.path);return{next:!(n+1>=e.length)&&e[n+1],prev:!(n-1<0)&&e[n-1]}}},template:'\n <div class="wiki-nav" v-if="more">\n <h2>Navegación</h2>\n <template v-if="nav.prev !== false">* <router-link :to="nav.prev.path" :title="\'Ir al artículo «\' + nav.prev.component.page_name + \'»\'">Página anterior: {{ nav.prev.component.page_name }}</router-link></template>\n <br v-if="nav.prev !== false && nav.next !== false"/>\n <template v-if="nav.next !== false">* <router-link :to="nav.next.path" :title="\'Ir al artículo «\' + nav.next.component.page_name + \'»\'">Página siguiente: {{ nav.next.component.page_name }}</router-link></template>\n </div>\n '}),Vue.component("wiki-children",{props:["name","category"],computed:{nav(){return routes.filter(e=>e.component).filter(e=>e.component.page_parent===this.category)}},template:'\n <div class="wiki-nav" v-if="nav.length > 0">\n <h2>{{ name }}</h2>\n <template v-for="route in nav">* <router-link :to="route.path" :title="\'Ir al artículo «\' + route.component.page_name + \'»\'">{{ route.component.page_name }}</router-link><br/></template>\n </div>\n '}),Vue.component("modal-foro",{props:["title"],methods:{modalClose(){this.$parent.state.modal=!1,this.$emit("modal-close")}},template:' \n <div id="forum-modal">\n <div class="modal-element">\n <div class="modal-title">\n <h3>{{ title }}</h3>\n <a @click="modalClose()">\n <i class="fas fa-times"></i>\n </a>\n </div>\n <div class="modal-content">\n <div class="is-content">\n <slot name="content"></slot>\n </div>\n <slot name="controls"></slot>\n </div>\n </div>\n <div class="is-bgmodal bg-active" @click="modalClose()"></div>\n </div>\n '}),Vue.component("controles-modal",{template:' \n <div class="modal-buttons">\n <slot></slot>\n </div>\n '}),Vue.component("expediente-usuario",{data:()=>({info:{name:_userdata.username,level:_userdata.user_level,log:_userdata.session_logged_in},config:forumConfig.profileUser,profile:profile}),computed:{userRank(){return this.profile.fields[forumConfig.profileOptions.profileRank].content},userCite(){return this.profile.fields[forumConfig.profileOptions.profileCite].content},userCover(){return this.profile.fields[forumConfig.profileOptions.profileCover].content},usableMiniFields(){return void 0!==this.config.miniFields&&this.config.miniFields.length?Object.entries(this.profile.fields).filter(e=>this.config.miniFields.indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,content:e[1].content})).sort((e,n)=>this.config.miniFields.indexOf(e.id)>this.config.miniFields.indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,content:e.content})):[]},usableBigFields(){return void 0!==this.config.mainFields&&Object.keys(this.config.mainFields).length?Object.entries(this.profile.fields).filter(e=>Object.keys(this.config.mainFields).indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,subtitle:this.config.mainFields[e[0]],content:" &nbsp;-"===e[1].content?"":e[1].content})).sort((e,n)=>Object.keys(this.config.mainFields).indexOf(e.id)>Object.keys(this.config.mainFields).indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,subtitle:e.subtitle,content:e.content})):[]},lengthBigFields(){let e=0;return this.usableBigFields.map(n=>{void 0!==n.content&&(e+=n.content.length)}),e},usableExtraFields(){return void 0!==this.config.extraFields&&this.config.extraFields.length?Object.entries(this.profile.fields).filter(e=>this.config.extraFields.indexOf(e[0])>-1).map(e=>({id:e[0],title:e[1].label,content:" &nbsp;-"===e[1].content?"":e[1].content})).sort((e,n)=>this.config.extraFields.indexOf(e.id)>this.config.extraFields.indexOf(n.id)?1:-1).map(e=>({id:FNR.utility.genSlug(e.title,"-"),title:e.title,content:e.content})):[]},lengthExtraFields(){let e=0;return this.usableExtraFields.map(n=>{void 0!==n.content&&(e+=n.content.length)}),e},usableLinkFields(){return this.profile.contact.length?[]:Object.entries(this.profile.contact).filter(e=>"Mensaje Privado"!==e[1].label).map(e=>({id:FNR.utility.genSlug(e[1].label,"-"),title:e[1].label,url:e[1].content,icon:this.config.contactFields[e[0]],desc:"Ir a "+e[1].label+" de «"+this.profile.name+"»"}))},chronologyField(){return void 0!==this.config.cronoField&&this.config.cronoField.length?FNR.utility.genArray(this.profile.fields[FNR.utility.genSlug(this.config.cronoField,"_")].content):[]},relationshipsField(){return void 0!==this.config.relaField&&this.config.relaField.length?FNR.utility.genArray(this.profile.fields[FNR.utility.genSlug(this.config.relaField,"_")].content):[]},lengthHistoryFields(){let e=0;return e+=this.chronologyField.length,e+=this.relationshipsField.length,e},currentClass(){return"usergroup-"+this.profile.colour}},
2
2
  template:' \n <section class="profile-element"> \n <cabespecial-foro><template slot="title">Perfil de {{ profile.name }}</template></cabespecial-foro>\n <section :class="currentClass">\n <section id="profile-head">\n <div id="profile-minifields" class="profile-container is-align-items-flex-start wiki-index is-content has-text-left" v-if="lengthBigFields">\n <h3>Contenido</h3>\n <ul>\n <li v-if="lengthBigFields">\n <div class="wiki-controls">\n <a href="#anchor-info">Información</a>\n </div>\n </li>\n <li v-if="lengthExtraFields">\n <div class="wiki-controls">\n <a href="#anchor-extras">Extras</a>\n </div>\n </li>\n <li v-if="lengthHistoryFields">\n <div class="wiki-controls">\n <a href="#anchor-history">Historial</a>\n </div>\n </li>\n </ul>\n </div>\n <ul id="profile-minifields" class="profile-container is-align-items-center wiki-index is-content" v-else>\n <li :id="\'profile-minifield-\' + field.id" v-for="field in usableMiniFields" class="minifield-element">\n <span class="minifield-label">{{ field.title }}</span>\n <span class="minifield-content">{{ field.content }}</span>\n </li>\n </ul>\n <div id="profile-userinfo" :style="\'background-image: url(\' + userCover + \');\'">\n <div id="profile-userdata">\n <div id="profile-rank">{{ userRank }}</div>\n <div id="profile-username">{{ profile.name }}</div>\n </div>\n <div id="profile-usergest" v-if="Object.keys(profile.admin).length">\n <a :href="profile.admin.admin" :title="\'Administrar a «\' + profile.name + \'»\'" target="_blank">Administrar</a> / <a :href="profile.admin.ban" :title="\'Banear a «\' + profile.name + \'»\'" target="_blank">Banear</a>\n </div>\n </div>\n </section>\n <section id="profile-subhead">\n <div class="columns is-centered is-vcentered is-gapless">\n <div class="column is-6 is-full-mobile">\n <div id="profile-quote" class="is-content">\n <quote>{{ userCite }}</quote>\n </div>\n </div>\n <div class="column is-5 is-full-mobile">\n <div id="profile-links" class="columns is-flex is-vcentered is-multiline py-4">\n <div class="column is-full-touch is-half-desktop">\n <ul class="profile-linklist">\n <li>\n <a :href="profile.links.posts" :title="\'Mensajes de «\' + profile.name + \'»\'" target="_blank">\n <i :class="config.contactFields.mensajes"></i> Mensajes\n </a>\n </li>\n <li>\n <a :href="profile.links.topics" :title="\'Temas de «\' + profile.name + \'»\'" target="_blank">\n <i :class="config.contactFields.temas"></i> Temas\n </a>\n </li>\n <li v-if="profile.contact.mensaje_privado !== undefined">\n <a :href="profile.contact.mensaje_privado.content" :title="\'Enviar un mensaje privado a «\' + profile.name + \'»\'" target="_blank">\n <i :class="config.contactFields.mp"></i> Mensaje Privado\n </a>\n </li>\n </ul>\n </div>\n <div class="column is-full-touch is-half-desktop">\n <ul class="profile-linklist">\n <li :id="\'profile-link-\' + field.id" v-for="field in usableLinkFields">\n <a :href="field.url" :title="field.desc" target="_blank">\n <i :class="field.icon"></i> {{ field.title }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </section>\n <section id="profile-fields" class="profile-container is-relative" v-if="lengthBigFields">\n <a id="anchor-info" class="page-anchor"></a>\n <aside id="profile-infominifields" class="wiki-index profile-sticky">\n <h3>Datos básicos</h3>\n <ul class="p-0">\n <li :id="\'profile-minifield-\' + field.id" v-for="field in usableMiniFields" class="minifield-element">\n <span class="minifield-label">{{ field.title }}</span>\n <span class="minifield-content">{{ field.content }}</span>\n </li>\n </ul>\n </aside>\n <ul id="profile-infofields">\n <li :id="\'profile-field-\' + field.id" class="profilefield-element" v-for="field in usableBigFields" v-if="field.content.length">\n <div class="field-head">\n <h4>{{ field.title }}</h4>\n <h6>{{ field.subtitle }}</h6>\n </div>\n <div class="field-content is-content" v-html="field.content"></div>\n </li>\n </ul>\n </section>\n <section id="profile-extras" class="profile-extra is-relative" v-if="lengthExtraFields">\n <a id="anchor-extras" class="page-anchor"></a>\n <div class="profile-extra-header">\n <span>Extras</span>\n </div>\n <ul class="profile-container profile-extra-space">\n <li :id="\'profile-extrafield-\' + field.id" class="extrafield-element" v-for="field in usableExtraFields" v-if="field.content.length">\n <div class="extrafield-head">\n <h4>{{ field.title }}</h4>\n </div>\n <div class="extrafield-content is-content" v-html="field.content"></div>\n </li>\n </ul>\n </section>\n <section id="profile-history" class="profile-extra is-relative" v-if="lengthHistoryFields">\n <a id="anchor-history" class="page-anchor"></a>\n <div class="profile-extra-header">\n <span>Historial</span>\n </div>\n <ul class="profile-container profile-extra-space">\n <li id="profile-extrafield-chronology" class="extrafield-element" v-if="chronologyField.length">\n <div class="extrafield-head">\n <h4>Cronología</h4>\n </div>\n <ul id="chronology-element" class="is-two-columns-list">\n <template v-for="element in chronologyField">\n <elemento-cronologia :element="element" type="profile" />\n </template>\n </ul>\n </li>\n <li id="profile-extrafield-relationships" class="extrafield-element" v-if="relationshipsField.length">\n <div class="extrafield-head">\n <h4>Relaciones</h4>\n </div>\n <ul id="relationships-element" class="is-two-columns-list">\n <template v-for="element in relationshipsField">\n <elemento-relaciones :element="element" type="profile" />\n </template>\n </ul>\n </li>\n </ul>\n </section>\n </section>\n </section>\n '}),Vue.component("cuerpo-principal",{props:["title"],computed:{realTitle(){return void 0!==this.title?this.title:void 0!==this.$attrs["data-title"]?this.$attrs["data-title"]:""}},template:' \n <div class="main-slat">\n <div class="mainslat-title" v-if="realTitle.length">{{ realTitle }}</div>\n <div class="mainslat-content">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("cuerpo-interior",{props:["title"],computed:{realTitle(){return void 0!==this.title?this.title:void 0!==this.$attrs["data-title"]?this.$attrs["data-title"]:""}},template:' \n <div class="slat-interior">\n <div class="slatinterior-title" v-if="realTitle.length">{{ realTitle }}</div>\n <div class="slatinterior-content">\n <slot></slot>\n </div>\n </div>\n '}),Vue.component("cuerpo-lista",{props:["title"],computed:{realTitle(){return void 0!==this.title?this.title:void 0!==this.$attrs["data-title"]?this.$attrs["data-title"]:""}},template:' \n <div class="slat-list">\n <div class="slatlist-title" v-if="realTitle.length">{{ realTitle }}</div>\n <ol class="slatlist-content">\n <slot></slot>\n </ol>\n </div>\n '});
package/general.js CHANGED
@@ -442,7 +442,7 @@ document.addEventListener('DOMContentLoaded', () => {
442
442
  const inputSelector = item.querySelector('.pagination-input input');
443
443
 
444
444
  inputSelector.onkeyup = FNR.behaviour.genDebounce(() => {
445
- if (inputSelector.value.match(/[a-zA-Z]+/g) === null) {
445
+ if (inputSelector.value.match(/[a-zA-Z]+/g) === null && inputSelector.value.trim() !== '') {
446
446
  eval(do_pagination_start.toString().replace('document.go_page.start.value', 'inputSelector.value').split('{')[1].split('}')[0]);
447
447
  }
448
448
  })
package/general.min.js CHANGED
@@ -1 +1 @@
1
- console.log("%cFNR Engine por %cGaylien 🏳️‍🌈","font-family: sans-serif; font-size: 1.5em","font-size: 1.5em; text-transform: uppercase; font-weight: 800; color: #c381b9;"),console.log("https://zatrapa-gaylien.tumblr.com/"),document.addEventListener("DOMContentLoaded",async()=>{const[e,t]=await Promise.all([FNR.user.getLevel(),FNR.user.getGroup()]),o=window.screen.width<=1023?"touch":"desktop";document.body.classList.add(`is-${o}`),document.body.classList.add(`is-${e}`),document.body.classList.add(`is-${t}`),"guest"!==e&&document.body.classList.add(`is-user${_userdata.user_id}`)}),document.addEventListener("DOMContentLoaded",()=>{-1===_userdata.user_id&&document.querySelector(".lastpost-content")?[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t,o,r;e.querySelector(".color-groups")?(t=e.querySelector(".color-groups"),o=t.outerHTML.split(t.innerHTML),r=t.textContent,t.outerHTML='<strong><a href="'+FNR.user.getUrl(r)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+r+'»">'+o[0]+Vue.filter("just-name")(r)+o[1]+"</a></strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=r)):(e.querySelector(".forum-last-author").innerHTML="<strong>Invitado</strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado")),e.querySelector(".forum-last-author").outerHTML=e.querySelector(".forum-last-author > strong").outerHTML}):-1!==_userdata.user_id&&document.querySelector(".lastpost-content")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t="<strong>Invitado</strong>";e.querySelector(".forum-last-author > strong")?(t=e.querySelector(".forum-last-author > strong > a"),t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+"»",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=t.textContent),t.querySelector("span").textContent=Vue.filter("just-name")(t.textContent),t="<strong>"+t.outerHTML+"</strong>",t.textContent=Vue.filter("just-name")(t.textContent)):e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado"),e.querySelector(".forum-last-author").outerHTML=t})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-last-date")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{const t=e.querySelector(".forum-last-date").textContent;e.querySelector(".lastpost-link").title+=", "+t,e.querySelector(".forum-last-date").outerHTML=t,e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-topic)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-topic)"),e=>{[].forEach.call(FNR.content.topic.getType(e.querySelector(".topiclist-topic .to-process .topic-status").textContent),t=>{e.classList.add(t)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-creator")&&[].forEach.call(document.querySelectorAll(".topic-creator"),e=>{e.querySelector("span")?(e.querySelector("a")?(e.querySelector("a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+"»",e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.innerHTML='<strong><a href="'+FNR.user.getUrl(e.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.innerHTML+"</a></strong>",e.querySelector("span").innerHTML=Vue.filter("just-name")(e.textContent)):e.innerHTML="<strong>Invitado</strong>",e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-pagination")&&[].forEach.call(document.querySelectorAll(".topic-pagination"),e=>{e.querySelector("strong")&&e.classList.remove("to-process")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-lastpost)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-lastpost)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .lastpost-author"),o=e.querySelector(".topiclist-topic .to-process .lastpost-link a").href,r=e.querySelector(".topiclist-topic .to-process .lastpost-date").textContent;e.querySelector(".topic-lastpost").href=o,e.querySelector(".topic-lastpost").title="Último mensaje por "+t.textContent.trim()+", "+r,e.querySelector(".topic-lastauthor")&&(t.querySelector("span")?(t.innerHTML='<strong><a href="'+FNR.user.getUrl(t.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+'»">'+t.querySelector("span").outerHTML+"</a></strong>",t.querySelector("strong strong").textContent=Vue.filter("just-name")(t.querySelector("strong strong").textContent),e.querySelector(".topic-lastauthor").outerHTML=t.innerHTML):e.querySelector(".topic-lastauthor").outerHTML="<strong>Invitado</strong>",e.querySelector(".topic-lastauthor").outerHTML=e.querySelector(".topic-lastauthor").innerHTML),e.querySelector(".topic-lastdate")&&(e.querySelector(".topic-lastdate").outerHTML=r)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#moderation")&&document.querySelector("#moderation a")?document.querySelector('a[href="#gestionar"]').href=document.querySelector("#moderation a").href:document.querySelector("#moderation")&&document.querySelector('a[href="#gestionar"]').parentElement.remove()}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".prev-post")){let e=document.querySelector("#forum-preview");""!==document.querySelectorAll(".prev-post")[0].innerHTML&&(e.querySelector(".post-content").innerHTML='<div class="is-content">'+document.querySelectorAll(".prev-post")[0].innerHTML+"</div>",e.classList.remove("to-process"))}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-otherposts")&&document.querySelector(".forum-otherposts").children.length){let e="";[].forEach.call(document.querySelector(".forum-otherposts").querySelectorAll(".post"),t=>{if(document.querySelector(".mp-main")&&document.querySelector("#forum-reply")){let o=t.querySelector(".mp-from").textContent,r=FNR.utility.getGroup("rgb_"+t.querySelector(".mp-from > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_")),n=t.querySelector(".mp-date").textContent,l=t.querySelector(".is-content").innerHTML;e+='<li class="post post-mp">',e+='<section class="postlist-post usergroup-'+r+'">',e+='<ul class="post-datafields post-profile profile-sticky">',e+='<li class="datafield-user">',e+='<div class="datafield-name">Usuario</div>',e+='<strong><a href="'+FNR.user.getUrl(o)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+o+'»">'+o+"</a></strong>",e+="</li>",e+='<li class="datafield-date">',e+='<div class="datafield-name">Fecha</div>',e+=n.indexOf("el")>-1?n.split("el ")[1]:n,e+="</li>",e+="</ul>",e+='<div class="post-content no-links">',e+='<div class="is-content">',e+=l,e+="</div>",e+="</div>",e+="</section>",e+="</li>"}else document.querySelector("#mp-body")||(t.querySelector(".post-datafields .datafield-user a > span")?(t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("rgb_"+t.querySelector(".post-datafields .datafield-user a > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_"))),t.querySelector(".post-datafields .datafield-user a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.querySelector(".post-datafields .datafield-user a").textContent+"»",t.querySelector(".post-datafields .datafield-user a").target="_blank",""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").href=FNR.user.getUrl(t.querySelector(".post-datafields .datafield-user a").textContent))):t.querySelector(".post-datafields .datafield-check")&&t.querySelector(".post-datafields .datafield-check").children&&1===t.querySelector(".post-datafields .datafield-check").children.length?t.querySelector(".post-datafields .datafield-check").remove():t.querySelector(".post-datafields .datafield-user a")&&""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").outerHTML="<strong>"+t.querySelector(".post-datafields .datafield-user a").innerHTML+"</strong>",t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null"))),"UsuarioAnonymous"===t.querySelector(".post-datafields .datafield-user").textContent&&t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null")))}),document.querySelector(".mp-main")&&document.querySelector("#forum-reply")&&(document.querySelector(".forum-otherposts").innerHTML=e)}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-postlist .post:not(.panel)")){const e={responder_citando:{icon:"fas fa-quote-right",title:"Citar"},editar_borrar_este_mensaje:{icon:"fas fa-pencil-alt",title:"Editar"},borrar_este_mensaje:{icon:"fas fa-trash-alt",title:"Borrar"},ver_la_direccion_ip_del_autor:{icon:"fas fa-map-marker-alt",title:"Ver IP"},permalink:{icon:"fas fa-tag",title:"Enlace permanente"}};[].forEach.call(document.querySelectorAll(".forum-postlist .post"),t=>{if(t.children.length>1){let o="";[].forEach.call(t.querySelectorAll(".to-process .post-icons li a"),t=>{const r=e[FNR.utility.genSlug(t.querySelector("img").title)];o+='<li class="post-button-'+FNR.utility.genSlug(r.title,"-")+'">',o+='<a title="'+r.title+'" href="'+t.href+'" class="post-button">',o+='<i class="'+r.icon+'"></i>',forumConfig.nameMinibuttons&&(o+="<span>"+("Enlace permanente"===r.title?"Permalink":r.title)+"</span>"),o+="</a>",o+="</li>"}),t.querySelector(".post-buttons").innerHTML=o}else t.remove()})}}),document.addEventListener("DOMContentLoaded",()=>{null!==document.getElementById("forum-realreply")&&""===document.getElementById("forum-realreply").innerHTML&&document.getElementById("quickreply-section").remove()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector('img[title="Citar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Citar mensaje"]'),e=>{let t=e.parentElement;t.title="Citar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Citar el Mensaje"}),document.querySelector('img[title="Editar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Editar mensaje"]'),e=>{let t=e.parentElement;t.title="Editar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Editar el Mensaje"})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mp-from")&&[].forEach.call(document.querySelectorAll(".mp-from"),e=>{const t=FNR.utility.getGroup(e.querySelector("span").style.color.replace(/, /g,"_").replace(/, /g,"_").replace(/\(/g,"_").replace(/\)/g,""));e.innerHTML='<a href="'+FNR.user.getUrl(e.textContent)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.textContent+"</a>";let o=e.parentElement;for(;!o.classList.contains("mp-main");)o=o.parentElement;o.classList.add("usergroup-"+t)})}),document.addEventListener("DOMContentLoaded",()=>{document.getElementById("breadcrumbs")&&document.getElementById("forum-breadcrumb")&&[].forEach.call(document.getElementById("breadcrumbs").children,(e,t,o)=>{let r=e.href,n=Vue.filter("mini-sanitize")(e.text),l="";r.match(/c(\d+)-/)||t+1===o.length?(r=t+1===o.length?window.location.pathname+window.location.search:"#",l+=' class="is-hidden-touch'+(t+1===o.length?"":" is-active")+'"'):r.indexOf("#profile")>-1&&(r=FNR.user.getUrl(n)),document.querySelector("#forum-breadcrumb ul").innerHTML+="<li"+l+'><a href="'+r+'" title="Ir a «'+n+'»">'+n+"</a></li>"})}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#buttons");e&&e.children.length&&[].forEach.call(document.querySelectorAll(".page-buttons"),t=>{t.insertAdjacentHTML("afterbegin",e.innerHTML),t.parentElement.classList.contains("not-show")&&t.parentElement.classList.remove("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#pagination")&&document.querySelector("#pagination").children.length){const getPageInfo=()=>{const e=Array.from(document.querySelectorAll("#pagination > span > *:not(.pag-img):not(.page-sep)"));return e.length?{currentPage:parseInt(document.querySelector("#pagination > span > strong").textContent),totalPages:parseInt(e[e.length-1].textContent)}:{currentPage:1,totalPages:1}},pageData=getPageInfo(),leftButton=document.querySelector(".pag-img .sprite-arrow_prosilver_left"),rightButton=document.querySelector(".pag-img .sprite-arrow_prosilver_right");leftButton&&(leftButton.parentElement.title="Ir a la página anterior",leftButton.parentElement.classList.add("page-prev"),leftButton.parentElement.classList.remove("pag-img"),leftButton.parentElement.innerHTML='<i class="fas fa-chevron-left"></i>'),rightButton&&(rightButton.parentElement.title="Ir a la página siguiente",rightButton.parentElement.classList.add("page-next"),rightButton.parentElement.classList.remove("pag-img"),rightButton.parentElement.innerHTML='<i class="fas fa-chevron-right"></i>');const nextPage=document.querySelector(".page-next"),prevPage=document.querySelector(".page-prev"),pagination=`\n <div class="pagination-manager">\n ${null===prevPage?"":`<div class="page-action">${prevPage.outerHTML}</div>`}\n <form class="pagination-input" name="go_page">\n <input type="text" placeholder="${pageData.currentPage}" />de ${pageData.totalPages}\n </form>\n ${null===nextPage?"":`<div class="page-action">${nextPage.outerHTML}</div>`}\n </div>\n `;[].forEach.call(document.querySelectorAll(".page-pagination"),item=>{item.insertAdjacentHTML("afterbegin",pagination);const inputSelector=item.querySelector(".pagination-input input");inputSelector.onkeyup=FNR.behaviour.genDebounce(()=>{null===inputSelector.value.match(/[a-zA-Z]+/g)&&eval(do_pagination_start.toString().replace("document.go_page.start.value","inputSelector.value").split("{")[1].split("}")[0])}),item.parentElement.classList.contains("not-show")&&item.parentElement.classList.remove("not-show")})}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{1!==e.classList.length&&e.classList.remove("codebox")}),document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{const t=e.querySelector("code").innerHTML.trim();e.querySelector("dt").innerHTML='Código <em>-</em> <span class="is-pointer">Copiar</span>',e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-code"></i></div>'),e.querySelector("code").remove(),e.insertAdjacentHTML("beforeend","<code>"+t+"</code>")}),document.querySelector(".spoiler")&&[].forEach.call(document.querySelectorAll(".spoiler"),e=>{e.querySelector("dt").innerHTML=e.querySelector("dt").innerHTML.slice(0,-1),e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-archive"></i></div>')}),document.querySelector(".hidecode")&&[].forEach.call(document.querySelectorAll(".hidecode"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-eye-slash"></i></div>')}),document.querySelector("blockquote")&&([].forEach.call(document.querySelectorAll("blockquote cite"),e=>{if(e.innerHTML=e.innerHTML.replace(/escribió:/g,""),e.querySelector("a")){const t=e.querySelector("a");t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.title.replace(/Ver el perfil :: /g,"")+"»"}e=e.innerHTML}),[].forEach.call(document.querySelectorAll("blockquote"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-quote-right"></i></div>')}))}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#is-form")&&document.querySelector(".msg-element")){const e=document.querySelector("#is-form").innerHTML,t={method:document.querySelector(".basic-element form").method,action:document.querySelector(".basic-element form").action,name:document.querySelector(".basic-element form").name};document.querySelector("#message-section").outerHTML='<form method="'+t.method+'" action="'+t.action+'" name="'+t.name+'" id="message-section" class="basic-element">'+document.querySelector("#message-section").innerHTML+"</form>",document.querySelector("#message-section .msg-element").insertAdjacentHTML("afterend",'<div id="usereply-comand">'+e+"</div>"),document.querySelector("#is-form").remove()}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-content .post-content")&&[].forEach.call(document.querySelectorAll(".is-content .post-content"),e=>{e.classList.remove("post-content")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".has-anchor")&&[].forEach.call(document.querySelectorAll(".has-anchor"),e=>{e.insertAdjacentHTML("afterbegin",`<a id="anchor-${e.id}" class="page-anchor"></a>`)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mentiontag")&&[].forEach.call(document.querySelectorAll(".mentiontag"),e=>{e.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.title.replace(/Ver el perfil :: /g,"")+"»"})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".to-process"),e=>{e.remove()})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#forum-rules")&&(document.querySelector("#forum-rules").innerHTML=document.querySelector("#forum-rules").innerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">"))}),document.addEventListener("DOMContentLoaded",()=>{if(forumConfig.skinOptions.allowCustomStyles&&document.querySelector("#forum-content .forum-custom-styles")){let e="";[].forEach.call(document.querySelectorAll("#forum-content .forum-custom-styles"),t=>{e+=t.innerHTML,t.remove()}),document.head.insertAdjacentHTML("beforeend",`<style>${e}</style>`)}}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genControls()}),document.addEventListener("DOMContentLoaded",()=>{document.dispatchEvent(forumReady)}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{e.querySelector("dt span").onclick=(()=>{navigator.clipboard.writeText(e.querySelector("code").innerText),FNR.html.genNotification("¡Copiado!","Recuerda engancharlo en algún lugar.","fas fa-copy")})})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".is-clickbox"),e=>{const t=e.dataset.categorybox,o=e.dataset.categoryid;e.classList.contains("is-toggle")?e.onclick=(()=>{document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active")}):e.onclick=(()=>{document.querySelector('.is-clickbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active"),document.querySelector('.is-selectbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active")})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genWiki()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click:not(.is-radio)")&&[].forEach.call(document.querySelectorAll(".checkbox-click:not(.is-radio)"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click.is-radio")&&[].forEach.call(document.querySelectorAll(".checkbox-click.is-radio"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{[].forEach.call(document.querySelectorAll('input[type="radio"][name="'+o.name+'"]'),e=>{const t=e.parentElement.parentElement.classList;t.contains("is-active")&&t.remove("is-active")}),t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-input")&&[].forEach.call(document.querySelectorAll(".is-input"),e=>{e.onclick=(t=>{e.querySelector('input[type="submit"]').click()})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genDropeable()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-tweakeable")&&document.fonts.ready.then(()=>{[].forEach.call(document.getElementsByClassName("is-tweakeable"),e=>{const t=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).paddingLeft)-parseFloat(window.getComputedStyle(e,null).paddingRight)-parseFloat(window.getComputedStyle(e,null).borderLeftWidth)-parseFloat(window.getComputedStyle(e,null).borderRightWidth);if(t>0&&e.querySelector(".is-measurable").offsetWidth>0){let o=parseFloat(window.getComputedStyle(e,null).fontSize);for(;t<e.querySelector(".is-measurable").offsetWidth;)e.style.fontSize=o+"px",o--}})})}),document.addEventListener("DOMContentLoaded",()=>{document.fonts.ready.then(()=>{document.querySelector("#forum-body > .main-body").classList.remove("is-invisible")})});
1
+ console.log("%cFNR Engine por %cGaylien 🏳️‍🌈","font-family: sans-serif; font-size: 1.5em","font-size: 1.5em; text-transform: uppercase; font-weight: 800; color: #c381b9;"),console.log("https://zatrapa-gaylien.tumblr.com/"),document.addEventListener("DOMContentLoaded",async()=>{const[e,t]=await Promise.all([FNR.user.getLevel(),FNR.user.getGroup()]),o=window.screen.width<=1023?"touch":"desktop";document.body.classList.add(`is-${o}`),document.body.classList.add(`is-${e}`),document.body.classList.add(`is-${t}`),"guest"!==e&&document.body.classList.add(`is-user${_userdata.user_id}`)}),document.addEventListener("DOMContentLoaded",()=>{-1===_userdata.user_id&&document.querySelector(".lastpost-content")?[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t,o,r;e.querySelector(".color-groups")?(t=e.querySelector(".color-groups"),o=t.outerHTML.split(t.innerHTML),r=t.textContent,t.outerHTML='<strong><a href="'+FNR.user.getUrl(r)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+r+'»">'+o[0]+Vue.filter("just-name")(r)+o[1]+"</a></strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=r)):(e.querySelector(".forum-last-author").innerHTML="<strong>Invitado</strong>",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado")),e.querySelector(".forum-last-author").outerHTML=e.querySelector(".forum-last-author > strong").outerHTML}):-1!==_userdata.user_id&&document.querySelector(".lastpost-content")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{let t="<strong>Invitado</strong>";e.querySelector(".forum-last-author > strong")?(t=e.querySelector(".forum-last-author > strong > a"),t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+"»",e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+=t.textContent),t.querySelector("span").textContent=Vue.filter("just-name")(t.textContent),t="<strong>"+t.outerHTML+"</strong>",t.textContent=Vue.filter("just-name")(t.textContent)):e.querySelector(".lastpost-link")&&(e.querySelector(".lastpost-link").title+="Invitado"),e.querySelector(".forum-last-author").outerHTML=t})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".forum-last-date")&&[].forEach.call(document.getElementsByClassName("lastpost-content"),e=>{const t=e.querySelector(".forum-last-date").textContent;e.querySelector(".lastpost-link").title+=", "+t,e.querySelector(".forum-last-date").outerHTML=t,e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-topic)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-topic)"),e=>{[].forEach.call(FNR.content.topic.getType(e.querySelector(".topiclist-topic .to-process .topic-status").textContent),t=>{e.classList.add(t)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-creator")&&[].forEach.call(document.querySelectorAll(".topic-creator"),e=>{e.querySelector("span")?(e.querySelector("a")?(e.querySelector("a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+"»",e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.innerHTML='<strong><a href="'+FNR.user.getUrl(e.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.innerHTML+"</a></strong>",e.querySelector("span").innerHTML=Vue.filter("just-name")(e.textContent)):e.innerHTML="<strong>Invitado</strong>",e.outerHTML=e.innerHTML})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topic-pagination")&&[].forEach.call(document.querySelectorAll(".topic-pagination"),e=>{e.querySelector("strong")&&e.classList.remove("to-process")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".topiclist-topics li:not(.is-not-lastpost)")&&[].forEach.call(document.querySelectorAll(".topiclist-topics li:not(.is-not-lastpost)"),e=>{const t=e.querySelector(".topiclist-topic .to-process .lastpost-author"),o=e.querySelector(".topiclist-topic .to-process .lastpost-link a").href,r=e.querySelector(".topiclist-topic .to-process .lastpost-date").textContent;e.querySelector(".topic-lastpost").href=o,e.querySelector(".topic-lastpost").title="Último mensaje por "+t.textContent.trim()+", "+r,e.querySelector(".topic-lastauthor")&&(t.querySelector("span")?(t.innerHTML='<strong><a href="'+FNR.user.getUrl(t.textContent)+'" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.textContent+'»">'+t.querySelector("span").outerHTML+"</a></strong>",t.querySelector("strong strong").textContent=Vue.filter("just-name")(t.querySelector("strong strong").textContent),e.querySelector(".topic-lastauthor").outerHTML=t.innerHTML):e.querySelector(".topic-lastauthor").outerHTML="<strong>Invitado</strong>",e.querySelector(".topic-lastauthor").outerHTML=e.querySelector(".topic-lastauthor").innerHTML),e.querySelector(".topic-lastdate")&&(e.querySelector(".topic-lastdate").outerHTML=r)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#moderation")&&document.querySelector("#moderation a")?document.querySelector('a[href="#gestionar"]').href=document.querySelector("#moderation a").href:document.querySelector("#moderation")&&document.querySelector('a[href="#gestionar"]').parentElement.remove()}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".prev-post")){let e=document.querySelector("#forum-preview");""!==document.querySelectorAll(".prev-post")[0].innerHTML&&(e.querySelector(".post-content").innerHTML='<div class="is-content">'+document.querySelectorAll(".prev-post")[0].innerHTML+"</div>",e.classList.remove("to-process"))}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-otherposts")&&document.querySelector(".forum-otherposts").children.length){let e="";[].forEach.call(document.querySelector(".forum-otherposts").querySelectorAll(".post"),t=>{if(document.querySelector(".mp-main")&&document.querySelector("#forum-reply")){let o=t.querySelector(".mp-from").textContent,r=FNR.utility.getGroup("rgb_"+t.querySelector(".mp-from > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_")),n=t.querySelector(".mp-date").textContent,l=t.querySelector(".is-content").innerHTML;e+='<li class="post post-mp">',e+='<section class="postlist-post usergroup-'+r+'">',e+='<ul class="post-datafields post-profile profile-sticky">',e+='<li class="datafield-user">',e+='<div class="datafield-name">Usuario</div>',e+='<strong><a href="'+FNR.user.getUrl(o)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+o+'»">'+o+"</a></strong>",e+="</li>",e+='<li class="datafield-date">',e+='<div class="datafield-name">Fecha</div>',e+=n.indexOf("el")>-1?n.split("el ")[1]:n,e+="</li>",e+="</ul>",e+='<div class="post-content no-links">',e+='<div class="is-content">',e+=l,e+="</div>",e+="</div>",e+="</section>",e+="</li>"}else document.querySelector("#mp-body")||(t.querySelector(".post-datafields .datafield-user a > span")?(t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("rgb_"+t.querySelector(".post-datafields .datafield-user a > span").style.color.split("rgb(")[1].split(")")[0].replace(/, /g,"_"))),t.querySelector(".post-datafields .datafield-user a").title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.querySelector(".post-datafields .datafield-user a").textContent+"»",t.querySelector(".post-datafields .datafield-user a").target="_blank",""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").href=FNR.user.getUrl(t.querySelector(".post-datafields .datafield-user a").textContent))):t.querySelector(".post-datafields .datafield-check")&&t.querySelector(".post-datafields .datafield-check").children&&1===t.querySelector(".post-datafields .datafield-check").children.length?t.querySelector(".post-datafields .datafield-check").remove():t.querySelector(".post-datafields .datafield-user a")&&""===t.querySelector(".post-datafields .datafield-user a").href&&(t.querySelector(".post-datafields .datafield-user a").outerHTML="<strong>"+t.querySelector(".post-datafields .datafield-user a").innerHTML+"</strong>",t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null"))),"UsuarioAnonymous"===t.querySelector(".post-datafields .datafield-user").textContent&&t.querySelector(".postlist-post").classList.add("usergroup-"+FNR.utility.getGroup("null")))}),document.querySelector(".mp-main")&&document.querySelector("#forum-reply")&&(document.querySelector(".forum-otherposts").innerHTML=e)}}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector(".forum-postlist .post:not(.panel)")){const e={responder_citando:{icon:"fas fa-quote-right",title:"Citar"},editar_borrar_este_mensaje:{icon:"fas fa-pencil-alt",title:"Editar"},borrar_este_mensaje:{icon:"fas fa-trash-alt",title:"Borrar"},ver_la_direccion_ip_del_autor:{icon:"fas fa-map-marker-alt",title:"Ver IP"},permalink:{icon:"fas fa-tag",title:"Enlace permanente"}};[].forEach.call(document.querySelectorAll(".forum-postlist .post"),t=>{if(t.children.length>1){let o="";[].forEach.call(t.querySelectorAll(".to-process .post-icons li a"),t=>{const r=e[FNR.utility.genSlug(t.querySelector("img").title)];o+='<li class="post-button-'+FNR.utility.genSlug(r.title,"-")+'">',o+='<a title="'+r.title+'" href="'+t.href+'" class="post-button">',o+='<i class="'+r.icon+'"></i>',forumConfig.nameMinibuttons&&(o+="<span>"+("Enlace permanente"===r.title?"Permalink":r.title)+"</span>"),o+="</a>",o+="</li>"}),t.querySelector(".post-buttons").innerHTML=o}else t.remove()})}}),document.addEventListener("DOMContentLoaded",()=>{null!==document.getElementById("forum-realreply")&&""===document.getElementById("forum-realreply").innerHTML&&document.getElementById("quickreply-section").remove()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector('img[title="Citar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Citar mensaje"]'),e=>{let t=e.parentElement;t.title="Citar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Citar el Mensaje"}),document.querySelector('img[title="Editar mensaje"]')&&[].forEach.call(document.querySelectorAll('img[title="Editar mensaje"]'),e=>{let t=e.parentElement;t.title="Editar el Mensaje",t.classList.add("dropdown-item"),t.textContent="Editar el Mensaje"})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mp-from")&&[].forEach.call(document.querySelectorAll(".mp-from"),e=>{const t=FNR.utility.getGroup(e.querySelector("span").style.color.replace(/, /g,"_").replace(/, /g,"_").replace(/\(/g,"_").replace(/\)/g,""));e.innerHTML='<a href="'+FNR.user.getUrl(e.textContent)+'" target="_blank" title="Ir al '+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.textContent+'»">'+e.textContent+"</a>";let o=e.parentElement;for(;!o.classList.contains("mp-main");)o=o.parentElement;o.classList.add("usergroup-"+t)})}),document.addEventListener("DOMContentLoaded",()=>{document.getElementById("breadcrumbs")&&document.getElementById("forum-breadcrumb")&&[].forEach.call(document.getElementById("breadcrumbs").children,(e,t,o)=>{let r=e.href,n=Vue.filter("mini-sanitize")(e.text),l="";r.match(/c(\d+)-/)||t+1===o.length?(r=t+1===o.length?window.location.pathname+window.location.search:"#",l+=' class="is-hidden-touch'+(t+1===o.length?"":" is-active")+'"'):r.indexOf("#profile")>-1&&(r=FNR.user.getUrl(n)),document.querySelector("#forum-breadcrumb ul").innerHTML+="<li"+l+'><a href="'+r+'" title="Ir a «'+n+'»">'+n+"</a></li>"})}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector("#buttons");e&&e.children.length&&[].forEach.call(document.querySelectorAll(".page-buttons"),t=>{t.insertAdjacentHTML("afterbegin",e.innerHTML),t.parentElement.classList.contains("not-show")&&t.parentElement.classList.remove("not-show")})}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#pagination")&&document.querySelector("#pagination").children.length){const getPageInfo=()=>{const e=Array.from(document.querySelectorAll("#pagination > span > *:not(.pag-img):not(.page-sep)"));return e.length?{currentPage:parseInt(document.querySelector("#pagination > span > strong").textContent),totalPages:parseInt(e[e.length-1].textContent)}:{currentPage:1,totalPages:1}},pageData=getPageInfo(),leftButton=document.querySelector(".pag-img .sprite-arrow_prosilver_left"),rightButton=document.querySelector(".pag-img .sprite-arrow_prosilver_right");leftButton&&(leftButton.parentElement.title="Ir a la página anterior",leftButton.parentElement.classList.add("page-prev"),leftButton.parentElement.classList.remove("pag-img"),leftButton.parentElement.innerHTML='<i class="fas fa-chevron-left"></i>'),rightButton&&(rightButton.parentElement.title="Ir a la página siguiente",rightButton.parentElement.classList.add("page-next"),rightButton.parentElement.classList.remove("pag-img"),rightButton.parentElement.innerHTML='<i class="fas fa-chevron-right"></i>');const nextPage=document.querySelector(".page-next"),prevPage=document.querySelector(".page-prev"),pagination=`\n <div class="pagination-manager">\n ${null===prevPage?"":`<div class="page-action">${prevPage.outerHTML}</div>`}\n <form class="pagination-input" name="go_page">\n <input type="text" placeholder="${pageData.currentPage}" />de ${pageData.totalPages}\n </form>\n ${null===nextPage?"":`<div class="page-action">${nextPage.outerHTML}</div>`}\n </div>\n `;[].forEach.call(document.querySelectorAll(".page-pagination"),item=>{item.insertAdjacentHTML("afterbegin",pagination);const inputSelector=item.querySelector(".pagination-input input");inputSelector.onkeyup=FNR.behaviour.genDebounce(()=>{null===inputSelector.value.match(/[a-zA-Z]+/g)&&""!==inputSelector.value.trim()&&eval(do_pagination_start.toString().replace("document.go_page.start.value","inputSelector.value").split("{")[1].split("}")[0])}),item.parentElement.classList.contains("not-show")&&item.parentElement.classList.remove("not-show")})}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{1!==e.classList.length&&e.classList.remove("codebox")}),document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{const t=e.querySelector("code").innerHTML.trim();e.querySelector("dt").innerHTML='Código <em>-</em> <span class="is-pointer">Copiar</span>',e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-code"></i></div>'),e.querySelector("code").remove(),e.insertAdjacentHTML("beforeend","<code>"+t+"</code>")}),document.querySelector(".spoiler")&&[].forEach.call(document.querySelectorAll(".spoiler"),e=>{e.querySelector("dt").innerHTML=e.querySelector("dt").innerHTML.slice(0,-1),e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-archive"></i></div>')}),document.querySelector(".hidecode")&&[].forEach.call(document.querySelectorAll(".hidecode"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-eye-slash"></i></div>')}),document.querySelector("blockquote")&&([].forEach.call(document.querySelectorAll("blockquote cite"),e=>{if(e.innerHTML=e.innerHTML.replace(/escribió:/g,""),e.querySelector("a")){const t=e.querySelector("a");t.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+t.title.replace(/Ver el perfil :: /g,"")+"»"}e=e.innerHTML}),[].forEach.call(document.querySelectorAll("blockquote"),e=>{e.insertAdjacentHTML("afterbegin",'<div class="adminbox-icon"><i class="fas fa-quote-right"></i></div>')}))}),document.addEventListener("DOMContentLoaded",()=>{if(document.querySelector("#is-form")&&document.querySelector(".msg-element")){const e=document.querySelector("#is-form").innerHTML,t={method:document.querySelector(".basic-element form").method,action:document.querySelector(".basic-element form").action,name:document.querySelector(".basic-element form").name};document.querySelector("#message-section").outerHTML='<form method="'+t.method+'" action="'+t.action+'" name="'+t.name+'" id="message-section" class="basic-element">'+document.querySelector("#message-section").innerHTML+"</form>",document.querySelector("#message-section .msg-element").insertAdjacentHTML("afterend",'<div id="usereply-comand">'+e+"</div>"),document.querySelector("#is-form").remove()}}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-content .post-content")&&[].forEach.call(document.querySelectorAll(".is-content .post-content"),e=>{e.classList.remove("post-content")})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".has-anchor")&&[].forEach.call(document.querySelectorAll(".has-anchor"),e=>{e.insertAdjacentHTML("afterbegin",`<a id="anchor-${e.id}" class="page-anchor"></a>`)})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".mentiontag")&&[].forEach.call(document.querySelectorAll(".mentiontag"),e=>{e.title="Ir al "+(void 0===forumConfig.profileOptions.profileName?"perfil":forumConfig.profileOptions.profileName)+" de «"+e.title.replace(/Ver el perfil :: /g,"")+"»"})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".to-process"),e=>{e.remove()})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector("#forum-rules")&&(document.querySelector("#forum-rules").innerHTML=document.querySelector("#forum-rules").innerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">"))}),document.addEventListener("DOMContentLoaded",()=>{if(forumConfig.skinOptions.allowCustomStyles&&document.querySelector("#forum-content .forum-custom-styles")){let e="";[].forEach.call(document.querySelectorAll("#forum-content .forum-custom-styles"),t=>{e+=t.innerHTML,t.remove()}),document.head.insertAdjacentHTML("beforeend",`<style>${e}</style>`)}}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genControls()}),document.addEventListener("DOMContentLoaded",()=>{document.dispatchEvent(forumReady)}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".codebox")&&[].forEach.call(document.querySelectorAll(".codebox"),e=>{e.querySelector("dt span").onclick=(()=>{navigator.clipboard.writeText(e.querySelector("code").innerText),FNR.html.genNotification("¡Copiado!","Recuerda engancharlo en algún lugar.","fas fa-copy")})})}),document.addEventListener("DOMContentLoaded",()=>{[].forEach.call(document.querySelectorAll(".is-clickbox"),e=>{const t=e.dataset.categorybox,o=e.dataset.categoryid;e.classList.contains("is-toggle")?e.onclick=(()=>{document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.toggle("is-active")}):e.onclick=(()=>{document.querySelector('.is-clickbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-clickbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active"),document.querySelector('.is-selectbox.is-active[categorybox="'+t+'"]').classList.remove("is-active"),document.querySelector('.is-selectbox[categorybox="'+t+'"][categoryid="'+o+'"]').classList.add("is-active")})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genWiki()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click:not(.is-radio)")&&[].forEach.call(document.querySelectorAll(".checkbox-click:not(.is-radio)"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".checkbox-click.is-radio")&&[].forEach.call(document.querySelectorAll(".checkbox-click.is-radio"),e=>{const t=e.parentElement.parentElement,o=t.querySelector(".checkbox-real input");o.checked&&t.classList.add("is-active"),e.parentElement.onclick=(()=>{[].forEach.call(document.querySelectorAll('input[type="radio"][name="'+o.name+'"]'),e=>{const t=e.parentElement.parentElement.classList;t.contains("is-active")&&t.remove("is-active")}),t.classList.contains("is-active")?(t.classList.remove("is-active"),o.checked=!1):(t.classList.add("is-active"),o.checked=!0)})})}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-input")&&[].forEach.call(document.querySelectorAll(".is-input"),e=>{e.onclick=(t=>{e.querySelector('input[type="submit"]').click()})})}),document.addEventListener("DOMContentLoaded",()=>{FNR.behaviour.genDropeable()}),document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".is-tweakeable")&&document.fonts.ready.then(()=>{[].forEach.call(document.getElementsByClassName("is-tweakeable"),e=>{const t=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).paddingLeft)-parseFloat(window.getComputedStyle(e,null).paddingRight)-parseFloat(window.getComputedStyle(e,null).borderLeftWidth)-parseFloat(window.getComputedStyle(e,null).borderRightWidth);if(t>0&&e.querySelector(".is-measurable").offsetWidth>0){let o=parseFloat(window.getComputedStyle(e,null).fontSize);for(;t<e.querySelector(".is-measurable").offsetWidth;)e.style.fontSize=o+"px",o--}})})}),document.addEventListener("DOMContentLoaded",()=>{document.fonts.ready.then(()=>{document.querySelector("#forum-body > .main-body").classList.remove("is-invisible")})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generic-skin",
3
- "version": "3.9.115",
3
+ "version": "3.9.117",
4
4
  "description": "Generic Forum Skin for Forumotion created by Gaylien.",
5
5
  "main": "readme.md",
6
6
  "scripts": {