UNPKG

room-gallery

Version:

Room Gallery: A 3D carousel - A Responsive 3D Image Slider Implemented in TypeScript as a React Component, Utilizing Vanilla JavaScript and jQuery

2 lines 63 kB
/*! For license information please see index.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.RoomGallery=t(require("react")):e.RoomGallery=t(e.React)}(this,(e=>(()=>{"use strict";var t={12:t=>{t.exports=e},188:(e,t,o)=>{o.r(t),o.d(t,{DOWN:()=>l,LEFT:()=>a,RIGHT:()=>i,UP:()=>r,useSwipeable:()=>g});var n=o(12);const a="Left",i="Right",r="Up",l="Down",s={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},c={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},u="mousemove",d="mouseup",m="touchend",p="touchmove",f="touchstart";function h(e,t){if(0===t)return e;const o=Math.PI/180*t;return[e[0]*Math.cos(o)+e[1]*Math.sin(o),e[1]*Math.cos(o)-e[0]*Math.sin(o)]}function g(e){const{trackMouse:t}=e,o=n.useRef(Object.assign({},c)),g=n.useRef(Object.assign({},s)),v=n.useRef(Object.assign({},g.current));let b;for(b in v.current=Object.assign({},g.current),g.current=Object.assign(Object.assign({},s),e),s)void 0===g.current[b]&&(g.current[b]=s[b]);const[y,w]=n.useMemo((()=>function(e,t){const o=t=>{const o="touches"in t;o&&t.touches.length>1||e(((e,a)=>{a.trackMouse&&!o&&(document.addEventListener(u,n),document.addEventListener(d,v));const{clientX:i,clientY:r}=o?t.touches[0]:t,l=h([i,r],a.rotationAngle);return a.onTouchStartOrOnMouseDown&&a.onTouchStartOrOnMouseDown({event:t}),Object.assign(Object.assign(Object.assign({},e),c),{initial:l.slice(),xy:l,start:t.timeStamp||0})}))},n=t=>{e(((e,o)=>{const n="touches"in t;if(n&&t.touches.length>1)return e;if(t.timeStamp-e.start>o.swipeDuration)return e.swiping?Object.assign(Object.assign({},e),{swiping:!1}):e;const{clientX:c,clientY:u}=n?t.touches[0]:t,[d,m]=h([c,u],o.rotationAngle),p=d-e.xy[0],f=m-e.xy[1],g=Math.abs(p),v=Math.abs(f),b=(t.timeStamp||0)-e.start,y=Math.sqrt(g*g+v*v)/(b||1),w=[p/(b||1),f/(b||1)],E=function(e,t,o,n){return e>t?o>0?i:a:n>0?l:r}(g,v,p,f),k="number"==typeof o.delta?o.delta:o.delta[E.toLowerCase()]||s.delta;if(g<k&&v<k&&!e.swiping)return e;const S={absX:g,absY:v,deltaX:p,deltaY:f,dir:E,event:t,first:e.first,initial:e.initial,velocity:y,vxvy:w};S.first&&o.onSwipeStart&&o.onSwipeStart(S),o.onSwiping&&o.onSwiping(S);let T=!1;return(o.onSwiping||o.onSwiped||o[`onSwiped${E}`])&&(T=!0),T&&o.preventScrollOnSwipe&&o.trackTouch&&t.cancelable&&t.preventDefault(),Object.assign(Object.assign({},e),{first:!1,eventData:S,swiping:!0})}))},g=t=>{e(((e,o)=>{let n;if(e.swiping&&e.eventData){if(t.timeStamp-e.start<o.swipeDuration){n=Object.assign(Object.assign({},e.eventData),{event:t}),o.onSwiped&&o.onSwiped(n);const a=o[`onSwiped${n.dir}`];a&&a(n)}}else o.onTap&&o.onTap({event:t});return o.onTouchEndOrOnMouseUp&&o.onTouchEndOrOnMouseUp({event:t}),Object.assign(Object.assign(Object.assign({},e),c),{eventData:n})}))},v=e=>{document.removeEventListener(u,n),document.removeEventListener(d,v),g(e)},b=(e,t)=>{let a=()=>{};if(e&&e.addEventListener){const i=Object.assign(Object.assign({},s.touchEventOptions),t.touchEventOptions),r=[[f,o,i],[p,n,Object.assign(Object.assign({},i),t.preventScrollOnSwipe?{passive:!1}:{})],[m,g,i]];r.forEach((([t,o,n])=>e.addEventListener(t,o,n))),a=()=>r.forEach((([t,o])=>e.removeEventListener(t,o)))}return a},y={ref:t=>{null!==t&&e(((e,o)=>{if(e.el===t)return e;const n={};return e.el&&e.el!==t&&e.cleanUpTouch&&(e.cleanUpTouch(),n.cleanUpTouch=void 0),o.trackTouch&&t&&(n.cleanUpTouch=b(t,o)),Object.assign(Object.assign(Object.assign({},e),{el:t}),n)}))}};return t.trackMouse&&(y.onMouseDown=o),[y,b]}((e=>o.current=e(o.current,g.current)),{trackMouse:t})),[t]);return o.current=function(e,t,o,n){return t.trackTouch&&e.el?e.cleanUpTouch?t.preventScrollOnSwipe!==o.preventScrollOnSwipe||t.touchEventOptions.passive!==o.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:n(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:n(e.el,t)}):(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0}))}(o.current,g.current,v.current,w),y}},191:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.kebabize=t.parseWalls=t.parseRooms=t.findItemByPosition=void 0;const n=o(835),a=[n.Direction.n,n.Direction.e,n.Direction.s,n.Direction.w],i=(e,t=0,o,n,a)=>{const i={index:n,visible:!0,direction:o,items:[]};e&&i.items.push(e),a[t]&&a[t].walls&&a[t].walls.push(i)};t.findItemByPosition=(e,t)=>t.find((t=>t.position&&t.position.x===e.x&&e.y==e.y?t:null)),t.parseRooms=function(e,t,o=!1){const n=e.length;let a=e.length;o||(a=Math.ceil((n-2)/2)||1);for(let e=0;e<a;e++){const o={index:e,walls:[]};t.push(o)}},t.parseWalls=function(e,o,r,l={x:0,y:0},s=!1){const c=e.length,u=c>4?c:4,d=Math.ceil((c-2)/2)||1;let m=0,p=0,f=n.Direction.n,h=!1;const g=(e,t)=>{let n={};e&&(n=Object.assign({},e),n.index=t,n.position={x:p,y:m},o.push(n)),i(e?n:null,p,f,t,r)};if(s){i(null,0,n.Direction.w,c,r);for(let t=0;t<c;t++){const o=Object.assign({},e[t]);g(e[t]?o:null,t),p++}i(null,c-1,n.Direction.e,c,r)}else{for(let t=1;t<=u;t++){1===d?(f=a[t-1],m=t-1):t===d+1?(f=n.Direction.e,m=1):t>=d+2&&t<2*d+2?(f=n.Direction.s,m=2):t===2*d+2&&(f=n.Direction.w,m=3),f===n.Direction.w&&0===p&&(h=!0);const o=Object.assign({},e[t-1]);g(e[t-1]?o:null,t-1),t<d?p++:t>d+1&&t<2*d+1&&p--}h||i(null,0,n.Direction.w,u,r)}return(0,t.findItemByPosition)(l,o)},t.kebabize=e=>e.replace(/(?:!\p{Uppercase_Letter})\p{Uppercase_Letter}|\p{Uppercase_Letter}(?!\p{Uppercase_Letter})/gu,"-$&").replace(/^-/,"").toLowerCase()},214:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var a=Object.getOwnPropertyDescriptor(t,o);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,a)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return a(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Item=void 0;const l=i(o(12)),s=o(678),c=r(o(454)),u=(0,l.forwardRef)(((e,t)=>l.default.createElement("img",Object.assign({ref:t},e))));t.Item=({image:e,title:t,description:o,descriptionHtml:n,html:a,video:i,vimeo:r,youtube:d,element:m,HtmlElement:p,position:f,height:h,width:g})=>{var v,b;const{zoom:y,position:w,settings:E}=(0,l.useContext)(s.GalleryContext),[k,S]=(0,l.useState)(!1),T=l.default.createRef(),[O,x]=(0,l.useState)(!1),N=l.default.createRef(),_=l.default.createRef(),M={ALLOWED_ATTR:(null===(v=null==E?void 0:E.sanitizeHtmlOptions)||void 0===v?void 0:v.allowedAttributes)||[],ALLOWED_TAGS:(null===(b=null==E?void 0:E.sanitizeHtmlOptions)||void 0===b?void 0:b.allowedTags)||[],KEEP_CONTENT:!0},I=()=>{S(!0)},A=()=>{x(!0)},C=()=>{if(f&&w)return w.x-f.x<1&&w.x-f.x>-1&&w.y===f.y};function D(){return{width:`min(100%, ${g})`,height:`min(100%, ${h})`}}function R(){return y&&"object"==typeof e&&e.zoom&&C()}function L(){return"room-item"+((()=>{if(f&&w)return w.x==f.x&&w.y===f.y})()?" item-active":"")}function z(){return l.default.createElement(l.default.Fragment,null,(t||o)&&l.default.createElement("div",{className:"item-desc"},t&&l.default.createElement("p",null,t),o&&l.default.createElement("span",null,o)),n&&l.default.createElement("div",{className:"item-desc",dangerouslySetInnerHTML:{__html:E.sanitizeHtml?c.default.sanitize(n,M):n}}))}return(0,l.useEffect)((()=>{T.current&&T.current.complete&&I(),N.current&&N.current.complete&&A()}),[]),m?l.default.createElement("div",{className:L()},m):p?l.default.createElement("div",{className:L(),dangerouslySetInnerHTML:{__html:E.sanitizeHtml?c.default.sanitize(p.innerHTML,M):p.innerHTML}}):a?l.default.createElement("div",{className:L(),dangerouslySetInnerHTML:{__html:E.sanitizeHtml?c.default.sanitize(a,M):a}}):i?l.default.createElement("div",{className:L()},l.default.createElement("div",{className:"item-video"},l.default.createElement("video",{width:null!=g?g:"640",height:null!=h?h:"360",controls:!0},l.default.createElement("source",{src:i}))),z()):r?l.default.createElement("div",{className:L()},l.default.createElement("div",{className:"item-video"},l.default.createElement("iframe",{title:"vimeo-player",src:r,width:null!=g?g:"640",height:null!=h?h:"360",frameBorder:"0",allowFullScreen:!0})),z()):d?l.default.createElement("div",{className:L()},l.default.createElement("div",{className:"item-video"},l.default.createElement("iframe",{width:null!=g?g:"560",height:null!=h?h:"315",src:d,title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})),z()):l.default.createElement("div",{className:L()},l.default.createElement("div",{className:"item-image"},"object"==typeof e&&!k&&l.default.createElement(u,{ref:_,className:"item-prompt-image",src:null==e?void 0:e.prompt,style:D()}),"string"==typeof e?l.default.createElement(u,{className:"item-original-image",ref:T,onLoad:I,src:e,style:D()}):("object"==typeof e&&(e.prompt&&C()||!e.prompt)||k)&&l.default.createElement(u,{className:"item-original-image",ref:T,onLoad:I,src:null==e?void 0:e.original,style:D()}),"object"==typeof e&&R()&&l.default.createElement(u,{ref:N,className:"item-zoom-image",onLoad:A,style:Object.assign(Object.assign({},D()),{opacity:O&&R()?1:0}),src:e.zoom})),z())}},296:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ZoomOutIcon=t.ZoomInIcon=t.LightOffIcon=t.PrevIcon=t.NextIcon=void 0;const a=n(o(12));t.NextIcon=()=>a.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"768",height:"768",viewBox:"0 0 768 768"},a.default.createElement("path",{fill:"currentColor",d:"M310.624 598.624l192-192c12.512-12.512 12.512-32.768 0-45.248l-192-192c-12.512-12.512-32.768-12.512-45.248 0s-12.512 32.768 0 45.248l169.376 169.376-169.376 169.376c-12.512 12.512-12.512 32.768 0 45.248s32.768 12.512 45.248 0z"})),t.PrevIcon=()=>a.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"768",height:"768",viewBox:"0 0 768 768"},a.default.createElement("path",{fill:"currentColor",d:"M502.624 553.376l-169.376-169.376 169.376-169.376c12.512-12.512 12.512-32.768 0-45.248s-32.768-12.512-45.248 0l-192 192c-12.512 12.512-12.512 32.768 0 45.248l192 192c12.512 12.512 32.768 12.512 45.248 0s12.512-32.768 0-45.248z"})),t.LightOffIcon=()=>a.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"768",height:"768",viewBox:"0 0 768 768"},a.default.createElement("g",null,a.default.createElement("path",{fill:"currentColor",d:"M384 0c159.050 0 288 128.951 288 288 0 113.139-65.26 210.797-160 257.879v94.121c0 53.020-42.98 96-96 96h-64c-53.019 0-96-42.98-96-96v-94.121c-94.741-47.081-160-144.74-160-257.879 0-159.049 128.951-288 288-288zM448 544v-18.784c0-13.034 7.907-24.768 19.988-29.661 82.156-33.271 140.013-113.642 140.013-207.555 0-123.703-100.298-224-224-224s-224 100.297-224 224c0 93.913 57.855 174.285 140.012 207.555 12.082 4.893 19.988 16.627 19.988 29.661v18.784h128zM320 608v32c0 17.674 14.326 32 32 32h64c17.674 0 32-14.327 32-32v-32h-128z"}),a.default.createElement("path",{fill:"currentColor",d:"M384 192c-53.014 0-96 42.985-96 96 0 17.673-14.327 32-32 32s-32-14.327-32-32c0-88.361 71.639-160 160-160 17.674 0 32 14.327 32 32s-14.326 32-32 32z"}))),t.ZoomInIcon=()=>a.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"768",height:"768",viewBox:"0 0 768 768"},a.default.createElement("path",{fill:"currentColor",d:"M352 128c-123.712 0-224 100.288-224 224s100.288 224 224 224c123.712 0 224-100.288 224-224s-100.288-224-224-224zM64 352c0-159.058 128.942-288 288-288 159.059 0 288 128.942 288 288 0 159.059-128.941 288-288 288-159.058 0-288-128.941-288-288z"}),a.default.createElement("path",{fill:"currentColor",d:"M510.173 510.173c12.496-12.496 32.759-12.496 45.254 0l139.2 139.2c12.496 12.496 12.496 32.759 0 45.254s-32.759 12.496-45.254 0l-139.2-139.2c-12.496-12.496-12.496-32.759 0-45.254z"}),a.default.createElement("path",{fill:"currentColor",d:"M352 224c17.674 0 32 14.327 32 32v192c0 17.674-14.327 32-32 32s-32-14.326-32-32v-192c0-17.673 14.326-32 32-32z"}),a.default.createElement("path",{fill:"currentColor",d:"M224 352c0-17.674 14.327-32 32-32h192c17.674 0 32 14.327 32 32s-14.326 32-32 32h-192c-17.673 0-32-14.327-32-32z"})),t.ZoomOutIcon=()=>a.default.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"768",height:"768",viewBox:"0 0 768 768"},a.default.createElement("path",{fill:"currentColor",d:"M352 128c-123.712 0-224 100.288-224 224s100.288 224 224 224c123.712 0 224-100.288 224-224s-100.288-224-224-224zM64 352c0-159.058 128.942-288 288-288 159.059 0 288 128.942 288 288 0 159.059-128.941 288-288 288-159.058 0-288-128.941-288-288z"}),a.default.createElement("path",{fill:"currentColor",d:"M510.173 510.173c12.496-12.496 32.759-12.496 45.254 0l139.2 139.2c12.496 12.496 12.496 32.759 0 45.254s-32.759 12.496-45.254 0l-139.2-139.2c-12.496-12.496-12.496-32.759 0-45.254z"}),a.default.createElement("path",{fill:"currentColor",d:"M224 352c0-17.674 14.327-32 32-32h192c17.674 0 32 14.327 32 32s-14.326 32-32 32h-192c-17.673 0-32-14.327-32-32z"}))},454:e=>{const{entries:t,setPrototypeOf:o,isFrozen:n,getPrototypeOf:a,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:l,create:s}=Object,{apply:c,construct:u}="undefined"!=typeof Reflect&&Reflect;r||(r=function(e){return e}),l||(l=function(e){return e}),c||(c=function(e,t,o){return e.apply(t,o)}),u||(u=function(e,t){return new e(...t)});const d=x(Array.prototype.forEach),m=x(Array.prototype.lastIndexOf),p=x(Array.prototype.pop),f=x(Array.prototype.push),h=x(Array.prototype.splice),g=x(String.prototype.toLowerCase),v=x(String.prototype.toString),b=x(String.prototype.match),y=x(String.prototype.replace),w=x(String.prototype.indexOf),E=x(String.prototype.trim),k=x(Object.prototype.hasOwnProperty),S=x(RegExp.prototype.test),T=(O=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return u(O,t)});var O;function x(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),a=1;a<o;a++)n[a-1]=arguments[a];return c(e,t,n)}}function N(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;o&&o(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=a(o);e!==o&&(n(t)||(t[i]=e),o=e)}e[o]=!0}return e}function _(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}function M(e){const o=s(null);for(const[n,a]of t(e))k(e,n)&&(Array.isArray(a)?o[n]=_(a):a&&"object"==typeof a&&a.constructor===Object?o[n]=M(a):o[n]=a);return o}function I(e,t){for(;null!==e;){const o=i(e,t);if(o){if(o.get)return x(o.get);if("function"==typeof o.value)return x(o.value)}e=a(e)}return function(){return null}}const A=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R=r(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),z=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=r(["#text"]),P=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),j=r(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=l(/<%[\w\W]*|[\w\W]*%>/gm),Z=l(/\$\{[\w\W]*/gm),G=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=l(/^aria-[\-\w]+$/),q=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=l(/^(?:\w+script|data):/i),X=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=l(/^html$/i),K=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:K,DATA_ATTR:G,DOCTYPE_NAME:V,ERB_EXPR:W,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:F,TMPLIT_EXPR:Z});const Q=function(){return"undefined"==typeof window?null:window};var ee=function e(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!o||!o.document||9!==o.document.nodeType||!o.Element)return n.isSupported=!1,n;let{document:a}=o;const i=a,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:O,Element:x,NodeFilter:_,NamedNodeMap:F=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Z,trustedTypes:G}=o,Y=x.prototype,$=I(Y,"cloneNode"),X=I(Y,"remove"),K=I(Y,"nextSibling"),ee=I(Y,"childNodes"),te=I(Y,"parentNode");if("function"==typeof u){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let oe,ne="";const{implementation:ae,createNodeIterator:ie,createDocumentFragment:re,getElementsByTagName:le}=a,{importNode:se}=i;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof t&&"function"==typeof te&&ae&&void 0!==ae.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:me,DATA_ATTR:pe,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ve}=J;let{IS_ALLOWED_URI:be}=J,ye=null;const we=N({},[...A,...C,...D,...L,...B]);let Ee=null;const ke=N({},[...P,...j,...H,...U]);let Se=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Oe=null,xe=!0,Ne=!0,_e=!1,Me=!0,Ie=!1,Ae=!0,Ce=!1,De=!1,Re=!1,Le=!1,ze=!1,Be=!1,Pe=!0,je=!1,He=!0,Ue=!1,Fe={},We=null;const Ze=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ge=null;const Ye=N({},["audio","video","img","source","image","track"]);let qe=null;const $e=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,Qe=!1,et=null;const tt=N({},[Xe,Ve,Ke],v);let ot=N({},["mi","mo","mn","ms","mtext"]),nt=N({},["annotation-xml"]);const at=N({},["title","style","font","a","script"]);let it=null;const rt=["application/xhtml+xml","text/html"];let lt=null,st=null;const ct=a.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=M(e),it=-1===rt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?v:g,ye=k(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,lt):we,Ee=k(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,lt):ke,et=k(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,v):tt,qe=k(e,"ADD_URI_SAFE_ATTR")?N(M($e),e.ADD_URI_SAFE_ATTR,lt):$e,Ge=k(e,"ADD_DATA_URI_TAGS")?N(M(Ye),e.ADD_DATA_URI_TAGS,lt):Ye,We=k(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,lt):Ze,Te=k(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,lt):{},Oe=k(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,lt):{},Fe=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,xe=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ae=!1!==e.SAFE_FOR_XML,Ce=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,ze=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Pe=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||q,Je=e.NAMESPACE||Ke,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,nt=e.HTML_INTEGRATION_POINTS||nt,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Ne=!1),ze&&(Le=!0),Fe&&(ye=N({},B),Ee=[],!0===Fe.html&&(N(ye,A),N(Ee,P)),!0===Fe.svg&&(N(ye,C),N(Ee,j),N(Ee,U)),!0===Fe.svgFilters&&(N(ye,D),N(Ee,j),N(Ee,U)),!0===Fe.mathMl&&(N(ye,L),N(Ee,H),N(Ee,U))),e.ADD_TAGS&&(ye===we&&(ye=M(ye)),N(ye,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Ee===ke&&(Ee=M(Ee)),N(Ee,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&N(qe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(We===Ze&&(We=M(We)),N(We,e.FORBID_CONTENTS,lt)),He&&(ye["#text"]=!0),Ce&&N(ye,["html","head","body"]),ye.table&&(N(ye,["tbody"]),delete Te.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');oe=e.TRUSTED_TYPES_POLICY,ne=oe.createHTML("")}else void 0===oe&&(oe=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let o=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(o=t.getAttribute(n));const a="dompurify"+(o?"#"+o:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(G,l)),null!==oe&&"string"==typeof ne&&(ne=oe.createHTML(""));r&&r(e),st=e}},mt=N({},[...C,...D,...R]),pt=N({},[...L,...z]),ft=function(e){f(n.removed,{element:e});try{te(e).removeChild(e)}catch(t){X(e)}},ht=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Le||ze)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){let t=null,o=null;if(Re)e="<remove></remove>"+e;else{const t=b(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===it&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=oe?oe.createHTML(e):e;if(Je===Ke)try{t=(new Z).parseFromString(n,it)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?ne:n}catch(e){}}const i=t.body||t.documentElement;return e&&o&&i.insertBefore(a.createTextNode(o),i.childNodes[0]||null),Je===Ke?le.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:i},vt=function(e){return ie.call(e.ownerDocument||e,e,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT|_.SHOW_PROCESSING_INSTRUCTION|_.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},yt=function(e){return"function"==typeof O&&e instanceof O};function wt(e,t,o){d(e,(e=>{e.call(n,t,o,st)}))}const Et=function(e){let t=null;if(wt(ce.beforeSanitizeElements,e,null),bt(e))return ft(e),!0;const o=lt(e.nodeName);if(wt(ce.uponSanitizeElement,e,{tagName:o,allowedTags:ye}),e.hasChildNodes()&&!yt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return ft(e),!0;if(7===e.nodeType)return ft(e),!0;if(Ae&&8===e.nodeType&&S(/<[/\w]/g,e.data))return ft(e),!0;if(!ye[o]||Te[o]){if(!Te[o]&&St(o)){if(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,o))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(o))return!1}if(He&&!We[o]){const t=te(e)||e.parentNode,o=ee(e)||e.childNodes;if(o&&t)for(let n=o.length-1;n>=0;--n){const a=$(o[n],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,K(e))}}return ft(e),!0}return e instanceof x&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const o=g(e.tagName),n=g(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Ke?"svg"===o:t.namespaceURI===Xe?"svg"===o&&("annotation-xml"===n||ot[n]):Boolean(mt[o]):e.namespaceURI===Xe?t.namespaceURI===Ke?"math"===o:t.namespaceURI===Ve?"math"===o&&nt[n]:Boolean(pt[o]):e.namespaceURI===Ke?!(t.namespaceURI===Ve&&!nt[n])&&!(t.namespaceURI===Xe&&!ot[n])&&!pt[o]&&(at[o]||!mt[o]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(ft(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,d([ue,de,me],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ce.afterSanitizeElements,e,null),!1):(ft(e),!0)},kt=function(e,t,o){if(Pe&&("id"===t||"name"===t)&&(o in a||o in ct))return!1;if(Ne&&!Oe[t]&&S(pe,t));else if(xe&&S(fe,t));else if(!Ee[t]||Oe[t]){if(!(St(e)&&(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&S(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&S(Se.tagNameCheck,o)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(o))))return!1}else if(qe[t]);else if(S(be,y(o,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(o,"data:")||!Ge[e])if(_e&&!S(he,y(o,ge,"")));else if(o)return!1;return!0},St=function(e){return"annotation-xml"!==e&&b(e,ve)},Tt=function(e){wt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let a=t.length;for(;a--;){const i=t[a],{name:r,namespaceURI:l,value:s}=i,c=lt(r);let u="value"===r?s:E(s);if(o.attrName=c,o.attrValue=u,o.keepAttr=!0,o.forceKeepAttr=void 0,wt(ce.uponSanitizeAttribute,e,o),u=o.attrValue,!je||"id"!==c&&"name"!==c||(ht(r,e),u="user-content-"+u),Ae&&S(/((--!?|])>)|<\/(style|title)/i,u)){ht(r,e);continue}if(o.forceKeepAttr)continue;if(ht(r,e),!o.keepAttr)continue;if(!Me&&S(/\/>/i,u)){ht(r,e);continue}Ie&&d([ue,de,me],(e=>{u=y(u,e," ")}));const m=lt(e.nodeName);if(kt(m,c,u)){if(oe&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(m,c)){case"TrustedHTML":u=oe.createHTML(u);break;case"TrustedScriptURL":u=oe.createScriptURL(u)}try{l?e.setAttributeNS(l,r,u):e.setAttribute(r,u),bt(e)?ft(e):p(n.removed)}catch(e){}}}wt(ce.afterSanitizeAttributes,e,null)},Ot=function e(t){let o=null;const n=vt(t);for(wt(ce.beforeSanitizeShadowDOM,t,null);o=n.nextNode();)wt(ce.uponSanitizeShadowNode,o,null),Et(o),Tt(o),o.content instanceof c&&e(o.content);wt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,a=null,r=null,l=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!yt(e)){if("function"!=typeof e.toString)throw T("toString is not a function");if("string"!=typeof(e=e.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported)return e;if(De||dt(t),n.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||Te[t])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof O)o=gt("\x3c!----\x3e"),a=o.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Le&&!Ie&&!Ce&&-1===e.indexOf("<"))return oe&&Be?oe.createHTML(e):e;if(o=gt(e),!o)return Le?null:Be?ne:""}o&&Re&&ft(o.firstChild);const s=vt(Ue?e:o);for(;r=s.nextNode();)Et(r),Tt(r),r.content instanceof c&&Ot(r.content);if(Ue)return e;if(Le){if(ze)for(l=re.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return(Ee.shadowroot||Ee.shadowrootmode)&&(l=se.call(i,l,!0)),l}let u=Ce?o.outerHTML:o.innerHTML;return Ce&&ye["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&S(V,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),Ie&&d([ue,de,me],(e=>{u=y(u,e," ")})),oe&&Be?oe.createHTML(u):u},n.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},n.clearConfig=function(){st=null,De=!1},n.isValidAttribute=function(e,t,o){st||dt({});const n=lt(e),a=lt(t);return kt(n,a,o)},n.addHook=function(e,t){"function"==typeof t&&f(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const o=m(ce[e],t);return-1===o?void 0:h(ce[e],o,1)[0]}return p(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();e.exports=ee},678:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var a=Object.getOwnPropertyDescriptor(t,o);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,a)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return a(t,e),t},r=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,i){function r(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,l)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RoomGallery=t.GalleryContext=t.roomGalleryDefaultSettings=void 0;const l=i(o(12)),s=o(188),c=o(847),u=o(754),d=o(191),m=o(296);t.roomGalleryDefaultSettings={arrowNav:c.ArrowNav.number,darkNav:c.DarkNav.button,zoomNav:c.ZoomNav.button,darkMode:c.DarkMode.manual,zoomMode:c.ZoomMode.manual,paginationsNav:c.PaginationsNav.button,paginations:c.Paginations.number,paginationsOnZoom:c.PaginationsOnZoom.hide,arrowNavOnZoom:c.ArrowNavOnZoom.show,defaultPosition:{x:0,y:0},swipeToNav:!0,swipeToZoom:!0,keypressToNav:!0,keypressToZoom:!0,animationSpeed:{min:2,ratio:1},allOnOneWall:!1,sanitizeHtml:!0,sanitizeHtmlOptions:{allowedTags:Object.values(c.sanitizeHtmlAllowedTags),allowedAttributes:Object.values(c.sanitizeHtmlAllowedAttributes)}},t.GalleryContext=(0,l.createContext)({position:t.roomGalleryDefaultSettings.defaultPosition,zoom:"in"===t.roomGalleryDefaultSettings.zoomMode,settings:t.roomGalleryDefaultSettings}),t.RoomGallery=(0,l.forwardRef)((({fetch:e,items:o,styles:n,children:a,settings:i},p)=>{var f;const h=Object.assign(Object.assign({},t.roomGalleryDefaultSettings),i),[g,v]=(0,l.useState)({items:[],rooms:[],activeItem:{index:0},prevItem:{index:0}}),[b,y]=(0,l.useState)(h.defaultPosition),[w,E]=(0,l.useState)(h.darkMode===c.DarkMode.dark),[k,S]=(0,l.useState)(h.zoomMode===c.ZoomMode.in),T={currentState:g,zoom:k,dark:w,position:b,settings:h},O=()=>{v({items:[],rooms:[],activeItem:{index:0},prevItem:{index:0}}),y(h.defaultPosition),E(h.darkMode===c.DarkMode.dark),S(h.zoomMode===c.ZoomMode.in)},x=()=>{var t,n;const i=[],l=[];"function"==typeof(null===(t=null==h?void 0:h.event)||void 0===t?void 0:t.onInit)&&(null===(n=null==h?void 0:h.event)||void 0===n||n.onInit(T)),a?N({childrenItems:a,preItems:i,preRooms:l}):o&&(null==o?void 0:o.length)>0&&"object"==typeof o?o[0]instanceof HTMLElement?N({elementItems:o,preItems:i,preRooms:l}):N({dataItems:o,preItems:i,preRooms:l}):e&&"string"==typeof e?B(e).then((e=>{N({dataItems:e,preItems:i,preRooms:l})})):e&&"function"==typeof e?e().then((e=>r(void 0,void 0,void 0,(function*(){N({dataItems:e,preItems:i,preRooms:l})})))):(N({dataItems:[{title:h.emptyMessage||"It looks like there's nothing here. Visit us in a moment"}],preRooms:[],preItems:[]}),console.error("No fetch methods or items provided. Use one of this props: fetch, items"))},N=({dataItems:e,elementItems:t,childrenItems:o,preItems:n,preRooms:a})=>{var i,r;let l=[];if(o){l=[...Array.isArray(o)?o:[o]];const e=[];l.forEach((t=>{e.push({element:t})})),l=e}else if(t){l=[...t];const e=[];l.forEach((t=>{e.push({HtmlElement:t})})),l=e}else l=e;(0,d.parseRooms)(l,a,h.allOnOneWall);const s=(0,d.parseWalls)(l,n,a,b,h.allOnOneWall);s&&v({rooms:a,items:n,activeItem:s,prevItem:g.activeItem}),"function"==typeof(null===(i=null==h?void 0:h.event)||void 0===i?void 0:i.onRender)&&(null===(r=null==h?void 0:h.event)||void 0===r||r.onRender(T))},_=()=>{var e,t;const o=M();o&&(C(o),"function"==typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onShowNext)&&(null===(t=null==h?void 0:h.event)||void 0===t||t.onShowNext(T)))},M=()=>{if("number"==typeof g.activeItem.index)return g.activeItem.index<g.items.length?g.items[g.activeItem.index+1]:g.items[g.items.length]},I=()=>{var e,t;const o=A();o&&(C(o),"function"==typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onShowPrev)&&(null===(t=null==h?void 0:h.event)||void 0===t||t.onShowPrev(T)))},A=()=>{if("number"==typeof g.activeItem.index)return g.activeItem.index>0?g.items[g.activeItem.index-1]:g.items[0]},C=e=>{v(Object.assign(Object.assign({},g),{activeItem:e,prevItem:g.activeItem})),e.position&&y({y:e.position.y,x:e.position.x})},D=()=>{var e,t,o,n;E((e=>!e)),"function"!=typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onDarkModeOn)||w||null===(t=null==h?void 0:h.event)||void 0===t||t.onDarkModeOn(T),"function"==typeof(null===(o=null==h?void 0:h.event)||void 0===o?void 0:o.onDarkModeOff)&&w&&(null===(n=null==h?void 0:h.event)||void 0===n||n.onDarkModeOff(T))},R=()=>{var e,t,o,n;S((e=>!e)),"function"!=typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onZoomIn)||k||null===(t=null==h?void 0:h.event)||void 0===t||t.onZoomIn(T),"function"==typeof(null===(o=null==h?void 0:h.event)||void 0===o?void 0:o.onZoomOut)&&k&&(null===(n=null==h?void 0:h.event)||void 0===n||n.onZoomOut(T))},L=()=>{var e,t;S(!0),"function"==typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onZoomOut)&&(null===(t=null==h?void 0:h.event)||void 0===t||t.onZoomOut(T))},z=()=>{var e,t;S(!1),"function"==typeof(null===(e=null==h?void 0:h.event)||void 0===e?void 0:e.onZoomIn)&&(null===(t=null==h?void 0:h.event)||void 0===t||t.onZoomIn(T))},B=e=>r(void 0,void 0,void 0,(function*(){return(yield(yield fetch(e)).json()).items}));function P(){return h.darkMode===c.DarkMode.manual&&w||h.darkMode===c.DarkMode.dark}function j(){return h.zoomMode===c.ZoomMode.manual&&k||h.zoomMode===c.ZoomMode.in}const H=(0,s.useSwipeable)({onSwipedLeft:()=>h.swipeToNav&&_(),onSwipedRight:()=>h.swipeToNav&&I(),onSwipedUp:()=>h.swipeToZoom&&z(),onSwipedDown:()=>h.swipeToZoom&&L(),swipeDuration:500,preventScrollOnSwipe:!0,trackMouse:!0});return(0,l.useEffect)((()=>{x()}),[o,e,a,i,n]),(0,l.useEffect)((()=>{const e=e=>{switch(e.key){case"ArrowUp":h.keypressToZoom&&L();break;case"ArrowDown":h.keypressToZoom&&z();break;case"ArrowLeft":h.keypressToNav&&I();break;case"ArrowRight":h.keypressToNav&&_()}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[g.items,b]),(0,l.useEffect)((()=>{const e=document.querySelector(":root");if(e instanceof HTMLElement){const t=e.style;n&&Object.keys(n).forEach((e=>{e&&e in c.StylesVariables&&t.setProperty("--room-"+(0,d.kebabize)(e),n[e])}))}}),[n]),(0,l.useImperativeHandle)(p,(()=>({gotoNextItem(){_()},gotoPrevItem(){I()},toggleDarkMode(){D()},setDarkMode(e){(e=>{var t,o,n,a;E(e),"function"!=typeof(null===(t=null==h?void 0:h.event)||void 0===t?void 0:t.onDarkModeOn)||w||null===(o=null==h?void 0:h.event)||void 0===o||o.onDarkModeOn(T),"function"==typeof(null===(n=null==h?void 0:h.event)||void 0===n?void 0:n.onDarkModeOff)&&w&&(null===(a=null==h?void 0:h.event)||void 0===a||a.onDarkModeOff(T))})(e)},toggleZoom(){R()},setZoom(e){S(e)},getCurrentItem:()=>g.activeItem,refresh(){O(),x()},clear(){O()}})),[g]),l.default.createElement(t.GalleryContext.Provider,{value:T},l.default.createElement(l.Suspense,{fallback:l.default.createElement((function(){return l.default.createElement("h2",null,"Loading...")}),null)},g&&g.rooms.length>0&&l.default.createElement("div",Object.assign({className:`room-gallery${P()?" room-dark":""}${j()?" room-zoom":""}`},H),l.default.createElement("div",{className:"room-body"},l.default.createElement("div",{className:"room-wrapper"},l.default.createElement("div",{className:"room-arena",style:{transform:"rotateY("+(b?g.activeItem.position&&g.prevItem.position&&3===g.activeItem.position.y&&0===g.prevItem.position.y?-90:90*b.y:0)+"deg) translateX("+-100*(null!==(f=null==b?void 0:b.x)&&void 0!==f?f:0)+"%)",transition:(()=>{var e,t;let o=2,n=2,a=1;return"number"==typeof(null==h?void 0:h.animationSpeed)?n=h.animationSpeed:"number"==typeof(null===(e=null==h?void 0:h.animationSpeed)||void 0===e?void 0:e.min)&&(n=h.animationSpeed.min),"object"==typeof(null==h?void 0:h.animationSpeed)&&"number"==typeof(null===(t=null==h?void 0:h.animationSpeed)||void 0===t?void 0:t.ratio)&&(a=h.animationSpeed.ratio),g.activeItem&&g.activeItem.position&&"number"==typeof g.activeItem.position.x&&g.prevItem&&g.prevItem.position&&"number"==typeof g.prevItem.position.x&&(o=g.prevItem.position.x-g.activeItem.position.x),`transform ${Math.abs(o)>n?Math.abs(o)*a:n}s ease-in-out`})()}},g.rooms.map(((e,t)=>l.default.createElement(u.Room,{key:t,index:t,room:e,rooms:g.rooms,activeItem:g.activeItem,prevItem:g.prevItem,position:b,settings:h}))))),function(){var e,t,o,n;return"number"==typeof g.activeItem.index&&h.arrowNav!==c.ArrowNav.disabled&&l.default.createElement("div",{className:"room-navigations"},g.activeItem.index>0&&A()&&(j()&&h.arrowNavOnZoom!==c.ArrowNavOnZoom.hide||!j())&&h.arrowNav&&l.default.createElement(l.default.Fragment,null,["number","blank"].includes(h.arrowNav)?l.default.createElement("button",{type:"button",className:"room-prev",onClick:()=>I()},h.arrowNav===c.ArrowNav.number&&l.default.createElement("span",null,g.activeItem.index)):l.default.createElement("button",{type:"button",className:"room-prev room-icon",onClick:()=>I()},null!==(t=null===(e=null==h?void 0:h.icons)||void 0===e?void 0:e.prev)&&void 0!==t?t:l.default.createElement(m.PrevIcon,null))),g.items.length>g.activeItem.index+1&&M()&&(j()&&h.arrowNavOnZoom!==c.ArrowNavOnZoom.hide||!j())&&h.arrowNav&&l.default.createElement(l.default.Fragment,null,["number","blank"].includes(h.arrowNav)?l.default.createElement("button",{type:"button",className:"room-next",onClick:()=>_()},h.arrowNav===c.ArrowNav.number&&l.default.createElement("span",null,g.activeItem.index+2)):l.default.createElement("button",{type:"button",className:"room-next room-icon",onClick:()=>_()},null!==(n=null===(o=null==h?void 0:h.icons)||void 0===o?void 0:o.next)&&void 0!==n?n:l.default.createElement(m.NextIcon,null))))}(),h.paginations!==c.Paginations.disabled&&(j()&&h.paginationsOnZoom!==c.PaginationsOnZoom.hide||!j())&&l.default.createElement("div",{className:"room-paginations "+(h.paginations===c.Paginations.thumb?"room-paginations-thumbs":"")},g.items.map(((e,t)=>{var o;return e&&l.default.createElement("button",{type:"button",className:`${t===g.activeItem.index?"active":""}\n ${h.paginationsNav===c.PaginationsNav.text&&h.paginations!==c.Paginations.thumb?" room-icon":""}`,key:t,onClick:()=>C(e)},h.paginations===c.Paginations.number&&l.default.createElement("span",null,t+1),h.paginations===c.Paginations.title&&l.default.createElement("span",null,null==e?void 0:e.title),h.paginations===c.Paginations.thumb&&("object"==typeof(null==e?void 0:e.image)?l.default.createElement("img",{src:null===(o=null==e?void 0:e.image)||void 0===o?void 0:o.thumb}):"string"==typeof(null==e?void 0:e.image)&&l.default.createElement("img",{src:null==e?void 0:e.image})))}))),function(){var e,t,o,n;return h.zoomMode===c.ZoomMode.manual&&l.default.createElement(l.default.Fragment,null,j()?l.default.createElement("button",{type:"button",className:"room-exit-btn "+(h.zoomNav===c.ZoomNav.icon?"room-icon":""),onClick:()=>R()},null!==(t=null===(e=null==h?void 0:h.icons)||void 0===e?void 0:e.zoomOut)&&void 0!==t?t:l.default.createElement(m.ZoomOutIcon,null)):l.default.createElement("button",{type:"button",className:"room-zoom-btn "+(h.zoomNav===c.ZoomNav.icon?"room-icon":""),onClick:()=>R()},null!==(n=null===(o=null==h?void 0:h.icons)||void 0===o?void 0:o.zoomIn)&&void 0!==n?n:l.default.createElement(m.ZoomInIcon,null)))}(),function(){var e,t,o,n;return h.darkMode===c.DarkMode.manual&&l.default.createElement("button",{type:"button",className:"room-dark-btn "+(h.darkNav===c.DarkNav.icon?"room-icon":""),onClick:()=>D()},P()?null!==(t=null===(e=null==h?void 0:h.icons)||void 0===e?void 0:e.lightOn)&&void 0!==t?t:l.default.createElement(m.LightOffIcon,null):null!==(n=null===(o=null==h?void 0:h.icons)||void 0===o?void 0:o.lightOff)&&void 0!==n?n:l.default.createElement(m.LightOffIcon,null))}()))))}))},754:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Room=void 0;const a=n(o(12)),i=o(835);t.Room=({room:e,rooms:t,position:o,index:n})=>e.walls&&o?a.default.createElement("div",{className:`room-walls${n===t.length-1?" last":""} ${0===n?" first":""}`,style:{transform:"translateX("+100*n+"%)"}},e.walls.map(((t,r)=>{const l=Object.values(i.Direction).indexOf(t.direction);return t.visible&&a.default.createElement(i.Wall,{room:e,key:r,direction:t.direction,items:t.items,visible:t.visible,active:o.x===n&&o.y===l})})),a.default.createElement("div",{className:"room-ceil"}),a.default.createElement("div",{className:"room-floor"})):a.default.createElement(a.default.Fragment,null)},835:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Wall=t.Direction=void 0;const a=n(o(12)),i=o(214);var r;!function(e){e.n="n",e.e="e",e.s="s",e.w="w"}(r||(t.Direction=r={})),t.Wall=({direction:e,items:t,active:o})=>a.default.createElement("div",{className:`room-wall wall-${e}${o?" wall-active":""}`},t.map((e=>a.default.createElement(i.Item,{key:e.index,index:e.index,title:null==e?void 0:e.title,description:null==e?void 0:e.description,descriptionHtml:null==e?void 0:e.descriptionHtml,image:null==e?void 0:e.image,element:null==e?void 0:e.element,html:null==e?void 0:e.html,video:null==e?void 0:e.video,vimeo:null==e?void 0:e.vimeo,youtube:null==e?void 0:e.youtube,HtmlElement:null==e?void 0:e.HtmlElement,position:e.position,height:null==e?void 0:e.height,width:null==e?void 0:e.width}))))},847:(e,t)=>{var o,n,a,i,r,l,s,c,u,d,m,p;Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeHtmlAllowedAttributes=t.sanitizeHtmlAllowedTags=t.StylesVariables=t.ArrowNavOnZoom=t.PaginationsOnZoom=t.Paginations=t.PaginationsNav=t.ZoomMode=t.ZoomNav=t.DarkMode=t.DarkNav=t.ArrowNav=void 0,function(e){e.number="number",e.icon="icon",e.blank="blank",e.disabled="disabled"}(o||(t.ArrowNav=o={})),function(e){e.button="button",e.icon="icon"}(n||(t.DarkNav=n={})),function(e){e.dark="dark",e.light="light",e.manual="manual",e.auto="auto"}(a||(t.DarkMode=a={})),function(e){e.button="