layerpro 2.1.1 → 2.1.3

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.
Files changed (3) hide show
  1. package/index.cjs +660 -1248
  2. package/index.js +656 -1244
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,1269 +1,681 @@
1
- ;(()=>{const s=document.createElement("style");s.textContent="@layer layerpro {:root{--input-background-color:#444;--input-color:white;--button-background-color:#444;--button-color:white;--inputButton-fontSize:.8em;--resize-background-color:rgba(30,150,255,.5);--resize-shadow:0 0 10px rgba(30,150,255,.5);--dock-background-color:black;--dock-height:35px;--dock-sideLeft:10px;--dock-sideCenter:auto;--dock-sideRight:10px;--dock-icon-width:140px;--transition-time:.5s;--border-radius:25px;--corner-size:14px;--corner-border-radius:50%;--hover-opacity:1;--hover-filter:blur(3px);}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup{position:static;}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup,#popup_dock{will-change:transform,opacity,top,left,height,width;}#popup{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;}#popup .buttons{display:flex;position:absolute;left:0;right:0;bottom:0;height:40px;justify-content:space-evenly;align-items:center;}#popup .buttons button{all:unset;width:100%;height:100%;border-right:2px solid #636363;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);overflow:hidden;position:relative;color:var(--button-color);}#popup .buttons button:last-child{border-right:none;}#popup .buttons button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup .buttons button:hover{transition:all 0.3s ease;box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup .popup_bar_selected{background:linear-gradient( 45deg,#162858 60%,rgba(34,78,145,0.5411764706) 100%) !important;}#popup .zHigh{border-top-color:#278ed0 !important;box-shadow:0 -15px 20px -10px rgba(30,150,255,0.5),0 0 15px rgba(0,0,0,0.7) !important;border:1px solid rgba(0,0,0,0.05);}#popup [class^=popup_raised_]{position:absolute;inset:0;width:100%;height:100%;background-color:rgba(0,0,0,0.3);z-index:1;}#popup [class^=popup_window_]{position:absolute;inset:0;width:100%;height:100%;z-index:2;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,0.3);overflow:hidden;}#popup [class^=popup_overflow_]{position:absolute;inset:auto;z-index:3;border-radius:10px;background:gray;}#popup [class^=popup_bar_]{display:flex;width:100%;height:36px;background:linear-gradient( 45deg,#4a4a4f 60%,#AAA 100%);border-bottom:2px solid #555;box-shadow:0 1px 1px #888;z-index:2;}#popup [class^=popup_drag_]{width:100%;padding:10px 0 0 10px;color:#eee;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup [class^=popup_icon_]{padding:8px 0 0 10px;color:#eee;font-size:1.1em;}#popup [class^=popup_option_]{display:flex;margin-right:15px;}#popup [class^=popup_option_] button{position:relative;display:inline-block;width:36px;height:28px;color:white;border-radius:5px;margin:4px;transition:all 0.3s ease;background:transparent;}#popup [class^=popup_option_] button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup [class^=popup_option_] button:after{content:\"\";inset:0;display:block;position:absolute;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);border-radius:5px;z-index:-1;}#popup [class^=popup_option_] button:after{opacity:0;transition:opacity 0.3s ease-in-out;}#popup [class^=popup_option_] button:hover{background:rgba(255,255,255,0.1);box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup [class^=popup_option_] button:hover::after{opacity:1;}#popup [class^=popup_option_] button [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=popup_internal_]{position:absolute;inset:37px 0 0 0;z-index:1;background:linear-gradient( 0deg,rgb(60,60,60) 0%,#4a4a4f 100%);}#popup [class^=popup_body_]{position:absolute;inset:0;color:#eee;text-align:center;}.popupMaxSize{position:absolute !important;width:100% !important;height:100% !important;inset:0 !important;margin:0 !important;padding:0 !important;border-radius:0 !important;}#popup_dock{position:absolute;bottom:0;left:0;right:0;height:var(--dock-height);background-color:var(--dock-background-color);border-top:1px solid rgba(255,255,255,0.521);}#popup_dock #popup_dock_icon{position:absolute;top:3px;left:3px;width:70px;height:var(--dock-height);}#popup_dock #popup_dock_list{position:absolute;top:3px;left:var(--dock-sideLeft);right:var(--dock-sideLeft);height:calc(var(--dock-height) - 5px);overflow-y:auto;text-align:right;display:flex;flex-direction:row;justify-content:flex-end;}#popup_dock #popup_dock_list [class^=icon_]{width:var(--dock-icon-width);float:left;padding:4px;color:white;margin:2px 3px 0 0;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;filter:saturate(400%);}#popup_dock #popup_dock_list [class^=icon_]:hover{background-color:rgb(77,77,77);}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(1){width:20%;text-align:center;color:#F60;}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(2){width:80%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup_dock #popup_dock_list [class^=icon_] button{width:20px;height:20px;color:white;padding:4px;margin:0;display:flex;align-content:center;justify-content:center;font-size:0.7em;border:none;background:none;}#popup_dock #popup_dock_options{position:absolute;top:3px;right:10px;width:var(--dock-sideRight);height:var(--dock-height);}#popup .iconize:before,#popup .maximize:before,#popup .close:before{content:\"\";position:absolute;inset:0;background-repeat:no-repeat !important;background-position:center !important;background-size:50% !important;filter:invert(1);opacity:0.5;margin:0;padding:0;}#popup .iconize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lv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xhdGUoMCwtMjkxLjcwODMyKSI+CiAgICA8cmVjdAogICAgICAgcnk9IjAuNjk5MTc0MjMiCiAgICAgICB5PSIyOTMuNjkyNzgiCiAgICAgICB4PSIwLjI3NDg0NjczIgogICAgICAgaGVpZ2h0PSIxLjM5ODM0ODUiCiAgICAgICB3aWR0aD0iNC43NjI0OTk4IgogICAgICAgaWQ9InJlY3QzNzM2LTciCiAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDowLjEzMjk5MTg1IiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup .maximize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hbWU9Im1heGltaXplLnN2ZyIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpyZGY9Imh0dHA6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4yNjUzNyAtMC4yNjUzOCwwLjY5MjQ0IDAsMC45NTc4MSAwLjI2NTM4LDAuMjY1MzcgMC42OTI2MDk5NSwwLjI2NTM3IDAuOTU3OTg5OTUsMCBsIDEuMjI0MjEsLTEuMjI0MTcgMS4yMjQyMDgsMS4yMjQxNyBjIDAuMTMyNjkyLDAuMTMyNjggMC4zMDU4MywwLjE5OTI3IDAuNDc4OTkxLDAuMTk5MjcgMC4wNDMzLDAgMC4wODY3LC0wLjAwNCAwLjEyOTM3OSwtMC4wMTI1IDAuMTI3OTcxLC0wLjAyNDkgMC4yNTAxLC0wLjA4NzIgMC4zNDk2MiwtMC4xODY3NiAwLjAzMzIsLTAuMDMzMiAwLjA2MjMsLTAuMDY4NiAwLjA4NzEsLTAuMTA2MTQgMC4xNzQxNiwtMC4yNjMxOSAwLjE0NTA2OSwtMC42MTk0NiAtMC4wODcxLC0wLjg1MTY2IGwgLTEuMjI0MjA4LC0xLjIyNDE3IDEuMjI0MjA4LC0xLjIyNDE3IGMgMC4yNjUzNywtMC4yNjUzNyAwLjI2NTM3LC0wLjY5MjQ0IDAsLTAuOTU3ODEgLTAuMjY1Mzc5LC0wLjI2NTM3IC0wLjY5MjYxLC0wLjI2NTM3IC0wLjk1Nzk5LDAgbCAtMS4yMjQyMDgsMS4yMjQxNyAtMS4yMjQyMSwtMS4yMjQxNyBjIC0wLjEzMjY5LC0wLjEzMjY5IC0wLjMwNTgzLC0wLjE5OTI3IC0wLjQ3ODk4OTk1LC0wLjE5OTI3IHoiCiAgICAgICBpZD0icmVjdDM3MTUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup > input,#popup > button,#popup > textarea,#popup > select{all:unset;}.popup_alert,.popup_message,.popup_prompt,.popup_confirm{height:calc(100% - 41px);box-shadow:0 1px 1px #888;overflow:auto;padding:20px;word-break:break-all;}.popup_alert input[type=text],.popup_message input[type=text],.popup_prompt input[type=text],.popup_confirm input[type=text]{position:relative;width:90%;height:35px;padding:5px;font-size:1.05em;border:2px solid rgba(0,0,0,0.3);border-radius:6px;color:#ddd;background-color:#4a4a4f;}.popup_window___alert #a___alert,.popup_window___alert #a___message,.popup_window___message #a___alert,.popup_window___message #a___message{width:100% !important;}.popup_window___prompt #a___alert,.popup_window___prompt #b___alert,.popup_window___prompt #a___message,.popup_window___prompt #b___message,.popup_window___confirm #a___alert,.popup_window___confirm #b___alert,.popup_window___confirm #a___message,.popup_window___confirm #b___message{width:50% !important;}.resize_0,.resize_1,.resize_2,.resize_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);}.resize_0{top:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_1{top:0;right:-4px;width:10px;height:100%;cursor:e-resize;}.resize_2{bottom:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_3{top:0;left:-4px;width:10px;height:100%;cursor:e-resize;}.resize_corner_0,.resize_corner_1,.resize_corner_2,.resize_corner_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);width:var(--corner-size);height:var(--corner-size);border-radius:var(--corner-border-radius);}.resize_corner_0{top:-4px;left:-4px;cursor:nw-resize;}.resize_corner_1{top:-4px;right:-4px;cursor:ne-resize;}.resize_corner_2{bottom:-4px;right:-4px;cursor:nw-resize;}.resize_corner_3{bottom:-4px;left:-4px;cursor:ne-resize;}.resize_0:hover,.resize_1:hover,.resize_2:hover,.resize_3:hover,.resize_corner_0:hover,.resize_corner_1:hover,.resize_corner_2:hover,.resize_corner_3:hover{opacity:var(--hover-opacity);filter:var(--hover-filter);box-shadow:var(--resize-shadow);transition:var(--transition-time);}#popup{}#popup::-webkit-scrollbar{width:10px;scroll-behavior:smooth;}#popup{}#popup::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px;margin:5px;}#popup{}#popup::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgb(30,150,255) !important;}}";document.head.appendChild(s)})();import { createRoot } from 'react-dom/client';
2
- import $2 from 'jquery';
1
+ ;(()=>{const s=document.createElement("style");s.textContent="@layer layerpro {:root{--input-background-color:#444;--input-color:white;--button-background-color:#444;--button-color:white;--inputButton-fontSize:.8em;--resize-background-color:rgba(30,150,255,.5);--resize-shadow:0 0 10px rgba(30,150,255,.5);--dock-background-color:black;--dock-height:35px;--dock-sideLeft:10px;--dock-sideCenter:auto;--dock-sideRight:10px;--dock-icon-width:140px;--transition-time:.5s;--border-radius:25px;--corner-size:14px;--corner-border-radius:50%;--hover-opacity:1;--hover-filter:blur(3px);}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup{position:static;}#popup > [class^=popup_overflow],#popup > [class^=popup_bar_],#popup > [class^=popup_window_],#popup > [class^=popup_internal],#popup > [class^=popup_body],#popup,#popup_dock{will-change:transform,opacity,top,left,height,width;}#popup{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;}#popup .buttons{display:flex;position:absolute;left:0;right:0;bottom:0;height:40px;justify-content:space-evenly;align-items:center;}#popup .buttons button{all:unset;width:100%;height:100%;border-right:2px solid #636363;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);overflow:hidden;position:relative;color:var(--button-color);}#popup .buttons button:last-child{border-right:none;}#popup .buttons button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup .buttons button:hover{transition:all 0.3s ease;box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup .popup_bar_selected{background:linear-gradient( 45deg,#162858 60%,rgba(34,78,145,0.5411764706) 100%) !important;}#popup .zHigh{border-top-color:#278ed0 !important;box-shadow:0 -15px 20px -10px rgba(30,150,255,0.5),0 0 15px rgba(0,0,0,0.7) !important;border:1px solid rgba(0,0,0,0.05);}#popup [class^=popup_raised_]{position:absolute;inset:0;width:100%;height:100%;background-color:rgba(0,0,0,0.3);z-index:1;}#popup [class^=popup_window_]{position:absolute;inset:0;width:100%;height:100%;z-index:2;border-radius:10px;box-shadow:0 0 10px rgba(0,0,0,0.3);overflow:hidden;}#popup [class^=popup_overflow_]{position:absolute;inset:auto;z-index:3;border-radius:10px;background:gray;}#popup [class^=popup_bar_]{display:flex;width:100%;height:36px;background:linear-gradient( 45deg,#4a4a4f 60%,#AAA 100%);border-bottom:2px solid #555;box-shadow:0 1px 1px #888;z-index:2;}#popup [class^=popup_drag_]{width:100%;padding:10px 0 0 10px;color:#eee;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup [class^=popup_icon_]{padding:8px 0 0 10px;color:#eee;font-size:1.1em;}#popup [class^=popup_option_]{display:flex;margin-right:15px;}#popup [class^=popup_option_] button{position:relative;display:inline-block;width:36px;height:28px;color:white;border-radius:5px;margin:4px;transition:all 0.3s ease;background:transparent;}#popup [class^=popup_option_] button img{filter:invert(1);opacity:0.5;width:15px;height:auto;margin-top:2px;}#popup [class^=popup_option_] button:after{content:\"\";inset:0;display:block;position:absolute;background:linear-gradient( 180deg,#000 0%,rgb(60,60,60) 100%);border-radius:5px;z-index:-1;}#popup [class^=popup_option_] button:after{opacity:0;transition:opacity 0.3s ease-in-out;}#popup [class^=popup_option_] button:hover{background:rgba(255,255,255,0.1);box-shadow:inset 0 0 5px rgb(0,0,0);text-shadow:0 0 15px rgb(255,255,255),0 0 3px rgb(255,255,255);}#popup [class^=popup_option_] button:hover::after{opacity:1;}#popup [class^=popup_option_] button [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=button_close_]:hover{background:rgb(255,0,0) !important;box-shadow:inset 0 0 25px rgb(255,255,255),0 0 35px rgb(255,0,0) !important;}#popup [class^=popup_internal_]{position:absolute;inset:37px 0 0 0;z-index:1;background:linear-gradient( 0deg,rgb(60,60,60) 0%,#4a4a4f 100%);}#popup [class^=popup_body_]{position:absolute;inset:0;color:#eee;text-align:center;}.popupMaxSize{position:absolute !important;width:100% !important;height:100% !important;inset:0 !important;margin:0 !important;padding:0 !important;border-radius:0 !important;}#popup_dock{position:absolute;bottom:0;left:0;right:0;height:var(--dock-height);background-color:var(--dock-background-color);border-top:1px solid rgba(255,255,255,0.521);}#popup_dock #popup_dock_icon{position:absolute;top:3px;left:3px;width:70px;height:var(--dock-height);}#popup_dock #popup_dock_list{position:absolute;top:3px;left:var(--dock-sideLeft);right:var(--dock-sideLeft);height:calc(var(--dock-height) - 5px);overflow-y:auto;text-align:right;display:flex;flex-direction:row;justify-content:flex-end;}#popup_dock #popup_dock_list [class^=icon_]{width:var(--dock-icon-width);float:left;padding:4px;color:white;margin:2px 3px 0 0;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;filter:saturate(400%);}#popup_dock #popup_dock_list [class^=icon_]:hover{background-color:rgb(77,77,77);}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(1){width:20%;text-align:center;color:#F60;}#popup_dock #popup_dock_list [class^=icon_] span:nth-child(2){width:80%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}#popup_dock #popup_dock_list [class^=icon_] button{width:20px;height:20px;color:white;padding:4px;margin:0;display:flex;align-content:center;justify-content:center;font-size:0.7em;border:none;background:none;}#popup_dock #popup_dock_options{position:absolute;top:3px;right:10px;width:var(--dock-sideRight);height:var(--dock-height);}#popup .iconize:before,#popup .maximize:before,#popup .close:before{content:\"\";position:absolute;inset:0;background-repeat:no-repeat !important;background-position:center !important;background-size:50% !important;filter:invert(1);opacity:0.5;margin:0;padding:0;}#popup .iconize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3N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kyNzgiCiAgICAgICB4PSIwLjI3NDg0NjczIgogICAgICAgaGVpZ2h0PSIxLjM5ODM0ODUiCiAgICAgICB3aWR0aD0iNC43NjI0OTk4IgogICAgICAgaWQ9InJlY3QzNzM2LTciCiAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDowLjEzMjk5MTg1IiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup .maximize:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMjAiCiAgIGhlaWdodD0iMjAiCiAgIHZpZXdCb3g9IjAgMCA1LjI5MTY2NjUgNS4yOTE2NjY4IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmczNzY4IgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEuMSAoM2JmNWFlMGQyNSwgMjAyMS0wOS0yMCkiCiAgIHNvZGlwb2RpOmRvY25hbWU9Im1heGltaXplLnN2ZyIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVj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NTM3IDAuOTU3OTg5OTUsMCBsIDEuMjI0MjEsLTEuMjI0MTcgMS4yMjQyMDgsMS4yMjQxNyBjIDAuMTMyNjkyLDAuMTMyNjggMC4zMDU4MywwLjE5OTI3IDAuNDc4OTkxLDAuMTk5MjcgMC4wNDMzLDAgMC4wODY3LC0wLjAwNCAwLjEyOTM3OSwtMC4wMTI1IDAuMTI3OTcxLC0wLjAyNDkgMC4yNTAxLC0wLjA4NzIgMC4zNDk2MiwtMC4xODY3NiAwLjAzMzIsLTAuMDMzMiAwLjA2MjMsLTAuMDY4NiAwLjA4NzEsLTAuMTA2MTQgMC4xNzQxNiwtMC4yNjMxOSAwLjE0NTA2OSwtMC42MTk0NiAtMC4wODcxLC0wLjg1MTY2IGwgLTEuMjI0MjA4LC0xLjIyNDE3IDEuMjI0MjA4LC0xLjIyNDE3IGMgMC4yNjUzNywtMC4yNjUzNyAwLjI2NTM3LC0wLjY5MjQ0IDAsLTAuOTU3ODEgLTAuMjY1Mzc5LC0wLjI2NTM3IC0wLjY5MjYxLC0wLjI2NTM3IC0wLjk1Nzk5LDAgbCAtMS4yMjQyMDgsMS4yMjQxNyAtMS4yMjQyMSwtMS4yMjQxNyBjIC0wLjEzMjY5LC0wLjEzMjY5IC0wLjMwNTgzLC0wLjE5OTI3IC0wLjQ3ODk4OTk1LC0wLjE5OTI3IHoiCiAgICAgICBpZD0icmVjdDM3MTUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIiAvPgogIDwvZz4KPC9zdmc+Cg==) !important;}#popup > input,#popup > button,#popup > textarea,#popup > select{all:unset;}.popup_alert,.popup_message,.popup_prompt,.popup_confirm{height:calc(100% - 41px);box-shadow:0 1px 1px #888;overflow:auto;padding:20px;word-break:break-all;}.popup_alert input[type=text],.popup_message input[type=text],.popup_prompt input[type=text],.popup_confirm input[type=text]{position:relative;width:90%;height:35px;padding:5px;font-size:1.05em;border:2px solid rgba(0,0,0,0.3);border-radius:6px;color:#ddd;background-color:#4a4a4f;}.popup_window___alert #a___alert,.popup_window___alert #a___message,.popup_window___message #a___alert,.popup_window___message #a___message{width:100% !important;}.popup_window___prompt #a___alert,.popup_window___prompt #b___alert,.popup_window___prompt #a___message,.popup_window___prompt #b___message,.popup_window___confirm #a___alert,.popup_window___confirm #b___alert,.popup_window___confirm #a___message,.popup_window___confirm #b___message{width:50% !important;}.resize_0,.resize_1,.resize_2,.resize_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);}.resize_0{top:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_1{top:0;right:-4px;width:10px;height:100%;cursor:e-resize;}.resize_2{bottom:-4px;left:0;width:100%;height:10px;cursor:n-resize;}.resize_3{top:0;left:-4px;width:10px;height:100%;cursor:e-resize;}.resize_corner_0,.resize_corner_1,.resize_corner_2,.resize_corner_3{position:absolute;background-color:var(--resize-background-color);border-radius:var(--border-radius);opacity:0;z-index:5000;transition:var(--transition-time);width:var(--corner-size);height:var(--corner-size);border-radius:var(--corner-border-radius);}.resize_corner_0{top:-4px;left:-4px;cursor:nw-resize;}.resize_corner_1{top:-4px;right:-4px;cursor:ne-resize;}.resize_corner_2{bottom:-4px;right:-4px;cursor:nw-resize;}.resize_corner_3{bottom:-4px;left:-4px;cursor:ne-resize;}.resize_0:hover,.resize_1:hover,.resize_2:hover,.resize_3:hover,.resize_corner_0:hover,.resize_corner_1:hover,.resize_corner_2:hover,.resize_corner_3:hover{opacity:var(--hover-opacity);filter:var(--hover-filter);box-shadow:var(--resize-shadow);transition:var(--transition-time);}#popup{}#popup::-webkit-scrollbar{width:10px;scroll-behavior:smooth;}#popup{}#popup::-webkit-scrollbar-track{-webkit-border-radius:2px;border-radius:2px;margin:5px;}#popup{}#popup::-webkit-scrollbar-thumb{-webkit-border-radius:2px;border-radius:2px;background:rgb(30,150,255) !important;}}";document.head.appendChild(s)})();import { createRoot as e } from "react-dom/client";
3
2
 
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __esm = (fn, res) => function __init() {
7
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
- };
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var credits;
14
- var init_credits = __esm({
15
- "core/credits.ts"() {
16
- credits = (props) => {
17
- console.groupCollapsed(`%c${props.name} v${props.version}%c`, "color:orange", "");
18
- console.debug(`%c${props.name} v${props.version}%c by Dario Passariello started`, "color:orange", "");
19
- console.debug(`%cType ${props.name} in this console to see it`, "color:gray", "");
20
- console.debug("name: %c" + props.name, "color:orange", "");
21
- console.debug("version: %c" + props.version, "color:orange", "");
22
- console.debug("description: %c" + props.description, "color:orange", "");
23
- console.debug("license: %c" + props.license, "color:orange", "");
24
- console.debug("author: %c" + props.author.name, "color:orange", "");
25
- console.debug("email: %c" + props.author.email, "color:orange", "");
26
- console.groupEnd();
27
- };
28
- Object.defineProperty(
29
- layerpro,
30
- "credits",
31
- {
32
- value: credits,
33
- writable: false,
34
- configurable: false
35
- }
36
- );
37
- }
38
- });
39
-
40
- // core/mouseCoords.ts
41
- var mouseCoords_exports = {};
42
- __export(mouseCoords_exports, {
43
- getMouseDirection: () => getMouseDirection,
44
- mouseCoord: () => mouseCoord
45
- });
46
- var mouseCoord, xDirection, yDirection, oldX, oldY, getMouseDirection;
47
- var init_mouseCoords = __esm({
48
- "core/mouseCoords.ts"() {
49
- mouseCoord = (e) => {
50
- return [
51
- e.clientX,
52
- e.clientY,
53
- e.screenX,
54
- e.screenY,
55
- e.pageX,
56
- e.pageY
57
- ];
58
- };
59
- xDirection = 0;
60
- yDirection = "";
61
- oldX = 0;
62
- oldY = 0;
63
- getMouseDirection = (e) => {
64
- xDirection = oldX < e.pageX ? 1 : 0;
65
- yDirection = oldY < e.pageY ? "down" : "up";
66
- oldX = e.pageX;
67
- oldY = e.pageY;
68
- return [xDirection, yDirection];
69
- };
70
- }
71
- });
72
-
73
- // core/message.ts
74
- var escapeHtml, LPalert, LPmessage, LPconfirm, LPprompt;
75
- var init_message = __esm({
76
- "core/message.ts"() {
77
- escapeHtml = (str) => {
78
- const div = document.createElement("div");
79
- div.textContent = str;
80
- return div.innerHTML;
81
- };
82
- LPalert = (txt) => {
83
- const safeText = escapeHtml(String(txt));
84
- const pUp = window.layerpro.popup.open(
85
- {
86
- id: "__alert",
87
- name: "Warning",
88
- icon: "&#9888;",
89
- width: 380,
90
- height: 220,
91
- iconize: false,
92
- maximize: false,
93
- close: true,
94
- isMaximize: false,
95
- dockable: false,
96
- raised: true,
97
- movable: true,
98
- resizable: false
99
- }
100
- );
101
- const view = `
102
- <div class='popup_prompt'>
103
- <div class="popup_message_body">
104
- <center>${safeText}</center>
105
- </div>
106
- <div class="buttons">
107
- <button id="${"a_" + pUp["id"]}" type="button">CLOSE</button>
108
- </div>
109
- </div>
110
- `;
111
- $(".popup_body_" + pUp["id"]).html(view);
112
- $("#a_" + pUp["id"]).on("click", () => {
113
- window.layerpro.popup.close(pUp);
114
- });
115
- return;
116
- };
117
- LPmessage = (txt, func) => {
118
- const safeText = escapeHtml(String(txt));
119
- const pUp = window.layerpro.popup.open(
120
- {
121
- id: "__message",
122
- name: "Message",
123
- icon: "&#9965;",
124
- width: 380,
125
- height: 220,
126
- iconize: false,
127
- maximize: false,
128
- close: true,
129
- isMaximize: false,
130
- dockable: false,
131
- raised: true,
132
- movable: true,
133
- resizable: false
134
- }
135
- );
136
- const view = `
137
- <div class='popup_prompt'>
138
- <div class="popup_message_body">
139
- <center>${safeText}</center>
140
- </div>
141
- <div class="buttons">
142
- <button id="${"a_" + pUp["id"]}" type="button">CLOSE</button>
143
- </div>
144
- </div>
145
- `;
146
- $(".popup_body_" + pUp["id"]).html(view);
147
- $("#a_" + pUp["id"]).on("click", () => {
148
- if (func) {
149
- func();
150
- }
151
- window.layerpro.popup.close(pUp);
152
- });
153
- return;
154
- };
155
- LPconfirm = (txt, func, noFunction) => {
156
- if ($(".confirm").length === 0) {
157
- const safeText = escapeHtml(String(txt));
158
- const pUp = window.layerpro.popup.open(
159
- {
160
- id: "__confirm",
161
- name: "Confirm",
162
- icon: "&#9745;",
163
- width: 380,
164
- height: 220,
165
- iconize: false,
166
- maximize: false,
167
- close: true,
168
- isMaximize: false,
169
- dockable: false,
170
- raised: true,
171
- movable: true,
172
- resizable: false
173
- }
174
- );
175
- const view = `
176
- <div class='popup_prompt'>
177
- <div class="popup_message_body">
178
- <center>${safeText}</center>
179
- </div>
180
- <div class="buttons">
181
- <button id="${"a_" + pUp["id"]}" type="button">CONFIRM</button>
182
- <button id="${"b_" + pUp["id"]}" type="button">CANCEL</button>
183
- </div>
184
- </div>
185
- `;
186
- $(".popup_body_" + pUp["id"]).html(view);
187
- $("#a_" + pUp["id"]).on("click", () => {
188
- if (func) {
189
- func();
190
- }
191
- window.layerpro.popup.close(pUp);
192
- });
193
- $("#b_" + pUp["id"]).on("click", () => {
194
- if (noFunction) {
195
- noFunction();
196
- }
197
- window.layerpro.popup.close(pUp);
198
- });
199
- }
200
- return;
201
- };
202
- LPprompt = (txt, value) => {
203
- const finalValue = value || "_prompt";
204
- const safeText = escapeHtml(String(txt));
205
- const pUp = window.layerpro.popup.open(
206
- {
207
- id: "__prompt",
208
- name: "Prompt",
209
- icon: "&#9998;",
210
- width: 380,
211
- height: 220,
212
- iconize: false,
213
- maximize: false,
214
- close: true,
215
- isMaximize: false,
216
- dockable: false,
217
- raised: true,
218
- movable: true,
219
- resizable: false
220
- }
221
- );
222
- const view = `
223
- <div class='popup_prompt'>
224
-
225
- <div class="popup_message_body">
226
- <center>
227
- ${safeText}
228
- </center>
229
- </div>
230
-
231
- <input id="input_${pUp["id"]}" type="text" placeholder="write here" />
232
- <br/>
3
+ import o from "jquery";
233
4
 
234
- <div class="buttons">
235
- <button id="a_${pUp["id"]}" type="button">OK</button>
236
- <button id="b_${pUp["id"]}" type="button">CANCEL</button>
237
- </div>
238
-
239
- </div>
240
- `;
241
- $(".popup_body_" + pUp["id"]).html(view);
242
- $("#input_" + pUp["id"]).on("focus", function() {
243
- $(this).attr("placeholder", "");
244
- }).on("blur", function() {
245
- $(this).attr("placeholder", "write here");
246
- });
247
- $("#a_" + pUp["id"]).on("click", () => {
248
- if ($("#input_" + pUp["id"]).val() > "") {
249
- if (typeof finalValue === "function") finalValue();
250
- const strVal = String(finalValue);
251
- if (strVal === finalValue) return JSON.stringify($("#input_" + pUp["id"]).val());
252
- window.layerpro.popup.close(pUp);
253
- } else {
254
- alert(`input can't be empty!`);
255
- }
256
- });
257
- $("#b_" + pUp["id"]).on("click", () => {
258
- window.layerpro.popup.close(pUp);
259
- });
260
- return;
261
- };
262
- window.message = (txt, func) => window.layerpro.message(txt, func);
263
- window.alert = (txt) => window.layerpro.alert(txt);
264
- window.confirm = (txt, func, noFunction) => window.layerpro.confirm(txt, func, noFunction);
265
- window.prompt = (txt, func, _event) => window.layerpro.prompt(txt, func, _event);
266
- Object.defineProperty(window, "alert", { enumerable: false });
267
- Object.defineProperty(window, "prompt", { enumerable: false });
268
- Object.defineProperty(window, "message", { enumerable: false });
269
- Object.defineProperty(window, "confirm", { enumerable: false });
270
- Object.defineProperties(
271
- window.layerpro,
272
- {
273
- prompt: {
274
- value: LPprompt
275
- },
276
- alert: {
277
- value: LPalert
278
- },
279
- message: {
280
- value: LPmessage
281
- },
282
- confirm: {
283
- value: LPconfirm
284
- }
285
- }
286
- );
287
- }
288
- });
289
- var reactRoots, dockEventListeners, escapeHtml2, genLayer;
290
- var init_genLayer = __esm({
291
- "core/genLayer.ts"() {
292
- init_message();
293
- reactRoots = /* @__PURE__ */ new Map();
294
- dockEventListeners = /* @__PURE__ */ new Map();
295
- escapeHtml2 = (str) => {
296
- const div = document.createElement("div");
297
- div.textContent = str;
298
- return div.innerHTML;
299
- };
300
- genLayer = (props) => {
301
- if (typeof props.body === "function") {
302
- console.error(
303
- 'LayerPro Error: Passing a function as body is not supported. Use a React element like <Component /> or plain text/HTML string instead.\nExample: body: <MyComponent /> or body: "<p>Hello</p>"'
304
- );
305
- return;
306
- }
307
- const pContainer = props.raised === true ? ".popup_raised_" + props.id : "#popup";
308
- $('[class^="popup_window_"]', pContainer).removeClass("zHigh");
309
- $('[class^="popup_bar_"]', pContainer).removeClass("popup_bar_selected");
310
- $('[class^="icon_"]', pContainer).removeClass("popup_bar_selected");
311
- if (props.raised === true) {
312
- $('<div class="popup_raised_' + props.id + '">', pContainer).appendTo("#popup").css({
313
- "pointer-events": "auto",
314
- "z-index": Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', pContainer))) + 1e3
315
- });
316
- }
317
- $('<div class="popup_overflow_' + props.id + '">', pContainer).appendTo(pContainer).css(
318
- {
319
- top: props.top,
320
- left: props.left,
321
- right: props.right,
322
- bottom: props.bottom,
323
- width: props.width,
324
- height: props.height,
325
- minWidth: props.minWidth,
326
- minHeight: props.minHeight,
327
- maxWidth: props.maxWidth,
328
- maxHeight: props.maxHeight,
329
- pointerEvents: "auto",
330
- zIndex: Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', pContainer))) + 1
331
- }
332
- ).on("mousedown", (_e) => {
333
- layerpro.popup.index(props);
334
- }).hide().fadeIn(props.fadeIn);
335
- const item = $('<div class="popup_window_' + props.id + '">', pContainer).appendTo(".popup_overflow_" + props.id).css({ "pointer-events": "auto" }).addClass("zHigh").addClass(props.class);
336
- const pos = [props.top, props.left, props.bottom, props.right], sum = pos.reduce((sumSoFar, nextValue) => {
337
- if (typeof nextValue === "number" && isFinite(nextValue)) {
338
- return Number(sumSoFar) + nextValue;
339
- }
340
- return sumSoFar;
341
- }, 0);
342
- if (sum === 0) layerpro.popup.center(props);
343
- layerpro.popup.unmount = (id) => {
344
- const root = reactRoots.get(id);
345
- if (root) {
346
- root.unmount();
347
- reactRoots.delete(id);
348
- }
349
- };
350
- layerpro.popup.cleanupEvents = (id) => {
351
- const listeners = dockEventListeners.get(id);
352
- if (listeners) {
353
- if (listeners.iconClick) $(".icon_" + id, "#popup_dock").find("span").off("click");
354
- if (listeners.iconClose) $(".icon_close_" + id, "#popup_dock").off("click");
355
- if (listeners.buttonIconize) $(".button_iconize_" + id).off("click");
356
- if (listeners.buttonMaximize) $(".button_maximize_" + id).off("click");
357
- if (listeners.buttonClose) $(".button_close_" + id).off("click");
358
- if (listeners.escKey) $(document).off("keydown");
359
- dockEventListeners.delete(id);
360
- }
361
- };
362
- layerpro.popup.getReactRoot = (id) => reactRoots.get(id);
363
- $('<div class="popup_bar_' + props.id + '">', pContainer).appendTo(item).addClass("popup_bar_selected");
364
- if (props.icon) $('<div class="popup_icon_' + props.id + '">' + props.icon + "</div>", pContainer).appendTo(".popup_bar_" + props.id);
365
- const safeName = escapeHtml2(String(props.name));
366
- $('<div class="popup_drag_' + props.id + '">' + safeName + "</div>", pContainer).appendTo(".popup_bar_" + props.id);
367
- $('<div class="popup_option_' + props.id + '">', pContainer).appendTo(".popup_bar_" + props.id);
368
- if (props.iconize === true && $("#popup_dock").length === 0) {
369
- $("#root").css("margin", "0 0 var( --dock-height ) 0");
370
- const dock = `
371
- <div id="popup_dock">
372
- <div id="popup_dock_icon"></div>
373
- <div id="popup_dock_list"></div>
374
- <div id="popup_dock_options"></div>
375
- </div>
376
- `;
377
- $(dock).appendTo("#popup").css(
378
- {
379
- pointerEvents: "auto",
380
- zIndex: Number(layerpro.popup.zIndex($("#popup"))) + 1e3
381
- }
382
- );
383
- }
384
- if ($("#popup_dock").length > 0 && props.dockable === true) {
385
- const idStr2 = String(props.id);
386
- const dock_icon = `
387
- <div class="icon_${props.id}">
388
- <span>${props.icon ? props.icon : ""}</span>
389
- <span>${safeName}</span>
390
- `;
391
- const iconClickHandler = function(_e) {
392
- if ($(".popup_overflow_" + props.id + ":hidden")) {
393
- layerpro.popup.iconize(props);
394
- layerpro.popup.index(props);
395
- } else {
396
- layerpro.popup.iconize(props);
397
- }
398
- layerpro.popup.index(props);
399
- };
400
- const iconCloseHandler = function(_e) {
401
- props?.buttons?.cancel?.cb && props?.buttons?.cancel?.cb();
402
- layerpro.popup.close(props);
403
- };
404
- dockEventListeners.set(idStr2, { iconClick: true, iconClose: true });
405
- $(dock_icon, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", iconClickHandler);
406
- $(`<button class="icon_close_${props.id}">X</button>`, "#popup_dock").appendTo(`.icon_${props.id}`).on("click", iconCloseHandler);
407
- }
408
- if (props.iconize === true) {
409
- const idStr2 = String(props.id);
410
- const buttonIconizeHandler = function(_e) {
411
- layerpro.popup.iconize(props);
412
- };
413
- const existing2 = dockEventListeners.get(idStr2) || {};
414
- existing2.buttonIconize = true;
415
- dockEventListeners.set(idStr2, existing2);
416
- $('<button class="button_iconize_' + props.id + ' iconize">', "#popup").appendTo(".popup_option_" + props.id).on("click", buttonIconizeHandler);
417
- }
418
- if (props.maximize === true) {
419
- const idStr2 = String(props.id);
420
- const buttonMaximizeHandler = function(_e) {
421
- layerpro.popup.maximize(props);
422
- };
423
- const existing2 = dockEventListeners.get(idStr2) || {};
424
- existing2.buttonMaximize = true;
425
- dockEventListeners.set(idStr2, existing2);
426
- $('<button class="button_maximize_' + props.id + ' maximize">', "#popup").appendTo(".popup_option_" + props.id).on("click", buttonMaximizeHandler);
427
- }
428
- if (props.close === true) {
429
- const idStr2 = String(props.id);
430
- const buttonCloseHandler = function(_e) {
431
- props?.buttons?.cancel?.cb && props?.buttons?.cancel?.cb();
432
- layerpro.popup.close(props);
433
- };
434
- const existing2 = dockEventListeners.get(idStr2) || {};
435
- existing2.buttonClose = true;
436
- dockEventListeners.set(idStr2, existing2);
437
- $('<button class="button_close_' + props.id + ' close">', "#popup").appendTo(".popup_option_" + props.id).on("click", buttonCloseHandler);
438
- }
439
- const escHandler = function(e) {
440
- if (e.key === "Escape" || e.keyCode === 27) {
441
- props?.buttons?.cancel?.cb && props?.buttons?.cancel?.cb();
442
- layerpro.popup.close(props);
443
- }
444
- };
445
- const idStr = String(props.id), existing = dockEventListeners.get(idStr) || {};
446
- existing.escKey = true;
447
- dockEventListeners.set(idStr, existing);
448
- $(document).on("keydown", escHandler);
449
- if (props.timer > 0) {
450
- const t = {};
451
- t[String(`st_${props.id}`)] = setTimeout(() => {
452
- layerpro.popup.close(props);
453
- clearTimeout(t[String(`st_${props.id}`)]);
454
- }, props.timer);
455
- }
456
- if (props.source) {
457
- const bodyElement = $(".popup_body_" + props.id);
458
- const sourceUrl = String(props.source);
459
- try {
460
- const url = new URL(sourceUrl, window.location.origin);
461
- if (url.protocol !== "https:" && url.protocol !== "http:" && url.protocol !== "") {
462
- console.error("Invalid URL protocol:", url.protocol);
463
- return;
464
- }
465
- } catch {
466
- console.error("Invalid source URL:", props.source);
467
- return;
468
- }
469
- fetch(sourceUrl, { mode: "same-origin" }).then((response) => {
470
- const contentType = response.headers.get("content-type") || "";
471
- if (!contentType.includes("text/html")) {
472
- console.warn("Source returned non-HTML content:", contentType);
473
- }
474
- if (!response.ok) {
475
- throw new Error(`HTTP error! status: ${response.status}`);
476
- }
477
- return response.text();
478
- }).then((html) => {
479
- const safeHtml = escapeHtml2(html);
480
- bodyElement.hide().html(safeHtml).fadeIn(props.fadeIn);
481
- }).catch((error) => {
482
- console.error("Error loading content:", error);
5
+ var t, i, n, p, s, r, c, a = Object.defineProperty, d = Object.getOwnPropertyNames, u = (e, o) => function() {
6
+ return e && (o = (0, e[d(e)[0]])(e = 0)), o;
7
+ }, l = (e, o) => {
8
+ for (var t in o) a(e, t, {
9
+ get: o[t],
10
+ enumerable: !0
11
+ });
12
+ }, h = u({
13
+ "core/credits.ts"() {
14
+ t = e => {}, Object.defineProperty(layerpro, "credits", {
15
+ value: t,
16
+ writable: !1,
17
+ configurable: !1
483
18
  });
484
- }
485
- if (props.movable) layerpro.popup.movable(props);
486
- if (props.resizable) layerpro.popup.resizable(props);
487
- if (props.isMaximize) layerpro.popup.maximize(props);
488
- const showBody = () => {
489
- if (props.body && !props.source) {
490
- const isReactElement = typeof props.body === "object" && props.body !== null && props.body.props !== void 0;
491
- if (isReactElement) {
492
- const container = document.querySelector(".popup_body_" + props.id);
493
- if (!container) {
494
- console.debug("Container not found for React component");
495
- return;
496
- }
497
- try {
498
- const root = createRoot(container);
499
- root.render(props.body);
500
- reactRoots.set(String(props.id), root);
501
- } catch (_e) {
502
- console.error("Error rendering React component:", _e);
503
- }
504
- } else if (typeof props.body === "string" && props.body.trim().startsWith("<")) {
505
- const safeBody = escapeHtml2(props.body);
506
- $(".popup_body_" + props.id).html(safeBody).fadeIn(props.fadeIn);
507
- } else {
508
- const safeBody = escapeHtml2(String(props.body));
509
- $(".popup_body_" + props.id).text(safeBody).fadeIn(props.fadeIn);
510
- }
511
- }
512
- };
513
- const showButtons = () => {
514
- if (props.buttons) {
515
- $('<div class="buttons"></div>').appendTo(".popup_body_" + props.id);
516
- if (props.buttons.confirm) {
517
- const Confirm = $(`<button id="lp_confirm" type="button">
518
- ${props.buttons.confirm.text.toUpperCase()}
519
- </button>`).appendTo(".buttons");
520
- props.buttons.confirm.cb && Confirm.click(
521
- () => {
522
- props.buttons?.confirm?.cb?.();
523
- layerpro.popup.close(props);
524
- }
525
- );
526
- }
527
- if (props.buttons.cancel) {
528
- const Cancel = $(`<button id="lp_cancel" type="button">
529
- ${props.buttons.cancel.text.toUpperCase()}
530
- </button>`).appendTo(".buttons");
531
- Cancel.click(
532
- () => {
533
- props.buttons?.cancel?.cb?.();
534
- layerpro.popup.close(props);
535
- }
536
- );
537
- }
538
- }
539
- };
540
- const _overflow = $('<div class="popup_overflow_' + props.id + '">', "#popup");
541
- $('<div class="popup_internal_' + props.id + '">', _overflow).appendTo(item);
542
- $('<div class="popup_body_' + props.id + '">', _overflow).appendTo(".popup_internal_" + props.id).hide().fadeIn(
543
- props.fadeIn,
544
- function() {
545
- showBody();
546
- showButtons();
547
- }
548
- );
549
- return;
550
- };
551
- }
552
- });
553
-
554
- // core/mobile.ts
555
- var MOBILE_BREAKPOINT, isMobileMediaQuery, isMobileUserAgent, hasTouchSupport, getInteractionMode, currentMode, wasAboveBreakpoint, onModeChangeCallback, logMode, getPointerDown, getPointerMove, getPointerUp, getClientX, getClientY;
556
- var init_mobile = __esm({
557
- "core/mobile.ts"() {
558
- MOBILE_BREAKPOINT = 1024;
559
- isMobileMediaQuery = () => {
560
- if (typeof window === "undefined") return false;
561
- return window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT}px)`).matches;
562
- };
563
- isMobileUserAgent = () => {
564
- if (typeof navigator === "undefined") return false;
565
- const ua = navigator.userAgent;
566
- return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ua);
567
- };
568
- hasTouchSupport = () => {
569
- return "ontouchstart" in window || navigator.maxTouchPoints > 0;
570
- };
571
- getInteractionMode = () => {
572
- if (window.__FORCE_TOUCH_MODE__ === true) return "touch";
573
- const isMobileDevice = isMobileUserAgent() || isMobileMediaQuery();
574
- if (hasTouchSupport() && isMobileDevice) return "touch";
575
- return "mouse";
576
- };
577
- currentMode = getInteractionMode();
578
- wasAboveBreakpoint = !isMobileMediaQuery();
579
- onModeChangeCallback = null;
580
- logMode = () => {
581
- const isMobile = currentMode === "touch";
582
- console.debug(`[LayerPro] Mode: ${isMobile ? "MOBILE (touch events)" : "DESKTOP (mouse events)"} | UA: ${isMobileUserAgent() ? "mobile" : "desktop"} | Viewport: ${isMobileMediaQuery() ? "mobile" : "desktop"} | Touch: ${hasTouchSupport()}`);
583
- };
584
- if (typeof window !== "undefined") {
585
- logMode();
586
- }
587
- if (typeof window !== "undefined") {
588
- const mq = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT}px)`);
589
- const handleResize = () => {
590
- const newMode = getInteractionMode();
591
- const oldMode = currentMode;
592
- const isNowAboveBreakpoint = !isMobileMediaQuery();
593
- currentMode = newMode;
594
- logMode();
595
- if (wasAboveBreakpoint !== isNowAboveBreakpoint) {
596
- wasAboveBreakpoint = isNowAboveBreakpoint;
597
- if (onModeChangeCallback) {
598
- onModeChangeCallback(newMode, oldMode);
599
- }
600
- }
601
- };
602
- if (mq.addListener) {
603
- mq.addListener(handleResize);
604
- } else {
605
- mq.addEventListener("change", handleResize);
606
- }
607
- let resizeTimer;
608
- window.addEventListener("resize", () => {
609
- clearTimeout(resizeTimer);
610
- resizeTimer = setTimeout(handleResize, 150);
611
- });
612
19
  }
613
- getPointerDown = () => "pointerdown";
614
- getPointerMove = () => "pointermove";
615
- getPointerUp = () => "pointerup";
616
- getClientX = (e) => {
617
- if (e.clientX !== void 0) {
618
- return e.clientX;
619
- }
620
- if (e.touches && e.touches.length > 0) {
621
- return e.touches[0].clientX;
622
- }
623
- return e.clientX;
624
- };
625
- getClientY = (e) => {
626
- if (e.clientY !== void 0) {
627
- return e.clientY;
628
- }
629
- if (e.touches && e.touches.length > 0) {
630
- return e.touches[0].clientY;
631
- }
632
- return e.clientY;
633
- };
634
- }
635
20
  });
636
21
 
637
- // core/properties.ts
638
- var properties_exports = {};
639
- __export(properties_exports, {
640
- popup: () => popup
22
+ l({}, {
23
+ getMouseDirection: () => c,
24
+ mouseCoord: () => i
641
25
  });
642
- var larX, larY, isResizable, highIndex, startX, startY, startWidth, startHeight, startLeft, startTop, startBottom, startRight, movableHandlers, resizeHandlers, Win, Body, popup;
643
- var init_properties = __esm({
644
- "core/properties.ts"() {
645
- init_genLayer();
646
- init_mobile();
647
- larX = 250;
648
- larY = 150;
649
- highIndex = 1;
650
- movableHandlers = /* @__PURE__ */ new Map();
651
- resizeHandlers = /* @__PURE__ */ new Map();
652
- Win = $(window);
653
- Body = $("body");
654
- popup = {
655
- open: (props) => {
656
- if (!props) return;
657
- props.id = props.id || Math.round(Math.random() * 1e3);
658
- props.body = props.body || "";
659
- props.class = props.class || "";
660
- props.width = props.width || 300;
661
- props.height = props.height || 200;
662
- props.minWidth = props.minWidth || 340;
663
- props.minHeight = props.minHeight || 220;
664
- props.name = props.name || "popUp_" + props.id;
665
- props.source = props.source || null;
666
- props.icon = props.icon || null;
667
- props.iconize = props.iconize || null;
668
- props.maximize = props.maximize || null;
669
- props.isMaximize = props.isMaximize || null;
670
- props.dockable = props.dockable || null;
671
- props.close = props.close || null;
672
- props.raised = props.raised || null;
673
- props.movable = props.movable || null;
674
- props.resizable = props.resizable || null;
675
- props.store = props.store || false;
676
- props.top = props.top ? props.top : "auto";
677
- props.left = props.left ? props.left : "auto";
678
- props.right = props.right ? props.right : "auto";
679
- props.bottom = props.bottom ? props.bottom : "auto";
680
- props.fadeIn = props.fadeIn || 100;
681
- props.fadeOut = props.fadeOut || 100;
682
- larX = props.minWidth;
683
- larY = props.minHeight;
684
- if (props.width < props.minWidth) props.width = props.minWidth;
685
- if (props.height < props.minHeight) props.height = props.minHeight;
686
- if (props.width === "auto") props.width = "100%";
687
- if (props.height === "auto") props.height = "100%";
688
- if ($("#popup").length === 0) {
689
- $('<div id="popup">', "#popup").appendTo("body").css({
690
- "pointer-events": "none",
691
- "z-index": popup.zIndex($("*")) + 1
692
- });
693
- }
694
- if ($(".popup_window_" + props.id, "#popup").length === 0) {
695
- genLayer(props);
696
- }
697
- layerpro.purge(document);
698
- return props;
699
- },
700
- dispatch: (_e) => {
701
- layerpro.popup.store(_e);
702
- },
703
- ///
704
- store: (_element) => {
705
- console.debug(_element);
706
- },
707
- ///
708
- show: (item) => {
709
- item.toggle();
710
- return;
711
- },
712
- ///
713
- vfx: (item, vis, all = false) => {
714
- setTimeout(
715
- () => {
716
- $('[class^="popup_overflow_"]', "#popup").css("opacity", vis == true ? 1 : 0.5).find('[class^="popup_body_"]').css({ "content-visibility": vis == true ? "auto" : "hidden" });
717
- item.css("opacity", 1);
718
- if (!all) $('[class^="popup_body_"]', item).css("content-visibility", "visible");
719
- return;
720
- },
721
- 1
722
- );
723
- dispatchEvent(new Event("layerProResize"));
724
- },
725
- ///
726
- center: (props) => {
727
- const _overflow = $(".popup_overflow_" + props.id, "#popup");
728
- _overflow.css("top", Math.max(0, (Win.height() - _overflow.outerHeight()) / 2 + Win.scrollTop()));
729
- _overflow.css("left", Math.max(0, (Win.width() - _overflow.outerWidth()) / 2 + Win.scrollLeft()));
730
- return;
731
- },
732
- ///
733
- checkArea: (e) => {
734
- const clientX = getClientX(e);
735
- const clientY = getClientY(e);
736
- return [
737
- clientX,
738
- clientY,
739
- Win.scrollLeft(),
740
- Win.scrollTop(),
741
- Win.height(),
742
- Win.width()
743
- ];
744
- },
745
- ///
746
- close: (props) => {
747
- let ob;
748
- if (!props) {
749
- $("#popup").fadeOut(() => {
750
- $(void 0).remove();
751
- });
752
- } else {
753
- typeof props === "object" ? ob = props.id : ob = props;
754
- if (layerpro.popup.unmount) {
755
- layerpro.popup.unmount(String(ob));
756
- }
757
- if (layerpro.popup.cleanupEvents) {
758
- layerpro.popup.cleanupEvents(String(ob));
759
- }
760
- const movableCleanup = movableHandlers.get(String(ob));
761
- if (movableCleanup) {
762
- const moveOptions = { passive: false };
763
- if (movableCleanup.move) document.removeEventListener(getPointerMove(), movableCleanup.move, moveOptions);
764
- if (movableCleanup.up) document.removeEventListener(getPointerUp(), movableCleanup.up, moveOptions);
765
- movableHandlers.delete(String(ob));
766
- }
767
- const resizeCleanup = resizeHandlers.get(String(ob));
768
- if (resizeCleanup) {
769
- const moveOptions = { passive: false };
770
- if (resizeCleanup.move) document.removeEventListener(getPointerMove(), resizeCleanup.move, moveOptions);
771
- if (resizeCleanup.up) document.removeEventListener(getPointerUp(), resizeCleanup.up, moveOptions);
772
- resizeHandlers.delete(String(ob));
773
- }
774
- if (props.raised === true) {
775
- $(".popup_raised_" + ob).fadeOut(props.fadeOut || 500, (e) => {
776
- $(".popup_raised_" + ob).remove();
26
+
27
+ var m, b, _, f, v, g, w, y, z, x, k, C, N, M, T, E, I, O, S, L, A, P, j, H, R, W, D, X, Y, U, K, B, F, q, J, Q, G = u({
28
+ "core/mouseCoords.ts"() {
29
+ i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
30
+ p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
31
+ s = e.pageX, r = e.pageY, [ n, p ]);
32
+ }
33
+ }), V = u({
34
+ "core/message.ts"() {
35
+ m = e => {
36
+ const o = document.createElement("div");
37
+ return o.textContent = e, o.innerHTML;
38
+ }, b = e => {
39
+ const o = m(String(e)), t = window.layerpro.popup.open({
40
+ id: "__alert",
41
+ name: "Warning",
42
+ icon: "&#9888;",
43
+ width: 380,
44
+ height: 220,
45
+ iconize: !1,
46
+ maximize: !1,
47
+ close: !0,
48
+ isMaximize: !1,
49
+ dockable: !1,
50
+ raised: !0,
51
+ movable: !0,
52
+ resizable: !1
53
+ }), i = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${o}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + t.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
54
+ $(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
55
+ window.layerpro.popup.close(t);
777
56
  });
778
- } else {
779
- $(".popup_overflow_" + ob).fadeOut(
780
- props.fadeOut || 500,
781
- function(e) {
782
- $(this).remove();
783
- $(".popup_raised_" + ob).fadeOut(
784
- props.fadeOut || 500,
785
- function(e2) {
786
- $(this).remove();
787
- }
788
- );
789
- }
790
- );
791
- }
792
- }
793
- layerpro.purge(document);
794
- setTimeout(() => popup.removeDock(props), 300);
795
- return;
796
- },
797
- ///
798
- removeDock: (props) => {
799
- $(".icon_" + props.id).remove();
800
- if ($('[class^="popup_overflow_"]', "#popup").length < 1) {
801
- $("#root").css("margin", "0");
802
- $("#popup_dock").remove();
803
- }
804
- return;
805
- },
806
- ///
807
- iconize: (props) => {
808
- const _overflow = $(".popup_overflow_" + props.id, "#popup");
809
- if (_overflow.find("[class^=popup_window_]").hasClass("zHigh") === false) return;
810
- popup.vfx(_overflow, false, true);
811
- if (!_overflow.data("iconize")) {
812
- _overflow.animate(
813
- {
814
- top: "100%",
815
- left: $(".icon_" + props.id, "#popup_dock").offset().left + 15,
816
- width: 0,
817
- height: 0,
818
- opacity: 0
819
- },
820
- 200,
821
- () => popup.vfx(_overflow, true)
822
- );
823
- _overflow.data(
824
- "iconize",
825
- {
826
- y: _overflow.offset().top,
827
- x: _overflow.offset().left,
828
- w: _overflow.width(),
829
- h: _overflow.height()
830
- },
831
- 200
832
- );
833
- } else if (_overflow.data("iconize")) {
834
- const s = _overflow.data("iconize");
835
- _overflow.animate(
836
- {
837
- top: s.y,
838
- left: s.x,
839
- width: s.w,
840
- height: s.h,
841
- opacity: 1
842
- },
843
- () => popup.vfx(_overflow, true)
844
- );
845
- _overflow.removeData("iconize");
846
- }
847
- return;
848
- },
849
- ///
850
- maximize: (props) => {
851
- const _overflow = $(".popup_overflow_" + props.id, "#popup"), _resize = $('[class^="resize_"]', _overflow), _dragger = $('[class^="popup_drag_"]', _overflow), gap = 6;
852
- popup.vfx(_overflow, false, true);
853
- if (!_overflow.data("store")) {
854
- _overflow.data("store", {
855
- y: _overflow.offset().top,
856
- x: _overflow.offset().left,
857
- w: _overflow.width(),
858
- h: _overflow.height()
859
- });
860
- _overflow.animate(
861
- {
862
- position: "absolute",
863
- top: -gap,
864
- left: -gap,
865
- right: -gap,
866
- bottom: -gap,
867
- width: Win.width() + gap * 2,
868
- height: Win.height() + gap * 2 - 45
869
- },
870
- () => {
871
- Win.on("layerProResize.eventItem", (e) => {
872
- _overflow.css({
873
- width: Win.width() + gap * 2,
874
- height: Win.height() + gap * 2 - 40
57
+ }, _ = (e, o) => {
58
+ const t = m(String(e)), i = window.layerpro.popup.open({
59
+ id: "__message",
60
+ name: "Message",
61
+ icon: "&#9965;",
62
+ width: 380,
63
+ height: 220,
64
+ iconize: !1,
65
+ maximize: !1,
66
+ close: !0,
67
+ isMaximize: !1,
68
+ dockable: !1,
69
+ raised: !0,
70
+ movable: !0,
71
+ resizable: !1
72
+ }), n = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${t}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + i.id}" type="button">CLOSE</button>\n </div>\n </div>\n `;
73
+ $(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
74
+ o && o(), window.layerpro.popup.close(i);
75
+ });
76
+ }, f = (e, o, t) => {
77
+ if (0 === $(".confirm").length) {
78
+ const i = m(String(e)), n = window.layerpro.popup.open({
79
+ id: "__confirm",
80
+ name: "Confirm",
81
+ icon: "&#9745;",
82
+ width: 380,
83
+ height: 220,
84
+ iconize: !1,
85
+ maximize: !1,
86
+ close: !0,
87
+ isMaximize: !1,
88
+ dockable: !1,
89
+ raised: !0,
90
+ movable: !0,
91
+ resizable: !1
92
+ }), p = `\n <div class='popup_prompt'>\n <div class="popup_message_body">\n <center>${i}</center>\n </div>\n <div class="buttons">\n <button id="${"a_" + n.id}" type="button">CONFIRM</button>\n <button id="${"b_" + n.id}" type="button">CANCEL</button>\n </div>\n </div>\n `;
93
+ $(".popup_body_" + n.id).html(p), $("#a_" + n.id).on("click", () => {
94
+ o && o(), window.layerpro.popup.close(n);
95
+ }), $("#b_" + n.id).on("click", () => {
96
+ t && t(), window.layerpro.popup.close(n);
875
97
  });
876
- });
877
- _dragger.css("pointer-events", "none");
878
- _resize.off(getPointerDown());
879
- popup.vfx(_overflow, true, true);
880
98
  }
881
- );
882
- } else if (_overflow.data("store")) {
883
- const s = _overflow.data("store");
884
- _overflow.animate(
885
- {
886
- top: s.y,
887
- left: s.x,
888
- width: s.w,
889
- height: s.h
99
+ }, v = (e, o) => {
100
+ const t = o || "_prompt", i = m(String(e)), n = window.layerpro.popup.open({
101
+ id: "__prompt",
102
+ name: "Prompt",
103
+ icon: "&#9998;",
104
+ width: 380,
105
+ height: 220,
106
+ iconize: !1,
107
+ maximize: !1,
108
+ close: !0,
109
+ isMaximize: !1,
110
+ dockable: !1,
111
+ raised: !0,
112
+ movable: !0,
113
+ resizable: !1
114
+ }), p = `\n <div class='popup_prompt'>\n\n <div class="popup_message_body">\n <center>\n ${i}\n </center>\n </div>\n\n <input id="input_${n.id}" type="text" placeholder="write here" />\n <br/>\n\n <div class="buttons">\n <button id="a_${n.id}" type="button">OK</button>\n <button id="b_${n.id}" type="button">CANCEL</button>\n </div>\n\n </div>\n `;
115
+ $(".popup_body_" + n.id).html(p), $("#input_" + n.id).on("focus", function() {
116
+ $(this).attr("placeholder", "");
117
+ }).on("blur", function() {
118
+ $(this).attr("placeholder", "write here");
119
+ }), $("#a_" + n.id).on("click", () => {
120
+ if ($("#input_" + n.id).val() > "") {
121
+ "function" == typeof t && t();
122
+ if (String(t) === t) return JSON.stringify($("#input_" + n.id).val());
123
+ window.layerpro.popup.close(n);
124
+ } else alert("input can't be empty!");
125
+ }), $("#b_" + n.id).on("click", () => {
126
+ window.layerpro.popup.close(n);
127
+ });
128
+ }, window.message = (e, o) => window.layerpro.message(e, o), window.alert = e => window.layerpro.alert(e),
129
+ window.confirm = (e, o, t) => window.layerpro.confirm(e, o, t), window.prompt = (e, o, t) => window.layerpro.prompt(e, o, t),
130
+ Object.defineProperty(window, "alert", {
131
+ enumerable: !1
132
+ }), Object.defineProperty(window, "prompt", {
133
+ enumerable: !1
134
+ }), Object.defineProperty(window, "message", {
135
+ enumerable: !1
136
+ }), Object.defineProperty(window, "confirm", {
137
+ enumerable: !1
138
+ }), Object.defineProperties(window.layerpro, {
139
+ prompt: {
140
+ value: v
141
+ },
142
+ alert: {
143
+ value: b
890
144
  },
891
- () => {
892
- _dragger.css("pointer-events", "auto");
893
- _resize.on(getPointerDown(), function(e) {
894
- popup.resizeModals(e, this, props);
895
- });
896
- Win.off("layerProResize.eventItem");
897
- popup.vfx(_overflow, true);
145
+ message: {
146
+ value: _
147
+ },
148
+ confirm: {
149
+ value: f
898
150
  }
899
- );
900
- _overflow.removeData("store");
901
- }
902
- return;
903
- },
904
- ///
905
- movable: (props) => {
906
- if (props.movable === false) return;
907
- const idStr = String(props.id), _overflow = $(".popup_overflow_" + props.id, "#popup"), _dragger = $(".popup_drag_" + props.id, _overflow), _body = $(".popup_body_" + props.id, _overflow);
908
- _overflow.css("touch-action", "none");
909
- let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
910
- const elementDrag = (e) => {
911
- e.preventDefault();
912
- const clientX = getClientX(e);
913
- const clientY = getClientY(e);
914
- pos1 = pos3 - clientX;
915
- pos2 = pos4 - clientY;
916
- pos3 = clientX;
917
- pos4 = clientY;
918
- if (popup.checkArea(e)[1] < popup.checkArea(e)[4] && Math.sign(popup.checkArea(e)[1]) === 1) _overflow.css("top", _overflow.offset().top - pos2);
919
- if (popup.checkArea(e)[0] < popup.checkArea(e)[5] && Math.sign(popup.checkArea(e)[0]) === 1) _overflow.css("left", _overflow.offset().left - pos1);
920
- return;
921
- }, elementDragEnd = (e) => {
922
- const moveOptions = { passive: false };
923
- document.removeEventListener(getPointerMove(), elementDrag, moveOptions);
924
- document.removeEventListener(getPointerUp(), elementDragEnd, moveOptions);
925
- movableHandlers.delete(idStr);
926
- _body.css("pointer-events", "auto");
927
- popup.vfx(_overflow, true);
928
- return;
929
- };
930
- movableHandlers.set(idStr, { move: elementDrag, up: elementDragEnd });
931
- const downOptions = { passive: false };
932
- _dragger[0].addEventListener(getPointerDown(), (e) => {
933
- e.preventDefault();
934
- _body.css("pointer-events", "none");
935
- dragMouseDown(e);
936
- popup.vfx(_overflow, false);
937
- }, downOptions);
938
- if (props.maximize) {
939
- _dragger.on("dblclick", (e) => {
940
- layerpro.popup.maximize(props);
941
- });
942
- }
943
- const dragMouseDown = (e) => {
944
- pos3 = getClientX(e);
945
- pos4 = getClientY(e);
946
- const moveOptions = { passive: false };
947
- document.addEventListener(getPointerMove(), elementDrag, moveOptions);
948
- document.addEventListener(getPointerUp(), elementDragEnd, moveOptions);
949
- return;
950
- };
951
- return;
952
- },
953
- ///
954
- resizable: (props) => {
955
- if (!props.resizable) return;
956
- const idStr = String(props.id), _overflow = $(".popup_overflow_" + props.id, "#popup");
957
- for (let i = 4; i--; ) {
958
- $(`<div class='resize_${i}'>`, _overflow).appendTo(_overflow).css("touch-action", "none");
959
- $(`<div class='resize_corner_${i}'>`, _overflow).appendTo(_overflow).css("touch-action", "none");
960
- }
961
- const handleDown = function(e) {
962
- popup.resizeModals(e, this, props);
963
- }, existingHandlers = resizeHandlers.get(idStr) || {};
964
- existingHandlers.down = handleDown;
965
- resizeHandlers.set(idStr, existingHandlers);
966
- const downOptions = { passive: false };
967
- $("[class^=resize_]").each((_i, el) => {
968
- el.addEventListener(getPointerDown(), (e) => {
969
- e.preventDefault();
970
- popup.resizeModals(e, el, props);
971
- }, downOptions);
972
151
  });
973
- return;
974
- },
975
- ///
976
- resizeModals: (e, id, props) => {
977
- const _sizer = $(id), _parent = _sizer.parent(), idStr = String(props.id);
978
- const clientX = getClientX(e);
979
- const clientY = getClientY(e);
980
- const cords = [clientX - Win.scrollLeft(), clientY - Win.scrollTop()];
981
- if (props.minWidth) ;
982
- Body.css("pointer-events", "none");
983
- _parent.css("pointer-events", "none");
984
- popup.vfx(_parent, false);
985
- const doResHandler = (e2) => {
986
- popup.doRes(e2, id);
987
- }, stopResHandler = (e2) => {
988
- popup.stopRes(id);
989
- }, existingHandlers = resizeHandlers.get(idStr) || {};
990
- existingHandlers.move = doResHandler;
991
- existingHandlers.up = stopResHandler;
992
- resizeHandlers.set(idStr, existingHandlers);
993
- const moveOptions = { passive: false };
994
- document.addEventListener(getPointerMove(), doResHandler, moveOptions);
995
- document.addEventListener(getPointerUp(), stopResHandler, moveOptions);
996
- startX = cords[0];
997
- startY = cords[1];
998
- startWidth = _parent.width();
999
- startHeight = _parent.height();
1000
- startLeft = _parent.position().left;
1001
- startTop = _parent.position().top;
1002
- startBottom = startTop + startHeight + 1;
1003
- startRight = startLeft + startWidth + 1;
1004
- isResizable = id;
1005
- return;
1006
- },
1007
- ///
1008
- doRes: (e, id) => {
1009
- dispatchEvent(new Event("layerProResize"));
1010
- const _sizer = $(id), _parent = _sizer.parent();
1011
- const clientX = getClientX(e);
1012
- const clientY = getClientY(e);
1013
- const cords = [clientX - Win.scrollLeft(), clientY - Win.scrollTop()];
1014
- if (id === isResizable) {
1015
- let X = startWidth + cords[0] - startX, Y = startHeight + cords[1] - startY;
1016
- const X1 = startWidth - cords[0] + startX, Y1 = startHeight - cords[1] + startY;
1017
- if (X <= 0) {
1018
- X = 0;
1019
- }
1020
- if (Y <= 0) {
1021
- Y = 0;
1022
- }
1023
- if (popup.checkArea(e)[1] < popup.checkArea(e)[4] && Math.sign(popup.checkArea(e)[1]) === 1) {
1024
- if (_sizer.hasClass("resize_0")) {
1025
- if (_parent.height() <= larY && Y1 > larY) {
1026
- _parent.css({ "height": Number(larY + 1) });
1027
- }
1028
- if (_parent.height() > larY && larY <= Y1) {
1029
- _parent.css({ "top": Number(startBottom - Y1), "height": parseInt(Y1) });
1030
- }
1031
- }
1032
- }
1033
- if (popup.checkArea(e)[0] < popup.checkArea(e)[5] && Math.sign(popup.checkArea(e)[0]) === 1) {
1034
- if (_sizer.hasClass("resize_1")) {
1035
- if (_parent.width() >= larX) {
1036
- _parent.css({ "width": Number(X), "right": Number(startLeft - X) });
1037
- }
1038
- if (_parent.width() <= larX) {
1039
- _parent.css({ "width": Number(larX + 1) });
1040
- }
152
+ }
153
+ }), Z = u({
154
+ "core/genLayer.ts"() {
155
+ V(), g = new Map, w = new Map, y = e => {
156
+ const o = document.createElement("div");
157
+ return o.textContent = e, o.innerHTML;
158
+ }, z = o => {
159
+ if ("function" == typeof o.body) return;
160
+ const t = e => {
161
+ if (null === e || "object" != typeof e) return !1;
162
+ return "$typeof" in e || "type" in e;
163
+ }, i = !0 === o.raised ? ".popup_raised_" + o.id : "#popup";
164
+ $('[class^="popup_window_"]', i).removeClass("zHigh"), $('[class^="popup_bar_"]', i).removeClass("popup_bar_selected"),
165
+ $('[class^="icon_"]', i).removeClass("popup_bar_selected"), !0 === o.raised && $('<div class="popup_raised_' + o.id + '">', i).appendTo("#popup").css({
166
+ "pointer-events": "auto",
167
+ "z-index": Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', i))) + 1e3
168
+ }), $('<div class="popup_overflow_' + o.id + '">', i).appendTo(i).css({
169
+ top: o.top,
170
+ left: o.left,
171
+ right: o.right,
172
+ bottom: o.bottom,
173
+ width: o.width,
174
+ height: o.height,
175
+ minWidth: o.minWidth,
176
+ minHeight: o.minHeight,
177
+ maxWidth: o.maxWidth,
178
+ maxHeight: o.maxHeight,
179
+ pointerEvents: "auto",
180
+ zIndex: Number(layerpro.popup.zIndex($('[class^="popup_overflow_"]', i))) + 1
181
+ }).on("mousedown", e => {
182
+ layerpro.popup.index(o);
183
+ }).hide().fadeIn(o.fadeIn);
184
+ const n = $('<div class="popup_window_' + o.id + '">', i).appendTo(".popup_overflow_" + o.id).css({
185
+ "pointer-events": "auto"
186
+ }).addClass("zHigh").addClass(o.class);
187
+ 0 === [ o.top, o.left, o.bottom, o.right ].reduce((e, o) => "number" == typeof o && isFinite(o) ? Number(e) + o : e, 0) && layerpro.popup.center(o),
188
+ layerpro.popup.unmount = e => {
189
+ const o = g.get(e);
190
+ o && (o.unmount(), g.delete(e));
191
+ }, layerpro.popup.cleanupEvents = e => {
192
+ const o = w.get(e);
193
+ o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
194
+ o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
195
+ o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
196
+ w.delete(e));
197
+ }, layerpro.popup.getReactRoot = e => g.get(e), $('<div class="popup_bar_' + o.id + '">', i).appendTo(n).addClass("popup_bar_selected"),
198
+ o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", i).appendTo(".popup_bar_" + o.id);
199
+ const p = y(String(o.name));
200
+ if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", i).appendTo(".popup_bar_" + o.id),
201
+ $('<div class="popup_option_' + o.id + '">', i).appendTo(".popup_bar_" + o.id),
202
+ !0 === o.iconize && 0 === $("#popup_dock").length) {
203
+ $("#root").css("margin", "0 0 var( --dock-height ) 0");
204
+ $('\n <div id="popup_dock">\n <div id="popup_dock_icon"></div>\n <div id="popup_dock_list"></div>\n <div id="popup_dock_options"></div>\n </div>\n ').appendTo("#popup").css({
205
+ pointerEvents: "auto",
206
+ zIndex: Number(layerpro.popup.zIndex($("#popup"))) + 1e3
207
+ });
1041
208
  }
1042
- }
1043
- if (popup.checkArea(e)[1] < popup.checkArea(e)[4] && Math.sign(popup.checkArea(e)[1]) === 1) {
1044
- if (_sizer.hasClass("resize_2")) {
1045
- if (_parent.height() >= larY) {
1046
- _parent.css({ "height": Number(Y) });
1047
- }
1048
- if (_parent.height() <= larY && Y > larY) {
1049
- _parent.css({ "height": Number(larY + 1) });
1050
- }
209
+ if ($("#popup_dock").length > 0 && !0 === o.dockable) {
210
+ const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${p}</span>\n `, i = function(e) {
211
+ $(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
212
+ layerpro.popup.index(o);
213
+ }, n = function(e) {
214
+ o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
215
+ };
216
+ w.set(e, {
217
+ iconClick: !0,
218
+ iconClose: !0
219
+ }), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
220
+ $(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
1051
221
  }
1052
- }
1053
- if (popup.checkArea(e)[0] < popup.checkArea(e)[5] && Math.sign(popup.checkArea(e)[0]) === 1) {
1054
- if (_sizer.hasClass("resize_3")) {
1055
- if (_parent.width() <= larX && X1 > larX) {
1056
- _parent.css({ "width": Number(larX + 1) });
1057
- }
1058
- if (_parent.width() > larX && larX <= X1) {
1059
- _parent.css({ "width": parseInt(X1), "left": Number(startRight - X1) });
1060
- }
222
+ if (!0 === o.iconize) {
223
+ const e = String(o.id), t = function(e) {
224
+ layerpro.popup.iconize(o);
225
+ }, i = w.get(e) || {};
226
+ i.buttonIconize = !0, w.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
1061
227
  }
1062
- }
1063
- if (popup.checkArea(e)[1] < popup.checkArea(e)[4] && popup.checkArea(e)[0] < popup.checkArea(e)[5] && Math.sign(popup.checkArea(e)[0]) === 1 && Math.sign(popup.checkArea(e)[1]) === 1) {
1064
- if (_sizer.hasClass("resize_corner_0")) {
1065
- if (_parent.height() >= larY && Y1 > larY) {
1066
- _parent.css({ "top": Number(startBottom - Y1), "height": parseInt(Y1) });
1067
- }
1068
- if (_parent.height() <= larY && Y1 > larY) {
1069
- _parent.css({ "height": Number(larY + 1) });
1070
- }
1071
- if (_parent.width() >= larX && X1 > larX) {
1072
- _parent.css({ "width": parseInt(X1), "left": Number(startRight - X1) });
1073
- }
1074
- if (_parent.width() <= larX && X1 > larX) {
1075
- _parent.css({ "width": Number(larX + 1) });
1076
- }
228
+ if (!0 === o.maximize) {
229
+ const e = String(o.id), t = function(e) {
230
+ layerpro.popup.maximize(o);
231
+ }, i = w.get(e) || {};
232
+ i.buttonMaximize = !0, w.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
1077
233
  }
1078
- if (_sizer.hasClass("resize_corner_1")) {
1079
- if (_parent.height() >= larY && Y1 > larY) {
1080
- _parent.css({ "top": Number(startBottom - Y1), "height": Number(Y1) });
1081
- }
1082
- if (_parent.height() <= larY && Y1 > larY) {
1083
- _parent.css({ "height": Number(larY + 1) });
1084
- }
1085
- if (_parent.width() >= larX) {
1086
- _parent.css({ "width": Number(X), "right": Number(startLeft - X) });
1087
- }
1088
- if (_parent.width() <= larX && X1 > larX) {
1089
- _parent.css({ "width": Number(larX + 1) });
1090
- }
234
+ if (!0 === o.close) {
235
+ const e = String(o.id), t = function(e) {
236
+ o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
237
+ }, i = w.get(e) || {};
238
+ i.buttonClose = !0, w.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
1091
239
  }
1092
- if (_sizer.hasClass("resize_corner_2")) {
1093
- if (_parent.height() >= larY) {
1094
- _parent.css({ "height": Number(Y) });
1095
- }
1096
- if (_parent.height() <= larY && Y > larY) {
1097
- _parent.css({ "height": Number(larY + 1) });
1098
- }
1099
- if (_parent.width() >= larX) {
1100
- _parent.css({ "width": Number(X), "right": Number(startLeft - X) });
1101
- }
1102
- if (_parent.width() <= larX) {
1103
- _parent.css({ "width": Number(larX + 1) });
1104
- }
240
+ const s = String(o.id), r = w.get(s) || {};
241
+ if (r.escKey = !0, w.set(s, r), $(document).on("keydown", function(e) {
242
+ "Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
243
+ layerpro.popup.close(o));
244
+ }), o.timer > 0) {
245
+ const e = {};
246
+ e[String(`st_${o.id}`)] = setTimeout(() => {
247
+ layerpro.popup.close(o), clearTimeout(e[String(`st_${o.id}`)]);
248
+ }, o.timer);
1105
249
  }
1106
- if (_sizer.hasClass("resize_corner_3")) {
1107
- if (_parent.height() >= larY && Y > larY) {
1108
- _parent.css({ "height": Number(Y) });
1109
- }
1110
- if (_parent.height() <= larY && Y > larY) {
1111
- _parent.css({ "height": Number(larY + 1) });
1112
- }
1113
- if (_parent.width() >= larX && X1 > larX) {
1114
- _parent.css({ "width": Number(X1), "left": Number(startRight - X1) });
1115
- }
1116
- if (_parent.width() <= larX && X1 > larX) {
1117
- _parent.css({ "width": Number(larX + 1) });
1118
- }
250
+ if (o.source) {
251
+ const e = $(".popup_body_" + o.id), t = String(o.source);
252
+ try {
253
+ const e = new URL(t, window.location.origin);
254
+ if ("https:" !== e.protocol && "http:" !== e.protocol && "" !== e.protocol) return;
255
+ } catch {
256
+ return;
257
+ }
258
+ fetch(t, {
259
+ mode: "same-origin"
260
+ }).then(e => {
261
+ if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
262
+ return e.text();
263
+ }).then(t => {
264
+ const i = y(t);
265
+ e.hide().html(i).fadeIn(o.fadeIn);
266
+ }).catch(e => {});
1119
267
  }
1120
- }
1121
- }
1122
- return;
1123
- },
1124
- ///
1125
- stopRes: (id) => {
1126
- const _sizer = $(id), _parent = _sizer.parent();
1127
- Body.css("pointer-events", "auto");
1128
- _parent.css("pointer-events", "auto");
1129
- popup.vfx(_parent, true);
1130
- isResizable = false;
1131
- const resizeCleanup = resizeHandlers.get(String(id));
1132
- if (resizeCleanup) {
1133
- const moveOptions = { passive: false };
1134
- if (resizeCleanup.move) document.removeEventListener(getPointerMove(), resizeCleanup.move, moveOptions);
1135
- if (resizeCleanup.up) document.removeEventListener(getPointerUp(), resizeCleanup.up, moveOptions);
1136
- resizeHandlers.delete(String(id));
1137
- }
1138
- return;
1139
- },
1140
- ///
1141
- index: (props) => {
1142
- const _overflow = $('[class^="popup_overflow_"]', "#popup");
1143
- $('[class^="popup_window_"]', "#popup").removeClass("zHigh");
1144
- $('[class^="popup_bar_"]', "#popup").removeClass("popup_bar_selected");
1145
- $('[class^="icon_"]', "#popup").removeClass("popup_bar_selected");
1146
- _overflow.each(
1147
- function() {
1148
- $(this, "#popup").css("zIndex", $(this, "#popup")[0].style.zIndex - 1);
1149
- }
1150
- );
1151
- $(".icon_" + props.id, "#popup").addClass("popup_bar_selected");
1152
- $(".popup_overflow_" + props.id, "#popup").css("zIndex", popup.zIndex(_overflow));
1153
- $(".popup_bar_" + props.id, "#popup").addClass("popup_bar_selected");
1154
- $(".popup_window_" + props.id, "#popup").addClass("zHigh");
1155
- return;
1156
- },
1157
- ///
1158
- zIndex: (els) => {
1159
- els.each(
1160
- function() {
1161
- const currentIndex = parseInt($(this, "#popup").css("zIndex"), 10);
1162
- if (currentIndex > highIndex) highIndex = currentIndex;
1163
- }
1164
- );
1165
- return highIndex + 1;
1166
- }
1167
- };
1168
- Object.defineProperty(
1169
- layerpro,
1170
- "popup",
1171
- {
1172
- value: popup,
1173
- writable: false,
1174
- configurable: false
1175
- }
1176
- );
1177
- }
1178
- });
1179
- var purge;
1180
- var init_purge = __esm({
1181
- "core/purge.ts"() {
1182
- purge = (d) => {
1183
- let a = d.attributes, index, l, n;
1184
- if (a) {
1185
- l = a.length;
1186
- for (index = 0; index < l; index += 1) {
1187
- n = a[index].name;
1188
- if (typeof d[n] === "function") ;
1189
- }
1190
- }
1191
- a = d.childNodes;
1192
- if (a) {
1193
- l = a.length;
1194
- for (index = 0; index < l; index += 1) {
1195
- layerpro.purge(d.childNodes[index]);
268
+ o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
269
+ o.isMaximize && layerpro.popup.maximize(o);
270
+ const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
271
+ $('<div class="popup_internal_' + o.id + '">', c).appendTo(n), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
272
+ (() => {
273
+ if (o.body && !o.source) if (t(o.body)) {
274
+ const i = document.querySelector(".popup_body_" + o.id);
275
+ if (!i) return;
276
+ try {
277
+ if (!t(o.body)) return;
278
+ const n = e(i);
279
+ n.render(o.body), g.set(String(o.id), n);
280
+ } catch (e) {}
281
+ } else if ("string" == typeof o.body && o.body.trim().startsWith("<")) {
282
+ const e = y(o.body);
283
+ $(".popup_body_" + o.id).html(e).fadeIn(o.fadeIn);
284
+ } else {
285
+ const e = y(String(o.body));
286
+ $(".popup_body_" + o.id).text(e).fadeIn(o.fadeIn);
287
+ }
288
+ })(), (() => {
289
+ if (o.buttons) {
290
+ if ($('<div class="buttons"></div>').appendTo(".popup_body_" + o.id), o.buttons.confirm) {
291
+ const e = $(`<button id="lp_confirm" type="button">\n ${o.buttons.confirm.text.toUpperCase()}\n </button>`).appendTo(".buttons");
292
+ o.buttons.confirm.cb && e.click(() => {
293
+ o.buttons?.confirm?.cb?.(), layerpro.popup.close(o);
294
+ });
295
+ }
296
+ o.buttons.cancel && $(`<button id="lp_cancel" type="button">\n ${o.buttons.cancel.text.toUpperCase()}\n </button>`).appendTo(".buttons").click(() => {
297
+ o.buttons?.cancel?.cb?.(), layerpro.popup.close(o);
298
+ });
299
+ }
300
+ })();
301
+ });
302
+ };
303
+ }
304
+ }), ee = u({
305
+ "core/mobile.ts"() {
306
+ if (x = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
307
+ k = () => {
308
+ if ("undefined" == typeof navigator) return !1;
309
+ const e = navigator.userAgent;
310
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
311
+ }, C = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (N = () => {
312
+ if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
313
+ const e = k() || x();
314
+ return C() && e ? "touch" : "mouse";
315
+ })(), M = !x(), "undefined" != typeof window) {
316
+ const e = window.matchMedia("(max-width: 1024px)"), o = () => {
317
+ const e = N(), o = !x();
318
+ M !== o && (M = o);
319
+ };
320
+ let t;
321
+ e.addListener ? e.addListener(o) : e.addEventListener("change", o), window.addEventListener("resize", () => {
322
+ clearTimeout(t), t = setTimeout(o, 150);
323
+ });
1196
324
  }
1197
- }
1198
- };
1199
- Object.defineProperty(
1200
- layerpro,
1201
- "purge",
1202
- {
1203
- value: new Proxy(purge, {}),
1204
- writable: false,
1205
- configurable: false
1206
- }
1207
- );
1208
- }
325
+ T = () => "pointerdown", E = () => "pointermove", I = () => "pointerup", O = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
326
+ S = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
327
+ }
1209
328
  });
1210
- var init_window = __esm({
1211
- "core/window.ts"() {
1212
- window.offScreenBuffering = true;
1213
- addEventListener(
1214
- "wheel",
1215
- (e) => {
1216
- },
1217
- {
1218
- capture: true,
1219
- passive: true
1220
- }
1221
- );
1222
- }
329
+
330
+ l({}, {
331
+ popup: () => Q
1223
332
  });
1224
- globalThis.$ = $2;
1225
- globalThis.jQuery = $2;
1226
- var run = () => {
1227
- if (window.layerpro) return;
1228
- Object.defineProperty(
1229
- window,
1230
- "layerpro",
1231
- {
1232
- value: {},
1233
- writable: false,
1234
- configurable: false,
1235
- enumerable: false
333
+
334
+ var oe, te = u({
335
+ "core/properties.ts"() {
336
+ Z(), ee(), L = 250, A = 150, j = 1, B = new Map, F = new Map, q = $(window), J = $("body"),
337
+ Q = {
338
+ open: e => {
339
+ if (e) return e.id = e.id || Math.round(1e3 * Math.random()), e.body = e.body || "",
340
+ e.class = e.class || "", e.width = e.width || 300, e.height = e.height || 200, e.minWidth = e.minWidth || 340,
341
+ e.minHeight = e.minHeight || 220, e.name = e.name || "popUp_" + e.id, e.source = e.source || null,
342
+ e.icon = e.icon || null, e.iconize = e.iconize || null, e.maximize = e.maximize || null,
343
+ e.isMaximize = e.isMaximize || null, e.dockable = e.dockable || null, e.close = e.close || null,
344
+ e.raised = e.raised || null, e.movable = e.movable || null, e.resizable = e.resizable || null,
345
+ e.store = e.store || !1, e.top = e.top ? e.top : "auto", e.left = e.left ? e.left : "auto",
346
+ e.right = e.right ? e.right : "auto", e.bottom = e.bottom ? e.bottom : "auto", e.fadeIn = e.fadeIn || 100,
347
+ e.fadeOut = e.fadeOut || 100, L = e.minWidth, A = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
348
+ e.height < e.minHeight && (e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
349
+ "auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
350
+ "pointer-events": "none",
351
+ "z-index": Q.zIndex($("*")) + 1
352
+ }), 0 === $(".popup_window_" + e.id, "#popup").length && z(e), layerpro.purge(document),
353
+ e;
354
+ },
355
+ dispatch: e => {
356
+ layerpro.popup.store(e);
357
+ },
358
+ store: e => {},
359
+ show: e => {
360
+ e.toggle();
361
+ },
362
+ vfx: (e, o, t = !1) => {
363
+ setTimeout(() => {
364
+ $('[class^="popup_overflow_"]', "#popup").css("opacity", 1 == o ? 1 : .5).find('[class^="popup_body_"]').css({
365
+ "content-visibility": 1 == o ? "auto" : "hidden"
366
+ }), e.css("opacity", 1), t || $('[class^="popup_body_"]', e).css("content-visibility", "visible");
367
+ }, 1), dispatchEvent(new Event("layerProResize"));
368
+ },
369
+ center: e => {
370
+ const o = $(".popup_overflow_" + e.id, "#popup");
371
+ o.css("top", Math.max(0, (q.height() - o.outerHeight()) / 2 + q.scrollTop())), o.css("left", Math.max(0, (q.width() - o.outerWidth()) / 2 + q.scrollLeft()));
372
+ },
373
+ checkArea: e => [ O(e), S(e), q.scrollLeft(), q.scrollTop(), q.height(), q.width() ],
374
+ close: e => {
375
+ let o;
376
+ if (e) {
377
+ o = "object" == typeof e ? e.id : e, layerpro.popup.unmount && layerpro.popup.unmount(String(o)),
378
+ layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(o));
379
+ const t = B.get(String(o));
380
+ if (t) {
381
+ const e = {
382
+ passive: !1
383
+ };
384
+ t.move && document.removeEventListener(E(), t.move, e), t.up && document.removeEventListener(I(), t.up, e),
385
+ B.delete(String(o));
386
+ }
387
+ const i = F.get(String(o));
388
+ if (i) {
389
+ const e = {
390
+ passive: !1
391
+ };
392
+ i.move && document.removeEventListener(E(), i.move, e), i.up && document.removeEventListener(I(), i.up, e),
393
+ F.delete(String(o));
394
+ }
395
+ !0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
396
+ $(".popup_raised_" + o).remove();
397
+ }) : $(".popup_overflow_" + o).fadeOut(e.fadeOut || 500, function(t) {
398
+ $(this).remove(), $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, function(e) {
399
+ $(this).remove();
400
+ });
401
+ });
402
+ } else $("#popup").fadeOut(() => {
403
+ $(void 0).remove();
404
+ });
405
+ layerpro.purge(document), setTimeout(() => Q.removeDock(e), 300);
406
+ },
407
+ removeDock: e => {
408
+ $(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
409
+ $("#popup_dock").remove());
410
+ },
411
+ iconize: e => {
412
+ const o = $(".popup_overflow_" + e.id, "#popup");
413
+ if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (Q.vfx(o, !1, !0),
414
+ o.data("iconize")) {
415
+ if (o.data("iconize")) {
416
+ const e = o.data("iconize");
417
+ o.animate({
418
+ top: e.y,
419
+ left: e.x,
420
+ width: e.w,
421
+ height: e.h,
422
+ opacity: 1
423
+ }, () => Q.vfx(o, !0)), o.removeData("iconize");
424
+ }
425
+ } else o.animate({
426
+ top: "100%",
427
+ left: $(".icon_" + e.id, "#popup_dock").offset().left + 15,
428
+ width: 0,
429
+ height: 0,
430
+ opacity: 0
431
+ }, 200, () => Q.vfx(o, !0)), o.data("iconize", {
432
+ y: o.offset().top,
433
+ x: o.offset().left,
434
+ w: o.width(),
435
+ h: o.height()
436
+ }, 200);
437
+ },
438
+ maximize: e => {
439
+ const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
440
+ if (Q.vfx(o, !1, !0), o.data("store")) {
441
+ if (o.data("store")) {
442
+ const n = o.data("store");
443
+ o.animate({
444
+ top: n.y,
445
+ left: n.x,
446
+ width: n.w,
447
+ height: n.h
448
+ }, () => {
449
+ i.css("pointer-events", "auto"), t.on(T(), function(o) {
450
+ Q.resizeModals(o, this, e);
451
+ }), q.off("layerProResize.eventItem"), Q.vfx(o, !0);
452
+ }), o.removeData("store");
453
+ }
454
+ } else o.data("store", {
455
+ y: o.offset().top,
456
+ x: o.offset().left,
457
+ w: o.width(),
458
+ h: o.height()
459
+ }), o.animate({
460
+ position: "absolute",
461
+ top: -6,
462
+ left: -6,
463
+ right: -6,
464
+ bottom: -6,
465
+ width: q.width() + 12,
466
+ height: q.height() + 12 - 45
467
+ }, () => {
468
+ q.on("layerProResize.eventItem", e => {
469
+ o.css({
470
+ width: q.width() + 12,
471
+ height: q.height() + 12 - 40
472
+ });
473
+ }), i.css("pointer-events", "none"), t.off(T()), Q.vfx(o, !0, !0);
474
+ });
475
+ },
476
+ movable: e => {
477
+ if (!1 === e.movable) return;
478
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup"), i = $(".popup_drag_" + e.id, t), n = $(".popup_body_" + e.id, t);
479
+ t.css("touch-action", "none");
480
+ let p = 0, s = 0, r = 0, c = 0;
481
+ const a = e => {
482
+ e.preventDefault();
483
+ const o = O(e), i = S(e);
484
+ p = r - o, s = c - i, r = o, c = i, Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.css("top", t.offset().top - s),
485
+ Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.css("left", t.offset().left - p);
486
+ }, d = e => {
487
+ const i = {
488
+ passive: !1
489
+ };
490
+ document.removeEventListener(E(), a, i), document.removeEventListener(I(), d, i),
491
+ B.delete(o), n.css("pointer-events", "auto"), Q.vfx(t, !0);
492
+ };
493
+ B.set(o, {
494
+ move: a,
495
+ up: d
496
+ });
497
+ i[0].addEventListener(T(), e => {
498
+ e.preventDefault(), n.css("pointer-events", "none"), u(e), Q.vfx(t, !1);
499
+ }, {
500
+ passive: !1
501
+ }), e.maximize && i.on("dblclick", o => {
502
+ layerpro.popup.maximize(e);
503
+ });
504
+ const u = e => {
505
+ r = O(e), c = S(e);
506
+ const o = {
507
+ passive: !1
508
+ };
509
+ document.addEventListener(E(), a, o), document.addEventListener(I(), d, o);
510
+ };
511
+ },
512
+ resizable: e => {
513
+ if (!e.resizable) return;
514
+ const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup");
515
+ for (let e = 4; e--; ) $(`<div class='resize_${e}'>`, t).appendTo(t).css("touch-action", "none"),
516
+ $(`<div class='resize_corner_${e}'>`, t).appendTo(t).css("touch-action", "none");
517
+ const i = F.get(o) || {};
518
+ i.down = function(o) {
519
+ Q.resizeModals(o, this, e);
520
+ }, F.set(o, i);
521
+ const n = {
522
+ passive: !1
523
+ };
524
+ $("[class^=resize_]").each((o, t) => {
525
+ t.addEventListener(T(), o => {
526
+ o.preventDefault(), Q.resizeModals(o, t, e);
527
+ }, n);
528
+ });
529
+ },
530
+ resizeModals: (e, o, t) => {
531
+ const i = $(o).parent(), n = String(t.id), p = O(e), s = S(e), r = [ p - q.scrollLeft(), s - q.scrollTop() ];
532
+ t.minWidth, J.css("pointer-events", "none"), i.css("pointer-events", "none"), Q.vfx(i, !1);
533
+ const c = e => {
534
+ Q.doRes(e, o);
535
+ }, a = e => {
536
+ Q.stopRes(o);
537
+ }, d = F.get(n) || {};
538
+ d.move = c, d.up = a, F.set(n, d);
539
+ const u = {
540
+ passive: !1
541
+ };
542
+ document.addEventListener(E(), c, u), document.addEventListener(I(), a, u), H = r[0],
543
+ R = r[1], W = i.width(), D = i.height(), X = i.position().left, Y = i.position().top,
544
+ U = Y + D + 1, K = X + W + 1, P = o;
545
+ },
546
+ doRes: (e, o) => {
547
+ dispatchEvent(new Event("layerProResize"));
548
+ const t = $(o), i = t.parent(), n = O(e), p = S(e), s = [ n - q.scrollLeft(), p - q.scrollTop() ];
549
+ if (o === P) {
550
+ let o = W + s[0] - H, n = D + s[1] - R;
551
+ const p = W - s[0] + H, r = D - s[1] + R;
552
+ o <= 0 && (o = 0), n <= 0 && (n = 0), Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= A && r > A && i.css({
553
+ height: Number(A + 1)
554
+ }), i.height() > A && A <= r && i.css({
555
+ top: Number(U - r),
556
+ height: parseInt(r)
557
+ })), Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= L && i.css({
558
+ width: Number(o),
559
+ right: Number(X - o)
560
+ }), i.width() <= L && i.css({
561
+ width: Number(L + 1)
562
+ })), Q.checkArea(e)[1] < Q.checkArea(e)[4] && 1 === Math.sign(Q.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= A && i.css({
563
+ height: Number(n)
564
+ }), i.height() <= A && n > A && i.css({
565
+ height: Number(A + 1)
566
+ })), Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= L && p > L && i.css({
567
+ width: Number(L + 1)
568
+ }), i.width() > L && L <= p && i.css({
569
+ width: parseInt(p),
570
+ left: Number(K - p)
571
+ })), Q.checkArea(e)[1] < Q.checkArea(e)[4] && Q.checkArea(e)[0] < Q.checkArea(e)[5] && 1 === Math.sign(Q.checkArea(e)[0]) && 1 === Math.sign(Q.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= A && r > A && i.css({
572
+ top: Number(U - r),
573
+ height: parseInt(r)
574
+ }), i.height() <= A && r > A && i.css({
575
+ height: Number(A + 1)
576
+ }), i.width() >= L && p > L && i.css({
577
+ width: parseInt(p),
578
+ left: Number(K - p)
579
+ }), i.width() <= L && p > L && i.css({
580
+ width: Number(L + 1)
581
+ })), t.hasClass("resize_corner_1") && (i.height() >= A && r > A && i.css({
582
+ top: Number(U - r),
583
+ height: Number(r)
584
+ }), i.height() <= A && r > A && i.css({
585
+ height: Number(A + 1)
586
+ }), i.width() >= L && i.css({
587
+ width: Number(o),
588
+ right: Number(X - o)
589
+ }), i.width() <= L && p > L && i.css({
590
+ width: Number(L + 1)
591
+ })), t.hasClass("resize_corner_2") && (i.height() >= A && i.css({
592
+ height: Number(n)
593
+ }), i.height() <= A && n > A && i.css({
594
+ height: Number(A + 1)
595
+ }), i.width() >= L && i.css({
596
+ width: Number(o),
597
+ right: Number(X - o)
598
+ }), i.width() <= L && i.css({
599
+ width: Number(L + 1)
600
+ })), t.hasClass("resize_corner_3") && (i.height() >= A && n > A && i.css({
601
+ height: Number(n)
602
+ }), i.height() <= A && n > A && i.css({
603
+ height: Number(A + 1)
604
+ }), i.width() >= L && p > L && i.css({
605
+ width: Number(p),
606
+ left: Number(K - p)
607
+ }), i.width() <= L && p > L && i.css({
608
+ width: Number(L + 1)
609
+ })));
610
+ }
611
+ },
612
+ stopRes: e => {
613
+ const o = $(e).parent();
614
+ J.css("pointer-events", "auto"), o.css("pointer-events", "auto"), Q.vfx(o, !0),
615
+ P = !1;
616
+ const t = F.get(String(e));
617
+ if (t) {
618
+ const o = {
619
+ passive: !1
620
+ };
621
+ t.move && document.removeEventListener(E(), t.move, o), t.up && document.removeEventListener(I(), t.up, o),
622
+ F.delete(String(e));
623
+ }
624
+ },
625
+ index: e => {
626
+ const o = $('[class^="popup_overflow_"]', "#popup");
627
+ $('[class^="popup_window_"]', "#popup").removeClass("zHigh"), $('[class^="popup_bar_"]', "#popup").removeClass("popup_bar_selected"),
628
+ $('[class^="icon_"]', "#popup").removeClass("popup_bar_selected"), o.each(function() {
629
+ $(this, "#popup").css("zIndex", $(this, "#popup")[0].style.zIndex - 1);
630
+ }), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex", Q.zIndex(o)),
631
+ $(".popup_bar_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_window_" + e.id, "#popup").addClass("zHigh");
632
+ },
633
+ zIndex: e => (e.each(function() {
634
+ const e = parseInt($(this, "#popup").css("zIndex"), 10);
635
+ e > j && (j = e);
636
+ }), j + 1)
637
+ }, Object.defineProperty(layerpro, "popup", {
638
+ value: Q,
639
+ writable: !1,
640
+ configurable: !1
641
+ });
1236
642
  }
1237
- );
1238
- init_credits();
1239
- init_mouseCoords();
1240
- init_properties();
1241
- init_purge();
1242
- init_window();
1243
- layerpro.setProps = (obj, options) => {
1244
- const allProps = Reflect.ownKeys(obj);
1245
- allProps.forEach(
1246
- (prop) => {
1247
- const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
1248
- if (descriptor) {
1249
- descriptor.enumerable = options?.enumerable || false;
1250
- descriptor.configurable = options?.enumerable || false;
1251
- descriptor.writable = options?.writable || false;
1252
- Object.defineProperty(obj, prop, descriptor);
1253
- }
1254
- if (typeof obj[prop] === "object" && obj[prop] !== null) layerpro.setProps(obj[prop], options);
1255
- }
1256
- );
1257
- return;
1258
- };
1259
- layerpro.setProps(
1260
- layerpro,
1261
- {
1262
- configurable: false,
1263
- enumerable: false,
1264
- writable: false
643
+ }), ie = u({
644
+ "core/purge.ts"() {
645
+ oe = e => {
646
+ let o, t, i, n = e.attributes;
647
+ if (n) for (t = n.length, o = 0; o < t; o += 1) i = n[o].name, e[i];
648
+ if (n = e.childNodes, n) for (t = n.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
649
+ }, Object.defineProperty(layerpro, "purge", {
650
+ value: new Proxy(oe, {}),
651
+ writable: !1,
652
+ configurable: !1
653
+ });
654
+ }
655
+ }), ne = u({
656
+ "core/window.ts"() {
657
+ window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
658
+ capture: !0,
659
+ passive: !0
660
+ });
1265
661
  }
1266
- );
1267
- Object.freeze(layerpro);
1268
- };
1269
- run();
662
+ });
663
+
664
+ globalThis.$ = o, globalThis.jQuery = o;
665
+
666
+ window.layerpro || (Object.defineProperty(window, "layerpro", {
667
+ value: {},
668
+ writable: !1,
669
+ configurable: !1,
670
+ enumerable: !1
671
+ }), h(), G(), te(), ie(), ne(), layerpro.setProps = (e, o) => {
672
+ Reflect.ownKeys(e).forEach(t => {
673
+ const i = Object.getOwnPropertyDescriptor(e, t);
674
+ i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
675
+ i.writable = o?.writable || !1, Object.defineProperty(e, t, i)), "object" == typeof e[t] && null !== e[t] && layerpro.setProps(e[t], o);
676
+ });
677
+ }, layerpro.setProps(layerpro, {
678
+ configurable: !1,
679
+ enumerable: !1,
680
+ writable: !1
681
+ }), Object.freeze(layerpro));