1SaScriptManager.registerModule('modal',{init:function(self){SaScriptManager.initElement('js-modal',function($this){$this.click(function(e){e.preventDefault();if($this.data('modal-html-selector')){let modalParameters={title:$this.data('modal-title'),width:$this.data('modal-width'),height:$this.data('modal-height'),html:$($this.data('modal-html-selector')).html(),};self.openModalWithHtml(modalParameters)}else{self.openModal($(this),$('html'))}})})},openModal($openButton,$modalTargetHtml,buttonLoadingClass,reloadEditor){let module=SaScriptManager.getModule('modal');if(!$modalTargetHtml){$modalTargetHtml=$('html')} 2if(!buttonLoadingClass){buttonLoadingClass='c-button--loading'} 3let $modalTargetBody=$modalTargetHtml.find('body');$openButton.addClass(buttonLoadingClass);if(module.loader){module.loader(!0)} 4let modalTitle;let dataTitle=$openButton.attr('data-modal-title');let attrTitle=$openButton.attr('title');let modalWidth=$openButton.attr('data-modal-width');let modalHeight=$openButton.attr('data-modal-height');let addHref=$openButton.attr('data-modal-href-params') 5let href=$openButton.attr('href');if(addHref){href+=(href.includes('?')?'&':'?')+addHref}else{href+=(href.includes('?')?'&':'?')+'isSAModal=1'} 6if(dataTitle){modalTitle=dataTitle}else{modalTitle=attrTitle} 7let iconResizeFull='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M200 32L56 32C42.7 32 32 42.7 32 56l0 144c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l40-40 79 79-79 79L73 295c-6.9-6.9-17.2-8.9-26.2-5.2S32 302.3 32 312l0 144c0 13.3 10.7 24 24 24l144 0c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2l-40-40 79-79 79 79-40 40c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l144 0c13.3 0 24-10.7 24-24l0-144c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2l-40 40-79-79 79-79 40 40c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2l0-144c0-13.3-10.7-24-24-24L312 32c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l40 40-79 79-79-79 40-40c6.9-6.9 8.9-17.2 5.2-26.2S209.7 32 200 32z"/></svg>';let iconResizeSmall='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --><path d="M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"/></svg>';let $modal=$('<div class="universal-form-modal">\n'+' <div class="universal-form-modal-inner">\n'+' <div class="universal-form-modal-header">\n'+' <div class="universal-form-modal-title"></div>\n'+' <div class="universal-form-modal-controls">\n'+' <button type="button" class="universal-form-modal-resize-full" style="display: none">\n'+' '+iconResizeFull+'\n'+' </button>\n'+' <button type="button" class="universal-form-modal-reload" style="display: none">\n'+' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160 352 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l111.5 0c0 0 0 0 0 0l.4 0c17.7 0 32-14.3 32-32l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1L16 432c0 17.7 14.3 32 32 32s32-14.3 32-32l0-35.1 17.6 17.5c0 0 0 0 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.8c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-
77.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352l34.4 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L48.4 288c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z"/></svg>\n'+' </button>\n'+' <button type="button" class="universal-form-modal-close">\n'+' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>\n'+' </button>\n'+' </div>\n'+' </div>\n'+' <div class="universal-form-modal-body">\n'+' <div class="universal-form-modal-body-inner">\n'+' </div>\n'+' </div>\n'+' </div>\n'+' </div>');let $modalInner=$modal.find('.universal-form-modal-inner');let $modalTitle=$modal.find('.universal-form-modal-title');let $modalBody=$modal.find('.universal-form-modal-body');let $modalBodyInner=$modal.find('.universal-form-modal-body-inner');let $modalResizeFull=$modal.find('.universal-form-modal-resize-full');let $modalReload=$modal.find('.universal-form-modal-reload');let $modalClose=$modal.find('.universal-form-modal-close');let $modalFooter=$modal.find('.universal-form-modal-footer');$modal.css('opacity',0).removeClass('hidden');$modalTargetBody.append($modal);let $modalIframe=$('<iframe />').attr('src',href).css('height',200);$modalBodyInner.append($modalIframe);let iframeResizeInterval;let $modalIframeBody;let $modalIframeHtml;let $modalIframeContents;let $modalIframeSrc;let isModalOpen=!1;$modalIframe.on('load',function(){clearInterval(iframeResizeInterval);$modalIframeContents=$modalIframe.contents();$modalIframeBody=$modalIframeContents.find('body');$modalIframeHtml=$modalIframeContents.find('html');$modalIframeContents[0].addEventListener('beforeunload',function(e){if(module.loader){module.loader(!0)}});let iframeHtml=$modalIframeBody.text();if(iframeHtml.startsWith('http')){closeModal();$modalIframe.remove();reloadEditor(iframeHtml);return}else{setupModalButtons()} 8let modalPageConfig=$modalIframeBody.find('*[data-modal-page-config]').data('modal-page-config');if(modalPageConfig){if(modalPageConfig.title){modalTitle=modalPageConfig.title} 9if(modalPageConfig.width){modalWidth=modalPageConfig.width} 10if(modalPageConfig.height){modalHeight=modalPageConfig.height} 11if(modalPageConfig.spec){if(modalPageConfig.spec.css){$.each(modalPageConfig.spec.css,function(key,value){$modalInner.css(key,value)});$.each(modalPageConfig.spec.classes,function(key,value){$modalInner.addClass(value)});$.each(modalPageConfig.spec.attrs,function(key,value){$modalInner.setAttr(key,value)})}} 12if(modalPageConfig.ajaxify){$.each(modalPageConfig.ajaxify,function(url,refresh){let ajaxLinkConfig={'history':!1,'refresh':refresh};if(url==='this'){url=window.location.href} 13$.ajaxLink(url,ajaxLinkConfig,$('body'),'GET')})} 14if(modalPageConfig.runScript){$.each(modalPageConfig.runScript,function(key,value){let fn=Function(value);fn.call()})} 15if(modalPageConfig.reloadDataGrid){$.each(modalPageConfig.reloadDataGrid,function(key,value){if(value==='all'){for(let id in $saDatagridManager.getDataGrids()){$saDatagridManager.getDataGrid(id).reloadData()}}else{let $datagrid=$saDatagridManager.getDataGrid(value);if($datagrid){$datagrid.reloadData()}}})} 16if(modalPageConfig.say){$.each(modalPageConfig.say,function(key,value){say(value.message,value.error)})} 17if(modalPageConfig.close===!0){closeModal();if(modalPageConfig.redirect){window.location.href=modalPageConfig.redirect} 18if(modalPageConfig.reloadParent){window.location.reload()} 19return}} 20$modalIframeSrc=$modalIframe.prop('src');if(!modalWidth){modalWidth='1200px'} 21$modalTitle.html(modalTitle);$modalInner.css('width',modalWidth);$modalBody.css('overflow','hidden');$modalBodyInner.css('overflow','hidden');if(modalHeight){$modalIframe.css('height','100%');$modalBody.css('height','100%');$modalBodyInner.css('height','100%');$modalInner.css('height',modalHeight);$modalIframeHtml.css('scrollbar-width','thin');$modalIframeBody.css('scrollbar-width','thin')}else{$modalIframe.css('height',0);resizeIframe();iframeResizeInterval=setInterval(resizeIframe,500)} 22if(!isModalOpen){$modal.css('opacity','1');$openButton.removeClass(buttonLoadingClass);if(module.loader){module.loader(!1)} 23$modalIframeHtml.css('scrollbar-width','thin');$modalTargetHtml.css('overflow','hidden');$modalIframeHtml.css('scrollbar-width','thin');$modalIframeBody.css('scrollbar-width','thin');setTimeout(function(){$modalBody.css('transition','height .3s')},300)} 24isModalOpen=!0});$modalClose.click(function(){closeModal()});$modalReload.click(function(){$modalIframeContents[0].location.reload()});$modalResizeFull.click(function(){let $this=$(this);if($this.hasClass('resized')){$this.removeClass('resized');$modalInner.css('width',modalWidth).css('height',modalHeight);$this.html(iconResizeFull)}else{$this.addClass('resized');$modalInner.css('width','100%').css('height','100%');$this.html(iconResizeSmall)}});function setupModalButtons(){return;let $controlBar=$modalIframeBody.find('.universal-form-control-bar');$modalFooter.html('');$controlBar.attr('hidden',!0);$controlBar.find('button, a').each(function(){let $this=$(this);let $clone=$this.clone();$clone.appendTo($modalFooter);$clone.click(function(){$this.click();if(!$modalIframeBody.find('form').hasClass('is-invalid')){$clone.addClass('c-button--loading')}})})} 25function closeModal(){$modal.css('opacity',0);setTimeout(function(){$modal.remove()},300);clearInterval(iframeResizeInterval);$modalTargetHtml.css('overflow','');isModalOpen=!1} 26function resizeIframe(){if(modalHeight){return} 27let allowShrink=!1;let currentHeight=$modalIframe.height();let scrollHeight;if($modalIframeHtml.find('.opti-dialog').length>0){if(currentHeight<700){scrollHeight=700}else{scrollHeight=currentHeight}}else{if(allowShrink){$modalIframe.css('height',0)} 28$modalIframeHtml.css('overflow','initial');scrollHeight=$modalIframeHtml.prop('scrollHeight')} 29$modalIframeHtml.css('scrollbar-width','thin');if(scrollHeight>currentHeight||allowShrink){$modalBody.css('height',scrollHeight);let modalbodyOuterHeight=$modalBody.outerHeight();if(modalbodyOuterHeight<scrollHeight){scrollHeight=modalbodyOuterHeight} 30$modalBodyInner.css('height',scrollHeight);$modalIframe.css('height',scrollHeight)}}},openModalWithSrcDoc(parameters){let module=SaScriptManager.getModule('modal');let $modalTargetHtml=$('html');let $modalTargetBody=$('body');let srcDoc=parameters.srcDoc;let modalTitle=parameters.title;let modalWidth=parameters.width;
30let modalHeight=parameters.height;let $modal=$('<div class="universal-form-modal">\n'+' <div class="universal-form-modal-inner">\n'+' <div class="universal-form-modal-header">\n'+' <div class="universal-form-modal-title"></div>\n'+' <div class="universal-form-modal-controls">\n'+' <button type="button" class="universal-form-modal-close">\n'+' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>\n'+' </button>\n'+' </div>\n'+' </div>\n'+' <div class="universal-form-modal-body">\n'+' <div class="universal-form-modal-body-inner">\n'+' </div>\n'+' </div>\n'+' </div>\n'+' </div>');let $modalInner=$modal.find('.universal-form-modal-inner');let $modalTitle=$modal.find('.universal-form-modal-title');let $modalBody=$modal.find('.universal-form-modal-body');let $modalBodyInner=$modal.find('.universal-form-modal-body-inner');let $modalResizeFull=$modal.find('.universal-form-modal-resize-full');let $modalReload=$modal.find('.universal-form-modal-reload');let $modalClose=$modal.find('.universal-form-modal-close');let $modalFooter=$modal.find('.universal-form-modal-footer');$modal.css('opacity',0).removeClass('hidden');$modalTargetBody.append($modal);let $modalIframe=$('<iframe />').attr('srcdoc',srcDoc).css('height',200);$modalBodyInner.append($modalIframe);let iframeResizeInterval;let $modalIframeBody;let $modalIframeHtml;let $modalIframeContents;let $modalIframeSrc;let isModalOpen=!1;$modalIframe.on('load',function(){clearInterval(iframeResizeInterval);$modalIframeContents=$modalIframe.contents();$modalIframeBody=$modalIframeContents.find('body');$modalIframeHtml=$modalIframeContents.find('html');$modalIframeContents[0].addEventListener('beforeunload',function(e){if(module.loader){module.loader(!0)}});$modalIframeSrc=$modalIframe.prop('src');if(!modalWidth){modalWidth='1200px'} 31$modalTitle.html(modalTitle);$modalInner.css('width',modalWidth);$modalBody.css('overflow','hidden');$modalBodyInner.css('overflow','hidden');if(modalHeight){$modalIframe.css('height','100%');$modalBody.css('height','100%');$modalBodyInner.css('height','100%');$modalInner.css('height',modalHeight);$modalIframeHtml.css('scrollbar-width','thin');$modalIframeBody.css('scrollbar-width','thin')}else{$modalIframe.css('height',0);resizeIframe();iframeResizeInterval=setInterval(resizeIframe,500)} 32if(!isModalOpen){$modal.css('opacity','1');if(module.loader){module.loader(!1)} 33$modalIframeHtml.css('scrollbar-width','thin');$modalTargetHtml.css('overflow','hidden');$modalIframeHtml.css('scrollbar-width','thin');$modalIframeBody.css('scrollbar-width','thin');setTimeout(function(){$modalBody.css('transition','height .3s')},300)} 34isModalOpen=!0});$modalClose.click(function(){closeModal()});function closeModal(){$modal.css('opacity',0);setTimeout(function(){$modal.remove()},300);clearInterval(iframeResizeInterval);$modalTargetHtml.css('overflow','');isModalOpen=!1} 35function resizeIframe(){if(modalHeight){return} 36let allowShrink=!1;let currentHeight=$modalIframe.height();let scrollHeight;if($modalIframeHtml.find('.opti-dialog').length>0){if(currentHeight<700){scrollHeight=700}else{scrollHeight=currentHeight}}else{if(allowShrink){$modalIframe.css('height',0)} 37$modalIframeHtml.css('overflow','initial');scrollHeight=$modalIframeHtml.prop('scrollHeight')} 38$modalIframeHtml.css('scrollbar-width','thin');if(scrollHeight>currentHeight||allowShrink){$modalBody.css('height',scrollHeight);let modalbodyOuterHeight=$modalBody.outerHeight();if(modalbodyOuterHeight<scrollHeight){scrollHeight=modalbodyOuterHeight} 39$modalBodyInner.css('height',scrollHeight);$modalIframe.css('height',scrollHeight)}}},openModalWithHtml(parameters){let module=SaScriptManager.getModule('modal');let $modalTargetHtml=$('html');let $modalTargetBody=$('body');let html=parameters.html;let modalTitle=parameters.title;let modalWidth=parameters.width;
39let modalHeight=parameters.height;let $modal=$('<div class="universal-form-modal">\n'+' <div class="universal-form-modal-inner">\n'+' <div class="universal-form-modal-header">\n'+' <div class="universal-form-modal-title"></div>\n'+' <div class="universal-form-modal-controls">\n'+' <button type="button" class="universal-form-modal-close">\n'+' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>\n'+' </button>\n'+' </div>\n'+' </div>\n'+' <div class="universal-form-modal-body">\n'+' <div class="universal-form-modal-body-inner">\n'+' </div>\n'+' </div>\n'+' </div>\n'+' </div>');let $modalInner=$modal.find('.universal-form-modal-inner');let $modalTitle=$modal.find('.universal-form-modal-title');let $modalBody=$modal.find('.universal-form-modal-body');let $modalBodyInner=$modal.find('.universal-form-modal-body-inner');let $modalClose=$modal.find('.universal-form-modal-close');let $modalFooter=$modal.find('.universal-form-modal-footer');if(!modalWidth){modalWidth='1200px'} 40$modalTitle.html(modalTitle);$modalInner.css('width',modalWidth);$modalBodyInner.html(html);$modal.removeClass('hidden');$modalTargetBody.append($modal);$modal.css('opacity',1);$modalClose.click(function(){closeModal()});function closeModal(){$modal.css('opacity',0);setTimeout(function(){$modal.remove()},300);$modalTargetHtml.css('overflow','')}},closeModal($closeButton){let $modal=$closeButton.closest('.universal-form-modal');$modal.css('opacity',0);setTimeout(function(){$modal.remove()},300)},loader:function(state){if(state){$(".page-loader").addClass("is-loading")}else{$(".page-loader").removeClass("is-loading")}},});$(function(){$(document).on('keydown',function(e){if(e.keyCode===27){let $modal=$('.universal-form-modal:last-of-type');if($modal.length>0){$modal.css('opacity',0);setTimeout(function(){$modal.remove()},300);$('html').removeClass('html--overflow-hidden')}}})})
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.