mirror of
https://github.com/a2nt/meta-lightbox.git
synced 2024-10-22 17:05:53 +02:00
FIX: AJAX styling
This commit is contained in:
parent
ceb625d269
commit
4dcd2fb742
2
dist/css/app.css
vendored
2
dist/css/app.css
vendored
@ -1,4 +1,4 @@
|
||||
.meta-lightbox-overlay{position:fixed;top:0;left:0;z-index:99998;width:100%;height:100%;overflow:hidden;visibility:hidden;opacity:0;box-sizing:border-box}.meta-lightbox-overlay.meta-lightbox-open{visibility:visible;opacity:1}.meta-lightbox-wrap{position:absolute;top:10%;bottom:10%;left:10%;right:10%}.meta-lightbox-content{display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:row;color:#fff;width:100%;height:100%}.meta-lightbox-content .meta-lightbox-zoom-wrapper{display:block;height:100%;width:100%}.meta-lightbox-content .meta-lightbox-zoom-wrapper:after{color:#fff;font:normal normal normal 14px/1 FontAwesome;content:'\f00e';position:absolute;right:1em;bottom:1em;right:1em;text-shadow:1px 1px 1px #000}.meta-lightbox-content .meta-lightbox-zoom-wrapper.no-zoom:after{display:none}.meta-lightbox-title-wrap{position:absolute;bottom:0;left:0;width:100%;z-index:99999;text-align:center}.meta-lightbox-nav{display:none}.meta-lightbox-prev{position:absolute;top:50%;left:0}.meta-lightbox-next{position:absolute;top:50%;right:0}.meta-lightbox-close{position:absolute;top:2%;right:2%;line-height:1em}.meta-lightbox-image{text-align:center}.meta-lightbox-image img{max-width:100%;max-height:100%;width:auto;height:auto;vertical-align:middle}.meta-lightbox-content iframe{width:100%;height:100%}.meta-lightbox-inline,.meta-lightbox-ajax{max-height:100%;overflow:auto}.meta-lightbox-error{display:flex;flex-direction:column;justify-content:center;text-align:center;width:100%;height:100%;color:#fff;text-shadow:0 1px 1px #000}.meta-lightbox-error .alert{margin:0;text-shadow:none}.meta-lightbox-error p{display:table-cell;vertical-align:middle}.meta-lightbox-notouch .meta-lightbox-effect-fade,.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,.meta-lightbox-notouch .meta-lightbox-effect-slideRight,.meta-lightbox-notouch .meta-lightbox-effect-slideUp,.meta-lightbox-notouch .meta-lightbox-effect-slideDown,.meta-lightbox-notouch .meta-lightbox-effect-fall{transition:all 0.2s ease-in-out}.meta-lightbox-effect-fadeScale .meta-lightbox-wrap{transition:all 0.3s;transform:scale(0.7)}.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap{transform:scale(1)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,.meta-lightbox-effect-slideRight .meta-lightbox-wrap,.meta-lightbox-effect-slideUp .meta-lightbox-wrap,.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transition:all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap{transform:translateX(-10%)}.meta-lightbox-effect-slideRight .meta-lightbox-wrap{transform:translateX(10%)}.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap{transform:translateX(0)}.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transform:translateY(-10%)}.meta-lightbox-effect-slideUp .meta-lightbox-wrap{transform:translateY(10%)}.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap{transform:translateY(0)}.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall{perspective:1000px}.meta-lightbox-effect-fall .meta-lightbox-wrap{transition:all 0.3s ease-out;transform:translateZ(300px)}.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap{transform:translateZ(0)}.meta-lightbox-theme-default.meta-lightbox-overlay{background:#666;background:rgba(0,0,0,0.6)}.meta-lightbox-theme-default .meta-lightbox-nav{top:10%;width:20%;height:80%;background-repeat:no-repeat;background-position:50% 50%;opacity:0.5;color:#fff;font-size:3em;text-decoration:none;text-shadow:1px 1px 0 #000}@media (min-width: 576px){.meta-lightbox-theme-default .meta-lightbox-nav{width:8%}}.meta-lightbox-theme-default .meta-lightbox-nav .fa{position:absolute;top:50%;left:50%;margin-top:-1em;margin-left:-0.2em}.meta-lightbox-theme-default .meta-lightbox-nav:hover{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-close{display:block;opacity:0.5;color:#fff;text-decoration:none;font-size:2em;text-shadow:1px 1px 0 #000;text-align:center;width:1.2em;height:1.2em;line-height:1.2em}.meta-lightbox-theme-default .meta-lightbox-close:focus{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-title{background:#000;color:#fff;padding:7px 15px}.meta-lightbox-theme-default .meta-lightbox-ajax,.meta-lightbox-theme-default .meta-lightbox-inline{background:#fff;padding:2em;box-shadow:0px 1px 1px rgba(0,0,0,0.6)}@media (max-width: 576px){.meta-lightbox-wrap{top:5px !important;bottom:5px;left:5px;right:5px}.meta-lightbox-theme-default .meta-lightbox-nav{height:100%;opacity:1;font-size:2em}.meta-lightbox-theme-default .meta-lightbox-nav .fa{margin-left:-0.4em}.meta-lightbox-theme-default .meta-lightbox-close{opacity:1}}
|
||||
.meta-lightbox-overlay{position:fixed;top:0;left:0;z-index:99998;width:100%;height:100%;overflow:hidden;visibility:hidden;opacity:0;box-sizing:border-box}.meta-lightbox-overlay.meta-lightbox-open{visibility:visible;opacity:1}.meta-lightbox-wrap{position:absolute;top:10%;bottom:10%;left:10%;right:10%}.meta-lightbox-content{display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:row;color:#fff;width:100%;height:100%}.meta-lightbox-content .meta-lightbox-ajax{color:#212529}.meta-lightbox-content .meta-lightbox-zoom-wrapper{display:block;height:100%;width:100%}.meta-lightbox-content .meta-lightbox-zoom-wrapper:after{color:#fff;font:normal normal normal 14px/1 FontAwesome;content:'\f00e';position:absolute;right:1em;bottom:1em;right:1em;text-shadow:1px 1px 1px #000}.meta-lightbox-content .meta-lightbox-zoom-wrapper.no-zoom:after{display:none}.meta-lightbox-title-wrap{position:absolute;bottom:0;left:0;width:100%;z-index:99999;text-align:center}.meta-lightbox-nav{display:none}.meta-lightbox-prev{position:absolute;top:50%;left:0}.meta-lightbox-next{position:absolute;top:50%;right:0}.meta-lightbox-close{position:absolute;top:2%;right:2%;line-height:1em}.meta-lightbox-image{text-align:center}.meta-lightbox-image img{max-width:100%;max-height:100%;width:auto;height:auto;vertical-align:middle}.meta-lightbox-content iframe{width:100%;height:100%}.meta-lightbox-inline,.meta-lightbox-ajax{max-height:100%;overflow:auto}.meta-lightbox-error{display:flex;flex-direction:column;justify-content:center;text-align:center;width:100%;height:100%;color:#fff;text-shadow:0 1px 1px #000}.meta-lightbox-error .alert{margin:0;text-shadow:none}.meta-lightbox-error p{display:table-cell;vertical-align:middle}.meta-lightbox-notouch .meta-lightbox-effect-fade,.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,.meta-lightbox-notouch .meta-lightbox-effect-slideRight,.meta-lightbox-notouch .meta-lightbox-effect-slideUp,.meta-lightbox-notouch .meta-lightbox-effect-slideDown,.meta-lightbox-notouch .meta-lightbox-effect-fall{transition:all 0.2s ease-in-out}.meta-lightbox-effect-fadeScale .meta-lightbox-wrap{transition:all 0.3s;transform:scale(0.7)}.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap{transform:scale(1)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,.meta-lightbox-effect-slideRight .meta-lightbox-wrap,.meta-lightbox-effect-slideUp .meta-lightbox-wrap,.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transition:all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap{transform:translateX(-10%)}.meta-lightbox-effect-slideRight .meta-lightbox-wrap{transform:translateX(10%)}.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap{transform:translateX(0)}.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transform:translateY(-10%)}.meta-lightbox-effect-slideUp .meta-lightbox-wrap{transform:translateY(10%)}.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap{transform:translateY(0)}.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall{perspective:1000px}.meta-lightbox-effect-fall .meta-lightbox-wrap{transition:all 0.3s ease-out;transform:translateZ(300px)}.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap{transform:translateZ(0)}.meta-lightbox-theme-default.meta-lightbox-overlay{background:#666;background:rgba(0,0,0,0.6)}.meta-lightbox-theme-default .meta-lightbox-nav{top:10%;width:20%;height:80%;background-repeat:no-repeat;background-position:50% 50%;opacity:0.5;color:#fff;font-size:3em;text-decoration:none;text-shadow:1px 1px 0 #000}@media (min-width: 576px){.meta-lightbox-theme-default .meta-lightbox-nav{width:8%}}.meta-lightbox-theme-default .meta-lightbox-nav .fa{position:absolute;top:50%;left:50%;margin-top:-1em;margin-left:-0.2em}.meta-lightbox-theme-default .meta-lightbox-nav:hover{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-close{display:block;opacity:0.5;color:#fff;text-decoration:none;font-size:2em;text-shadow:1px 1px 0 #000;text-align:center;width:1.2em;height:1.2em;line-height:1.2em}.meta-lightbox-theme-default .meta-lightbox-close:focus{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-title{background:#000;color:#fff;padding:7px 15px}.meta-lightbox-theme-default .meta-lightbox-ajax,.meta-lightbox-theme-default .meta-lightbox-inline{background:#fff;padding:2em;box-shadow:0px 1px 1px rgba(0,0,0,0.6)}@media (max-width: 576px){.meta-lightbox-wrap{top:5px !important;bottom:5px;left:5px;right:5px}.meta-lightbox-theme-default .meta-lightbox-nav{height:100%;opacity:1;font-size:2em}.meta-lightbox-theme-default .meta-lightbox-nav .fa{margin-left:-0.4em}.meta-lightbox-theme-default .meta-lightbox-close{opacity:1}}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
2
dist/css/app.css.map
vendored
2
dist/css/app.css.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///meta-lightbox.scss","webpack:///_variables.scss","webpack:///meta-lightbox-theme.scss"],"names":[],"mappings":"AAEA,uBACI,cAAe,CACf,KAAM,CACN,MAAO,CACP,aAAc,CACd,UAAW,CACX,WAAY,CACZ,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,qBAAsB,CAV1B,0CAaQ,kBAAmB,CACnB,SAAU,CACb,oBAID,iBAAkB,CAClB,OAAQ,CACR,UAAW,CACX,QAAS,CACT,SAAU,CACb,uBAGG,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,iBAAkB,CAClB,kBAAmB,CACnB,UClCQ,CDmCR,UAAW,CACX,WAAY,CARhB,mDAWQ,aAAc,CACd,WAAY,CACZ,UAAW,CAbnB,yDAgBY,UC5CA,CD6CA,4CAA6C,CAC7C,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,UAAW,CACX,SAAU,CACV,4BClDA,CD2BZ,iEA2BgB,YAAa,CAChB,0BAMT,iBAAkB,CAClB,QAAS,CACT,MAAO,CACP,UAAW,CACX,aAAc,CACd,iBAAkB,CACrB,mBAGG,YAAa,CAChB,oBAGG,iBAAkB,CAClB,OAAQ,CACR,MAAO,CACV,oBAGG,iBAAkB,CAClB,OAAQ,CACR,OAAQ,CACX,qBAGG,iBAAkB,CAClB,MAAO,CACP,QAAS,CACT,eAAgB,CACnB,qBAGG,iBAAkB,CADtB,yBAIQ,cAAe,CACf,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,qBAAsB,CACzB,8BAID,UAAW,CACX,WAAY,CACf,0CAIG,eAA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CACZ,SAAU,CACV,aAAc,CAHlB,oDAMQ,kBAAmB,CACtB,kDAID,SAAU,CACb","file":"css/app.css","sourcesContent":["@import '_variables';\n\n.meta-lightbox-overlay {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99998;\n width: 100%;\n height: 100%;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n box-sizing: border-box;\n\n &.meta-lightbox-open {\n visibility: visible;\n opacity: 1;\n }\n}\n\n.meta-lightbox-wrap {\n position: absolute;\n top: 10%;\n bottom: 10%;\n left: 10%;\n right: 10%;\n}\n\n.meta-lightbox-content {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n flex-direction: row;\n color: $white;\n width: 100%;\n height: 100%;\n\n .meta-lightbox-zoom-wrapper {\n display: block;\n height: 100%;\n width: 100%;\n\n &:after {\n color: $white;\n font: normal normal normal 14px/1 FontAwesome;\n content: '\\f00e';\n position: absolute;\n right: 1em;\n bottom: 1em;\n right: 1em;\n text-shadow: 1px 1px 1px $black;\n }\n &.no-zoom {\n &:after {\n display: none;\n }\n }\n }\n}\n\n.meta-lightbox-title-wrap {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n z-index: 99999;\n text-align: center;\n}\n\n.meta-lightbox-nav {\n display: none;\n}\n\n.meta-lightbox-prev {\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.meta-lightbox-next {\n position: absolute;\n top: 50%;\n right: 0;\n}\n\n.meta-lightbox-close {\n position: absolute;\n top: 2%;\n right: 2%;\n line-height: 1em;\n}\n\n.meta-lightbox-image {\n text-align: center;\n\n img {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n vertical-align: middle;\n }\n}\n\n.meta-lightbox-content iframe {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-inline,\n.meta-lightbox-ajax {\n max-height: 100%;\n overflow: auto;\n}\n\n.meta-lightbox-error {\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n color: $white;\n text-shadow: 0 1px 1px $black;\n .alert {\n margin: 0;\n text-shadow: none;\n }\n}\n\n.meta-lightbox-error p {\n display: table-cell;\n vertical-align: middle;\n}\n\n/* Effects\n **********************************************/\n.meta-lightbox-notouch .meta-lightbox-effect-fade,\n.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,\n.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,\n.meta-lightbox-notouch .meta-lightbox-effect-slideRight,\n.meta-lightbox-notouch .meta-lightbox-effect-slideUp,\n.meta-lightbox-notouch .meta-lightbox-effect-slideDown,\n.meta-lightbox-notouch .meta-lightbox-effect-fall {\n transition: all 0.2s ease-in-out;\n}\n\n/* fadeScale */\n.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {\n transition: all 0.3s;\n transform: scale(0.7);\n}\n\n.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {\n transform: scale(1);\n}\n\n/* slideLeft / slideRight / slideUp / slideDown */\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap,\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n}\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {\n transform: translateX(-10%);\n}\n\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap {\n transform: translateX(10%);\n}\n\n.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateX(0);\n}\n\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transform: translateY(-10%);\n}\n\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap {\n transform: translateY(10%);\n}\n\n.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateY(0);\n}\n\n/* fall */\n.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {\n perspective: 1000px;\n}\n\n.meta-lightbox-effect-fall .meta-lightbox-wrap {\n transition: all 0.3s ease-out;\n transform: translateZ(300px);\n}\n\n.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateZ(0);\n}\n\n@import 'meta-lightbox-theme';\n","$white: #fff !default;\n$black: #000 !default;\n$lightbox-link-hover-color: #007bff !default;\n$lightbox-breakpoint: 576px !default;\n\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1390px,\n xxxl: 1590px\n) !default;\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1330px,\n xxxl: 1560px\n) !default;\n",".meta-lightbox-theme-default.meta-lightbox-overlay {\n background: #666;\n background: rgba(0, 0, 0, 0.6);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav {\n top: 10%;\n width: 20%;\n height: 80%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n opacity: 0.5;\n color: $white;\n font-size: 3em;\n text-decoration: none;\n text-shadow: 1px 1px 0 $black;\n\n @media (min-width: map-get($grid-breakpoints, 'sm')) {\n width: 8%;\n }\n .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -1em;\n margin-left: -0.2em;\n }\n\n &:hover {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close {\n display: block;\n opacity: 0.5;\n color: $white;\n text-decoration: none;\n font-size: 2em;\n text-shadow: 1px 1px 0 $black;\n text-align: center;\n width: 1.2em;\n height: 1.2em;\n line-height: 1.2em;\n\n &:focus {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-title {\n background: $black;\n color: $white;\n padding: 7px 15px;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-ajax,\n.meta-lightbox-theme-default .meta-lightbox-inline {\n background: $white;\n padding: 2em;\n box-shadow: 0px 1px 1px transparentize($black, 0.4);\n}\n\n@media (max-width: $lightbox-breakpoint) {\n .meta-lightbox-wrap {\n top: 5px !important;\n bottom: 5px;\n left: 5px;\n right: 5px;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav {\n height: 100%;\n opacity: 1;\n font-size: 2em;\n\n .fa {\n margin-left: -0.4em;\n }\n }\n\n .meta-lightbox-theme-default .meta-lightbox-close {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///meta-lightbox.scss","webpack:///_variables.scss","webpack:///meta-lightbox-theme.scss"],"names":[],"mappings":"AAEA,uBACI,cAAe,CACf,KAAM,CACN,MAAO,CACP,aAAc,CACd,UAAW,CACX,WAAY,CACZ,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,qBAAsB,CAV1B,0CAaQ,kBAAmB,CACnB,SAAU,CACb,oBAID,iBAAkB,CAClB,OAAQ,CACR,UAAW,CACX,QAAS,CACT,SAAU,CACb,uBAGG,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,iBAAkB,CAClB,kBAAmB,CACnB,UClCQ,CDmCR,UAAW,CACX,WAAY,CARhB,2CAWQ,aCnCY,CDwBpB,mDAeQ,aAAc,CACd,WAAY,CACZ,UAAW,CAjBnB,yDAoBY,UChDA,CDiDA,4CAA6C,CAC7C,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,UAAW,CACX,SAAU,CACV,4BCtDA,CD2BZ,iEA+BgB,YAAa,CAChB,0BAMT,iBAAkB,CAClB,QAAS,CACT,MAAO,CACP,UAAW,CACX,aAAc,CACd,iBAAkB,CACrB,mBAGG,YAAa,CAChB,oBAGG,iBAAkB,CAClB,OAAQ,CACR,MAAO,CACV,oBAGG,iBAAkB,C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D9C2B,CC+C3B,SAAU,CACV,gCAA6C,CAChD,kDAID,eDtDQ,CCuDR,UDxDQ,CCyDR,gBAAiB,CACpB,oGAIG,eD9DQ,CC+DR,WAAY,CACZ,sCAAmD,CACtD,0BAGG,oBACI,kBAAmB,CACnB,UAAW,CACX,QAAS,CACT,SAAU,CACb,gDAGG,WAAY,CACZ,SAAU,CACV,aAAc,CAHlB,oDAMQ,kBAAmB,CACtB,kDAID,SAAU,CACb","file":"css/app.css","sourcesContent":["@import '_variables';\n\n.meta-lightbox-overlay {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99998;\n width: 100%;\n height: 100%;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n box-sizing: border-box;\n\n &.meta-lightbox-open {\n visibility: visible;\n opacity: 1;\n }\n}\n\n.meta-lightbox-wrap {\n position: absolute;\n top: 10%;\n bottom: 10%;\n left: 10%;\n right: 10%;\n}\n\n.meta-lightbox-content {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n flex-direction: row;\n color: $white;\n width: 100%;\n height: 100%;\n\n .meta-lightbox-ajax {\n color: $body-color;\n }\n\n .meta-lightbox-zoom-wrapper {\n display: block;\n height: 100%;\n width: 100%;\n\n &:after {\n color: $white;\n font: normal normal normal 14px/1 FontAwesome;\n content: '\\f00e';\n position: absolute;\n right: 1em;\n bottom: 1em;\n right: 1em;\n text-shadow: 1px 1px 1px $black;\n }\n &.no-zoom {\n &:after {\n display: none;\n }\n }\n }\n}\n\n.meta-lightbox-title-wrap {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n z-index: 99999;\n text-align: center;\n}\n\n.meta-lightbox-nav {\n display: none;\n}\n\n.meta-lightbox-prev {\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.meta-lightbox-next {\n position: absolute;\n top: 50%;\n right: 0;\n}\n\n.meta-lightbox-close {\n position: absolute;\n top: 2%;\n right: 2%;\n line-height: 1em;\n}\n\n.meta-lightbox-image {\n text-align: center;\n\n img {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n vertical-align: middle;\n }\n}\n\n.meta-lightbox-content iframe {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-inline,\n.meta-lightbox-ajax {\n max-height: 100%;\n overflow: auto;\n}\n\n.meta-lightbox-error {\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n color: $white;\n text-shadow: 0 1px 1px $black;\n .alert {\n margin: 0;\n text-shadow: none;\n }\n}\n\n.meta-lightbox-error p {\n display: table-cell;\n vertical-align: middle;\n}\n\n/* Effects\n **********************************************/\n.meta-lightbox-notouch .meta-lightbox-effect-fade,\n.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,\n.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,\n.meta-lightbox-notouch .meta-lightbox-effect-slideRight,\n.meta-lightbox-notouch .meta-lightbox-effect-slideUp,\n.meta-lightbox-notouch .meta-lightbox-effect-slideDown,\n.meta-lightbox-notouch .meta-lightbox-effect-fall {\n transition: all 0.2s ease-in-out;\n}\n\n/* fadeScale */\n.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {\n transition: all 0.3s;\n transform: scale(0.7);\n}\n\n.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {\n transform: scale(1);\n}\n\n/* slideLeft / slideRight / slideUp / slideDown */\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap,\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n}\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {\n transform: translateX(-10%);\n}\n\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap {\n transform: translateX(10%);\n}\n\n.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateX(0);\n}\n\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transform: translateY(-10%);\n}\n\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap {\n transform: translateY(10%);\n}\n\n.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateY(0);\n}\n\n/* fall */\n.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {\n perspective: 1000px;\n}\n\n.meta-lightbox-effect-fall .meta-lightbox-wrap {\n transition: all 0.3s ease-out;\n transform: translateZ(300px);\n}\n\n.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateZ(0);\n}\n\n@import 'meta-lightbox-theme';\n","$white: #fff !default;\n$black: #000 !default;\n$lightbox-link-hover-color: #007bff !default;\n$lightbox-breakpoint: 576px !default;\n$body-color: #212529 !default;\n\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1390px,\n xxxl: 1590px\n) !default;\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1330px,\n xxxl: 1560px\n) !default;\n",".meta-lightbox-theme-default.meta-lightbox-overlay {\n background: #666;\n background: rgba(0, 0, 0, 0.6);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav {\n top: 10%;\n width: 20%;\n height: 80%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n opacity: 0.5;\n color: $white;\n font-size: 3em;\n text-decoration: none;\n text-shadow: 1px 1px 0 $black;\n\n @media (min-width: map-get($grid-breakpoints, 'sm')) {\n width: 8%;\n }\n .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -1em;\n margin-left: -0.2em;\n }\n\n &:hover {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close {\n display: block;\n opacity: 0.5;\n color: $white;\n text-decoration: none;\n font-size: 2em;\n text-shadow: 1px 1px 0 $black;\n text-align: center;\n width: 1.2em;\n height: 1.2em;\n line-height: 1.2em;\n\n &:focus {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-title {\n background: $black;\n color: $white;\n padding: 7px 15px;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-ajax,\n.meta-lightbox-theme-default .meta-lightbox-inline {\n background: $white;\n padding: 2em;\n box-shadow: 0px 1px 1px transparentize($black, 0.4);\n}\n\n@media (max-width: $lightbox-breakpoint) {\n .meta-lightbox-wrap {\n top: 5px !important;\n bottom: 5px;\n left: 5px;\n right: 5px;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav {\n height: 100%;\n opacity: 1;\n font-size: 2em;\n\n .fa {\n margin-left: -0.4em;\n }\n }\n\n .meta-lightbox-theme-default .meta-lightbox-close {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}
|
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! For license information please see app.js.LICENSE.txt */
|
||||
!function(t){var e={};function o(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(a,n,function(e){return t[e]}.bind(null,n));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",o(o.s="./src/js/app.js")}({"./src/js/_events.js":function(t,e){t.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/app.js":function(t,e,o){"use strict";o.r(e);o("./src/scss/app.scss");var a=o("jquery"),n=o.n(a),i=o("./src/js/_events.js"),r=o.n(i);function c(t){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var s,d,u,f,p,h;s=n.a,d=window,document,u=s("body"),f="MetaLightboxUI",p='<div class="meta-lightbox-error"><div class="alert alert-error alert-danger">Connection failure.</div></div>',h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,o,a;return e=t,a=[{key:"init",value:function(){console.log("Initializing: ".concat(f));var t=this;t.isMSIE=0;try{t.isHidpi=t.is_hdpi()}catch(e){console.log(t)}s(".js".concat(f,',[data-toggle="lightbox"],[data-lightbox-gallery]')).on("click",(function(e){e.preventDefault(),e.stopPropagation();var o=s(e.currentTarget);t.show(o)}))}},{key:"is_hdpi",value:function(){return console.log("".concat(f,": isHidpi")),d.devicePixelRatio>1||d.matchMedia&&d.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},{key:"show",value:function(t){console.log("".concat(f,": show"));var e=this;if(e.constructLightbox()){var o=e.$content;if(o){if(s("body").addClass("meta-lightbox-body-effect-fade"),e.process(o,t),t.data("lightbox-gallery")){var a=s('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]'));console.log('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]')),console.log(a),1===a.length?s(".meta-lightbox-nav").hide():s(".meta-lightbox-nav").show(),s(".meta-lightbox-prev").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n-1);i.length||(i=a.last()),setTimeout((function(){e.show(i)}),10)})),s(".meta-lightbox-next").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n+1);i.length||(i=a.first()),setTimeout((function(){e.show(i)}),10)}))}setTimeout((function(){e.$overlay.addClass("meta-lightbox-open")}),1)}}}},{key:"constructLightbox",value:function(){console.log("".concat(f,": constructLightbox"));var t=this,e=s("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade"}),o=s("<div>",{class:"meta-lightbox-wrap"}),a=s("<div>",{class:"meta-lightbox-content"}),n=s('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),i=s('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),r=s("<div>",{class:"meta-lightbox-title-wrap"});return t.$overlay||(t.isMSIE&&e.addClass("meta-lightbox-ie"),o.append(a),o.append(r),e.append(o),e.append(n),e.append(i),s("body").append(e),e.on("click",(function(e){e.preventDefault(),t.hide()})),i.on("click",(function(e){e.preventDefault(),t.hide()})),t.$overlay=e,t.$content=a,t.$title=r),t.$overlay}},{key:"setTitle",value:function(t){this.$title.html(t)}},{key:"process",value:function(t,e){console.log("".concat(f,": process"));var o=this,a=e.attr("href").length?e.attr("href"):e.data("href");a.length||(console.log(e),console.error("".concat(f,": href(attr/data) is missing")));var n=s("#PageLoading .loading-spinner"),i=n.length?n.clone():"";if(o.$content.append(i).addClass("meta-lightbox-loading"),a.match(/\.(jpeg|jpg|gif|png|svg)$/i)){s.ajax({url:a,success:function(){var e=s("<img>",{src:a}),n=s('<div class="meta-lightbox-image"></div>'),i=s('<span class="meta-lightbox-zoom-wrapper"></span>');i.append(e),n.append(i),n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")}),s(window).resize((function(){n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")})})),"undefined"!==typeof i.zoom?i.zoom():i.addClass("no-zoom"),o.$content.html(n),o.contentLoaded()},error:function(t,e){var a=s(p);o.$content.html(a),o.contentLoaded()}});var r=e.data("title")?e.data("title"):e.attr("title");o.setTitle(r),"function"===typeof ga&&ga("send","event","meta","Image Click",a)}else if(a.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/)){var l,d=a.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/),h="meta-lightbox-video";if("youtube"==d[1]&&(l="https://www.youtube.com/embed/".concat(d[4]),h="".concat(h," meta-lightbox-youtube")),"youtu"==d[1]&&(l="https://www.youtube.com/embed/".concat(d[3]),h="".concat(h," meta-lightbox-youtube")),"youtube-nocookie"==d[1]&&(l="https://www.youtube-nocookie.com/embed/".concat(d[4]),h="".concat(h," meta-lightbox-youtube")),"vimeo"==d[1]&&(l="https://player.vimeo.com/video/".concat(d[3]),h="".concat(h," meta-lightbox-vimeo")),l){var g=s("<iframe>",{src:l,class:h,frameborder:0,vspace:0,hspace:0,scrolling:"auto"});u.append('<div id="IFramePreload" class="hidden d-none iframe-preload" style="display:none"></div>');var m=s("#IFramePreload");m.html(g),g.on("load",(function(){console.log("".concat(f,": the iframe was loaded")),m.html(""),m.remove(),o.$content.html(g),o.contentLoaded()}))}var b=e.data("title")?e.data("title"):e.attr("title");o.setTitle(b),"function"===typeof ga&&ga("send","event","meta","Video Click",d)}else"#"==a.substring(0,1)?(s(a).length?(wrap=s('<div class="meta-lightbox-inline" />'),wrap.append(s(a).clone().show()),wrap.outerHeight()<o.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")}),s(window).resize((function(){wrap.outerHeight()<o.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")})})),o.$content.html(wrap),o.contentLoaded()):(wrap=s(p),o.$content.html(wrap),o.contentLoaded()),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",a)):(console.log(o),s.ajax({sync:!1,async:!0,url:a,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("page not found"),window.location.href=url},302:function(){console.log("redirect 302"),window.location.href=url}},error:function(t,e){console.log("AJAX request failure.".concat(t.statusText));var a=s(p);o.$content.html(a),o.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",t.statusText)},success:function(t,e,a){try{var n=s.parseJSON(t);if("object"===c(n)){"object"===c(n.regions)&&"undefinded"!==typeof n.regions.LayoutAjax&&((l=s('<div class="meta-lightbox-ajax" />')).html(n.regions.LayoutAjax),o.$content.html(l),o.contentLoaded());var i=a.getResponseHeader("X-Title"),r=a.getResponseHeader("X-Link");i&&i.length&&r&&r.length&&r!==window.location.href&&r.substring(0,r.indexOf("#"))!==window.location.href.replace(s("base").attr("href"),"/")&&(s(".meta-lightbox-ajax").data("curr-title",document.title),s(".meta-lightbox-ajax").data("curr-link",window.location.href),"undefined"!==typeof window.localStorage&&"/"!==r&&window.localStorage.setItem("current-page",r),document.URL!==r&&document.URL!==s("base").attr("href")+r&&document.URL!=="".concat(s("base").attr("href"),"/").concat(r)&&window.history.pushState({title:i,page:r,ajax:"true"},i,r),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:r.replace(s("base").attr("href"),""),title:i}),ga("send","pageview")))}}catch(d){var l;(l=s('<div class="meta-lightbox-ajax" />')).append(t),o.$content.html(l),o.contentLoaded()}l.outerHeight()<o.$content.height()&&l.css({position:"relative",top:"50%","margin-top":"".concat(-l.outerHeight()/2,"px")}),s(window).resize((function(){l.outerHeight()<o.$content.height()&&l.css({position:"relative",top:"50%","margin-top":"".concat(-l.outerHeight()/2,"px")})})),setTimeout((function(){s(window).resize(),"function"===typeof window.imagesLoaded&&window.imagesLoaded().then((function(){s(window).resize()}))}),500),o.contentLoaded()}}))}},{key:"contentLoaded",value:function(){this.$content.removeClass("meta-lightbox-loading"),setTimeout((function(){s(d).trigger("meta-lightbox-loaded")}),1),setTimeout((function(){u.addClass("meta-lightbox-body-effect-fade")}),600)}},{key:"hide",value:function(t){var e=this.$overlay,o=s(".meta-lightbox-ajax").data("curr-title"),a=s(".meta-lightbox-ajax").data("curr-link");o&&a&&("undefined"!==typeof window.localStorage&&"/"!==a&&window.localStorage.setItem("current-page",a),document.URL!==a&&document.URL!==s("base").attr("href")+a&&document.URL!=="".concat(s("base").attr("href"),"/").concat(a)&&window.history.replaceState({title:o,page:a,ajax:"true"},o,a)),e.removeClass("meta-lightbox-open"),u.removeClass("meta-lightbox-body-effect-fade"),s(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),this.isMSIE&&(e.find("iframe").attr("src"," "),e.find("iframe").remove()),s(".meta-lightbox-prev").off("click"),s(".meta-lightbox-next").off("click"),s(".meta-lightbox-content").empty(),u.removeClass("meta-lightbox-body-effect-fade")}}],(o=null)&&l(e.prototype,o),a&&l(e,a),t}(),s(d).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){h.init()})),d.MetaLightboxUI=h},"./src/scss/app.scss":function(t,e,o){},jquery:function(t,e){t.exports=jQuery}});
|
||||
!function(t){var e={};function o(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(a,n,function(e){return t[e]}.bind(null,n));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",o(o.s="./src/js/app.js")}({"./src/js/_events.js":function(t,e){t.exports={AJAX:"ajax-load",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/app.js":function(t,e,o){"use strict";o.r(e);o("./src/scss/app.scss");var a=o("jquery"),n=o.n(a),i=o("./src/js/_events.js"),r=o.n(i);function l(t){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var s,d,u,f,p,h;s=n.a,d=window,document,u=s("body"),f="MetaLightboxUI",p='<div class="meta-lightbox-error"><div class="alert alert-error alert-danger">Connection failure.</div></div>',h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,o,a;return e=t,a=[{key:"init",value:function(){console.log("Initializing: ".concat(f));var t=this;t.isMSIE=0;try{t.isHidpi=t.is_hdpi()}catch(e){console.log(t)}s(".js".concat(f,',[data-toggle="lightbox"],[data-lightbox-gallery]')).on("click",(function(e){e.preventDefault(),e.stopPropagation();var o=s(e.currentTarget);t.show(o)}))}},{key:"is_hdpi",value:function(){return console.log("".concat(f,": isHidpi")),d.devicePixelRatio>1||d.matchMedia&&d.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},{key:"show",value:function(t){console.log("".concat(f,": show"));var e=this;if(e.constructLightbox()){var o=e.$content;if(o){if(s("body").addClass("meta-lightbox-body-effect-fade"),e.process(o,t),t.data("lightbox-gallery")){var a=s('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]'));console.log('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]')),console.log(a),1===a.length?s(".meta-lightbox-nav").hide():s(".meta-lightbox-nav").show(),s(".meta-lightbox-prev").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n-1);i.length||(i=a.last()),setTimeout((function(){e.show(i)}),10)})),s(".meta-lightbox-next").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n+1);i.length||(i=a.first()),setTimeout((function(){e.show(i)}),10)}))}setTimeout((function(){e.$overlay.addClass("meta-lightbox-open")}),1)}}}},{key:"constructLightbox",value:function(){console.log("".concat(f,": constructLightbox"));var t=this,e=s("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade"}),o=s("<div>",{class:"meta-lightbox-wrap"}),a=s("<div>",{class:"meta-lightbox-content"}),n=s('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),i=s('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),r=s("<div>",{class:"meta-lightbox-title-wrap"});return t.$overlay||(t.isMSIE&&e.addClass("meta-lightbox-ie"),o.append(a),o.append(r),e.append(o),e.append(n),e.append(i),s("body").append(e),e.on("click",(function(e){e.preventDefault(),t.hide()})),i.on("click",(function(e){e.preventDefault(),t.hide()})),t.$overlay=e,t.$content=a,t.$title=r),t.$overlay}},{key:"setTitle",value:function(t){this.$title.html(t)}},{key:"process",value:function(t,e){console.log("".concat(f,": process"));var o=this,a=e.attr("href").length?e.attr("href"):e.data("href");a.length||(console.log(e),console.error("".concat(f,": href(attr/data) is missing")));var n=s("#PageLoading .loading-spinner"),i=n.length?n.clone():"";if(o.$content.append(i).addClass("meta-lightbox-loading"),a.match(/\.(jpeg|jpg|gif|png|svg)$/i)){s.ajax({url:a,success:function(){var e=s("<img>",{src:a}),n=s('<div class="meta-lightbox-image"></div>'),i=s('<span class="meta-lightbox-zoom-wrapper"></span>');i.append(e),n.append(i),n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")}),s(window).resize((function(){n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")})})),"undefined"!==typeof i.zoom?i.zoom():i.addClass("no-zoom"),o.$content.html(n),o.contentLoaded()},error:function(t,e){var a=s(p);o.$content.html(a),o.contentLoaded()}});var r=e.data("title")?e.data("title"):e.attr("title");o.setTitle(r),"function"===typeof ga&&ga("send","event","meta","Image Click",a)}else if(a.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/)){var c,d=a.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/),h="meta-lightbox-video";if("youtube"==d[1]&&(c="https://www.youtube.com/embed/".concat(d[4]),h="".concat(h," meta-lightbox-youtube")),"youtu"==d[1]&&(c="https://www.youtube.com/embed/".concat(d[3]),h="".concat(h," meta-lightbox-youtube")),"youtube-nocookie"==d[1]&&(c="https://www.youtube-nocookie.com/embed/".concat(d[4]),h="".concat(h," meta-lightbox-youtube")),"vimeo"==d[1]&&(c="https://player.vimeo.com/video/".concat(d[3]),h="".concat(h," meta-lightbox-vimeo")),c){var g=s("<iframe>",{src:c,class:h,frameborder:0,vspace:0,hspace:0,scrolling:"auto"});u.append('<div id="IFramePreload" class="hidden d-none iframe-preload" style="display:none"></div>');var m=s("#IFramePreload");m.html(g),g.on("load",(function(){console.log("".concat(f,": the iframe was loaded")),m.html(""),m.remove(),o.$content.html(g),o.contentLoaded()}))}var b=e.data("title")?e.data("title"):e.attr("title");o.setTitle(b),"function"===typeof ga&&ga("send","event","meta","Video Click",d)}else"#"==a.substring(0,1)?(s(a).length?(wrap=s('<div class="meta-lightbox-inline" />'),wrap.append(s(a).clone().show()),wrap.outerHeight()<o.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")}),s(window).resize((function(){wrap.outerHeight()<o.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")})})),o.$content.html(wrap),o.contentLoaded()):(wrap=s(p),o.$content.html(wrap),o.contentLoaded()),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",a)):(console.log(o),s.ajax({sync:!1,async:!0,url:a,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("page not found"),window.location.href=url},302:function(){console.log("redirect 302"),window.location.href=url}},error:function(t,e){console.log("AJAX request failure.".concat(t.statusText));var a=s(p);o.$content.html(a),o.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",t.statusText)},success:function(t,e,a){try{var n=s.parseJSON(t);if("object"===l(n)){"object"===l(n.regions)&&"undefinded"!==typeof n.regions.LayoutAjax&&((c=s('<div class="meta-lightbox-ajax" />')).html(n.regions.LayoutAjax),o.$content.html(c),o.contentLoaded());var i=a.getResponseHeader("X-Title"),r=a.getResponseHeader("X-Link");i&&i.length&&r&&r.length&&r!==window.location.href&&r.substring(0,r.indexOf("#"))!==window.location.href.replace(s("base").attr("href"),"/")&&(s(".meta-lightbox-ajax").data("curr-title",document.title),s(".meta-lightbox-ajax").data("curr-link",window.location.href),"undefined"!==typeof window.localStorage&&"/"!==r&&window.localStorage.setItem("current-page",r),document.URL!==r&&document.URL!==s("base").attr("href")+r&&document.URL!=="".concat(s("base").attr("href"),"/").concat(r)&&window.history.pushState({title:i,page:r,ajax:"true"},i,r),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:r.replace(s("base").attr("href"),""),title:i}),ga("send","pageview")))}}catch(d){var c;(c=s('<div class="meta-lightbox-ajax" />')).append(t),o.$content.html(c),o.contentLoaded()}o.contentLoaded()}}))}},{key:"contentLoaded",value:function(){this.$content.removeClass("meta-lightbox-loading"),setTimeout((function(){s(d).trigger("meta-lightbox-loaded")}),1),setTimeout((function(){u.addClass("meta-lightbox-body-effect-fade")}),600)}},{key:"hide",value:function(t){var e=this.$overlay,o=s(".meta-lightbox-ajax").data("curr-title"),a=s(".meta-lightbox-ajax").data("curr-link");o&&a&&("undefined"!==typeof window.localStorage&&"/"!==a&&window.localStorage.setItem("current-page",a),document.URL!==a&&document.URL!==s("base").attr("href")+a&&document.URL!=="".concat(s("base").attr("href"),"/").concat(a)&&window.history.replaceState({title:o,page:a,ajax:"true"},o,a)),e.removeClass("meta-lightbox-open"),u.removeClass("meta-lightbox-body-effect-fade"),s(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),this.isMSIE&&(e.find("iframe").attr("src"," "),e.find("iframe").remove()),s(".meta-lightbox-prev").off("click"),s(".meta-lightbox-next").off("click"),s(".meta-lightbox-content").empty(),u.removeClass("meta-lightbox-body-effect-fade")}}],(o=null)&&c(e.prototype,o),a&&c(e,a),t}(),s(d).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){h.init()})),d.MetaLightboxUI=h},"./src/scss/app.scss":function(t,e,o){},jquery:function(t,e){t.exports=jQuery}});
|
||||
//# sourceMappingURL=app.js.map
|
2
dist/js/app.js.map
vendored
2
dist/js/app.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_events.js","webpack:///./src/js/meta-lightbox.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","AJAX","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","LOADED","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","MAPLOADED","MAPAPILOADED","MAPMARKERCLICK","MAPPOPUPCLOSE","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","$","W","$Body","NAME","NETWORK_ERROR","MetaLightboxUI","window","document","console","log","ui","this","isMSIE","isHidpi","is_hdpi","e","on","preventDefault","stopPropagation","$link","currentTarget","show","devicePixelRatio","matchMedia","matches","constructLightbox","$content","addClass","process","data","$galleryItems","length","hide","off","index","$currentLink","eq","last","setTimeout","first","$overlay","overlay","class","wrap","content","nav","close","title","append","$title","str","html","href","attr","error","$pageSpinner","loadingContent","clone","match","ajax","url","success","img","src","imgwrapper","css","height","resize","zoom","contentLoaded","jqXHR","status","setTitle","ga","video","classTerm","$iframe","frameborder","vspace","hspace","scrolling","$preload","remove","substring","outerHeight","position","top","sync","async","dataType","method","cache","statusCode","404","location","302","statusText","dataJson","parseJSON","getResponseHeader","link","indexOf","replace","localStorage","setItem","URL","history","pushState","page","imagesLoaded","then","removeClass","trigger","callback","replaceState","find","empty","Events","init","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,I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AKN5D,EAASuE,YAAY,sBACrB7G,EAAM6G,YAAY,kCAClB/G,EAAE,sDAAsDgH,QACtD,gBA/BSrG,KAmCJC,SACL4B,EAAS2E,KAAK,UAAU9D,KAAK,MAAO,KACpCb,EAAS2E,KAAK,UAAUjC,UAE1BlF,EAAE,uBAAuBiC,IAAI,SAG7BjC,EAAE,uBAAuBiC,IAAI,SAG7BjC,EAAE,0BAA0BoH,QAE5BlH,EAAM6G,YAAY,sC,EA3iBO,O,2BAAA,KA+iB7B/G,EAAEC,GAAGe,GAAL,UAAWqG,IAAOrJ,KAAlB,YAA0BqJ,IAAOhJ,SAAU,WACzCgC,EAAeiH,UAGjBrH,EAAEI,eAAiBA,G,6DClkBrBtE,EAAOD,QAAUyL","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\n// optional:\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n'use strict';\n\nimport $ from 'jquery';\n\nimport Events from './_events';\n\nconst MetaLightboxUI = (($) => {\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'MetaLightboxUI';\n const NETWORK_ERROR =\n '<div class=\"meta-lightbox-error\"><div class=\"alert alert-error alert-danger\">Connection failure.</div></div>';\n\n class MetaLightboxUI {\n static init() {\n console.log(`Initializing: ${NAME}`);\n\n const ui = this;\n ui.isMSIE = /*@cc_on!@*/ 0;\n try {\n ui.isHidpi = ui.is_hdpi();\n } catch (e) {\n console.log(ui);\n }\n\n $(`.js${NAME},[data-toggle=\"lightbox\"],[data-lightbox-gallery]`).on(\n 'click',\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n const $link = $(e.currentTarget);\n\n ui.show($link);\n },\n );\n }\n\n static is_hdpi() {\n console.log(`${NAME}: isHidpi`);\n const mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (W.devicePixelRatio > 1) return true;\n return W.matchMedia && W.matchMedia(mediaQuery).matches;\n }\n\n static show($link) {\n console.log(`${NAME}: show`);\n const ui = this;\n\n const $lightbox = ui.constructLightbox();\n if (!$lightbox) return;\n\n const $content = ui.$content;\n if (!$content) return;\n\n $('body').addClass(`meta-lightbox-body-effect-fade`);\n\n // Add content\n ui.process($content, $link);\n\n // Nav\n if ($link.data('lightbox-gallery')) {\n const $galleryItems = $(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n\n console.log(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n console.log($galleryItems);\n\n if ($galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index - 1);\n if (!$currentLink.length) $currentLink = $galleryItems.last();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index + 1);\n if (!$currentLink.length) $currentLink = $galleryItems.first();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n }\n\n setTimeout(() => {\n ui.$overlay.addClass('meta-lightbox-open');\n }, 1); // For CSS transitions\n }\n\n static constructLightbox() {\n console.log(`${NAME}: constructLightbox`);\n const ui = this;\n\n const overlay = $('<div>', {\n class:\n 'meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade',\n });\n const wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n });\n const content = $('<div>', {\n class: 'meta-lightbox-content',\n });\n const nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n );\n const close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n );\n const title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n });\n\n if (ui.$overlay) return ui.$overlay;\n\n if (ui.isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $('body').append(overlay);\n\n overlay.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n close.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n ui.$overlay = overlay;\n ui.$content = content;\n ui.$title = title;\n\n return ui.$overlay;\n }\n\n static setTitle(str) {\n const ui = this;\n\n ui.$title.html(str);\n }\n\n static process($content, $link) {\n console.log(`${NAME}: process`);\n const ui = this;\n\n const href = $link.attr('href').length\n ? $link.attr('href')\n : $link.data('href');\n if (!href.length) {\n console.log($link);\n console.error(`${NAME}: href(attr/data) is missing`);\n }\n\n const $pageSpinner = $('#PageLoading .loading-spinner');\n const loadingContent = $pageSpinner.length ? $pageSpinner.clone() : '';\n ui.$content.append(loadingContent).addClass('meta-lightbox-loading');\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png|svg)$/i)) {\n $.ajax({\n url: href,\n success: () => {\n const img = $('<img>', { src: href });\n const wrap = $('<div class=\"meta-lightbox-image\"></div>');\n const imgwrapper = $(\n '<span class=\"meta-lightbox-zoom-wrapper\"></span>',\n );\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n\n $(window).resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n } else {\n imgwrapper.addClass('no-zoom');\n }\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n error: (jqXHR, status) => {\n const wrap = $(NETWORK_ERROR);\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n });\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n )\n ) {\n const video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n );\n let classTerm = 'meta-lightbox-video';\n let src;\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-vimeo`;\n }\n\n if (src) {\n const $iframe = $('<iframe>', {\n src,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n });\n\n $Body.append(\n '<div id=\"IFramePreload\" class=\"hidden d-none iframe-preload\" style=\"display:none\"></div>',\n );\n const $preload = $('#IFramePreload');\n $preload.html($iframe);\n\n $iframe.on('load', () => {\n console.log(`${NAME}: the iframe was loaded`);\n $preload.html('');\n $preload.remove();\n\n ui.$content.html($iframe);\n ui.contentLoaded();\n });\n }\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append($(href).clone().show());\n\n // Vertically center html\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n } else {\n wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n console.log(ui);\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function () {\n console.log('page not found');\n window.location.href = url;\n },\n 302: function () {\n console.log('redirect 302');\n window.location.href = url;\n },\n },\n error: function (jqXHR, status) {\n console.log(`AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function (data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(document).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== window.location.href &&\n link.substring(0, link.indexOf('#')) !==\n window.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', document.title);\n $('.meta-lightbox-ajax').data(\n 'curr-link',\n window.location.href,\n );\n\n if (\n typeof window.localStorage !== 'undefined' &&\n link !== '/'\n ) {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.append(data);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // Vertically center html\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n setTimeout(() => {\n $(window).resize();\n\n if (typeof window.imagesLoaded === 'function') {\n window.imagesLoaded().then(() => {\n $(window).resize();\n });\n }\n }, 500);\n\n ui.contentLoaded();\n },\n });\n }\n }\n\n static contentLoaded() {\n const ui = this;\n\n ui.$content.removeClass('meta-lightbox-loading');\n setTimeout(() => {\n $(W).trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $Body.addClass('meta-lightbox-body-effect-fade');\n }, 600);\n }\n\n static hide(callback) {\n const ui = this;\n\n const $overlay = ui.$overlay;\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof window.localStorage !== 'undefined' && link !== '/') {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $Body.removeClass('meta-lightbox-body-effect-fade');\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (ui.isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $Body.removeClass('meta-lightbox-body-effect-fade');\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n MetaLightboxUI.init();\n });\n\n W.MetaLightboxUI = MetaLightboxUI;\n\n return MetaLightboxUI;\n})($);\n\nexport default MetaLightboxUI;\n","module.exports = jQuery;"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_events.js","webpack:///./src/js/meta-lightbox.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","AJAX","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","LOADED","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","MAPLOADED","MAPAPILOADED","MAPMARKERCLICK","MAPPOPUPCLOSE","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","$","W","$Body","NAME","NETWORK_ERROR","MetaLightboxUI","window","document","console","log","ui","this","isMSIE","isHidpi","is_hdpi","e","on","preventDefault","stopPropagation","$link","currentTarget","show","devicePixelRatio","matchMedia","matches","constructLightbox","$content","addClass","process","data","$galleryItems","length","hide","off","index","$currentLink","eq","last","setTimeout","first","$overlay","overlay","class","wrap","content","nav","close","title","append","$title","str","html","href","attr","error","$pageSpinner","loadingContent","clone","match","ajax","url","success","img","src","imgwrapper","css","height","resize","zoom","contentLoaded","jqXHR","status","setTitle","ga","video","classTerm","$iframe","frameborder","vspace","hspace","scrolling","$preload","remove","substring","outerHeight","position","top","sync","async","dataType","method","cache","statusCode","404","location","302","statusText","dataJson","parseJSON","getResponseHeader","link","indexOf","replace","localStorage","setItem","URL","history","pushState","page","removeClass","trigger","callback","replaceState","find","empty","Events","init","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,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WACTpC,EAAMyB,SAAS,oCACd,OAxfsB,2BA2ffoF,GACV,IAEMvE,EAFK7B,KAES6B,SAEhBO,EAAQ/C,EAAE,uBAAuB6B,KAAK,cACxCuE,EAAOpG,EAAE,uBAAuB6B,KAAK,aACnCkB,GAASqD,IACwB,qBAAxB9F,OAAOiG,cAAyC,MAATH,GAChD9F,OAAOiG,aAAaC,QAAQ,eAAgBJ,GAI5C7F,SAASkG,MAAQL,GACjB7F,SAASkG,MAAQzG,EAAE,QAAQqD,KAAK,QAAU+C,GAC1C7F,SAASkG,MAAT,UAAoBzG,EAAE,QAAQqD,KAAK,QAAnC,YAA8C+C,IAE9C9F,OAAOoG,QAAQM,aACb,CACEjE,QACA6D,KAAMR,EACNzC,KAAM,QAERZ,EACAqD,IAKN5D,EAASqE,YAAY,sBACrB3G,EAAM2G,YAAY,kCAClB7G,EAAE,sDAAsD8G,QACtD,gBA/BSnG,KAmCJC,SACL4B,EAASyE,KAAK,UAAU5D,KAAK,MAAO,KACpCb,EAASyE,KAAK,UAAU/B,UAE1BlF,EAAE,uBAAuBiC,IAAI,SAG7BjC,EAAE,uBAAuBiC,IAAI,SAG7BjC,EAAE,0BAA0BkH,QAE5BhH,EAAM2G,YAAY,sC,EA3iBO,O,2BAAA,KA+iB7B7G,EAAEC,GAAGe,GAAL,UAAWmG,IAAOnJ,KAAlB,YAA0BmJ,IAAO9I,SAAU,WACzCgC,EAAe+G,UAGjBnH,EAAEI,eAAiBA,G,6DClkBrBtE,EAAOD,QAAUuL","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\n// optional:\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n'use strict';\n\nimport $ from 'jquery';\n\nimport Events from './_events';\n\nconst MetaLightboxUI = (($) => {\n const W = window;\n const D = document;\n const $Body = $('body');\n\n const NAME = 'MetaLightboxUI';\n const NETWORK_ERROR =\n '<div class=\"meta-lightbox-error\"><div class=\"alert alert-error alert-danger\">Connection failure.</div></div>';\n\n class MetaLightboxUI {\n static init() {\n console.log(`Initializing: ${NAME}`);\n\n const ui = this;\n ui.isMSIE = /*@cc_on!@*/ 0;\n try {\n ui.isHidpi = ui.is_hdpi();\n } catch (e) {\n console.log(ui);\n }\n\n $(`.js${NAME},[data-toggle=\"lightbox\"],[data-lightbox-gallery]`).on(\n 'click',\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n const $link = $(e.currentTarget);\n\n ui.show($link);\n },\n );\n }\n\n static is_hdpi() {\n console.log(`${NAME}: isHidpi`);\n const mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (W.devicePixelRatio > 1) return true;\n return W.matchMedia && W.matchMedia(mediaQuery).matches;\n }\n\n static show($link) {\n console.log(`${NAME}: show`);\n const ui = this;\n\n const $lightbox = ui.constructLightbox();\n if (!$lightbox) return;\n\n const $content = ui.$content;\n if (!$content) return;\n\n $('body').addClass(`meta-lightbox-body-effect-fade`);\n\n // Add content\n ui.process($content, $link);\n\n // Nav\n if ($link.data('lightbox-gallery')) {\n const $galleryItems = $(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n\n console.log(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n console.log($galleryItems);\n\n if ($galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index - 1);\n if (!$currentLink.length) $currentLink = $galleryItems.last();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index + 1);\n if (!$currentLink.length) $currentLink = $galleryItems.first();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n }\n\n setTimeout(() => {\n ui.$overlay.addClass('meta-lightbox-open');\n }, 1); // For CSS transitions\n }\n\n static constructLightbox() {\n console.log(`${NAME}: constructLightbox`);\n const ui = this;\n\n const overlay = $('<div>', {\n class:\n 'meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade',\n });\n const wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n });\n const content = $('<div>', {\n class: 'meta-lightbox-content',\n });\n const nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n );\n const close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n );\n const title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n });\n\n if (ui.$overlay) return ui.$overlay;\n\n if (ui.isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $('body').append(overlay);\n\n overlay.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n close.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n ui.$overlay = overlay;\n ui.$content = content;\n ui.$title = title;\n\n return ui.$overlay;\n }\n\n static setTitle(str) {\n const ui = this;\n\n ui.$title.html(str);\n }\n\n static process($content, $link) {\n console.log(`${NAME}: process`);\n const ui = this;\n\n const href = $link.attr('href').length\n ? $link.attr('href')\n : $link.data('href');\n if (!href.length) {\n console.log($link);\n console.error(`${NAME}: href(attr/data) is missing`);\n }\n\n const $pageSpinner = $('#PageLoading .loading-spinner');\n const loadingContent = $pageSpinner.length ? $pageSpinner.clone() : '';\n ui.$content.append(loadingContent).addClass('meta-lightbox-loading');\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png|svg)$/i)) {\n $.ajax({\n url: href,\n success: () => {\n const img = $('<img>', { src: href });\n const wrap = $('<div class=\"meta-lightbox-image\"></div>');\n const imgwrapper = $(\n '<span class=\"meta-lightbox-zoom-wrapper\"></span>',\n );\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n\n $(window).resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n } else {\n imgwrapper.addClass('no-zoom');\n }\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n error: (jqXHR, status) => {\n const wrap = $(NETWORK_ERROR);\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n });\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n )\n ) {\n const video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n );\n let classTerm = 'meta-lightbox-video';\n let src;\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-vimeo`;\n }\n\n if (src) {\n const $iframe = $('<iframe>', {\n src,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n });\n\n $Body.append(\n '<div id=\"IFramePreload\" class=\"hidden d-none iframe-preload\" style=\"display:none\"></div>',\n );\n const $preload = $('#IFramePreload');\n $preload.html($iframe);\n\n $iframe.on('load', () => {\n console.log(`${NAME}: the iframe was loaded`);\n $preload.html('');\n $preload.remove();\n\n ui.$content.html($iframe);\n ui.contentLoaded();\n });\n }\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append($(href).clone().show());\n\n // Vertically center html\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n } else {\n wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n console.log(ui);\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function () {\n console.log('page not found');\n window.location.href = url;\n },\n 302: function () {\n console.log('redirect 302');\n window.location.href = url;\n },\n },\n error: function (jqXHR, status) {\n console.log(`AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function (data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(document).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== window.location.href &&\n link.substring(0, link.indexOf('#')) !==\n window.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', document.title);\n $('.meta-lightbox-ajax').data(\n 'curr-link',\n window.location.href,\n );\n\n if (\n typeof window.localStorage !== 'undefined' &&\n link !== '/'\n ) {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.append(data);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // Vertically center html\n /*if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });*/\n\n /*setTimeout(() => {\n $(window).resize();\n\n if (typeof window.imagesLoaded === 'function') {\n window.imagesLoaded().then(() => {\n $(window).resize();\n });\n }\n }, 500);*/\n\n ui.contentLoaded();\n },\n });\n }\n }\n\n static contentLoaded() {\n const ui = this;\n\n ui.$content.removeClass('meta-lightbox-loading');\n setTimeout(() => {\n $(W).trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $Body.addClass('meta-lightbox-body-effect-fade');\n }, 600);\n }\n\n static hide(callback) {\n const ui = this;\n\n const $overlay = ui.$overlay;\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof window.localStorage !== 'undefined' && link !== '/') {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $Body.removeClass('meta-lightbox-body-effect-fade');\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (ui.isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $Body.removeClass('meta-lightbox-body-effect-fade');\n }\n }\n\n $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {\n MetaLightboxUI.init();\n });\n\n W.MetaLightboxUI = MetaLightboxUI;\n\n return MetaLightboxUI;\n})($);\n\nexport default MetaLightboxUI;\n","module.exports = jQuery;"],"sourceRoot":""}
|
Loading…
Reference in New Issue
Block a user