PageSourceSearch

https://domni.pl/Assets/js/277.js?v=c7e8f4fcc2affdf618c3

js domni.pl collected 2026-10-02 10:53:01 UTC 19,558 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdomni=self.webpackChunkdomni||[]).push([[277,2365,3300,7199,9093],{2365:function(e,t,r){function i(e){var t=Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}r.r(t),r.d(t,{default:function(){return i}})},277:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var i=r(4686),o=r(9093),s=r(7199),a=r(2365),n=r(3300);const l="is-active",d="p-form__input--error",h=5242880;class c extends i.default{additionalMethods(){this.panelFormLists=this.wrapper.querySelectorAll('[data-js="panelFormList"]'),this.panelFormLists.forEach(e=>{const t=e.querySelectorAll("li.p-form__input"),r=e.nextElementSibling.querySelector("button");t[0].classList.add("is-visible");let i=e.querySelectorAll(".p-form__input.is-visible");i.length===t.length&&(e.nextElementSibling.style.display="none"),r.addEventListener("click",r=>{const o=r.target,s=o.nextElementSibling;i=e.querySelectorAll(".p-form__input.is-visible");const a=i[i.length-1];if("input"===e.getAttribute("data-type")){let e=!1;if(i.forEach(t=>{const r=t.querySelector("input");if(r.value)r.style.borderColor="";else{if(!e){const e=r.nextElementSibling;e&&e.click()}e=!0,r.style.borderColor="red"}}),e)s.textContent=s.getAttribute("data-error-empty"),s.classList.add(l);else{s.classList.remove(l),t.length===i.length+1&&(o.parentElement.style.display="none");let e=a.nextElementSibling;if(e){e.classList.add("is-visible");const t=e.querySelector("button");t&&t.click()}}}this.preventConfirmationWindow=!0}),t.forEach(t=>{const i=t.querySelector("input");i&&(i.addEventListener("blur",t=>{this.validateDynamicFields(e)}),i.addEventListener("keyup",e=>{i.value&&r.nextElementSibling.classList.remove(l)}))})});this.wrapper.querySelectorAll("[data-js-list-item]").forEach(e=>{e.addEventListener("click",e=>{this.preventConfirmationWindow=!0})}),this.formElements.forEach(e=>{e.addEventListener("keyup",e=>{this.preventConfirmationWindow=!0})}),window.addEventListener("beforeunload",e=>{(this.preventConfirmationWindow||this.profilePhotoChanged)&&(e.preventDefault(),e.returnValue=this.defaultMessages.confirmation)});const e=document.querySelector("[data-file-size-info]");if(e){const t=this.updateParamsInString([(0,a.default)(h)],this.errorMessages("files","sizelimit"));e.textContent=t}this.serverTYP=this.wrapper.querySelector("[data-js=serverTypMessage]"),this.photoList()}validateDynamicFields(e){let t=e.querySelectorAll("li.p-form__input"),r=e.nextElementSibling.querySelector("button").nextElementSibling,i=e.querySelectorAll(".p-form__input.is-visible");i.length===t.length?e.nextElementSibling.style.display="none":e.nextElementSibling.style.display="";let o=!1;return i.forEach((e,t)=>{const r=e.querySelector("input");!r.value&&t<i.length-1?(o=!0,r.style.borderColor="red"):r.style.borderColor=""}),o?(r.textContent=r.getAttribute("data-error-empty"),r.classList.add(l)):r.classList.remove(l),!o}validate(){this.clearServerMessage();let e={},t={},r=new FormData(this.wrapper);try{for(var i of r.entries()){t[i[0]]=i[1]||void 0;let r=i[0];if(/^[a-zA-Z]+\[[0-9]\]\.[a-zA-Z0-9]+$/.test(r)){let e=r.split(".");r=e[0].slice(0,e[0].indexOf("["))+"_"+e[1]}e[this.parseDOMElementName(i[0])]=this.constrains[r]}}catch(r){t=this.wrapper,e=this.constrains}return this.ValidateJS(t,e,{fullMessages:!1})||{}}initValidation(){this.constrains={Name:{presence:{message:this.errorMessages("Name","presence")},format:{pattern:this.textAreaPattern,message:this.errorMessages("Name","description")}},Designer:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Designer","description")}},OtherDesigners_Name:{format:{pattern:this.textAreaPattern,message:this.errorMessages("OtherDesigners","description")}},Images_Author:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Author","description")},length:{maximum:100,tooLong:this.errorMessages("Author","tolong")}},Customer:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Customer","description")}},Localization:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Localization","description")}},Area:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Area","description")}},Description:{format:{pattern:this.textAreaPattern,message:this.errorMessages("Description","description")}}}}showErrors(e){let t=!1;this.formElements=this.wrapper.querySelectorAll("input, textarea, select"),this.formElements.forEac
1h(r=>{if("hidden"!==r.type){let i=e&&e[this.parseDOMElementName(r.name)];this.showErrorsForElement(r,i),i&&!t&&(t=!0,r.nextElementSibling.click())}})}showErrorsForElement(e,t){if(this.resetFormElement(e),t){let r=e.nextElementSibling.nextElementSibling;r&&(t.forEach(e=>{r.textContent+=`${e} `}),r.classList.add(l)),e.style.borderColor="red",e.parentNode.classList.add(d)}else e.parentNode.classList.remove(d)}successManage(e){e.ReturnUrl?window.location.assign(e.ReturnUrl):(this.serverTYP&&(this.serverTYP.innerHTML=e.Message||this.defaultMessages.typ),setTimeout(()=>{window.scrollTo(0,0),window.location.reload()},1500))}resetFormElement(e){e.style.borderColor="";let t=e.nextElementSibling.nextElementSibling;t&&(t.classList.remove(l),t.innerHTML="")}resolveSubmitErrors(e){let t=Object.keys(e).length,r=!1;this.panelFormLists.forEach(e=>{this.validateDynamicFields(e)||(0!==t||r||e.scrollIntoView({block:"center"}),r=!0)}),0!==t||r||(this.preventConfirmationWindow=!1,this.send())}isSelectSelected(e){if(e){const t=e.querySelector("input[type=hidden]");if(t&&t.value&&"undefined"!==t.value)return!0}return!1}photoList(){if(this.photoList=this.wrapper.querySelector("[data-js=photoList]"),this.photoList){if(this.getPhotoList(),this.photoListItem=this.photoList.nextElementSibling,this.photoContainer=this.wrapper.querySelector("[data-js=fileUploadsContainer]"),this.uploadFileInput=document.querySelector("#file"),this.uploadFileInput){if(this.uploadFileInput.hasAttribute("accept")){let e=this.uploadFileInput.getAttribute("accept").replace(/\s/g,"");this.fileTypes=e.split(",")}this.uploadFileInput.onchange=()=>{this.uploadFilesIntoForm(this.uploadFileInput.files)};let e=this.uploadFileInput.parentNode.parentNode;e.addEventListener("dragover",this.dragover.bind(this)),e.addEventListener("dragleave",this.dragleave.bind(this)),e.addEventListener("drop",this.drop.bind(this))}this.photoList.addEventListener("click",e=>{const t=e.target.getAttribute("data-js");if(t&&"delete"===t){let t=e.target.parentNode.parentNode.parentNode;if(t.hasAttribute("data-index")){let e=!1;this.photoStore.items.map((r,i)=>{r.index===parseInt(t.getAttribute("data-index"))&&r.file&&!e&&(e=!0,t.remove(),this.updateIndexAfterDelete(i))})}else t.hasAttribute("data-id")&&this.photoStore.items.map(e=>{if(e.id===t.getAttribute("data-id")){this.photoList.querySelector("[name='"+this.photoStore.name+"["+e.index+"].Delete']").value="True",t.style.display="none"}})}}),this.addNewBoardBtn=document.querySelector('[data-js="addNewBoardBtn"]'),this.addNewBoardBtn&&this.photoStore.items.length>1&&(window.innerWidth>1200&&(this.addNewBoardBtn.style.display=""),this.addNewBoard=document.querySelector('[data-js="addNewBoard"]'),this.addNewBoard&&(this.addNewBoardBtn.addEventListener("click",()=>{this.addNewBoardBtn.hasAttribute("data-disable-pe")&&document.documentElement.classList.add("overfl"),this.addNewBoard.firstElementChild?this.addNewBoard.firstElementChild.style.display="block":this.addNewBoard.style.display="block",n.default.open(this.addNewBoard)}),this.addNewBoardSave=this.addNewBoard.querySelector('[data-js="addNewBoardSave"]'),this.addNewBoardCancel=this.addNewBoard.querySelector('[data-js="addNewBoardCancel"]'),this.addNewBoardSave&&this.addNewBoardSave.addEventListener("click",()=>{document.documentElement.classList.remove("overfl"),this.addNewBoard.firstElementChild?this.addNewBoard.firstElementChild.style.display="none":this.addNewBoard.style.display="none",n.default.close(),this.updateIndexAfterChange(n.default.items())}),this.addNewBoardCancel&&this.addNewBoardCancel.addEventListener("click",()=>{document.documentElement.classList.remove("overfl"),this.addNewBoard.firstElementChild?this.addNewBoard.firstElementChild.style.display="none":this.addNewBoard.style.display="none",n.default.close(!0)})))}}getPhotoList(){if(this.photoStore={lastIndex:-1,lastOrder:-1,name:"Images",items:[]},"undefined"!=typeof projectPhotoStore&&projectPhotoStore.length){let e=JSON.parse(projectPhotoStore);e=e.map(e=>(parseInt(e.index)>this.photoStore.lastIndex&&(this.photoStore.lastIndex=parseInt(e.index)),parseInt(e.order)>this.photoStore.lastOrder&&(this.photoStore.lastOrder=parseInt(e.order)),e.ref=this.photoList.querySelector('[data-id="'+e.id+'"]'),e)),this.photoStore.items=e}}dragover(e){e.preventDefault(),e.currentTarget.style.borderColor="#b31764"}dragleave(e){e.currentTarget.style.borderColor=""}drop(e){e.preventDefault(),this.dragleave(e),this.addPhotoLoader(),this.uploadFilesIntoForm(e.dataTransfer.files),this.removePhotoLoader()}uploadFilesIntoForm(e){if(e.length){for(let t=0;t<e.length;t++)this.validatePhoto(e[t])&&this.addPhotoToList(e[t]);this.uploadFileInput.value=""}}validatePhoto(e){let t=!0,r="",i=this.uploadFileInput.parentNode.querySelector("[data-error]");if(e.size>h&&(t=!1,r+=this.updateParamsInString([(0,a.default)(h)],this.errorMessages("files","sizelimit"))),-1==this.fileTypes.indexOf(e.type)){t=!1,r&&(r+=". ");let e=this.fileTypes.join(", ").replace(/image\//g,"");r+=this.updateParamsInString([e],this.errorMessages("files","filenotallowed"))}return!t&&i&&(i.textContent=r,i.classList.add(l)),t}addPhotoToList(e){this.preventConfirmationWindow=!0,this.photoStore.lastIndex++,this.photoStore.lastOrder++;let t=this.photoListItem.children[0].cloneNode(!0),r={index:this.photoStore.lastIndex,order:this.photoStore.lastOrder,file:e,type:1,source:2,name:this.photoStore.name+"["+this.photoStore.lastIndex+"]"};t.setAttribute("data-index",this.photoStore.lastIndex),r.ref=t,this.photoStore.items.push(r);let i=t.querySelector("img");i.src=URL.createObjectURL(e);let a=t.querySelector("[data-js=photoAuthor]"),n=t.querySelector("[data-js=photoCategory]"),l=t.querySelector("[data-js=photoAuthorLabel]"),d=t.querySelector("[data-js=photoCategoryLabel]"),h=r.name.replace(/[\[\]\.]/g,"_");a.setAttribute("name",r.name+".Author"),a.setAttribute("id",h+"_Author"),l.setAttribute("for",h+"_Author"),a.addEventListener("blur",this.fieldEventsManage.bind(this)),a.addEventListener("input",this.fieldEventsManage.bind(this)),n.setAttribute("name",r.name+".CategoryId"),n.setAttribute("id",h+"_CategoryId"),d.setAttribute("for",h+"_CategoryId"),this.photoList.appendChild(t),o.default.render(t),s.default.init();const c=document.querySelector('[data-js="photoOrderList"]');if(c){let e=document.createElement("li"),t=i.cloneNode(!0);e.className="m-photos-order__imgs--item",e.setAttribute("draggable","true"),e.setAttribute("data-index",this.photoStore.lastIndex),e.appendChild(t),c.appendChild(e)}}fieldEventsManage(e){e.target.value=e.target.value.trim(),this.errorFlags[e.target.name]=!0,this.labelPosition(e.target);let t=this.validate();this.showErrorsForElement(e.target,t&&t[this.parseDOMElementName(e.target.name)])}updateIndexAfterChange(e){this.photoStore.items=this.photoStore.items.map((t,r)=>{t.order=e.indexOf(t.id||t.index.toString());let i=t.ref.querySelector("input[name$=Order]");return i&&(i.value=t.order),t}),this.photoStore.items.sort((e,t)=>
1e.order-t.order),this.photoStore.items.map(e=>{this.photoList.appendChild(e.ref)})}updateIndexAfterDelete(e){let t=this.photoStore.items[e];if(t.index<this.photoStore.lastIndex){let e=this.photoStore.items.filter(e=>e.index===this.photoStore.lastIndex)[0];e.index=t.index,e.ref.setAttribute("data-index",e.index);let r=e.ref.querySelector("[data-js=photoAuthor]"),i=e.ref.querySelector("[data-js=photoCategory]"),o=e.ref.querySelector("[data-js=photoAuthorLabel]"),s=e.ref.querySelector("[data-js=photoCategoryLabel]"),a=this.photoStore.name+"["+e.index+"]",n=a.replace(/[\[\]\.]/g,"_");r.setAttribute("name",a+".Author"),r.setAttribute("id",n+"Author"),o.setAttribute("for",n+"Author"),i.setAttribute("name",a+".CategoryId"),i.setAttribute("id",n+"CategoryId"),s.setAttribute("for",n+"CategoryId")}this.photoStore.items.splice(e,1),this.photoStore.lastIndex--}showLoader(e){this.submitBtns.forEach(e=>{e.disabled=!0,e.classList.add("loading")}),this.addPhotoLoader()}hideLoader(){this.submitBtns.forEach(e=>{e.disabled=!1,e.classList.remove("loading")}),this.removePhotoLoader()}addPhotoLoader(){this.photoContainer&&this.photoContainer.classList.add("loading-active")}removePhotoLoader(){this.photoContainer&&this.photoContainer.classList.remove("loading-active")}}},9093:function(e,t,r){r.r(t);const i={init:function(){a(document)},render:a},o="data-readonly",s="readonly";function a(e){if(e){let t=e.querySelectorAll('[data-js="panelFormInput"]');for(let e of t){let t=e.querySelector(`[${s}]`);t?(t.removeAttribute(s),t.setAttribute(o,"")):t=e.querySelector(`[${o}]`),t&&t.addEventListener("focus",e=>{e.target.removeAttribute(o)}),e.querySelector("button").onclick=function(){this.previousElementSibling.focus()}}}}t.default=i},7199:function(e,t,r){r.r(t);var i=r(4685);const o={init:function(){var e,t=document.querySelectorAll('[data-js="panelMenuBtn"]'),r=document.querySelectorAll('[data-js="menuListItem"]'),o=document.querySelectorAll('[data-js="menuItemInnerNav"]'),a=document.querySelectorAll(".pf-select"),n=document.querySelectorAll(".pf-select--icon"),m=document.querySelectorAll(".pf-select__list");for(e=0;e<t.length;e++)t[e].onclick=function(){var e,t=this.parentElement,i=this.nextElementSibling;for(e=0;e<r.length;e++)r[e].classList.remove("is-active"),o[e]&&(o[e].style.maxHeight=null);t.classList.contains("pa-menu__item")?(t.classList.add("is-active"),i.style.maxHeight=i.scrollHeight+40+"px"):(t.classList.remove("is-active"),i.style.maxHeight=null)};for(let e=0;e<a.length;e++)n[e].onclick=function(){d(n[e])},n[e].previousElementSibling.onclick=function(){n[e].focus(),n[e].click()},n[e].onblur=function(){a[e].classList.contains("is-open")&&setTimeout(()=>{a[e].classList.remove("is-open"),m[e].style.maxHeight=null},300)},u(a[e].parentNode,a[e].querySelector("input[type=hidden]").value,"");var f=document.querySelectorAll("[data-js-list-item]");for(let e=0;e<f.length;e++)f[e].addEventListener("click",function(){var e=this.parentElement.parentElement.previousElementSibling.querySelector(".pf-select__btn"),t=this.parentElement.parentElement.parentElement.parentElement,r=this.parentElement.parentElement.parentElement.previousElementSibling,i=this.parentElement,o=this.getAttribute("data-id");e.innerText=this.innerText,t.classList.remove("is-open"),l(t),i.style.maxHeight=null;const s=r.value;u(t.parentNode,o,s),r.setAttribute("value",o),p(t.parentNode.parentNode.parentNode)});var g=document.querySelector("[data-js-active-panel]").nextElementSibling,y=document.querySelector('[data-js="copyLink"]'),v=document.querySelector('[data-js="copyLinkBtn"]'),S=document.querySelector('[data-js="copyLinkBtnClose"]');g&&(g.style.maxHeight=g.scrollHeight+40+"px");v&&v.addEventListener("click",e=>{e.preventDefault();const t=v.querySelector("a");if(t&&t.hasAttribute("href")){const e=document.createElement("input");e.type="text",e.value=t.getAttribute("href"),e.style.position="absolute",e.style.opcity=.1,v.appendChild(e),e.select(),document.execCommand("copy"),v.removeChild(e),y&&(y.firstElementChild?y.firstElementChild.style.display="block":y.style.display="block")}});
1S&&(S.onclick=()=>{y.firstElementChild?y.firstElementChild.style.display="none":y.style.display="none"});var b=document.querySelectorAll('[data-js="menuItemInnerNav"]');for(e=0;e<b.length;e++){var E,x=b[e].querySelectorAll('[data-js="itemSubcount"]'),L=b[e].nextElementSibling,A=0;for(E=0;E<x.length;E++){var q=0;A+=q+=parseInt(x[E].textContent)}L&&(L.textContent=A)}s.textareaField=document.querySelectorAll('[data-js="textareaField"]'),s.textareaField.length&&(s.textareaField.forEach(e=>{e.addEventListener("keyup",function(){h(this)})}),(0,i.registerScroll)(c),c())}},s={},a="is-active",n="p-form__input--error";function l(e){e.style.borderColor="",e.parentNode.classList.remove(n);let t=e.nextElementSibling.nextElementSibling;t&&(t.classList.remove(a),t.innerHTML="")}function d(e){var t,r=document.querySelectorAll(".pf-select"),i=document.querySelectorAll(".pf-select--icon"),o=document.querySelectorAll(".pf-select__list"),s=e.previousElementSibling.getAttribute("class"),a=e.previousElementSibling.querySelector(".pf-select__list"),n=e.previousElementSibling;for(t=0;t<i.length;t++)r[t].classList.remove("is-open"),o[t].style.maxHeight=null;"p-form__select pf-select"===s?(n.classList.add("is-open"),a.style.maxHeight=a.scrollHeight+40+"px"):(n.classList.remove("is-open"),a.style.maxHeight=null)}function h(e){if(e){e.style.height="1px",e.style.height=e.scrollHeight+"px",function(){for(var e=document.querySelectorAll('[data-js="textareaBox"]'),t=0;t<e.length;t++){var r=e[t].querySelector('[data-js="textareaField"]').getAttribute("style");e[t].setAttribute("style",r)}}();const t=e.previousElementSibling;if(t){const r=t.getAttribute("data-char-limit");let i=(e.value.match(/\n/g)||"").length,o=e.value.length+3*i;if(o>r){let o=e.value.substring(0,r-3*i);e.value=o,t.textContent=r+"/"+r,h(e)}else t.textContent=o+"/"+r}}}function c(){for(var e=0;e<s.textareaField.length;e++)h(s.textareaField[e])}function u(e,t,r){if(t!==r){if(t){[].filter.call(e.parentNode.children,t=>t!==e).forEach(e=>{const r=e.querySelector('[data-js-list-item][data-id="'+t+'"]');r&&r.classList.add("pf-select__option--disabled")})}if(r){const t=e.parentNode.children;for(let e=0;e<t.length;e++){const i=t[e].querySelector('[data-js-list-item][data-id="'+r+'"]');i&&i.classList.contains("pf-select__option--disabled")&&i.classList.remove("pf-select__option--disabled")}}}}function p(e){const t=e.querySelector('[data-js="panelFormAdd"]');if(t){const e=t.querySelector(".p-form--error");e&&(e.classList.add(a),e.textContent="")}}t.default=o},3300:function(e,t,r){r.r(t);const i={open:function(e){o||(s=e.querySelector("[data-js=photoOrderList]"),s&&(o=s.parentNode));o&&(o.addEventListener("dragstart",l),o.addEventListener("dragover",d),o.addEventListener("dragleave",h),o.addEventListener("drop",c),a=s.querySelectorAll("li"))},close:function(e){o&&(o.removeEventListener("dragstart",l),o.removeEventListener("dragover",d),o.removeEventListener("dragleave",h),o.removeEventListener("drop",c),e&&a.length&&(s.innerHTML="",a.forEach(e=>{s.appendChild(e)})))},items:function(){let e=[];return s.querySelectorAll("li").forEach(t=>{let r=t.getAttribute("data-id"),i=t.getAttribute("data-index");r?e.push(r):e.push(i)}),e}};t.default=i;let o,s,a,n=null;function l(e){n=e.target,e.dataTransfer.setData("text/html",n)}function d(e){e.preventDefault();const t=e.target.getBoundingClientRect(),r=t.y+t.height/2;e.target.hasAttribute("data-id")&&(e.clientY-r>0?(e.target.style["border-bottom"]="solid 2px #b31764",e.target.style["border-top"]=""):(e.target.style["border-top"]="solid 2px #b31764",e.target.style["border-bottom"]=""))}function h(e){e.target.style["border-bottom"]="",e.target.style["border-top"]=""}function c(e){e.preventDefault(),e.target.hasAttribute("data-id")&&(""!==e.target.style["border-bottom"]?(e.target.style["border-bottom"]="",e.target.parentNode.insertBefore(n,e.target.nextSibling)):(e.target.style["border-top"]="",e.target.parentNode.insertBefore(n,e.target)))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.