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